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.

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 collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

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.

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.

    • 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.

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

Adds a thing to a thing group.

Service Reference:

Examples:

Calling the addThingToThingGroup operation

var params = {
  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.

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.

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

Attaches the specified principal to the specified thing.

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.

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.

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'
};
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.

    • comment — (String)

      An optional comment string describing why the job was canceled.

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.

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.

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.

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 */
  ],
  description: 'STRING_VALUE',
  document: 'STRING_VALUE',
  documentParameters: {
    '<ParameterKey>': 'STRING_VALUE',
    /* '<ParameterKey>': ... */
  },
  documentSource: 'STRING_VALUE',
  jobExecutionsRolloutConfig: {
    maximumPerMinute: 0
  },
  presignedUrlConfig: {
    expiresInSec: 0,
    roleArn: 'STRING_VALUE'
  },
  targetSelection: CONTINUOUS | SNAPSHOT
};
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.

    • 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.

    • documentParameters — (map<String>)

      Parameters for the job document.

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.

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: 0
};
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.

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

Creates a thing record in the thing registry.

Service Reference:

Examples:

Calling the createThing operation

var params = {
  thingName: 'STRING_VALUE', /* required */
  attributePayload: {
    attributes: {
      '<AttributeName>': 'STRING_VALUE',
      /* '<AttributeName>': ... */
    },
    merge: true || false
  },
  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.

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.

Service Reference:

Examples:

Calling the createThingGroup operation

var params = {
  thingGroupName: 'STRING_VALUE', /* required */
  parentGroupName: 'STRING_VALUE',
  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.

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 */
  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.

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: {
            tableName: 'STRING_VALUE' /* required */
          },
          roleArn: 'STRING_VALUE'
        },
        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'
        },
        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
        }
      },
      /* 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: {
          tableName: 'STRING_VALUE' /* required */
        },
        roleArn: 'STRING_VALUE'
      },
      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'
      },
      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
      }
    },
    ruleDisabled: true || false
  }
};
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.

          • roleArn — (String)

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

          • putItem — (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)

            The message format of the message to publish. Optional. 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 http://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.

      • 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.

          • roleArn — (String)

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

          • putItem — (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)

            The message format of the message to publish. Optional. 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 http://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.

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.

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.

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.

    • 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.

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.

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

Deletes the specified thing.

Service Reference:

Examples:

Calling the deleteThing operation

var params = {
  thingName: 'STRING_VALUE', /* required */
  expectedVersion: 0
};
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: 0
};
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.

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.

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"
      • 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.

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.

        • 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.

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.

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:

        1. REGISTRY – Your thing index will contain only registry data.

        2. REGISTRY_AND_SHADOW - Your thing index will contain registry and shadow 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, or COMPLETED.

          Possible values include:
          • "IN_PROGRESS"
          • "CANCELED"
          • "COMPLETED"
        • 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.

        • createdAt — (Date)

          The time, in milliseconds since the epoch, when the job was created.

        • lastUpdatedAt — (Date)

          The time, in milliseconds since the epoch, when the job was last updated.

        • completedAt — (Date)

          The time, in milliseconds since the epoch, when the job was completed.

        • jobProcessDetails — (map)

          Details about the job process.

          • processingTargets — (Array<String>)

            The devices on which the job is executing.

          • 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.

        • documentParameters — (map<String>)

          The parameters specified for the job document.

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: 0
};
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, SUCCESS, CANCELED, or REJECTED).

          Possible values include:
          • "QUEUED"
          • "IN_PROGRESS"
          • "SUCCEEDED"
          • "FAILED"
          • "REJECTED"
          • "REMOVED"
          • "CANCELED"
        • 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 milliseconds since the epoch, when the job execution was queued.

        • startedAt — (Date)

          The time, in milliseconds since the epoch, when the job execution started.

        • lastUpdatedAt — (Date)

          The time, in milliseconds 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.

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.

        • 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.

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.

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.

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.

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

Detaches the specified principal from the specified thing.

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 effective policies.

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.

        • thingIndexingMode — (String)

          Thing indexing mode. Valid values are:

          • REGISTRY – Your thing index will contain only registry data.

          • REGISTRY_AND_SHADOW - Your thing index will contain registry and shadow data.

          • OFF - Thing indexing is disabled.

          Possible values include:
          • "OFF"
          • "REGISTRY"
          • "REGISTRY_AND_SHADOW"

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.

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.

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.

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.

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.

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.

            • roleArn — (String)

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

            • putItem — (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)

              The message format of the message to publish. Optional. 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 http://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.

        • 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.

            • roleArn — (String)

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

            • putItem — (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)

              The message format of the message to publish. Optional. 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 http://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.

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.

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: 0,
  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.

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: 0,
  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.

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: 0
};
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: 0
};
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.

        • 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: 0
};
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.

        • 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: 0,
  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: 0,
  nextToken: 'STRING_VALUE',
  status: QUEUED | IN_PROGRESS | SUCCEEDED | FAILED | 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"
      • "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"
            • "REJECTED"
            • "REMOVED"
            • "CANCELED"
          • queuedAt — (Date)

            The time, in milliseconds since the epoch, when the job execution was queued.

          • startedAt — (Date)

            The time, in milliseconds since the epoch, when the job execution started.

          • lastUpdatedAt — (Date)

            The time, in milliseconds 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: 0,
  nextToken: 'STRING_VALUE',
  status: QUEUED | IN_PROGRESS | SUCCEEDED | FAILED | 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"
      • "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"
            • "REJECTED"
            • "REMOVED"
            • "CANCELED"
          • queuedAt — (Date)

            The time, in milliseconds since the epoch, when the job execution was queued.

          • startedAt — (Date)

            The time, in milliseconds since the epoch, when the job execution started.

          • lastUpdatedAt — (Date)

            The time, in milliseconds 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: 0,
  nextToken: 'STRING_VALUE',
  status: IN_PROGRESS | CANCELED | COMPLETED,
  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"
    • 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"
        • createdAt — (Date)

          The time, in milliseconds since the epoch, when the job was created.

        • lastUpdatedAt — (Date)

          The time, in milliseconds since the epoch, when the job was last updated.

        • completedAt — (Date)

          The time, in milliseconds 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.

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: 0
};
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: 0
};
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: 0
};
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: 0
};
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.

Service Reference:

Examples:

Calling the listPrincipalThings operation

var params = {
  principal: 'STRING_VALUE', /* required */
  maxResults: 0,
  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 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 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: 0
};
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.

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: 0
};
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.

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

List the thing groups in your account.

Service Reference:

Examples:

Calling the listThingGroups operation

var params = {
  maxResults: 0,
  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 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.

    • 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: 0,
  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 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:

      • 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.

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: 0,
  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 to retrieve the next set of 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: 0,
  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 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.

    • 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: 0,
  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 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 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.

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: 0,
  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 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:

      • 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: 0,
  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 for the next set of results, or null if there are no additional 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: 0,
  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: 0,
  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.

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 CA 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: {})
    • templateBody — (String)

      The provisioning template.

    • parameters — (map<String>)

      The parameters for provisioning a 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:

      • certificatePem — (String)

        The PEM of a certificate.

      • 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.

    • 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.

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: {
            tableName: 'STRING_VALUE' /* required */
          },
          roleArn: 'STRING_VALUE'
        },
        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'
        },
        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
        }
      },
      /* 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: {
          tableName: 'STRING_VALUE' /* required */
        },
        roleArn: 'STRING_VALUE'
      },
      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'
      },
      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
      }
    },
    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.

          • roleArn — (String)

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

          • putItem — (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)

            The message format of the message to publish. Optional. 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 http://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.

      • 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.

          • roleArn — (String)

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

          • putItem — (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)

            The message format of the message to publish. Optional. 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 http://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.

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: 0,
  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 thing shadow.

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.

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 role ARN that allows IoT to write to Cloudwatch logs.

    • defaultLogLevel — (String)

      The default logging level.

      Possible values include:
      • "DEBUG"
      • "INFO"
      • "ERROR"
      • "WARN"
      • "DISABLED"
    • disableAllLogs — (Boolean)

      Set to true to disable all logs, otherwise set to 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.

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.

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

Test custom authorization.

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

Invoke the specified custom authorizer for testing purposes.

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.

    • 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.

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.

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.

    • 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.

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 = {
  thingIndexingConfiguration: {
    thingIndexingMode: OFF | REGISTRY | REGISTRY_AND_SHADOW
  }
};
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.

      • thingIndexingMode — (String)

        Thing indexing mode. Valid values are:

        • REGISTRY – Your thing index will contain only registry data.

        • REGISTRY_AND_SHADOW - Your thing index will contain registry and shadow data.

        • OFF - Thing indexing is disabled.

        Possible values include:
        • "OFF"
        • "REGISTRY"
        • "REGISTRY_AND_SHADOW"

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: 0,
  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.

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: 0,
  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: 0
};
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 = {
  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.

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.