We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.Iot

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

Overview

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

Service Description

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

The service endpoints that expose this API are listed in Amazon Web Services IoT Core Endpoints and Quotas. You must use the endpoint for the region that has the resources you want to access.

The service name used by Amazon Web Services Signature Version 4 to sign the request is: execute-api.

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

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

Sending a Request Using Iot

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

Locking the API Version

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

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

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

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

var iot = new AWS.Iot();

Version:

  • 2015-05-28

Constructor Summary 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|AWS.Endpoint)

    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' or an Endpoint object.

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

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets 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 error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

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

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

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

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

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

  • logger (#write, #log)

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

  • systemClockOffset (Number)

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

  • signatureVersion (String)

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

  • signatureCache (Boolean)

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

  • dynamoDbCrc32 (Boolean)

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

  • useAccelerateEndpoint (Boolean)

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

  • clientSideMonitoring (Boolean)

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

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

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

  • hostPrefixEnabled (Boolean)

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

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

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.

Requires permission to access the AcceptCertificateTransfer action.

Service Reference:

Examples:

Calling the acceptCertificateTransfer operation

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

Parameters:

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

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

    • setAsActive — (Boolean)

      Specifies whether the certificate is active.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Adds a thing to a billing group.

Requires permission to access the AddThingToBillingGroup action.

Service Reference:

Examples:

Calling the addThingToBillingGroup operation

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

Parameters:

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

      The name of the billing group.

      Note: This call is asynchronous. It might take several seconds for the detachment to propagate.
    • billingGroupArn — (String)

      The ARN of the billing group.

    • thingName — (String)

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

    • thingArn — (String)

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Adds a thing to a thing group.

Requires permission to access the AddThingToThingGroup action.

Service Reference:

Examples:

Calling the addThingToThingGroup operation

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

Parameters:

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

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

    • thingGroupArn — (String)

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

    • thingName — (String)

      The name of the thing to add to a group.

    • thingArn — (String)

      The ARN of the thing to add to a group.

    • overrideDynamicGroups — (Boolean)

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

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

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

  • The job status must currently be "IN_PROGRESS".

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

Requires permission to access the AssociateTargetsWithJob action.

Service Reference:

Examples:

Calling the associateTargetsWithJob operation

var params = {
  jobId: 'STRING_VALUE', /* required */
  targets: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  comment: 'STRING_VALUE',
  namespaceId: '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.

    • namespaceId — (String)

      The namespace used to indicate that a job is a customer-managed job.

      When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.

      $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/

      Note: The namespaceId feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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 the specified policy to the specified principal (certificate or other credential).

Requires permission to access the AttachPolicy action.

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. For example, a thing group or a 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.

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

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

Note: This action is deprecated and works as expected for backward compatibility, but we won't add enhancements. Use AttachPolicy instead.

Requires permission to access the AttachPrincipalPolicy action.

Service Reference:

Examples:

Calling the attachPrincipalPolicy operation

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

Parameters:

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

      The policy name.

    • principal — (String)

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

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

Requires permission to access the AttachSecurityProfile action.

Service Reference:

Examples:

Calling the attachSecurityProfile operation

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

Parameters:

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

      The security profile that is attached.

    • securityProfileTargetArn — (String)

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Attaches the specified principal to the specified thing. A principal can be X.509 certificates, Amazon Cognito identities or federated identities.

Requires permission to access the AttachThingPrincipal action.

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

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

Cancels a mitigation action task that is in progress. If the task is not in progress, an InvalidRequestException occurs.

Requires permission to access the CancelAuditMitigationActionsTask action.

Examples:

Calling the cancelAuditMitigationActionsTask operation

var params = {
  taskId: 'STRING_VALUE' /* required */
};
iot.cancelAuditMitigationActionsTask(params, 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 unique identifier for the task that you want to cancel.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

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

Requires permission to access the CancelAuditTask action.

Service Reference:

Examples:

Calling the cancelAuditTask operation

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

Parameters:

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

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Cancels a pending transfer for the specified certificate.

Note Only the transfer source account can use this operation to cancel a transfer. (Transfer destinations can use RejectCertificateTransfer instead.) After transfer, 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.

Requires permission to access the CancelCertificateTransfer action.

Service Reference:

Examples:

Calling the cancelCertificateTransfer operation

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

Parameters:

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

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Cancels a Device Defender ML Detect mitigation action.

Requires permission to access the CancelDetectMitigationActionsTask action.

Examples:

Calling the cancelDetectMitigationActionsTask operation

var params = {
  taskId: 'STRING_VALUE' /* required */
};
iot.cancelDetectMitigationActionsTask(params, 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 unique identifier of the task.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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.

Requires permission to access the CancelJob action.

Service Reference:

Examples:

Calling the cancelJob operation

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

Parameters:

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

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

    • reasonCode — (String)

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

    • comment — (String)

      An optional comment string describing why the job was canceled.

    • force — (Boolean)

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

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • jobArn — (String)

        The job ARN.

      • jobId — (String)

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

      • description — (String)

        A short text description of the job.

Returns:

  • (AWS.Request)

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

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

Cancels the execution of a job for a given thing.

Requires permission to access the CancelJobExecution action.

Service Reference:

Examples:

Calling the cancelJobExecution operation

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

Parameters:

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

      The ID of the job to be canceled.

    • thingName — (String)

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

    • force — (Boolean)

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

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

    • expectedVersion — (Integer)

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

    • statusDetails — (map<String>)

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Clears the default authorizer.

Requires permission to access the ClearDefaultAuthorizer action.

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.

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

Confirms a topic rule destination. When you create a rule requiring a destination, IoT sends a confirmation message to the endpoint or base address you specify. The message includes a token which you pass back when calling ConfirmTopicRuleDestination to confirm that you own or have access to the endpoint.

Requires permission to access the ConfirmTopicRuleDestination action.

Service Reference:

Examples:

Calling the confirmTopicRuleDestination operation

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

Parameters:

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

      The token used to confirm ownership or access to the topic rule confirmation URL.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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.

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

Creates a Device Defender audit suppression.

Requires permission to access the CreateAuditSuppression action.

Service Reference:

Examples:

Calling the createAuditSuppression operation

var params = {
  checkName: 'STRING_VALUE', /* required */
  clientRequestToken: 'STRING_VALUE', /* required */
  resourceIdentifier: { /* required */
    account: 'STRING_VALUE',
    caCertificateId: 'STRING_VALUE',
    clientId: 'STRING_VALUE',
    cognitoIdentityPoolId: 'STRING_VALUE',
    deviceCertificateArn: 'STRING_VALUE',
    deviceCertificateId: 'STRING_VALUE',
    iamRoleArn: 'STRING_VALUE',
    issuerCertificateIdentifier: {
      issuerCertificateSerialNumber: 'STRING_VALUE',
      issuerCertificateSubject: 'STRING_VALUE',
      issuerId: 'STRING_VALUE'
    },
    policyVersionIdentifier: {
      policyName: 'STRING_VALUE',
      policyVersionId: 'STRING_VALUE'
    },
    roleAliasArn: 'STRING_VALUE'
  },
  description: 'STRING_VALUE',
  expirationDate: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  suppressIndefinitely: true || false
};
iot.createAuditSuppression(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      An audit check name. Checks must be enabled for your account. (Use DescribeAccountAuditConfiguration to see the list of all checks, including those that are enabled or use UpdateAccountAuditConfiguration to select which checks are enabled.)

    • resourceIdentifier — (map)

      Information that identifies the noncompliant resource.

      • deviceCertificateId — (String)

        The ID of the certificate attached to the resource.

      • caCertificateId — (String)

        The ID of the CA certificate used to authorize the certificate.

      • cognitoIdentityPoolId — (String)

        The ID of the Amazon Cognito identity pool.

      • clientId — (String)

        The client ID.

      • policyVersionIdentifier — (map)

        The version of the policy associated with the resource.

        • policyName — (String)

          The name of the policy.

        • policyVersionId — (String)

          The ID of the version of the policy associated with the resource.

      • account — (String)

        The account with which the resource is associated.

      • iamRoleArn — (String)

        The ARN of the IAM role that has overly permissive actions.

      • roleAliasArn — (String)

        The ARN of the role alias that has overly permissive actions.

      • issuerCertificateIdentifier — (map)

        The issuer certificate identifier.

        • issuerCertificateSubject — (String)

          The subject of the issuer certificate.

        • issuerId — (String)

          The issuer ID.

        • issuerCertificateSerialNumber — (String)

          The issuer certificate serial number.

      • deviceCertificateArn — (String)

        The ARN of the identified device certificate.

    • expirationDate — (Date)

      The epoch timestamp in seconds at which this suppression expires.

    • suppressIndefinitely — (Boolean)

      Indicates whether a suppression should exist indefinitely or not.

    • description — (String)

      The description of the audit suppression.

    • clientRequestToken — (String)

      Each audit supression must have a unique client request token. If you try to create a new audit suppression with the same token as one that already exists, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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.

Requires permission to access the CreateAuthorizer action.

Service Reference:

Examples:

Calling the createAuthorizer operation

var params = {
  authorizerFunctionArn: 'STRING_VALUE', /* required */
  authorizerName: 'STRING_VALUE', /* required */
  enableCachingForHttp: true || false,
  signingDisabled: true || false,
  status: ACTIVE | INACTIVE,
  tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE'
    },
    /* more items */
  ],
  tokenKeyName: 'STRING_VALUE',
  tokenSigningPublicKeys: {
    '<KeyName>': 'STRING_VALUE',
    /* '<KeyName>': ... */
  }
};
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"
    • tags — (Array<map>)

      Metadata which can be used to manage the custom authorizer.

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

        The tag's key.

      • Value — (String)

        The tag's value.

    • signingDisabled — (Boolean)

      Specifies whether IoT validates the token signature in an authorization request.

    • enableCachingForHttp — (Boolean)

      When true, the result from the authorizer’s Lambda function is cached for clients that use persistent HTTP connections. The results are cached for the time specified by the Lambda function in refreshAfterInSeconds. This value does not affect authorization of clients that use MQTT connections.

      The default value is false.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • authorizerName — (String)

        The authorizer's name.

      • authorizerArn — (String)

        The authorizer ARN.

Returns:

  • (AWS.Request)

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

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

Creates a billing group.

Requires permission to access the CreateBillingGroup action.

Service Reference:

Examples:

Calling the createBillingGroup operation

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

Parameters:

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

      The name you wish to give to the billing group.

    • billingGroupProperties — (map)

      The properties of the billing group.

      • billingGroupDescription — (String)

        The description of the billing group.

    • tags — (Array<map>)

      Metadata which can be used to manage the billing group.

      • Keyrequired — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • billingGroupName — (String)

        The name you gave to the billing group.

      • billingGroupArn — (String)

        The ARN of the billing group.

      • billingGroupId — (String)

        The ID of the billing group.

Returns:

  • (AWS.Request)

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

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

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

Requires permission to access the CreateCertificateFromCsr action.

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, NIST P-384, or NIST P-521 curves. For supported certificates, consult Certificate signing algorithms supported by IoT.
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. In the following commands, we assume that 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 Amazon Web Services CLI command to create a certificate for the corresponding CSR.

You can also run the aws iot create-certificate-from-csr part of the command 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 | %{aws 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.

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

Creates an Amazon Web Services IoT Core certificate provider. You can use Amazon Web Services IoT Core certificate provider to customize how to sign a certificate signing request (CSR) in IoT fleet provisioning. For more information, see Customizing certificate signing using Amazon Web Services IoT Core certificate provider from Amazon Web Services IoT Core Developer Guide.

Requires permission to access the CreateCertificateProvider action.

After you create a certificate provider, the behavior of CreateCertificateFromCsr API for fleet provisioning will change and all API calls to CreateCertificateFromCsr will invoke the certificate provider to create the certificates. It can take up to a few minutes for this behavior to change after a certificate provider is created.

Service Reference:

Examples:

Calling the createCertificateProvider operation

var params = {
  accountDefaultForOperations: [ /* required */
    CreateCertificateFromCsr,
    /* more items */
  ],
  certificateProviderName: 'STRING_VALUE', /* required */
  lambdaFunctionArn: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE',
  tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
iot.createCertificateProvider(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      The name of the certificate provider.

    • lambdaFunctionArn — (String)

      The ARN of the Lambda function that defines the authentication logic.

    • accountDefaultForOperations — (Array<String>)

      A list of the operations that the certificate provider will use to generate certificates. Valid value: CreateCertificateFromCsr.

    • clientToken — (String)

      A string that you can optionally pass in the CreateCertificateProvider request to make sure the request is idempotent.

      If a token is not provided, the SDK will use a version 4 UUID.
    • tags — (Array<map>)

      Metadata which can be used to manage the certificate provider.

      • Keyrequired — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • certificateProviderName — (String)

        The name of the certificate provider.

      • certificateProviderArn — (String)

        The ARN of the certificate provider.

Returns:

  • (AWS.Request)

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

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

Use this API to define a Custom Metric published by your devices to Device Defender.

Requires permission to access the CreateCustomMetric action.

Service Reference:

Examples:

Calling the createCustomMetric operation

var params = {
  clientRequestToken: 'STRING_VALUE', /* required */
  metricName: 'STRING_VALUE', /* required */
  metricType: string-list | ip-address-list | number-list | number, /* required */
  displayName: 'STRING_VALUE',
  tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
iot.createCustomMetric(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      The name of the custom metric. This will be used in the metric report submitted from the device/thing. The name can't begin with aws:. You can't change the name after you define it.

    • displayName — (String)

      The friendly name in the console for the custom metric. This name doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. You can update the friendly name after you define it.

    • metricType — (String)

      The type of the custom metric.

      The type number only takes a single metric value as an input, but when you submit the metrics value in the DeviceMetrics report, you must pass it as an array with a single value.

      Possible values include:
      • "string-list"
      • "ip-address-list"
      • "number-list"
      • "number"
    • tags — (Array<map>)

      Metadata that can be used to manage the custom metric.

      • Keyrequired — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

    • clientRequestToken — (String)

      Each custom metric must have a unique client request token. If you try to create a new custom metric that already exists with a different token, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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:

      • metricName — (String)

        The name of the custom metric to be used in the metric report.

      • metricArn — (String)

        The Amazon Resource Number (ARN) of the custom metric. For example, arn:aws-partition:iot:region:accountId:custommetric/metricName

Returns:

  • (AWS.Request)

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

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

Create a dimension that you can use to limit the scope of a metric used in a security profile for IoT Device Defender. For example, using a TOPIC_FILTER dimension, you can narrow down the scope of the metric only to MQTT topics whose name match the pattern specified in the dimension.

Requires permission to access the CreateDimension action.

Service Reference:

Examples:

Calling the createDimension operation

var params = {
  clientRequestToken: 'STRING_VALUE', /* required */
  name: 'STRING_VALUE', /* required */
  stringValues: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  type: TOPIC_FILTER, /* required */
  tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
iot.createDimension(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      A unique identifier for the dimension. Choose something that describes the type and value to make it easy to remember what it does.

    • type — (String)

      Specifies the type of dimension. Supported types: TOPIC_FILTER.

      Possible values include:
      • "TOPIC_FILTER"
    • stringValues — (Array<String>)

      Specifies the value or list of values for the dimension. For TOPIC_FILTER dimensions, this is a pattern used to match the MQTT topic (for example, "admin/#").

    • tags — (Array<map>)

      Metadata that can be used to manage the dimension.

      • Keyrequired — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

    • clientRequestToken — (String)

      Each dimension must have a unique client request token. If you try to create a new dimension with the same token as a dimension that already exists, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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:

      • name — (String)

        A unique identifier for the dimension.

      • arn — (String)

        The Amazon Resource Name (ARN) of the created dimension.

Returns:

  • (AWS.Request)

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

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

Creates a domain configuration.

Requires permission to access the CreateDomainConfiguration action.

Service Reference:

Examples:

Calling the createDomainConfiguration operation

var params = {
  domainConfigurationName: 'STRING_VALUE', /* required */
  authorizerConfig: {
    allowAuthorizerOverride: true || false,
    defaultAuthorizerName: 'STRING_VALUE'
  },
  domainName: 'STRING_VALUE',
  serverCertificateArns: [
    'STRING_VALUE',
    /* more items */
  ],
  serverCertificateConfig: {
    enableOCSPCheck: true || false
  },
  serviceType: DATA | CREDENTIAL_PROVIDER | JOBS,
  tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE'
    },
    /* more items */
  ],
  tlsConfig: {
    securityPolicy: 'STRING_VALUE'
  },
  validationCertificateArn: 'STRING_VALUE'
};
iot.createDomainConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      The name of the domain configuration. This value must be unique to a region.

    • domainName — (String)

      The name of the domain.

    • serverCertificateArns — (Array<String>)

      The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains.

    • validationCertificateArn — (String)

      The certificate used to validate the server certificate and prove domain name ownership. This certificate must be signed by a public certificate authority. This value is not required for Amazon Web Services-managed domains.

    • authorizerConfig — (map)

      An object that specifies the authorization service for a domain.

      • defaultAuthorizerName — (String)

        The name of the authorization service for a domain configuration.

      • allowAuthorizerOverride — (Boolean)

        A Boolean that specifies whether the domain configuration's authorization service can be overridden.

    • serviceType — (String)

      The type of service delivered by the endpoint.

      Note: Amazon Web Services IoT Core currently supports only the DATA service type.
      Possible values include:
      • "DATA"
      • "CREDENTIAL_PROVIDER"
      • "JOBS"
    • tags — (Array<map>)

      Metadata which can be used to manage the domain configuration.

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

        The tag's key.

      • Value — (String)

        The tag's value.

    • tlsConfig — (map)

      An object that specifies the TLS configuration for a domain.

      • securityPolicy — (String)

        The security policy for a domain configuration. For more information, see Security policies in the Amazon Web Services IoT Core developer guide.

    • serverCertificateConfig — (map)

      The server certificate 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. The data object has the following properties:

      • domainConfigurationName — (String)

        The name of the domain configuration.

      • domainConfigurationArn — (String)

        The ARN of the domain configuration.

Returns:

  • (AWS.Request)

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

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

Creates a dynamic thing group.

Requires permission to access the CreateDynamicThingGroup action.

Service Reference:

Examples:

Calling the createDynamicThingGroup operation

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

Parameters:

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

      The dynamic thing group name to create.

    • thingGroupProperties — (map)

      The dynamic thing group properties.

      • thingGroupDescription — (String)

        The thing group description.

      • attributePayload — (map)

        The thing group attributes in JSON format.

        • attributes — (map<String>)

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

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

        • merge — (Boolean)

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

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

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

      The dynamic thing group index name.

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

      The dynamic thing group search query string.

      See Query Syntax for information about query string syntax.

    • queryVersion — (String)

      The dynamic thing group query version.

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

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

      • Keyrequired — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • thingGroupName — (String)

        The dynamic thing group name.

      • thingGroupArn — (String)

        The dynamic thing group ARN.

      • thingGroupId — (String)

        The dynamic thing group ID.

      • indexName — (String)

        The dynamic thing group index name.

      • queryString — (String)

        The dynamic thing group search query string.

      • queryVersion — (String)

        The dynamic thing group query version.

Returns:

  • (AWS.Request)

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

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

Creates a fleet metric.

Requires permission to access the CreateFleetMetric action.

Service Reference:

Examples:

Calling the createFleetMetric operation

var params = {
  aggregationField: 'STRING_VALUE', /* required */
  aggregationType: { /* required */
    name: Statistics | Percentiles | Cardinality, /* required */
    values: [
      'STRING_VALUE',
      /* more items */
    ]
  },
  metricName: 'STRING_VALUE', /* required */
  period: 'NUMBER_VALUE', /* required */
  queryString: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE',
  indexName: 'STRING_VALUE',
  queryVersion: 'STRING_VALUE',
  tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE'
    },
    /* more items */
  ],
  unit: Seconds | Microseconds | Milliseconds | Bytes | Kilobytes | Megabytes | Gigabytes | Terabytes | Bits | Kilobits | Megabits | Gigabits | Terabits | Percent | Count | Bytes/Second | Kilobytes/Second | Megabytes/Second | Gigabytes/Second | Terabytes/Second | Bits/Second | Kilobits/Second | Megabits/Second | Gigabits/Second | Terabits/Second | Count/Second | None
};
iot.createFleetMetric(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      The name of the fleet metric to create.

    • queryString — (String)

      The search query string.

    • aggregationType — (map)

      The type of the aggregation query.

      • namerequired — (String)

        The name of the aggregation type.

        Possible values include:
        • "Statistics"
        • "Percentiles"
        • "Cardinality"
      • values — (Array<String>)

        A list of the values of aggregation types.

    • period — (Integer)

      The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 day)] and must be multiple of 60.

    • aggregationField — (String)

      The field to aggregate.

    • description — (String)

      The fleet metric description.

    • queryVersion — (String)

      The query version.

    • indexName — (String)

      The name of the index to search.

    • unit — (String)

      Used to support unit transformation such as milliseconds to seconds. The unit must be supported by CW metric. Default to null.

      Possible values include:
      • "Seconds"
      • "Microseconds"
      • "Milliseconds"
      • "Bytes"
      • "Kilobytes"
      • "Megabytes"
      • "Gigabytes"
      • "Terabytes"
      • "Bits"
      • "Kilobits"
      • "Megabits"
      • "Gigabits"
      • "Terabits"
      • "Percent"
      • "Count"
      • "Bytes/Second"
      • "Kilobytes/Second"
      • "Megabytes/Second"
      • "Gigabytes/Second"
      • "Terabytes/Second"
      • "Bits/Second"
      • "Kilobits/Second"
      • "Megabits/Second"
      • "Gigabits/Second"
      • "Terabits/Second"
      • "Count/Second"
      • "None"
    • tags — (Array<map>)

      Metadata, which can be used to manage the fleet metric.

      • Keyrequired — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • metricName — (String)

        The name of the fleet metric to create.

      • metricArn — (String)

        The Amazon Resource Name (ARN) of the new fleet metric.

Returns:

  • (AWS.Request)

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

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

Creates a job.

Requires permission to access the CreateJob action.

Service Reference:

Examples:

Calling the createJob operation

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

Parameters:

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

      A job identifier which must be unique for your Amazon Web Services 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, or S3 object URL, to the job document. The link is an Amazon S3 object URL and is required if you don't specify a value for document.

      For example, --document-source https://s3.region-code.amazonaws.com/example-firmware/device-firmware.1.0

      For more information, see Methods for accessing a bucket.

    • document — (String)

      The job document. Required if you don't specify a value for documentSource.

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

        For information about addressing the confused deputy problem, see cross-service confused deputy prevention in the Amazon Web Services IoT Core developer guide.

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

      Note: We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.
      Possible values include:
      • "CONTINUOUS"
      • "SNAPSHOT"
    • jobExecutionsRolloutConfig — (map)

      Allows you to create a staged rollout of the job.

      • maximumPerMinute — (Integer)

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

      • exponentialRate — (map)

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

        • baseRatePerMinuterequired — (Integer)

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

        • incrementFactorrequired — (Float)

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

          Amazon Web Services IoT Core supports up to one digit after the decimal (for example, 1.5, but not 1.55).

        • rateIncreaseCriteriarequired — (map)

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

          • numberOfNotifiedThings — (Integer)

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

          • numberOfSucceededThings — (Integer)

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

    • abortConfig — (map)

      Allows you to create the criteria to abort a job.

      • criteriaListrequired — (Array<map>)

        The list of criteria that determine when and how to abort the job.

        • failureTyperequired — (String)

          The type of job execution failures that can initiate a job abort.

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

          The type of job action to take to initiate the job abort.

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

          The minimum percentage of job execution failures that must occur to initiate the job abort.

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

        • minNumberOfExecutedThingsrequired — (Integer)

          The minimum number of things which must receive job execution notifications before the job can be aborted.

    • timeoutConfig — (map)

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

      • inProgressTimeoutInMinutes — (Integer)

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

    • tags — (Array<map>)

      Metadata which can be used to manage the job.

      • Keyrequired — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

    • namespaceId — (String)

      The namespace used to indicate that a job is a customer-managed job.

      When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.

      $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/

      Note: The namespaceId feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.
    • jobTemplateArn — (String)

      The ARN of the job template used to create the job.

    • jobExecutionsRetryConfig — (map)

      Allows you to create the criteria to retry a job.

      • criteriaListrequired — (Array<map>)

        The list of criteria that determines how many retries are allowed for each failure type for a job.

        • failureTyperequired — (String)

          The type of job execution failures that can initiate a job retry.

          Possible values include:
          • "FAILED"
          • "TIMED_OUT"
          • "ALL"
        • numberOfRetriesrequired — (Integer)

          The number of retries allowed for a failure type for the job.

    • documentParameters — (map<String>)

      Parameters of an Amazon Web Services managed template that you can specify to create the job document.

      Note: documentParameters can only be used when creating jobs from Amazon Web Services managed templates. This parameter can't be used with custom job templates or to create jobs from them.
    • schedulingConfig — (map)

      The configuration that allows you to schedule a job for a future date and time in addition to specifying the end behavior for each job execution.

      • startTime — (String)

        The time a job will begin rollout of the job document to all devices in the target group for a job. The startTime can be scheduled up to a year in advance and must be scheduled a minimum of thirty minutes from the current time. The date and time format for the startTime is YYYY-MM-DD for the date and HH:MM for the time.

        For more information on the syntax for startTime when using an API command or the Command Line Interface, see Timestamp.

      • endTime — (String)

        The time a job will stop rollout of the job document to all devices in the target group for a job. The endTime must take place no later than two years from the current time and be scheduled a minimum of thirty minutes from the current time. The minimum duration between startTime and endTime is thirty minutes. The maximum duration between startTime and endTime is two years. The date and time format for the endTime is YYYY-MM-DD for the date and HH:MM for the time.

        For more information on the syntax for endTime when using an API command or the Command Line Interface, see Timestamp.

      • endBehavior — (String)

        Specifies the end behavior for all job executions after a job reaches the selected endTime. If endTime is not selected when creating the job, then endBehavior does not apply.

        Possible values include:
        • "STOP_ROLLOUT"
        • "CANCEL"
        • "FORCE_CANCEL"
      • maintenanceWindows — (Array<map>)

        An optional configuration within the SchedulingConfig to setup a recurring maintenance window with a predetermined start time and duration for the rollout of a job document to all devices in a target group for a job.

        • startTimerequired — (String)

          Displays the start time of the next maintenance window.

        • durationInMinutesrequired — (Integer)

          Displays the duration of the next maintenance window.

    • destinationPackageVersions — (Array<String>)

      The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.

      Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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.

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

Creates a job template.

Requires permission to access the CreateJobTemplate action.

Service Reference:

Examples:

Calling the createJobTemplate operation

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

Parameters:

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

      A unique identifier for the job template. We recommend using a UUID. Alpha-numeric characters, "-", and "_" are valid for use here.

    • jobArn — (String)

      The ARN of the job to use as the basis for the job template.

    • documentSource — (String)

      An S3 link, or S3 object URL, to the job document. The link is an Amazon S3 object URL and is required if you don't specify a value for document.

      For example, --document-source https://s3.region-code.amazonaws.com/example-firmware/device-firmware.1.0

      For more information, see Methods for accessing a bucket.

    • document — (String)

      The job document. Required if you don't specify a value for documentSource.

    • description — (String)

      A description of the job document.

    • presignedUrlConfig — (map)

      Configuration for pre-signed S3 URLs.

      • roleArn — (String)

        The ARN of an IAM role that 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.

        For information about addressing the confused deputy problem, see cross-service confused deputy prevention in the Amazon Web Services IoT Core developer guide.

      • expiresInSec — (Integer)

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

    • jobExecutionsRolloutConfig — (map)

      Allows you to create a staged rollout of a job.

      • maximumPerMinute — (Integer)

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

      • exponentialRate — (map)

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

        • baseRatePerMinuterequired — (Integer)

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

        • incrementFactorrequired — (Float)

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

          Amazon Web Services IoT Core supports up to one digit after the decimal (for example, 1.5, but not 1.55).

        • rateIncreaseCriteriarequired — (map)

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

          • numberOfNotifiedThings — (Integer)

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

          • numberOfSucceededThings — (Integer)

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

    • abortConfig — (map)

      The criteria that determine when and how a job abort takes place.

      • criteriaListrequired — (Array<map>)

        The list of criteria that determine when and how to abort the job.

        • failureTyperequired — (String)

          The type of job execution failures that can initiate a job abort.

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

          The type of job action to take to initiate the job abort.

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

          The minimum percentage of job execution failures that must occur to initiate the job abort.

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

        • minNumberOfExecutedThingsrequired — (Integer)

          The minimum number of things which must receive job execution notifications before the job can be aborted.

    • timeoutConfig — (map)

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

      • inProgressTimeoutInMinutes — (Integer)

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

    • tags — (Array<map>)

      Metadata that can be used to manage the job template.

      • Keyrequired — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

    • jobExecutionsRetryConfig — (map)

      Allows you to create the criteria to retry a job.

      • criteriaListrequired — (Array<map>)

        The list of criteria that determines how many retries are allowed for each failure type for a job.

        • failureTyperequired — (String)

          The type of job execution failures that can initiate a job retry.

          Possible values include:
          • "FAILED"
          • "TIMED_OUT"
          • "ALL"
        • numberOfRetriesrequired — (Integer)

          The number of retries allowed for a failure type for the job.

    • maintenanceWindows — (Array<map>)

      Allows you to configure an optional maintenance window for the rollout of a job document to all devices in the target group for a job.

      • startTimerequired — (String)

        Displays the start time of the next maintenance window.

      • durationInMinutesrequired — (Integer)

        Displays the duration of the next maintenance window.

    • destinationPackageVersions — (Array<String>)

      The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.

      Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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:

      • jobTemplateArn — (String)

        The ARN of the job template.

      • jobTemplateId — (String)

        The unique identifier of the job template.

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. You can also call CreateKeysAndCertificate over MQTT from a device, for more information, see Provisioning MQTT API.

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

Requires permission to access the CreateKeysAndCertificate action.

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. IoT issues a default subject name for the certificate (for example, 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.

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

Defines an action that can be applied to audit findings by using StartAuditMitigationActionsTask. Only certain types of mitigation actions can be applied to specific check names. For more information, see Mitigation actions. Each mitigation action can apply only one type of change.

Requires permission to access the CreateMitigationAction action.

Service Reference:

Examples:

Calling the createMitigationAction operation

var params = {
  actionName: 'STRING_VALUE', /* required */
  actionParams: { /* required */
    addThingsToThingGroupParams: {
      thingGroupNames: [ /* required */
        'STRING_VALUE',
        /* more items */
      ],
      overrideDynamicGroups: true || false
    },
    enableIoTLoggingParams: {
      logLevel: DEBUG | INFO | ERROR | WARN | DISABLED, /* required */
      roleArnForLogging: 'STRING_VALUE' /* required */
    },
    publishFindingToSnsParams: {
      topicArn: 'STRING_VALUE' /* required */
    },
    replaceDefaultPolicyVersionParams: {
      templateName: BLANK_POLICY /* required */
    },
    updateCACertificateParams: {
      action: DEACTIVATE /* required */
    },
    updateDeviceCertificateParams: {
      action: DEACTIVATE /* required */
    }
  },
  roleArn: 'STRING_VALUE', /* required */
  tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
iot.createMitigationAction(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      A friendly name for the action. Choose a friendly name that accurately describes the action (for example, EnableLoggingAction).

    • roleArn — (String)

      The ARN of the IAM role that is used to apply the mitigation action.

    • actionParams — (map)

      Defines the type of action and the parameters for that action.

      • updateDeviceCertificateParams — (map)

        Parameters to define a mitigation action that changes the state of the device certificate to inactive.

        • actionrequired — (String)

          The action that you want to apply to the device certificate. The only supported value is DEACTIVATE.

          Possible values include:
          • "DEACTIVATE"
      • updateCACertificateParams — (map)

        Parameters to define a mitigation action that changes the state of the CA certificate to inactive.

        • actionrequired — (String)

          The action that you want to apply to the CA certificate. The only supported value is DEACTIVATE.

          Possible values include:
          • "DEACTIVATE"
      • addThingsToThingGroupParams — (map)

        Parameters to define a mitigation action that moves devices associated with a certificate to one or more specified thing groups, typically for quarantine.

        • thingGroupNamesrequired — (Array<String>)

          The list of groups to which you want to add the things that triggered the mitigation action. You can add a thing to a maximum of 10 groups, but you can't add a thing to more than one group in the same hierarchy.

        • overrideDynamicGroups — (Boolean)

          Specifies if this mitigation action can move the things that triggered the mitigation action even if they are part of one or more dynamic thing groups.

      • replaceDefaultPolicyVersionParams — (map)

        Parameters to define a mitigation action that adds a blank policy to restrict permissions.

        • templateNamerequired — (String)

          The name of the template to be applied. The only supported value is BLANK_POLICY.

          Possible values include:
          • "BLANK_POLICY"
      • enableIoTLoggingParams — (map)

        Parameters to define a mitigation action that enables Amazon Web Services IoT Core logging at a specified level of detail.

        • roleArnForLoggingrequired — (String)

          The Amazon Resource Name (ARN) of the IAM role used for logging.

        • logLevelrequired — (String)

          Specifies the type of information to be logged.

          Possible values include:
          • "DEBUG"
          • "INFO"
          • "ERROR"
          • "WARN"
          • "DISABLED"
      • publishFindingToSnsParams — (map)

        Parameters to define a mitigation action that publishes findings to Amazon Simple Notification Service (Amazon SNS. You can implement your own custom actions in response to the Amazon SNS messages.

        • topicArnrequired — (String)

          The ARN of the topic to which you want to publish the findings.

    • tags — (Array<map>)

      Metadata that can be used to manage the mitigation action.

      • Keyrequired — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • actionArn — (String)

        The ARN for the new mitigation action.

      • actionId — (String)

        A unique identifier for the new mitigation action.

Returns:

  • (AWS.Request)

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

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

Creates an IoT OTA update on a target group of things or groups.

Requires permission to access the CreateOTAUpdate action.

Service Reference:

Examples:

Calling the createOTAUpdate operation

var params = {
  files: [ /* required */
    {
      attributes: {
        '<AttributeKey>': 'STRING_VALUE',
        /* '<AttributeKey>': ... */
      },
      codeSigning: {
        awsSignerJobId: 'STRING_VALUE',
        customCodeSigning: {
          certificateChain: {
            certificateName: 'STRING_VALUE',
            inlineDocument: 'STRING_VALUE'
          },
          hashAlgorithm: 'STRING_VALUE',
          signature: {
            inlineDocument: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */
          },
          signatureAlgorithm: 'STRING_VALUE'
        },
        startSigningJobParameter: {
          destination: {
            s3Destination: {
              bucket: 'STRING_VALUE',
              prefix: 'STRING_VALUE'
            }
          },
          signingProfileName: 'STRING_VALUE',
          signingProfileParameter: {
            certificateArn: 'STRING_VALUE',
            certificatePathOnDevice: 'STRING_VALUE',
            platform: 'STRING_VALUE'
          }
        }
      },
      fileLocation: {
        s3Location: {
          bucket: 'STRING_VALUE',
          key: 'STRING_VALUE',
          version: 'STRING_VALUE'
        },
        stream: {
          fileId: 'NUMBER_VALUE',
          streamId: 'STRING_VALUE'
        }
      },
      fileName: 'STRING_VALUE',
      fileType: 'NUMBER_VALUE',
      fileVersion: 'STRING_VALUE'
    },
    /* more items */
  ],
  otaUpdateId: 'STRING_VALUE', /* required */
  roleArn: 'STRING_VALUE', /* required */
  targets: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  additionalParameters: {
    '<AttributeKey>': 'STRING_VALUE',
    /* '<AttributeKey>': ... */
  },
  awsJobAbortConfig: {
    abortCriteriaList: [ /* required */
      {
        action: CANCEL, /* required */
        failureType: FAILED | REJECTED | TIMED_OUT | ALL, /* required */
        minNumberOfExecutedThings: 'NUMBER_VALUE', /* required */
        thresholdPercentage: 'NUMBER_VALUE' /* required */
      },
      /* more items */
    ]
  },
  awsJobExecutionsRolloutConfig: {
    exponentialRate: {
      baseRatePerMinute: 'NUMBER_VALUE', /* required */
      incrementFactor: 'NUMBER_VALUE', /* required */
      rateIncreaseCriteria: { /* required */
        numberOfNotifiedThings: 'NUMBER_VALUE',
        numberOfSucceededThings: 'NUMBER_VALUE'
      }
    },
    maximumPerMinute: 'NUMBER_VALUE'
  },
  awsJobPresignedUrlConfig: {
    expiresInSec: 'NUMBER_VALUE'
  },
  awsJobTimeoutConfig: {
    inProgressTimeoutInMinutes: 'NUMBER_VALUE'
  },
  description: 'STRING_VALUE',
  protocols: [
    MQTT | HTTP,
    /* more items */
  ],
  tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE'
    },
    /* more items */
  ],
  targetSelection: CONTINUOUS | SNAPSHOT
};
iot.createOTAUpdate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      The ID of the OTA update to be created.

    • description — (String)

      The description of the OTA update.

    • targets — (Array<String>)

      The devices targeted to receive OTA updates.

    • protocols — (Array<String>)

      The protocol used to transfer the OTA update image. Valid values are [HTTP], [MQTT], [HTTP, MQTT]. When both HTTP and MQTT are specified, the target device can choose the protocol.

    • targetSelection — (String)

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

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

      Configuration for the rollout of OTA updates.

      • maximumPerMinute — (Integer)

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

      • exponentialRate — (map)

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

        • baseRatePerMinuterequired — (Integer)

          The minimum number of things that will be notified of a pending job, per minute, at the start of the job rollout. This is the initial rate of the rollout.

        • incrementFactorrequired — (Float)

          The rate of increase for a job rollout. The number of things notified is multiplied by this factor.

        • rateIncreaseCriteriarequired — (map)

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

          Amazon Web Services IoT Core supports up to one digit after the decimal (for example, 1.5, but not 1.55).

          • numberOfNotifiedThings — (Integer)

            When this number of things have been notified, it will initiate an increase in the rollout rate.

          • numberOfSucceededThings — (Integer)

            When this number of things have succeeded in their job execution, it will initiate an increase in the rollout rate.

    • awsJobPresignedUrlConfig — (map)

      Configuration information for pre-signed URLs.

      • expiresInSec — (Integer)

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

    • awsJobAbortConfig — (map)

      The criteria that determine when and how a job abort takes place.

      • abortCriteriaListrequired — (Array<map>)

        The list of criteria that determine when and how to abort the job.

        • failureTyperequired — (String)

          The type of job execution failures that can initiate a job abort.

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

          The type of job action to take to initiate the job abort.

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

          The minimum percentage of job execution failures that must occur to initiate the job abort.

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

        • minNumberOfExecutedThingsrequired — (Integer)

          The minimum number of things which must receive job execution notifications before the job can be aborted.

    • awsJobTimeoutConfig — (map)

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

      • inProgressTimeoutInMinutes — (Integer)

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

    • files — (Array<map>)

      The files to be streamed by the OTA update.

      • fileName — (String)

        The name of the file.

      • fileType — (Integer)

        An integer value you can include in the job document to allow your devices to identify the type of file received from the cloud.

      • fileVersion — (String)

        The file version.

      • fileLocation — (map)

        The location of the updated firmware.

        • stream — (map)

          The stream that contains the OTA update.

          • streamId — (String)

            The stream ID.

          • fileId — (Integer)

            The ID of a file associated with a stream.

        • s3Location — (map)

          The location of the updated firmware in S3.

          • bucket — (String)

            The S3 bucket.

          • key — (String)

            The S3 key.

          • version — (String)

            The S3 bucket version.

      • codeSigning — (map)

        The code signing method of the file.

        • awsSignerJobId — (String)

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

        • startSigningJobParameter — (map)

          Describes the code-signing job.

          • signingProfileParameter — (map)

            Describes the code-signing profile.

            • certificateArn — (String)

              Certificate ARN.

            • platform — (String)

              The hardware platform of your device.

            • certificatePathOnDevice — (String)

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

          • signingProfileName — (String)

            The code-signing profile name.

          • destination — (map)

            The location to write the code-signed file.

            • s3Destination — (map)

              Describes the location in S3 of the updated firmware.

              • bucket — (String)

                The S3 bucket that contains the updated firmware.

              • prefix — (String)

                The S3 prefix.

        • customCodeSigning — (map)

          A custom method for code signing a file.

          • signature — (map)

            The signature for the file.

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

              A base64 encoded binary representation of the code signing signature.

          • certificateChain — (map)

            The certificate chain.

            • certificateName — (String)

              The name of the certificate.

            • inlineDocument — (String)

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

          • hashAlgorithm — (String)

            The hash algorithm used to code sign the file. You can use a string as the algorithm name if the target over-the-air (OTA) update devices are able to verify the signature that was generated using the same signature algorithm. For example, FreeRTOS uses SHA256 or SHA1, so you can pass either of them based on which was used for generating the signature.

          • signatureAlgorithm — (String)

            The signature algorithm used to code sign the file. You can use a string as the algorithm name if the target over-the-air (OTA) update devices are able to verify the signature that was generated using the same signature algorithm. For example, FreeRTOS uses ECDSA or RSA, so you can pass either of them based on which was used for generating the signature.

      • attributes — (map<String>)

        A list of name-attribute pairs. They won't be sent to devices as a part of the Job document.

    • roleArn — (String)

      The IAM role that grants Amazon Web Services IoT Core access to the Amazon S3, IoT jobs and Amazon Web Services Code Signing resources to create an OTA update job.

    • additionalParameters — (map<String>)

      A list of additional OTA update parameters, which are name-value pairs. They won't be sent to devices as a part of the Job document.

    • tags — (Array<map>)

      Metadata which can be used to manage updates.

      • Keyrequired — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • otaUpdateId — (String)

        The OTA update ID.

      • awsIotJobId — (String)

        The IoT job ID associated with the OTA update.

      • otaUpdateArn — (String)

        The OTA update ARN.

      • awsIotJobArn — (String)

        The IoT job ARN associated with the OTA update.

      • otaUpdateStatus — (String)

        The OTA update status.

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

Returns:

  • (AWS.Request)

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

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

Creates an IoT software package that can be deployed to your fleet.

Requires permission to access the CreatePackage and GetIndexingConfiguration actions.

Service Reference:

Examples:

Calling the createPackage operation

var params = {
  packageName: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE',
  description: 'STRING_VALUE',
  tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
iot.createPackage(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      The name of the new software package.

    • description — (String)

      A summary of the package being created. This can be used to outline the package's contents or purpose.

    • tags — (map<String>)

      Metadata that can be used to manage the package.

    • clientToken — (String)

      A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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:

      • packageName — (String)

        The name of the software package.

      • packageArn — (String)

        The Amazon Resource Name (ARN) for the package.

      • description — (String)

        The package description.

Returns:

  • (AWS.Request)

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

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

Creates a new version for an existing IoT software package.

Requires permission to access the CreatePackageVersion and GetIndexingConfiguration actions.

Service Reference:

Examples:

Calling the createPackageVersion operation

var params = {
  packageName: 'STRING_VALUE', /* required */
  versionName: 'STRING_VALUE', /* required */
  attributes: {
    '<ResourceAttributeKey>': 'STRING_VALUE',
    /* '<ResourceAttributeKey>': ... */
  },
  clientToken: 'STRING_VALUE',
  description: 'STRING_VALUE',
  tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
iot.createPackageVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      The name of the associated software package.

    • versionName — (String)

      The name of the new package version.

    • description — (String)

      A summary of the package version being created. This can be used to outline the package's contents or purpose.

    • attributes — (map<String>)

      Metadata that can be used to define a package version’s configuration. For example, the S3 file location, configuration options that are being sent to the device or fleet.

      The combined size of all the attributes on a package version is limited to 3KB.

    • tags — (map<String>)

      Metadata that can be used to manage the package version.

    • clientToken — (String)

      A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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:

      • packageVersionArn — (String)

        The Amazon Resource Name (ARN) for the package.

      • packageName — (String)

        The name of the associated software package.

      • versionName — (String)

        The name of the new package version.

      • description — (String)

        The package version description.

      • attributes — (map<String>)

        Metadata that were added to the package version that can be used to define a package version’s configuration.

      • status — (String)

        The status of the package version. For more information, see Package version lifecycle.

        Possible values include:
        • "DRAFT"
        • "PUBLISHED"
        • "DEPRECATED"
      • errorReason — (String)

        Error reason for a package version failure during creation or update.

Returns:

  • (AWS.Request)

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

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

Creates an 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.

Requires permission to access the CreatePolicy action.

Service Reference:

Examples:

Calling the createPolicy operation

var params = {
  policyDocument: 'STRING_VALUE', /* required */
  policyName: 'STRING_VALUE', /* required */
  tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
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.

    • tags — (Array<map>)

      Metadata which can be used to manage the policy.

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

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

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

Requires permission to access the CreatePolicyVersion action.

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.

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

Creates a provisioning claim.

Requires permission to access the CreateProvisioningClaim action.

Service Reference:

Examples:

Calling the createProvisioningClaim operation

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

Parameters:

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

      The name of the provisioning template to use.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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:

      • certificateId — (String)

        The ID of the certificate.

      • certificatePem — (String)

        The provisioning claim certificate.

      • keyPair — (map)

        The provisioning claim key pair.

        • PublicKey — (String)

          The public key.

        • PrivateKey — (String)

          The private key.

      • expiration — (Date)

        The provisioning claim expiration time.

Returns:

  • (AWS.Request)

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

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

Creates a provisioning template.

Requires permission to access the CreateProvisioningTemplate action.

Service Reference:

Examples:

Calling the createProvisioningTemplate operation

var params = {
  provisioningRoleArn: 'STRING_VALUE', /* required */
  templateBody: 'STRING_VALUE', /* required */
  templateName: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE',
  enabled: true || false,
  preProvisioningHook: {
    targetArn: 'STRING_VALUE', /* required */
    payloadVersion: 'STRING_VALUE'
  },
  tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE'
    },
    /* more items */
  ],
  type: FLEET_PROVISIONING | JITP
};
iot.createProvisioningTemplate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      The name of the provisioning template.

    • description — (String)

      The description of the provisioning template.

    • templateBody — (String)

      The JSON formatted contents of the provisioning template.

    • enabled — (Boolean)

      True to enable the provisioning template, otherwise false.

    • provisioningRoleArn — (String)

      The role ARN for the role associated with the provisioning template. This IoT role grants permission to provision a device.

    • preProvisioningHook — (map)

      Creates a pre-provisioning hook template. Only supports template of type FLEET_PROVISIONING. For more information about provisioning template types, see type.

      • payloadVersion — (String)

        The payload that was sent to the target function.

        Note: Only Lambda functions are currently supported.

      • targetArnrequired — (String)

        The ARN of the target function.

        Note: Only Lambda functions are currently supported.

    • tags — (Array<map>)

      Metadata which can be used to manage the provisioning template.

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

        The tag's key.

      • Value — (String)

        The tag's value.

    • type — (String)

      The type you define in a provisioning template. You can create a template with only one type. You can't change the template type after its creation. The default value is FLEET_PROVISIONING. For more information about provisioning template, see: Provisioning template.

      Possible values include:
      • "FLEET_PROVISIONING"
      • "JITP"

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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:

      • templateArn — (String)

        The ARN that identifies the provisioning template.

      • templateName — (String)

        The name of the provisioning template.

      • defaultVersionId — (Integer)

        The default version of the provisioning template.

Returns:

  • (AWS.Request)

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

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

Creates a new version of a provisioning template.

Requires permission to access the CreateProvisioningTemplateVersion action.

Examples:

Calling the createProvisioningTemplateVersion operation

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

Parameters:

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

      The name of the provisioning template.

    • templateBody — (String)

      The JSON formatted contents of the provisioning template.

    • setAsDefault — (Boolean)

      Sets a fleet provision template version as the default 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:

      • templateArn — (String)

        The ARN that identifies the provisioning template.

      • templateName — (String)

        The name of the provisioning template.

      • versionId — (Integer)

        The version of the provisioning template.

      • isDefaultVersion — (Boolean)

        True if the provisioning template version is the default version, otherwise false.

Returns:

  • (AWS.Request)

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

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

Creates a role alias.

Requires permission to access the CreateRoleAlias action.

Service Reference:

Examples:

Calling the createRoleAlias operation

var params = {
  roleAlias: 'STRING_VALUE', /* required */
  roleArn: 'STRING_VALUE', /* required */
  credentialDurationSeconds: 'NUMBER_VALUE',
  tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
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. The default value is 3,600 seconds.

      This value must be less than or equal to the maximum session duration of the IAM role that the role alias references.

    • tags — (Array<map>)

      Metadata which can be used to manage the role alias.

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

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • roleAlias — (String)

        The role alias.

      • roleAliasArn — (String)

        The role alias ARN.

Returns:

  • (AWS.Request)

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

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

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

Requires permission to access the CreateScheduledAudit action.

Service Reference:

Examples:

Calling the createScheduledAudit operation

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

Parameters:

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

      How often the scheduled audit takes place, either DAILY, WEEKLY, BIWEEKLY or MONTHLY. The start time of each audit is determined by the system.

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

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

    • dayOfWeek — (String)

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

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

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

    • scheduledAuditName — (String)

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

    • tags — (Array<map>)

      Metadata that can be used to manage the scheduled audit.

      • Keyrequired — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • scheduledAuditArn — (String)

        The ARN of the scheduled audit.

Returns:

  • (AWS.Request)

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

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

Creates a Device Defender security profile.

Requires permission to access the CreateSecurityProfile action.

Service Reference:

Examples:

Calling the createSecurityProfile operation

var params = {
  securityProfileName: 'STRING_VALUE', /* required */
  additionalMetricsToRetain: [
    'STRING_VALUE',
    /* more items */
  ],
  additionalMetricsToRetainV2: [
    {
      metric: 'STRING_VALUE', /* required */
      exportMetric: true || false,
      metricDimension: {
        dimensionName: 'STRING_VALUE', /* required */
        operator: IN | NOT_IN
      }
    },
    /* more items */
  ],
  alertTargets: {
    '<AlertTargetType>': {
      alertTargetArn: 'STRING_VALUE', /* required */
      roleArn: 'STRING_VALUE' /* required */
    },
    /* '<AlertTargetType>': ... */
  },
  behaviors: [
    {
      name: 'STRING_VALUE', /* required */
      criteria: {
        comparisonOperator: less-than | less-than-equals | greater-than | greater-than-equals | in-cidr-set | not-in-cidr-set | in-port-set | not-in-port-set | in-set | not-in-set,
        consecutiveDatapointsToAlarm: 'NUMBER_VALUE',
        consecutiveDatapointsToClear: 'NUMBER_VALUE',
        durationSeconds: 'NUMBER_VALUE',
        mlDetectionConfig: {
          confidenceLevel: LOW | MEDIUM | HIGH /* required */
        },
        statisticalThreshold: {
          statistic: 'STRING_VALUE'
        },
        value: {
          cidrs: [
            'STRING_VALUE',
            /* more items */
          ],
          count: 'NUMBER_VALUE',
          number: 'NUMBER_VALUE',
          numbers: [
            'NUMBER_VALUE',
            /* more items */
          ],
          ports: [
            'NUMBER_VALUE',
            /* more items */
          ],
          strings: [
            'STRING_VALUE',
            /* more items */
          ]
        }
      },
      exportMetric: true || false,
      metric: 'STRING_VALUE',
      metricDimension: {
        dimensionName: 'STRING_VALUE', /* required */
        operator: IN | NOT_IN
      },
      suppressAlerts: true || false
    },
    /* more items */
  ],
  metricsExportConfig: {
    mqttTopic: 'STRING_VALUE', /* required */
    roleArn: 'STRING_VALUE' /* required */
  },
  securityProfileDescription: 'STRING_VALUE',
  tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
iot.createSecurityProfile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      The name you are giving to the security profile.

    • securityProfileDescription — (String)

      A description of the security profile.

    • behaviors — (Array<map>)

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

      • namerequired — (String)

        The name you've given to the behavior.

      • metric — (String)

        What is measured by the behavior.

      • metricDimension — (map)

        The dimension for a metric in your behavior. For example, using a TOPIC_FILTER dimension, you can narrow down the scope of the metric to only MQTT topics where the name matches the pattern specified in the dimension. This can't be used with custom metrics.

        • dimensionNamerequired — (String)

          A unique identifier for the dimension.

        • operator — (String)

          Defines how the dimensionValues of a dimension are interpreted. For example, for dimension type TOPIC_FILTER, the IN operator, a message will be counted only if its topic matches one of the topic filters. With NOT_IN operator, a message will be counted only if it doesn't match any of the topic filters. The operator is optional: if it's not provided (is null), it will be interpreted as IN.

          Possible values include:
          • "IN"
          • "NOT_IN"
      • criteria — (map)

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

        Note: In the IoT console, you can choose to be sent an alert through Amazon SNS when IoT Device Defender detects that a device is behaving anomalously.
        • comparisonOperator — (String)

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

          • string-list: in-set and not-in-set

          • number-list: in-set and not-in-set

          • ip-address-list: in-cidr-set and not-in-cidr-set

          • number: less-than, less-than-equals, greater-than, and greater-than-equals

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

          The value to be compared with the metric.

          • count — (Integer)

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

          • cidrs — (Array<String>)

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

          • ports — (Array<Integer>)

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

          • number — (Float)

            The numeral value of a metric.

          • numbers — (Array<Float>)

            The numeral values of a metric.

          • strings — (Array<String>)

            The string values of a metric.

        • durationSeconds — (Integer)

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

        • consecutiveDatapointsToAlarm — (Integer)

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

        • consecutiveDatapointsToClear — (Integer)

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

        • statisticalThreshold — (map)

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

          • statistic — (String)

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

        • mlDetectionConfig — (map)

          The configuration of an ML Detect

          • confidenceLevelrequired — (String)

            The sensitivity of anomalous behavior evaluation. Can be Low, Medium, or High.

            Possible values include:
            • "LOW"
            • "MEDIUM"
            • "HIGH"
      • suppressAlerts — (Boolean)

        Suppresses alerts.

      • exportMetric — (Boolean)

        Value indicates exporting metrics related to the behavior when it is true.

    • alertTargets — (map<map>)

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

      • alertTargetArnrequired — (String)

        The Amazon Resource Name (ARN) of the notification target to which alerts are sent.

      • roleArnrequired — (String)

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

    • additionalMetricsToRetain — (Array<String>)

      Please use CreateSecurityProfileRequest$additionalMetricsToRetainV2 instead.

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

    • additionalMetricsToRetainV2 — (Array<map>)

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

      • metricrequired — (String)

        What is measured by the behavior.

      • metricDimension — (map)

        The dimension of a metric. This can't be used with custom metrics.

        • dimensionNamerequired — (String)

          A unique identifier for the dimension.

        • operator — (String)

          Defines how the dimensionValues of a dimension are interpreted. For example, for dimension type TOPIC_FILTER, the IN operator, a message will be counted only if its topic matches one of the topic filters. With NOT_IN operator, a message will be counted only if it doesn't match any of the topic filters. The operator is optional: if it's not provided (is null), it will be interpreted as IN.

          Possible values include:
          • "IN"
          • "NOT_IN"
      • exportMetric — (Boolean)

        The value indicates exporting metrics related to the MetricToRetain when it's true.

    • tags — (Array<map>)

      Metadata that can be used to manage the security profile.

      • Keyrequired — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

    • metricsExportConfig — (map)

      Specifies the MQTT topic and role ARN required for metric export.

      • mqttTopicrequired — (String)

        The MQTT topic that Device Defender Detect should publish messages to for metrics export.

      • roleArnrequired — (String)

        This role ARN has permission to publish MQTT messages, after which Device Defender Detect can assume the role and publish messages on your behalf.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • securityProfileName — (String)

        The name you gave to the security profile.

      • securityProfileArn — (String)

        The ARN of the security profile.

Returns:

  • (AWS.Request)

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

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

Creates a stream for delivering one or more large files in chunks over MQTT. A stream transports data bytes in chunks or blocks packaged as MQTT messages from a source like S3. You can have one or more files associated with a stream.

Requires permission to access the CreateStream action.

Service Reference:

Examples:

Calling the createStream operation

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

Parameters:

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

      The stream ID.

    • description — (String)

      A description of the stream.

    • files — (Array<map>)

      The files to stream.

      • fileId — (Integer)

        The file ID.

      • s3Location — (map)

        The location of the file in S3.

        • bucket — (String)

          The S3 bucket.

        • key — (String)

          The S3 key.

        • version — (String)

          The S3 bucket version.

    • roleArn — (String)

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

    • tags — (Array<map>)

      Metadata which can be used to manage streams.

      • Keyrequired — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • streamId — (String)

        The stream ID.

      • streamArn — (String)

        The stream ARN.

      • description — (String)

        A description of the stream.

      • streamVersion — (Integer)

        The version of the stream.

Returns:

  • (AWS.Request)

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

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

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

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

Requires permission to access the CreateThing action.

Service Reference:

Examples:

Calling the createThing operation

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

Parameters:

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

      The name of the thing to create.

      You can't change a thing's name after you create it. To change a thing's name, you must create a new thing, give it the new name, and then delete the old thing.

    • 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 or UpdateThingGroup.
    • billingGroupName — (String)

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • thingName — (String)

        The name of the new thing.

      • thingArn — (String)

        The ARN of the new thing.

      • thingId — (String)

        The thing ID.

Returns:

  • (AWS.Request)

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

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

Create a thing group.

Note: This is a control plane operation. See Authorization for information about authorizing control plane actions. If the ThingGroup that you create has the exact same attributes as an existing ThingGroup, you will get a 200 success response.

Requires permission to access the CreateThingGroup action.

Service Reference:

Examples:

Calling the createThingGroup operation

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

Parameters:

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

      The thing group name to create.

    • parentGroupName — (String)

      The name of the parent thing group.

    • thingGroupProperties — (map)

      The thing group properties.

      • thingGroupDescription — (String)

        The thing group description.

      • attributePayload — (map)

        The thing group attributes in JSON format.

        • attributes — (map<String>)

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

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

        • merge — (Boolean)

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

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

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

      Metadata which can be used to manage the thing group.

      • Keyrequired — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • thingGroupName — (String)

        The thing group name.

      • thingGroupArn — (String)

        The thing group ARN.

      • thingGroupId — (String)

        The thing group ID.

Returns:

  • (AWS.Request)

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

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

Creates a new thing type.

Requires permission to access the CreateThingType action.

Service Reference:

Examples:

Calling the createThingType operation

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

Parameters:

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

      The name of the thing type.

    • thingTypeProperties — (map)

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

      • thingTypeDescription — (String)

        The description of the thing type.

      • searchableAttributes — (Array<String>)

        A list of searchable thing attribute names.

    • tags — (Array<map>)

      Metadata which can be used to manage the thing type.

      • Keyrequired — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • thingTypeName — (String)

        The name of the thing type.

      • thingTypeArn — (String)

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

      • thingTypeId — (String)

        The thing type ID.

Returns:

  • (AWS.Request)

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

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

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

Requires permission to access the CreateTopicRule action.

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 */
        },
        cloudwatchLogs: {
          logGroupName: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          batchMode: true || false
        },
        cloudwatchMetric: {
          metricName: 'STRING_VALUE', /* required */
          metricNamespace: 'STRING_VALUE', /* required */
          metricUnit: 'STRING_VALUE', /* required */
          metricValue: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          metricTimestamp: 'STRING_VALUE'
        },
        dynamoDB: {
          hashKeyField: 'STRING_VALUE', /* required */
          hashKeyValue: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          tableName: 'STRING_VALUE', /* required */
          hashKeyType: STRING | NUMBER,
          operation: 'STRING_VALUE',
          payloadField: 'STRING_VALUE',
          rangeKeyField: 'STRING_VALUE',
          rangeKeyType: STRING | NUMBER,
          rangeKeyValue: 'STRING_VALUE'
        },
        dynamoDBv2: {
          putItem: { /* required */
            tableName: 'STRING_VALUE' /* required */
          },
          roleArn: 'STRING_VALUE' /* required */
        },
        elasticsearch: {
          endpoint: 'STRING_VALUE', /* required */
          id: 'STRING_VALUE', /* required */
          index: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          type: 'STRING_VALUE' /* required */
        },
        firehose: {
          deliveryStreamName: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          batchMode: true || false,
          separator: 'STRING_VALUE'
        },
        http: {
          url: 'STRING_VALUE', /* required */
          auth: {
            sigv4: {
              roleArn: 'STRING_VALUE', /* required */
              serviceName: 'STRING_VALUE', /* required */
              signingRegion: 'STRING_VALUE' /* required */
            }
          },
          confirmationUrl: 'STRING_VALUE',
          headers: [
            {
              key: 'STRING_VALUE', /* required */
              value: 'STRING_VALUE' /* required */
            },
            /* more items */
          ]
        },
        iotAnalytics: {
          batchMode: true || false,
          channelArn: 'STRING_VALUE',
          channelName: 'STRING_VALUE',
          roleArn: 'STRING_VALUE'
        },
        iotEvents: {
          inputName: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          batchMode: true || false,
          messageId: 'STRING_VALUE'
        },
        iotSiteWise: {
          putAssetPropertyValueEntries: [ /* required */
            {
              propertyValues: [ /* required */
                {
                  timestamp: { /* required */
                    timeInSeconds: 'STRING_VALUE', /* required */
                    offsetInNanos: 'STRING_VALUE'
                  },
                  value: { /* required */
                    booleanValue: 'STRING_VALUE',
                    doubleValue: 'STRING_VALUE',
                    integerValue: 'STRING_VALUE',
                    stringValue: 'STRING_VALUE'
                  },
                  quality: 'STRING_VALUE'
                },
                /* more items */
              ],
              assetId: 'STRING_VALUE',
              entryId: 'STRING_VALUE',
              propertyAlias: 'STRING_VALUE',
              propertyId: 'STRING_VALUE'
            },
            /* more items */
          ],
          roleArn: 'STRING_VALUE' /* required */
        },
        kafka: {
          clientProperties: { /* required */
            '<String>': 'STRING_VALUE',
            /* '<String>': ... */
          },
          destinationArn: 'STRING_VALUE', /* required */
          topic: 'STRING_VALUE', /* required */
          headers: [
            {
              key: 'STRING_VALUE', /* required */
              value: 'STRING_VALUE' /* required */
            },
            /* more items */
          ],
          key: 'STRING_VALUE',
          partition: 'STRING_VALUE'
        },
        kinesis: {
          roleArn: 'STRING_VALUE', /* required */
          streamName: 'STRING_VALUE', /* required */
          partitionKey: 'STRING_VALUE'
        },
        lambda: {
          functionArn: 'STRING_VALUE' /* required */
        },
        location: {
          deviceId: 'STRING_VALUE', /* required */
          latitude: 'STRING_VALUE', /* required */
          longitude: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          trackerName: 'STRING_VALUE', /* required */
          timestamp: {
            value: 'STRING_VALUE', /* required */
            unit: 'STRING_VALUE'
          }
        },
        openSearch: {
          endpoint: 'STRING_VALUE', /* required */
          id: 'STRING_VALUE', /* required */
          index: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          type: 'STRING_VALUE' /* required */
        },
        republish: {
          roleArn: 'STRING_VALUE', /* required */
          topic: 'STRING_VALUE', /* required */
          headers: {
            contentType: 'STRING_VALUE',
            correlationData: 'STRING_VALUE',
            messageExpiry: 'STRING_VALUE',
            payloadFormatIndicator: 'STRING_VALUE',
            responseTopic: 'STRING_VALUE',
            userProperties: [
              {
                key: 'STRING_VALUE', /* required */
                value: 'STRING_VALUE' /* required */
              },
              /* more items */
            ]
          },
          qos: 'NUMBER_VALUE'
        },
        s3: {
          bucketName: 'STRING_VALUE', /* required */
          key: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          cannedAcl: private | public-read | public-read-write | aws-exec-read | authenticated-read | bucket-owner-read | bucket-owner-full-control | log-delivery-write
        },
        salesforce: {
          token: 'STRING_VALUE', /* required */
          url: 'STRING_VALUE' /* required */
        },
        sns: {
          roleArn: 'STRING_VALUE', /* required */
          targetArn: 'STRING_VALUE', /* required */
          messageFormat: RAW | JSON
        },
        sqs: {
          queueUrl: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          useBase64: true || false
        },
        stepFunctions: {
          roleArn: 'STRING_VALUE', /* required */
          stateMachineName: 'STRING_VALUE', /* required */
          executionNamePrefix: 'STRING_VALUE'
        },
        timestream: {
          databaseName: 'STRING_VALUE', /* required */
          dimensions: [ /* required */
            {
              name: 'STRING_VALUE', /* required */
              value: 'STRING_VALUE' /* required */
            },
            /* more items */
          ],
          roleArn: 'STRING_VALUE', /* required */
          tableName: 'STRING_VALUE', /* required */
          timestamp: {
            unit: 'STRING_VALUE', /* required */
            value: 'STRING_VALUE' /* required */
          }
        }
      },
      /* 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 */
      },
      cloudwatchLogs: {
        logGroupName: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        batchMode: true || false
      },
      cloudwatchMetric: {
        metricName: 'STRING_VALUE', /* required */
        metricNamespace: 'STRING_VALUE', /* required */
        metricUnit: 'STRING_VALUE', /* required */
        metricValue: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        metricTimestamp: 'STRING_VALUE'
      },
      dynamoDB: {
        hashKeyField: 'STRING_VALUE', /* required */
        hashKeyValue: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        tableName: 'STRING_VALUE', /* required */
        hashKeyType: STRING | NUMBER,
        operation: 'STRING_VALUE',
        payloadField: 'STRING_VALUE',
        rangeKeyField: 'STRING_VALUE',
        rangeKeyType: STRING | NUMBER,
        rangeKeyValue: 'STRING_VALUE'
      },
      dynamoDBv2: {
        putItem: { /* required */
          tableName: 'STRING_VALUE' /* required */
        },
        roleArn: 'STRING_VALUE' /* required */
      },
      elasticsearch: {
        endpoint: 'STRING_VALUE', /* required */
        id: 'STRING_VALUE', /* required */
        index: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        type: 'STRING_VALUE' /* required */
      },
      firehose: {
        deliveryStreamName: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        batchMode: true || false,
        separator: 'STRING_VALUE'
      },
      http: {
        url: 'STRING_VALUE', /* required */
        auth: {
          sigv4: {
            roleArn: 'STRING_VALUE', /* required */
            serviceName: 'STRING_VALUE', /* required */
            signingRegion: 'STRING_VALUE' /* required */
          }
        },
        confirmationUrl: 'STRING_VALUE',
        headers: [
          {
            key: 'STRING_VALUE', /* required */
            value: 'STRING_VALUE' /* required */
          },
          /* more items */
        ]
      },
      iotAnalytics: {
        batchMode: true || false,
        channelArn: 'STRING_VALUE',
        channelName: 'STRING_VALUE',
        roleArn: 'STRING_VALUE'
      },
      iotEvents: {
        inputName: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        batchMode: true || false,
        messageId: 'STRING_VALUE'
      },
      iotSiteWise: {
        putAssetPropertyValueEntries: [ /* required */
          {
            propertyValues: [ /* required */
              {
                timestamp: { /* required */
                  timeInSeconds: 'STRING_VALUE', /* required */
                  offsetInNanos: 'STRING_VALUE'
                },
                value: { /* required */
                  booleanValue: 'STRING_VALUE',
                  doubleValue: 'STRING_VALUE',
                  integerValue: 'STRING_VALUE',
                  stringValue: 'STRING_VALUE'
                },
                quality: 'STRING_VALUE'
              },
              /* more items */
            ],
            assetId: 'STRING_VALUE',
            entryId: 'STRING_VALUE',
            propertyAlias: 'STRING_VALUE',
            propertyId: 'STRING_VALUE'
          },
          /* more items */
        ],
        roleArn: 'STRING_VALUE' /* required */
      },
      kafka: {
        clientProperties: { /* required */
          '<String>': 'STRING_VALUE',
          /* '<String>': ... */
        },
        destinationArn: 'STRING_VALUE', /* required */
        topic: 'STRING_VALUE', /* required */
        headers: [
          {
            key: 'STRING_VALUE', /* required */
            value: 'STRING_VALUE' /* required */
          },
          /* more items */
        ],
        key: 'STRING_VALUE',
        partition: 'STRING_VALUE'
      },
      kinesis: {
        roleArn: 'STRING_VALUE', /* required */
        streamName: 'STRING_VALUE', /* required */
        partitionKey: 'STRING_VALUE'
      },
      lambda: {
        functionArn: 'STRING_VALUE' /* required */
      },
      location: {
        deviceId: 'STRING_VALUE', /* required */
        latitude: 'STRING_VALUE', /* required */
        longitude: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        trackerName: 'STRING_VALUE', /* required */
        timestamp: {
          value: 'STRING_VALUE', /* required */
          unit: 'STRING_VALUE'
        }
      },
      openSearch: {
        endpoint: 'STRING_VALUE', /* required */
        id: 'STRING_VALUE', /* required */
        index: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        type: 'STRING_VALUE' /* required */
      },
      republish: {
        roleArn: 'STRING_VALUE', /* required */
        topic: 'STRING_VALUE', /* required */
        headers: {
          contentType: 'STRING_VALUE',
          correlationData: 'STRING_VALUE',
          messageExpiry: 'STRING_VALUE',
          payloadFormatIndicator: 'STRING_VALUE',
          responseTopic: 'STRING_VALUE',
          userProperties: [
            {
              key: 'STRING_VALUE', /* required */
              value: 'STRING_VALUE' /* required */
            },
            /* more items */
          ]
        },
        qos: 'NUMBER_VALUE'
      },
      s3: {
        bucketName: 'STRING_VALUE', /* required */
        key: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        cannedAcl: private | public-read | public-read-write | aws-exec-read | authenticated-read | bucket-owner-read | bucket-owner-full-control | log-delivery-write
      },
      salesforce: {
        token: 'STRING_VALUE', /* required */
        url: 'STRING_VALUE' /* required */
      },
      sns: {
        roleArn: 'STRING_VALUE', /* required */
        targetArn: 'STRING_VALUE', /* required */
        messageFormat: RAW | JSON
      },
      sqs: {
        queueUrl: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        useBase64: true || false
      },
      stepFunctions: {
        roleArn: 'STRING_VALUE', /* required */
        stateMachineName: 'STRING_VALUE', /* required */
        executionNamePrefix: 'STRING_VALUE'
      },
      timestream: {
        databaseName: 'STRING_VALUE', /* required */
        dimensions: [ /* required */
          {
            name: 'STRING_VALUE', /* required */
            value: 'STRING_VALUE' /* required */
          },
          /* more items */
        ],
        roleArn: 'STRING_VALUE', /* required */
        tableName: 'STRING_VALUE', /* required */
        timestamp: {
          unit: 'STRING_VALUE', /* required */
          value: 'STRING_VALUE' /* required */
        }
      }
    },
    ruleDisabled: true || false
  },
  tags: 'STRING_VALUE'
};
iot.createTopicRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      The name of the rule.

    • topicRulePayload — (map)

      The rule payload.

      • sqlrequired — (String)

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

      • description — (String)

        The description of the rule.

      • actionsrequired — (Array<map>)

        The actions associated with the rule.

        • dynamoDB — (map)

          Write to a DynamoDB table.

          • tableNamerequired — (String)

            The name of the DynamoDB table.

          • roleArnrequired — (String)

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

          • operation — (String)

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

          • hashKeyFieldrequired — (String)

            The hash key name.

          • hashKeyValuerequired — (String)

            The hash key value.

          • hashKeyType — (String)

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

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

            The range key name.

          • rangeKeyValue — (String)

            The range key value.

          • rangeKeyType — (String)

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

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

            The action payload. This name can be customized.

        • dynamoDBv2 — (map)

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

          • roleArnrequired — (String)

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

          • putItemrequired — (map)

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

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

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

            • tableNamerequired — (String)

              The table where the message data will be written.

        • lambda — (map)

          Invoke a Lambda function.

          • functionArnrequired — (String)

            The ARN of the Lambda function.

        • sns — (map)

          Publish to an Amazon SNS topic.

          • targetArnrequired — (String)

            The ARN of the SNS topic.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • messageFormat — (String)

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

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

          Publish to an Amazon SQS queue.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • queueUrlrequired — (String)

            The URL of the Amazon SQS queue.

          • useBase64 — (Boolean)

            Specifies whether to use Base64 encoding.

        • kinesis — (map)

          Write data to an Amazon Kinesis stream.

          • roleArnrequired — (String)

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

          • streamNamerequired — (String)

            The name of the Amazon Kinesis stream.

          • partitionKey — (String)

            The partition key.

        • republish — (map)

          Publish to another MQTT topic.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • topicrequired — (String)

            The name of the MQTT topic.

          • qos — (Integer)

            The Quality of Service (QoS) level to use when republishing messages. The default value is 0.

          • headers — (map)

            MQTT Version 5.0 headers information. For more information, see MQTT from the Amazon Web Services IoT Core Developer Guide.

            • payloadFormatIndicator — (String)

              An Enum string value that indicates whether the payload is formatted as UTF-8.

              Valid values are UNSPECIFIED_BYTES and UTF8_DATA.

              For more information, see Payload Format Indicator from the MQTT Version 5.0 specification.

              Supports substitution templates.

            • contentType — (String)

              A UTF-8 encoded string that describes the content of the publishing message.

              For more information, see Content Type from the MQTT Version 5.0 specification.

              Supports substitution templates.

            • responseTopic — (String)

              A UTF-8 encoded string that's used as the topic name for a response message. The response topic is used to describe the topic which the receiver should publish to as part of the request-response flow. The topic must not contain wildcard characters.

              For more information, see Response Topic from the MQTT Version 5.0 specification.

              Supports substitution templates.

            • correlationData — (String)

              The base64-encoded binary data used by the sender of the request message to identify which request the response message is for when it's received.

              For more information, see Correlation Data from the MQTT Version 5.0 specification.

              Note: This binary data must be based64-encoded.

              Supports substitution templates.

            • messageExpiry — (String)

              A user-defined integer value that will persist a message at the message broker for a specified amount of time to ensure that the message will expire if it's no longer relevant to the subscriber. The value of messageExpiry represents the number of seconds before it expires. For more information about the limits of messageExpiry, see Amazon Web Services IoT Core message broker and protocol limits and quotas from the Amazon Web Services Reference Guide.

              Supports substitution templates.

            • userProperties — (Array<map>)

              An array of key-value pairs that you define in the MQTT5 header.

              • keyrequired — (String)

                A key to be specified in UserProperty.

              • valuerequired — (String)

                A value to be specified in UserProperty.

        • 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. For more information, see Actions, resources, and condition keys for Amazon S3.

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

          • batchMode — (Boolean)

            Whether to deliver the Kinesis Data Firehose stream as a batch by using PutRecordBatch . The default value is false.

            When batchMode is true and the rule's SQL statement evaluates to an Array, each Array element forms one record in the PutRecordBatch request. The resulting array can't have more than 500 records.

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

        • cloudwatchLogs — (map)

          Send data to CloudWatch Logs.

          • roleArnrequired — (String)

            The IAM role that allows access to the CloudWatch log.

          • logGroupNamerequired — (String)

            The CloudWatch log group to which the action sends data.

          • batchMode — (Boolean)

            Indicates whether batches of log records will be extracted and uploaded into CloudWatch. Values include true or false (default).

        • elasticsearch — (map)

          Write data to an Amazon OpenSearch Service domain.

          Note: The Elasticsearch action can only be used by existing rule actions. To create a new rule action or to update an existing rule action, use the OpenSearch rule action instead. For more information, see OpenSearchAction.
          • roleArnrequired — (String)

            The IAM role ARN that has access to OpenSearch.

          • endpointrequired — (String)

            The endpoint of your OpenSearch domain.

          • indexrequired — (String)

            The index where you want to store your data.

          • typerequired — (String)

            The type of document you are storing.

          • idrequired — (String)

            The unique identifier for the document you are storing.

        • salesforce — (map)

          Send a message to a Salesforce IoT Cloud Input Stream.

          • tokenrequired — (String)

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

          • urlrequired — (String)

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

        • iotAnalytics — (map)

          Sends message data to an IoT Analytics channel.

          • channelArn — (String)

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

          • channelName — (String)

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

          • batchMode — (Boolean)

            Whether to process the action as a batch. The default value is false.

            When batchMode is true and the rule SQL statement evaluates to an Array, each Array element is delivered as a separate message when passed by BatchPutMessage to the IoT Analytics channel. The resulting array can't have more than 100 messages.

          • roleArn — (String)

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

        • iotEvents — (map)

          Sends an input to an IoT Events detector.

          • inputNamerequired — (String)

            The name of the IoT Events input.

          • messageId — (String)

            The ID of the message. The default messageId is a new UUID value.

            When batchMode is true, you can't specify a messageId--a new UUID value will be assigned.

            Assign a value to this property to ensure that only one input (message) with a given messageId will be processed by an IoT Events detector.

          • batchMode — (Boolean)

            Whether to process the event actions as a batch. The default value is false.

            When batchMode is true, you can't specify a messageId.

            When batchMode is true and the rule SQL statement evaluates to an Array, each Array element is treated as a separate message when it's sent to IoT Events by calling BatchPutMessage . The resulting array can't have more than 10 messages.

          • roleArnrequired — (String)

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

        • iotSiteWise — (map)

          Sends data from the MQTT message that triggered the rule to IoT SiteWise asset properties.

          • putAssetPropertyValueEntriesrequired — (Array<map>)

            A list of asset property value entries.

            • entryId — (String)

              Optional. A unique identifier for this entry that you can define to better track which message caused an error in case of failure. Accepts substitution templates. Defaults to a new UUID.

            • assetId — (String)

              The ID of the IoT SiteWise asset. You must specify either a propertyAlias or both an aliasId and a propertyId. Accepts substitution templates.

            • propertyId — (String)

              The ID of the asset's property. You must specify either a propertyAlias or both an aliasId and a propertyId. Accepts substitution templates.

            • propertyAlias — (String)

              The name of the property alias associated with your asset property. You must specify either a propertyAlias or both an aliasId and a propertyId. Accepts substitution templates.

            • propertyValuesrequired — (Array<map>)

              A list of property values to insert that each contain timestamp, quality, and value (TQV) information.

              • valuerequired — (map)

                The value of the asset property.

                • stringValue — (String)

                  Optional. The string value of the value entry. Accepts substitution templates.

                • integerValue — (String)

                  Optional. A string that contains the integer value of the value entry. Accepts substitution templates.

                • doubleValue — (String)

                  Optional. A string that contains the double value of the value entry. Accepts substitution templates.

                • booleanValue — (String)

                  Optional. A string that contains the boolean value (true or false) of the value entry. Accepts substitution templates.

              • timestamprequired — (map)

                The asset property value timestamp.

                • timeInSecondsrequired — (String)

                  A string that contains the time in seconds since epoch. Accepts substitution templates.

                • offsetInNanos — (String)

                  Optional. A string that contains the nanosecond time offset. Accepts substitution templates.

              • quality — (String)

                Optional. A string that describes the quality of the value. Accepts substitution templates. Must be GOOD, BAD, or UNCERTAIN.

          • roleArnrequired — (String)

            The ARN of the role that grants IoT permission to send an asset property value to IoT SiteWise. ("Action": "iotsitewise:BatchPutAssetPropertyValue"). The trust policy can restrict access to specific asset hierarchy paths.

        • stepFunctions — (map)

          Starts execution of a Step Functions state machine.

          • executionNamePrefix — (String)

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

          • stateMachineNamerequired — (String)

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

          • roleArnrequired — (String)

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

        • timestream — (map)

          The Timestream rule action writes attributes (measures) from an MQTT message into an Amazon Timestream table. For more information, see the Timestream topic rule action documentation.

          • roleArnrequired — (String)

            The ARN of the role that grants permission to write to the Amazon Timestream database table.

          • databaseNamerequired — (String)

            The name of an Amazon Timestream database.

          • tableNamerequired — (String)

            The name of the database table into which to write the measure records.

          • dimensionsrequired — (Array<map>)

            Metadata attributes of the time series that are written in each measure record.

            • namerequired — (String)

              The metadata dimension name. This is the name of the column in the Amazon Timestream database table record.

              Dimensions cannot be named: measure_name, measure_value, or time. These names are reserved. Dimension names cannot start with ts_ or measure_value and they cannot contain the colon (:) character.

            • valuerequired — (String)

              The value to write in this column of the database record.

          • timestamp — (map)

            Specifies an application-defined value to replace the default value assigned to the Timestream record's timestamp in the time column.

            You can use this property to specify the value and the precision of the Timestream record's timestamp. You can specify a value from the message payload or a value computed by a substitution template.

            If omitted, the topic rule action assigns the timestamp, in milliseconds, at the time it processed the rule.

            • valuerequired — (String)

              An expression that returns a long epoch time value.

            • unitrequired — (String)

              The precision of the timestamp value that results from the expression described in value.

              Valid values: SECONDS | MILLISECONDS | MICROSECONDS | NANOSECONDS. The default is MILLISECONDS.

        • http — (map)

          Send data to an HTTPS endpoint.

          • urlrequired — (String)

            The endpoint URL. If substitution templates are used in the URL, you must also specify a confirmationUrl. If this is a new destination, a new TopicRuleDestination is created if possible.

          • confirmationUrl — (String)

            The URL to which IoT sends a confirmation message. The value of the confirmation URL must be a prefix of the endpoint URL. If you do not specify a confirmation URL IoT uses the endpoint URL as the confirmation URL. If you use substitution templates in the confirmationUrl, you must create and enable topic rule destinations that match each possible value of the substitution template before traffic is allowed to your endpoint URL.

          • headers — (Array<map>)

            The HTTP headers to send with the message data.

            • keyrequired — (String)

              The HTTP header key.

            • valuerequired — (String)

              The HTTP header value. Substitution templates are supported.

          • auth — (map)

            The authentication method to use when sending data to an HTTPS endpoint.

            • sigv4 — (map)

              Use Sig V4 authorization. For more information, see Signature Version 4 Signing Process.

              • signingRegionrequired — (String)

                The signing region.

              • serviceNamerequired — (String)

                The service name to use while signing with Sig V4.

              • roleArnrequired — (String)

                The ARN of the signing role.

        • kafka — (map)

          Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster.

          • destinationArnrequired — (String)

            The ARN of Kafka action's VPC TopicRuleDestination.

          • topicrequired — (String)

            The Kafka topic for messages to be sent to the Kafka broker.

          • key — (String)

            The Kafka message key.

          • partition — (String)

            The Kafka message partition.

          • clientPropertiesrequired — (map<String>)

            Properties of the Apache Kafka producer client.

          • headers — (Array<map>)

            The list of Kafka headers that you specify.

            • keyrequired — (String)

              The key of the Kafka header.

            • valuerequired — (String)

              The value of the Kafka header.

        • openSearch — (map)

          Write data to an Amazon OpenSearch Service domain.

          • roleArnrequired — (String)

            The IAM role ARN that has access to OpenSearch.

          • endpointrequired — (String)

            The endpoint of your OpenSearch domain.

          • indexrequired — (String)

            The OpenSearch 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.

        • location — (map)

          The Amazon Location Service rule action sends device location updates from an MQTT message to an Amazon Location tracker resource.

          • roleArnrequired — (String)

            The IAM role that grants permission to write to the Amazon Location resource.

          • trackerNamerequired — (String)

            The name of the tracker resource in Amazon Location in which the location is updated.

          • deviceIdrequired — (String)

            The unique ID of the device providing the location data.

          • timestamp — (map)

            The time that the location data was sampled. The default value is the time the MQTT message was processed.

            • valuerequired — (String)

              An expression that returns a long epoch time value.

            • unit — (String)

              The precision of the timestamp value that results from the expression described in value.

              Valid values: SECONDS | MILLISECONDS | MICROSECONDS | NANOSECONDS. The default is MILLISECONDS.

          • latituderequired — (String)

            A string that evaluates to a double value that represents the latitude of the device's location.

          • longituderequired — (String)

            A string that evaluates to a double value that represents the longitude of the device's location.

      • ruleDisabled — (Boolean)

        Specifies whether the rule is disabled.

      • awsIotSqlVersion — (String)

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

      • errorAction — (map)

        The action to take when an error occurs.

        • dynamoDB — (map)

          Write to a DynamoDB table.

          • tableNamerequired — (String)

            The name of the DynamoDB table.

          • roleArnrequired — (String)

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

          • operation — (String)

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

          • hashKeyFieldrequired — (String)

            The hash key name.

          • hashKeyValuerequired — (String)

            The hash key value.

          • hashKeyType — (String)

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

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

            The range key name.

          • rangeKeyValue — (String)

            The range key value.

          • rangeKeyType — (String)

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

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

            The action payload. This name can be customized.

        • dynamoDBv2 — (map)

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

          • roleArnrequired — (String)

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

          • putItemrequired — (map)

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

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

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

            • tableNamerequired — (String)

              The table where the message data will be written.

        • lambda — (map)

          Invoke a Lambda function.

          • functionArnrequired — (String)

            The ARN of the Lambda function.

        • sns — (map)

          Publish to an Amazon SNS topic.

          • targetArnrequired — (String)

            The ARN of the SNS topic.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • messageFormat — (String)

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

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

          Publish to an Amazon SQS queue.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • queueUrlrequired — (String)

            The URL of the Amazon SQS queue.

          • useBase64 — (Boolean)

            Specifies whether to use Base64 encoding.

        • kinesis — (map)

          Write data to an Amazon Kinesis stream.

          • roleArnrequired — (String)

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

          • streamNamerequired — (String)

            The name of the Amazon Kinesis stream.

          • partitionKey — (String)

            The partition key.

        • republish — (map)

          Publish to another MQTT topic.

          • roleArnrequired — (String)

            The ARN of the IAM role that grants access.

          • topicrequired — (String)

            The name of the MQTT topic.

          • qos — (Integer)

            The Quality of Service (QoS) level to use when republishing messages. The default value is 0.

          • headers — (map)

            MQTT Version 5.0 headers information. For more information, see MQTT from the Amazon Web Services IoT Core Developer Guide.

            • payloadFormatIndicator — (String)

              An Enum string value that indicates whether the payload is formatted as UTF-8.

              Valid values are UNSPECIFIED_BYTES and UTF8_DATA.

              For more information, see Payload Format Indicator from the MQTT Version 5.0 specification.

              Supports substitution templates.

            • contentType — (String)

              A UTF-8 encoded string that describes the content of the publishing message.

              For more information, see Content Type from the MQTT Version 5.0 specification.

              Supports substitution templates.

            • responseTopic — (String)

              A UTF-8 encoded string that's used as the topic name for a response message. The response topic is used to describe the topic which the receiver should publish to as part of the request-response flow. The topic must not contain wildcard characters.

              For more information, see Response Topic from the MQTT Version 5.0 specification.

              Supports substitution templates.

            • correlationData — (String)

              The base64-encoded binary data used by the sender of the request message to identify which request the response message is for when it's received.

              For more information, see Correlation Data from the MQTT Version 5.0 specification.

              Note: This binary data must be based64-encoded.

              Supports substitution templates.

            • messageExpiry — (String)

              A user-defined integer value that will persist a message at the message broker for a specified amount of time to ensure that the message will expire if it's no longer relevant to the subscriber. The value of messageExpiry represents the number of seconds before it expires. For more information about the limits of messageExpiry, see Amazon Web Services IoT Core message broker and protocol limits and quotas from the Amazon Web Services Reference Guide.

              Supports substitution templates.

            • userProperties — (Array<map>)

              An array of key-value pairs that you define in the MQTT5 header.

              • keyrequired — (String)

                A key to be specified in UserProperty.

              • valuerequired — (String)

                A value to be specified in UserProperty.

        • 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. For more information, see Actions, resources, and condition keys for Amazon S3.

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

          • batchMode — (Boolean)

            Whether to deliver the Kinesis Data Firehose stream as a batch by using PutRecordBatch . The default value is false.

            When batchMode is true and the rule's SQL statement evaluates to an Array, each Array element forms one record in the PutRecordBatch request. The resulting array can't have more than 500 records.

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

        • cloudwatchLogs — (map)

          Send data to CloudWatch Logs.

          • roleArnrequired — (String)

            The IAM role that allows access to the CloudWatch log.

          • logGroupNamerequired — (String)

            The CloudWatch log group to which the action sends data.

          • batchMode — (Boolean)

            Indicates whether batches of log records will be extracted and uploaded into CloudWatch. Values include true or false (default).

        • elasticsearch — (map)

          Write data to an Amazon OpenSearch Service domain.

          Note: The Elasticsearch action can only be used by existing rule actions. To create a new rule action or to update an existing rule action, use the OpenSearch rule action instead. For more information, see OpenSearchAction.
          • roleArnrequired — (String)

            The IAM role ARN that has access to OpenSearch.

          • endpointrequired — (String)

            The endpoint of your OpenSearch domain.

          • indexrequired — (String)

            The index where you want to store your data.

          • typerequired — (String)

            The type of document you are storing.

          • idrequired — (String)

            The unique identifier for the document you are storing.

        • salesforce — (map)

          Send a message to a Salesforce IoT Cloud Input Stream.

          • tokenrequired — (String)

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

          • urlrequired — (String)

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

        • iotAnalytics — (map)

          Sends message data to an IoT Analytics channel.

          • channelArn — (String)

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

          • channelName — (String)

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

          • batchMode — (Boolean)

            Whether to process the action as a batch. The default value is false.

            When batchMode is true and the rule SQL statement evaluates to an Array, each Array element is delivered as a separate message when passed by BatchPutMessage to the IoT Analytics channel. The resulting array can't have more than 100 messages.

          • roleArn — (String)

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

        • iotEvents — (map)

          Sends an input to an IoT Events detector.

          • inputNamerequired — (String)

            The name of the IoT Events input.

          • messageId — (String)

            The ID of the message. The default messageId is a new UUID value.

            When batchMode is true, you can't specify a messageId--a new UUID value will be assigned.

            Assign a value to this property to ensure that only one input (message) with a given messageId will be processed by an IoT Events detector.

          • batchMode — (Boolean)

            Whether to process the event actions as a batch. The default value is false.

            When batchMode is true, you can't specify a messageId.

            When batchMode is true and the rule SQL statement evaluates to an Array, each Array element is treated as a separate message when it's sent to IoT Events by calling BatchPutMessage . The resulting array can't have more than 10 messages.

          • roleArnrequired — (String)

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

        • iotSiteWise — (map)

          Sends data from the MQTT message that triggered the rule to IoT SiteWise asset properties.

          • putAssetPropertyValueEntriesrequired — (Array<map>)

            A list of asset property value entries.

            • entryId — (String)

              Optional. A unique identifier for this entry that you can define to better track which message caused an error in case of failure. Accepts substitution templates. Defaults to a new UUID.

            • assetId — (String)

              The ID of the IoT SiteWise asset. You must specify either a propertyAlias or both an aliasId and a propertyId. Accepts substitution templates.

            • propertyId — (String)

              The ID of the asset's property. You must specify either a propertyAlias or both an aliasId and a propertyId. Accepts substitution templates.

            • propertyAlias — (String)

              The name of the property alias associated with your asset property. You must specify either a propertyAlias or both an aliasId and a propertyId. Accepts substitution templates.

            • propertyValuesrequired — (Array<map>)

              A list of property values to insert that each contain timestamp, quality, and value (TQV) information.

              • valuerequired — (map)

                The value of the asset property.

                • stringValue — (String)

                  Optional. The string value of the value entry. Accepts substitution templates.

                • integerValue — (String)

                  Optional. A string that contains the integer value of the value entry. Accepts substitution templates.

                • doubleValue — (String)

                  Optional. A string that contains the double value of the value entry. Accepts substitution templates.

                • booleanValue — (String)

                  Optional. A string that contains the boolean value (true or false) of the value entry. Accepts substitution templates.

              • timestamprequired — (map)

                The asset property value timestamp.

                • timeInSecondsrequired — (String)

                  A string that contains the time in seconds since epoch. Accepts substitution templates.

                • offsetInNanos — (String)

                  Optional. A string that contains the nanosecond time offset. Accepts substitution templates.

              • quality — (String)

                Optional. A string that describes the quality of the value. Accepts substitution templates. Must be GOOD, BAD, or UNCERTAIN.

          • roleArnrequired — (String)

            The ARN of the role that grants IoT permission to send an asset property value to IoT SiteWise. ("Action": "iotsitewise:BatchPutAssetPropertyValue"). The trust policy can restrict access to specific asset hierarchy paths.

        • stepFunctions — (map)

          Starts execution of a Step Functions state machine.

          • executionNamePrefix — (String)

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

          • stateMachineNamerequired — (String)

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

          • roleArnrequired — (String)

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

        • timestream — (map)

          The Timestream rule action writes attributes (measures) from an MQTT message into an Amazon Timestream table. For more information, see the Timestream topic rule action documentation.

          • roleArnrequired — (String)

            The ARN of the role that grants permission to write to the Amazon Timestream database table.

          • databaseNamerequired — (String)

            The name of an Amazon Timestream database.

          • tableNamerequired — (String)

            The name of the database table into which to write the measure records.

          • dimensionsrequired — (Array<map>)

            Metadata attributes of the time series that are written in each measure record.

            • namerequired — (String)

              The metadata dimension name. This is the name of the column in the Amazon Timestream database table record.

              Dimensions cannot be named: measure_name, measure_value, or time. These names are reserved. Dimension names cannot start with ts_ or measure_value and they cannot contain the colon (:) character.

            • valuerequired — (String)

              The value to write in this column of the database record.

          • timestamp — (map)

            Specifies an application-defined value to replace the default value assigned to the Timestream record's timestamp in the time column.

            You can use this property to specify the value and the precision of the Timestream record's timestamp. You can specify a value from the message payload or a value computed by a substitution template.

            If omitted, the topic rule action assigns the timestamp, in milliseconds, at the time it processed the rule.

            • valuerequired — (String)

              An expression that returns a long epoch time value.

            • unitrequired — (String)

              The precision of the timestamp value that results from the expression described in value.

              Valid values: SECONDS | MILLISECONDS | MICROSECONDS | NANOSECONDS. The default is MILLISECONDS.

        • http — (map)

          Send data to an HTTPS endpoint.

          • urlrequired — (String)

            The endpoint URL. If substitution templates are used in the URL, you must also specify a confirmationUrl. If this is a new destination, a new TopicRuleDestination is created if possible.

          • confirmationUrl — (String)

            The URL to which IoT sends a confirmation message. The value of the confirmation URL must be a prefix of the endpoint URL. If you do not specify a confirmation URL IoT uses the endpoint URL as the confirmation URL. If you use substitution templates in the confirmationUrl, you must create and enable topic rule destinations that match each possible value of the substitution template before traffic is allowed to your endpoint URL.

          • headers — (Array<map>)

            The HTTP headers to send with the message data.

            • keyrequired — (String)

              The HTTP header key.

            • valuerequired — (String)

              The HTTP header value. Substitution templates are supported.

          • auth — (map)

            The authentication method to use when sending data to an HTTPS endpoint.

            • sigv4 — (map)

              Use Sig V4 authorization. For more information, see Signature Version 4 Signing Process.

              • signingRegionrequired — (String)

                The signing region.

              • serviceNamerequired — (String)

                The service name to use while signing with Sig V4.

              • roleArnrequired — (String)

                The ARN of the signing role.

        • kafka — (map)

          Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster.

          • destinationArnrequired — (String)

            The ARN of Kafka action's VPC TopicRuleDestination.

          • topicrequired — (String)

            The Kafka topic for messages to be sent to the Kafka broker.

          • key — (String)

            The Kafka message key.

          • partition — (String)

            The Kafka message partition.

          • clientPropertiesrequired — (map<String>)

            Properties of the Apache Kafka producer client.

          • headers — (Array<map>)

            The list of Kafka headers that you specify.

            • keyrequired — (String)

              The key of the Kafka header.

            • valuerequired — (String)

              The value of the Kafka header.

        • openSearch — (map)

          Write data to an Amazon OpenSearch Service domain.

          • roleArnrequired — (String)

            The IAM role ARN that has access to OpenSearch.

          • endpointrequired — (String)

            The endpoint of your OpenSearch domain.

          • indexrequired — (String)

            The OpenSearch 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.

        • location — (map)

          The Amazon Location Service rule action sends device location updates from an MQTT message to an Amazon Location tracker resource.

          • roleArnrequired — (String)

            The IAM role that grants permission to write to the Amazon Location resource.

          • trackerNamerequired — (String)

            The name of the tracker resource in Amazon Location in which the location is updated.

          • deviceIdrequired — (String)

            The unique ID of the device providing the location data.

          • timestamp — (map)

            The time that the location data was sampled. The default value is the time the MQTT message was processed.

            • valuerequired — (String)

              An expression that returns a long epoch time value.

            • unit — (String)

              The precision of the timestamp value that results from the expression described in value.

              Valid values: SECONDS | MILLISECONDS | MICROSECONDS | NANOSECONDS. The default is MILLISECONDS.

          • latituderequired — (String)

            A string that evaluates to a double value that represents the latitude of the device's location.

          • longituderequired — (String)

            A string that evaluates to a double value that represents the longitude of the device's location.

    • tags — (String)

      Metadata which can be used to manage the topic rule.

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Creates a topic rule destination. The destination must be confirmed prior to use.

Requires permission to access the CreateTopicRuleDestination action.

Service Reference:

Examples:

Calling the createTopicRuleDestination operation

var params = {
  destinationConfiguration: { /* required */
    httpUrlConfiguration: {
      confirmationUrl: 'STRING_VALUE' /* required */
    },
    vpcConfiguration: {
      roleArn: 'STRING_VALUE', /* required */
      subnetIds: [ /* required */
        'STRING_VALUE',
        /* more items */
      ],
      vpcId: 'STRING_VALUE', /* required */
      securityGroups: [
        'STRING_VALUE',
        /* more items */
      ]
    }
  }
};
iot.createTopicRuleDestination(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • destinationConfiguration — (map)

      The topic rule destination configuration.

      • httpUrlConfiguration — (map)

        Configuration of the HTTP URL.

        • confirmationUrlrequired — (String)

          The URL IoT uses to confirm ownership of or access to the topic rule destination URL.

      • vpcConfiguration — (map)

        Configuration of the virtual private cloud (VPC) connection.

        • subnetIdsrequired — (Array<String>)

          The subnet IDs of the VPC destination.

        • securityGroups — (Array<String>)

          The security groups of the VPC destination.

        • vpcIdrequired — (String)

          The ID of the VPC.

        • roleArnrequired — (String)

          The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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:

      • topicRuleDestination — (map)

        The topic rule destination.

        • arn — (String)

          The topic rule destination URL.

        • status — (String)

          The status of the topic rule destination. Valid values are:

          IN_PROGRESS

          A topic rule destination was created but has not been confirmed. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.

          ENABLED

          Confirmation was completed, and traffic to this destination is allowed. You can set status to DISABLED by calling UpdateTopicRuleDestination.

          DISABLED

          Confirmation was completed, and traffic to this destination is not allowed. You can set status to ENABLED by calling UpdateTopicRuleDestination.

          ERROR

          Confirmation could not be completed, for example if the confirmation timed out. You can call GetTopicRuleDestination for details about the error. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.

          Possible values include:
          • "ENABLED"
          • "IN_PROGRESS"
          • "DISABLED"
          • "ERROR"
          • "DELETING"
        • createdAt — (Date)

          The date and time when the topic rule destination was created.

        • lastUpdatedAt — (Date)

          The date and time when the topic rule destination was last updated.

        • statusReason — (String)

          Additional details or reason why the topic rule destination is in the current status.

        • httpUrlProperties — (map)

          Properties of the HTTP URL.

          • confirmationUrl — (String)

            The URL used to confirm the HTTP topic rule destination URL.

        • vpcProperties — (map)

          Properties of the virtual private cloud (VPC) connection.

          • subnetIds — (Array<String>)

            The subnet IDs of the VPC destination.

          • securityGroups — (Array<String>)

            The security groups of the VPC destination.

          • vpcId — (String)

            The ID of the VPC.

          • roleArn — (String)

            The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).

Returns:

  • (AWS.Request)

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

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

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

Requires permission to access the DeleteAccountAuditConfiguration action.

Service Reference:

Examples:

Calling the deleteAccountAuditConfiguration operation

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

Parameters:

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

      If true, all scheduled audits are deleted.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Deletes a Device Defender audit suppression.

Requires permission to access the DeleteAuditSuppression action.

Service Reference:

Examples:

Calling the deleteAuditSuppression operation

var params = {
  checkName: 'STRING_VALUE', /* required */
  resourceIdentifier: { /* required */
    account: 'STRING_VALUE',
    caCertificateId: 'STRING_VALUE',
    clientId: 'STRING_VALUE',
    cognitoIdentityPoolId: 'STRING_VALUE',
    deviceCertificateArn: 'STRING_VALUE',
    deviceCertificateId: 'STRING_VALUE',
    iamRoleArn: 'STRING_VALUE',
    issuerCertificateIdentifier: {
      issuerCertificateSerialNumber: 'STRING_VALUE',
      issuerCertificateSubject: 'STRING_VALUE',
      issuerId: 'STRING_VALUE'
    },
    policyVersionIdentifier: {
      policyName: 'STRING_VALUE',
      policyVersionId: 'STRING_VALUE'
    },
    roleAliasArn: 'STRING_VALUE'
  }
};
iot.deleteAuditSuppression(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      An audit check name. Checks must be enabled for your account. (Use DescribeAccountAuditConfiguration to see the list of all checks, including those that are enabled or use UpdateAccountAuditConfiguration to select which checks are enabled.)

    • resourceIdentifier — (map)

      Information that identifies the noncompliant resource.

      • deviceCertificateId — (String)

        The ID of the certificate attached to the resource.

      • caCertificateId — (String)

        The ID of the CA certificate used to authorize the certificate.

      • cognitoIdentityPoolId — (String)

        The ID of the Amazon Cognito identity pool.

      • clientId — (String)

        The client ID.

      • policyVersionIdentifier — (map)

        The version of the policy associated with the resource.

        • policyName — (String)

          The name of the policy.

        • policyVersionId — (String)

          The ID of the version of the policy associated with the resource.

      • account — (String)

        The account with which the resource is associated.

      • iamRoleArn — (String)

        The ARN of the IAM role that has overly permissive actions.

      • roleAliasArn — (String)

        The ARN of the role alias that has overly permissive actions.

      • issuerCertificateIdentifier — (map)

        The issuer certificate identifier.

        • issuerCertificateSubject — (String)

          The subject of the issuer certificate.

        • issuerId — (String)

          The issuer ID.

        • issuerCertificateSerialNumber — (String)

          The issuer certificate serial number.

      • deviceCertificateArn — (String)

        The ARN of the identified device 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.

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

Deletes an authorizer.

Requires permission to access the DeleteAuthorizer action.

Service Reference:

Examples:

Calling the deleteAuthorizer operation

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

Parameters:

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

      The name of the authorizer to delete.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Deletes the billing group.

Requires permission to access the DeleteBillingGroup action.

Service Reference:

Examples:

Calling the deleteBillingGroup operation

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

Parameters:

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

      The name of the billing group.

    • expectedVersion — (Integer)

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Deletes a registered CA certificate.

Requires permission to access the DeleteCACertificate action.

Service Reference:

Examples:

Calling the deleteCACertificate operation

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

Parameters:

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

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Deletes the specified certificate.

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

Requires permission to access the DeleteCertificate action.

Service Reference:

Examples:

Calling the deleteCertificate operation

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

Parameters:

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

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

    • forceDelete — (Boolean)

      Forces the deletion of a certificate if it is inactive and is not attached to an IoT 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.

Returns:

  • (AWS.Request)

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

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

Deletes a certificate provider.

Requires permission to access the DeleteCertificateProvider action.

If you delete the certificate provider resource, the behavior of CreateCertificateFromCsr will resume, and IoT will create certificates signed by IoT from a certificate signing request (CSR).

Service Reference:

Examples:

Calling the deleteCertificateProvider operation

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

Parameters:

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

      The name of the certificate provider.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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.

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

Deletes a Device Defender detect custom metric.

Requires permission to access the DeleteCustomMetric action.

Note: Before you can delete a custom metric, you must first remove the custom metric from all security profiles it's a part of. The security profile associated with the custom metric can be found using the ListSecurityProfiles API with metricName set to your custom metric name.

Service Reference:

Examples:

Calling the deleteCustomMetric operation

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

Parameters:

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

      The name of the custom metric.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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.

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

Removes the specified dimension from your Amazon Web Services accounts.

Requires permission to access the DeleteDimension action.

Service Reference:

Examples:

Calling the deleteDimension operation

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

Parameters:

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

      The unique identifier for the dimension that you want to delete.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Deletes the specified domain configuration.

Requires permission to access the DeleteDomainConfiguration action.

Service Reference:

Examples:

Calling the deleteDomainConfiguration operation

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

Parameters:

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

      The name of the domain configuration to be deleted.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Deletes a dynamic thing group.

Requires permission to access the DeleteDynamicThingGroup action.

Service Reference:

Examples:

Calling the deleteDynamicThingGroup operation

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

Parameters:

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

      The name of the dynamic thing group to delete.

    • expectedVersion — (Integer)

      The expected version of the dynamic thing group to delete.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

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

Requires permission to access the DeleteFleetMetric action.

Service Reference:

Examples:

Calling the deleteFleetMetric operation

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

Parameters:

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

      The name of the fleet metric to delete.

    • expectedVersion — (Integer)

      The expected version of the fleet metric to delete.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Deletes a job and its related job executions.

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

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

Requires permission to access the DeleteJob action.

Service Reference:

Examples:

Calling the deleteJob operation

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

Parameters:

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

      The ID of the job to be deleted.

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

    • force — (Boolean)

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

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

      The namespace used to indicate that a job is a customer-managed job.

      When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.

      $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/

      Note: The namespaceId feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Deletes a job execution.

Requires permission to access the DeleteJobExecution action.

Service Reference:

Examples:

Calling the deleteJobExecution operation

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

Parameters:

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

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

    • thingName — (String)

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

    • executionNumber — (Integer)

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

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

    • force — (Boolean)

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

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

      The namespace used to indicate that a job is a customer-managed job.

      When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.

      $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/

      Note: The namespaceId feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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.

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

Deletes the specified job template.

Service Reference:

Examples:

Calling the deleteJobTemplate operation

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

Parameters:

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

      The unique identifier of the job template 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.

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

Deletes a defined mitigation action from your Amazon Web Services accounts.

Requires permission to access the DeleteMitigationAction action.

Service Reference:

Examples:

Calling the deleteMitigationAction operation

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

Parameters:

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

      The name of the mitigation action that you want to delete.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Delete an OTA update.

Requires permission to access the DeleteOTAUpdate action.

Service Reference:

Examples:

Calling the deleteOTAUpdate operation

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

Parameters:

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

      The ID of the OTA update to delete.

    • deleteStream — (Boolean)

      When true, the stream created by the OTAUpdate process is deleted when the OTA update is deleted. Ignored if the stream specified in the OTAUpdate is supplied by the user.

    • forceDeleteAWSJob — (Boolean)

      When true, deletes the IoT job created by the OTAUpdate process even if it is "IN_PROGRESS". Otherwise, if the job is not in a terminal state ("COMPLETED" or "CANCELED") an exception will occur. The default is false.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Deletes a specific version from a software package.

Note: All package versions must be deleted before deleting the software package.

Requires permission to access the DeletePackageVersion action.

Service Reference:

Examples:

Calling the deletePackage operation

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

Parameters:

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

      The name of the target software package.

    • clientToken — (String)

      A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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.

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

Deletes a specific version from a software package.

Note: If a package version is designated as default, you must remove the designation from the software package using the UpdatePackage action.

Service Reference:

Examples:

Calling the deletePackageVersion operation

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

Parameters:

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

      The name of the associated software package.

    • versionName — (String)

      The name of the target package version.

    • clientToken — (String)

      A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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 action to delete all non-default versions of the policy; use the DetachPolicy action to detach the policy from any certificate; and then use the DeletePolicy action to delete the policy.

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

Note: Because of the distributed nature of Amazon Web Services, it can take up to five minutes after a policy is detached before it's ready to be deleted.

Requires permission to access the DeletePolicy action.

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

Requires permission to access the DeletePolicyVersion action.

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.

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

Deletes a provisioning template.

Requires permission to access the DeleteProvisioningTemplate action.

Service Reference:

Examples:

Calling the deleteProvisioningTemplate operation

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

Parameters:

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

      The name of the fleet provision template 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.

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

Deletes a provisioning template version.

Requires permission to access the DeleteProvisioningTemplateVersion action.

Examples:

Calling the deleteProvisioningTemplateVersion operation

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

Parameters:

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

      The name of the provisioning template version to delete.

    • versionId — (Integer)

      The provisioning template version ID 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.

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

Deletes a CA certificate registration code.

Requires permission to access the DeleteRegistrationCode action.

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

Requires permission to access the DeleteRoleAlias action.

Service Reference:

Examples:

Calling the deleteRoleAlias operation

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

Parameters:

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

      The role alias to delete.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Deletes a scheduled audit.

Requires permission to access the DeleteScheduledAudit action.

Service Reference:

Examples:

Calling the deleteScheduledAudit operation

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

Parameters:

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

      The name of the scheduled audit you want to delete.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Deletes a Device Defender security profile.

Requires permission to access the DeleteSecurityProfile action.

Service Reference:

Examples:

Calling the deleteSecurityProfile operation

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

Parameters:

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

      The name of the security profile to be deleted.

    • expectedVersion — (Integer)

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Deletes a stream.

Requires permission to access the DeleteStream action.

Service Reference:

Examples:

Calling the deleteStream operation

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

Parameters:

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

      The stream ID.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

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

Requires permission to access the DeleteThing action.

Service Reference:

Examples:

Calling the deleteThing operation

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

Parameters:

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

      The name of the thing to delete.

    • expectedVersion — (Integer)

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Deletes a thing group.

Requires permission to access the DeleteThingGroup action.

Service Reference:

Examples:

Calling the deleteThingGroup operation

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

Parameters:

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

      The name of the thing group to delete.

    • expectedVersion — (Integer)

      The expected version of the thing group to delete.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

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

Requires permission to access the DeleteThingType action.

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.

Requires permission to access the DeleteTopicRule action.

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.

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

Deletes a topic rule destination.

Requires permission to access the DeleteTopicRuleDestination action.

Service Reference:

Examples:

Calling the deleteTopicRuleDestination operation

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

Parameters:

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

      The ARN of the topic rule destination 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.

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

Deletes a logging level.

Requires permission to access the DeleteV2LoggingLevel action.

Service Reference:

Examples:

Calling the deleteV2LoggingLevel operation

var params = {
  targetName: 'STRING_VALUE', /* required */
  targetType: DEFAULT | THING_GROUP | CLIENT_ID | SOURCE_IP | PRINCIPAL_ID /* 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"
      • "CLIENT_ID"
      • "SOURCE_IP"
      • "PRINCIPAL_ID"
    • 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.

Requires permission to access the DeprecateThingType action.

Service Reference:

Examples:

Calling the deprecateThingType operation

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

Parameters:

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

      The name of the thing type to deprecate.

    • undoDeprecate — (Boolean)

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

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

Requires permission to access the DescribeAccountAuditConfiguration action.

Examples:

Calling the describeAccountAuditConfiguration operation

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

Parameters:

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • roleArn — (String)

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

        On the first call to UpdateAccountAuditConfiguration, this parameter is required.

      • auditNotificationTargetConfigurations — (map<map>)

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

        • targetArn — (String)

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

        • roleArn — (String)

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

        • enabled — (Boolean)

          True if notifications to the target are enabled.

      • auditCheckConfigurations — (map<map>)

        Which audit checks are enabled and disabled for this account.

        • enabled — (Boolean)

          True if this audit check is enabled for this account.

Returns:

  • (AWS.Request)

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

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

Gets information about a single audit finding. Properties include the reason for noncompliance, the severity of the issue, and the start time when the audit that returned the finding.

Requires permission to access the DescribeAuditFinding action.

Service Reference:

Examples:

Calling the describeAuditFinding operation

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

Parameters:

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

      A unique identifier for a single audit finding. You can use this identifier to apply mitigation actions to the finding.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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:

      • finding — (map)

        The findings (results) of the audit.

        • findingId — (String)

          A unique identifier for this set of audit findings. This identifier is used to apply mitigation tasks to one or more sets of findings.

        • taskId — (String)

          The ID of the audit that generated this result (finding).

        • checkName — (String)

          The audit check that generated this result.

        • taskStartTime — (Date)

          The time the audit started.

        • findingTime — (Date)

          The time the result (finding) was discovered.

        • severity — (String)

          The severity of the result (finding).

          Possible values include:
          • "CRITICAL"
          • "HIGH"
          • "MEDIUM"
          • "LOW"
        • nonCompliantResource — (map)

          The resource that was found to be noncompliant with the audit check.

          • resourceType — (String)

            The type of the noncompliant resource.

            Possible values include:
            • "DEVICE_CERTIFICATE"
            • "CA_CERTIFICATE"
            • "IOT_POLICY"
            • "COGNITO_IDENTITY_POOL"
            • "CLIENT_ID"
            • "ACCOUNT_SETTINGS"
            • "ROLE_ALIAS"
            • "IAM_ROLE"
            • "ISSUER_CERTIFICATE"
          • resourceIdentifier — (map)

            Information that identifies the noncompliant resource.

            • deviceCertificateId — (String)

              The ID of the certificate attached to the resource.

            • caCertificateId — (String)

              The ID of the CA certificate used to authorize the certificate.

            • cognitoIdentityPoolId — (String)

              The ID of the Amazon Cognito identity pool.

            • clientId — (String)

              The client ID.

            • policyVersionIdentifier — (map)

              The version of the policy associated with the resource.

              • policyName — (String)

                The name of the policy.

              • policyVersionId — (String)

                The ID of the version of the policy associated with the resource.

            • account — (String)

              The account with which the resource is associated.

            • iamRoleArn — (String)

              The ARN of the IAM role that has overly permissive actions.

            • roleAliasArn — (String)

              The ARN of the role alias that has overly permissive actions.

            • issuerCertificateIdentifier — (map)

              The issuer certificate identifier.

              • issuerCertificateSubject — (String)

                The subject of the issuer certificate.

              • issuerId — (String)

                The issuer ID.

              • issuerCertificateSerialNumber — (String)

                The issuer certificate serial number.

            • deviceCertificateArn — (String)

              The ARN of the identified device certificate.

          • additionalInfo — (map<String>)

            Other information about the noncompliant resource.

        • relatedResources — (Array<map>)

          The list of related resources.

          • resourceType — (String)

            The type of resource.

            Possible values include:
            • "DEVICE_CERTIFICATE"
            • "CA_CERTIFICATE"
            • "IOT_POLICY"
            • "COGNITO_IDENTITY_POOL"
            • "CLIENT_ID"
            • "ACCOUNT_SETTINGS"
            • "ROLE_ALIAS"
            • "IAM_ROLE"
            • "ISSUER_CERTIFICATE"
          • resourceIdentifier — (map)

            Information that identifies the resource.

            • deviceCertificateId — (String)

              The ID of the certificate attached to the resource.

            • caCertificateId — (String)

              The ID of the CA certificate used to authorize the certificate.

            • cognitoIdentityPoolId — (String)

              The ID of the Amazon Cognito identity pool.

            • clientId — (String)

              The client ID.

            • policyVersionIdentifier — (map)

              The version of the policy associated with the resource.

              • policyName — (String)

                The name of the policy.

              • policyVersionId — (String)

                The ID of the version of the policy associated with the resource.

            • account — (String)

              The account with which the resource is associated.

            • iamRoleArn — (String)

              The ARN of the IAM role that has overly permissive actions.

            • roleAliasArn — (String)

              The ARN of the role alias that has overly permissive actions.

            • issuerCertificateIdentifier — (map)

              The issuer certificate identifier.

              • issuerCertificateSubject — (String)

                The subject of the issuer certificate.

              • issuerId — (String)

                The issuer ID.

              • issuerCertificateSerialNumber — (String)

                The issuer certificate serial number.

            • deviceCertificateArn — (String)

              The ARN of the identified device certificate.

          • additionalInfo — (map<String>)

            Other information about the resource.

        • reasonForNonCompliance — (String)

          The reason the resource was noncompliant.

        • reasonForNonComplianceCode — (String)

          A code that indicates the reason that the resource was noncompliant.

        • isSuppressed — (Boolean)

          Indicates whether the audit finding was suppressed or not during reporting.

Returns:

  • (AWS.Request)

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

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

Gets information about an audit mitigation task that is used to apply mitigation actions to a set of audit findings. Properties include the actions being applied, the audit checks to which they're being applied, the task status, and aggregated task statistics.

Examples:

Calling the describeAuditMitigationActionsTask operation

var params = {
  taskId: 'STRING_VALUE' /* required */
};
iot.describeAuditMitigationActionsTask(params, 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 unique identifier for the audit mitigation task.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • taskStatus — (String)

        The current status of the task.

        Possible values include:
        • "IN_PROGRESS"
        • "COMPLETED"
        • "FAILED"
        • "CANCELED"
      • startTime — (Date)

        The date and time when the task was started.

      • endTime — (Date)

        The date and time when the task was completed or canceled.

      • taskStatistics — (map<map>)

        Aggregate counts of the results when the mitigation tasks were applied to the findings for this audit mitigation actions task.

        • totalFindingsCount — (Integer)

          The total number of findings to which a task is being applied.

        • failedFindingsCount — (Integer)

          The number of findings for which at least one of the actions failed when applied.

        • succeededFindingsCount — (Integer)

          The number of findings for which all mitigation actions succeeded when applied.

        • skippedFindingsCount — (Integer)

          The number of findings skipped because of filter conditions provided in the parameters to the command.

        • canceledFindingsCount — (Integer)

          The number of findings to which the mitigation action task was canceled when applied.

      • target — (map)

        Identifies the findings to which the mitigation actions are applied. This can be by audit checks, by audit task, or a set of findings.

        • auditTaskId — (String)

          If the task will apply a mitigation action to findings from a specific audit, this value uniquely identifies the audit.

        • findingIds — (Array<String>)

          If the task will apply a mitigation action to one or more listed findings, this value uniquely identifies those findings.

        • auditCheckToReasonCodeFilter — (map<Array<String>>)

          Specifies a filter in the form of an audit check and set of reason codes that identify the findings from the audit to which the audit mitigation actions task apply.

      • auditCheckToActionsMapping — (map<Array<String>>)

        Specifies the mitigation actions that should be applied to specific audit checks.

      • actionsDefinition — (Array<map>)

        Specifies the mitigation actions and their parameters that are applied as part of this task.

        • name — (String)

          A user-friendly name for the mitigation action.

        • id — (String)

          A unique identifier for the mitigation action.

        • roleArn — (String)

          The IAM role ARN used to apply this mitigation action.

        • actionParams — (map)

          The set of parameters for this mitigation action. The parameters vary, depending on the kind of action you apply.

          • updateDeviceCertificateParams — (map)

            Parameters to define a mitigation action that changes the state of the device certificate to inactive.

            • actionrequired — (String)

              The action that you want to apply to the device certificate. The only supported value is DEACTIVATE.

              Possible values include:
              • "DEACTIVATE"
          • updateCACertificateParams — (map)

            Parameters to define a mitigation action that changes the state of the CA certificate to inactive.

            • actionrequired — (String)

              The action that you want to apply to the CA certificate. The only supported value is DEACTIVATE.

              Possible values include:
              • "DEACTIVATE"
          • addThingsToThingGroupParams — (map)

            Parameters to define a mitigation action that moves devices associated with a certificate to one or more specified thing groups, typically for quarantine.

            • thingGroupNamesrequired — (Array<String>)

              The list of groups to which you want to add the things that triggered the mitigation action. You can add a thing to a maximum of 10 groups, but you can't add a thing to more than one group in the same hierarchy.

            • overrideDynamicGroups — (Boolean)

              Specifies if this mitigation action can move the things that triggered the mitigation action even if they are part of one or more dynamic thing groups.

          • replaceDefaultPolicyVersionParams — (map)

            Parameters to define a mitigation action that adds a blank policy to restrict permissions.

            • templateNamerequired — (String)

              The name of the template to be applied. The only supported value is BLANK_POLICY.

              Possible values include:
              • "BLANK_POLICY"
          • enableIoTLoggingParams — (map)

            Parameters to define a mitigation action that enables Amazon Web Services IoT Core logging at a specified level of detail.

            • roleArnForLoggingrequired — (String)

              The Amazon Resource Name (ARN) of the IAM role used for logging.

            • logLevelrequired — (String)

              Specifies the type of information to be logged.

              Possible values include:
              • "DEBUG"
              • "INFO"
              • "ERROR"
              • "WARN"
              • "DISABLED"
          • publishFindingToSnsParams — (map)

            Parameters to define a mitigation action that publishes findings to Amazon Simple Notification Service (Amazon SNS. You can implement your own custom actions in response to the Amazon SNS messages.

            • topicArnrequired — (String)

              The ARN of the topic to which you want to publish the findings.

Returns:

  • (AWS.Request)

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

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

Gets information about a Device Defender audit suppression.

Service Reference:

Examples:

Calling the describeAuditSuppression operation

var params = {
  checkName: 'STRING_VALUE', /* required */
  resourceIdentifier: { /* required */
    account: 'STRING_VALUE',
    caCertificateId: 'STRING_VALUE',
    clientId: 'STRING_VALUE',
    cognitoIdentityPoolId: 'STRING_VALUE',
    deviceCertificateArn: 'STRING_VALUE',
    deviceCertificateId: 'STRING_VALUE',
    iamRoleArn: 'STRING_VALUE',
    issuerCertificateIdentifier: {
      issuerCertificateSerialNumber: 'STRING_VALUE',
      issuerCertificateSubject: 'STRING_VALUE',
      issuerId: 'STRING_VALUE'
    },
    policyVersionIdentifier: {
      policyName: 'STRING_VALUE',
      policyVersionId: 'STRING_VALUE'
    },
    roleAliasArn: 'STRING_VALUE'
  }
};
iot.describeAuditSuppression(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      An audit check name. Checks must be enabled for your account. (Use DescribeAccountAuditConfiguration to see the list of all checks, including those that are enabled or use UpdateAccountAuditConfiguration to select which checks are enabled.)

    • resourceIdentifier — (map)

      Information that identifies the noncompliant resource.

      • deviceCertificateId — (String)

        The ID of the certificate attached to the resource.

      • caCertificateId — (String)

        The ID of the CA certificate used to authorize the certificate.

      • cognitoIdentityPoolId — (String)

        The ID of the Amazon Cognito identity pool.

      • clientId — (String)

        The client ID.

      • policyVersionIdentifier — (map)

        The version of the policy associated with the resource.

        • policyName — (String)

          The name of the policy.

        • policyVersionId — (String)

          The ID of the version of the policy associated with the resource.

      • account — (String)

        The account with which the resource is associated.

      • iamRoleArn — (String)

        The ARN of the IAM role that has overly permissive actions.

      • roleAliasArn — (String)

        The ARN of the role alias that has overly permissive actions.

      • issuerCertificateIdentifier — (map)

        The issuer certificate identifier.

        • issuerCertificateSubject — (String)

          The subject of the issuer certificate.

        • issuerId — (String)

          The issuer ID.

        • issuerCertificateSerialNumber — (String)

          The issuer certificate serial number.

      • deviceCertificateArn — (String)

        The ARN of the identified device 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:

      • checkName — (String)

        An audit check name. Checks must be enabled for your account. (Use DescribeAccountAuditConfiguration to see the list of all checks, including those that are enabled or use UpdateAccountAuditConfiguration to select which checks are enabled.)

      • resourceIdentifier — (map)

        Information that identifies the noncompliant resource.

        • deviceCertificateId — (String)

          The ID of the certificate attached to the resource.

        • caCertificateId — (String)

          The ID of the CA certificate used to authorize the certificate.

        • cognitoIdentityPoolId — (String)

          The ID of the Amazon Cognito identity pool.

        • clientId — (String)

          The client ID.

        • policyVersionIdentifier — (map)

          The version of the policy associated with the resource.

          • policyName — (String)

            The name of the policy.

          • policyVersionId — (String)

            The ID of the version of the policy associated with the resource.

        • account — (String)

          The account with which the resource is associated.

        • iamRoleArn — (String)

          The ARN of the IAM role that has overly permissive actions.

        • roleAliasArn — (String)

          The ARN of the role alias that has overly permissive actions.

        • issuerCertificateIdentifier — (map)

          The issuer certificate identifier.

          • issuerCertificateSubject — (String)

            The subject of the issuer certificate.

          • issuerId — (String)

            The issuer ID.

          • issuerCertificateSerialNumber — (String)

            The issuer certificate serial number.

        • deviceCertificateArn — (String)

          The ARN of the identified device certificate.

      • expirationDate — (Date)

        The epoch timestamp in seconds at which this suppression expires.

      • suppressIndefinitely — (Boolean)

        Indicates whether a suppression should exist indefinitely or not.

      • description — (String)

        The description of the audit suppression.

Returns:

  • (AWS.Request)

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

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

Gets information about a Device Defender audit.

Requires permission to access the DescribeAuditTask action.

Service Reference:

Examples:

Calling the describeAuditTask operation

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

Parameters:

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

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • taskStatus — (String)

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

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

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

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

        The time the audit started.

      • taskStatistics — (map)

        Statistical information about the audit.

        • totalChecks — (Integer)

          The number of checks in this audit.

        • inProgressChecks — (Integer)

          The number of checks in progress.

        • waitingForDataCollectionChecks — (Integer)

          The number of checks waiting for data collection.

        • compliantChecks — (Integer)

          The number of checks that found compliant resources.

        • nonCompliantChecks — (Integer)

          The number of checks that found noncompliant resources.

        • failedChecks — (Integer)

          The number of checks.

        • canceledChecks — (Integer)

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

      • scheduledAuditName — (String)

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

      • auditDetails — (map<map>)

        Detailed information about each check performed during this audit.

        • checkRunStatus — (String)

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

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

          True if the check is complete and found all resources compliant.

        • totalResourcesCount — (Integer)

          The number of resources on which the check was performed.

        • nonCompliantResourcesCount — (Integer)

          The number of resources that were found noncompliant during the check.

        • suppressedNonCompliantResourcesCount — (Integer)

          Describes how many of the non-compliant resources created during the evaluation of an audit check were marked as suppressed.

        • errorCode — (String)

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

        • message — (String)

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

Returns:

  • (AWS.Request)

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

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

Describes an authorizer.

Requires permission to access the DescribeAuthorizer action.

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.

        • signingDisabled — (Boolean)

          Specifies whether IoT validates the token signature in an authorization request.

        • enableCachingForHttp — (Boolean)

          When true, the result from the authorizer’s Lambda function is cached for the time specified in refreshAfterInSeconds. The cached result is used while the device reuses the same HTTP connection.

Returns:

  • (AWS.Request)

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

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

Returns information about a billing group.

Requires permission to access the DescribeBillingGroup action.

Service Reference:

Examples:

Calling the describeBillingGroup operation

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

Parameters:

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

      The name of the billing group.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • billingGroupName — (String)

        The name of the billing group.

      • billingGroupId — (String)

        The ID of the billing group.

      • billingGroupArn — (String)

        The ARN of the billing group.

      • version — (Integer)

        The version of the billing group.

      • billingGroupProperties — (map)

        The properties of the billing group.

        • billingGroupDescription — (String)

          The description of the billing group.

      • billingGroupMetadata — (map)

        Additional information about the billing group.

        • creationDate — (Date)

          The date the billing group was created.

Returns:

  • (AWS.Request)

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

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

Describes a registered CA certificate.

Requires permission to access the DescribeCACertificate action.

Service Reference:

Examples:

Calling the describeCACertificate operation

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

Parameters:

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

      The CA certificate identifier.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • certificateDescription — (map)

        The CA certificate description.

        • certificateArn — (String)

          The CA certificate ARN.

        • certificateId — (String)

          The CA certificate ID.

        • status — (String)

          The status of a CA certificate.

          Possible values include:
          • "ACTIVE"
          • "INACTIVE"
        • certificatePem — (String)

          The CA certificate data, in PEM format.

        • ownedBy — (String)

          The owner of the CA certificate.

        • creationDate — (Date)

          The date the CA certificate was created.

        • autoRegistrationStatus — (String)

          Whether the CA certificate configured for auto registration of device certificates. Valid values are "ENABLE" and "DISABLE"

          Possible values include:
          • "ENABLE"
          • "DISABLE"
        • lastModifiedDate — (Date)

          The date the CA certificate was last modified.

        • customerVersion — (Integer)

          The customer version of the CA certificate.

        • generationId — (String)

          The generation ID of the CA certificate.

        • validity — (map)

          When the CA certificate is valid.

          • notBefore — (Date)

            The certificate is not valid before this date.

          • notAfter — (Date)

            The certificate is not valid after this date.

        • certificateMode — (String)

          The mode of the CA.

          All the device certificates that are registered using this CA will be registered in the same mode as the CA. For more information about certificate mode for device certificates, see certificate mode.

          Possible values include:
          • "DEFAULT"
          • "SNI_ONLY"
      • registrationConfig — (map)

        Information about the registration configuration.

        • templateBody — (String)

          The template body.

        • roleArn — (String)

          The ARN of the role.

        • templateName — (String)

          The name of the provisioning template.

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.

Requires permission to access the DescribeCertificate action.

Service Reference:

Examples:

Calling the describeCertificate operation

var params = {
  certificateId: 'STRING_VALUE' /* required */
};
iot.describeCertificate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • certificateId — (String)

      The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • certificateDescription — (map)

        The description of the certificate.

        • certificateArn — (String)

          The ARN of the certificate.

        • certificateId — (String)

          The ID of the certificate.

        • caCertificateId — (String)

          The certificate ID of the CA certificate used to sign this certificate.

        • status — (String)

          The status of the certificate.

          Possible values include:
          • "ACTIVE"
          • "INACTIVE"
          • "REVOKED"
          • "PENDING_TRANSFER"
          • "REGISTER_INACTIVE"
          • "PENDING_ACTIVATION"
        • certificatePem — (String)

          The certificate data, in PEM format.

        • ownedBy — (String)

          The ID of the Amazon Web Services account that owns the certificate.

        • previousOwnedBy — (String)

          The ID of the Amazon Web Services account of the previous owner of the certificate.

        • creationDate — (Date)

          The date and time the certificate was created.

        • lastModifiedDate — (Date)

          The date and time the certificate was last modified.

        • customerVersion — (Integer)

          The customer version of the certificate.

        • transferData — (map)

          The transfer data.

          • transferMessage — (String)

            The transfer message.

          • rejectReason — (String)

            The reason why the transfer was rejected.

          • transferDate — (Date)

            The date the transfer took place.

          • acceptDate — (Date)

            The date the transfer was accepted.

          • rejectDate — (Date)

            The date the transfer was rejected.

        • generationId — (String)

          The generation ID of the certificate.

        • validity — (map)

          When the certificate is valid.

          • notBefore — (Date)

            The certificate is not valid before this date.

          • notAfter — (Date)

            The certificate is not valid after this date.

        • certificateMode — (String)

          The mode of the certificate.

          DEFAULT: A certificate in DEFAULT mode is either generated by Amazon Web Services IoT Core or registered with an issuer certificate authority (CA) in DEFAULT mode. Devices with certificates in DEFAULT mode aren't required to send the Server Name Indication (SNI) extension when connecting to Amazon Web Services IoT Core. However, to use features such as custom domains and VPC endpoints, we recommend that you use the SNI extension when connecting to Amazon Web Services IoT Core.

          SNI_ONLY: A certificate in SNI_ONLY mode is registered without an issuer CA. Devices with certificates in SNI_ONLY mode must send the SNI extension when connecting to Amazon Web Services IoT Core.

          For more information about the value for SNI extension, see Transport security in IoT.

          Possible values include:
          • "DEFAULT"
          • "SNI_ONLY"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeCertificateProvider(params = {}, callback) ⇒ AWS.Request

Describes a certificate provider.

Requires permission to access the DescribeCertificateProvider action.

Service Reference:

Examples:

Calling the describeCertificateProvider operation

var params = {
  certificateProviderName: 'STRING_VALUE' /* required */
};
iot.describeCertificateProvider(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • certificateProviderName — (String)

      The name of the certificate provider.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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:

      • certificateProviderName — (String)

        The name of the certificate provider.

      • certificateProviderArn — (String)

        The ARN of the certificate provider.

      • lambdaFunctionArn — (String)

        The Lambda function ARN that's associated with the certificate provider.

      • accountDefaultForOperations — (Array<String>)

        A list of the operations that the certificate provider will use to generate certificates. Valid value: CreateCertificateFromCsr.

      • creationDate — (Date)

        The date-time string that indicates when the certificate provider was created.

      • lastModifiedDate — (Date)

        The date-time string that indicates when the certificate provider was last updated.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeCustomMetric(params = {}, callback) ⇒ AWS.Request

Gets information about a Device Defender detect custom metric.

Requires permission to access the DescribeCustomMetric action.

Service Reference:

Examples:

Calling the describeCustomMetric operation

var params = {
  metricName: 'STRING_VALUE' /* required */
};
iot.describeCustomMetric(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • metricName — (String)

      The name of the custom metric.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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:

      • metricName — (String)

        The name of the custom metric.

      • metricArn — (String)

        The Amazon Resource Number (ARN) of the custom metric.

      • metricType — (String)

        The type of the custom metric.

        The type number only takes a single metric value as an input, but while submitting the metrics value in the DeviceMetrics report, it must be passed as an array with a single value.

        Possible values include:
        • "string-list"
        • "ip-address-list"
        • "number-list"
        • "number"
      • displayName — (String)

        Field represents a friendly name in the console for the custom metric; doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated.

      • creationDate — (Date)

        The creation date of the custom metric in milliseconds since epoch.

      • lastModifiedDate — (Date)

        The time the custom metric was last modified in milliseconds since epoch.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeDefaultAuthorizer(params = {}, callback) ⇒ AWS.Request

Describes the default authorizer.

Requires permission to access the DescribeDefaultAuthorizer action.

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.

        • signingDisabled — (Boolean)

          Specifies whether IoT validates the token signature in an authorization request.

        • enableCachingForHttp — (Boolean)

          When true, the result from the authorizer’s Lambda function is cached for the time specified in refreshAfterInSeconds. The cached result is used while the device reuses the same HTTP connection.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeDetectMitigationActionsTask(params = {}, callback) ⇒ AWS.Request

Gets information about a Device Defender ML Detect mitigation action.

Requires permission to access the DescribeDetectMitigationActionsTask action.

Examples:

Calling the describeDetectMitigationActionsTask operation

var params = {
  taskId: 'STRING_VALUE' /* required */
};
iot.describeDetectMitigationActionsTask(params, 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 unique identifier of the task.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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:

      • taskSummary — (map)

        The description of a task.

        • taskId — (String)

          The unique identifier of the task.

        • taskStatus — (String)

          The status of the task.

          Possible values include:
          • "IN_PROGRESS"
          • "SUCCESSFUL"
          • "FAILED"
          • "CANCELED"
        • taskStartTime — (Date)

          The date the task started.

        • taskEndTime — (Date)

          The date the task ended.

        • target — (map)

          Specifies the ML Detect findings to which the mitigation actions are applied.

          • violationIds — (Array<String>)

            The unique identifiers of the violations.

          • securityProfileName — (String)

            The name of the security profile.

          • behaviorName — (String)

            The name of the behavior.

        • violationEventOccurrenceRange — (map)

          Specifies the time period of which violation events occurred between.

          • startTimerequired — (Date)

            The start date and time of a time period in which violation events occurred.

          • endTimerequired — (Date)

            The end date and time of a time period in which violation events occurred.

        • onlyActiveViolationsIncluded — (Boolean)

          Includes only active violations.

        • suppressedAlertsIncluded — (Boolean)

          Includes suppressed alerts.

        • actionsDefinition — (Array<map>)

          The definition of the actions.

          • name — (String)

            A user-friendly name for the mitigation action.

          • id — (String)

            A unique identifier for the mitigation action.

          • roleArn — (String)

            The IAM role ARN used to apply this mitigation action.

          • actionParams — (map)

            The set of parameters for this mitigation action. The parameters vary, depending on the kind of action you apply.

            • updateDeviceCertificateParams — (map)

              Parameters to define a mitigation action that changes the state of the device certificate to inactive.

              • actionrequired — (String)

                The action that you want to apply to the device certificate. The only supported value is DEACTIVATE.

                Possible values include:
                • "DEACTIVATE"
            • updateCACertificateParams — (map)

              Parameters to define a mitigation action that changes the state of the CA certificate to inactive.

              • actionrequired — (String)

                The action that you want to apply to the CA certificate. The only supported value is DEACTIVATE.

                Possible values include:
                • "DEACTIVATE"
            • addThingsToThingGroupParams — (map)

              Parameters to define a mitigation action that moves devices associated with a certificate to one or more specified thing groups, typically for quarantine.

              • thingGroupNamesrequired — (Array<String>)

                The list of groups to which you want to add the things that triggered the mitigation action. You can add a thing to a maximum of 10 groups, but you can't add a thing to more than one group in the same hierarchy.

              • overrideDynamicGroups — (Boolean)

                Specifies if this mitigation action can move the things that triggered the mitigation action even if they are part of one or more dynamic thing groups.

            • replaceDefaultPolicyVersionParams — (map)

              Parameters to define a mitigation action that adds a blank policy to restrict permissions.

              • templateNamerequired — (String)

                The name of the template to be applied. The only supported value is BLANK_POLICY.

                Possible values include:
                • "BLANK_POLICY"
            • enableIoTLoggingParams — (map)

              Parameters to define a mitigation action that enables Amazon Web Services IoT Core logging at a specified level of detail.

              • roleArnForLoggingrequired — (String)

                The Amazon Resource Name (ARN) of the IAM role used for logging.

              • logLevelrequired — (String)

                Specifies the type of information to be logged.

                Possible values include:
                • "DEBUG"
                • "INFO"
                • "ERROR"
                • "WARN"
                • "DISABLED"
            • publishFindingToSnsParams — (map)

              Parameters to define a mitigation action that publishes findings to Amazon Simple Notification Service (Amazon SNS. You can implement your own custom actions in response to the Amazon SNS messages.

              • topicArnrequired — (String)

                The ARN of the topic to which you want to publish the findings.

        • taskStatistics — (map)

          The statistics of a mitigation action task.

          • actionsExecuted — (Integer)

            The actions that were performed.

          • actionsSkipped — (Integer)

            The actions that were skipped.

          • actionsFailed — (Integer)

            The actions that failed.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeDimension(params = {}, callback) ⇒ AWS.Request

Provides details about a dimension that is defined in your Amazon Web Services accounts.

Requires permission to access the DescribeDimension action.

Service Reference:

Examples:

Calling the describeDimension operation

var params = {
  name: 'STRING_VALUE' /* required */
};
iot.describeDimension(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • name — (String)

      The unique identifier for the dimension.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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:

      • name — (String)

        The unique identifier for the dimension.

      • arn — (String)

        The Amazon Resource Name (ARN) for the dimension.

      • type — (String)

        The type of the dimension.

        Possible values include:
        • "TOPIC_FILTER"
      • stringValues — (Array<String>)

        The value or list of values used to scope the dimension. For example, for topic filters, this is the pattern used to match the MQTT topic name.

      • creationDate — (Date)

        The date the dimension was created.

      • lastModifiedDate — (Date)

        The date the dimension was last modified.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeDomainConfiguration(params = {}, callback) ⇒ AWS.Request

Gets summary information about a domain configuration.

Requires permission to access the DescribeDomainConfiguration action.

Service Reference:

Examples:

Calling the describeDomainConfiguration operation

var params = {
  domainConfigurationName: 'STRING_VALUE' /* required */
};
iot.describeDomainConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domainConfigurationName — (String)

      The name of the domain 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. The data object has the following properties:

      • domainConfigurationName — (String)

        The name of the domain configuration.

      • domainConfigurationArn — (String)

        The ARN of the domain configuration.

      • domainName — (String)

        The name of the domain.

      • serverCertificates — (Array<map>)

        A list containing summary information about the server certificate included in the domain configuration.

        • serverCertificateArn — (String)

          The ARN of the server certificate.

        • serverCertificateStatus — (String)

          The status of the server certificate.

          Possible values include:
          • "INVALID"
          • "VALID"
        • serverCertificateStatusDetail — (String)

          Details that explain the status of the server certificate.

      • authorizerConfig — (map)

        An object that specifies the authorization service for a domain.

        • defaultAuthorizerName — (String)

          The name of the authorization service for a domain configuration.

        • allowAuthorizerOverride — (Boolean)

          A Boolean that specifies whether the domain configuration's authorization service can be overridden.

      • domainConfigurationStatus — (String)

        A Boolean value that specifies the current state of the domain configuration.

        Possible values include:
        • "ENABLED"
        • "DISABLED"
      • serviceType — (String)

        The type of service delivered by the endpoint.

        Possible values include:
        • "DATA"
        • "CREDENTIAL_PROVIDER"
        • "JOBS"
      • domainType — (String)

        The type of the domain.

        Possible values include:
        • "ENDPOINT"
        • "AWS_MANAGED"
        • "CUSTOMER_MANAGED"
      • lastStatusChangeDate — (Date)

        The date and time the domain configuration's status was last changed.

      • tlsConfig — (map)

        An object that specifies the TLS configuration for a domain.

        • securityPolicy — (String)

          The security policy for a domain configuration. For more information, see Security policies in the Amazon Web Services IoT Core developer guide.

      • serverCertificateConfig — (map)

        The server certificate configuration.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeEndpoint(params = {}, callback) ⇒ AWS.Request

Returns or creates a unique endpoint specific to the Amazon Web Services account making the call.

Note: The first time DescribeEndpoint is called, an endpoint is created. All subsequent calls to DescribeEndpoint return the same endpoint.

Requires permission to access the DescribeEndpoint action.

Service Reference:

Examples:

Calling the describeEndpoint operation

var params = {
  endpointType: 'STRING_VALUE'
};
iot.describeEndpoint(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • endpointType — (String)

      The endpoint type. Valid endpoint types include:

      • iot:Data - Returns a VeriSign signed data endpoint.

      • iot:Data-ATS - Returns an ATS signed data endpoint.

      • iot:CredentialProvider - Returns an IoT credentials provider API endpoint.

      • iot:Jobs - Returns an IoT device management Jobs API endpoint.

      We strongly recommend that customers use the newer iot:Data-ATS endpoint type to avoid issues related to the widespread distrust of Symantec certificate authorities. ATS Signed Certificates are more secure and are trusted by most popular browsers.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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.

Requires permission to access the DescribeEventConfigurations action.

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.

describeFleetMetric(params = {}, callback) ⇒ AWS.Request

Gets information about the specified fleet metric.

Requires permission to access the DescribeFleetMetric action.

Service Reference:

Examples:

Calling the describeFleetMetric operation

var params = {
  metricName: 'STRING_VALUE' /* required */
};
iot.describeFleetMetric(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • metricName — (String)

      The name of the fleet metric 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:

      • metricName — (String)

        The name of the fleet metric to describe.

      • queryString — (String)

        The search query string.

      • aggregationType — (map)

        The type of the aggregation query.

        • namerequired — (String)

          The name of the aggregation type.

          Possible values include:
          • "Statistics"
          • "Percentiles"
          • "Cardinality"
        • values — (Array<String>)

          A list of the values of aggregation types.

      • period — (Integer)

        The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 day)] and must be multiple of 60.

      • aggregationField — (String)

        The field to aggregate.

      • description — (String)

        The fleet metric description.

      • queryVersion — (String)

        The query version.

      • indexName — (String)

        The name of the index to search.

      • creationDate — (Date)

        The date when the fleet metric is created.

      • lastModifiedDate — (Date)

        The date when the fleet metric is last modified.

      • unit — (String)

        Used to support unit transformation such as milliseconds to seconds. The unit must be supported by CW metric.

        Possible values include:
        • "Seconds"
        • "Microseconds"
        • "Milliseconds"
        • "Bytes"
        • "Kilobytes"
        • "Megabytes"
        • "Gigabytes"
        • "Terabytes"
        • "Bits"
        • "Kilobits"
        • "Megabits"
        • "Gigabits"
        • "Terabits"
        • "Percent"
        • "Count"
        • "Bytes/Second"
        • "Kilobytes/Second"
        • "Megabytes/Second"
        • "Gigabytes/Second"
        • "Terabytes/Second"
        • "Bits/Second"
        • "Kilobits/Second"
        • "Megabits/Second"
        • "Gigabits/Second"
        • "Terabits/Second"
        • "Count/Second"
        • "None"
      • version — (Integer)

        The version of the fleet metric.

      • metricArn — (String)

        The ARN of the fleet metric to describe.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeIndex(params = {}, callback) ⇒ AWS.Request

Describes a search index.

Requires permission to access the DescribeIndex action.

Service Reference:

Examples:

Calling the describeIndex operation

var params = {
  indexName: 'STRING_VALUE' /* required */
};
iot.describeIndex(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • indexName — (String)

      The index name.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • indexName — (String)

        The index name.

      • indexStatus — (String)

        The index status.

        Possible values include:
        • "ACTIVE"
        • "BUILDING"
        • "REBUILDING"
      • schema — (String)

        Contains a value that specifies the type of indexing performed. Valid values are:

        • REGISTRY – Your thing index contains only registry data.

        • REGISTRY_AND_SHADOW - Your thing index contains registry data and shadow data.

        • REGISTRY_AND_CONNECTIVITY_STATUS - Your thing index contains registry data and thing connectivity status data.

        • REGISTRY_AND_SHADOW_AND_CONNECTIVITY_STATUS - Your thing index contains registry data, shadow data, and thing connectivity status data.

        • MULTI_INDEXING_MODE - Your thing index contains multiple data sources. For more information, see GetIndexingConfiguration.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeJob(params = {}, callback) ⇒ AWS.Request

Describes a job.

Requires permission to access the DescribeJob action.

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.

          Note: We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.
          Possible values include:
          • "CONTINUOUS"
          • "SNAPSHOT"
        • status — (String)

          The status of the job, one of IN_PROGRESS, CANCELED, DELETION_IN_PROGRESS or COMPLETED.

          Possible values include:
          • "IN_PROGRESS"
          • "CANCELED"
          • "COMPLETED"
          • "DELETION_IN_PROGRESS"
          • "SCHEDULED"
        • forceCanceled — (Boolean)

          Will be true if the job was canceled with the optional force parameter set to true.

        • reasonCode — (String)

          If the job was updated, provides the reason code for the update.

        • comment — (String)

          If the job was updated, describes the reason for the update.

        • targets — (Array<String>)

          A list of IoT things and thing groups to which the job should be sent.

        • description — (String)

          A short text description of the job.

        • presignedUrlConfig — (map)

          Configuration for pre-signed S3 URLs.

          • roleArn — (String)

            The ARN of an IAM role that grants 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.

            For information about addressing the confused deputy problem, see cross-service confused deputy prevention in the Amazon Web Services IoT Core developer guide.

          • expiresInSec — (Integer)

            How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 3600 seconds. Pre-signed URLs are generated when Jobs receives an MQTT request for the job document.

        • jobExecutionsRolloutConfig — (map)

          Allows you to create a staged rollout of a job.

          • maximumPerMinute — (Integer)

            The maximum number of things that will be notified of a pending job, per minute. This parameter allows you to create a staged rollout.

          • exponentialRate — (map)

            The rate of increase for a job rollout. This parameter allows you to define an exponential rate for a job rollout.

            • baseRatePerMinuterequired — (Integer)

              The minimum number of things that will be notified of a pending job, per minute at the start of job rollout. This parameter allows you to define the initial rate of rollout.

            • incrementFactorrequired — (Float)

              The exponential factor to increase the rate of rollout for a job.

              Amazon Web Services IoT Core supports up to one digit after the decimal (for example, 1.5, but not 1.55).

            • rateIncreaseCriteriarequired — (map)

              The criteria to initiate the increase in rate of rollout for a job.

              • numberOfNotifiedThings — (Integer)

                The threshold for number of notified things that will initiate the increase in rate of rollout.

              • numberOfSucceededThings — (Integer)

                The threshold for number of succeeded things that will initiate the increase in rate of rollout.

        • abortConfig — (map)

          Configuration for criteria to abort the job.

          • criteriaListrequired — (Array<map>)

            The list of criteria that determine when and how to abort the job.

            • failureTyperequired — (String)

              The type of job execution failures that can initiate a job abort.

              Possible values include:
              • "FAILED"
              • "REJECTED"
              • "TIMED_OUT"
              • "ALL"
            • actionrequired — (String)

              The type of job action to take to initiate the job abort.

              Possible values include:
              • "CANCEL"
            • thresholdPercentagerequired — (Float)

              The minimum percentage of job execution failures that must occur to initiate the job abort.

              Amazon Web Services IoT Core supports up to two digits after the decimal (for example, 10.9 and 10.99, but not 10.999).

            • minNumberOfExecutedThingsrequired — (Integer)

              The minimum number of things which must receive job execution notifications before the job can be aborted.

        • createdAt — (Date)

          The time, in seconds since the epoch, when the job was created.

        • lastUpdatedAt — (Date)

          The time, in seconds since the epoch, when the job was last updated.

        • completedAt — (Date)

          The time, in seconds since the epoch, when the job was completed.

        • jobProcessDetails — (map)

          Details about the job process.

          • processingTargets — (Array<String>)

            The target devices to which the job execution is being rolled out. This value will be null after the job execution has finished rolling out to all the target devices.

          • numberOfCanceledThings — (Integer)

            The number of things that cancelled the job.

          • numberOfSucceededThings — (Integer)

            The number of things which successfully completed the job.

          • numberOfFailedThings — (Integer)

            The number of things that failed executing the job.

          • numberOfRejectedThings — (Integer)

            The number of things that rejected the job.

          • numberOfQueuedThings — (Integer)

            The number of things that are awaiting execution of the job.

          • numberOfInProgressThings — (Integer)

            The number of things currently executing the job.

          • numberOfRemovedThings — (Integer)

            The number of things that are no longer scheduled to execute the job because they have been deleted or have been removed from the group that was a target of the job.

          • numberOfTimedOutThings — (Integer)

            The number of things whose job execution status is TIMED_OUT.

        • timeoutConfig — (map)

          Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to IN_PROGRESS. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set to TIMED_OUT.

          • inProgressTimeoutInMinutes — (Integer)

            Specifies the amount of time, in minutes, this device has to finish execution of this job. The timeout interval can be anywhere between 1 minute and 7 days (1 to 10080 minutes). The in progress timer can't be updated and will apply to all job executions for the job. Whenever a job execution remains in the IN_PROGRESS status for longer than this interval, the job execution will fail and switch to the terminal TIMED_OUT status.

        • namespaceId — (String)

          The namespace used to indicate that a job is a customer-managed job.

          When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.

          $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/

          Note: The namespaceId feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.
        • jobTemplateArn — (String)

          The ARN of the job template used to create the job.

        • jobExecutionsRetryConfig — (map)

          The configuration for the criteria to retry the job.

          • criteriaListrequired — (Array<map>)

            The list of criteria that determines how many retries are allowed for each failure type for a job.

            • failureTyperequired — (String)

              The type of job execution failures that can initiate a job retry.

              Possible values include:
              • "FAILED"
              • "TIMED_OUT"
              • "ALL"
            • numberOfRetriesrequired — (Integer)

              The number of retries allowed for a failure type for the job.

        • documentParameters — (map<String>)

          A key-value map that pairs the patterns that need to be replaced in a managed template job document schema. You can use the description of each key as a guidance to specify the inputs during runtime when creating a job.

          Note: documentParameters can only be used when creating jobs from Amazon Web Services managed templates. This parameter can't be used with custom job templates or to create jobs from them.
        • isConcurrent — (Boolean)

          Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling previously created executions, otherwise false.

        • schedulingConfig — (map)

          The configuration that allows you to schedule a job for a future date and time in addition to specifying the end behavior for each job execution.

          • startTime — (String)

            The time a job will begin rollout of the job document to all devices in the target group for a job. The startTime can be scheduled up to a year in advance and must be scheduled a minimum of thirty minutes from the current time. The date and time format for the startTime is YYYY-MM-DD for the date and HH:MM for the time.

            For more information on the syntax for startTime when using an API command or the Command Line Interface, see Timestamp.

          • endTime — (String)

            The time a job will stop rollout of the job document to all devices in the target group for a job. The endTime must take place no later than two years from the current time and be scheduled a minimum of thirty minutes from the current time. The minimum duration between startTime and endTime is thirty minutes. The maximum duration between startTime and endTime is two years. The date and time format for the endTime is YYYY-MM-DD for the date and HH:MM for the time.

            For more information on the syntax for endTime when using an API command or the Command Line Interface, see Timestamp.

          • endBehavior — (String)

            Specifies the end behavior for all job executions after a job reaches the selected endTime. If endTime is not selected when creating the job, then endBehavior does not apply.

            Possible values include:
            • "STOP_ROLLOUT"
            • "CANCEL"
            • "FORCE_CANCEL"
          • maintenanceWindows — (Array<map>)

            An optional configuration within the SchedulingConfig to setup a recurring maintenance window with a predetermined start time and duration for the rollout of a job document to all devices in a target group for a job.

            • startTimerequired — (String)

              Displays the start time of the next maintenance window.

            • durationInMinutesrequired — (Integer)

              Displays the duration of the next maintenance window.

        • scheduledJobRollouts — (Array<map>)

          Displays the next seven maintenance window occurrences and their start times.

          • startTime — (String)

            Displays the start times of the next seven maintenance window occurrences.

        • destinationPackageVersions — (Array<String>)

          The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.

          Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeJobExecution(params = {}, callback) ⇒ AWS.Request

Describes a job execution.

Requires permission to access the DescribeJobExecution action.

Service Reference:

Examples:

Calling the describeJobExecution operation

var params = {
  jobId: 'STRING_VALUE', /* required */
  thingName: 'STRING_VALUE', /* required */
  executionNumber: 'NUMBER_VALUE'
};
iot.describeJobExecution(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • jobId — (String)

      The unique identifier you assigned to this job when it was created.

    • thingName — (String)

      The name of the thing on which the job execution is running.

    • executionNumber — (Integer)

      A string (consisting of the digits "0" through "9" which is used to specify a particular job execution on a particular device.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • execution — (map)

        Information about the job execution.

        • jobId — (String)

          The unique identifier you assigned to the job when it was created.

        • status — (String)

          The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, TIMED_OUT, CANCELED, or REJECTED).

          Possible values include:
          • "QUEUED"
          • "IN_PROGRESS"
          • "SUCCEEDED"
          • "FAILED"
          • "TIMED_OUT"
          • "REJECTED"
          • "REMOVED"
          • "CANCELED"
        • forceCanceled — (Boolean)

          Will be true if the job execution was canceled with the optional force parameter set to true.

        • statusDetails — (map)

          A collection of name/value pairs that describe the status of the job execution.

          • detailsMap — (map<String>)

            The job execution status.

        • thingArn — (String)

          The ARN of the thing on which the job execution is running.

        • queuedAt — (Date)

          The time, in seconds since the epoch, when the job execution was queued.

        • startedAt — (Date)

          The time, in seconds since the epoch, when the job execution started.

        • lastUpdatedAt — (Date)

          The time, in seconds since the epoch, when the job execution was last updated.

        • executionNumber — (Integer)

          A string (consisting of the digits "0" through "9") which identifies this particular job execution on this particular device. It can be used in commands which return or update job execution information.

        • versionNumber — (Integer)

          The version of the job execution. Job execution versions are incremented each time they are updated by a device.

        • approximateSecondsBeforeTimedOut — (Integer)

          The estimated number of seconds that remain before the job execution status will be changed to TIMED_OUT. The timeout interval can be anywhere between 1 minute and 7 days (1 to 10080 minutes). The actual job execution timeout can occur up to 60 seconds later than the estimated duration. This value will not be included if the job execution has reached a terminal status.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeJobTemplate(params = {}, callback) ⇒ AWS.Request

Returns information about a job template.

Service Reference:

Examples:

Calling the describeJobTemplate operation

var params = {
  jobTemplateId: 'STRING_VALUE' /* required */
};
iot.describeJobTemplate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • jobTemplateId — (String)

      The unique identifier of the job template.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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:

      • jobTemplateArn — (String)

        The ARN of the job template.

      • jobTemplateId — (String)

        The unique identifier of the job template.

      • description — (String)

        A description of the job template.

      • documentSource — (String)

        An S3 link to the job document.

      • document — (String)

        The job document.

      • createdAt — (Date)

        The time, in seconds since the epoch, when the job template was created.

      • presignedUrlConfig — (map)

        Configuration for pre-signed S3 URLs.

        • roleArn — (String)

          The ARN of an IAM role that 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.

          For information about addressing the confused deputy problem, see cross-service confused deputy prevention in the Amazon Web Services IoT Core developer guide.

        • expiresInSec — (Integer)

          How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 3600 seconds. Pre-signed URLs are generated when Jobs receives an MQTT request for the job document.

      • jobExecutionsRolloutConfig — (map)

        Allows you to create a staged rollout of a job.

        • maximumPerMinute — (Integer)

          The maximum number of things that will be notified of a pending job, per minute. This parameter allows you to create a staged rollout.

        • exponentialRate — (map)

          The rate of increase for a job rollout. This parameter allows you to define an exponential rate for a job rollout.

          • baseRatePerMinuterequired — (Integer)

            The minimum number of things that will be notified of a pending job, per minute at the start of job rollout. This parameter allows you to define the initial rate of rollout.

          • incrementFactorrequired — (Float)

            The exponential factor to increase the rate of rollout for a job.

            Amazon Web Services IoT Core supports up to one digit after the decimal (for example, 1.5, but not 1.55).

          • rateIncreaseCriteriarequired — (map)

            The criteria to initiate the increase in rate of rollout for a job.

            • numberOfNotifiedThings — (Integer)

              The threshold for number of notified things that will initiate the increase in rate of rollout.

            • numberOfSucceededThings — (Integer)

              The threshold for number of succeeded things that will initiate the increase in rate of rollout.

      • abortConfig — (map)

        The criteria that determine when and how a job abort takes place.

        • criteriaListrequired — (Array<map>)

          The list of criteria that determine when and how to abort the job.

          • failureTyperequired — (String)

            The type of job execution failures that can initiate a job abort.

            Possible values include:
            • "FAILED"
            • "REJECTED"
            • "TIMED_OUT"
            • "ALL"
          • actionrequired — (String)

            The type of job action to take to initiate the job abort.

            Possible values include:
            • "CANCEL"
          • thresholdPercentagerequired — (Float)

            The minimum percentage of job execution failures that must occur to initiate the job abort.

            Amazon Web Services IoT Core supports up to two digits after the decimal (for example, 10.9 and 10.99, but not 10.999).

          • minNumberOfExecutedThingsrequired — (Integer)

            The minimum number of things which must receive job execution notifications before the job can be aborted.

      • timeoutConfig — (map)

        Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to IN_PROGRESS. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set to TIMED_OUT.

        • inProgressTimeoutInMinutes — (Integer)

          Specifies the amount of time, in minutes, this device has to finish execution of this job. The timeout interval can be anywhere between 1 minute and 7 days (1 to 10080 minutes). The in progress timer can't be updated and will apply to all job executions for the job. Whenever a job execution remains in the IN_PROGRESS status for longer than this interval, the job execution will fail and switch to the terminal TIMED_OUT status.

      • jobExecutionsRetryConfig — (map)

        The configuration that determines how many retries are allowed for each failure type for a job.

        • criteriaListrequired — (Array<map>)

          The list of criteria that determines how many retries are allowed for each failure type for a job.

          • failureTyperequired — (String)

            The type of job execution failures that can initiate a job retry.

            Possible values include:
            • "FAILED"
            • "TIMED_OUT"
            • "ALL"
          • numberOfRetriesrequired — (Integer)

            The number of retries allowed for a failure type for the job.

      • maintenanceWindows — (Array<map>)

        Allows you to configure an optional maintenance window for the rollout of a job document to all devices in the target group for a job.

        • startTimerequired — (String)

          Displays the start time of the next maintenance window.

        • durationInMinutesrequired — (Integer)

          Displays the duration of the next maintenance window.

      • destinationPackageVersions — (Array<String>)

        The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.

        Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeManagedJobTemplate(params = {}, callback) ⇒ AWS.Request

View details of a managed job template.

Service Reference:

Examples:

Calling the describeManagedJobTemplate operation

var params = {
  templateName: 'STRING_VALUE', /* required */
  templateVersion: 'STRING_VALUE'
};
iot.describeManagedJobTemplate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • templateName — (String)

      The unique name of a managed job template, which is required.

    • templateVersion — (String)

      An optional parameter to specify version of a managed template. If not specified, the pre-defined default version is returned.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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:

      • templateName — (String)

        The unique name of a managed template, such as AWS-Reboot.

      • templateArn — (String)

        The unique Amazon Resource Name (ARN) of the managed template.

      • description — (String)

        The unique description of a managed template.

      • templateVersion — (String)

        The version for a managed template.

      • environments — (Array<String>)

        A list of environments that are supported with the managed job template.

      • documentParameters — (Array<map>)

        A map of key-value pairs that you can use as guidance to specify the inputs for creating a job from a managed template.

        Note: documentParameters can only be used when creating jobs from Amazon Web Services managed templates. This parameter can't be used with custom job templates or to create jobs from them.
        • key — (String)

          Key of the map field containing the patterns that need to be replaced in a managed template job document schema.

        • description — (String)

          Description of the map field containing the patterns that need to be replaced in a managed template job document schema.

        • regex — (String)

          A regular expression of the patterns that need to be replaced in a managed template job document schema.

        • example — (String)

          An example illustrating a pattern that need to be replaced in a managed template job document schema.

        • optional — (Boolean)

          Specifies whether a pattern that needs to be replaced in a managed template job document schema is optional or required.

      • document — (String)

        The document schema for a managed job template.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeMitigationAction(params = {}, callback) ⇒ AWS.Request

Gets information about a mitigation action.

Requires permission to access the DescribeMitigationAction action.

Service Reference:

Examples:

Calling the describeMitigationAction operation

var params = {
  actionName: 'STRING_VALUE' /* required */
};
iot.describeMitigationAction(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • actionName — (String)

      The friendly name that uniquely identifies the mitigation action.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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:

      • actionName — (String)

        The friendly name that uniquely identifies the mitigation action.

      • actionType — (String)

        The type of mitigation action.

        Possible values include:
        • "UPDATE_DEVICE_CERTIFICATE"
        • "UPDATE_CA_CERTIFICATE"
        • "ADD_THINGS_TO_THING_GROUP"
        • "REPLACE_DEFAULT_POLICY_VERSION"
        • "ENABLE_IOT_LOGGING"
        • "PUBLISH_FINDING_TO_SNS"
      • actionArn — (String)

        The ARN that identifies this migration action.

      • actionId — (String)

        A unique identifier for this action.

      • roleArn — (String)

        The ARN of the IAM role used to apply this action.

      • actionParams — (map)

        Parameters that control how the mitigation action is applied, specific to the type of mitigation action.

        • updateDeviceCertificateParams — (map)

          Parameters to define a mitigation action that changes the state of the device certificate to inactive.

          • actionrequired — (String)

            The action that you want to apply to the device certificate. The only supported value is DEACTIVATE.

            Possible values include:
            • "DEACTIVATE"
        • updateCACertificateParams — (map)

          Parameters to define a mitigation action that changes the state of the CA certificate to inactive.

          • actionrequired — (String)

            The action that you want to apply to the CA certificate. The only supported value is DEACTIVATE.

            Possible values include:
            • "DEACTIVATE"
        • addThingsToThingGroupParams — (map)

          Parameters to define a mitigation action that moves devices associated with a certificate to one or more specified thing groups, typically for quarantine.

          • thingGroupNamesrequired — (Array<String>)

            The list of groups to which you want to add the things that triggered the mitigation action. You can add a thing to a maximum of 10 groups, but you can't add a thing to more than one group in the same hierarchy.

          • overrideDynamicGroups — (Boolean)

            Specifies if this mitigation action can move the things that triggered the mitigation action even if they are part of one or more dynamic thing groups.

        • replaceDefaultPolicyVersionParams — (map)

          Parameters to define a mitigation action that adds a blank policy to restrict permissions.

          • templateNamerequired — (String)

            The name of the template to be applied. The only supported value is BLANK_POLICY.

            Possible values include:
            • "BLANK_POLICY"
        • enableIoTLoggingParams — (map)

          Parameters to define a mitigation action that enables Amazon Web Services IoT Core logging at a specified level of detail.

          • roleArnForLoggingrequired — (String)

            The Amazon Resource Name (ARN) of the IAM role used for logging.

          • logLevelrequired — (String)

            Specifies the type of information to be logged.

            Possible values include:
            • "DEBUG"
            • "INFO"
            • "ERROR"
            • "WARN"
            • "DISABLED"
        • publishFindingToSnsParams — (map)

          Parameters to define a mitigation action that publishes findings to Amazon Simple Notification Service (Amazon SNS. You can implement your own custom actions in response to the Amazon SNS messages.

          • topicArnrequired — (String)

            The ARN of the topic to which you want to publish the findings.

      • creationDate — (Date)

        The date and time when the mitigation action was added to your Amazon Web Services accounts.

      • lastModifiedDate — (Date)

        The date and time when the mitigation action was last changed.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeProvisioningTemplate(params = {}, callback) ⇒ AWS.Request

Returns information about a provisioning template.

Requires permission to access the DescribeProvisioningTemplate action.

Service Reference:

Examples:

Calling the describeProvisioningTemplate operation

var params = {
  templateName: 'STRING_VALUE' /* required */
};
iot.describeProvisioningTemplate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • templateName — (String)

      The name of the provisioning template.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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:

      • templateArn — (String)

        The ARN of the provisioning template.

      • templateName — (String)

        The name of the provisioning template.

      • description — (String)

        The description of the provisioning template.

      • creationDate — (Date)

        The date when the provisioning template was created.

      • lastModifiedDate — (Date)

        The date when the provisioning template was last modified.

      • defaultVersionId — (Integer)

        The default fleet template version ID.

      • templateBody — (String)

        The JSON formatted contents of the provisioning template.

      • enabled — (Boolean)

        True if the provisioning template is enabled, otherwise false.

      • provisioningRoleArn — (String)

        The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a device.

      • preProvisioningHook — (map)

        Gets information about a pre-provisioned hook.

        • payloadVersion — (String)

          The payload that was sent to the target function.

          Note: Only Lambda functions are currently supported.

        • targetArnrequired — (String)

          The ARN of the target function.

          Note: Only Lambda functions are currently supported.

      • type — (String)

        The type you define in a provisioning template. You can create a template with only one type. You can't change the template type after its creation. The default value is FLEET_PROVISIONING. For more information about provisioning template, see: Provisioning template.

        Possible values include:
        • "FLEET_PROVISIONING"
        • "JITP"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeProvisioningTemplateVersion(params = {}, callback) ⇒ AWS.Request

Returns information about a provisioning template version.

Requires permission to access the DescribeProvisioningTemplateVersion action.

Examples:

Calling the describeProvisioningTemplateVersion operation

var params = {
  templateName: 'STRING_VALUE', /* required */
  versionId: 'NUMBER_VALUE' /* required */
};
iot.describeProvisioningTemplateVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • templateName — (String)

      The template name.

    • versionId — (Integer)

      The provisioning template 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:

      • versionId — (Integer)

        The provisioning template version ID.

      • creationDate — (Date)

        The date when the provisioning template version was created.

      • templateBody — (String)

        The JSON formatted contents of the provisioning template version.

      • isDefaultVersion — (Boolean)

        True if the provisioning template version is the default version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeRoleAlias(params = {}, callback) ⇒ AWS.Request

Describes a role alias.

Requires permission to access the DescribeRoleAlias action.

Service Reference:

Examples:

Calling the describeRoleAlias operation

var params = {
  roleAlias: 'STRING_VALUE' /* required */
};
iot.describeRoleAlias(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • roleAlias — (String)

      The role alias to describe.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • roleAliasDescription — (map)

        The role alias description.

        • roleAlias — (String)

          The role alias.

        • roleAliasArn — (String)

          The ARN of the role alias.

        • roleArn — (String)

          The role ARN.

        • owner — (String)

          The role alias owner.

        • credentialDurationSeconds — (Integer)

          The number of seconds for which the credential is valid.

        • creationDate — (Date)

          The UNIX timestamp of when the role alias was created.

        • lastModifiedDate — (Date)

          The UNIX timestamp of when the role alias was last modified.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeScheduledAudit(params = {}, callback) ⇒ AWS.Request

Gets information about a scheduled audit.

Requires permission to access the DescribeScheduledAudit action.

Service Reference:

Examples:

Calling the describeScheduledAudit operation

var params = {
  scheduledAuditName: 'STRING_VALUE' /* required */
};
iot.describeScheduledAudit(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • scheduledAuditName — (String)

      The name of the scheduled audit whose information you want to get.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • frequency — (String)

        How often the scheduled audit takes place, either one of DAILY, WEEKLY, BIWEEKLY, or MONTHLY. The start time of each audit is determined by the system.

        Possible values include:
        • "DAILY"
        • "WEEKLY"
        • "BIWEEKLY"
        • "MONTHLY"
      • dayOfMonth — (String)

        The day of the month on which the scheduled audit takes place. This is will be 1 through 31 or LAST. If days 29-31 are specified, and the month does not have that many days, the audit takes place on the LAST day of the month.

      • dayOfWeek — (String)

        The day of the week on which the scheduled audit takes place, either one of SUN, MON, TUE, WED, THU, FRI, or SAT.

        Possible values include:
        • "SUN"
        • "MON"
        • "TUE"
        • "WED"
        • "THU"
        • "FRI"
        • "SAT"
      • targetCheckNames — (Array<String>)

        Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use DescribeAccountAuditConfiguration to see the list of all checks, including those that are enabled or use UpdateAccountAuditConfiguration to select which checks are enabled.)

      • scheduledAuditName — (String)

        The name of the scheduled audit.

      • scheduledAuditArn — (String)

        The ARN of the scheduled audit.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeSecurityProfile(params = {}, callback) ⇒ AWS.Request

Gets information about a Device Defender security profile.

Requires permission to access the DescribeSecurityProfile action.

Service Reference:

Examples:

Calling the describeSecurityProfile operation

var params = {
  securityProfileName: 'STRING_VALUE' /* required */
};
iot.describeSecurityProfile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • securityProfileName — (String)

      The name of the security profile whose information you want to get.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • securityProfileName — (String)

        The name of the security profile.

      • securityProfileArn — (String)

        The ARN of the security profile.

      • securityProfileDescription — (String)

        A description of the security profile (associated with the security profile when it was created or updated).

      • behaviors — (Array<map>)

        Specifies the behaviors that, when violated by a device (thing), cause an alert.

        • namerequired — (String)

          The name you've given to the behavior.

        • metric — (String)

          What is measured by the behavior.

        • metricDimension — (map)

          The dimension for a metric in your behavior. For example, using a TOPIC_FILTER dimension, you can narrow down the scope of the metric to only MQTT topics where the name matches the pattern specified in the dimension. This can't be used with custom metrics.

          • dimensionNamerequired — (String)

            A unique identifier for the dimension.

          • operator — (String)

            Defines how the dimensionValues of a dimension are interpreted. For example, for dimension type TOPIC_FILTER, the IN operator, a message will be counted only if its topic matches one of the topic filters. With NOT_IN operator, a message will be counted only if it doesn't match any of the topic filters. The operator is optional: if it's not provided (is null), it will be interpreted as IN.

            Possible values include:
            • "IN"
            • "NOT_IN"
        • criteria — (map)

          The criteria that determine if a device is behaving normally in regard to the metric.

          Note: In the IoT console, you can choose to be sent an alert through Amazon SNS when IoT Device Defender detects that a device is behaving anomalously.
          • comparisonOperator — (String)

            The operator that relates the thing measured (metric) to the criteria (containing a value or statisticalThreshold). Valid operators include:

            • string-list: in-set and not-in-set

            • number-list: in-set and not-in-set

            • ip-address-list: in-cidr-set and not-in-cidr-set

            • number: less-than, less-than-equals, greater-than, and greater-than-equals

            Possible values include:
            • "less-than"
            • "less-than-equals"
            • "greater-than"
            • "greater-than-equals"
            • "in-cidr-set"
            • "not-in-cidr-set"
            • "in-port-set"
            • "not-in-port-set"
            • "in-set"
            • "not-in-set"
          • value — (map)

            The value to be compared with the metric.

            • count — (Integer)

              If the comparisonOperator calls for a numeric value, use this to specify that numeric value to be compared with the metric.

            • cidrs — (Array<String>)

              If the comparisonOperator calls for a set of CIDRs, use this to specify that set to be compared with the metric.

            • ports — (Array<Integer>)

              If the comparisonOperator calls for a set of ports, use this to specify that set to be compared with the metric.

            • number — (Float)

              The numeral value of a metric.

            • numbers — (Array<Float>)

              The numeral values of a metric.

            • strings — (Array<String>)

              The string values of a metric.

          • durationSeconds — (Integer)

            Use this to specify the time duration over which the behavior is evaluated, for those criteria that have a time dimension (for example, NUM_MESSAGES_SENT). For a statisticalThreshhold metric comparison, measurements from all devices are accumulated over this time duration before being used to calculate percentiles, and later, measurements from an individual device are also accumulated over this time duration before being given a percentile rank. Cannot be used with list-based metric datatypes.

          • consecutiveDatapointsToAlarm — (Integer)

            If a device is in violation of the behavior for the specified number of consecutive datapoints, an alarm occurs. If not specified, the default is 1.

          • consecutiveDatapointsToClear — (Integer)

            If an alarm has occurred and the offending device is no longer in violation of the behavior for the specified number of consecutive datapoints, the alarm is cleared. If not specified, the default is 1.

          • statisticalThreshold — (map)

            A statistical ranking (percentile)that indicates a threshold value by which a behavior is determined to be in compliance or in violation of the behavior.

            • statistic — (String)

              The percentile that resolves to a threshold value by which compliance with a behavior is determined. Metrics are collected over the specified period (durationSeconds) from all reporting devices in your account and statistical ranks are calculated. Then, the measurements from a device are collected over the same period. If the accumulated measurements from the device fall above or below (comparisonOperator) the value associated with the percentile specified, then the device is considered to be in compliance with the behavior, otherwise a violation occurs.

          • mlDetectionConfig — (map)

            The configuration of an ML Detect

            • confidenceLevelrequired — (String)

              The sensitivity of anomalous behavior evaluation. Can be Low, Medium, or High.

              Possible values include:
              • "LOW"
              • "MEDIUM"
              • "HIGH"
        • suppressAlerts — (Boolean)

          Suppresses alerts.

        • exportMetric — (Boolean)

          Value indicates exporting metrics related to the behavior when it is true.

      • alertTargets — (map<map>)

        Where the alerts are sent. (Alerts are always sent to the console.)

        • alertTargetArnrequired — (String)

          The Amazon Resource Name (ARN) of the notification target to which alerts are sent.

        • roleArnrequired — (String)

          The ARN of the role that grants permission to send alerts to the notification target.

      • additionalMetricsToRetain — (Array<String>)

        Please use DescribeSecurityProfileResponse$additionalMetricsToRetainV2 instead.

        A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's behaviors, but it is also retained for any metric specified here.

      • additionalMetricsToRetainV2 — (Array<map>)

        A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's behaviors, but it is also retained for any metric specified here.

        • metricrequired — (String)

          What is measured by the behavior.

        • metricDimension — (map)

          The dimension of a metric. This can't be used with custom metrics.

          • dimensionNamerequired — (String)

            A unique identifier for the dimension.

          • operator — (String)

            Defines how the dimensionValues of a dimension are interpreted. For example, for dimension type TOPIC_FILTER, the IN operator, a message will be counted only if its topic matches one of the topic filters. With NOT_IN operator, a message will be counted only if it doesn't match any of the topic filters. The operator is optional: if it's not provided (is null), it will be interpreted as IN.

            Possible values include:
            • "IN"
            • "NOT_IN"
        • exportMetric — (Boolean)

          The value indicates exporting metrics related to the MetricToRetain when it's true.

      • version — (Integer)

        The version of the security profile. A new version is generated whenever the security profile is updated.

      • creationDate — (Date)

        The time the security profile was created.

      • lastModifiedDate — (Date)

        The time the security profile was last modified.

      • metricsExportConfig — (map)

        Specifies the MQTT topic and role ARN required for metric export.

        • mqttTopicrequired — (String)

          The MQTT topic that Device Defender Detect should publish messages to for metrics export.

        • roleArnrequired — (String)

          This role ARN has permission to publish MQTT messages, after which Device Defender Detect can assume the role and publish messages on your behalf.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeStream(params = {}, callback) ⇒ AWS.Request

Gets information about a stream.

Requires permission to access the DescribeStream action.

Service Reference:

Examples:

Calling the describeStream operation

var params = {
  streamId: 'STRING_VALUE' /* required */
};
iot.describeStream(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • streamId — (String)

      The stream ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • streamInfo — (map)

        Information about the stream.

        • streamId — (String)

          The stream ID.

        • streamArn — (String)

          The stream ARN.

        • streamVersion — (Integer)

          The stream version.

        • description — (String)

          The description of the stream.

        • files — (Array<map>)

          The files to stream.

          • fileId — (Integer)

            The file ID.

          • s3Location — (map)

            The location of the file in S3.

            • bucket — (String)

              The S3 bucket.

            • key — (String)

              The S3 key.

            • version — (String)

              The S3 bucket version.

        • createdAt — (Date)

          The date when the stream was created.

        • lastUpdatedAt — (Date)

          The date when the stream was last updated.

        • roleArn — (String)

          An IAM role IoT assumes to access your S3 files.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeThing(params = {}, callback) ⇒ AWS.Request

Gets information about the specified thing.

Requires permission to access the DescribeThing action.

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 MQTT client ID. For a typical device, the thing name is also used as the default MQTT client ID. Although we don’t require a mapping between a thing's registry name and its use of MQTT client IDs, certificates, or shadow state, we recommend that you choose a thing name and use it as the MQTT client ID for the registry and the Device Shadow service.

        This lets you better organize your IoT fleet without removing the flexibility of the underlying device certificate model or shadows.

      • thingName — (String)

        The name of the thing.

      • thingId — (String)

        The ID of the thing to describe.

      • thingArn — (String)

        The ARN of the thing to describe.

      • thingTypeName — (String)

        The thing type name.

      • attributes — (map<String>)

        The thing attributes.

      • version — (Integer)

        The current version of the thing record in the registry.

        Note: To avoid unintentional changes to the information in the registry, you can pass the version information in the expectedVersion parameter of the UpdateThing and DeleteThing calls.
      • billingGroupName — (String)

        The name of the billing group the thing belongs to.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeThingGroup(params = {}, callback) ⇒ AWS.Request

Describe a thing group.

Requires permission to access the DescribeThingGroup action.

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 or UpdateThingGroup.
      • thingGroupMetadata — (map)

        Thing group metadata.

        • parentGroupName — (String)

          The parent thing group name.

        • rootToParentThingGroups — (Array<map>)

          The root parent thing group.

          • groupName — (String)

            The group name.

          • groupArn — (String)

            The group ARN.

        • creationDate — (Date)

          The UNIX timestamp of when the thing group was created.

      • indexName — (String)

        The dynamic thing group index name.

      • queryString — (String)

        The dynamic thing group search query string.

      • queryVersion — (String)

        The dynamic thing group query version.

      • status — (String)

        The dynamic thing group status.

        Possible values include:
        • "ACTIVE"
        • "BUILDING"
        • "REBUILDING"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeThingRegistrationTask(params = {}, callback) ⇒ AWS.Request

Describes a bulk thing provisioning task.

Requires permission to access the DescribeThingRegistrationTask action.

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.

Requires permission to access the DescribeThingType action.

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.

Note: Because of the distributed nature of Amazon Web Services, it can take up to five minutes after a policy is detached before it's ready to be deleted.

Requires permission to access the DetachPolicy action.

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 action is deprecated and works as expected for backward compatibility, but we won't add enhancements. Use DetachPolicy instead.

Requires permission to access the DetachPrincipalPolicy action.

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.

      Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

detachSecurityProfile(params = {}, callback) ⇒ AWS.Request

Disassociates a Device Defender security profile from a thing group or from this account.

Requires permission to access the DetachSecurityProfile action.

Service Reference:

Examples:

Calling the detachSecurityProfile operation

var params = {
  securityProfileName: 'STRING_VALUE', /* required */
  securityProfileTargetArn: 'STRING_VALUE' /* required */
};
iot.detachSecurityProfile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • securityProfileName — (String)

      The security profile that is detached.

    • securityProfileTargetArn — (String)

      The ARN of the thing group from which the security profile is detached.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

detachThingPrincipal(params = {}, callback) ⇒ AWS.Request

Detaches the specified principal from the specified thing. A principal can be X.509 certificates, IAM users, groups, and roles, Amazon Cognito identities or federated identities.

Note: This call is asynchronous. It might take several seconds for the detachment to propagate.

Requires permission to access the DetachThingPrincipal action.

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.

Requires permission to access the DisableTopicRule action.

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.

Requires permission to access the EnableTopicRule action.

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.

getBehaviorModelTrainingSummaries(params = {}, callback) ⇒ AWS.Request

Returns a Device Defender's ML Detect Security Profile training model's status.

Requires permission to access the GetBehaviorModelTrainingSummaries action.

Examples:

Calling the getBehaviorModelTrainingSummaries operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  securityProfileName: 'STRING_VALUE'
};
iot.getBehaviorModelTrainingSummaries(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • securityProfileName — (String)

      The name of the security profile.

    • maxResults — (Integer)

      The maximum number of results to return at one time. The default is 10.

    • nextToken — (String)

      The token for 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:

      • summaries — (Array<map>)

        A list of all ML Detect behaviors and their model status for a given Security Profile.

        • securityProfileName — (String)

          The name of the security profile.

        • behaviorName — (String)

          The name of the behavior.

        • trainingDataCollectionStartDate — (Date)

          The date a training model started collecting data.

        • modelStatus — (String)

          The status of the behavior model.

          Possible values include:
          • "PENDING_BUILD"
          • "ACTIVE"
          • "EXPIRED"
        • datapointsCollectionPercentage — (Float)

          The percentage of datapoints collected.

        • lastModelRefreshDate — (Date)

          The date the model was last refreshed.

      • nextToken — (String)

        A token that can be used to retrieve the next set of results, or null if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getBucketsAggregation(params = {}, callback) ⇒ AWS.Request

Aggregates on indexed data with search queries pertaining to particular fields.

Requires permission to access the GetBucketsAggregation action.

Service Reference:

Examples:

Calling the getBucketsAggregation operation

var params = {
  aggregationField: 'STRING_VALUE', /* required */
  bucketsAggregationType: { /* required */
    termsAggregation: {
      maxBuckets: 'NUMBER_VALUE'
    }
  },
  queryString: 'STRING_VALUE', /* required */
  indexName: 'STRING_VALUE',
  queryVersion: 'STRING_VALUE'
};
iot.getBucketsAggregation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • indexName — (String)

      The name of the index to search.

    • queryString — (String)

      The search query string.

    • aggregationField — (String)

      The aggregation field.

    • queryVersion — (String)

      The version of the query.

    • bucketsAggregationType — (map)

      The basic control of the response shape and the bucket aggregation type to perform.

      • termsAggregation — (map)

        Performs an aggregation that will return a list of buckets. The list of buckets is a ranked list of the number of occurrences of an aggregation field value.

        • maxBuckets — (Integer)

          The number of buckets to return in the response. Default to 10.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):