Class: AWS.Iot

Inherits:
AWS.Service show all
Identifier:
iot
API Version:
2015-05-28
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

AWS IoT provides secure, bi-directional communication between Internet-connected devices (such as sensors, actuators, embedded devices, or smart appliances) and the AWS cloud. You can discover your custom IoT-Data endpoint to communicate with, configure rules for data processing and integration with other services, organize resources associated with each device (Registry), configure logging, and create and manage policies and credentials to authenticate devices.

For more information about how AWS IoT works, see the Developer Guide.

For information about how to use the credentials provider for AWS IoT, see Authorizing Direct Calls to AWS Services.

Sending a Request Using Iot

var iot = new AWS.Iot();
iot.associateTargetsWithJob(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the Iot object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var iot = new AWS.Iot({apiVersion: '2015-05-28'});

You can also set the API version globally in AWS.config.apiVersions using the iot service identifier:

AWS.config.apiVersions = {
  iot: '2015-05-28',
  // other service API versions
};

var iot = new AWS.Iot();

Version:

  • 2015-05-28

Constructor Summary

Property Summary

Properties inherited from AWS.Service

apiVersions

Method Summary

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.Iot(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a Iot object

var iot = new AWS.Iot({apiVersion: '2015-05-28'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.Iot.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.Iot.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.Iot.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

acceptCertificateTransfer(params = {}, callback) ⇒ AWS.Request

Accepts a pending certificate transfer. The default state of the certificate is INACTIVE.

To check for pending certificate transfers, call ListCertificates to enumerate your certificates.

Service Reference:

Examples:

Calling the acceptCertificateTransfer operation

var params = {
  certificateId: 'STRING_VALUE', /* required */
  setAsActive: true || false
};
iot.acceptCertificateTransfer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • certificateId — (String)

      The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

    • setAsActive — (Boolean)

      Specifies whether the certificate is active.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

addThingToBillingGroup(params = {}, callback) ⇒ AWS.Request

Adds a thing to a billing group.

Service Reference:

Examples:

Calling the addThingToBillingGroup operation

var params = {
  billingGroupArn: 'STRING_VALUE',
  billingGroupName: 'STRING_VALUE',
  thingArn: 'STRING_VALUE',
  thingName: 'STRING_VALUE'
};
iot.addThingToBillingGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • billingGroupName — (String)

      The name of the billing group.

    • billingGroupArn — (String)

      The ARN of the billing group.

    • thingName — (String)

      The name of the thing to be added to the billing group.

    • thingArn — (String)

      The ARN of the thing to be added to the billing group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

addThingToThingGroup(params = {}, callback) ⇒ AWS.Request

Adds a thing to a thing group.

Service Reference:

Examples:

Calling the addThingToThingGroup operation

var params = {
  overrideDynamicGroups: true || false,
  thingArn: 'STRING_VALUE',
  thingGroupArn: 'STRING_VALUE',
  thingGroupName: 'STRING_VALUE',
  thingName: 'STRING_VALUE'
};
iot.addThingToThingGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingGroupName — (String)

      The name of the group to which you are adding a thing.

    • thingGroupArn — (String)

      The ARN of the group to which you are adding a thing.

    • thingName — (String)

      The name of the thing to add to a group.

    • thingArn — (String)

      The ARN of the thing to add to a group.

    • overrideDynamicGroups — (Boolean)

      Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

associateTargetsWithJob(params = {}, callback) ⇒ AWS.Request

Associates a group with a continuous job. The following criteria must be met:

  • The job must have been created with the targetSelection field set to "CONTINUOUS".

  • The job status must currently be "IN_PROGRESS".

  • The total number of targets associated with a job must not exceed 100.

Service Reference:

Examples:

Calling the associateTargetsWithJob operation

var params = {
  jobId: 'STRING_VALUE', /* required */
  targets: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  comment: 'STRING_VALUE'
};
iot.associateTargetsWithJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • targets — (Array<String>)

      A list of thing group ARNs that define the targets of the job.

    • jobId — (String)

      The unique identifier you assigned to this job when it was created.

    • comment — (String)

      An optional comment string describing why the job was associated with the targets.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • jobArn — (String)

        An ARN identifying the job.

      • jobId — (String)

        The unique identifier you assigned to this job when it was created.

      • description — (String)

        A short text description of the job.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

attachPolicy(params = {}, callback) ⇒ AWS.Request

Attaches a policy to the specified target.

Service Reference:

Examples:

Calling the attachPolicy operation

var params = {
  policyName: 'STRING_VALUE', /* required */
  target: 'STRING_VALUE' /* required */
};
iot.attachPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • policyName — (String)

      The name of the policy to attach.

    • target — (String)

      The identity to which the policy is attached.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

attachPrincipalPolicy(params = {}, callback) ⇒ AWS.Request

Attaches the specified policy to the specified principal (certificate or other credential).

Note: This API is deprecated. Please use AttachPolicy instead.

Service Reference:

Examples:

Calling the attachPrincipalPolicy operation

var params = {
  policyName: 'STRING_VALUE', /* required */
  principal: 'STRING_VALUE' /* required */
};
iot.attachPrincipalPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • policyName — (String)

      The policy name.

    • principal — (String)

      The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

attachSecurityProfile(params = {}, callback) ⇒ AWS.Request

Associates a Device Defender security profile with a thing group or with this account. Each thing group or account can have up to five security profiles associated with it.

Service Reference:

Examples:

Calling the attachSecurityProfile operation

var params = {
  securityProfileName: 'STRING_VALUE', /* required */
  securityProfileTargetArn: 'STRING_VALUE' /* required */
};
iot.attachSecurityProfile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • securityProfileName — (String)

      The security profile that is attached.

    • securityProfileTargetArn — (String)

      The ARN of the target (thing group) to which the security profile is attached.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

attachThingPrincipal(params = {}, callback) ⇒ AWS.Request

Attaches the specified principal to the specified thing. A principal can be X.509 certificates, IAM users, groups, and roles, Amazon Cognito identities or federated identities.

Service Reference:

Examples:

Calling the attachThingPrincipal operation

var params = {
  principal: 'STRING_VALUE', /* required */
  thingName: 'STRING_VALUE' /* required */
};
iot.attachThingPrincipal(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingName — (String)

      The name of the thing.

    • principal — (String)

      The principal, such as a certificate or other credential.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

cancelAuditTask(params = {}, callback) ⇒ AWS.Request

Cancels an audit that is in progress. The audit can be either scheduled or on-demand. If the audit is not in progress, an "InvalidRequestException" occurs.

Service Reference:

Examples:

Calling the cancelAuditTask operation

var params = {
  taskId: 'STRING_VALUE' /* required */
};
iot.cancelAuditTask(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • taskId — (String)

      The ID of the audit you want to cancel. You can only cancel an audit that is "IN_PROGRESS".

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

cancelCertificateTransfer(params = {}, callback) ⇒ AWS.Request

Cancels a pending transfer for the specified certificate.

Note Only the transfer source account can use this operation to cancel a transfer. (Transfer destinations can use RejectCertificateTransfer instead.) After transfer, AWS IoT returns the certificate to the source account in the INACTIVE state. After the destination account has accepted the transfer, the transfer cannot be cancelled.

After a certificate transfer is cancelled, the status of the certificate changes from PENDING_TRANSFER to INACTIVE.

Service Reference:

Examples:

Calling the cancelCertificateTransfer operation

var params = {
  certificateId: 'STRING_VALUE' /* required */
};
iot.cancelCertificateTransfer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • certificateId — (String)

      The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

cancelJob(params = {}, callback) ⇒ AWS.Request

Cancels a job.

Service Reference:

Examples:

Calling the cancelJob operation

var params = {
  jobId: 'STRING_VALUE', /* required */
  comment: 'STRING_VALUE',
  force: true || false,
  reasonCode: 'STRING_VALUE'
};
iot.cancelJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • jobId — (String)

      The unique identifier you assigned to this job when it was created.

    • reasonCode — (String)

      (Optional)A reason code string that explains why the job was canceled.

    • comment — (String)

      An optional comment string describing why the job was canceled.

    • force — (Boolean)

      (Optional) If true job executions with status "IN_PROGRESS" and "QUEUED" are canceled, otherwise only job executions with status "QUEUED" are canceled. The default is false.

      Canceling a job which is "IN_PROGRESS", will cause a device which is executing the job to be unable to update the job execution status. Use caution and ensure that each device executing a job which is canceled is able to recover to a valid state.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • jobArn — (String)

        The job ARN.

      • jobId — (String)

        The unique identifier you assigned to this job when it was created.

      • description — (String)

        A short text description of the job.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

cancelJobExecution(params = {}, callback) ⇒ AWS.Request

Cancels the execution of a job for a given thing.

Service Reference:

Examples:

Calling the cancelJobExecution operation

var params = {
  jobId: 'STRING_VALUE', /* required */
  thingName: 'STRING_VALUE', /* required */
  expectedVersion: 'NUMBER_VALUE',
  force: true || false,
  statusDetails: {
    '<DetailsKey>': 'STRING_VALUE',
    /* '<DetailsKey>': ... */
  }
};
iot.cancelJobExecution(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • jobId — (String)

      The ID of the job to be canceled.

    • thingName — (String)

      The name of the thing whose execution of the job will be canceled.

    • force — (Boolean)

      (Optional) If true the job execution will be canceled if it has status IN_PROGRESS or QUEUED, otherwise the job execution will be canceled only if it has status QUEUED. If you attempt to cancel a job execution that is IN_PROGRESS, and you do not set force to true, then an InvalidStateTransitionException will be thrown. The default is false.

      Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job execution status. Use caution and ensure that the device is able to recover to a valid state.

    • expectedVersion — (Integer)

      (Optional) The expected current version of the job execution. Each time you update the job execution, its version is incremented. If the version of the job execution stored in Jobs does not match, the update is rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job execution status data.)

    • statusDetails — (map<String>)

      A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged. You can specify at most 10 name/value pairs.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

clearDefaultAuthorizer(params = {}, callback) ⇒ AWS.Request

Clears the default authorizer.

Service Reference:

Examples:

Calling the clearDefaultAuthorizer operation

var params = {
};
iot.clearDefaultAuthorizer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createAuthorizer(params = {}, callback) ⇒ AWS.Request

Creates an authorizer.

Service Reference:

Examples:

Calling the createAuthorizer operation

var params = {
  authorizerFunctionArn: 'STRING_VALUE', /* required */
  authorizerName: 'STRING_VALUE', /* required */
  tokenKeyName: 'STRING_VALUE', /* required */
  tokenSigningPublicKeys: { /* required */
    '<KeyName>': 'STRING_VALUE',
    /* '<KeyName>': ... */
  },
  status: ACTIVE | INACTIVE
};
iot.createAuthorizer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • authorizerName — (String)

      The authorizer name.

    • authorizerFunctionArn — (String)

      The ARN of the authorizer's Lambda function.

    • tokenKeyName — (String)

      The name of the token key used to extract the token from the HTTP headers.

    • tokenSigningPublicKeys — (map<String>)

      The public keys used to verify the digital signature returned by your custom authentication service.

    • status — (String)

      The status of the create authorizer request.

      Possible values include:
      • "ACTIVE"
      • "INACTIVE"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • authorizerName — (String)

        The authorizer's name.

      • authorizerArn — (String)

        The authorizer ARN.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createBillingGroup(params = {}, callback) ⇒ AWS.Request

Creates a billing group.

Service Reference:

Examples:

Calling the createBillingGroup operation

var params = {
  billingGroupName: 'STRING_VALUE', /* required */
  billingGroupProperties: {
    billingGroupDescription: 'STRING_VALUE'
  },
  tags: [
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
iot.createBillingGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • billingGroupName — (String)

      The name you wish to give to the billing group.

    • billingGroupProperties — (map)

      The properties of the billing group.

      • billingGroupDescription — (String)

        The description of the billing group.

    • tags — (Array<map>)

      Metadata which can be used to manage the billing group.

      • Key — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • billingGroupName — (String)

        The name you gave to the billing group.

      • billingGroupArn — (String)

        The ARN of the billing group.

      • billingGroupId — (String)

        The ID of the billing group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createCertificateFromCsr(params = {}, callback) ⇒ AWS.Request

Creates an X.509 certificate using the specified certificate signing request.

Note: The CSR must include a public key that is either an RSA key with a length of at least 2048 bits or an ECC key from NIST P-256 or NIST P-384 curves.

Note: Reusing the same certificate signing request (CSR) results in a distinct certificate.

You can create multiple certificates in a batch by creating a directory, copying multiple .csr files into that directory, and then specifying that directory on the command line. The following commands show how to create a batch of certificates given a batch of CSRs.

Assuming a set of CSRs are located inside of the directory my-csr-directory:

On Linux and OS X, the command is:

$ ls my-csr-directory/ | xargs -I {} aws iot create-certificate-from-csr --certificate-signing-request file://my-csr-directory/{}

This command lists all of the CSRs in my-csr-directory and pipes each CSR file name to the aws iot create-certificate-from-csr AWS CLI command to create a certificate for the corresponding CSR.

The aws iot create-certificate-from-csr part of the command can also be run in parallel to speed up the certificate creation process:

$ ls my-csr-directory/ | xargs -P 10 -I {} aws iot create-certificate-from-csr --certificate-signing-request file://my-csr-directory/{}

On Windows PowerShell, the command to create certificates for all CSRs in my-csr-directory is:

> ls -Name my-csr-directory | %iot create-certificate-from-csr --certificate-signing-request file://my-csr-directory/$_

On a Windows command prompt, the command to create certificates for all CSRs in my-csr-directory is:

> forfiles /p my-csr-directory /c "cmd /c aws iot create-certificate-from-csr --certificate-signing-request file://@path"

Service Reference:

Examples:

Calling the createCertificateFromCsr operation

var params = {
  certificateSigningRequest: 'STRING_VALUE', /* required */
  setAsActive: true || false
};
iot.createCertificateFromCsr(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • certificateSigningRequest — (String)

      The certificate signing request (CSR).

    • setAsActive — (Boolean)

      Specifies whether the certificate is active.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • certificateArn — (String)

        The Amazon Resource Name (ARN) of the certificate. You can use the ARN as a principal for policy operations.

      • certificateId — (String)

        The ID of the certificate. Certificate management operations only take a certificateId.

      • certificatePem — (String)

        The certificate data, in PEM format.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDynamicThingGroup(params = {}, callback) ⇒ AWS.Request

Creates a dynamic thing group.

Service Reference:

Examples:

Calling the createDynamicThingGroup operation

var params = {
  queryString: 'STRING_VALUE', /* required */
  thingGroupName: 'STRING_VALUE', /* required */
  indexName: 'STRING_VALUE',
  queryVersion: 'STRING_VALUE',
  tags: [
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ],
  thingGroupProperties: {
    attributePayload: {
      attributes: {
        '<AttributeName>': 'STRING_VALUE',
        /* '<AttributeName>': ... */
      },
      merge: true || false
    },
    thingGroupDescription: 'STRING_VALUE'
  }
};
iot.createDynamicThingGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingGroupName — (String)

      The dynamic thing group name to create.

    • thingGroupProperties — (map)

      The dynamic thing group properties.

      • thingGroupDescription — (String)

        The thing group description.

      • attributePayload — (map)

        The thing group attributes in JSON format.

        • attributes — (map<String>)

          A JSON string containing up to three key-value pair in JSON format. For example:

          {\"attributes\":{\"string1\":\"string2\"}}

        • merge — (Boolean)

          Specifies whether the list of attributes provided in the AttributePayload is merged with the attributes stored in the registry, instead of overwriting them.

          To remove an attribute, call UpdateThing with an empty attribute value.

          Note: The merge attribute is only valid when calling UpdateThing.
    • indexName — (String)

      The dynamic thing group index name.

      Note: Currently one index is supported: "AWS_Things".
    • queryString — (String)

      The dynamic thing group search query string.

      See Query Syntax for information about query string syntax.

    • queryVersion — (String)

      The dynamic thing group query version.

      Note: Currently one query version is supported: "2017-09-30". If not specified, the query version defaults to this value.
    • tags — (Array<map>)

      Metadata which can be used to manage the dynamic thing group.

      • Key — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • thingGroupName — (String)

        The dynamic thing group name.

      • thingGroupArn — (String)

        The dynamic thing group ARN.

      • thingGroupId — (String)

        The dynamic thing group ID.

      • indexName — (String)

        The dynamic thing group index name.

      • queryString — (String)

        The dynamic thing group search query string.

      • queryVersion — (String)

        The dynamic thing group query version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createJob(params = {}, callback) ⇒ AWS.Request

Creates a job.

Service Reference:

Examples:

Calling the createJob operation

var params = {
  jobId: 'STRING_VALUE', /* required */
  targets: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  abortConfig: {
    criteriaList: [ /* required */
      {
        action: CANCEL, /* required */
        failureType: FAILED | REJECTED | TIMED_OUT | ALL, /* required */
        minNumberOfExecutedThings: 'NUMBER_VALUE', /* required */
        thresholdPercentage: 'NUMBER_VALUE' /* required */
      },
      /* more items */
    ]
  },
  description: 'STRING_VALUE',
  document: 'STRING_VALUE',
  documentSource: 'STRING_VALUE',
  jobExecutionsRolloutConfig: {
    exponentialRate: {
      baseRatePerMinute: 'NUMBER_VALUE', /* required */
      incrementFactor: 'NUMBER_VALUE', /* required */
      rateIncreaseCriteria: { /* required */
        numberOfNotifiedThings: 'NUMBER_VALUE',
        numberOfSucceededThings: 'NUMBER_VALUE'
      }
    },
    maximumPerMinute: 'NUMBER_VALUE'
  },
  presignedUrlConfig: {
    expiresInSec: 'NUMBER_VALUE',
    roleArn: 'STRING_VALUE'
  },
  tags: [
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ],
  targetSelection: CONTINUOUS | SNAPSHOT,
  timeoutConfig: {
    inProgressTimeoutInMinutes: 'NUMBER_VALUE'
  }
};
iot.createJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • jobId — (String)

      A job identifier which must be unique for your AWS account. We recommend using a UUID. Alpha-numeric characters, "-" and "_" are valid for use here.

    • targets — (Array<String>)

      A list of things and thing groups to which the job should be sent.

    • documentSource — (String)

      An S3 link to the job document.

    • document — (String)

      The job document.

      Note: If the job document resides in an S3 bucket, you must use a placeholder link when specifying the document. The placeholder link is of the following form: ${aws:iot:s3-presigned-url:https://s3.amazonaws.com/bucket/key} where bucket is your bucket name and key is the object in the bucket to which you are linking.
    • description — (String)

      A short text description of the job.

    • presignedUrlConfig — (map)

      Configuration information for pre-signed S3 URLs.

      • roleArn — (String)

        The ARN of an IAM role that grants grants permission to download files from the S3 bucket where the job data/updates are stored. The role must also grant permission for IoT to download the files.

      • expiresInSec — (Integer)

        How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 3600 seconds. Pre-signed URLs are generated when Jobs receives an MQTT request for the job document.

    • targetSelection — (String)

      Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a thing when the thing is added to a target group, even after the job was completed by all things originally in the group.

      Possible values include:
      • "CONTINUOUS"
      • "SNAPSHOT"
    • jobExecutionsRolloutConfig — (map)

      Allows you to create a staged rollout of the job.

      • maximumPerMinute — (Integer)

        The maximum number of things that will be notified of a pending job, per minute. This parameter allows you to create a staged rollout.

      • exponentialRate — (map)

        The rate of increase for a job rollout. This parameter allows you to define an exponential rate for a job rollout.

        • baseRatePerMinuterequired — (Integer)

          The minimum number of things that will be notified of a pending job, per minute at the start of job rollout. This parameter allows you to define the initial rate of rollout.

        • incrementFactorrequired — (Float)

          The exponential factor to increase the rate of rollout for a job.

        • rateIncreaseCriteriarequired — (map)

          The criteria to initiate the increase in rate of rollout for a job.

          AWS IoT supports up to one digit after the decimal (for example, 1.5, but not 1.55).

          • numberOfNotifiedThings — (Integer)

            The threshold for number of notified things that will initiate the increase in rate of rollout.

          • numberOfSucceededThings — (Integer)

            The threshold for number of succeeded things that will initiate the increase in rate of rollout.

    • abortConfig — (map)

      Allows you to create criteria to abort a job.

      • criteriaListrequired — (Array<map>)

        The list of abort criteria to define rules to abort the job.

        • failureTyperequired — (String)

          The type of job execution failure to define a rule to initiate a job abort.

          Possible values include:
          • "FAILED"
          • "REJECTED"
          • "TIMED_OUT"
          • "ALL"
        • actionrequired — (String)

          The type of abort action to initiate a job abort.

          Possible values include:
          • "CANCEL"
        • thresholdPercentagerequired — (Float)

          The threshold as a percentage of the total number of executed things that will initiate a job abort.

          AWS IoT supports up to two digits after the decimal (for example, 10.9 and 10.99, but not 10.999).

        • minNumberOfExecutedThingsrequired — (Integer)

          Minimum number of executed things before evaluating an abort rule.

    • timeoutConfig — (map)

      Specifies the amount of time each device has to finish its execution of the job. The timer is started when the job execution status is set to IN_PROGRESS. If the job execution status is not set to another terminal state before the time expires, it will be automatically set to TIMED_OUT.

      • inProgressTimeoutInMinutes — (Integer)

        Specifies the amount of time, in minutes, this device has to finish execution of this job. The timeout interval can be anywhere between 1 minute and 7 days (1 to 10080 minutes). The in progress timer can't be updated and will apply to all job executions for the job. Whenever a job execution remains in the IN_PROGRESS status for longer than this interval, the job execution will fail and switch to the terminal TIMED_OUT status.

    • tags — (Array<map>)

      Metadata which can be used to manage the job.

      • Key — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • jobArn — (String)

        The job ARN.

      • jobId — (String)

        The unique identifier you assigned to this job.

      • description — (String)

        The job description.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createKeysAndCertificate(params = {}, callback) ⇒ AWS.Request

Creates a 2048-bit RSA key pair and issues an X.509 certificate using the issued public key.

Note This is the only time AWS IoT issues the private key for this certificate, so it is important to keep it in a secure location.

Service Reference:

Examples:

Calling the createKeysAndCertificate operation

var params = {
  setAsActive: true || false
};
iot.createKeysAndCertificate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • setAsActive — (Boolean)

      Specifies whether the certificate is active.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • certificateArn — (String)

        The ARN of the certificate.

      • certificateId — (String)

        The ID of the certificate. AWS IoT issues a default subject name for the certificate (for example, AWS IoT Certificate).

      • certificatePem — (String)

        The certificate data, in PEM format.

      • keyPair — (map)

        The generated key pair.

        • PublicKey — (String)

          The public key.

        • PrivateKey — (String)

          The private key.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createOTAUpdate(params = {}, callback) ⇒ AWS.Request

Creates an AWS IoT OTAUpdate on a target group of things or groups.

Service Reference:

Examples:

Calling the createOTAUpdate operation

var params = {
  files: [ /* required */
    {
      attributes: {
        '<AttributeKey>': 'STRING_VALUE',
        /* '<AttributeKey>': ... */
      },
      codeSigning: {
        awsSignerJobId: 'STRING_VALUE',
        customCodeSigning: {
          certificateChain: {
            certificateName: 'STRING_VALUE',
            inlineDocument: 'STRING_VALUE'
          },
          hashAlgorithm: 'STRING_VALUE',
          signature: {
            inlineDocument: new Buffer('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */
          },
          signatureAlgorithm: 'STRING_VALUE'
        },
        startSigningJobParameter: {
          destination: {
            s3Destination: {
              bucket: 'STRING_VALUE',
              prefix: 'STRING_VALUE'
            }
          },
          signingProfileName: 'STRING_VALUE',
          signingProfileParameter: {
            certificateArn: 'STRING_VALUE',
            certificatePathOnDevice: 'STRING_VALUE',
            platform: 'STRING_VALUE'
          }
        }
      },
      fileLocation: {
        s3Location: {
          bucket: 'STRING_VALUE',
          key: 'STRING_VALUE',
          version: 'STRING_VALUE'
        },
        stream: {
          fileId: 'NUMBER_VALUE',
          streamId: 'STRING_VALUE'
        }
      },
      fileName: 'STRING_VALUE',
      fileVersion: 'STRING_VALUE'
    },
    /* more items */
  ],
  otaUpdateId: 'STRING_VALUE', /* required */
  roleArn: 'STRING_VALUE', /* required */
  targets: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  additionalParameters: {
    '<AttributeKey>': 'STRING_VALUE',
    /* '<AttributeKey>': ... */
  },
  awsJobExecutionsRolloutConfig: {
    maximumPerMinute: 'NUMBER_VALUE'
  },
  description: 'STRING_VALUE',
  tags: [
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ],
  targetSelection: CONTINUOUS | SNAPSHOT
};
iot.createOTAUpdate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • otaUpdateId — (String)

      The ID of the OTA update to be created.

    • description — (String)

      The description of the OTA update.

    • targets — (Array<String>)

      The targeted devices to receive OTA updates.

    • targetSelection — (String)

      Specifies whether the update will continue to run (CONTINUOUS), or will be complete after all the things specified as targets have completed the update (SNAPSHOT). If continuous, the update may also be run on a thing when a change is detected in a target. For example, an update will run on a thing when the thing is added to a target group, even after the update was completed by all things originally in the group. Valid values: CONTINUOUS | SNAPSHOT.

      Possible values include:
      • "CONTINUOUS"
      • "SNAPSHOT"
    • awsJobExecutionsRolloutConfig — (map)

      Configuration for the rollout of OTA updates.

      • maximumPerMinute — (Integer)

        The maximum number of OTA update job executions started per minute.

    • files — (Array<map>)

      The files to be streamed by the OTA update.

      • fileName — (String)

        The name of the file.

      • fileVersion — (String)

        The file version.

      • fileLocation — (map)

        The location of the updated firmware.

        • stream — (map)

          The stream that contains the OTA update.

          • streamId — (String)

            The stream ID.

          • fileId — (Integer)

            The ID of a file associated with a stream.

        • s3Location — (map)

          The location of the updated firmware in S3.

          • bucket — (String)

            The S3 bucket.

          • key — (String)

            The S3 key.

          • version — (String)

            The S3 bucket version.

      • codeSigning — (map)

        The code signing method of the file.

        • awsSignerJobId — (String)

          The ID of the AWSSignerJob which was created to sign the file.

        • startSigningJobParameter — (map)

          Describes the code-signing job.

          • signingProfileParameter — (map)

            Describes the code-signing profile.

            • certificateArn — (String)

              Certificate ARN.

            • platform — (String)

              The hardware platform of your device.

            • certificatePathOnDevice — (String)

              The location of the code-signing certificate on your device.

          • signingProfileName — (String)

            The code-signing profile name.

          • destination — (map)

            The location to write the code-signed file.

            • s3Destination — (map)

              Describes the location in S3 of the updated firmware.

              • bucket — (String)

                The S3 bucket that contains the updated firmware.

              • prefix — (String)

                The S3 prefix.

        • customCodeSigning — (map)

          A custom method for code signing a file.

          • signature — (map)

            The signature for the file.

            • inlineDocument — (Buffer, Typed Array, Blob, String)

              A base64 encoded binary representation of the code signing signature.

          • certificateChain — (map)

            The certificate chain.

            • certificateName — (String)

              The name of the certificate.

            • inlineDocument — (String)

              A base64 encoded binary representation of the code signing certificate chain.

          • hashAlgorithm — (String)

            The hash algorithm used to code sign the file.

          • signatureAlgorithm — (String)

            The signature algorithm used to code sign the file.

      • attributes — (map<String>)

        A list of name/attribute pairs.

    • roleArn — (String)

      The IAM role that allows access to the AWS IoT Jobs service.

    • additionalParameters — (map<String>)

      A list of additional OTA update parameters which are name-value pairs.

    • tags — (Array<map>)

      Metadata which can be used to manage updates.

      • Key — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • otaUpdateId — (String)

        The OTA update ID.

      • awsIotJobId — (String)

        The AWS IoT job ID associated with the OTA update.

      • otaUpdateArn — (String)

        The OTA update ARN.

      • awsIotJobArn — (String)

        The AWS IoT job ARN associated with the OTA update.

      • otaUpdateStatus — (String)

        The OTA update status.

        Possible values include:
        • "CREATE_PENDING"
        • "CREATE_IN_PROGRESS"
        • "CREATE_COMPLETE"
        • "CREATE_FAILED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createPolicy(params = {}, callback) ⇒ AWS.Request

Creates an AWS IoT policy.

The created policy is the default version for the policy. This operation creates a policy version with a version identifier of 1 and sets 1 as the policy's default version.

Service Reference:

Examples:

Calling the createPolicy operation

var params = {
  policyDocument: 'STRING_VALUE', /* required */
  policyName: 'STRING_VALUE' /* required */
};
iot.createPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • policyName — (String)

      The policy name.

    • policyDocument — (String)

      The JSON document that describes the policy. policyDocument must have a minimum length of 1, with a maximum length of 2048, excluding whitespace.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • policyName — (String)

        The policy name.

      • policyArn — (String)

        The policy ARN.

      • policyDocument — (String)

        The JSON document that describes the policy.

      • policyVersionId — (String)

        The policy version ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createPolicyVersion(params = {}, callback) ⇒ AWS.Request

Creates a new version of the specified AWS IoT policy. To update a policy, create a new policy version. A managed policy can have up to five versions. If the policy has five versions, you must use DeletePolicyVersion to delete an existing version before you create a new one.

Optionally, you can set the new version as the policy's default version. The default version is the operative version (that is, the version that is in effect for the certificates to which the policy is attached).

Service Reference:

Examples:

Calling the createPolicyVersion operation

var params = {
  policyDocument: 'STRING_VALUE', /* required */
  policyName: 'STRING_VALUE', /* required */
  setAsDefault: true || false
};
iot.createPolicyVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • policyName — (String)

      The policy name.

    • policyDocument — (String)

      The JSON document that describes the policy. Minimum length of 1. Maximum length of 2048, excluding whitespace.

    • setAsDefault — (Boolean)

      Specifies whether the policy version is set as the default. When this parameter is true, the new policy version becomes the operative version (that is, the version that is in effect for the certificates to which the policy is attached).

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • policyArn — (String)

        The policy ARN.

      • policyDocument — (String)

        The JSON document that describes the policy.

      • policyVersionId — (String)

        The policy version ID.

      • isDefaultVersion — (Boolean)

        Specifies whether the policy version is the default.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createRoleAlias(params = {}, callback) ⇒ AWS.Request

Creates a role alias.

Service Reference:

Examples:

Calling the createRoleAlias operation

var params = {
  roleAlias: 'STRING_VALUE', /* required */
  roleArn: 'STRING_VALUE', /* required */
  credentialDurationSeconds: 'NUMBER_VALUE'
};
iot.createRoleAlias(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • roleAlias — (String)

      The role alias that points to a role ARN. This allows you to change the role without having to update the device.

    • roleArn — (String)

      The role ARN.

    • credentialDurationSeconds — (Integer)

      How long (in seconds) the credentials will be valid.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • roleAlias — (String)

        The role alias.

      • roleAliasArn — (String)

        The role alias ARN.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createScheduledAudit(params = {}, callback) ⇒ AWS.Request

Creates a scheduled audit that is run at a specified time interval.

Service Reference:

Examples:

Calling the createScheduledAudit operation

var params = {
  frequency: DAILY | WEEKLY | BIWEEKLY | MONTHLY, /* required */
  scheduledAuditName: 'STRING_VALUE', /* required */
  targetCheckNames: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  dayOfMonth: 'STRING_VALUE',
  dayOfWeek: SUN | MON | TUE | WED | THU | FRI | SAT,
  tags: [
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
iot.createScheduledAudit(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • frequency — (String)

      How often the scheduled audit takes place. Can be one of "DAILY", "WEEKLY", "BIWEEKLY" or "MONTHLY". The actual start time of each audit is determined by the system.

      Possible values include:
      • "DAILY"
      • "WEEKLY"
      • "BIWEEKLY"
      • "MONTHLY"
    • dayOfMonth — (String)

      The day of the month on which the scheduled audit takes place. Can be "1" through "31" or "LAST". This field is required if the "frequency" parameter is set to "MONTHLY". If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.

    • dayOfWeek — (String)

      The day of the week on which the scheduled audit takes place. Can be one of "SUN", "MON", "TUE", "WED", "THU", "FRI" or "SAT". This field is required if the "frequency" parameter is set to "WEEKLY" or "BIWEEKLY".

      Possible values include:
      • "SUN"
      • "MON"
      • "TUE"
      • "WED"
      • "THU"
      • "FRI"
      • "SAT"
    • targetCheckNames — (Array<String>)

      Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use DescribeAccountAuditConfiguration to see the list of all checks including those that are enabled or UpdateAccountAuditConfiguration to select which checks are enabled.)

    • tags — (Array<map>)

      Metadata which can be used to manage the scheduled audit.

      • Key — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

    • scheduledAuditName — (String)

      The name you want to give to the scheduled audit. (Max. 128 chars)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • scheduledAuditArn — (String)

        The ARN of the scheduled audit.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createSecurityProfile(params = {}, callback) ⇒ AWS.Request

Creates a Device Defender security profile.

Service Reference:

Examples:

Calling the createSecurityProfile operation

var params = {
  securityProfileName: 'STRING_VALUE', /* required */
  additionalMetricsToRetain: [
    'STRING_VALUE',
    /* more items */
  ],
  alertTargets: {
    '<AlertTargetType>': {
      alertTargetArn: 'STRING_VALUE', /* required */
      roleArn: 'STRING_VALUE' /* required */
    },
    /* '<AlertTargetType>': ... */
  },
  behaviors: [
    {
      name: 'STRING_VALUE', /* required */
      criteria: {
        comparisonOperator: less-than | less-than-equals | greater-than | greater-than-equals | in-cidr-set | not-in-cidr-set | in-port-set | not-in-port-set,
        consecutiveDatapointsToAlarm: 'NUMBER_VALUE',
        consecutiveDatapointsToClear: 'NUMBER_VALUE',
        durationSeconds: 'NUMBER_VALUE',
        statisticalThreshold: {
          statistic: 'STRING_VALUE'
        },
        value: {
          cidrs: [
            'STRING_VALUE',
            /* more items */
          ],
          count: 'NUMBER_VALUE',
          ports: [
            'NUMBER_VALUE',
            /* more items */
          ]
        }
      },
      metric: 'STRING_VALUE'
    },
    /* more items */
  ],
  securityProfileDescription: 'STRING_VALUE',
  tags: [
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
iot.createSecurityProfile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • securityProfileName — (String)

      The name you are giving to the security profile.

    • securityProfileDescription — (String)

      A description of the security profile.

    • behaviors — (Array<map>)

      Specifies the behaviors that, when violated by a device (thing), cause an alert.

      • namerequired — (String)

        The name you have given to the behavior.

      • metric — (String)

        What is measured by the behavior.

      • criteria — (map)

        The criteria that determine if a device is behaving normally in regard to the metric.

        • comparisonOperator — (String)

          The operator that relates the thing measured (metric) to the criteria (containing a value or statisticalThreshold).

          Possible values include:
          • "less-than"
          • "less-than-equals"
          • "greater-than"
          • "greater-than-equals"
          • "in-cidr-set"
          • "not-in-cidr-set"
          • "in-port-set"
          • "not-in-port-set"
        • value — (map)

          The value to be compared with the metric.

          • count — (Integer)

            If the comparisonOperator calls for a numeric value, use this to specify that numeric value to be compared with the metric.

          • cidrs — (Array<String>)

            If the comparisonOperator calls for a set of CIDRs, use this to specify that set to be compared with the metric.

          • ports — (Array<Integer>)

            If the comparisonOperator calls for a set of ports, use this to specify that set to be compared with the metric.

        • durationSeconds — (Integer)

          Use this to specify the time duration over which the behavior is evaluated, for those criteria which have a time dimension (for example, NUM_MESSAGES_SENT). For a statisticalThreshhold metric comparison, measurements from all devices are accumulated over this time duration before being used to calculate percentiles, and later, measurements from an individual device are also accumulated over this time duration before being given a percentile rank.

        • consecutiveDatapointsToAlarm — (Integer)

          If a device is in violation of the behavior for the specified number of consecutive datapoints, an alarm occurs. If not specified, the default is 1.

        • consecutiveDatapointsToClear — (Integer)

          If an alarm has occurred and the offending device is no longer in violation of the behavior for the specified number of consecutive datapoints, the alarm is cleared. If not specified, the default is 1.

        • statisticalThreshold — (map)

          A statistical ranking (percentile) which indicates a threshold value by which a behavior is determined to be in compliance or in violation of the behavior.

          • statistic — (String)

            The percentile which resolves to a threshold value by which compliance with a behavior is determined. Metrics are collected over the specified period (durationSeconds) from all reporting devices in your account and statistical ranks are calculated. Then, the measurements from a device are collected over the same period. If the accumulated measurements from the device fall above or below (comparisonOperator) the value associated with the percentile specified, then the device is considered to be in compliance with the behavior, otherwise a violation occurs.

    • alertTargets — (map<map>)

      Specifies the destinations to which alerts are sent. (Alerts are always sent to the console.) Alerts are generated when a device (thing) violates a behavior.

      • alertTargetArnrequired — (String)

        The ARN of the notification target to which alerts are sent.

      • roleArnrequired — (String)

        The ARN of the role that grants permission to send alerts to the notification target.

    • additionalMetricsToRetain — (Array<String>)

      A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's behaviors but it is also retained for any metric specified here.

    • tags — (Array<map>)

      Metadata which can be used to manage the security profile.

      • Key — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • securityProfileName — (String)

        The name you gave to the security profile.

      • securityProfileArn — (String)

        The ARN of the security profile.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createStream(params = {}, callback) ⇒ AWS.Request

Creates a stream for delivering one or more large files in chunks over MQTT. A stream transports data bytes in chunks or blocks packaged as MQTT messages from a source like S3. You can have one or more files associated with a stream. The total size of a file associated with the stream cannot exceed more than 2 MB. The stream will be created with version 0. If a stream is created with the same streamID as a stream that existed and was deleted within last 90 days, we will resurrect that old stream by incrementing the version by 1.

Service Reference:

Examples:

Calling the createStream operation

var params = {
  files: [ /* required */
    {
      fileId: 'NUMBER_VALUE',
      s3Location: {
        bucket: 'STRING_VALUE',
        key: 'STRING_VALUE',
        version: 'STRING_VALUE'
      }
    },
    /* more items */
  ],
  roleArn: 'STRING_VALUE', /* required */
  streamId: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE',
  tags: [
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
iot.createStream(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • streamId — (String)

      The stream ID.

    • description — (String)

      A description of the stream.

    • files — (Array<map>)

      The files to stream.

      • fileId — (Integer)

        The file ID.

      • s3Location — (map)

        The location of the file in S3.

        • bucket — (String)

          The S3 bucket.

        • key — (String)

          The S3 key.

        • version — (String)

          The S3 bucket version.

    • roleArn — (String)

      An IAM role that allows the IoT service principal assumes to access your S3 files.

    • tags — (Array<map>)

      Metadata which can be used to manage streams.

      • Key — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • streamId — (String)

        The stream ID.

      • streamArn — (String)

        The stream ARN.

      • description — (String)

        A description of the stream.

      • streamVersion — (Integer)

        The version of the stream.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createThing(params = {}, callback) ⇒ AWS.Request

Creates a thing record in the registry. If this call is made multiple times using the same thing name and configuration, the call will succeed. If this call is made with the same thing name but different configuration a ResourceAlreadyExistsException is thrown.

Note: This is a control plane operation. See Authorization for information about authorizing control plane actions.

Service Reference:

Examples:

Calling the createThing operation

var params = {
  thingName: 'STRING_VALUE', /* required */
  attributePayload: {
    attributes: {
      '<AttributeName>': 'STRING_VALUE',
      /* '<AttributeName>': ... */
    },
    merge: true || false
  },
  billingGroupName: 'STRING_VALUE',
  thingTypeName: 'STRING_VALUE'
};
iot.createThing(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingName — (String)

      The name of the thing to create.

    • thingTypeName — (String)

      The name of the thing type associated with the new thing.

    • attributePayload — (map)

      The attribute payload, which consists of up to three name/value pairs in a JSON document. For example:

      {\"attributes\":{\"string1\":\"string2\"}}

      • attributes — (map<String>)

        A JSON string containing up to three key-value pair in JSON format. For example:

        {\"attributes\":{\"string1\":\"string2\"}}

      • merge — (Boolean)

        Specifies whether the list of attributes provided in the AttributePayload is merged with the attributes stored in the registry, instead of overwriting them.

        To remove an attribute, call UpdateThing with an empty attribute value.

        Note: The merge attribute is only valid when calling UpdateThing.
    • billingGroupName — (String)

      The name of the billing group the thing will be added to.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • thingName — (String)

        The name of the new thing.

      • thingArn — (String)

        The ARN of the new thing.

      • thingId — (String)

        The thing ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createThingGroup(params = {}, callback) ⇒ AWS.Request

Create a thing group.

Note: This is a control plane operation. See Authorization for information about authorizing control plane actions.

Service Reference:

Examples:

Calling the createThingGroup operation

var params = {
  thingGroupName: 'STRING_VALUE', /* required */
  parentGroupName: 'STRING_VALUE',
  tags: [
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ],
  thingGroupProperties: {
    attributePayload: {
      attributes: {
        '<AttributeName>': 'STRING_VALUE',
        /* '<AttributeName>': ... */
      },
      merge: true || false
    },
    thingGroupDescription: 'STRING_VALUE'
  }
};
iot.createThingGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingGroupName — (String)

      The thing group name to create.

    • parentGroupName — (String)

      The name of the parent thing group.

    • thingGroupProperties — (map)

      The thing group properties.

      • thingGroupDescription — (String)

        The thing group description.

      • attributePayload — (map)

        The thing group attributes in JSON format.

        • attributes — (map<String>)

          A JSON string containing up to three key-value pair in JSON format. For example:

          {\"attributes\":{\"string1\":\"string2\"}}

        • merge — (Boolean)

          Specifies whether the list of attributes provided in the AttributePayload is merged with the attributes stored in the registry, instead of overwriting them.

          To remove an attribute, call UpdateThing with an empty attribute value.

          Note: The merge attribute is only valid when calling UpdateThing.
    • tags — (Array<map>)

      Metadata which can be used to manage the thing group.

      • Key — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • thingGroupName — (String)

        The thing group name.

      • thingGroupArn — (String)

        The thing group ARN.

      • thingGroupId — (String)

        The thing group ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createThingType(params = {}, callback) ⇒ AWS.Request

Creates a new thing type.

Service Reference:

Examples:

Calling the createThingType operation

var params = {
  thingTypeName: 'STRING_VALUE', /* required */
  tags: [
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ],
  thingTypeProperties: {
    searchableAttributes: [
      'STRING_VALUE',
      /* more items */
    ],
    thingTypeDescription: 'STRING_VALUE'
  }
};
iot.createThingType(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingTypeName — (String)

      The name of the thing type.

    • thingTypeProperties — (map)

      The ThingTypeProperties for the thing type to create. It contains information about the new thing type including a description, and a list of searchable thing attribute names.

      • thingTypeDescription — (String)

        The description of the thing type.

      • searchableAttributes — (Array<String>)

        A list of searchable thing attribute names.

    • tags — (Array<map>)

      Metadata which can be used to manage the thing type.

      • Key — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • thingTypeName — (String)

        The name of the thing type.

      • thingTypeArn — (String)

        The Amazon Resource Name (ARN) of the thing type.

      • thingTypeId — (String)

        The thing type ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createTopicRule(params = {}, callback) ⇒ AWS.Request

Creates a rule. Creating rules is an administrator-level action. Any user who has permission to create rules will be able to access data processed by the rule.

Service Reference:

Examples:

Calling the createTopicRule operation

var params = {
  ruleName: 'STRING_VALUE', /* required */
  topicRulePayload: { /* required */
    actions: [ /* required */
      {
        cloudwatchAlarm: {
          alarmName: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          stateReason: 'STRING_VALUE', /* required */
          stateValue: 'STRING_VALUE' /* required */
        },
        cloudwatchMetric: {
          metricName: 'STRING_VALUE', /* required */
          metricNamespace: 'STRING_VALUE', /* required */
          metricUnit: 'STRING_VALUE', /* required */
          metricValue: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          metricTimestamp: 'STRING_VALUE'
        },
        dynamoDB: {
          hashKeyField: 'STRING_VALUE', /* required */
          hashKeyValue: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          tableName: 'STRING_VALUE', /* required */
          hashKeyType: STRING | NUMBER,
          operation: 'STRING_VALUE',
          payloadField: 'STRING_VALUE',
          rangeKeyField: 'STRING_VALUE',
          rangeKeyType: STRING | NUMBER,
          rangeKeyValue: 'STRING_VALUE'
        },
        dynamoDBv2: {
          putItem: { /* required */
            tableName: 'STRING_VALUE' /* required */
          },
          roleArn: 'STRING_VALUE' /* required */
        },
        elasticsearch: {
          endpoint: 'STRING_VALUE', /* required */
          id: 'STRING_VALUE', /* required */
          index: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          type: 'STRING_VALUE' /* required */
        },
        firehose: {
          deliveryStreamName: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          separator: 'STRING_VALUE'
        },
        iotAnalytics: {
          channelArn: 'STRING_VALUE',
          channelName: 'STRING_VALUE',
          roleArn: 'STRING_VALUE'
        },
        iotEvents: {
          inputName: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          messageId: 'STRING_VALUE'
        },
        kinesis: {
          roleArn: 'STRING_VALUE', /* required */
          streamName: 'STRING_VALUE', /* required */
          partitionKey: 'STRING_VALUE'
        },
        lambda: {
          functionArn: 'STRING_VALUE' /* required */
        },
        republish: {
          roleArn: 'STRING_VALUE', /* required */
          topic: 'STRING_VALUE' /* required */
        },
        s3: {
          bucketName: 'STRING_VALUE', /* required */
          key: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          cannedAcl: private | public-read | public-read-write | aws-exec-read | authenticated-read | bucket-owner-read | bucket-owner-full-control | log-delivery-write
        },
        salesforce: {
          token: 'STRING_VALUE', /* required */
          url: 'STRING_VALUE' /* required */
        },
        sns: {
          roleArn: 'STRING_VALUE', /* required */
          targetArn: 'STRING_VALUE', /* required */
          messageFormat: RAW | JSON
        },
        sqs: {
          queueUrl: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          useBase64: true || false
        },
        stepFunctions: {
          roleArn: 'STRING_VALUE', /* required */
          stateMachineName: 'STRING_VALUE', /* required */
          executionNamePrefix: 'STRING_VALUE'
        }
      },
      /* more items */
    ],
    sql: 'STRING_VALUE', /* required */
    awsIotSqlVersion: 'STRING_VALUE',
    description: 'STRING_VALUE',
    errorAction: {
      cloudwatchAlarm: {
        alarmName: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        stateReason: 'STRING_VALUE', /* required */
        stateValue: 'STRING_VALUE' /* required */
      },
      cloudwatchMetric: {
        metricName: 'STRING_VALUE', /* required */
        metricNamespace: 'STRING_VALUE', /* required */
        metricUnit: 'STRING_VALUE', /* required */
        metricValue: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        metricTimestamp: 'STRING_VALUE'
      },
      dynamoDB: {
        hashKeyField: 'STRING_VALUE', /* required */
        hashKeyValue: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        tableName: 'STRING_VALUE', /* required */
        hashKeyType: STRING | NUMBER,
        operation: 'STRING_VALUE',
        payloadField: 'STRING_VALUE',
        rangeKeyField: 'STRING_VALUE',
        rangeKeyType: STRING | NUMBER,
        rangeKeyValue: 'STRING_VALUE'
      },
      dynamoDBv2: {
        putItem: { /* required */
          tableName: 'STRING_VALUE' /* required */
        },
        roleArn: 'STRING_VALUE' /* required */
      },
      elasticsearch: {
        endpoint: 'STRING_VALUE', /* required */
        id: 'STRING_VALUE', /* required */
        index: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        type: 'STRING_VALUE' /* required */
      },
      firehose: {
        deliveryStreamName: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        separator: 'STRING_VALUE'
      },
      iotAnalytics: {
        channelArn: 'STRING_VALUE',
        channelName: 'STRING_VALUE',
        roleArn: 'STRING_VALUE'
      },
      iotEvents: {
        inputName: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        messageId: 'STRING_VALUE'
      },
      kinesis: {
        roleArn: 'STRING_VALUE', /* required */
        streamName: 'STRING_VALUE', /* required */
        partitionKey: 'STRING_VALUE'
      },
      lambda: {
        functionArn: 'STRING_VALUE' /* required */
      },
      republish: {
        roleArn: 'STRING_VALUE', /* required */
        topic: 'STRING_VALUE' /* required */
      },
      s3: {
        bucketName: 'STRING_VALUE', /* required */
        key: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        cannedAcl: private | public-read | public-read-write | aws-exec-read | authenticated-read | bucket-owner-read | bucket-owner-full-control | log-delivery-write
      },
      salesforce: {
        token: 'STRING_VALUE', /* required */
        url: 'STRING_VALUE' /* required */
      },
      sns: {
        roleArn: 'STRING_VALUE', /* required */
        targetArn: 'STRING_VALUE', /* required */
        messageFormat: RAW | JSON
      },
      sqs: {
        queueUrl: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        useBase64: true || false
      },
      stepFunctions: {
        roleArn: 'STRING_VALUE', /* required */
        stateMachineName: 'STRING_VALUE', /* required */
        executionNamePrefix: 'STRING_VALUE'
      }
    },
    ruleDisabled: true || false
  },
  tags: 'STRING_VALUE'
};
iot.createTopicRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ruleName — (String)

      The name of the rule.

    • topicRulePayload — (map)

      The rule payload.

      • sqlrequired — (String)

        The SQL statement used to query the topic. For more information, see AWS IoT SQL Reference in the AWS IoT Developer Guide.

      • description — (String)

        The description of the rule.

      • actionsrequired — (Array<map>)

        The actions associated with the rule.

        • dynamoDB — (map)

          Write to a DynamoDB table.

          • tableNamerequired — (String)

            The name of the DynamoDB table.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access to the DynamoDB table.

          • operation — (String)

            The type of operation to be performed. This follows the substitution template, so it can be ${operation}, but the substitution must result in one of the following: INSERT, UPDATE, or DELETE.

          • hashKeyFieldrequired — (String)

            The hash key name.

          • hashKeyValuerequired — (String)

            The hash key value.

          • hashKeyType — (String)

            The hash key type. Valid values are "STRING" or "NUMBER"

            Possible values include:
            • "STRING"
            • "NUMBER"
          • rangeKeyField — (String)

            The range key name.

          • rangeKeyValue — (String)

            The range key value.

          • rangeKeyType — (String)

            The range key type. Valid values are "STRING" or "NUMBER"

            Possible values include:
            • "STRING"
            • "NUMBER"
          • payloadField — (String)

            The action payload. This name can be customized.

        • dynamoDBv2 — (map)

          Write to a DynamoDB table. This is a new version of the DynamoDB action. It allows you to write each attribute in an MQTT message payload into a separate DynamoDB column.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access to the DynamoDB table.

          • putItemrequired — (map)

            Specifies the DynamoDB table to which the message data will be written. For example:

            { "dynamoDBv2": { "roleArn": "aws:iam:12341251:my-role" "putItem": { "tableName": "my-table" } } }

            Each attribute in the message payload will be written to a separate column in the DynamoDB database.

            • tableNamerequired — (String)

              The table where the message data will be written

        • lambda — (map)

          Invoke a Lambda function.

          • functionArnrequired — (String)

            The ARN of the Lambda function.

        • sns — (map)

          Publish to an Amazon SNS topic.

          • targetArnrequired — (String)

            The ARN of the SNS topic.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • messageFormat — (String)

            (Optional) The message format of the message to publish. Accepted values are "JSON" and "RAW". The default value of the attribute is "RAW". SNS uses this setting to determine if the payload should be parsed and relevant platform-specific bits of the payload should be extracted. To read more about SNS message formats, see https://docs.aws.amazon.com/sns/latest/dg/json-formats.html refer to their official documentation.

            Possible values include:
            • "RAW"
            • "JSON"
        • sqs — (map)

          Publish to an Amazon SQS queue.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • queueUrlrequired — (String)

            The URL of the Amazon SQS queue.

          • useBase64 — (Boolean)

            Specifies whether to use Base64 encoding.

        • kinesis — (map)

          Write data to an Amazon Kinesis stream.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access to the Amazon Kinesis stream.

          • streamNamerequired — (String)

            The name of the Amazon Kinesis stream.

          • partitionKey — (String)

            The partition key.

        • republish — (map)

          Publish to another MQTT topic.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • topicrequired — (String)

            The name of the MQTT topic.

        • s3 — (map)

          Write to an Amazon S3 bucket.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • bucketNamerequired — (String)

            The Amazon S3 bucket.

          • keyrequired — (String)

            The object key.

          • cannedAcl — (String)

            The Amazon S3 canned ACL that controls access to the object identified by the object key. For more information, see S3 canned ACLs.

            Possible values include:
            • "private"
            • "public-read"
            • "public-read-write"
            • "aws-exec-read"
            • "authenticated-read"
            • "bucket-owner-read"
            • "bucket-owner-full-control"
            • "log-delivery-write"
        • firehose — (map)

          Write to an Amazon Kinesis Firehose stream.

          • roleArnrequired — (String)

            The IAM role that grants access to the Amazon Kinesis Firehose stream.

          • deliveryStreamNamerequired — (String)

            The delivery stream name.

          • separator — (String)

            A character separator that will be used to separate records written to the Firehose stream. Valid values are: '\n' (newline), '\t' (tab), '\r\n' (Windows newline), ',' (comma).

        • cloudwatchMetric — (map)

          Capture a CloudWatch metric.

          • roleArnrequired — (String)

            The IAM role that allows access to the CloudWatch metric.

          • metricNamespacerequired — (String)

            The CloudWatch metric namespace name.

          • metricNamerequired — (String)

            The CloudWatch metric name.

          • metricValuerequired — (String)

            The CloudWatch metric value.

          • metricUnitrequired — (String)

            The metric unit supported by CloudWatch.

          • metricTimestamp — (String)

            An optional Unix timestamp.

        • cloudwatchAlarm — (map)

          Change the state of a CloudWatch alarm.

          • roleArnrequired — (String)

            The IAM role that allows access to the CloudWatch alarm.

          • alarmNamerequired — (String)

            The CloudWatch alarm name.

          • stateReasonrequired — (String)

            The reason for the alarm change.

          • stateValuerequired — (String)

            The value of the alarm state. Acceptable values are: OK, ALARM, INSUFFICIENT_DATA.

        • elasticsearch — (map)

          Write data to an Amazon Elasticsearch Service domain.

          • roleArnrequired — (String)

            The IAM role ARN that has access to Elasticsearch.

          • endpointrequired — (String)

            The endpoint of your Elasticsearch domain.

          • indexrequired — (String)

            The Elasticsearch index where you want to store your data.

          • typerequired — (String)

            The type of document you are storing.

          • idrequired — (String)

            The unique identifier for the document you are storing.

        • salesforce — (map)

          Send a message to a Salesforce IoT Cloud Input Stream.

          • tokenrequired — (String)

            The token used to authenticate access to the Salesforce IoT Cloud Input Stream. The token is available from the Salesforce IoT Cloud platform after creation of the Input Stream.

          • urlrequired — (String)

            The URL exposed by the Salesforce IoT Cloud Input Stream. The URL is available from the Salesforce IoT Cloud platform after creation of the Input Stream.

        • iotAnalytics — (map)

          Sends message data to an AWS IoT Analytics channel.

          • channelArn — (String)

            (deprecated) The ARN of the IoT Analytics channel to which message data will be sent.

          • channelName — (String)

            The name of the IoT Analytics channel to which message data will be sent.

          • roleArn — (String)

            The ARN of the role which has a policy that grants IoT Analytics permission to send message data via IoT Analytics (iotanalytics:BatchPutMessage).

        • iotEvents — (map)

          Sends an input to an AWS IoT Events detector.

          • inputNamerequired — (String)

            The name of the AWS IoT Events input.

          • messageId — (String)

            [Optional] Use this to ensure that only one input (message) with a given messageId will be processed by an AWS IoT Events detector.

          • roleArnrequired — (String)

            The ARN of the role that grants AWS IoT permission to send an input to an AWS IoT Events detector. ("Action":"iotevents:BatchPutMessage").

        • stepFunctions — (map)

          Starts execution of a Step Functions state machine.

          • executionNamePrefix — (String)

            (Optional) A name will be given to the state machine execution consisting of this prefix followed by a UUID. Step Functions automatically creates a unique name for each state machine execution if one is not provided.

          • stateMachineNamerequired — (String)

            The name of the Step Functions state machine whose execution will be started.

          • roleArnrequired — (String)

            The ARN of the role that grants IoT permission to start execution of a state machine ("Action":"states:StartExecution").

      • ruleDisabled — (Boolean)

        Specifies whether the rule is disabled.

      • awsIotSqlVersion — (String)

        The version of the SQL rules engine to use when evaluating the rule.

      • errorAction — (map)

        The action to take when an error occurs.

        • dynamoDB — (map)

          Write to a DynamoDB table.

          • tableNamerequired — (String)

            The name of the DynamoDB table.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access to the DynamoDB table.

          • operation — (String)

            The type of operation to be performed. This follows the substitution template, so it can be ${operation}, but the substitution must result in one of the following: INSERT, UPDATE, or DELETE.

          • hashKeyFieldrequired — (String)

            The hash key name.

          • hashKeyValuerequired — (String)

            The hash key value.

          • hashKeyType — (String)

            The hash key type. Valid values are "STRING" or "NUMBER"

            Possible values include:
            • "STRING"
            • "NUMBER"
          • rangeKeyField — (String)

            The range key name.

          • rangeKeyValue — (String)

            The range key value.

          • rangeKeyType — (String)

            The range key type. Valid values are "STRING" or "NUMBER"

            Possible values include:
            • "STRING"
            • "NUMBER"
          • payloadField — (String)

            The action payload. This name can be customized.

        • dynamoDBv2 — (map)

          Write to a DynamoDB table. This is a new version of the DynamoDB action. It allows you to write each attribute in an MQTT message payload into a separate DynamoDB column.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access to the DynamoDB table.

          • putItemrequired — (map)

            Specifies the DynamoDB table to which the message data will be written. For example:

            { "dynamoDBv2": { "roleArn": "aws:iam:12341251:my-role" "putItem": { "tableName": "my-table" } } }

            Each attribute in the message payload will be written to a separate column in the DynamoDB database.

            • tableNamerequired — (String)

              The table where the message data will be written

        • lambda — (map)

          Invoke a Lambda function.

          • functionArnrequired — (String)

            The ARN of the Lambda function.

        • sns — (map)

          Publish to an Amazon SNS topic.

          • targetArnrequired — (String)

            The ARN of the SNS topic.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • messageFormat — (String)

            (Optional) The message format of the message to publish. Accepted values are "JSON" and "RAW". The default value of the attribute is "RAW". SNS uses this setting to determine if the payload should be parsed and relevant platform-specific bits of the payload should be extracted. To read more about SNS message formats, see https://docs.aws.amazon.com/sns/latest/dg/json-formats.html refer to their official documentation.

            Possible values include:
            • "RAW"
            • "JSON"
        • sqs — (map)

          Publish to an Amazon SQS queue.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • queueUrlrequired — (String)

            The URL of the Amazon SQS queue.

          • useBase64 — (Boolean)

            Specifies whether to use Base64 encoding.

        • kinesis — (map)

          Write data to an Amazon Kinesis stream.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access to the Amazon Kinesis stream.

          • streamNamerequired — (String)

            The name of the Amazon Kinesis stream.

          • partitionKey — (String)

            The partition key.

        • republish — (map)

          Publish to another MQTT topic.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • topicrequired — (String)

            The name of the MQTT topic.

        • s3 — (map)

          Write to an Amazon S3 bucket.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • bucketNamerequired — (String)

            The Amazon S3 bucket.

          • keyrequired — (String)

            The object key.

          • cannedAcl — (String)

            The Amazon S3 canned ACL that controls access to the object identified by the object key. For more information, see S3 canned ACLs.

            Possible values include:
            • "private"
            • "public-read"
            • "public-read-write"
            • "aws-exec-read"
            • "authenticated-read"
            • "bucket-owner-read"
            • "bucket-owner-full-control"
            • "log-delivery-write"
        • firehose — (map)

          Write to an Amazon Kinesis Firehose stream.

          • roleArnrequired — (String)

            The IAM role that grants access to the Amazon Kinesis Firehose stream.

          • deliveryStreamNamerequired — (String)

            The delivery stream name.

          • separator — (String)

            A character separator that will be used to separate records written to the Firehose stream. Valid values are: '\n' (newline), '\t' (tab), '\r\n' (Windows newline), ',' (comma).

        • cloudwatchMetric — (map)

          Capture a CloudWatch metric.

          • roleArnrequired — (String)

            The IAM role that allows access to the CloudWatch metric.

          • metricNamespacerequired — (String)

            The CloudWatch metric namespace name.

          • metricNamerequired — (String)

            The CloudWatch metric name.

          • metricValuerequired — (String)

            The CloudWatch metric value.

          • metricUnitrequired — (String)

            The metric unit supported by CloudWatch.

          • metricTimestamp — (String)

            An optional Unix timestamp.

        • cloudwatchAlarm — (map)

          Change the state of a CloudWatch alarm.

          • roleArnrequired — (String)

            The IAM role that allows access to the CloudWatch alarm.

          • alarmNamerequired — (String)

            The CloudWatch alarm name.

          • stateReasonrequired — (String)

            The reason for the alarm change.

          • stateValuerequired — (String)

            The value of the alarm state. Acceptable values are: OK, ALARM, INSUFFICIENT_DATA.

        • elasticsearch — (map)

          Write data to an Amazon Elasticsearch Service domain.

          • roleArnrequired — (String)

            The IAM role ARN that has access to Elasticsearch.

          • endpointrequired — (String)

            The endpoint of your Elasticsearch domain.

          • indexrequired — (String)

            The Elasticsearch index where you want to store your data.

          • typerequired — (String)

            The type of document you are storing.

          • idrequired — (String)

            The unique identifier for the document you are storing.

        • salesforce — (map)

          Send a message to a Salesforce IoT Cloud Input Stream.

          • tokenrequired — (String)

            The token used to authenticate access to the Salesforce IoT Cloud Input Stream. The token is available from the Salesforce IoT Cloud platform after creation of the Input Stream.

          • urlrequired — (String)

            The URL exposed by the Salesforce IoT Cloud Input Stream. The URL is available from the Salesforce IoT Cloud platform after creation of the Input Stream.

        • iotAnalytics — (map)

          Sends message data to an AWS IoT Analytics channel.

          • channelArn — (String)

            (deprecated) The ARN of the IoT Analytics channel to which message data will be sent.

          • channelName — (String)

            The name of the IoT Analytics channel to which message data will be sent.

          • roleArn — (String)

            The ARN of the role which has a policy that grants IoT Analytics permission to send message data via IoT Analytics (iotanalytics:BatchPutMessage).

        • iotEvents — (map)

          Sends an input to an AWS IoT Events detector.

          • inputNamerequired — (String)

            The name of the AWS IoT Events input.

          • messageId — (String)

            [Optional] Use this to ensure that only one input (message) with a given messageId will be processed by an AWS IoT Events detector.

          • roleArnrequired — (String)

            The ARN of the role that grants AWS IoT permission to send an input to an AWS IoT Events detector. ("Action":"iotevents:BatchPutMessage").

        • stepFunctions — (map)

          Starts execution of a Step Functions state machine.

          • executionNamePrefix — (String)

            (Optional) A name will be given to the state machine execution consisting of this prefix followed by a UUID. Step Functions automatically creates a unique name for each state machine execution if one is not provided.

          • stateMachineNamerequired — (String)

            The name of the Step Functions state machine whose execution will be started.

          • roleArnrequired — (String)

            The ARN of the role that grants IoT permission to start execution of a state machine ("Action":"states:StartExecution").

    • tags — (String)

      Metadata which can be used to manage the topic rule.

      Note: For URI Request parameters use format: ...key1=value1&key2=value2... For the CLI command-line parameter use format: --tags "key1=value1&key2=value2..." For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteAccountAuditConfiguration(params = {}, callback) ⇒ AWS.Request

Restores the default settings for Device Defender audits for this account. Any configuration data you entered is deleted and all audit checks are reset to disabled.

Service Reference:

Examples:

Calling the deleteAccountAuditConfiguration operation

var params = {
  deleteScheduledAudits: true || false
};
iot.deleteAccountAuditConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • deleteScheduledAudits — (Boolean)

      If true, all scheduled audits are deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteAuthorizer(params = {}, callback) ⇒ AWS.Request

Deletes an authorizer.

Service Reference:

Examples:

Calling the deleteAuthorizer operation

var params = {
  authorizerName: 'STRING_VALUE' /* required */
};
iot.deleteAuthorizer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • authorizerName — (String)

      The name of the authorizer to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteBillingGroup(params = {}, callback) ⇒ AWS.Request

Deletes the billing group.

Service Reference:

Examples:

Calling the deleteBillingGroup operation

var params = {
  billingGroupName: 'STRING_VALUE', /* required */
  expectedVersion: 'NUMBER_VALUE'
};
iot.deleteBillingGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • billingGroupName — (String)

      The name of the billing group.

    • expectedVersion — (Integer)

      The expected version of the billing group. If the version of the billing group does not match the expected version specified in the request, the DeleteBillingGroup request is rejected with a VersionConflictException.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteCACertificate(params = {}, callback) ⇒ AWS.Request

Deletes a registered CA certificate.

Service Reference:

Examples:

Calling the deleteCACertificate operation

var params = {
  certificateId: 'STRING_VALUE' /* required */
};
iot.deleteCACertificate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • certificateId — (String)

      The ID of the certificate to delete. (The last part of the certificate ARN contains the certificate ID.)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteCertificate(params = {}, callback) ⇒ AWS.Request

Deletes the specified certificate.

A certificate cannot be deleted if it has a policy attached to it or if its status is set to ACTIVE. To delete a certificate, first use the DetachPrincipalPolicy API to detach all policies. Next, use the UpdateCertificate API to set the certificate to the INACTIVE status.

Service Reference:

Examples:

Calling the deleteCertificate operation

var params = {
  certificateId: 'STRING_VALUE', /* required */
  forceDelete: true || false
};
iot.deleteCertificate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • certificateId — (String)

      The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

    • forceDelete — (Boolean)

      Forces a certificate request to be deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteDynamicThingGroup(params = {}, callback) ⇒ AWS.Request

Deletes a dynamic thing group.

Service Reference:

Examples:

Calling the deleteDynamicThingGroup operation

var params = {
  thingGroupName: 'STRING_VALUE', /* required */
  expectedVersion: 'NUMBER_VALUE'
};
iot.deleteDynamicThingGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingGroupName — (String)

      The name of the dynamic thing group to delete.

    • expectedVersion — (Integer)

      The expected version of the dynamic thing group to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteJob(params = {}, callback) ⇒ AWS.Request

Deletes a job and its related job executions.

Deleting a job may take time, depending on the number of job executions created for the job and various other factors. While the job is being deleted, the status of the job will be shown as "DELETION_IN_PROGRESS". Attempting to delete or cancel a job whose status is already "DELETION_IN_PROGRESS" will result in an error.

Only 10 jobs may have status "DELETION_IN_PROGRESS" at the same time, or a LimitExceededException will occur.

Service Reference:

Examples:

Calling the deleteJob operation

var params = {
  jobId: 'STRING_VALUE', /* required */
  force: true || false
};
iot.deleteJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • jobId — (String)

      The ID of the job to be deleted.

      After a job deletion is completed, you may reuse this jobId when you create a new job. However, this is not recommended, and you must ensure that your devices are not using the jobId to refer to the deleted job.

    • force — (Boolean)

      (Optional) When true, you can delete a job which is "IN_PROGRESS". Otherwise, you can only delete a job which is in a terminal state ("COMPLETED" or "CANCELED") or an exception will occur. The default is false.

      Note: Deleting a job which is "IN_PROGRESS", will cause a device which is executing the job to be unable to access job information or update the job execution status. Use caution and ensure that each device executing a job which is deleted is able to recover to a valid state.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteJobExecution(params = {}, callback) ⇒ AWS.Request

Deletes a job execution.

Service Reference:

Examples:

Calling the deleteJobExecution operation

var params = {
  executionNumber: 'NUMBER_VALUE', /* required */
  jobId: 'STRING_VALUE', /* required */
  thingName: 'STRING_VALUE', /* required */
  force: true || false
};
iot.deleteJobExecution(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • jobId — (String)

      The ID of the job whose execution on a particular device will be deleted.

    • thingName — (String)

      The name of the thing whose job execution will be deleted.

    • executionNumber — (Integer)

      The ID of the job execution to be deleted. The executionNumber refers to the execution of a particular job on a particular device.

      Note that once a job execution is deleted, the executionNumber may be reused by IoT, so be sure you get and use the correct value here.

    • force — (Boolean)

      (Optional) When true, you can delete a job execution which is "IN_PROGRESS". Otherwise, you can only delete a job execution which is in a terminal state ("SUCCEEDED", "FAILED", "REJECTED", "REMOVED" or "CANCELED") or an exception will occur. The default is false.

      Note: Deleting a job execution which is "IN_PROGRESS", will cause the device to be unable to access job information or update the job execution status. Use caution and ensure that the device is able to recover to a valid state.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteOTAUpdate(params = {}, callback) ⇒ AWS.Request

Delete an OTA update.

Service Reference:

Examples:

Calling the deleteOTAUpdate operation

var params = {
  otaUpdateId: 'STRING_VALUE', /* required */
  deleteStream: true || false,
  forceDeleteAWSJob: true || false
};
iot.deleteOTAUpdate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • otaUpdateId — (String)

      The OTA update ID to delete.

    • deleteStream — (Boolean)

      Specifies if the stream associated with an OTA update should be deleted when the OTA update is deleted.

    • forceDeleteAWSJob — (Boolean)

      Specifies if the AWS Job associated with the OTA update should be deleted with the OTA update is deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deletePolicy(params = {}, callback) ⇒ AWS.Request

Deletes the specified policy.

A policy cannot be deleted if it has non-default versions or it is attached to any certificate.

To delete a policy, use the DeletePolicyVersion API to delete all non-default versions of the policy; use the DetachPrincipalPolicy API to detach the policy from any certificate; and then use the DeletePolicy API to delete the policy.

When a policy is deleted using DeletePolicy, its default version is deleted with it.

Service Reference:

Examples:

Calling the deletePolicy operation

var params = {
  policyName: 'STRING_VALUE' /* required */
};
iot.deletePolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • policyName — (String)

      The name of the policy to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deletePolicyVersion(params = {}, callback) ⇒ AWS.Request

Deletes the specified version of the specified policy. You cannot delete the default version of a policy using this API. To delete the default version of a policy, use DeletePolicy. To find out which version of a policy is marked as the default version, use ListPolicyVersions.

Service Reference:

Examples:

Calling the deletePolicyVersion operation

var params = {
  policyName: 'STRING_VALUE', /* required */
  policyVersionId: 'STRING_VALUE' /* required */
};
iot.deletePolicyVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • policyName — (String)

      The name of the policy.

    • policyVersionId — (String)

      The policy version ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteRegistrationCode(params = {}, callback) ⇒ AWS.Request

Deletes a CA certificate registration code.

Service Reference:

Examples:

Calling the deleteRegistrationCode operation

var params = {
};
iot.deleteRegistrationCode(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteRoleAlias(params = {}, callback) ⇒ AWS.Request

Deletes a role alias

Service Reference:

Examples:

Calling the deleteRoleAlias operation

var params = {
  roleAlias: 'STRING_VALUE' /* required */
};
iot.deleteRoleAlias(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • roleAlias — (String)

      The role alias to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteScheduledAudit(params = {}, callback) ⇒ AWS.Request

Deletes a scheduled audit.

Service Reference:

Examples:

Calling the deleteScheduledAudit operation

var params = {
  scheduledAuditName: 'STRING_VALUE' /* required */
};
iot.deleteScheduledAudit(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • scheduledAuditName — (String)

      The name of the scheduled audit you want to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteSecurityProfile(params = {}, callback) ⇒ AWS.Request

Deletes a Device Defender security profile.

Service Reference:

Examples:

Calling the deleteSecurityProfile operation

var params = {
  securityProfileName: 'STRING_VALUE', /* required */
  expectedVersion: 'NUMBER_VALUE'
};
iot.deleteSecurityProfile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • securityProfileName — (String)

      The name of the security profile to be deleted.

    • expectedVersion — (Integer)

      The expected version of the security profile. A new version is generated whenever the security profile is updated. If you specify a value that is different than the actual version, a VersionConflictException is thrown.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteStream(params = {}, callback) ⇒ AWS.Request

Deletes a stream.

Service Reference:

Examples:

Calling the deleteStream operation

var params = {
  streamId: 'STRING_VALUE' /* required */
};
iot.deleteStream(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • streamId — (String)

      The stream ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteThing(params = {}, callback) ⇒ AWS.Request

Deletes the specified thing. Returns successfully with no error if the deletion is successful or you specify a thing that doesn't exist.

Service Reference:

Examples:

Calling the deleteThing operation

var params = {
  thingName: 'STRING_VALUE', /* required */
  expectedVersion: 'NUMBER_VALUE'
};
iot.deleteThing(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingName — (String)

      The name of the thing to delete.

    • expectedVersion — (Integer)

      The expected version of the thing record in the registry. If the version of the record in the registry does not match the expected version specified in the request, the DeleteThing request is rejected with a VersionConflictException.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteThingGroup(params = {}, callback) ⇒ AWS.Request

Deletes a thing group.

Service Reference:

Examples:

Calling the deleteThingGroup operation

var params = {
  thingGroupName: 'STRING_VALUE', /* required */
  expectedVersion: 'NUMBER_VALUE'
};
iot.deleteThingGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingGroupName — (String)

      The name of the thing group to delete.

    • expectedVersion — (Integer)

      The expected version of the thing group to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteThingType(params = {}, callback) ⇒ AWS.Request

Deletes the specified thing type. You cannot delete a thing type if it has things associated with it. To delete a thing type, first mark it as deprecated by calling DeprecateThingType, then remove any associated things by calling UpdateThing to change the thing type on any associated thing, and finally use DeleteThingType to delete the thing type.

Service Reference:

Examples:

Calling the deleteThingType operation

var params = {
  thingTypeName: 'STRING_VALUE' /* required */
};
iot.deleteThingType(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingTypeName — (String)

      The name of the thing type.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteTopicRule(params = {}, callback) ⇒ AWS.Request

Deletes the rule.

Service Reference:

Examples:

Calling the deleteTopicRule operation

var params = {
  ruleName: 'STRING_VALUE' /* required */
};
iot.deleteTopicRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ruleName — (String)

      The name of the rule.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteV2LoggingLevel(params = {}, callback) ⇒ AWS.Request

Deletes a logging level.

Service Reference:

Examples:

Calling the deleteV2LoggingLevel operation

var params = {
  targetName: 'STRING_VALUE', /* required */
  targetType: DEFAULT | THING_GROUP /* required */
};
iot.deleteV2LoggingLevel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • targetType — (String)

      The type of resource for which you are configuring logging. Must be THING_Group.

      Possible values include:
      • "DEFAULT"
      • "THING_GROUP"
    • targetName — (String)

      The name of the resource for which you are configuring logging.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deprecateThingType(params = {}, callback) ⇒ AWS.Request

Deprecates a thing type. You can not associate new things with deprecated thing type.

Service Reference:

Examples:

Calling the deprecateThingType operation

var params = {
  thingTypeName: 'STRING_VALUE', /* required */
  undoDeprecate: true || false
};
iot.deprecateThingType(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingTypeName — (String)

      The name of the thing type to deprecate.

    • undoDeprecate — (Boolean)

      Whether to undeprecate a deprecated thing type. If true, the thing type will not be deprecated anymore and you can associate it with things.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeAccountAuditConfiguration(params = {}, callback) ⇒ AWS.Request

Gets information about the Device Defender audit settings for this account. Settings include how audit notifications are sent and which audit checks are enabled or disabled.

Examples:

Calling the describeAccountAuditConfiguration operation

var params = {
};
iot.describeAccountAuditConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • roleArn — (String)

        The ARN of the role that grants permission to AWS IoT to access information about your devices, policies, certificates and other items as necessary when performing an audit.

        On the first call to UpdateAccountAuditConfiguration this parameter is required.

      • auditNotificationTargetConfigurations — (map<map>)

        Information about the targets to which audit notifications are sent for this account.

        • targetArn — (String)

          The ARN of the target (SNS topic) to which audit notifications are sent.

        • roleArn — (String)

          The ARN of the role that grants permission to send notifications to the target.

        • enabled — (Boolean)

          True if notifications to the target are enabled.

      • auditCheckConfigurations — (map<map>)

        Which audit checks are enabled and disabled for this account.

        • enabled — (Boolean)

          True if this audit check is enabled for this account.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeAuditTask(params = {}, callback) ⇒ AWS.Request

Gets information about a Device Defender audit.

Service Reference:

Examples:

Calling the describeAuditTask operation

var params = {
  taskId: 'STRING_VALUE' /* required */
};
iot.describeAuditTask(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • taskId — (String)

      The ID of the audit whose information you want to get.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • taskStatus — (String)

        The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED".

        Possible values include:
        • "IN_PROGRESS"
        • "COMPLETED"
        • "FAILED"
        • "CANCELED"
      • taskType — (String)

        The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK".

        Possible values include:
        • "ON_DEMAND_AUDIT_TASK"
        • "SCHEDULED_AUDIT_TASK"
      • taskStartTime — (Date)

        The time the audit started.

      • taskStatistics — (map)

        Statistical information about the audit.

        • totalChecks — (Integer)

          The number of checks in this audit.

        • inProgressChecks — (Integer)

          The number of checks in progress.

        • waitingForDataCollectionChecks — (Integer)

          The number of checks waiting for data collection.

        • compliantChecks — (Integer)

          The number of checks that found compliant resources.

        • nonCompliantChecks — (Integer)

          The number of checks that found non-compliant resources.

        • failedChecks — (Integer)

          The number of checks

        • canceledChecks — (Integer)

          The number of checks that did not run because the audit was canceled.

      • scheduledAuditName — (String)

        The name of the scheduled audit (only if the audit was a scheduled audit).

      • auditDetails — (map<map>)

        Detailed information about each check performed during this audit.

        • checkRunStatus — (String)

          The completion status of this check, one of "IN_PROGRESS", "WAITING_FOR_DATA_COLLECTION", "CANCELED", "COMPLETED_COMPLIANT", "COMPLETED_NON_COMPLIANT", or "FAILED".

          Possible values include:
          • "IN_PROGRESS"
          • "WAITING_FOR_DATA_COLLECTION"
          • "CANCELED"
          • "COMPLETED_COMPLIANT"
          • "COMPLETED_NON_COMPLIANT"
          • "FAILED"
        • checkCompliant — (Boolean)

          True if the check completed and found all resources compliant.

        • totalResourcesCount — (Integer)

          The number of resources on which the check was performed.

        • nonCompliantResourcesCount — (Integer)

          The number of resources that the check found non-compliant.

        • errorCode — (String)

          The code of any error encountered when performing this check during this audit. One of "INSUFFICIENT_PERMISSIONS", or "AUDIT_CHECK_DISABLED".

        • message — (String)

          The message associated with any error encountered when performing this check during this audit.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeAuthorizer(params = {}, callback) ⇒ AWS.Request

Describes an authorizer.

Service Reference:

Examples:

Calling the describeAuthorizer operation

var params = {
  authorizerName: 'STRING_VALUE' /* required */
};
iot.describeAuthorizer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • authorizerName — (String)

      The name of the authorizer to describe.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • authorizerDescription — (map)

        The authorizer description.

        • authorizerName — (String)

          The authorizer name.

        • authorizerArn — (String)

          The authorizer ARN.

        • authorizerFunctionArn — (String)

          The authorizer's Lambda function ARN.

        • tokenKeyName — (String)

          The key used to extract the token from the HTTP headers.

        • tokenSigningPublicKeys — (map<String>)

          The public keys used to validate the token signature returned by your custom authentication service.

        • status — (String)

          The status of the authorizer.

          Possible values include:
          • "ACTIVE"
          • "INACTIVE"
        • creationDate — (Date)

          The UNIX timestamp of when the authorizer was created.

        • lastModifiedDate — (Date)

          The UNIX timestamp of when the authorizer was last updated.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeBillingGroup(params = {}, callback) ⇒ AWS.Request

Returns information about a billing group.

Service Reference:

Examples:

Calling the describeBillingGroup operation

var params = {
  billingGroupName: 'STRING_VALUE' /* required */
};
iot.describeBillingGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • billingGroupName — (String)

      The name of the billing group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • billingGroupName — (String)

        The name of the billing group.

      • billingGroupId — (String)

        The ID of the billing group.

      • billingGroupArn — (String)

        The ARN of the billing group.

      • version — (Integer)

        The version of the billing group.

      • billingGroupProperties — (map)

        The properties of the billing group.

        • billingGroupDescription — (String)

          The description of the billing group.

      • billingGroupMetadata — (map)

        Additional information about the billing group.

        • creationDate — (Date)

          The date the billing group was created.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeCACertificate(params = {}, callback) ⇒ AWS.Request

Describes a registered CA certificate.

Service Reference:

Examples:

Calling the describeCACertificate operation

var params = {
  certificateId: 'STRING_VALUE' /* required */
};
iot.describeCACertificate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • certificateId — (String)

      The CA certificate identifier.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • certificateDescription — (map)

        The CA certificate description.

        • certificateArn — (String)

          The CA certificate ARN.

        • certificateId — (String)

          The CA certificate ID.

        • status — (String)

          The status of a CA certificate.

          Possible values include:
          • "ACTIVE"
          • "INACTIVE"
        • certificatePem — (String)

          The CA certificate data, in PEM format.

        • ownedBy — (String)

          The owner of the CA certificate.

        • creationDate — (Date)

          The date the CA certificate was created.

        • autoRegistrationStatus — (String)

          Whether the CA certificate configured for auto registration of device certificates. Valid values are "ENABLE" and "DISABLE"

          Possible values include:
          • "ENABLE"
          • "DISABLE"
        • lastModifiedDate — (Date)

          The date the CA certificate was last modified.

        • customerVersion — (Integer)

          The customer version of the CA certificate.

        • generationId — (String)

          The generation ID of the CA certificate.

        • validity — (map)

          When the CA certificate is valid.

          • notBefore — (Date)

            The certificate is not valid before this date.

          • notAfter — (Date)

            The certificate is not valid after this date.

      • registrationConfig — (map)

        Information about the registration configuration.

        • templateBody — (String)

          The template body.

        • roleArn — (String)

          The ARN of the role.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeCertificate(params = {}, callback) ⇒ AWS.Request

Gets information about the specified certificate.

Service Reference:

Examples:

Calling the describeCertificate operation

var params = {
  certificateId: 'STRING_VALUE' /* required */
};
iot.describeCertificate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • certificateId — (String)

      The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • certificateDescription — (map)

        The description of the certificate.

        • certificateArn — (String)

          The ARN of the certificate.

        • certificateId — (String)

          The ID of the certificate.

        • caCertificateId — (String)

          The certificate ID of the CA certificate used to sign this certificate.

        • status — (String)

          The status of the certificate.

          Possible values include:
          • "ACTIVE"
          • "INACTIVE"
          • "REVOKED"
          • "PENDING_TRANSFER"
          • "REGISTER_INACTIVE"
          • "PENDING_ACTIVATION"
        • certificatePem — (String)

          The certificate data, in PEM format.

        • ownedBy — (String)

          The ID of the AWS account that owns the certificate.

        • previousOwnedBy — (String)

          The ID of the AWS account of the previous owner of the certificate.

        • creationDate — (Date)

          The date and time the certificate was created.

        • lastModifiedDate — (Date)

          The date and time the certificate was last modified.

        • customerVersion — (Integer)

          The customer version of the certificate.

        • transferData — (map)

          The transfer data.

          • transferMessage — (String)

            The transfer message.

          • rejectReason — (String)

            The reason why the transfer was rejected.

          • transferDate — (Date)

            The date the transfer took place.

          • acceptDate — (Date)

            The date the transfer was accepted.

          • rejectDate — (Date)

            The date the transfer was rejected.

        • generationId — (String)

          The generation ID of the certificate.

        • validity — (map)

          When the certificate is valid.

          • notBefore — (Date)

            The certificate is not valid before this date.

          • notAfter — (Date)

            The certificate is not valid after this date.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeDefaultAuthorizer(params = {}, callback) ⇒ AWS.Request

Describes the default authorizer.

Service Reference:

Examples:

Calling the describeDefaultAuthorizer operation

var params = {
};
iot.describeDefaultAuthorizer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • authorizerDescription — (map)

        The default authorizer's description.

        • authorizerName — (String)

          The authorizer name.

        • authorizerArn — (String)

          The authorizer ARN.

        • authorizerFunctionArn — (String)

          The authorizer's Lambda function ARN.

        • tokenKeyName — (String)

          The key used to extract the token from the HTTP headers.

        • tokenSigningPublicKeys — (map<String>)

          The public keys used to validate the token signature returned by your custom authentication service.

        • status — (String)

          The status of the authorizer.

          Possible values include:
          • "ACTIVE"
          • "INACTIVE"
        • creationDate — (Date)

          The UNIX timestamp of when the authorizer was created.

        • lastModifiedDate — (Date)

          The UNIX timestamp of when the authorizer was last updated.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeEndpoint(params = {}, callback) ⇒ AWS.Request

Returns a unique endpoint specific to the AWS account making the call.

Service Reference:

Examples:

Calling the describeEndpoint operation

var params = {
  endpointType: 'STRING_VALUE'
};
iot.describeEndpoint(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • endpointType — (String)

      The endpoint type. Valid endpoint types include:

      • iot:Data - Returns a VeriSign signed data endpoint.

      • iot:Data-ATS - Returns an ATS signed data endpoint.

      • iot:CredentialProvider - Returns an AWS IoT credentials provider API endpoint.

      • iot:Jobs - Returns an AWS IoT device management Jobs API endpoint.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • endpointAddress — (String)

        The endpoint. The format of the endpoint is as follows: identifier.iot.region.amazonaws.com.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeEventConfigurations(params = {}, callback) ⇒ AWS.Request

Describes event configurations.

Service Reference:

Examples:

Calling the describeEventConfigurations operation

var params = {
};
iot.describeEventConfigurations(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • eventConfigurations — (map<map>)

        The event configurations.

        • Enabled — (Boolean)

          True to enable the configuration.

      • creationDate — (Date)

        The creation date of the event configuration.

      • lastModifiedDate — (Date)

        The date the event configurations were last modified.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeIndex(params = {}, callback) ⇒ AWS.Request

Describes a search index.

Service Reference:

Examples:

Calling the describeIndex operation

var params = {
  indexName: 'STRING_VALUE' /* required */
};
iot.describeIndex(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • indexName — (String)

      The index name.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • indexName — (String)

        The index name.

      • indexStatus — (String)

        The index status.

        Possible values include:
        • "ACTIVE"
        • "BUILDING"
        • "REBUILDING"
      • schema — (String)

        Contains a value that specifies the type of indexing performed. Valid values are:

        • REGISTRY – Your thing index contains only registry data.

        • REGISTRY_AND_SHADOW - Your thing index contains registry data and shadow data.

        • REGISTRY_AND_CONNECTIVITY_STATUS - Your thing index contains registry data and thing connectivity status data.

        • REGISTRY_AND_SHADOW_AND_CONNECTIVITY_STATUS - Your thing index contains registry data, shadow data, and thing connectivity status data.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeJob(params = {}, callback) ⇒ AWS.Request

Describes a job.

Service Reference:

Examples:

Calling the describeJob operation

var params = {
  jobId: 'STRING_VALUE' /* required */
};
iot.describeJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • jobId — (String)

      The unique identifier you assigned to this job when it was created.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • documentSource — (String)

        An S3 link to the job document.

      • job — (map)

        Information about the job.

        • jobArn — (String)

          An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId".

        • jobId — (String)

          The unique identifier you assigned to this job when it was created.

        • targetSelection — (String)

          Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a device when the thing representing the device is added to a target group, even after the job was completed by all things originally in the group.

          Possible values include:
          • "CONTINUOUS"
          • "SNAPSHOT"
        • status — (String)

          The status of the job, one of IN_PROGRESS, CANCELED, DELETION_IN_PROGRESS or COMPLETED.

          Possible values include:
          • "IN_PROGRESS"
          • "CANCELED"
          • "COMPLETED"
          • "DELETION_IN_PROGRESS"
        • forceCanceled — (Boolean)

          Will be true if the job was canceled with the optional force parameter set to true.

        • reasonCode — (String)

          If the job was updated, provides the reason code for the update.

        • comment — (String)

          If the job was updated, describes the reason for the update.

        • targets — (Array<String>)

          A list of IoT things and thing groups to which the job should be sent.

        • description — (String)

          A short text description of the job.

        • presignedUrlConfig — (map)

          Configuration for pre-signed S3 URLs.

          • roleArn — (String)

            The ARN of an IAM role that grants grants permission to download files from the S3 bucket where the job data/updates are stored. The role must also grant permission for IoT to download the files.

          • expiresInSec — (Integer)

            How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 3600 seconds. Pre-signed URLs are generated when Jobs receives an MQTT request for the job document.

        • jobExecutionsRolloutConfig — (map)

          Allows you to create a staged rollout of a job.

          • maximumPerMinute — (Integer)

            The maximum number of things that will be notified of a pending job, per minute. This parameter allows you to create a staged rollout.

          • exponentialRate — (map)

            The rate of increase for a job rollout. This parameter allows you to define an exponential rate for a job rollout.

            • baseRatePerMinuterequired — (Integer)

              The minimum number of things that will be notified of a pending job, per minute at the start of job rollout. This parameter allows you to define the initial rate of rollout.

            • incrementFactorrequired — (Float)

              The exponential factor to increase the rate of rollout for a job.

            • rateIncreaseCriteriarequired — (map)

              The criteria to initiate the increase in rate of rollout for a job.

              AWS IoT supports up to one digit after the decimal (for example, 1.5, but not 1.55).

              • numberOfNotifiedThings — (Integer)

                The threshold for number of notified things that will initiate the increase in rate of rollout.

              • numberOfSucceededThings — (Integer)

                The threshold for number of succeeded things that will initiate the increase in rate of rollout.

        • abortConfig — (map)

          Configuration for criteria to abort the job.

          • criteriaListrequired — (Array<map>)

            The list of abort criteria to define rules to abort the job.

            • failureTyperequired — (String)

              The type of job execution failure to define a rule to initiate a job abort.

              Possible values include:
              • "FAILED"
              • "REJECTED"
              • "TIMED_OUT"
              • "ALL"
            • actionrequired — (String)

              The type of abort action to initiate a job abort.

              Possible values include:
              • "CANCEL"
            • thresholdPercentagerequired — (Float)

              The threshold as a percentage of the total number of executed things that will initiate a job abort.

              AWS IoT supports up to two digits after the decimal (for example, 10.9 and 10.99, but not 10.999).

            • minNumberOfExecutedThingsrequired — (Integer)

              Minimum number of executed things before evaluating an abort rule.

        • createdAt — (Date)

          The time, in seconds since the epoch, when the job was created.

        • lastUpdatedAt — (Date)

          The time, in seconds since the epoch, when the job was last updated.

        • completedAt — (Date)

          The time, in seconds since the epoch, when the job was completed.

        • jobProcessDetails — (map)

          Details about the job process.

          • processingTargets — (Array<String>)

            The target devices to which the job execution is being rolled out. This value will be null after the job execution has finished rolling out to all the target devices.

          • numberOfCanceledThings — (Integer)

            The number of things that cancelled the job.

          • numberOfSucceededThings — (Integer)

            The number of things which successfully completed the job.

          • numberOfFailedThings — (Integer)

            The number of things that failed executing the job.

          • numberOfRejectedThings — (Integer)

            The number of things that rejected the job.

          • numberOfQueuedThings — (Integer)

            The number of things that are awaiting execution of the job.

          • numberOfInProgressThings — (Integer)

            The number of things currently executing the job.

          • numberOfRemovedThings — (Integer)

            The number of things that are no longer scheduled to execute the job because they have been deleted or have been removed from the group that was a target of the job.

          • numberOfTimedOutThings — (Integer)

            The number of things whose job execution status is TIMED_OUT.

        • timeoutConfig — (map)

          Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to IN_PROGRESS. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set to TIMED_OUT.

          • inProgressTimeoutInMinutes — (Integer)

            Specifies the amount of time, in minutes, this device has to finish execution of this job. The timeout interval can be anywhere between 1 minute and 7 days (1 to 10080 minutes). The in progress timer can't be updated and will apply to all job executions for the job. Whenever a job execution remains in the IN_PROGRESS status for longer than this interval, the job execution will fail and switch to the terminal TIMED_OUT status.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeJobExecution(params = {}, callback) ⇒ AWS.Request

Describes a job execution.

Service Reference:

Examples:

Calling the describeJobExecution operation

var params = {
  jobId: 'STRING_VALUE', /* required */
  thingName: 'STRING_VALUE', /* required */
  executionNumber: 'NUMBER_VALUE'
};
iot.describeJobExecution(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • jobId — (String)

      The unique identifier you assigned to this job when it was created.

    • thingName — (String)

      The name of the thing on which the job execution is running.

    • executionNumber — (Integer)

      A string (consisting of the digits "0" through "9" which is used to specify a particular job execution on a particular device.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • execution — (map)

        Information about the job execution.

        • jobId — (String)

          The unique identifier you assigned to the job when it was created.

        • status — (String)

          The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, TIMED_OUT, CANCELED, or REJECTED).

          Possible values include:
          • "QUEUED"
          • "IN_PROGRESS"
          • "SUCCEEDED"
          • "FAILED"
          • "TIMED_OUT"
          • "REJECTED"
          • "REMOVED"
          • "CANCELED"
        • forceCanceled — (Boolean)

          Will be true if the job execution was canceled with the optional force parameter set to true.

        • statusDetails — (map)

          A collection of name/value pairs that describe the status of the job execution.

          • detailsMap — (map<String>)

            The job execution status.

        • thingArn — (String)

          The ARN of the thing on which the job execution is running.

        • queuedAt — (Date)

          The time, in seconds since the epoch, when the job execution was queued.

        • startedAt — (Date)

          The time, in seconds since the epoch, when the job execution started.

        • lastUpdatedAt — (Date)

          The time, in seconds since the epoch, when the job execution was last updated.

        • executionNumber — (Integer)

          A string (consisting of the digits "0" through "9") which identifies this particular job execution on this particular device. It can be used in commands which return or update job execution information.

        • versionNumber — (Integer)

          The version of the job execution. Job execution versions are incremented each time they are updated by a device.

        • approximateSecondsBeforeTimedOut — (Integer)

          The estimated number of seconds that remain before the job execution status will be changed to TIMED_OUT. The timeout interval can be anywhere between 1 minute and 7 days (1 to 10080 minutes). The actual job execution timeout can occur up to 60 seconds later than the estimated duration. This value will not be included if the job execution has reached a terminal status.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeRoleAlias(params = {}, callback) ⇒ AWS.Request

Describes a role alias.

Service Reference:

Examples:

Calling the describeRoleAlias operation

var params = {
  roleAlias: 'STRING_VALUE' /* required */
};
iot.describeRoleAlias(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • roleAlias — (String)

      The role alias to describe.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • roleAliasDescription — (map)

        The role alias description.

        • roleAlias — (String)

          The role alias.

        • roleAliasArn — (String)

          The ARN of the role alias.

        • roleArn — (String)

          The role ARN.

        • owner — (String)

          The role alias owner.

        • credentialDurationSeconds — (Integer)

          The number of seconds for which the credential is valid.

        • creationDate — (Date)

          The UNIX timestamp of when the role alias was created.

        • lastModifiedDate — (Date)

          The UNIX timestamp of when the role alias was last modified.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeScheduledAudit(params = {}, callback) ⇒ AWS.Request

Gets information about a scheduled audit.

Service Reference:

Examples:

Calling the describeScheduledAudit operation

var params = {
  scheduledAuditName: 'STRING_VALUE' /* required */
};
iot.describeScheduledAudit(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • scheduledAuditName — (String)

      The name of the scheduled audit whose information you want to get.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • frequency — (String)

        How often the scheduled audit takes place. One of "DAILY", "WEEKLY", "BIWEEKLY" or "MONTHLY". The actual start time of each audit is determined by the system.

        Possible values include:
        • "DAILY"
        • "WEEKLY"
        • "BIWEEKLY"
        • "MONTHLY"
      • dayOfMonth — (String)

        The day of the month on which the scheduled audit takes place. Will be "1" through "31" or "LAST". If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.

      • dayOfWeek — (String)

        The day of the week on which the scheduled audit takes place. One of "SUN", "MON", "TUE", "WED", "THU", "FRI" or "SAT".

        Possible values include:
        • "SUN"
        • "MON"
        • "TUE"
        • "WED"
        • "THU"
        • "FRI"
        • "SAT"
      • targetCheckNames — (Array<String>)

        Which checks are performed during the scheduled audit. (Note that checks must be enabled for your account. (Use DescribeAccountAuditConfiguration to see the list of all checks including those that are enabled or UpdateAccountAuditConfiguration to select which checks are enabled.)

      • scheduledAuditName — (String)

        The name of the scheduled audit.

      • scheduledAuditArn — (String)

        The ARN of the scheduled audit.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeSecurityProfile(params = {}, callback) ⇒ AWS.Request

Gets information about a Device Defender security profile.

Service Reference:

Examples:

Calling the describeSecurityProfile operation

var params = {
  securityProfileName: 'STRING_VALUE' /* required */
};
iot.describeSecurityProfile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • securityProfileName — (String)

      The name of the security profile whose information you want to get.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • securityProfileName — (String)

        The name of the security profile.

      • securityProfileArn — (String)

        The ARN of the security profile.

      • securityProfileDescription — (String)

        A description of the security profile (associated with the security profile when it was created or updated).

      • behaviors — (Array<map>)

        Specifies the behaviors that, when violated by a device (thing), cause an alert.

        • namerequired — (String)

          The name you have given to the behavior.

        • metric — (String)

          What is measured by the behavior.

        • criteria — (map)

          The criteria that determine if a device is behaving normally in regard to the metric.

          • comparisonOperator — (String)

            The operator that relates the thing measured (metric) to the criteria (containing a value or statisticalThreshold).

            Possible values include:
            • "less-than"
            • "less-than-equals"
            • "greater-than"
            • "greater-than-equals"
            • "in-cidr-set"
            • "not-in-cidr-set"
            • "in-port-set"
            • "not-in-port-set"
          • value — (map)

            The value to be compared with the metric.

            • count — (Integer)

              If the comparisonOperator calls for a numeric value, use this to specify that numeric value to be compared with the metric.

            • cidrs — (Array<String>)

              If the comparisonOperator calls for a set of CIDRs, use this to specify that set to be compared with the metric.

            • ports — (Array<Integer>)

              If the comparisonOperator calls for a set of ports, use this to specify that set to be compared with the metric.

          • durationSeconds — (Integer)

            Use this to specify the time duration over which the behavior is evaluated, for those criteria which have a time dimension (for example, NUM_MESSAGES_SENT). For a statisticalThreshhold metric comparison, measurements from all devices are accumulated over this time duration before being used to calculate percentiles, and later, measurements from an individual device are also accumulated over this time duration before being given a percentile rank.

          • consecutiveDatapointsToAlarm — (Integer)

            If a device is in violation of the behavior for the specified number of consecutive datapoints, an alarm occurs. If not specified, the default is 1.

          • consecutiveDatapointsToClear — (Integer)

            If an alarm has occurred and the offending device is no longer in violation of the behavior for the specified number of consecutive datapoints, the alarm is cleared. If not specified, the default is 1.

          • statisticalThreshold — (map)

            A statistical ranking (percentile) which indicates a threshold value by which a behavior is determined to be in compliance or in violation of the behavior.

            • statistic — (String)

              The percentile which resolves to a threshold value by which compliance with a behavior is determined. Metrics are collected over the specified period (durationSeconds) from all reporting devices in your account and statistical ranks are calculated. Then, the measurements from a device are collected over the same period. If the accumulated measurements from the device fall above or below (comparisonOperator) the value associated with the percentile specified, then the device is considered to be in compliance with the behavior, otherwise a violation occurs.

      • alertTargets — (map<map>)

        Where the alerts are sent. (Alerts are always sent to the console.)

        • alertTargetArnrequired — (String)

          The ARN of the notification target to which alerts are sent.

        • roleArnrequired — (String)

          The ARN of the role that grants permission to send alerts to the notification target.

      • additionalMetricsToRetain — (Array<String>)

        A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's behaviors but it is also retained for any metric specified here.

      • version — (Integer)

        The version of the security profile. A new version is generated whenever the security profile is updated.

      • creationDate — (Date)

        The time the security profile was created.

      • lastModifiedDate — (Date)

        The time the security profile was last modified.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeStream(params = {}, callback) ⇒ AWS.Request

Gets information about a stream.

Service Reference:

Examples:

Calling the describeStream operation

var params = {
  streamId: 'STRING_VALUE' /* required */
};
iot.describeStream(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • streamId — (String)

      The stream ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • streamInfo — (map)

        Information about the stream.

        • streamId — (String)

          The stream ID.

        • streamArn — (String)

          The stream ARN.

        • streamVersion — (Integer)

          The stream version.

        • description — (String)

          The description of the stream.

        • files — (Array<map>)

          The files to stream.

          • fileId — (Integer)

            The file ID.

          • s3Location — (map)

            The location of the file in S3.

            • bucket — (String)

              The S3 bucket.

            • key — (String)

              The S3 key.

            • version — (String)

              The S3 bucket version.

        • createdAt — (Date)

          The date when the stream was created.

        • lastUpdatedAt — (Date)

          The date when the stream was last updated.

        • roleArn — (String)

          An IAM role AWS IoT assumes to access your S3 files.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeThing(params = {}, callback) ⇒ AWS.Request

Gets information about the specified thing.

Service Reference:

Examples:

Calling the describeThing operation

var params = {
  thingName: 'STRING_VALUE' /* required */
};
iot.describeThing(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingName — (String)

      The name of the thing.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • defaultClientId — (String)

        The default client ID.

      • thingName — (String)

        The name of the thing.

      • thingId — (String)

        The ID of the thing to describe.

      • thingArn — (String)

        The ARN of the thing to describe.

      • thingTypeName — (String)

        The thing type name.

      • attributes — (map<String>)

        The thing attributes.

      • version — (Integer)

        The current version of the thing record in the registry.

        Note: To avoid unintentional changes to the information in the registry, you can pass the version information in the expectedVersion parameter of the UpdateThing and DeleteThing calls.
      • billingGroupName — (String)

        The name of the billing group the thing belongs to.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeThingGroup(params = {}, callback) ⇒ AWS.Request

Describe a thing group.

Service Reference:

Examples:

Calling the describeThingGroup operation

var params = {
  thingGroupName: 'STRING_VALUE' /* required */
};
iot.describeThingGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingGroupName — (String)

      The name of the thing group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • thingGroupName — (String)

        The name of the thing group.

      • thingGroupId — (String)

        The thing group ID.

      • thingGroupArn — (String)

        The thing group ARN.

      • version — (Integer)

        The version of the thing group.

      • thingGroupProperties — (map)

        The thing group properties.

        • thingGroupDescription — (String)

          The thing group description.

        • attributePayload — (map)

          The thing group attributes in JSON format.

          • attributes — (map<String>)

            A JSON string containing up to three key-value pair in JSON format. For example:

            {\"attributes\":{\"string1\":\"string2\"}}

          • merge — (Boolean)

            Specifies whether the list of attributes provided in the AttributePayload is merged with the attributes stored in the registry, instead of overwriting them.

            To remove an attribute, call UpdateThing with an empty attribute value.

            Note: The merge attribute is only valid when calling UpdateThing.
      • thingGroupMetadata — (map)

        Thing group metadata.

        • parentGroupName — (String)

          The parent thing group name.

        • rootToParentThingGroups — (Array<map>)

          The root parent thing group.

          • groupName — (String)

            The group name.

          • groupArn — (String)

            The group ARN.

        • creationDate — (Date)

          The UNIX timestamp of when the thing group was created.

      • indexName — (String)

        The dynamic thing group index name.

      • queryString — (String)

        The dynamic thing group search query string.

      • queryVersion — (String)

        The dynamic thing group query version.

      • status — (String)

        The dynamic thing group status.

        Possible values include:
        • "ACTIVE"
        • "BUILDING"
        • "REBUILDING"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeThingRegistrationTask(params = {}, callback) ⇒ AWS.Request

Describes a bulk thing provisioning task.

Service Reference:

Examples:

Calling the describeThingRegistrationTask operation

var params = {
  taskId: 'STRING_VALUE' /* required */
};
iot.describeThingRegistrationTask(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • taskId — (String)

      The task ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • taskId — (String)

        The task ID.

      • creationDate — (Date)

        The task creation date.

      • lastModifiedDate — (Date)

        The date when the task was last modified.

      • templateBody — (String)

        The task's template.

      • inputFileBucket — (String)

        The S3 bucket that contains the input file.

      • inputFileKey — (String)

        The input file key.

      • roleArn — (String)

        The role ARN that grants access to the input file bucket.

      • status — (String)

        The status of the bulk thing provisioning task.

        Possible values include:
        • "InProgress"
        • "Completed"
        • "Failed"
        • "Cancelled"
        • "Cancelling"
      • message — (String)

        The message.

      • successCount — (Integer)

        The number of things successfully provisioned.

      • failureCount — (Integer)

        The number of things that failed to be provisioned.

      • percentageProgress — (Integer)

        The progress of the bulk provisioning task expressed as a percentage.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeThingType(params = {}, callback) ⇒ AWS.Request

Gets information about the specified thing type.

Service Reference:

Examples:

Calling the describeThingType operation

var params = {
  thingTypeName: 'STRING_VALUE' /* required */
};
iot.describeThingType(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingTypeName — (String)

      The name of the thing type.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • thingTypeName — (String)

        The name of the thing type.

      • thingTypeId — (String)

        The thing type ID.

      • thingTypeArn — (String)

        The thing type ARN.

      • thingTypeProperties — (map)

        The ThingTypeProperties contains information about the thing type including description, and a list of searchable thing attribute names.

        • thingTypeDescription — (String)

          The description of the thing type.

        • searchableAttributes — (Array<String>)

          A list of searchable thing attribute names.

      • thingTypeMetadata — (map)

        The ThingTypeMetadata contains additional information about the thing type including: creation date and time, a value indicating whether the thing type is deprecated, and a date and time when it was deprecated.

        • deprecated — (Boolean)

          Whether the thing type is deprecated. If true, no new things could be associated with this type.

        • deprecationDate — (Date)

          The date and time when the thing type was deprecated.

        • creationDate — (Date)

          The date and time when the thing type was created.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

detachPolicy(params = {}, callback) ⇒ AWS.Request

Detaches a policy from the specified target.

Service Reference:

Examples:

Calling the detachPolicy operation

var params = {
  policyName: 'STRING_VALUE', /* required */
  target: 'STRING_VALUE' /* required */
};
iot.detachPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • policyName — (String)

      The policy to detach.

    • target — (String)

      The target from which the policy will be detached.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

detachPrincipalPolicy(params = {}, callback) ⇒ AWS.Request

Removes the specified policy from the specified certificate.

Note: This API is deprecated. Please use DetachPolicy instead.

Service Reference:

Examples:

Calling the detachPrincipalPolicy operation

var params = {
  policyName: 'STRING_VALUE', /* required */
  principal: 'STRING_VALUE' /* required */
};
iot.detachPrincipalPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • policyName — (String)

      The name of the policy to detach.

    • principal — (String)

      The principal.

      If the principal is a certificate, specify the certificate ARN. If the principal is an Amazon Cognito identity, specify the identity ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

detachSecurityProfile(params = {}, callback) ⇒ AWS.Request

Disassociates a Device Defender security profile from a thing group or from this account.

Service Reference:

Examples:

Calling the detachSecurityProfile operation

var params = {
  securityProfileName: 'STRING_VALUE', /* required */
  securityProfileTargetArn: 'STRING_VALUE' /* required */
};
iot.detachSecurityProfile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • securityProfileName — (String)

      The security profile that is detached.

    • securityProfileTargetArn — (String)

      The ARN of the thing group from which the security profile is detached.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

detachThingPrincipal(params = {}, callback) ⇒ AWS.Request

Detaches the specified principal from the specified thing. A principal can be X.509 certificates, IAM users, groups, and roles, Amazon Cognito identities or federated identities.

Note: This call is asynchronous. It might take several seconds for the detachment to propagate.

Service Reference:

Examples:

Calling the detachThingPrincipal operation

var params = {
  principal: 'STRING_VALUE', /* required */
  thingName: 'STRING_VALUE' /* required */
};
iot.detachThingPrincipal(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingName — (String)

      The name of the thing.

    • principal — (String)

      If the principal is a certificate, this value must be ARN of the certificate. If the principal is an Amazon Cognito identity, this value must be the ID of the Amazon Cognito identity.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disableTopicRule(params = {}, callback) ⇒ AWS.Request

Disables the rule.

Service Reference:

Examples:

Calling the disableTopicRule operation

var params = {
  ruleName: 'STRING_VALUE' /* required */
};
iot.disableTopicRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ruleName — (String)

      The name of the rule to disable.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

enableTopicRule(params = {}, callback) ⇒ AWS.Request

Enables the rule.

Service Reference:

Examples:

Calling the enableTopicRule operation

var params = {
  ruleName: 'STRING_VALUE' /* required */
};
iot.enableTopicRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ruleName — (String)

      The name of the topic rule to enable.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getEffectivePolicies(params = {}, callback) ⇒ AWS.Request

Gets a list of the policies that have an effect on the authorization behavior of the specified device when it connects to the AWS IoT device gateway.

Service Reference:

Examples:

Calling the getEffectivePolicies operation

var params = {
  cognitoIdentityPoolId: 'STRING_VALUE',
  principal: 'STRING_VALUE',
  thingName: 'STRING_VALUE'
};
iot.getEffectivePolicies(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • principal — (String)

      The principal.

    • cognitoIdentityPoolId — (String)

      The Cognito identity pool ID.

    • thingName — (String)

      The thing name.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • effectivePolicies — (Array<map>)

        The effective policies.

        • policyName — (String)

          The policy name.

        • policyArn — (String)

          The policy ARN.

        • policyDocument — (String)

          The IAM policy document.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getIndexingConfiguration(params = {}, callback) ⇒ AWS.Request

Gets the search configuration.

Service Reference:

Examples:

Calling the getIndexingConfiguration operation

var params = {
};
iot.getIndexingConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • thingIndexingConfiguration — (map)

        Thing indexing configuration.

        • thingIndexingModerequired — (String)

          Thing indexing mode. Valid values are:

          • REGISTRY – Your thing index contains registry data only.

          • REGISTRY_AND_SHADOW - Your thing index contains registry and shadow data.

          • OFF - Thing indexing is disabled.

          Possible values include:
          • "OFF"
          • "REGISTRY"
          • "REGISTRY_AND_SHADOW"
        • thingConnectivityIndexingMode — (String)

          Thing connectivity indexing mode. Valid values are:

          • STATUS – Your thing index contains connectivity status. To enable thing connectivity indexing, thingIndexMode must not be set to OFF.

          • OFF - Thing connectivity status indexing is disabled.

          Possible values include:
          • "OFF"
          • "STATUS"
      • thingGroupIndexingConfiguration — (map)

        The index configuration.

        • thingGroupIndexingModerequired — (String)

          Thing group indexing mode.

          Possible values include:
          • "OFF"
          • "ON"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getJobDocument(params = {}, callback) ⇒ AWS.Request

Gets a job document.

Service Reference:

Examples:

Calling the getJobDocument operation

var params = {
  jobId: 'STRING_VALUE' /* required */
};
iot.getJobDocument(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • jobId — (String)

      The unique identifier you assigned to this job when it was created.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • document — (String)

        The job document content.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getLoggingOptions(params = {}, callback) ⇒ AWS.Request

Gets the logging options.

NOTE: use of this command is not recommended. Use GetV2LoggingOptions instead.

Service Reference:

Examples:

Calling the getLoggingOptions operation

var params = {
};
iot.getLoggingOptions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • roleArn — (String)

        The ARN of the IAM role that grants access.

      • logLevel — (String)

        The logging level.

        Possible values include:
        • "DEBUG"
        • "INFO"
        • "ERROR"
        • "WARN"
        • "DISABLED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getOTAUpdate(params = {}, callback) ⇒ AWS.Request

Gets an OTA update.

Service Reference:

Examples:

Calling the getOTAUpdate operation

var params = {
  otaUpdateId: 'STRING_VALUE' /* required */
};
iot.getOTAUpdate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • otaUpdateId — (String)

      The OTA update ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • otaUpdateInfo — (map)

        The OTA update info.

        • otaUpdateId — (String)

          The OTA update ID.

        • otaUpdateArn — (String)

          The OTA update ARN.

        • creationDate — (Date)

          The date when the OTA update was created.

        • lastModifiedDate — (Date)

          The date when the OTA update was last updated.

        • description — (String)

          A description of the OTA update.

        • targets — (Array<String>)

          The targets of the OTA update.

        • awsJobExecutionsRolloutConfig — (map)

          Configuration for the rollout of OTA updates.

          • maximumPerMinute — (Integer)

            The maximum number of OTA update job executions started per minute.

        • targetSelection — (String)

          Specifies whether the OTA update will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the OTA update (SNAPSHOT). If continuous, the OTA update may also be run on a thing when a change is detected in a target. For example, an OTA update will run on a thing when the thing is added to a target group, even after the OTA update was completed by all things originally in the group.

          Possible values include:
          • "CONTINUOUS"
          • "SNAPSHOT"
        • otaUpdateFiles — (Array<map>)

          A list of files associated with the OTA update.

          • fileName — (String)

            The name of the file.

          • fileVersion — (String)

            The file version.

          • fileLocation — (map)

            The location of the updated firmware.

            • stream — (map)

              The stream that contains the OTA update.

              • streamId — (String)

                The stream ID.

              • fileId — (Integer)

                The ID of a file associated with a stream.

            • s3Location — (map)

              The location of the updated firmware in S3.

              • bucket — (String)

                The S3 bucket.

              • key — (String)

                The S3 key.

              • version — (String)

                The S3 bucket version.

          • codeSigning — (map)

            The code signing method of the file.

            • awsSignerJobId — (String)

              The ID of the AWSSignerJob which was created to sign the file.

            • startSigningJobParameter — (map)

              Describes the code-signing job.

              • signingProfileParameter — (map)

                Describes the code-signing profile.

                • certificateArn — (String)

                  Certificate ARN.

                • platform — (String)

                  The hardware platform of your device.

                • certificatePathOnDevice — (String)

                  The location of the code-signing certificate on your device.

              • signingProfileName — (String)

                The code-signing profile name.

              • destination — (map)

                The location to write the code-signed file.

                • s3Destination — (map)

                  Describes the location in S3 of the updated firmware.

                  • bucket — (String)

                    The S3 bucket that contains the updated firmware.

                  • prefix — (String)

                    The S3 prefix.

            • customCodeSigning — (map)

              A custom method for code signing a file.

              • signature — (map)

                The signature for the file.

                • inlineDocument — (Buffer, Typed Array, Blob, String)

                  A base64 encoded binary representation of the code signing signature.

              • certificateChain — (map)

                The certificate chain.

                • certificateName — (String)

                  The name of the certificate.

                • inlineDocument — (String)

                  A base64 encoded binary representation of the code signing certificate chain.

              • hashAlgorithm — (String)

                The hash algorithm used to code sign the file.

              • signatureAlgorithm — (String)

                The signature algorithm used to code sign the file.

          • attributes — (map<String>)

            A list of name/attribute pairs.

        • otaUpdateStatus — (String)

          The status of the OTA update.

          Possible values include:
          • "CREATE_PENDING"
          • "CREATE_IN_PROGRESS"
          • "CREATE_COMPLETE"
          • "CREATE_FAILED"
        • awsIotJobId — (String)

          The AWS IoT job ID associated with the OTA update.

        • awsIotJobArn — (String)

          The AWS IoT job ARN associated with the OTA update.

        • errorInfo — (map)

          Error information associated with the OTA update.

          • code — (String)

            The error code.

          • message — (String)

            The error message.

        • additionalParameters — (map<String>)

          A collection of name/value pairs

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getPolicy(params = {}, callback) ⇒ AWS.Request

Gets information about the specified policy with the policy document of the default version.

Service Reference:

Examples:

Calling the getPolicy operation

var params = {
  policyName: 'STRING_VALUE' /* required */
};
iot.getPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • policyName — (String)

      The name of the policy.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • policyName — (String)

        The policy name.

      • policyArn — (String)

        The policy ARN.

      • policyDocument — (String)

        The JSON document that describes the policy.

      • defaultVersionId — (String)

        The default policy version ID.

      • creationDate — (Date)

        The date the policy was created.

      • lastModifiedDate — (Date)

        The date the policy was last modified.

      • generationId — (String)

        The generation ID of the policy.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getPolicyVersion(params = {}, callback) ⇒ AWS.Request

Gets information about the specified policy version.

Service Reference:

Examples:

Calling the getPolicyVersion operation

var params = {
  policyName: 'STRING_VALUE', /* required */
  policyVersionId: 'STRING_VALUE' /* required */
};
iot.getPolicyVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • policyName — (String)

      The name of the policy.

    • policyVersionId — (String)

      The policy version ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • policyArn — (String)

        The policy ARN.

      • policyName — (String)

        The policy name.

      • policyDocument — (String)

        The JSON document that describes the policy.

      • policyVersionId — (String)

        The policy version ID.

      • isDefaultVersion — (Boolean)

        Specifies whether the policy version is the default.

      • creationDate — (Date)

        The date the policy version was created.

      • lastModifiedDate — (Date)

        The date the policy version was last modified.

      • generationId — (String)

        The generation ID of the policy version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getRegistrationCode(params = {}, callback) ⇒ AWS.Request

Gets a registration code used to register a CA certificate with AWS IoT.

Service Reference:

Examples:

Calling the getRegistrationCode operation

var params = {
};
iot.getRegistrationCode(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • registrationCode — (String)

        The CA certificate registration code.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getStatistics(params = {}, callback) ⇒ AWS.Request

Gets statistics about things that match the specified query.

Service Reference:

Examples:

Calling the getStatistics operation

var params = {
  queryString: 'STRING_VALUE', /* required */
  aggregationField: 'STRING_VALUE',
  indexName: 'STRING_VALUE',
  queryVersion: 'STRING_VALUE'
};
iot.getStatistics(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • indexName — (String)

      The name of the index to search. The default value is AWS_Things.

    • queryString — (String)

      The query used to search. You can specify "*" for the query string to get the count of all indexed things in your AWS account.

    • aggregationField — (String)

      The aggregation field name. Currently not supported.

    • queryVersion — (String)

      The version of the query used to search.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • statistics — (map)

        The statistics returned by the Fleet Indexing service based on the query and aggregation field.

        • count — (Integer)

          The count of things that match the query.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getTopicRule(params = {}, callback) ⇒ AWS.Request

Gets information about the rule.

Service Reference:

Examples:

Calling the getTopicRule operation

var params = {
  ruleName: 'STRING_VALUE' /* required */
};
iot.getTopicRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ruleName — (String)

      The name of the rule.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ruleArn — (String)

        The rule ARN.

      • rule — (map)

        The rule.

        • ruleName — (String)

          The name of the rule.

        • sql — (String)

          The SQL statement used to query the topic. When using a SQL query with multiple lines, be sure to escape the newline characters.

        • description — (String)

          The description of the rule.

        • createdAt — (Date)

          The date and time the rule was created.

        • actions — (Array<map>)

          The actions associated with the rule.

          • dynamoDB — (map)

            Write to a DynamoDB table.

            • tableNamerequired — (String)

              The name of the DynamoDB table.

            • roleArnrequired — (String)

              The ARN of the IAM role that grants access to the DynamoDB table.

            • operation — (String)

              The type of operation to be performed. This follows the substitution template, so it can be ${operation}, but the substitution must result in one of the following: INSERT, UPDATE, or DELETE.

            • hashKeyFieldrequired — (String)

              The hash key name.

            • hashKeyValuerequired — (String)

              The hash key value.

            • hashKeyType — (String)

              The hash key type. Valid values are "STRING" or "NUMBER"

              Possible values include:
              • "STRING"
              • "NUMBER"
            • rangeKeyField — (String)

              The range key name.

            • rangeKeyValue — (String)

              The range key value.

            • rangeKeyType — (String)

              The range key type. Valid values are "STRING" or "NUMBER"

              Possible values include:
              • "STRING"
              • "NUMBER"
            • payloadField — (String)

              The action payload. This name can be customized.

          • dynamoDBv2 — (map)

            Write to a DynamoDB table. This is a new version of the DynamoDB action. It allows you to write each attribute in an MQTT message payload into a separate DynamoDB column.

            • roleArnrequired — (String)

              The ARN of the IAM role that grants access to the DynamoDB table.

            • putItemrequired — (map)

              Specifies the DynamoDB table to which the message data will be written. For example:

              { "dynamoDBv2": { "roleArn": "aws:iam:12341251:my-role" "putItem": { "tableName": "my-table" } } }

              Each attribute in the message payload will be written to a separate column in the DynamoDB database.

              • tableNamerequired — (String)

                The table where the message data will be written

          • lambda — (map)

            Invoke a Lambda function.

            • functionArnrequired — (String)

              The ARN of the Lambda function.

          • sns — (map)

            Publish to an Amazon SNS topic.

            • targetArnrequired — (String)

              The ARN of the SNS topic.

            • roleArnrequired — (String)

              The ARN of the IAM role that grants access.

            • messageFormat — (String)

              (Optional) The message format of the message to publish. Accepted values are "JSON" and "RAW". The default value of the attribute is "RAW". SNS uses this setting to determine if the payload should be parsed and relevant platform-specific bits of the payload should be extracted. To read more about SNS message formats, see https://docs.aws.amazon.com/sns/latest/dg/json-formats.html refer to their official documentation.

              Possible values include:
              • "RAW"
              • "JSON"
          • sqs — (map)

            Publish to an Amazon SQS queue.

            • roleArnrequired — (String)

              The ARN of the IAM role that grants access.

            • queueUrlrequired — (String)

              The URL of the Amazon SQS queue.

            • useBase64 — (Boolean)

              Specifies whether to use Base64 encoding.

          • kinesis — (map)

            Write data to an Amazon Kinesis stream.

            • roleArnrequired — (String)

              The ARN of the IAM role that grants access to the Amazon Kinesis stream.

            • streamNamerequired — (String)

              The name of the Amazon Kinesis stream.

            • partitionKey — (String)

              The partition key.

          • republish — (map)

            Publish to another MQTT topic.

            • roleArnrequired — (String)

              The ARN of the IAM role that grants access.

            • topicrequired — (String)

              The name of the MQTT topic.

          • s3 — (map)

            Write to an Amazon S3 bucket.

            • roleArnrequired — (String)

              The ARN of the IAM role that grants access.

            • bucketNamerequired — (String)

              The Amazon S3 bucket.

            • keyrequired — (String)

              The object key.

            • cannedAcl — (String)

              The Amazon S3 canned ACL that controls access to the object identified by the object key. For more information, see S3 canned ACLs.

              Possible values include:
              • "private"
              • "public-read"
              • "public-read-write"
              • "aws-exec-read"
              • "authenticated-read"
              • "bucket-owner-read"
              • "bucket-owner-full-control"
              • "log-delivery-write"
          • firehose — (map)

            Write to an Amazon Kinesis Firehose stream.

            • roleArnrequired — (String)

              The IAM role that grants access to the Amazon Kinesis Firehose stream.

            • deliveryStreamNamerequired — (String)

              The delivery stream name.

            • separator — (String)

              A character separator that will be used to separate records written to the Firehose stream. Valid values are: '\n' (newline), '\t' (tab), '\r\n' (Windows newline), ',' (comma).

          • cloudwatchMetric — (map)

            Capture a CloudWatch metric.

            • roleArnrequired — (String)

              The IAM role that allows access to the CloudWatch metric.

            • metricNamespacerequired — (String)

              The CloudWatch metric namespace name.

            • metricNamerequired — (String)

              The CloudWatch metric name.

            • metricValuerequired — (String)

              The CloudWatch metric value.

            • metricUnitrequired — (String)

              The metric unit supported by CloudWatch.

            • metricTimestamp — (String)

              An optional Unix timestamp.

          • cloudwatchAlarm — (map)

            Change the state of a CloudWatch alarm.

            • roleArnrequired — (String)

              The IAM role that allows access to the CloudWatch alarm.

            • alarmNamerequired — (String)

              The CloudWatch alarm name.

            • stateReasonrequired — (String)

              The reason for the alarm change.

            • stateValuerequired — (String)

              The value of the alarm state. Acceptable values are: OK, ALARM, INSUFFICIENT_DATA.

          • elasticsearch — (map)

            Write data to an Amazon Elasticsearch Service domain.

            • roleArnrequired — (String)

              The IAM role ARN that has access to Elasticsearch.

            • endpointrequired — (String)

              The endpoint of your Elasticsearch domain.

            • indexrequired — (String)

              The Elasticsearch index where you want to store your data.

            • typerequired — (String)

              The type of document you are storing.

            • idrequired — (String)

              The unique identifier for the document you are storing.

          • salesforce — (map)

            Send a message to a Salesforce IoT Cloud Input Stream.

            • tokenrequired — (String)

              The token used to authenticate access to the Salesforce IoT Cloud Input Stream. The token is available from the Salesforce IoT Cloud platform after creation of the Input Stream.

            • urlrequired — (String)

              The URL exposed by the Salesforce IoT Cloud Input Stream. The URL is available from the Salesforce IoT Cloud platform after creation of the Input Stream.

          • iotAnalytics — (map)

            Sends message data to an AWS IoT Analytics channel.

            • channelArn — (String)

              (deprecated) The ARN of the IoT Analytics channel to which message data will be sent.

            • channelName — (String)

              The name of the IoT Analytics channel to which message data will be sent.

            • roleArn — (String)

              The ARN of the role which has a policy that grants IoT Analytics permission to send message data via IoT Analytics (iotanalytics:BatchPutMessage).

          • iotEvents — (map)

            Sends an input to an AWS IoT Events detector.

            • inputNamerequired — (String)

              The name of the AWS IoT Events input.

            • messageId — (String)

              [Optional] Use this to ensure that only one input (message) with a given messageId will be processed by an AWS IoT Events detector.

            • roleArnrequired — (String)

              The ARN of the role that grants AWS IoT permission to send an input to an AWS IoT Events detector. ("Action":"iotevents:BatchPutMessage").

          • stepFunctions — (map)

            Starts execution of a Step Functions state machine.

            • executionNamePrefix — (String)

              (Optional) A name will be given to the state machine execution consisting of this prefix followed by a UUID. Step Functions automatically creates a unique name for each state machine execution if one is not provided.

            • stateMachineNamerequired — (String)

              The name of the Step Functions state machine whose execution will be started.

            • roleArnrequired — (String)

              The ARN of the role that grants IoT permission to start execution of a state machine ("Action":"states:StartExecution").

        • ruleDisabled — (Boolean)

          Specifies whether the rule is disabled.

        • awsIotSqlVersion — (String)

          The version of the SQL rules engine to use when evaluating the rule.

        • errorAction — (map)

          The action to perform when an error occurs.

          • dynamoDB — (map)

            Write to a DynamoDB table.

            • tableNamerequired — (String)

              The name of the DynamoDB table.

            • roleArnrequired — (String)

              The ARN of the IAM role that grants access to the DynamoDB table.

            • operation — (String)

              The type of operation to be performed. This follows the substitution template, so it can be ${operation}, but the substitution must result in one of the following: INSERT, UPDATE, or DELETE.

            • hashKeyFieldrequired — (String)

              The hash key name.

            • hashKeyValuerequired — (String)

              The hash key value.

            • hashKeyType — (String)

              The hash key type. Valid values are "STRING" or "NUMBER"

              Possible values include:
              • "STRING"
              • "NUMBER"
            • rangeKeyField — (String)

              The range key name.

            • rangeKeyValue — (String)

              The range key value.

            • rangeKeyType — (String)

              The range key type. Valid values are "STRING" or "NUMBER"

              Possible values include:
              • "STRING"
              • "NUMBER"
            • payloadField — (String)

              The action payload. This name can be customized.

          • dynamoDBv2 — (map)

            Write to a DynamoDB table. This is a new version of the DynamoDB action. It allows you to write each attribute in an MQTT message payload into a separate DynamoDB column.

            • roleArnrequired — (String)

              The ARN of the IAM role that grants access to the DynamoDB table.

            • putItemrequired — (map)

              Specifies the DynamoDB table to which the message data will be written. For example:

              { "dynamoDBv2": { "roleArn": "aws:iam:12341251:my-role" "putItem": { "tableName": "my-table" } } }

              Each attribute in the message payload will be written to a separate column in the DynamoDB database.

              • tableNamerequired — (String)

                The table where the message data will be written

          • lambda — (map)

            Invoke a Lambda function.

            • functionArnrequired — (String)

              The ARN of the Lambda function.

          • sns — (map)

            Publish to an Amazon SNS topic.

            • targetArnrequired — (String)

              The ARN of the SNS topic.

            • roleArnrequired — (String)

              The ARN of the IAM role that grants access.

            • messageFormat — (String)

              (Optional) The message format of the message to publish. Accepted values are "JSON" and "RAW". The default value of the attribute is "RAW". SNS uses this setting to determine if the payload should be parsed and relevant platform-specific bits of the payload should be extracted. To read more about SNS message formats, see https://docs.aws.amazon.com/sns/latest/dg/json-formats.html refer to their official documentation.

              Possible values include:
              • "RAW"
              • "JSON"
          • sqs — (map)

            Publish to an Amazon SQS queue.

            • roleArnrequired — (String)

              The ARN of the IAM role that grants access.

            • queueUrlrequired — (String)

              The URL of the Amazon SQS queue.

            • useBase64 — (Boolean)

              Specifies whether to use Base64 encoding.

          • kinesis — (map)

            Write data to an Amazon Kinesis stream.

            • roleArnrequired — (String)

              The ARN of the IAM role that grants access to the Amazon Kinesis stream.

            • streamNamerequired — (String)

              The name of the Amazon Kinesis stream.

            • partitionKey — (String)

              The partition key.

          • republish — (map)

            Publish to another MQTT topic.

            • roleArnrequired — (String)

              The ARN of the IAM role that grants access.

            • topicrequired — (String)

              The name of the MQTT topic.

          • s3 — (map)

            Write to an Amazon S3 bucket.

            • roleArnrequired — (String)

              The ARN of the IAM role that grants access.

            • bucketNamerequired — (String)

              The Amazon S3 bucket.

            • keyrequired — (String)

              The object key.

            • cannedAcl — (String)

              The Amazon S3 canned ACL that controls access to the object identified by the object key. For more information, see S3 canned ACLs.

              Possible values include:
              • "private"
              • "public-read"
              • "public-read-write"
              • "aws-exec-read"
              • "authenticated-read"
              • "bucket-owner-read"
              • "bucket-owner-full-control"
              • "log-delivery-write"
          • firehose — (map)

            Write to an Amazon Kinesis Firehose stream.

            • roleArnrequired — (String)

              The IAM role that grants access to the Amazon Kinesis Firehose stream.

            • deliveryStreamNamerequired — (String)

              The delivery stream name.

            • separator — (String)

              A character separator that will be used to separate records written to the Firehose stream. Valid values are: '\n' (newline), '\t' (tab), '\r\n' (Windows newline), ',' (comma).

          • cloudwatchMetric — (map)

            Capture a CloudWatch metric.

            • roleArnrequired — (String)

              The IAM role that allows access to the CloudWatch metric.

            • metricNamespacerequired — (String)

              The CloudWatch metric namespace name.

            • metricNamerequired — (String)

              The CloudWatch metric name.

            • metricValuerequired — (String)

              The CloudWatch metric value.

            • metricUnitrequired — (String)

              The metric unit supported by CloudWatch.

            • metricTimestamp — (String)

              An optional Unix timestamp.

          • cloudwatchAlarm — (map)

            Change the state of a CloudWatch alarm.

            • roleArnrequired — (String)

              The IAM role that allows access to the CloudWatch alarm.

            • alarmNamerequired — (String)

              The CloudWatch alarm name.

            • stateReasonrequired — (String)

              The reason for the alarm change.

            • stateValuerequired — (String)

              The value of the alarm state. Acceptable values are: OK, ALARM, INSUFFICIENT_DATA.

          • elasticsearch — (map)

            Write data to an Amazon Elasticsearch Service domain.

            • roleArnrequired — (String)

              The IAM role ARN that has access to Elasticsearch.

            • endpointrequired — (String)

              The endpoint of your Elasticsearch domain.

            • indexrequired — (String)

              The Elasticsearch index where you want to store your data.

            • typerequired — (String)

              The type of document you are storing.

            • idrequired — (String)

              The unique identifier for the document you are storing.

          • salesforce — (map)

            Send a message to a Salesforce IoT Cloud Input Stream.

            • tokenrequired — (String)

              The token used to authenticate access to the Salesforce IoT Cloud Input Stream. The token is available from the Salesforce IoT Cloud platform after creation of the Input Stream.

            • urlrequired — (String)

              The URL exposed by the Salesforce IoT Cloud Input Stream. The URL is available from the Salesforce IoT Cloud platform after creation of the Input Stream.

          • iotAnalytics — (map)

            Sends message data to an AWS IoT Analytics channel.

            • channelArn — (String)

              (deprecated) The ARN of the IoT Analytics channel to which message data will be sent.

            • channelName — (String)

              The name of the IoT Analytics channel to which message data will be sent.

            • roleArn — (String)

              The ARN of the role which has a policy that grants IoT Analytics permission to send message data via IoT Analytics (iotanalytics:BatchPutMessage).

          • iotEvents — (map)

            Sends an input to an AWS IoT Events detector.

            • inputNamerequired — (String)

              The name of the AWS IoT Events input.

            • messageId — (String)

              [Optional] Use this to ensure that only one input (message) with a given messageId will be processed by an AWS IoT Events detector.

            • roleArnrequired — (String)

              The ARN of the role that grants AWS IoT permission to send an input to an AWS IoT Events detector. ("Action":"iotevents:BatchPutMessage").

          • stepFunctions — (map)

            Starts execution of a Step Functions state machine.

            • executionNamePrefix — (String)

              (Optional) A name will be given to the state machine execution consisting of this prefix followed by a UUID. Step Functions automatically creates a unique name for each state machine execution if one is not provided.

            • stateMachineNamerequired — (String)

              The name of the Step Functions state machine whose execution will be started.

            • roleArnrequired — (String)

              The ARN of the role that grants IoT permission to start execution of a state machine ("Action":"states:StartExecution").

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getV2LoggingOptions(params = {}, callback) ⇒ AWS.Request

Gets the fine grained logging options.

Service Reference:

Examples:

Calling the getV2LoggingOptions operation

var params = {
};
iot.getV2LoggingOptions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • roleArn — (String)

        The IAM role ARN AWS IoT uses to write to your CloudWatch logs.

      • defaultLogLevel — (String)

        The default log level.

        Possible values include:
        • "DEBUG"
        • "INFO"
        • "ERROR"
        • "WARN"
        • "DISABLED"
      • disableAllLogs — (Boolean)

        Disables all logs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listActiveViolations(params = {}, callback) ⇒ AWS.Request

Lists the active violations for a given Device Defender security profile.

Service Reference:

Examples:

Calling the listActiveViolations operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  securityProfileName: 'STRING_VALUE',
  thingName: 'STRING_VALUE'
};
iot.listActiveViolations(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingName — (String)

      The name of the thing whose active violations are listed.

    • securityProfileName — (String)

      The name of the Device Defender security profile for which violations are listed.

    • nextToken — (String)

      The token for the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return at one time.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • activeViolations — (Array<map>)

        The list of active violations.

        • violationId — (String)

          The ID of the active violation.

        • thingName — (String)

          The name of the thing responsible for the active violation.

        • securityProfileName — (String)

          The security profile whose behavior is in violation.

        • behavior — (map)

          The behavior which is being violated.

          • namerequired — (String)

            The name you have given to the behavior.

          • metric — (String)

            What is measured by the behavior.

          • criteria — (map)

            The criteria that determine if a device is behaving normally in regard to the metric.

            • comparisonOperator — (String)

              The operator that relates the thing measured (metric) to the criteria (containing a value or statisticalThreshold).

              Possible values include:
              • "less-than"
              • "less-than-equals"
              • "greater-than"
              • "greater-than-equals"
              • "in-cidr-set"
              • "not-in-cidr-set"
              • "in-port-set"
              • "not-in-port-set"
            • value — (map)

              The value to be compared with the metric.

              • count — (Integer)

                If the comparisonOperator calls for a numeric value, use this to specify that numeric value to be compared with the metric.

              • cidrs — (Array<String>)

                If the comparisonOperator calls for a set of CIDRs, use this to specify that set to be compared with the metric.

              • ports — (Array<Integer>)

                If the comparisonOperator calls for a set of ports, use this to specify that set to be compared with the metric.

            • durationSeconds — (Integer)

              Use this to specify the time duration over which the behavior is evaluated, for those criteria which have a time dimension (for example, NUM_MESSAGES_SENT). For a statisticalThreshhold metric comparison, measurements from all devices are accumulated over this time duration before being used to calculate percentiles, and later, measurements from an individual device are also accumulated over this time duration before being given a percentile rank.

            • consecutiveDatapointsToAlarm — (Integer)

              If a device is in violation of the behavior for the specified number of consecutive datapoints, an alarm occurs. If not specified, the default is 1.

            • consecutiveDatapointsToClear — (Integer)

              If an alarm has occurred and the offending device is no longer in violation of the behavior for the specified number of consecutive datapoints, the alarm is cleared. If not specified, the default is 1.

            • statisticalThreshold — (map)

              A statistical ranking (percentile) which indicates a threshold value by which a behavior is determined to be in compliance or in violation of the behavior.

              • statistic — (String)

                The percentile which resolves to a threshold value by which compliance with a behavior is determined. Metrics are collected over the specified period (durationSeconds) from all reporting devices in your account and statistical ranks are calculated. Then, the measurements from a device are collected over the same period. If the accumulated measurements from the device fall above or below (comparisonOperator) the value associated with the percentile specified, then the device is considered to be in compliance with the behavior, otherwise a violation occurs.

        • lastViolationValue — (map)

          The value of the metric (the measurement) which caused the most recent violation.

          • count — (Integer)

            If the comparisonOperator calls for a numeric value, use this to specify that numeric value to be compared with the metric.

          • cidrs — (Array<String>)

            If the comparisonOperator calls for a set of CIDRs, use this to specify that set to be compared with the metric.

          • ports — (Array<Integer>)

            If the comparisonOperator calls for a set of ports, use this to specify that set to be compared with the metric.

        • lastViolationTime — (Date)

          The time the most recent violation occurred.

        • violationStartTime — (Date)

          The time the violation started.

      • nextToken — (String)

        A token that can be used to retrieve the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listAttachedPolicies(params = {}, callback) ⇒ AWS.Request

Lists the policies attached to the specified thing group.

Service Reference:

Examples:

Calling the listAttachedPolicies operation

var params = {
  target: 'STRING_VALUE', /* required */
  marker: 'STRING_VALUE',
  pageSize: 'NUMBER_VALUE',
  recursive: true || false
};
iot.listAttachedPolicies(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • target — (String)

      The group for which the policies will be listed.

    • recursive — (Boolean)

      When true, recursively list attached policies.

    • marker — (String)

      The token to retrieve the next set of results.

    • pageSize — (Integer)

      The maximum number of results to be returned per request.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • policies — (Array<map>)

        The policies.

        • policyName — (String)

          The policy name.

        • policyArn — (String)

          The policy ARN.

      • nextMarker — (String)

        The token to retrieve the next set of results, or null if there are no more results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listAuditFindings(params = {}, callback) ⇒ AWS.Request

Lists the findings (results) of a Device Defender audit or of the audits performed during a specified time period. (Findings are retained for 180 days.)

Service Reference:

Examples:

Calling the listAuditFindings operation

var params = {
  checkName: 'STRING_VALUE',
  endTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  resourceIdentifier: {
    account: 'STRING_VALUE',
    caCertificateId: 'STRING_VALUE',
    clientId: 'STRING_VALUE',
    cognitoIdentityPoolId: 'STRING_VALUE',
    deviceCertificateId: 'STRING_VALUE',
    policyVersionIdentifier: {
      policyName: 'STRING_VALUE',
      policyVersionId: 'STRING_VALUE'
    }
  },
  startTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  taskId: 'STRING_VALUE'
};
iot.listAuditFindings(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • taskId — (String)

      A filter to limit results to the audit with the specified ID. You must specify either the taskId or the startTime and endTime, but not both.

    • checkName — (String)

      A filter to limit results to the findings for the specified audit check.

    • resourceIdentifier — (map)

      Information identifying the non-compliant resource.

      • deviceCertificateId — (String)

        The ID of the certificate attached to the resource.

      • caCertificateId — (String)

        The ID of the CA certificate used to authorize the certificate.

      • cognitoIdentityPoolId — (String)

        The ID of the Cognito Identity Pool.

      • clientId — (String)

        The client ID.

      • policyVersionIdentifier — (map)

        The version of the policy associated with the resource.

        • policyName — (String)

          The name of the policy.

        • policyVersionId — (String)

          The ID of the version of the policy associated with the resource.

      • account — (String)

        The account with which the resource is associated.

    • maxResults — (Integer)

      The maximum number of results to return at one time. The default is 25.

    • nextToken — (String)

      The token for the next set of results.

    • startTime — (Date)

      A filter to limit results to those found after the specified time. You must specify either the startTime and endTime or the taskId, but not both.

    • endTime — (Date)

      A filter to limit results to those found before the specified time. You must specify either the startTime and endTime or the taskId, but not both.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • findings — (Array<map>)

        The findings (results) of the audit.

        • taskId — (String)

          The ID of the audit that generated this result (finding)

        • checkName — (String)

          The audit check that generated this result.

        • taskStartTime — (Date)

          The time the audit started.

        • findingTime — (Date)

          The time the result (finding) was discovered.

        • severity — (String)

          The severity of the result (finding).

          Possible values include:
          • "CRITICAL"
          • "HIGH"
          • "MEDIUM"
          • "LOW"
        • nonCompliantResource — (map)

          The resource that was found to be non-compliant with the audit check.

          • resourceType — (String)

            The type of the non-compliant resource.

            Possible values include:
            • "DEVICE_CERTIFICATE"
            • "CA_CERTIFICATE"
            • "IOT_POLICY"
            • "COGNITO_IDENTITY_POOL"
            • "CLIENT_ID"
            • "ACCOUNT_SETTINGS"
          • resourceIdentifier — (map)

            Information identifying the non-compliant resource.

            • deviceCertificateId — (String)

              The ID of the certificate attached to the resource.

            • caCertificateId — (String)

              The ID of the CA certificate used to authorize the certificate.

            • cognitoIdentityPoolId — (String)

              The ID of the Cognito Identity Pool.

            • clientId — (String)

              The client ID.

            • policyVersionIdentifier — (map)

              The version of the policy associated with the resource.

              • policyName — (String)

                The name of the policy.

              • policyVersionId — (String)

                The ID of the version of the policy associated with the resource.

            • account — (String)

              The account with which the resource is associated.

          • additionalInfo — (map<String>)

            Additional information about the non-compliant resource.

        • relatedResources — (Array<map>)

          The list of related resources.

          • resourceType — (String)

            The type of resource.

            Possible values include:
            • "DEVICE_CERTIFICATE"
            • "CA_CERTIFICATE"
            • "IOT_POLICY"
            • "COGNITO_IDENTITY_POOL"
            • "CLIENT_ID"
            • "ACCOUNT_SETTINGS"
          • resourceIdentifier — (map)

            Information identifying the resource.

            • deviceCertificateId — (String)

              The ID of the certificate attached to the resource.

            • caCertificateId — (String)

              The ID of the CA certificate used to authorize the certificate.

            • cognitoIdentityPoolId — (String)

              The ID of the Cognito Identity Pool.

            • clientId — (String)

              The client ID.

            • policyVersionIdentifier — (map)

              The version of the policy associated with the resource.

              • policyName — (String)

                The name of the policy.

              • policyVersionId — (String)

                The ID of the version of the policy associated with the resource.

            • account — (String)

              The account with which the resource is associated.

          • additionalInfo — (map<String>)

            Additional information about the resource.

        • reasonForNonCompliance — (String)

          The reason the resource was non-compliant.

        • reasonForNonComplianceCode — (String)

          A code which indicates the reason that the resource was non-compliant.

      • nextToken — (String)

        A token that can be used to retrieve the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listAuditTasks(params = {}, callback) ⇒ AWS.Request

Lists the Device Defender audits that have been performed during a given time period.

Service Reference:

Examples:

Calling the listAuditTasks operation

var params = {
  endTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  startTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  taskStatus: IN_PROGRESS | COMPLETED | FAILED | CANCELED,
  taskType: ON_DEMAND_AUDIT_TASK | SCHEDULED_AUDIT_TASK
};
iot.listAuditTasks(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • startTime — (Date)

      The beginning of the time period. Note that audit information is retained for a limited time (180 days). Requesting a start time prior to what is retained results in an "InvalidRequestException".

    • endTime — (Date)

      The end of the time period.

    • taskType — (String)

      A filter to limit the output to the specified type of audit: can be one of "ON_DEMAND_AUDIT_TASK" or "SCHEDULED__AUDIT_TASK".

      Possible values include:
      • "ON_DEMAND_AUDIT_TASK"
      • "SCHEDULED_AUDIT_TASK"
    • taskStatus — (String)

      A filter to limit the output to audits with the specified completion status: can be one of "IN_PROGRESS", "COMPLETED", "FAILED" or "CANCELED".

      Possible values include:
      • "IN_PROGRESS"
      • "COMPLETED"
      • "FAILED"
      • "CANCELED"
    • nextToken — (String)

      The token for the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return at one time. The default is 25.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • tasks — (Array<map>)

        The audits that were performed during the specified time period.

        • taskId — (String)

          The ID of this audit.

        • taskStatus — (String)

          The status of this audit: one of "IN_PROGRESS", "COMPLETED", "FAILED" or "CANCELED".

          Possible values include:
          • "IN_PROGRESS"
          • "COMPLETED"
          • "FAILED"
          • "CANCELED"
        • taskType — (String)

          The type of this audit: one of "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK".

          Possible values include:
          • "ON_DEMAND_AUDIT_TASK"
          • "SCHEDULED_AUDIT_TASK"
      • nextToken — (String)

        A token that can be used to retrieve the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listAuthorizers(params = {}, callback) ⇒ AWS.Request

Lists the authorizers registered in your account.

Service Reference:

Examples:

Calling the listAuthorizers operation

var params = {
  ascendingOrder: true || false,
  marker: 'STRING_VALUE',
  pageSize: 'NUMBER_VALUE',
  status: ACTIVE | INACTIVE
};
iot.listAuthorizers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • pageSize — (Integer)

      The maximum number of results to return at one time.

    • marker — (String)

      A marker used to get the next set of results.

    • ascendingOrder — (Boolean)

      Return the list of authorizers in ascending alphabetical order.

    • status — (String)

      The status of the list authorizers request.

      Possible values include:
      • "ACTIVE"
      • "INACTIVE"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • authorizers — (Array<map>)

        The authorizers.

        • authorizerName — (String)

          The authorizer name.

        • authorizerArn — (String)

          The authorizer ARN.

      • nextMarker — (String)

        A marker used to get the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listBillingGroups(params = {}, callback) ⇒ AWS.Request

Lists the billing groups you have created.

Service Reference:

Examples:

Calling the listBillingGroups operation

var params = {
  maxResults: 'NUMBER_VALUE',
  namePrefixFilter: 'STRING_VALUE',
  nextToken: 'STRING_VALUE'
};
iot.listBillingGroups(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

      The token to retrieve the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return per request.

    • namePrefixFilter — (String)

      Limit the results to billing groups whose names have the given prefix.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • billingGroups — (Array<map>)

        The list of billing groups.

        • groupName — (String)

          The group name.

        • groupArn — (String)

          The group ARN.

      • nextToken — (String)

        The token used to get the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listCACertificates(params = {}, callback) ⇒ AWS.Request

Lists the CA certificates registered for your AWS account.

The results are paginated with a default page size of 25. You can use the returned marker to retrieve additional results.

Service Reference:

Examples:

Calling the listCACertificates operation

var params = {
  ascendingOrder: true || false,
  marker: 'STRING_VALUE',
  pageSize: 'NUMBER_VALUE'
};
iot.listCACertificates(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • pageSize — (Integer)

      The result page size.

    • marker — (String)

      The marker for the next set of results.

    • ascendingOrder — (Boolean)

      Determines the order of the results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • certificates — (Array<map>)

        The CA certificates registered in your AWS account.

        • certificateArn — (String)

          The ARN of the CA certificate.

        • certificateId — (String)

          The ID of the CA certificate.

        • status — (String)

          The status of the CA certificate.

          The status value REGISTER_INACTIVE is deprecated and should not be used.

          Possible values include:
          • "ACTIVE"
          • "INACTIVE"
        • creationDate — (Date)

          The date the CA certificate was created.

      • nextMarker — (String)

        The current position within the list of CA certificates.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listCertificates(params = {}, callback) ⇒ AWS.Request

Lists the certificates registered in your AWS account.

The results are paginated with a default page size of 25. You can use the returned marker to retrieve additional results.

Service Reference:

Examples:

Calling the listCertificates operation

var params = {
  ascendingOrder: true || false,
  marker: 'STRING_VALUE',
  pageSize: 'NUMBER_VALUE'
};
iot.listCertificates(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • pageSize — (Integer)

      The result page size.

    • marker — (String)

      The marker for the next set of results.

    • ascendingOrder — (Boolean)

      Specifies the order for results. If True, the results are returned in ascending order, based on the creation date.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • certificates — (Array<map>)

        The descriptions of the certificates.

        • certificateArn — (String)

          The ARN of the certificate.

        • certificateId — (String)

          The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

        • status — (String)

          The status of the certificate.

          The status value REGISTER_INACTIVE is deprecated and should not be used.

          Possible values include:
          • "ACTIVE"
          • "INACTIVE"
          • "REVOKED"
          • "PENDING_TRANSFER"
          • "REGISTER_INACTIVE"
          • "PENDING_ACTIVATION"
        • creationDate — (Date)

          The date and time the certificate was created.

      • nextMarker — (String)

        The marker for the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listCertificatesByCA(params = {}, callback) ⇒ AWS.Request

List the device certificates signed by the specified CA certificate.

Service Reference:

Examples:

Calling the listCertificatesByCA operation

var params = {
  caCertificateId: 'STRING_VALUE', /* required */
  ascendingOrder: true || false,
  marker: 'STRING_VALUE',
  pageSize: 'NUMBER_VALUE'
};
iot.listCertificatesByCA(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • caCertificateId — (String)

      The ID of the CA certificate. This operation will list all registered device certificate that were signed by this CA certificate.

    • pageSize — (Integer)

      The result page size.

    • marker — (String)

      The marker for the next set of results.

    • ascendingOrder — (Boolean)

      Specifies the order for results. If True, the results are returned in ascending order, based on the creation date.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • certificates — (Array<map>)

        The device certificates signed by the specified CA certificate.

        • certificateArn — (String)

          The ARN of the certificate.

        • certificateId — (String)

          The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

        • status — (String)

          The status of the certificate.

          The status value REGISTER_INACTIVE is deprecated and should not be used.

          Possible values include:
          • "ACTIVE"
          • "INACTIVE"
          • "REVOKED"
          • "PENDING_TRANSFER"
          • "REGISTER_INACTIVE"
          • "PENDING_ACTIVATION"
        • creationDate — (Date)

          The date and time the certificate was created.

      • nextMarker — (String)

        The marker for the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listIndices(params = {}, callback) ⇒ AWS.Request

Lists the search indices.

Service Reference:

Examples:

Calling the listIndices operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iot.listIndices(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

      The token used to get the next set of results, or null if there are no additional results.

    • maxResults — (Integer)

      The maximum number of results to return at one time.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • indexNames — (Array<String>)

        The index names.

      • nextToken — (String)

        The token used to get the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listJobExecutionsForJob(params = {}, callback) ⇒ AWS.Request

Lists the job executions for a job.

Service Reference:

Examples:

Calling the listJobExecutionsForJob operation

var params = {
  jobId: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  status: QUEUED | IN_PROGRESS | SUCCEEDED | FAILED | TIMED_OUT | REJECTED | REMOVED | CANCELED
};
iot.listJobExecutionsForJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • jobId — (String)

      The unique identifier you assigned to this job when it was created.

    • status — (String)

      The status of the job.

      Possible values include:
      • "QUEUED"
      • "IN_PROGRESS"
      • "SUCCEEDED"
      • "FAILED"
      • "TIMED_OUT"
      • "REJECTED"
      • "REMOVED"
      • "CANCELED"
    • maxResults — (Integer)

      The maximum number of results to be returned per request.

    • nextToken — (String)

      The token to retrieve the next set of results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • executionSummaries — (Array<map>)

        A list of job execution summaries.

        • thingArn — (String)

          The ARN of the thing on which the job execution is running.

        • jobExecutionSummary — (map)

          Contains a subset of information about a job execution.

          • status — (String)

            The status of the job execution.

            Possible values include:
            • "QUEUED"
            • "IN_PROGRESS"
            • "SUCCEEDED"
            • "FAILED"
            • "TIMED_OUT"
            • "REJECTED"
            • "REMOVED"
            • "CANCELED"
          • queuedAt — (Date)

            The time, in seconds since the epoch, when the job execution was queued.

          • startedAt — (Date)

            The time, in seconds since the epoch, when the job execution started.

          • lastUpdatedAt — (Date)

            The time, in seconds since the epoch, when the job execution was last updated.

          • executionNumber — (Integer)

            A string (consisting of the digits "0" through "9") which identifies this particular job execution on this particular device. It can be used later in commands which return or update job execution information.

      • nextToken — (String)

        The token for the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listJobExecutionsForThing(params = {}, callback) ⇒ AWS.Request

Lists the job executions for the specified thing.

Service Reference:

Examples:

Calling the listJobExecutionsForThing operation

var params = {
  thingName: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  status: QUEUED | IN_PROGRESS | SUCCEEDED | FAILED | TIMED_OUT | REJECTED | REMOVED | CANCELED
};
iot.listJobExecutionsForThing(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingName — (String)

      The thing name.

    • status — (String)

      An optional filter that lets you search for jobs that have the specified status.

      Possible values include:
      • "QUEUED"
      • "IN_PROGRESS"
      • "SUCCEEDED"
      • "FAILED"
      • "TIMED_OUT"
      • "REJECTED"
      • "REMOVED"
      • "CANCELED"
    • maxResults — (Integer)

      The maximum number of results to be returned per request.

    • nextToken — (String)

      The token to retrieve the next set of results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • executionSummaries — (Array<map>)

        A list of job execution summaries.

        • jobId — (String)

          The unique identifier you assigned to this job when it was created.

        • jobExecutionSummary — (map)

          Contains a subset of information about a job execution.

          • status — (String)

            The status of the job execution.

            Possible values include:
            • "QUEUED"
            • "IN_PROGRESS"
            • "SUCCEEDED"
            • "FAILED"
            • "TIMED_OUT"
            • "REJECTED"
            • "REMOVED"
            • "CANCELED"
          • queuedAt — (Date)

            The time, in seconds since the epoch, when the job execution was queued.

          • startedAt — (Date)

            The time, in seconds since the epoch, when the job execution started.

          • lastUpdatedAt — (Date)

            The time, in seconds since the epoch, when the job execution was last updated.

          • executionNumber — (Integer)

            A string (consisting of the digits "0" through "9") which identifies this particular job execution on this particular device. It can be used later in commands which return or update job execution information.

      • nextToken — (String)

        The token for the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listJobs(params = {}, callback) ⇒ AWS.Request

Lists jobs.

Service Reference:

Examples:

Calling the listJobs operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  status: IN_PROGRESS | CANCELED | COMPLETED | DELETION_IN_PROGRESS,
  targetSelection: CONTINUOUS | SNAPSHOT,
  thingGroupId: 'STRING_VALUE',
  thingGroupName: 'STRING_VALUE'
};
iot.listJobs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • status — (String)

      An optional filter that lets you search for jobs that have the specified status.

      Possible values include:
      • "IN_PROGRESS"
      • "CANCELED"
      • "COMPLETED"
      • "DELETION_IN_PROGRESS"
    • targetSelection — (String)

      Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a thing when the thing is added to a target group, even after the job was completed by all things originally in the group.

      Possible values include:
      • "CONTINUOUS"
      • "SNAPSHOT"
    • maxResults — (Integer)

      The maximum number of results to return per request.

    • nextToken — (String)

      The token to retrieve the next set of results.

    • thingGroupName — (String)

      A filter that limits the returned jobs to those for the specified group.

    • thingGroupId — (String)

      A filter that limits the returned jobs to those for the specified group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • jobs — (Array<map>)

        A list of jobs.

        • jobArn — (String)

          The job ARN.

        • jobId — (String)

          The unique identifier you assigned to this job when it was created.

        • thingGroupId — (String)

          The ID of the thing group.

        • targetSelection — (String)

          Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a thing when the thing is added to a target group, even after the job was completed by all things originally in the group.

          Possible values include:
          • "CONTINUOUS"
          • "SNAPSHOT"
        • status — (String)

          The job summary status.

          Possible values include:
          • "IN_PROGRESS"
          • "CANCELED"
          • "COMPLETED"
          • "DELETION_IN_PROGRESS"
        • createdAt — (Date)

          The time, in seconds since the epoch, when the job was created.

        • lastUpdatedAt — (Date)

          The time, in seconds since the epoch, when the job was last updated.

        • completedAt — (Date)

          The time, in seconds since the epoch, when the job completed.

      • nextToken — (String)

        The token for the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listOTAUpdates(params = {}, callback) ⇒ AWS.Request

Lists OTA updates.

Service Reference:

Examples:

Calling the listOTAUpdates operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  otaUpdateStatus: CREATE_PENDING | CREATE_IN_PROGRESS | CREATE_COMPLETE | CREATE_FAILED
};
iot.listOTAUpdates(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • maxResults — (Integer)

      The maximum number of results to return at one time.

    • nextToken — (String)

      A token used to retrieve the next set of results.

    • otaUpdateStatus — (String)

      The OTA update job status.

      Possible values include:
      • "CREATE_PENDING"
      • "CREATE_IN_PROGRESS"
      • "CREATE_COMPLETE"
      • "CREATE_FAILED"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • otaUpdates — (Array<map>)

        A list of OTA update jobs.

        • otaUpdateId — (String)

          The OTA update ID.

        • otaUpdateArn — (String)

          The OTA update ARN.

        • creationDate — (Date)

          The date when the OTA update was created.

      • nextToken — (String)

        A token to use to get the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listOutgoingCertificates(params = {}, callback) ⇒ AWS.Request

Lists certificates that are being transferred but not yet accepted.

Service Reference:

Examples:

Calling the listOutgoingCertificates operation

var params = {
  ascendingOrder: true || false,
  marker: 'STRING_VALUE',
  pageSize: 'NUMBER_VALUE'
};
iot.listOutgoingCertificates(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • pageSize — (Integer)

      The result page size.

    • marker — (String)

      The marker for the next set of results.

    • ascendingOrder — (Boolean)

      Specifies the order for results. If True, the results are returned in ascending order, based on the creation date.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • outgoingCertificates — (Array<map>)

        The certificates that are being transferred but not yet accepted.

        • certificateArn — (String)

          The certificate ARN.

        • certificateId — (String)

          The certificate ID.

        • transferredTo — (String)

          The AWS account to which the transfer was made.

        • transferDate — (Date)

          The date the transfer was initiated.

        • transferMessage — (String)

          The transfer message.

        • creationDate — (Date)

          The certificate creation date.

      • nextMarker — (String)

        The marker for the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPolicies(params = {}, callback) ⇒ AWS.Request

Lists your policies.

Service Reference:

Examples:

Calling the listPolicies operation

var params = {
  ascendingOrder: true || false,
  marker: 'STRING_VALUE',
  pageSize: 'NUMBER_VALUE'
};
iot.listPolicies(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • marker — (String)

      The marker for the next set of results.

    • pageSize — (Integer)

      The result page size.

    • ascendingOrder — (Boolean)

      Specifies the order for results. If true, the results are returned in ascending creation order.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • policies — (Array<map>)

        The descriptions of the policies.

        • policyName — (String)

          The policy name.

        • policyArn — (String)

          The policy ARN.

      • nextMarker — (String)

        The marker for the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPolicyPrincipals(params = {}, callback) ⇒ AWS.Request

Lists the principals associated with the specified policy.

Note: This API is deprecated. Please use ListTargetsForPolicy instead.

Service Reference:

Examples:

Calling the listPolicyPrincipals operation

var params = {
  policyName: 'STRING_VALUE', /* required */
  ascendingOrder: true || false,
  marker: 'STRING_VALUE',
  pageSize: 'NUMBER_VALUE'
};
iot.listPolicyPrincipals(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • policyName — (String)

      The policy name.

    • marker — (String)

      The marker for the next set of results.

    • pageSize — (Integer)

      The result page size.

    • ascendingOrder — (Boolean)

      Specifies the order for results. If true, the results are returned in ascending creation order.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • principals — (Array<String>)

        The descriptions of the principals.

      • nextMarker — (String)

        The marker for the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPolicyVersions(params = {}, callback) ⇒ AWS.Request

Lists the versions of the specified policy and identifies the default version.

Service Reference:

Examples:

Calling the listPolicyVersions operation

var params = {
  policyName: 'STRING_VALUE' /* required */
};
iot.listPolicyVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • policyName — (String)

      The policy name.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • policyVersions — (Array<map>)

        The policy versions.

        • versionId — (String)

          The policy version ID.

        • isDefaultVersion — (Boolean)

          Specifies whether the policy version is the default.

        • createDate — (Date)

          The date and time the policy was created.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPrincipalPolicies(params = {}, callback) ⇒ AWS.Request

Lists the policies attached to the specified principal. If you use an Cognito identity, the ID must be in AmazonCognito Identity format.

Note: This API is deprecated. Please use ListAttachedPolicies instead.

Service Reference:

Examples:

Calling the listPrincipalPolicies operation

var params = {
  principal: 'STRING_VALUE', /* required */
  ascendingOrder: true || false,
  marker: 'STRING_VALUE',
  pageSize: 'NUMBER_VALUE'
};
iot.listPrincipalPolicies(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • principal — (String)

      The principal.

    • marker — (String)

      The marker for the next set of results.

    • pageSize — (Integer)

      The result page size.

    • ascendingOrder — (Boolean)

      Specifies the order for results. If true, results are returned in ascending creation order.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • policies — (Array<map>)

        The policies.

        • policyName — (String)

          The policy name.

        • policyArn — (String)

          The policy ARN.

      • nextMarker — (String)

        The marker for the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPrincipalThings(params = {}, callback) ⇒ AWS.Request

Lists the things associated with the specified principal. A principal can be X.509 certificates, IAM users, groups, and roles, Amazon Cognito identities or federated identities.

Service Reference:

Examples:

Calling the listPrincipalThings operation

var params = {
  principal: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iot.listPrincipalThings(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

      The token to retrieve the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return in this operation.

    • principal — (String)

      The principal.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • things — (Array<String>)

        The things.

      • nextToken — (String)

        The token used to get the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listRoleAliases(params = {}, callback) ⇒ AWS.Request

Lists the role aliases registered in your account.

Service Reference:

Examples:

Calling the listRoleAliases operation

var params = {
  ascendingOrder: true || false,
  marker: 'STRING_VALUE',
  pageSize: 'NUMBER_VALUE'
};
iot.listRoleAliases(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • pageSize — (Integer)

      The maximum number of results to return at one time.

    • marker — (String)

      A marker used to get the next set of results.

    • ascendingOrder — (Boolean)

      Return the list of role aliases in ascending alphabetical order.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • roleAliases — (Array<String>)

        The role aliases.

      • nextMarker — (String)

        A marker used to get the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listScheduledAudits(params = {}, callback) ⇒ AWS.Request

Lists all of your scheduled audits.

Service Reference:

Examples:

Calling the listScheduledAudits operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iot.listScheduledAudits(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

      The token for the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return at one time. The default is 25.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • scheduledAudits — (Array<map>)

        The list of scheduled audits.

        • scheduledAuditName — (String)

          The name of the scheduled audit.

        • scheduledAuditArn — (String)

          The ARN of the scheduled audit.

        • frequency — (String)

          How often the scheduled audit takes place.

          Possible values include:
          • "DAILY"
          • "WEEKLY"
          • "BIWEEKLY"
          • "MONTHLY"
        • dayOfMonth — (String)

          The day of the month on which the scheduled audit is run (if the frequency is "MONTHLY"). If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.

        • dayOfWeek — (String)

          The day of the week on which the scheduled audit is run (if the frequency is "WEEKLY" or "BIWEEKLY").

          Possible values include:
          • "SUN"
          • "MON"
          • "TUE"
          • "WED"
          • "THU"
          • "FRI"
          • "SAT"
      • nextToken — (String)

        A token that can be used to retrieve the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listSecurityProfiles(params = {}, callback) ⇒ AWS.Request

Lists the Device Defender security profiles you have created. You can use filters to list only those security profiles associated with a thing group or only those associated with your account.

Service Reference:

Examples:

Calling the listSecurityProfiles operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iot.listSecurityProfiles(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

      The token for the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return at one time.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • securityProfileIdentifiers — (Array<map>)

        A list of security profile identifiers (names and ARNs).

        • namerequired — (String)

          The name you have given to the security profile.

        • arnrequired — (String)

          The ARN of the security profile.

      • nextToken — (String)

        A token that can be used to retrieve the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listSecurityProfilesForTarget(params = {}, callback) ⇒ AWS.Request

Lists the Device Defender security profiles attached to a target (thing group).

Service Reference:

Examples:

Calling the listSecurityProfilesForTarget operation

var params = {
  securityProfileTargetArn: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  recursive: true || false
};
iot.listSecurityProfilesForTarget(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

      The token for the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return at one time.

    • recursive — (Boolean)

      If true, return child groups as well.

    • securityProfileTargetArn — (String)

      The ARN of the target (thing group) whose attached security profiles you want to get.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • securityProfileTargetMappings — (Array<map>)

        A list of security profiles and their associated targets.

        • securityProfileIdentifier — (map)

          Information that identifies the security profile.

          • namerequired — (String)

            The name you have given to the security profile.

          • arnrequired — (String)

            The ARN of the security profile.

        • target — (map)

          Information about the target (thing group) associated with the security profile.

          • arnrequired — (String)

            The ARN of the security profile.

      • nextToken — (String)

        A token that can be used to retrieve the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listStreams(params = {}, callback) ⇒ AWS.Request

Lists all of the streams in your AWS account.

Service Reference:

Examples:

Calling the listStreams operation

var params = {
  ascendingOrder: true || false,
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iot.listStreams(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • maxResults — (Integer)

      The maximum number of results to return at a time.

    • nextToken — (String)

      A token used to get the next set of results.

    • ascendingOrder — (Boolean)

      Set to true to return the list of streams in ascending order.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • streams — (Array<map>)

        A list of streams.

        • streamId — (String)

          The stream ID.

        • streamArn — (String)

          The stream ARN.

        • streamVersion — (Integer)

          The stream version.

        • description — (String)

          A description of the stream.

      • nextToken — (String)

        A token used to get the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

Lists the tags (metadata) you have assigned to the resource.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  nextToken: 'STRING_VALUE'
};
iot.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The ARN of the resource.

    • nextToken — (String)

      The token to retrieve the next set of results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • tags — (Array<map>)

        The list of tags assigned to the resource.

        • Key — (String)

          The tag's key.

        • Value — (String)

          The tag's value.

      • nextToken — (String)

        The token used to get the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTargetsForPolicy(params = {}, callback) ⇒ AWS.Request

List targets for the specified policy.

Service Reference:

Examples:

Calling the listTargetsForPolicy operation

var params = {
  policyName: 'STRING_VALUE', /* required */
  marker: 'STRING_VALUE',
  pageSize: 'NUMBER_VALUE'
};
iot.listTargetsForPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • policyName — (String)

      The policy name.

    • marker — (String)

      A marker used to get the next set of results.

    • pageSize — (Integer)

      The maximum number of results to return at one time.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • targets — (Array<String>)

        The policy targets.

      • nextMarker — (String)

        A marker used to get the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTargetsForSecurityProfile(params = {}, callback) ⇒ AWS.Request

Lists the targets (thing groups) associated with a given Device Defender security profile.

Service Reference:

Examples:

Calling the listTargetsForSecurityProfile operation

var params = {
  securityProfileName: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iot.listTargetsForSecurityProfile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • securityProfileName — (String)

      The security profile.

    • nextToken — (String)

      The token for the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return at one time.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • securityProfileTargets — (Array<map>)

        The thing groups to which the security profile is attached.

        • arnrequired — (String)

          The ARN of the security profile.

      • nextToken — (String)

        A token that can be used to retrieve the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listThingGroups(params = {}, callback) ⇒ AWS.Request

List the thing groups in your account.

Service Reference:

Examples:

Calling the listThingGroups operation

var params = {
  maxResults: 'NUMBER_VALUE',
  namePrefixFilter: 'STRING_VALUE',
  nextToken: 'STRING_VALUE',
  parentGroup: 'STRING_VALUE',
  recursive: true || false
};
iot.listThingGroups(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

      The token to retrieve the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return at one time.

    • parentGroup — (String)

      A filter that limits the results to those with the specified parent group.

    • namePrefixFilter — (String)

      A filter that limits the results to those with the specified name prefix.

    • recursive — (Boolean)

      If true, return child groups as well.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • thingGroups — (Array<map>)

        The thing groups.

        • groupName — (String)

          The group name.

        • groupArn — (String)

          The group ARN.

      • nextToken — (String)

        The token used to get the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listThingGroupsForThing(params = {}, callback) ⇒ AWS.Request

List the thing groups to which the specified thing belongs.

Service Reference:

Examples:

Calling the listThingGroupsForThing operation

var params = {
  thingName: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iot.listThingGroupsForThing(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingName — (String)

      The thing name.

    • nextToken — (String)

      The token to retrieve the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return at one time.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • thingGroups — (Array<map>)

        The thing groups.

        • groupName — (String)

          The group name.

        • groupArn — (String)

          The group ARN.

      • nextToken — (String)

        The token used to get the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listThingPrincipals(params = {}, callback) ⇒ AWS.Request

Lists the principals associated with the specified thing. A principal can be X.509 certificates, IAM users, groups, and roles, Amazon Cognito identities or federated identities.

Service Reference:

Examples:

Calling the listThingPrincipals operation

var params = {
  thingName: 'STRING_VALUE' /* required */
};
iot.listThingPrincipals(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingName — (String)

      The name of the thing.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • principals — (Array<String>)

        The principals associated with the thing.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listThingRegistrationTaskReports(params = {}, callback) ⇒ AWS.Request

Information about the thing registration tasks.

Examples:

Calling the listThingRegistrationTaskReports operation

var params = {
  reportType: ERRORS | RESULTS, /* required */
  taskId: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iot.listThingRegistrationTaskReports(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • taskId — (String)

      The id of the task.

    • reportType — (String)

      The type of task report.

      Possible values include:
      • "ERRORS"
      • "RESULTS"
    • nextToken — (String)

      The token to retrieve the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return per request.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • resourceLinks — (Array<String>)

        Links to the task resources.

      • reportType — (String)

        The type of task report.

        Possible values include:
        • "ERRORS"
        • "RESULTS"
      • nextToken — (String)

        The token used to get the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listThingRegistrationTasks(params = {}, callback) ⇒ AWS.Request

List bulk thing provisioning tasks.

Service Reference:

Examples:

Calling the listThingRegistrationTasks operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  status: InProgress | Completed | Failed | Cancelled | Cancelling
};
iot.listThingRegistrationTasks(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

      The token to retrieve the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return at one time.

    • status — (String)

      The status of the bulk thing provisioning task.

      Possible values include:
      • "InProgress"
      • "Completed"
      • "Failed"
      • "Cancelled"
      • "Cancelling"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • taskIds — (Array<String>)

        A list of bulk thing provisioning task IDs.

      • nextToken — (String)

        The token used to get the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listThings(params = {}, callback) ⇒ AWS.Request

Lists your things. Use the attributeName and attributeValue parameters to filter your things. For example, calling ListThings with attributeName=Color and attributeValue=Red retrieves all things in the registry that contain an attribute Color with the value Red.

Service Reference:

Examples:

Calling the listThings operation

var params = {
  attributeName: 'STRING_VALUE',
  attributeValue: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  thingTypeName: 'STRING_VALUE'
};
iot.listThings(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

      The token to retrieve the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return in this operation.

    • attributeName — (String)

      The attribute name used to search for things.

    • attributeValue — (String)

      The attribute value used to search for things.

    • thingTypeName — (String)

      The name of the thing type used to search for things.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • things — (Array<map>)

        The things.

        • thingName — (String)

          The name of the thing.

        • thingTypeName — (String)

          The name of the thing type, if the thing has been associated with a type.

        • thingArn — (String)

          The thing ARN.

        • attributes — (map<String>)

          A list of thing attributes which are name-value pairs.

        • version — (Integer)

          The version of the thing record in the registry.

      • nextToken — (String)

        The token used to get the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listThingsInBillingGroup(params = {}, callback) ⇒ AWS.Request

Lists the things you have added to the given billing group.

Service Reference:

Examples:

Calling the listThingsInBillingGroup operation

var params = {
  billingGroupName: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iot.listThingsInBillingGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • billingGroupName — (String)

      The name of the billing group.

    • nextToken — (String)

      The token to retrieve the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return per request.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • things — (Array<String>)

        A list of things in the billing group.

      • nextToken — (String)

        The token used to get the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listThingsInThingGroup(params = {}, callback) ⇒ AWS.Request

Lists the things in the specified group.

Service Reference:

Examples:

Calling the listThingsInThingGroup operation

var params = {
  thingGroupName: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  recursive: true || false
};
iot.listThingsInThingGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingGroupName — (String)

      The thing group name.

    • recursive — (Boolean)

      When true, list things in this thing group and in all child groups as well.

    • nextToken — (String)

      The token to retrieve the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return at one time.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • things — (Array<String>)

        The things in the specified thing group.

      • nextToken — (String)

        The token used to get the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listThingTypes(params = {}, callback) ⇒ AWS.Request

Lists the existing thing types.

Service Reference:

Examples:

Calling the listThingTypes operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  thingTypeName: 'STRING_VALUE'
};
iot.listThingTypes(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

      The token to retrieve the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return in this operation.

    • thingTypeName — (String)

      The name of the thing type.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • thingTypes — (Array<map>)

        The thing types.

        • thingTypeName — (String)

          The name of the thing type.

        • thingTypeArn — (String)

          The thing type ARN.

        • thingTypeProperties — (map)

          The ThingTypeProperties for the thing type.

          • thingTypeDescription — (String)

            The description of the thing type.

          • searchableAttributes — (Array<String>)

            A list of searchable thing attribute names.

        • thingTypeMetadata — (map)

          The ThingTypeMetadata contains additional information about the thing type including: creation date and time, a value indicating whether the thing type is deprecated, and a date and time when it was deprecated.

          • deprecated — (Boolean)

            Whether the thing type is deprecated. If true, no new things could be associated with this type.

          • deprecationDate — (Date)

            The date and time when the thing type was deprecated.

          • creationDate — (Date)

            The date and time when the thing type was created.

      • nextToken — (String)

        The token for the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTopicRules(params = {}, callback) ⇒ AWS.Request

Lists the rules for the specific topic.

Service Reference:

Examples:

Calling the listTopicRules operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  ruleDisabled: true || false,
  topic: 'STRING_VALUE'
};
iot.listTopicRules(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • topic — (String)

      The topic.

    • maxResults — (Integer)

      The maximum number of results to return.

    • nextToken — (String)

      A token used to retrieve the next value.

    • ruleDisabled — (Boolean)

      Specifies whether the rule is disabled.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • rules — (Array<map>)

        The rules.

        • ruleArn — (String)

          The rule ARN.

        • ruleName — (String)

          The name of the rule.

        • topicPattern — (String)

          The pattern for the topic names that apply.

        • createdAt — (Date)

          The date and time the rule was created.

        • ruleDisabled — (Boolean)

          Specifies whether the rule is disabled.

      • nextToken — (String)

        A token used to retrieve the next value.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listV2LoggingLevels(params = {}, callback) ⇒ AWS.Request

Lists logging levels.

Service Reference:

Examples:

Calling the listV2LoggingLevels operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  targetType: DEFAULT | THING_GROUP
};
iot.listV2LoggingLevels(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • targetType — (String)

      The type of resource for which you are configuring logging. Must be THING_Group.

      Possible values include:
      • "DEFAULT"
      • "THING_GROUP"
    • nextToken — (String)

      The token used to get the next set of results, or null if there are no additional results.

    • maxResults — (Integer)

      The maximum number of results to return at one time.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • logTargetConfigurations — (Array<map>)

        The logging configuration for a target.

        • logTarget — (map)

          A log target

          • targetTyperequired — (String)

            The target type.

            Possible values include:
            • "DEFAULT"
            • "THING_GROUP"
          • targetName — (String)

            The target name.

        • logLevel — (String)

          The logging level.

          Possible values include:
          • "DEBUG"
          • "INFO"
          • "ERROR"
          • "WARN"
          • "DISABLED"
      • nextToken — (String)

        The token used to get the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listViolationEvents(params = {}, callback) ⇒ AWS.Request

Lists the Device Defender security profile violations discovered during the given time period. You can use filters to limit the results to those alerts issued for a particular security profile, behavior or thing (device).

Service Reference:

Examples:

Calling the listViolationEvents operation

var params = {
  endTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  startTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  securityProfileName: 'STRING_VALUE',
  thingName: 'STRING_VALUE'
};
iot.listViolationEvents(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • startTime — (Date)

      The start time for the alerts to be listed.

    • endTime — (Date)

      The end time for the alerts to be listed.

    • thingName — (String)

      A filter to limit results to those alerts caused by the specified thing.

    • securityProfileName — (String)

      A filter to limit results to those alerts generated by the specified security profile.

    • nextToken — (String)

      The token for the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return at one time.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • violationEvents — (Array<map>)

        The security profile violation alerts issued for this account during the given time frame, potentially filtered by security profile, behavior violated, or thing (device) violating.

        • violationId — (String)

          The ID of the violation event.

        • thingName — (String)

          The name of the thing responsible for the violation event.

        • securityProfileName — (String)

          The name of the security profile whose behavior was violated.

        • behavior — (map)

          The behavior which was violated.

          • namerequired — (String)

            The name you have given to the behavior.

          • metric — (String)

            What is measured by the behavior.

          • criteria — (map)

            The criteria that determine if a device is behaving normally in regard to the metric.

            • comparisonOperator — (String)

              The operator that relates the thing measured (metric) to the criteria (containing a value or statisticalThreshold).

              Possible values include:
              • "less-than"
              • "less-than-equals"
              • "greater-than"
              • "greater-than-equals"
              • "in-cidr-set"
              • "not-in-cidr-set"
              • "in-port-set"
              • "not-in-port-set"
            • value — (map)

              The value to be compared with the metric.

              • count — (Integer)

                If the comparisonOperator calls for a numeric value, use this to specify that numeric value to be compared with the metric.

              • cidrs — (Array<String>)

                If the comparisonOperator calls for a set of CIDRs, use this to specify that set to be compared with the metric.

              • ports — (Array<Integer>)

                If the comparisonOperator calls for a set of ports, use this to specify that set to be compared with the metric.

            • durationSeconds — (Integer)

              Use this to specify the time duration over which the behavior is evaluated, for those criteria which have a time dimension (for example, NUM_MESSAGES_SENT). For a statisticalThreshhold metric comparison, measurements from all devices are accumulated over this time duration before being used to calculate percentiles, and later, measurements from an individual device are also accumulated over this time duration before being given a percentile rank.

            • consecutiveDatapointsToAlarm — (Integer)

              If a device is in violation of the behavior for the specified number of consecutive datapoints, an alarm occurs. If not specified, the default is 1.

            • consecutiveDatapointsToClear — (Integer)

              If an alarm has occurred and the offending device is no longer in violation of the behavior for the specified number of consecutive datapoints, the alarm is cleared. If not specified, the default is 1.

            • statisticalThreshold — (map)

              A statistical ranking (percentile) which indicates a threshold value by which a behavior is determined to be in compliance or in violation of the behavior.

              • statistic — (String)

                The percentile which resolves to a threshold value by which compliance with a behavior is determined. Metrics are collected over the specified period (durationSeconds) from all reporting devices in your account and statistical ranks are calculated. Then, the measurements from a device are collected over the same period. If the accumulated measurements from the device fall above or below (comparisonOperator) the value associated with the percentile specified, then the device is considered to be in compliance with the behavior, otherwise a violation occurs.

        • metricValue — (map)

          The value of the metric (the measurement).

          • count — (Integer)

            If the comparisonOperator calls for a numeric value, use this to specify that numeric value to be compared with the metric.

          • cidrs — (Array<String>)

            If the comparisonOperator calls for a set of CIDRs, use this to specify that set to be compared with the metric.

          • ports — (Array<Integer>)

            If the comparisonOperator calls for a set of ports, use this to specify that set to be compared with the metric.

        • violationEventType — (String)

          The type of violation event.

          Possible values include:
          • "in-alarm"
          • "alarm-cleared"
          • "alarm-invalidated"
        • violationEventTime — (Date)

          The time the violation event occurred.

      • nextToken — (String)

        A token that can be used to retrieve the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

registerCACertificate(params = {}, callback) ⇒ AWS.Request

Registers a CA certificate with AWS IoT. This CA certificate can then be used to sign device certificates, which can be then registered with AWS IoT. You can register up to 10 CA certificates per AWS account that have the same subject field. This enables you to have up to 10 certificate authorities sign your device certificates. If you have more than one CA certificate registered, make sure you pass the CA certificate when you register your device certificates with the RegisterCertificate API.

Service Reference:

Examples:

Calling the registerCACertificate operation

var params = {
  caCertificate: 'STRING_VALUE', /* required */
  verificationCertificate: 'STRING_VALUE', /* required */
  allowAutoRegistration: true || false,
  registrationConfig: {
    roleArn: 'STRING_VALUE',
    templateBody: 'STRING_VALUE'
  },
  setAsActive: true || false
};
iot.registerCACertificate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • caCertificate — (String)

      The CA certificate.

    • verificationCertificate — (String)

      The private key verification certificate.

    • setAsActive — (Boolean)

      A boolean value that specifies if the CA certificate is set to active.

    • allowAutoRegistration — (Boolean)

      Allows this CA certificate to be used for auto registration of device certificates.

    • registrationConfig — (map)

      Information about the registration configuration.

      • templateBody — (String)

        The template body.

      • roleArn — (String)

        The ARN of the role.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • certificateArn — (String)

        The CA certificate ARN.

      • certificateId — (String)

        The CA certificate identifier.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

registerCertificate(params = {}, callback) ⇒ AWS.Request

Registers a device certificate with AWS IoT. If you have more than one CA certificate that has the same subject field, you must specify the CA certificate that was used to sign the device certificate being registered.

Service Reference:

Examples:

Calling the registerCertificate operation

var params = {
  certificatePem: 'STRING_VALUE', /* required */
  caCertificatePem: 'STRING_VALUE',
  setAsActive: true || false,
  status: ACTIVE | INACTIVE | REVOKED | PENDING_TRANSFER | REGISTER_INACTIVE | PENDING_ACTIVATION
};
iot.registerCertificate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • certificatePem — (String)

      The certificate data, in PEM format.

    • caCertificatePem — (String)

      The CA certificate used to sign the device certificate being registered.

    • setAsActive — (Boolean)

      A boolean value that specifies if the certificate is set to active.

    • status — (String)

      The status of the register certificate request.

      Possible values include:
      • "ACTIVE"
      • "INACTIVE"
      • "REVOKED"
      • "PENDING_TRANSFER"
      • "REGISTER_INACTIVE"
      • "PENDING_ACTIVATION"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • certificateArn — (String)

        The certificate ARN.

      • certificateId — (String)

        The certificate identifier.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

registerThing(params = {}, callback) ⇒ AWS.Request

Provisions a thing.

Service Reference:

Examples:

Calling the registerThing operation

var params = {
  templateBody: 'STRING_VALUE', /* required */
  parameters: {
    '<Parameter>': 'STRING_VALUE',
    /* '<Parameter>': ... */
  }
};
iot.registerThing(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • certificatePem — (String)

        .

      • resourceArns — (map<String>)

        ARNs for the generated resources.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

rejectCertificateTransfer(params = {}, callback) ⇒ AWS.Request

Rejects a pending certificate transfer. After AWS IoT rejects a certificate transfer, the certificate status changes from PENDING_TRANSFER to INACTIVE.

To check for pending certificate transfers, call ListCertificates to enumerate your certificates.

This operation can only be called by the transfer destination. After it is called, the certificate will be returned to the source's account in the INACTIVE state.

Service Reference:

Examples:

Calling the rejectCertificateTransfer operation

var params = {
  certificateId: 'STRING_VALUE', /* required */
  rejectReason: 'STRING_VALUE'
};
iot.rejectCertificateTransfer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • certificateId — (String)

      The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

    • rejectReason — (String)

      The reason the certificate transfer was rejected.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

removeThingFromBillingGroup(params = {}, callback) ⇒ AWS.Request

Removes the given thing from the billing group.

Service Reference:

Examples:

Calling the removeThingFromBillingGroup operation

var params = {
  billingGroupArn: 'STRING_VALUE',
  billingGroupName: 'STRING_VALUE',
  thingArn: 'STRING_VALUE',
  thingName: 'STRING_VALUE'
};
iot.removeThingFromBillingGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • billingGroupName — (String)

      The name of the billing group.

    • billingGroupArn — (String)

      The ARN of the billing group.

    • thingName — (String)

      The name of the thing to be removed from the billing group.

    • thingArn — (String)

      The ARN of the thing to be removed from the billing group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

removeThingFromThingGroup(params = {}, callback) ⇒ AWS.Request

Remove the specified thing from the specified group.

Service Reference:

Examples:

Calling the removeThingFromThingGroup operation

var params = {
  thingArn: 'STRING_VALUE',
  thingGroupArn: 'STRING_VALUE',
  thingGroupName: 'STRING_VALUE',
  thingName: 'STRING_VALUE'
};
iot.removeThingFromThingGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingGroupName — (String)

      The group name.

    • thingGroupArn — (String)

      The group ARN.

    • thingName — (String)

      The name of the thing to remove from the group.

    • thingArn — (String)

      The ARN of the thing to remove from the group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

replaceTopicRule(params = {}, callback) ⇒ AWS.Request

Replaces the rule. You must specify all parameters for the new rule. Creating rules is an administrator-level action. Any user who has permission to create rules will be able to access data processed by the rule.

Service Reference:

Examples:

Calling the replaceTopicRule operation

var params = {
  ruleName: 'STRING_VALUE', /* required */
  topicRulePayload: { /* required */
    actions: [ /* required */
      {
        cloudwatchAlarm: {
          alarmName: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          stateReason: 'STRING_VALUE', /* required */
          stateValue: 'STRING_VALUE' /* required */
        },
        cloudwatchMetric: {
          metricName: 'STRING_VALUE', /* required */
          metricNamespace: 'STRING_VALUE', /* required */
          metricUnit: 'STRING_VALUE', /* required */
          metricValue: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          metricTimestamp: 'STRING_VALUE'
        },
        dynamoDB: {
          hashKeyField: 'STRING_VALUE', /* required */
          hashKeyValue: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          tableName: 'STRING_VALUE', /* required */
          hashKeyType: STRING | NUMBER,
          operation: 'STRING_VALUE',
          payloadField: 'STRING_VALUE',
          rangeKeyField: 'STRING_VALUE',
          rangeKeyType: STRING | NUMBER,
          rangeKeyValue: 'STRING_VALUE'
        },
        dynamoDBv2: {
          putItem: { /* required */
            tableName: 'STRING_VALUE' /* required */
          },
          roleArn: 'STRING_VALUE' /* required */
        },
        elasticsearch: {
          endpoint: 'STRING_VALUE', /* required */
          id: 'STRING_VALUE', /* required */
          index: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          type: 'STRING_VALUE' /* required */
        },
        firehose: {
          deliveryStreamName: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          separator: 'STRING_VALUE'
        },
        iotAnalytics: {
          channelArn: 'STRING_VALUE',
          channelName: 'STRING_VALUE',
          roleArn: 'STRING_VALUE'
        },
        iotEvents: {
          inputName: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          messageId: 'STRING_VALUE'
        },
        kinesis: {
          roleArn: 'STRING_VALUE', /* required */
          streamName: 'STRING_VALUE', /* required */
          partitionKey: 'STRING_VALUE'
        },
        lambda: {
          functionArn: 'STRING_VALUE' /* required */
        },
        republish: {
          roleArn: 'STRING_VALUE', /* required */
          topic: 'STRING_VALUE' /* required */
        },
        s3: {
          bucketName: 'STRING_VALUE', /* required */
          key: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          cannedAcl: private | public-read | public-read-write | aws-exec-read | authenticated-read | bucket-owner-read | bucket-owner-full-control | log-delivery-write
        },
        salesforce: {
          token: 'STRING_VALUE', /* required */
          url: 'STRING_VALUE' /* required */
        },
        sns: {
          roleArn: 'STRING_VALUE', /* required */
          targetArn: 'STRING_VALUE', /* required */
          messageFormat: RAW | JSON
        },
        sqs: {
          queueUrl: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          useBase64: true || false
        },
        stepFunctions: {
          roleArn: 'STRING_VALUE', /* required */
          stateMachineName: 'STRING_VALUE', /* required */
          executionNamePrefix: 'STRING_VALUE'
        }
      },
      /* more items */
    ],
    sql: 'STRING_VALUE', /* required */
    awsIotSqlVersion: 'STRING_VALUE',
    description: 'STRING_VALUE',
    errorAction: {
      cloudwatchAlarm: {
        alarmName: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        stateReason: 'STRING_VALUE', /* required */
        stateValue: 'STRING_VALUE' /* required */
      },
      cloudwatchMetric: {
        metricName: 'STRING_VALUE', /* required */
        metricNamespace: 'STRING_VALUE', /* required */
        metricUnit: 'STRING_VALUE', /* required */
        metricValue: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        metricTimestamp: 'STRING_VALUE'
      },
      dynamoDB: {
        hashKeyField: 'STRING_VALUE', /* required */
        hashKeyValue: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        tableName: 'STRING_VALUE', /* required */
        hashKeyType: STRING | NUMBER,
        operation: 'STRING_VALUE',
        payloadField: 'STRING_VALUE',
        rangeKeyField: 'STRING_VALUE',
        rangeKeyType: STRING | NUMBER,
        rangeKeyValue: 'STRING_VALUE'
      },
      dynamoDBv2: {
        putItem: { /* required */
          tableName: 'STRING_VALUE' /* required */
        },
        roleArn: 'STRING_VALUE' /* required */
      },
      elasticsearch: {
        endpoint: 'STRING_VALUE', /* required */
        id: 'STRING_VALUE', /* required */
        index: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        type: 'STRING_VALUE' /* required */
      },
      firehose: {
        deliveryStreamName: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        separator: 'STRING_VALUE'
      },
      iotAnalytics: {
        channelArn: 'STRING_VALUE',
        channelName: 'STRING_VALUE',
        roleArn: 'STRING_VALUE'
      },
      iotEvents: {
        inputName: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        messageId: 'STRING_VALUE'
      },
      kinesis: {
        roleArn: 'STRING_VALUE', /* required */
        streamName: 'STRING_VALUE', /* required */
        partitionKey: 'STRING_VALUE'
      },
      lambda: {
        functionArn: 'STRING_VALUE' /* required */
      },
      republish: {
        roleArn: 'STRING_VALUE', /* required */
        topic: 'STRING_VALUE' /* required */
      },
      s3: {
        bucketName: 'STRING_VALUE', /* required */
        key: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        cannedAcl: private | public-read | public-read-write | aws-exec-read | authenticated-read | bucket-owner-read | bucket-owner-full-control | log-delivery-write
      },
      salesforce: {
        token: 'STRING_VALUE', /* required */
        url: 'STRING_VALUE' /* required */
      },
      sns: {
        roleArn: 'STRING_VALUE', /* required */
        targetArn: 'STRING_VALUE', /* required */
        messageFormat: RAW | JSON
      },
      sqs: {
        queueUrl: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        useBase64: true || false
      },
      stepFunctions: {
        roleArn: 'STRING_VALUE', /* required */
        stateMachineName: 'STRING_VALUE', /* required */
        executionNamePrefix: 'STRING_VALUE'
      }
    },
    ruleDisabled: true || false
  }
};
iot.replaceTopicRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ruleName — (String)

      The name of the rule.

    • topicRulePayload — (map)

      The rule payload.

      • sqlrequired — (String)

        The SQL statement used to query the topic. For more information, see AWS IoT SQL Reference in the AWS IoT Developer Guide.

      • description — (String)

        The description of the rule.

      • actionsrequired — (Array<map>)

        The actions associated with the rule.

        • dynamoDB — (map)

          Write to a DynamoDB table.

          • tableNamerequired — (String)

            The name of the DynamoDB table.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access to the DynamoDB table.

          • operation — (String)

            The type of operation to be performed. This follows the substitution template, so it can be ${operation}, but the substitution must result in one of the following: INSERT, UPDATE, or DELETE.

          • hashKeyFieldrequired — (String)

            The hash key name.

          • hashKeyValuerequired — (String)

            The hash key value.

          • hashKeyType — (String)

            The hash key type. Valid values are "STRING" or "NUMBER"

            Possible values include:
            • "STRING"
            • "NUMBER"
          • rangeKeyField — (String)

            The range key name.

          • rangeKeyValue — (String)

            The range key value.

          • rangeKeyType — (String)

            The range key type. Valid values are "STRING" or "NUMBER"

            Possible values include:
            • "STRING"
            • "NUMBER"
          • payloadField — (String)

            The action payload. This name can be customized.

        • dynamoDBv2 — (map)

          Write to a DynamoDB table. This is a new version of the DynamoDB action. It allows you to write each attribute in an MQTT message payload into a separate DynamoDB column.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access to the DynamoDB table.

          • putItemrequired — (map)

            Specifies the DynamoDB table to which the message data will be written. For example:

            { "dynamoDBv2": { "roleArn": "aws:iam:12341251:my-role" "putItem": { "tableName": "my-table" } } }

            Each attribute in the message payload will be written to a separate column in the DynamoDB database.

            • tableNamerequired — (String)

              The table where the message data will be written

        • lambda — (map)

          Invoke a Lambda function.

          • functionArnrequired — (String)

            The ARN of the Lambda function.

        • sns — (map)

          Publish to an Amazon SNS topic.

          • targetArnrequired — (String)

            The ARN of the SNS topic.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • messageFormat — (String)

            (Optional) The message format of the message to publish. Accepted values are "JSON" and "RAW". The default value of the attribute is "RAW". SNS uses this setting to determine if the payload should be parsed and relevant platform-specific bits of the payload should be extracted. To read more about SNS message formats, see https://docs.aws.amazon.com/sns/latest/dg/json-formats.html refer to their official documentation.

            Possible values include:
            • "RAW"
            • "JSON"
        • sqs — (map)

          Publish to an Amazon SQS queue.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • queueUrlrequired — (String)

            The URL of the Amazon SQS queue.

          • useBase64 — (Boolean)

            Specifies whether to use Base64 encoding.

        • kinesis — (map)

          Write data to an Amazon Kinesis stream.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access to the Amazon Kinesis stream.

          • streamNamerequired — (String)

            The name of the Amazon Kinesis stream.

          • partitionKey — (String)

            The partition key.

        • republish — (map)

          Publish to another MQTT topic.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • topicrequired — (String)

            The name of the MQTT topic.

        • s3 — (map)

          Write to an Amazon S3 bucket.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • bucketNamerequired — (String)

            The Amazon S3 bucket.

          • keyrequired — (String)

            The object key.

          • cannedAcl — (String)

            The Amazon S3 canned ACL that controls access to the object identified by the object key. For more information, see S3 canned ACLs.

            Possible values include:
            • "private"
            • "public-read"
            • "public-read-write"
            • "aws-exec-read"
            • "authenticated-read"
            • "bucket-owner-read"
            • "bucket-owner-full-control"
            • "log-delivery-write"
        • firehose — (map)

          Write to an Amazon Kinesis Firehose stream.

          • roleArnrequired — (String)

            The IAM role that grants access to the Amazon Kinesis Firehose stream.

          • deliveryStreamNamerequired — (String)

            The delivery stream name.

          • separator — (String)

            A character separator that will be used to separate records written to the Firehose stream. Valid values are: '\n' (newline), '\t' (tab), '\r\n' (Windows newline), ',' (comma).

        • cloudwatchMetric — (map)

          Capture a CloudWatch metric.

          • roleArnrequired — (String)

            The IAM role that allows access to the CloudWatch metric.

          • metricNamespacerequired — (String)

            The CloudWatch metric namespace name.

          • metricNamerequired — (String)

            The CloudWatch metric name.

          • metricValuerequired — (String)

            The CloudWatch metric value.

          • metricUnitrequired — (String)

            The metric unit supported by CloudWatch.

          • metricTimestamp — (String)

            An optional Unix timestamp.

        • cloudwatchAlarm — (map)

          Change the state of a CloudWatch alarm.

          • roleArnrequired — (String)

            The IAM role that allows access to the CloudWatch alarm.

          • alarmNamerequired — (String)

            The CloudWatch alarm name.

          • stateReasonrequired — (String)

            The reason for the alarm change.

          • stateValuerequired — (String)

            The value of the alarm state. Acceptable values are: OK, ALARM, INSUFFICIENT_DATA.

        • elasticsearch — (map)

          Write data to an Amazon Elasticsearch Service domain.

          • roleArnrequired — (String)

            The IAM role ARN that has access to Elasticsearch.

          • endpointrequired — (String)

            The endpoint of your Elasticsearch domain.

          • indexrequired — (String)

            The Elasticsearch index where you want to store your data.

          • typerequired — (String)

            The type of document you are storing.

          • idrequired — (String)

            The unique identifier for the document you are storing.

        • salesforce — (map)

          Send a message to a Salesforce IoT Cloud Input Stream.

          • tokenrequired — (String)

            The token used to authenticate access to the Salesforce IoT Cloud Input Stream. The token is available from the Salesforce IoT Cloud platform after creation of the Input Stream.

          • urlrequired — (String)

            The URL exposed by the Salesforce IoT Cloud Input Stream. The URL is available from the Salesforce IoT Cloud platform after creation of the Input Stream.

        • iotAnalytics — (map)

          Sends message data to an AWS IoT Analytics channel.

          • channelArn — (String)

            (deprecated) The ARN of the IoT Analytics channel to which message data will be sent.

          • channelName — (String)

            The name of the IoT Analytics channel to which message data will be sent.

          • roleArn — (String)

            The ARN of the role which has a policy that grants IoT Analytics permission to send message data via IoT Analytics (iotanalytics:BatchPutMessage).

        • iotEvents — (map)

          Sends an input to an AWS IoT Events detector.

          • inputNamerequired — (String)

            The name of the AWS IoT Events input.

          • messageId — (String)

            [Optional] Use this to ensure that only one input (message) with a given messageId will be processed by an AWS IoT Events detector.

          • roleArnrequired — (String)

            The ARN of the role that grants AWS IoT permission to send an input to an AWS IoT Events detector. ("Action":"iotevents:BatchPutMessage").

        • stepFunctions — (map)

          Starts execution of a Step Functions state machine.

          • executionNamePrefix — (String)

            (Optional) A name will be given to the state machine execution consisting of this prefix followed by a UUID. Step Functions automatically creates a unique name for each state machine execution if one is not provided.

          • stateMachineNamerequired — (String)

            The name of the Step Functions state machine whose execution will be started.

          • roleArnrequired — (String)

            The ARN of the role that grants IoT permission to start execution of a state machine ("Action":"states:StartExecution").

      • ruleDisabled — (Boolean)

        Specifies whether the rule is disabled.

      • awsIotSqlVersion — (String)

        The version of the SQL rules engine to use when evaluating the rule.

      • errorAction — (map)

        The action to take when an error occurs.

        • dynamoDB — (map)

          Write to a DynamoDB table.

          • tableNamerequired — (String)

            The name of the DynamoDB table.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access to the DynamoDB table.

          • operation — (String)

            The type of operation to be performed. This follows the substitution template, so it can be ${operation}, but the substitution must result in one of the following: INSERT, UPDATE, or DELETE.

          • hashKeyFieldrequired — (String)

            The hash key name.

          • hashKeyValuerequired — (String)

            The hash key value.

          • hashKeyType — (String)

            The hash key type. Valid values are "STRING" or "NUMBER"

            Possible values include:
            • "STRING"
            • "NUMBER"
          • rangeKeyField — (String)

            The range key name.

          • rangeKeyValue — (String)

            The range key value.

          • rangeKeyType — (String)

            The range key type. Valid values are "STRING" or "NUMBER"

            Possible values include:
            • "STRING"
            • "NUMBER"
          • payloadField — (String)

            The action payload. This name can be customized.

        • dynamoDBv2 — (map)

          Write to a DynamoDB table. This is a new version of the DynamoDB action. It allows you to write each attribute in an MQTT message payload into a separate DynamoDB column.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access to the DynamoDB table.

          • putItemrequired — (map)

            Specifies the DynamoDB table to which the message data will be written. For example:

            { "dynamoDBv2": { "roleArn": "aws:iam:12341251:my-role" "putItem": { "tableName": "my-table" } } }

            Each attribute in the message payload will be written to a separate column in the DynamoDB database.

            • tableNamerequired — (String)

              The table where the message data will be written

        • lambda — (map)

          Invoke a Lambda function.

          • functionArnrequired — (String)

            The ARN of the Lambda function.

        • sns — (map)

          Publish to an Amazon SNS topic.

          • targetArnrequired — (String)

            The ARN of the SNS topic.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • messageFormat — (String)

            (Optional) The message format of the message to publish. Accepted values are "JSON" and "RAW". The default value of the attribute is "RAW". SNS uses this setting to determine if the payload should be parsed and relevant platform-specific bits of the payload should be extracted. To read more about SNS message formats, see https://docs.aws.amazon.com/sns/latest/dg/json-formats.html refer to their official documentation.

            Possible values include:
            • "RAW"
            • "JSON"
        • sqs — (map)

          Publish to an Amazon SQS queue.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • queueUrlrequired — (String)

            The URL of the Amazon SQS queue.

          • useBase64 — (Boolean)

            Specifies whether to use Base64 encoding.

        • kinesis — (map)

          Write data to an Amazon Kinesis stream.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access to the Amazon Kinesis stream.

          • streamNamerequired — (String)

            The name of the Amazon Kinesis stream.

          • partitionKey — (String)

            The partition key.

        • republish — (map)

          Publish to another MQTT topic.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • topicrequired — (String)

            The name of the MQTT topic.

        • s3 — (map)

          Write to an Amazon S3 bucket.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • bucketNamerequired — (String)

            The Amazon S3 bucket.

          • keyrequired — (String)

            The object key.

          • cannedAcl — (String)

            The Amazon S3 canned ACL that controls access to the object identified by the object key. For more information, see S3 canned ACLs.

            Possible values include:
            • "private"
            • "public-read"
            • "public-read-write"
            • "aws-exec-read"
            • "authenticated-read"
            • "bucket-owner-read"
            • "bucket-owner-full-control"
            • "log-delivery-write"
        • firehose — (map)

          Write to an Amazon Kinesis Firehose stream.

          • roleArnrequired — (String)

            The IAM role that grants access to the Amazon Kinesis Firehose stream.

          • deliveryStreamNamerequired — (String)

            The delivery stream name.

          • separator — (String)

            A character separator that will be used to separate records written to the Firehose stream. Valid values are: '\n' (newline), '\t' (tab), '\r\n' (Windows newline), ',' (comma).

        • cloudwatchMetric — (map)

          Capture a CloudWatch metric.

          • roleArnrequired — (String)

            The IAM role that allows access to the CloudWatch metric.

          • metricNamespacerequired — (String)

            The CloudWatch metric namespace name.

          • metricNamerequired — (String)

            The CloudWatch metric name.

          • metricValuerequired — (String)

            The CloudWatch metric value.

          • metricUnitrequired — (String)

            The metric unit supported by CloudWatch.

          • metricTimestamp — (String)

            An optional Unix timestamp.

        • cloudwatchAlarm — (map)

          Change the state of a CloudWatch alarm.

          • roleArnrequired — (String)

            The IAM role that allows access to the CloudWatch alarm.

          • alarmNamerequired — (String)

            The CloudWatch alarm name.

          • stateReasonrequired — (String)

            The reason for the alarm change.

          • stateValuerequired — (String)

            The value of the alarm state. Acceptable values are: OK, ALARM, INSUFFICIENT_DATA.

        • elasticsearch — (map)

          Write data to an Amazon Elasticsearch Service domain.

          • roleArnrequired — (String)

            The IAM role ARN that has access to Elasticsearch.

          • endpointrequired — (String)

            The endpoint of your Elasticsearch domain.

          • indexrequired — (String)

            The Elasticsearch index where you want to store your data.

          • typerequired — (String)

            The type of document you are storing.

          • idrequired — (String)

            The unique identifier for the document you are storing.

        • salesforce — (map)

          Send a message to a Salesforce IoT Cloud Input Stream.

          • tokenrequired — (String)

            The token used to authenticate access to the Salesforce IoT Cloud Input Stream. The token is available from the Salesforce IoT Cloud platform after creation of the Input Stream.

          • urlrequired — (String)

            The URL exposed by the Salesforce IoT Cloud Input Stream. The URL is available from the Salesforce IoT Cloud platform after creation of the Input Stream.

        • iotAnalytics — (map)

          Sends message data to an AWS IoT Analytics channel.

          • channelArn — (String)

            (deprecated) The ARN of the IoT Analytics channel to which message data will be sent.

          • channelName — (String)

            The name of the IoT Analytics channel to which message data will be sent.

          • roleArn — (String)

            The ARN of the role which has a policy that grants IoT Analytics permission to send message data via IoT Analytics (iotanalytics:BatchPutMessage).

        • iotEvents — (map)

          Sends an input to an AWS IoT Events detector.

          • inputNamerequired — (String)

            The name of the AWS IoT Events input.

          • messageId — (String)

            [Optional] Use this to ensure that only one input (message) with a given messageId will be processed by an AWS IoT Events detector.

          • roleArnrequired — (String)

            The ARN of the role that grants AWS IoT permission to send an input to an AWS IoT Events detector. ("Action":"iotevents:BatchPutMessage").

        • stepFunctions — (map)

          Starts execution of a Step Functions state machine.

          • executionNamePrefix — (String)

            (Optional) A name will be given to the state machine execution consisting of this prefix followed by a UUID. Step Functions automatically creates a unique name for each state machine execution if one is not provided.

          • stateMachineNamerequired — (String)

            The name of the Step Functions state machine whose execution will be started.

          • roleArnrequired — (String)

            The ARN of the role that grants IoT permission to start execution of a state machine ("Action":"states:StartExecution").

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

searchIndex(params = {}, callback) ⇒ AWS.Request

The query search index.

Service Reference:

Examples:

Calling the searchIndex operation

var params = {
  queryString: 'STRING_VALUE', /* required */
  indexName: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  queryVersion: 'STRING_VALUE'
};
iot.searchIndex(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • indexName — (String)

      The search index name.

    • queryString — (String)

      The search query string.

    • nextToken — (String)

      The token used to get the next set of results, or null if there are no additional results.

    • maxResults — (Integer)

      The maximum number of results to return at one time.

    • queryVersion — (String)

      The query version.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • nextToken — (String)

        The token used to get the next set of results, or null if there are no additional results.

      • things — (Array<map>)

        The things that match the search query.

        • thingName — (String)

          The thing name.

        • thingId — (String)

          The thing ID.

        • thingTypeName — (String)

          The thing type name.

        • thingGroupNames — (Array<String>)

          Thing group names.

        • attributes — (map<String>)

          The attributes.

        • shadow — (String)

          The shadow.

        • connectivity — (map)

          Indicates whether the thing is connected to the AWS IoT service.

          • connected — (Boolean)

            True if the thing is connected to the AWS IoT service; false if it is not connected.

          • timestamp — (Integer)

            The epoch time (in milliseconds) when the thing last connected or disconnected. If the thing has been disconnected for more than a few weeks, the time value might be missing.

      • thingGroups — (Array<map>)

        The thing groups that match the search query.

        • thingGroupName — (String)

          The thing group name.

        • thingGroupId — (String)

          The thing group ID.

        • thingGroupDescription — (String)

          The thing group description.

        • attributes — (map<String>)

          The thing group attributes.

        • parentGroupNames — (Array<String>)

          Parent group names.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

setDefaultAuthorizer(params = {}, callback) ⇒ AWS.Request

Sets the default authorizer. This will be used if a websocket connection is made without specifying an authorizer.

Service Reference:

Examples:

Calling the setDefaultAuthorizer operation

var params = {
  authorizerName: 'STRING_VALUE' /* required */
};
iot.setDefaultAuthorizer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • authorizerName — (String)

      The authorizer name.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • authorizerName — (String)

        The authorizer name.

      • authorizerArn — (String)

        The authorizer ARN.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

setDefaultPolicyVersion(params = {}, callback) ⇒ AWS.Request

Sets the specified version of the specified policy as the policy's default (operative) version. This action affects all certificates to which the policy is attached. To list the principals the policy is attached to, use the ListPrincipalPolicy API.

Service Reference:

Examples:

Calling the setDefaultPolicyVersion operation

var params = {
  policyName: 'STRING_VALUE', /* required */
  policyVersionId: 'STRING_VALUE' /* required */
};
iot.setDefaultPolicyVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • policyName — (String)

      The policy name.

    • policyVersionId — (String)

      The policy version ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

setLoggingOptions(params = {}, callback) ⇒ AWS.Request

Sets the logging options.

NOTE: use of this command is not recommended. Use SetV2LoggingOptions instead.

Service Reference:

Examples:

Calling the setLoggingOptions operation

var params = {
  loggingOptionsPayload: { /* required */
    roleArn: 'STRING_VALUE', /* required */
    logLevel: DEBUG | INFO | ERROR | WARN | DISABLED
  }
};
iot.setLoggingOptions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • loggingOptionsPayload — (map)

      The logging options payload.

      • roleArnrequired — (String)

        The ARN of the IAM role that grants access.

      • logLevel — (String)

        The log level.

        Possible values include:
        • "DEBUG"
        • "INFO"
        • "ERROR"
        • "WARN"
        • "DISABLED"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

setV2LoggingLevel(params = {}, callback) ⇒ AWS.Request

Sets the logging level.

Service Reference:

Examples:

Calling the setV2LoggingLevel operation

var params = {
  logLevel: DEBUG | INFO | ERROR | WARN | DISABLED, /* required */
  logTarget: { /* required */
    targetType: DEFAULT | THING_GROUP, /* required */
    targetName: 'STRING_VALUE'
  }
};
iot.setV2LoggingLevel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • logTarget — (map)

      The log target.

      • targetTyperequired — (String)

        The target type.

        Possible values include:
        • "DEFAULT"
        • "THING_GROUP"
      • targetName — (String)

        The target name.

    • logLevel — (String)

      The log level.

      Possible values include:
      • "DEBUG"
      • "INFO"
      • "ERROR"
      • "WARN"
      • "DISABLED"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

setV2LoggingOptions(params = {}, callback) ⇒ AWS.Request

Sets the logging options for the V2 logging service.

Service Reference:

Examples:

Calling the setV2LoggingOptions operation

var params = {
  defaultLogLevel: DEBUG | INFO | ERROR | WARN | DISABLED,
  disableAllLogs: true || false,
  roleArn: 'STRING_VALUE'
};
iot.setV2LoggingOptions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • roleArn — (String)

      The ARN of the role that allows IoT to write to Cloudwatch logs.

    • defaultLogLevel — (String)

      The default logging level.

      Possible values include:
      • "DEBUG"
      • "INFO"
      • "ERROR"
      • "WARN"
      • "DISABLED"
    • disableAllLogs — (Boolean)

      If true all logs are disabled. The default is false.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startOnDemandAuditTask(params = {}, callback) ⇒ AWS.Request

Starts an on-demand Device Defender audit.

Service Reference:

Examples:

Calling the startOnDemandAuditTask operation

var params = {
  targetCheckNames: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
iot.startOnDemandAuditTask(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • targetCheckNames — (Array<String>)

      Which checks are performed during the audit. The checks you specify must be enabled for your account or an exception occurs. Use DescribeAccountAuditConfiguration to see the list of all checks including those that are enabled or UpdateAccountAuditConfiguration to select which checks are enabled.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • taskId — (String)

        The ID of the on-demand audit you started.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startThingRegistrationTask(params = {}, callback) ⇒ AWS.Request

Creates a bulk thing provisioning task.

Service Reference:

Examples:

Calling the startThingRegistrationTask operation

var params = {
  inputFileBucket: 'STRING_VALUE', /* required */
  inputFileKey: 'STRING_VALUE', /* required */
  roleArn: 'STRING_VALUE', /* required */
  templateBody: 'STRING_VALUE' /* required */
};
iot.startThingRegistrationTask(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • templateBody — (String)

      The provisioning template.

    • inputFileBucket — (String)

      The S3 bucket that contains the input file.

    • inputFileKey — (String)

      The name of input file within the S3 bucket. This file contains a newline delimited JSON file. Each line contains the parameter values to provision one device (thing).

    • roleArn — (String)

      The IAM role ARN that grants permission the input file.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • taskId — (String)

        The bulk thing provisioning task ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

stopThingRegistrationTask(params = {}, callback) ⇒ AWS.Request

Cancels a bulk thing provisioning task.

Service Reference:

Examples:

Calling the stopThingRegistrationTask operation

var params = {
  taskId: 'STRING_VALUE' /* required */
};
iot.stopThingRegistrationTask(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • taskId — (String)

      The bulk thing provisioning task ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Adds to or modifies the tags of the given resource. Tags are metadata which can be used to manage a resource.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tags: [ /* required */
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
iot.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The ARN of the resource.

    • tags — (Array<map>)

      The new or modified tags for the resource.

      • Key — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

testAuthorization(params = {}, callback) ⇒ AWS.Request

Tests if a specified principal is authorized to perform an AWS IoT action on a specified resource. Use this to test and debug the authorization behavior of devices that connect to the AWS IoT device gateway.

Service Reference:

Examples:

Calling the testAuthorization operation

var params = {
  authInfos: [ /* required */
    {
      actionType: PUBLISH | SUBSCRIBE | RECEIVE | CONNECT,
      resources: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  clientId: 'STRING_VALUE',
  cognitoIdentityPoolId: 'STRING_VALUE',
  policyNamesToAdd: [
    'STRING_VALUE',
    /* more items */
  ],
  policyNamesToSkip: [
    'STRING_VALUE',
    /* more items */
  ],
  principal: 'STRING_VALUE'
};
iot.testAuthorization(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • principal — (String)

      The principal.

    • cognitoIdentityPoolId — (String)

      The Cognito identity pool ID.

    • authInfos — (Array<map>)

      A list of authorization info objects. Simulating authorization will create a response for each authInfo object in the list.

      • actionType — (String)

        The type of action for which the principal is being authorized.

        Possible values include:
        • "PUBLISH"
        • "SUBSCRIBE"
        • "RECEIVE"
        • "CONNECT"
      • resources — (Array<String>)

        The resources for which the principal is being authorized to perform the specified action.

    • clientId — (String)

      The MQTT client ID.

    • policyNamesToAdd — (Array<String>)

      When testing custom authorization, the policies specified here are treated as if they are attached to the principal being authorized.

    • policyNamesToSkip — (Array<String>)

      When testing custom authorization, the policies specified here are treated as if they are not attached to the principal being authorized.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • authResults — (Array<map>)

        The authentication results.

        • authInfo — (map)

          Authorization information.

          • actionType — (String)

            The type of action for which the principal is being authorized.

            Possible values include:
            • "PUBLISH"
            • "SUBSCRIBE"
            • "RECEIVE"
            • "CONNECT"
          • resources — (Array<String>)

            The resources for which the principal is being authorized to perform the specified action.

        • allowed — (map)

          The policies and statements that allowed the specified action.

          • policies — (Array<map>)

            A list of policies that allowed the authentication.

            • policyName — (String)

              The policy name.

            • policyArn — (String)

              The policy ARN.

        • denied — (map)

          The policies and statements that denied the specified action.

          • implicitDeny — (map)

            Information that implicitly denies the authorization. When a policy doesn't explicitly deny or allow an action on a resource it is considered an implicit deny.

            • policies — (Array<map>)

              Policies that don't contain a matching allow or deny statement for the specified action on the specified resource.

              • policyName — (String)

                The policy name.

              • policyArn — (String)

                The policy ARN.

          • explicitDeny — (map)

            Information that explicitly denies the authorization.

            • policies — (Array<map>)

              The policies that denied the authorization.

              • policyName — (String)

                The policy name.

              • policyArn — (String)

                The policy ARN.

        • authDecision — (String)

          The final authorization decision of this scenario. Multiple statements are taken into account when determining the authorization decision. An explicit deny statement can override multiple allow statements.

          Possible values include:
          • "ALLOWED"
          • "EXPLICIT_DENY"
          • "IMPLICIT_DENY"
        • missingContextValues — (Array<String>)

          Contains any missing context values found while evaluating policy.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

testInvokeAuthorizer(params = {}, callback) ⇒ AWS.Request

Tests a custom authorization behavior by invoking a specified custom authorizer. Use this to test and debug the custom authorization behavior of devices that connect to the AWS IoT device gateway.

Service Reference:

Examples:

Calling the testInvokeAuthorizer operation

var params = {
  authorizerName: 'STRING_VALUE', /* required */
  token: 'STRING_VALUE', /* required */
  tokenSignature: 'STRING_VALUE' /* required */
};
iot.testInvokeAuthorizer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • authorizerName — (String)

      The custom authorizer name.

    • token — (String)

      The token returned by your custom authentication service.

    • tokenSignature — (String)

      The signature made with the token and your custom authentication service's private key.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • isAuthenticated — (Boolean)

        True if the token is authenticated, otherwise false.

      • principalId — (String)

        The principal ID.

      • policyDocuments — (Array<String>)

        IAM policy documents.

      • refreshAfterInSeconds — (Integer)

        The number of seconds after which the temporary credentials are refreshed.

      • disconnectAfterInSeconds — (Integer)

        The number of seconds after which the connection is terminated.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

transferCertificate(params = {}, callback) ⇒ AWS.Request

Transfers the specified certificate to the specified AWS account.

You can cancel the transfer until it is acknowledged by the recipient.

No notification is sent to the transfer destination's account. It is up to the caller to notify the transfer target.

The certificate being transferred must not be in the ACTIVE state. You can use the UpdateCertificate API to deactivate it.

The certificate must not have any policies attached to it. You can use the DetachPrincipalPolicy API to detach them.

Service Reference:

Examples:

Calling the transferCertificate operation

var params = {
  certificateId: 'STRING_VALUE', /* required */
  targetAwsAccount: 'STRING_VALUE', /* required */
  transferMessage: 'STRING_VALUE'
};
iot.transferCertificate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • certificateId — (String)

      The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

    • targetAwsAccount — (String)

      The AWS account.

    • transferMessage — (String)

      The transfer message.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • transferredCertificateArn — (String)

        The ARN of the certificate.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Removes the given tags (metadata) from the resource.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
iot.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The ARN of the resource.

    • tagKeys — (Array<String>)

      A list of the keys of the tags to be removed from the resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateAccountAuditConfiguration(params = {}, callback) ⇒ AWS.Request

Configures or reconfigures the Device Defender audit settings for this account. Settings include how audit notifications are sent and which audit checks are enabled or disabled.

Service Reference:

Examples:

Calling the updateAccountAuditConfiguration operation

var params = {
  auditCheckConfigurations: {
    '<AuditCheckName>': {
      enabled: true || false
    },
    /* '<AuditCheckName>': ... */
  },
  auditNotificationTargetConfigurations: {
    '<AuditNotificationType>': {
      enabled: true || false,
      roleArn: 'STRING_VALUE',
      targetArn: 'STRING_VALUE'
    },
    /* '<AuditNotificationType>': ... */
  },
  roleArn: 'STRING_VALUE'
};
iot.updateAccountAuditConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • roleArn — (String)

      The ARN of the role that grants permission to AWS IoT to access information about your devices, policies, certificates and other items as necessary when performing an audit.

    • auditNotificationTargetConfigurations — (map<map>)

      Information about the targets to which audit notifications are sent.

      • targetArn — (String)

        The ARN of the target (SNS topic) to which audit notifications are sent.

      • roleArn — (String)

        The ARN of the role that grants permission to send notifications to the target.

      • enabled — (Boolean)

        True if notifications to the target are enabled.

    • auditCheckConfigurations — (map<map>)

      Specifies which audit checks are enabled and disabled for this account. Use DescribeAccountAuditConfiguration to see the list of all checks including those that are currently enabled.

      Note that some data collection may begin immediately when certain checks are enabled. When a check is disabled, any data collected so far in relation to the check is deleted.

      You cannot disable a check if it is used by any scheduled audit. You must first delete the check from the scheduled audit or delete the scheduled audit itself.

      On the first call to UpdateAccountAuditConfiguration this parameter is required and must specify at least one enabled check.

      • enabled — (Boolean)

        True if this audit check is enabled for this account.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateAuthorizer(params = {}, callback) ⇒ AWS.Request

Updates an authorizer.

Service Reference:

Examples:

Calling the updateAuthorizer operation

var params = {
  authorizerName: 'STRING_VALUE', /* required */
  authorizerFunctionArn: 'STRING_VALUE',
  status: ACTIVE | INACTIVE,
  tokenKeyName: 'STRING_VALUE',
  tokenSigningPublicKeys: {
    '<KeyName>': 'STRING_VALUE',
    /* '<KeyName>': ... */
  }
};
iot.updateAuthorizer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • authorizerName — (String)

      The authorizer name.

    • authorizerFunctionArn — (String)

      The ARN of the authorizer's Lambda function.

    • tokenKeyName — (String)

      The key used to extract the token from the HTTP headers.

    • tokenSigningPublicKeys — (map<String>)

      The public keys used to verify the token signature.

    • status — (String)

      The status of the update authorizer request.

      Possible values include:
      • "ACTIVE"
      • "INACTIVE"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • authorizerName — (String)

        The authorizer name.

      • authorizerArn — (String)

        The authorizer ARN.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateBillingGroup(params = {}, callback) ⇒ AWS.Request

Updates information about the billing group.

Service Reference:

Examples:

Calling the updateBillingGroup operation

var params = {
  billingGroupName: 'STRING_VALUE', /* required */
  billingGroupProperties: { /* required */
    billingGroupDescription: 'STRING_VALUE'
  },
  expectedVersion: 'NUMBER_VALUE'
};
iot.updateBillingGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • billingGroupName — (String)

      The name of the billing group.

    • billingGroupProperties — (map)

      The properties of the billing group.

      • billingGroupDescription — (String)

        The description of the billing group.

    • expectedVersion — (Integer)

      The expected version of the billing group. If the version of the billing group does not match the expected version specified in the request, the UpdateBillingGroup request is rejected with a VersionConflictException.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • version — (Integer)

        The latest version of the billing group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateCACertificate(params = {}, callback) ⇒ AWS.Request

Updates a registered CA certificate.

Service Reference:

Examples:

Calling the updateCACertificate operation

var params = {
  certificateId: 'STRING_VALUE', /* required */
  newAutoRegistrationStatus: ENABLE | DISABLE,
  newStatus: ACTIVE | INACTIVE,
  registrationConfig: {
    roleArn: 'STRING_VALUE',
    templateBody: 'STRING_VALUE'
  },
  removeAutoRegistration: true || false
};
iot.updateCACertificate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • certificateId — (String)

      The CA certificate identifier.

    • newStatus — (String)

      The updated status of the CA certificate.

      Note: The status value REGISTER_INACTIVE is deprecated and should not be used.

      Possible values include:
      • "ACTIVE"
      • "INACTIVE"
    • newAutoRegistrationStatus — (String)

      The new value for the auto registration status. Valid values are: "ENABLE" or "DISABLE".

      Possible values include:
      • "ENABLE"
      • "DISABLE"
    • registrationConfig — (map)

      Information about the registration configuration.

      • templateBody — (String)

        The template body.

      • roleArn — (String)

        The ARN of the role.

    • removeAutoRegistration — (Boolean)

      If true, remove auto registration.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateCertificate(params = {}, callback) ⇒ AWS.Request

Updates the status of the specified certificate. This operation is idempotent.

Moving a certificate from the ACTIVE state (including REVOKED) will not disconnect currently connected devices, but these devices will be unable to reconnect.

The ACTIVE state is required to authenticate devices connecting to AWS IoT using a certificate.

Service Reference:

Examples:

Calling the updateCertificate operation

var params = {
  certificateId: 'STRING_VALUE', /* required */
  newStatus: ACTIVE | INACTIVE | REVOKED | PENDING_TRANSFER | REGISTER_INACTIVE | PENDING_ACTIVATION /* required */
};
iot.updateCertificate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • certificateId — (String)

      The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

    • newStatus — (String)

      The new status.

      Note: Setting the status to PENDING_TRANSFER will result in an exception being thrown. PENDING_TRANSFER is a status used internally by AWS IoT. It is not intended for developer use.

      Note: The status value REGISTER_INACTIVE is deprecated and should not be used.

      Possible values include:
      • "ACTIVE"
      • "INACTIVE"
      • "REVOKED"
      • "PENDING_TRANSFER"
      • "REGISTER_INACTIVE"
      • "PENDING_ACTIVATION"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateDynamicThingGroup(params = {}, callback) ⇒ AWS.Request

Updates a dynamic thing group.

Service Reference:

Examples:

Calling the updateDynamicThingGroup operation

var params = {
  thingGroupName: 'STRING_VALUE', /* required */
  thingGroupProperties: { /* required */
    attributePayload: {
      attributes: {
        '<AttributeName>': 'STRING_VALUE',
        /* '<AttributeName>': ... */
      },
      merge: true || false
    },
    thingGroupDescription: 'STRING_VALUE'
  },
  expectedVersion: 'NUMBER_VALUE',
  indexName: 'STRING_VALUE',
  queryString: 'STRING_VALUE',
  queryVersion: 'STRING_VALUE'
};
iot.updateDynamicThingGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingGroupName — (String)

      The name of the dynamic thing group to update.

    • thingGroupProperties — (map)

      The dynamic thing group properties to update.

      • thingGroupDescription — (String)

        The thing group description.

      • attributePayload — (map)

        The thing group attributes in JSON format.

        • attributes — (map<String>)

          A JSON string containing up to three key-value pair in JSON format. For example:

          {\"attributes\":{\"string1\":\"string2\"}}

        • merge — (Boolean)

          Specifies whether the list of attributes provided in the AttributePayload is merged with the attributes stored in the registry, instead of overwriting them.

          To remove an attribute, call UpdateThing with an empty attribute value.

          Note: The merge attribute is only valid when calling UpdateThing.
    • expectedVersion — (Integer)

      The expected version of the dynamic thing group to update.

    • indexName — (String)

      The dynamic thing group index to update.

      Note: Currently one index is supported: 'AWS_Things'.
    • queryString — (String)

      The dynamic thing group search query string to update.

    • queryVersion — (String)

      The dynamic thing group query version to update.

      Note: Currently one query version is supported: "2017-09-30". If not specified, the query version defaults to this value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • version — (Integer)

        The dynamic thing group version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateEventConfigurations(params = {}, callback) ⇒ AWS.Request

Updates the event configurations.

Service Reference:

Examples:

Calling the updateEventConfigurations operation

var params = {
  eventConfigurations: {
    '<EventType>': {
      Enabled: true || false
    },
    /* '<EventType>': ... */
  }
};
iot.updateEventConfigurations(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • eventConfigurations — (map<map>)

      The new event configuration values.

      • Enabled — (Boolean)

        True to enable the configuration.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateIndexingConfiguration(params = {}, callback) ⇒ AWS.Request

Updates the search configuration.

Service Reference:

Examples:

Calling the updateIndexingConfiguration operation

var params = {
  thingGroupIndexingConfiguration: {
    thingGroupIndexingMode: OFF | ON /* required */
  },
  thingIndexingConfiguration: {
    thingIndexingMode: OFF | REGISTRY | REGISTRY_AND_SHADOW, /* required */
    thingConnectivityIndexingMode: OFF | STATUS
  }
};
iot.updateIndexingConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingIndexingConfiguration — (map)

      Thing indexing configuration.

      • thingIndexingModerequired — (String)

        Thing indexing mode. Valid values are:

        • REGISTRY – Your thing index contains registry data only.

        • REGISTRY_AND_SHADOW - Your thing index contains registry and shadow data.

        • OFF - Thing indexing is disabled.

        Possible values include:
        • "OFF"
        • "REGISTRY"
        • "REGISTRY_AND_SHADOW"
      • thingConnectivityIndexingMode — (String)

        Thing connectivity indexing mode. Valid values are:

        • STATUS – Your thing index contains connectivity status. To enable thing connectivity indexing, thingIndexMode must not be set to OFF.

        • OFF - Thing connectivity status indexing is disabled.

        Possible values include:
        • "OFF"
        • "STATUS"
    • thingGroupIndexingConfiguration — (map)

      Thing group indexing configuration.

      • thingGroupIndexingModerequired — (String)

        Thing group indexing mode.

        Possible values include:
        • "OFF"
        • "ON"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateJob(params = {}, callback) ⇒ AWS.Request

Updates supported fields of the specified job.

Service Reference:

Examples:

Calling the updateJob operation

var params = {
  jobId: 'STRING_VALUE', /* required */
  abortConfig: {
    criteriaList: [ /* required */
      {
        action: CANCEL, /* required */
        failureType: FAILED | REJECTED | TIMED_OUT | ALL, /* required */
        minNumberOfExecutedThings: 'NUMBER_VALUE', /* required */
        thresholdPercentage: 'NUMBER_VALUE' /* required */
      },
      /* more items */
    ]
  },
  description: 'STRING_VALUE',
  jobExecutionsRolloutConfig: {
    exponentialRate: {
      baseRatePerMinute: 'NUMBER_VALUE', /* required */
      incrementFactor: 'NUMBER_VALUE', /* required */
      rateIncreaseCriteria: { /* required */
        numberOfNotifiedThings: 'NUMBER_VALUE',
        numberOfSucceededThings: 'NUMBER_VALUE'
      }
    },
    maximumPerMinute: 'NUMBER_VALUE'
  },
  presignedUrlConfig: {
    expiresInSec: 'NUMBER_VALUE',
    roleArn: 'STRING_VALUE'
  },
  timeoutConfig: {
    inProgressTimeoutInMinutes: 'NUMBER_VALUE'
  }
};
iot.updateJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • jobId — (String)

      The ID of the job to be updated.

    • description — (String)

      A short text description of the job.

    • presignedUrlConfig — (map)

      Configuration information for pre-signed S3 URLs.

      • roleArn — (String)

        The ARN of an IAM role that grants grants permission to download files from the S3 bucket where the job data/updates are stored. The role must also grant permission for IoT to download the files.

      • expiresInSec — (Integer)

        How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 3600 seconds. Pre-signed URLs are generated when Jobs receives an MQTT request for the job document.

    • jobExecutionsRolloutConfig — (map)

      Allows you to create a staged rollout of the job.

      • maximumPerMinute — (Integer)

        The maximum number of things that will be notified of a pending job, per minute. This parameter allows you to create a staged rollout.

      • exponentialRate — (map)

        The rate of increase for a job rollout. This parameter allows you to define an exponential rate for a job rollout.

        • baseRatePerMinuterequired — (Integer)

          The minimum number of things that will be notified of a pending job, per minute at the start of job rollout. This parameter allows you to define the initial rate of rollout.

        • incrementFactorrequired — (Float)

          The exponential factor to increase the rate of rollout for a job.

        • rateIncreaseCriteriarequired — (map)

          The criteria to initiate the increase in rate of rollout for a job.

          AWS IoT supports up to one digit after the decimal (for example, 1.5, but not 1.55).

          • numberOfNotifiedThings — (Integer)

            The threshold for number of notified things that will initiate the increase in rate of rollout.

          • numberOfSucceededThings — (Integer)

            The threshold for number of succeeded things that will initiate the increase in rate of rollout.

    • abortConfig — (map)

      Allows you to create criteria to abort a job.

      • criteriaListrequired — (Array<map>)

        The list of abort criteria to define rules to abort the job.

        • failureTyperequired — (String)

          The type of job execution failure to define a rule to initiate a job abort.

          Possible values include:
          • "FAILED"
          • "REJECTED"
          • "TIMED_OUT"
          • "ALL"
        • actionrequired — (String)

          The type of abort action to initiate a job abort.

          Possible values include:
          • "CANCEL"
        • thresholdPercentagerequired — (Float)

          The threshold as a percentage of the total number of executed things that will initiate a job abort.

          AWS IoT supports up to two digits after the decimal (for example, 10.9 and 10.99, but not 10.999).

        • minNumberOfExecutedThingsrequired — (Integer)

          Minimum number of executed things before evaluating an abort rule.

    • timeoutConfig — (map)

      Specifies the amount of time each device has to finish its execution of the job. The timer is started when the job execution status is set to IN_PROGRESS. If the job execution status is not set to another terminal state before the time expires, it will be automatically set to TIMED_OUT.

      • inProgressTimeoutInMinutes — (Integer)

        Specifies the amount of time, in minutes, this device has to finish execution of this job. The timeout interval can be anywhere between 1 minute and 7 days (1 to 10080 minutes). The in progress timer can't be updated and will apply to all job executions for the job. Whenever a job execution remains in the IN_PROGRESS status for longer than this interval, the job execution will fail and switch to the terminal TIMED_OUT status.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateRoleAlias(params = {}, callback) ⇒ AWS.Request

Updates a role alias.

Service Reference:

Examples:

Calling the updateRoleAlias operation

var params = {
  roleAlias: 'STRING_VALUE', /* required */
  credentialDurationSeconds: 'NUMBER_VALUE',
  roleArn: 'STRING_VALUE'
};
iot.updateRoleAlias(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • roleAlias — (String)

      The role alias to update.

    • roleArn — (String)

      The role ARN.

    • credentialDurationSeconds — (Integer)

      The number of seconds the credential will be valid.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • roleAlias — (String)

        The role alias.

      • roleAliasArn — (String)

        The role alias ARN.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateScheduledAudit(params = {}, callback) ⇒ AWS.Request

Updates a scheduled audit, including what checks are performed and how often the audit takes place.

Service Reference:

Examples:

Calling the updateScheduledAudit operation

var params = {
  scheduledAuditName: 'STRING_VALUE', /* required */
  dayOfMonth: 'STRING_VALUE',
  dayOfWeek: SUN | MON | TUE | WED | THU | FRI | SAT,
  frequency: DAILY | WEEKLY | BIWEEKLY | MONTHLY,
  targetCheckNames: [
    'STRING_VALUE',
    /* more items */
  ]
};
iot.updateScheduledAudit(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • frequency — (String)

      How often the scheduled audit takes place. Can be one of "DAILY", "WEEKLY", "BIWEEKLY" or "MONTHLY". The actual start time of each audit is determined by the system.

      Possible values include:
      • "DAILY"
      • "WEEKLY"
      • "BIWEEKLY"
      • "MONTHLY"
    • dayOfMonth — (String)

      The day of the month on which the scheduled audit takes place. Can be "1" through "31" or "LAST". This field is required if the "frequency" parameter is set to "MONTHLY". If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.

    • dayOfWeek — (String)

      The day of the week on which the scheduled audit takes place. Can be one of "SUN", "MON", "TUE", "WED", "THU", "FRI" or "SAT". This field is required if the "frequency" parameter is set to "WEEKLY" or "BIWEEKLY".

      Possible values include:
      • "SUN"
      • "MON"
      • "TUE"
      • "WED"
      • "THU"
      • "FRI"
      • "SAT"
    • targetCheckNames — (Array<String>)

      Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use DescribeAccountAuditConfiguration to see the list of all checks including those that are enabled or UpdateAccountAuditConfiguration to select which checks are enabled.)

    • scheduledAuditName — (String)

      The name of the scheduled audit. (Max. 128 chars)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • scheduledAuditArn — (String)

        The ARN of the scheduled audit.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateSecurityProfile(params = {}, callback) ⇒ AWS.Request

Updates a Device Defender security profile.

Service Reference:

Examples:

Calling the updateSecurityProfile operation

var params = {
  securityProfileName: 'STRING_VALUE', /* required */
  additionalMetricsToRetain: [
    'STRING_VALUE',
    /* more items */
  ],
  alertTargets: {
    '<AlertTargetType>': {
      alertTargetArn: 'STRING_VALUE', /* required */
      roleArn: 'STRING_VALUE' /* required */
    },
    /* '<AlertTargetType>': ... */
  },
  behaviors: [
    {
      name: 'STRING_VALUE', /* required */
      criteria: {
        comparisonOperator: less-than | less-than-equals | greater-than | greater-than-equals | in-cidr-set | not-in-cidr-set | in-port-set | not-in-port-set,
        consecutiveDatapointsToAlarm: 'NUMBER_VALUE',
        consecutiveDatapointsToClear: 'NUMBER_VALUE',
        durationSeconds: 'NUMBER_VALUE',
        statisticalThreshold: {
          statistic: 'STRING_VALUE'
        },
        value: {
          cidrs: [
            'STRING_VALUE',
            /* more items */
          ],
          count: 'NUMBER_VALUE',
          ports: [
            'NUMBER_VALUE',
            /* more items */
          ]
        }
      },
      metric: 'STRING_VALUE'
    },
    /* more items */
  ],
  deleteAdditionalMetricsToRetain: true || false,
  deleteAlertTargets: true || false,
  deleteBehaviors: true || false,
  expectedVersion: 'NUMBER_VALUE',
  securityProfileDescription: 'STRING_VALUE'
};
iot.updateSecurityProfile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • securityProfileName — (String)

      The name of the security profile you want to update.

    • securityProfileDescription — (String)

      A description of the security profile.

    • behaviors — (Array<map>)

      Specifies the behaviors that, when violated by a device (thing), cause an alert.

      • namerequired — (String)

        The name you have given to the behavior.

      • metric — (String)

        What is measured by the behavior.

      • criteria — (map)

        The criteria that determine if a device is behaving normally in regard to the metric.

        • comparisonOperator — (String)

          The operator that relates the thing measured (metric) to the criteria (containing a value or statisticalThreshold).

          Possible values include:
          • "less-than"
          • "less-than-equals"
          • "greater-than"
          • "greater-than-equals"
          • "in-cidr-set"
          • "not-in-cidr-set"
          • "in-port-set"
          • "not-in-port-set"
        • value — (map)

          The value to be compared with the metric.

          • count — (Integer)

            If the comparisonOperator calls for a numeric value, use this to specify that numeric value to be compared with the metric.

          • cidrs — (Array<String>)

            If the comparisonOperator calls for a set of CIDRs, use this to specify that set to be compared with the metric.

          • ports — (Array<Integer>)

            If the comparisonOperator calls for a set of ports, use this to specify that set to be compared with the metric.

        • durationSeconds — (Integer)

          Use this to specify the time duration over which the behavior is evaluated, for those criteria which have a time dimension (for example, NUM_MESSAGES_SENT). For a statisticalThreshhold metric comparison, measurements from all devices are accumulated over this time duration before being used to calculate percentiles, and later, measurements from an individual device are also accumulated over this time duration before being given a percentile rank.

        • consecutiveDatapointsToAlarm — (Integer)

          If a device is in violation of the behavior for the specified number of consecutive datapoints, an alarm occurs. If not specified, the default is 1.

        • consecutiveDatapointsToClear — (Integer)

          If an alarm has occurred and the offending device is no longer in violation of the behavior for the specified number of consecutive datapoints, the alarm is cleared. If not specified, the default is 1.

        • statisticalThreshold — (map)

          A statistical ranking (percentile) which indicates a threshold value by which a behavior is determined to be in compliance or in violation of the behavior.

          • statistic — (String)

            The percentile which resolves to a threshold value by which compliance with a behavior is determined. Metrics are collected over the specified period (durationSeconds) from all reporting devices in your account and statistical ranks are calculated. Then, the measurements from a device are collected over the same period. If the accumulated measurements from the device fall above or below (comparisonOperator) the value associated with the percentile specified, then the device is considered to be in compliance with the behavior, otherwise a violation occurs.

    • alertTargets — (map<map>)

      Where the alerts are sent. (Alerts are always sent to the console.)

      • alertTargetArnrequired — (String)

        The ARN of the notification target to which alerts are sent.

      • roleArnrequired — (String)

        The ARN of the role that grants permission to send alerts to the notification target.

    • additionalMetricsToRetain — (Array<String>)

      A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's behaviors but it is also retained for any metric specified here.

    • deleteBehaviors — (Boolean)

      If true, delete all behaviors defined for this security profile. If any behaviors are defined in the current invocation an exception occurs.

    • deleteAlertTargets — (Boolean)

      If true, delete all alertTargets defined for this security profile. If any alertTargets are defined in the current invocation an exception occurs.

    • deleteAdditionalMetricsToRetain — (Boolean)

      If true, delete all additionalMetricsToRetain defined for this security profile. If any additionalMetricsToRetain are defined in the current invocation an exception occurs.

    • expectedVersion — (Integer)

      The expected version of the security profile. A new version is generated whenever the security profile is updated. If you specify a value that is different than the actual version, a VersionConflictException is thrown.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • securityProfileName — (String)

        The name of the security profile that was updated.

      • securityProfileArn — (String)

        The ARN of the security profile that was updated.

      • securityProfileDescription — (String)

        The description of the security profile.

      • behaviors — (Array<map>)

        Specifies the behaviors that, when violated by a device (thing), cause an alert.

        • namerequired — (String)

          The name you have given to the behavior.

        • metric — (String)

          What is measured by the behavior.

        • criteria — (map)

          The criteria that determine if a device is behaving normally in regard to the metric.

          • comparisonOperator — (String)

            The operator that relates the thing measured (metric) to the criteria (containing a value or statisticalThreshold).

            Possible values include:
            • "less-than"
            • "less-than-equals"
            • "greater-than"
            • "greater-than-equals"
            • "in-cidr-set"
            • "not-in-cidr-set"
            • "in-port-set"
            • "not-in-port-set"
          • value — (map)

            The value to be compared with the metric.

            • count — (Integer)

              If the comparisonOperator calls for a numeric value, use this to specify that numeric value to be compared with the metric.

            • cidrs — (Array<String>)

              If the comparisonOperator calls for a set of CIDRs, use this to specify that set to be compared with the metric.

            • ports — (Array<Integer>)

              If the comparisonOperator calls for a set of ports, use this to specify that set to be compared with the metric.

          • durationSeconds — (Integer)

            Use this to specify the time duration over which the behavior is evaluated, for those criteria which have a time dimension (for example, NUM_MESSAGES_SENT). For a statisticalThreshhold metric comparison, measurements from all devices are accumulated over this time duration before being used to calculate percentiles, and later, measurements from an individual device are also accumulated over this time duration before being given a percentile rank.

          • consecutiveDatapointsToAlarm — (Integer)

            If a device is in violation of the behavior for the specified number of consecutive datapoints, an alarm occurs. If not specified, the default is 1.

          • consecutiveDatapointsToClear — (Integer)

            If an alarm has occurred and the offending device is no longer in violation of the behavior for the specified number of consecutive datapoints, the alarm is cleared. If not specified, the default is 1.

          • statisticalThreshold — (map)

            A statistical ranking (percentile) which indicates a threshold value by which a behavior is determined to be in compliance or in violation of the behavior.

            • statistic — (String)

              The percentile which resolves to a threshold value by which compliance with a behavior is determined. Metrics are collected over the specified period (durationSeconds) from all reporting devices in your account and statistical ranks are calculated. Then, the measurements from a device are collected over the same period. If the accumulated measurements from the device fall above or below (comparisonOperator) the value associated with the percentile specified, then the device is considered to be in compliance with the behavior, otherwise a violation occurs.

      • alertTargets — (map<map>)

        Where the alerts are sent. (Alerts are always sent to the console.)

        • alertTargetArnrequired — (String)

          The ARN of the notification target to which alerts are sent.

        • roleArnrequired — (String)

          The ARN of the role that grants permission to send alerts to the notification target.

      • additionalMetricsToRetain — (Array<String>)

        A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the security profile's behaviors but it is also retained for any metric specified here.

      • version — (Integer)

        The updated version of the security profile.

      • creationDate — (Date)

        The time the security profile was created.

      • lastModifiedDate — (Date)

        The time the security profile was last modified.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateStream(params = {}, callback) ⇒ AWS.Request

Updates an existing stream. The stream version will be incremented by one.

Service Reference:

Examples:

Calling the updateStream operation

var params = {
  streamId: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE',
  files: [
    {
      fileId: 'NUMBER_VALUE',
      s3Location: {
        bucket: 'STRING_VALUE',
        key: 'STRING_VALUE',
        version: 'STRING_VALUE'
      }
    },
    /* more items */
  ],
  roleArn: 'STRING_VALUE'
};
iot.updateStream(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • streamId — (String)

      The stream ID.

    • description — (String)

      The description of the stream.

    • files — (Array<map>)

      The files associated with the stream.

      • fileId — (Integer)

        The file ID.

      • s3Location — (map)

        The location of the file in S3.

        • bucket — (String)

          The S3 bucket.

        • key — (String)

          The S3 key.

        • version — (String)

          The S3 bucket version.

    • roleArn — (String)

      An IAM role that allows the IoT service principal assumes to access your S3 files.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • streamId — (String)

        The stream ID.

      • streamArn — (String)

        The stream ARN.

      • description — (String)

        A description of the stream.

      • streamVersion — (Integer)

        The stream version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateThing(params = {}, callback) ⇒ AWS.Request

Updates the data for a thing.

Service Reference:

Examples:

Calling the updateThing operation

var params = {
  thingName: 'STRING_VALUE', /* required */
  attributePayload: {
    attributes: {
      '<AttributeName>': 'STRING_VALUE',
      /* '<AttributeName>': ... */
    },
    merge: true || false
  },
  expectedVersion: 'NUMBER_VALUE',
  removeThingType: true || false,
  thingTypeName: 'STRING_VALUE'
};
iot.updateThing(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingName — (String)

      The name of the thing to update.

    • thingTypeName — (String)

      The name of the thing type.

    • attributePayload — (map)

      A list of thing attributes, a JSON string containing name-value pairs. For example:

      {\"attributes\":{\"name1\":\"value2\"}}

      This data is used to add new attributes or update existing attributes.

      • attributes — (map<String>)

        A JSON string containing up to three key-value pair in JSON format. For example:

        {\"attributes\":{\"string1\":\"string2\"}}

      • merge — (Boolean)

        Specifies whether the list of attributes provided in the AttributePayload is merged with the attributes stored in the registry, instead of overwriting them.

        To remove an attribute, call UpdateThing with an empty attribute value.

        Note: The merge attribute is only valid when calling UpdateThing.
    • expectedVersion — (Integer)

      The expected version of the thing record in the registry. If the version of the record in the registry does not match the expected version specified in the request, the UpdateThing request is rejected with a VersionConflictException.

    • removeThingType — (Boolean)

      Remove a thing type association. If true, the association is removed.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateThingGroup(params = {}, callback) ⇒ AWS.Request

Update a thing group.

Service Reference:

Examples:

Calling the updateThingGroup operation

var params = {
  thingGroupName: 'STRING_VALUE', /* required */
  thingGroupProperties: { /* required */
    attributePayload: {
      attributes: {
        '<AttributeName>': 'STRING_VALUE',
        /* '<AttributeName>': ... */
      },
      merge: true || false
    },
    thingGroupDescription: 'STRING_VALUE'
  },
  expectedVersion: 'NUMBER_VALUE'
};
iot.updateThingGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingGroupName — (String)

      The thing group to update.

    • thingGroupProperties — (map)

      The thing group properties.

      • thingGroupDescription — (String)

        The thing group description.

      • attributePayload — (map)

        The thing group attributes in JSON format.

        • attributes — (map<String>)

          A JSON string containing up to three key-value pair in JSON format. For example:

          {\"attributes\":{\"string1\":\"string2\"}}

        • merge — (Boolean)

          Specifies whether the list of attributes provided in the AttributePayload is merged with the attributes stored in the registry, instead of overwriting them.

          To remove an attribute, call UpdateThing with an empty attribute value.

          Note: The merge attribute is only valid when calling UpdateThing.
    • expectedVersion — (Integer)

      The expected version of the thing group. If this does not match the version of the thing group being updated, the update will fail.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • version — (Integer)

        The version of the updated thing group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateThingGroupsForThing(params = {}, callback) ⇒ AWS.Request

Updates the groups to which the thing belongs.

Service Reference:

Examples:

Calling the updateThingGroupsForThing operation

var params = {
  overrideDynamicGroups: true || false,
  thingGroupsToAdd: [
    'STRING_VALUE',
    /* more items */
  ],
  thingGroupsToRemove: [
    'STRING_VALUE',
    /* more items */
  ],
  thingName: 'STRING_VALUE'
};
iot.updateThingGroupsForThing(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • thingName — (String)

      The thing whose group memberships will be updated.

    • thingGroupsToAdd — (Array<String>)

      The groups to which the thing will be added.

    • thingGroupsToRemove — (Array<String>)

      The groups from which the thing will be removed.

    • overrideDynamicGroups — (Boolean)

      Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

validateSecurityProfileBehaviors(params = {}, callback) ⇒ AWS.Request

Validates a Device Defender security profile behaviors specification.

Examples:

Calling the validateSecurityProfileBehaviors operation

var params = {
  behaviors: [ /* required */
    {
      name: 'STRING_VALUE', /* required */
      criteria: {
        comparisonOperator: less-than | less-than-equals | greater-than | greater-than-equals | in-cidr-set | not-in-cidr-set | in-port-set | not-in-port-set,
        consecutiveDatapointsToAlarm: 'NUMBER_VALUE',
        consecutiveDatapointsToClear: 'NUMBER_VALUE',
        durationSeconds: 'NUMBER_VALUE',
        statisticalThreshold: {
          statistic: 'STRING_VALUE'
        },
        value: {
          cidrs: [
            'STRING_VALUE',
            /* more items */
          ],
          count: 'NUMBER_VALUE',
          ports: [
            'NUMBER_VALUE',
            /* more items */
          ]
        }
      },
      metric: 'STRING_VALUE'
    },
    /* more items */
  ]
};
iot.validateSecurityProfileBehaviors(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • behaviors — (Array<map>)

      Specifies the behaviors that, when violated by a device (thing), cause an alert.

      • namerequired — (String)

        The name you have given to the behavior.

      • metric — (String)

        What is measured by the behavior.

      • criteria — (map)

        The criteria that determine if a device is behaving normally in regard to the metric.

        • comparisonOperator — (String)

          The operator that relates the thing measured (metric) to the criteria (containing a value or statisticalThreshold).

          Possible values include:
          • "less-than"
          • "less-than-equals"
          • "greater-than"
          • "greater-than-equals"
          • "in-cidr-set"
          • "not-in-cidr-set"
          • "in-port-set"
          • "not-in-port-set"
        • value — (map)

          The value to be compared with the metric.

          • count — (Integer)

            If the comparisonOperator calls for a numeric value, use this to specify that numeric value to be compared with the metric.

          • cidrs — (Array<String>)

            If the comparisonOperator calls for a set of CIDRs, use this to specify that set to be compared with the metric.

          • ports — (Array<Integer>)

            If the comparisonOperator calls for a set of ports, use this to specify that set to be compared with the metric.

        • durationSeconds — (Integer)

          Use this to specify the time duration over which the behavior is evaluated, for those criteria which have a time dimension (for example, NUM_MESSAGES_SENT). For a statisticalThreshhold metric comparison, measurements from all devices are accumulated over this time duration before being used to calculate percentiles, and later, measurements from an individual device are also accumulated over this time duration before being given a percentile rank.

        • consecutiveDatapointsToAlarm — (Integer)

          If a device is in violation of the behavior for the specified number of consecutive datapoints, an alarm occurs. If not specified, the default is 1.

        • consecutiveDatapointsToClear — (Integer)

          If an alarm has occurred and the offending device is no longer in violation of the behavior for the specified number of consecutive datapoints, the alarm is cleared. If not specified, the default is 1.

        • statisticalThreshold — (map)

          A statistical ranking (percentile) which indicates a threshold value by which a behavior is determined to be in compliance or in violation of the behavior.

          • statistic — (String)

            The percentile which resolves to a threshold value by which compliance with a behavior is determined. Metrics are collected over the specified period (durationSeconds) from all reporting devices in your account and statistical ranks are calculated. Then, the measurements from a device are collected over the same period. If the accumulated measurements from the device fall above or below (comparisonOperator) the value associated with the percentile specified, then the device is considered to be in compliance with the behavior, otherwise a violation occurs.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • valid — (Boolean)

        True if the behaviors were valid.

      • validationErrors — (Array<map>)

        The list of any errors found in the behaviors.

        • errorMessage — (String)

          The description of an error found in the behaviors.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.