IoT

Table of Contents

Client

class IoT.Client

A low-level client representing AWS IoT

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 .

import boto3

client = boto3.client('iot')

These are the available methods:

accept_certificate_transfer(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.accept_certificate_transfer(
    certificateId='string',
    setAsActive=True|False
)
Parameters
  • certificateId (string) --

    [REQUIRED]

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

  • setAsActive (boolean) -- Specifies whether the certificate is active.
Returns

None

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.TransferAlreadyCompletedException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
add_thing_to_billing_group(**kwargs)

Adds a thing to a billing group.

Requires permission to access the AddThingToBillingGroup action.

See also: AWS API Documentation

Request Syntax

response = client.add_thing_to_billing_group(
    billingGroupName='string',
    billingGroupArn='string',
    thingName='string',
    thingArn='string'
)
Parameters
  • 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.
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
add_thing_to_thing_group(**kwargs)

Adds a thing to a thing group.

Requires permission to access the AddThingToThingGroup action.

See also: AWS API Documentation

Request Syntax

response = client.add_thing_to_thing_group(
    thingGroupName='string',
    thingGroupArn='string',
    thingName='string',
    thingArn='string',
    overrideDynamicGroups=True|False
)
Parameters
  • 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.
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
associate_targets_with_job(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.associate_targets_with_job(
    targets=[
        'string',
    ],
    jobId='string',
    comment='string',
    namespaceId='string'
)
Parameters
  • targets (list) --

    [REQUIRED]

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

    • (string) --
  • jobId (string) --

    [REQUIRED]

    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 in public preview.

Return type

dict

Returns

Response Syntax

{
    'jobArn': 'string',
    'jobId': 'string',
    'description': 'string'
}

Response Structure

  • (dict) --

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

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.LimitExceededException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.ServiceUnavailableException
attach_policy(**kwargs)

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

Requires permission to access the AttachPolicy action.

See also: AWS API Documentation

Request Syntax

response = client.attach_policy(
    policyName='string',
    target='string'
)
Parameters
  • policyName (string) --

    [REQUIRED]

    The name of the policy to attach.

  • target (string) --

    [REQUIRED]

    The identity to which the policy is attached. For example, a thing group or a certificate.

Returns

None

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.LimitExceededException
attach_principal_policy(**kwargs)

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

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

Requires permission to access the AttachPrincipalPolicy action.

Danger

This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.

See also: AWS API Documentation

Request Syntax

response = client.attach_principal_policy(
    policyName='string',
    principal='string'
)
Parameters
  • policyName (string) --

    [REQUIRED]

    The policy name.

  • principal (string) --

    [REQUIRED]

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

Returns

None

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.LimitExceededException
attach_security_profile(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.attach_security_profile(
    securityProfileName='string',
    securityProfileTargetArn='string'
)
Parameters
  • securityProfileName (string) --

    [REQUIRED]

    The security profile that is attached.

  • securityProfileTargetArn (string) --

    [REQUIRED]

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

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.LimitExceededException
  • IoT.Client.exceptions.VersionConflictException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
attach_thing_principal(**kwargs)

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

Requires permission to access the AttachThingPrincipal action.

See also: AWS API Documentation

Request Syntax

response = client.attach_thing_principal(
    thingName='string',
    principal='string'
)
Parameters
  • thingName (string) --

    [REQUIRED]

    The name of the thing.

  • principal (string) --

    [REQUIRED]

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

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

    The output from the AttachThingPrincipal operation.

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
cancel_audit_mitigation_actions_task(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.cancel_audit_mitigation_actions_task(
    taskId='string'
)
Parameters
taskId (string) --

[REQUIRED]

The unique identifier for the task that you want to cancel.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
cancel_audit_task(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.cancel_audit_task(
    taskId='string'
)
Parameters
taskId (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
cancel_certificate_transfer(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.cancel_certificate_transfer(
    certificateId='string'
)
Parameters
certificateId (string) --

[REQUIRED]

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

Returns
None

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.TransferAlreadyCompletedException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
cancel_detect_mitigation_actions_task(**kwargs)

Cancels a Device Defender ML Detect mitigation action.

Requires permission to access the CancelDetectMitigationActionsTask action.

See also: AWS API Documentation

Request Syntax

response = client.cancel_detect_mitigation_actions_task(
    taskId='string'
)
Parameters
taskId (string) --

[REQUIRED]

The unique identifier of the task.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
cancel_job(**kwargs)

Cancels a job.

Requires permission to access the CancelJob action.

See also: AWS API Documentation

Request Syntax

response = client.cancel_job(
    jobId='string',
    reasonCode='string',
    comment='string',
    force=True|False
)
Parameters
  • jobId (string) --

    [REQUIRED]

    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.

Return type

dict

Returns

Response Syntax

{
    'jobArn': 'string',
    'jobId': 'string',
    'description': 'string'
}

Response Structure

  • (dict) --

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

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.ServiceUnavailableException
cancel_job_execution(**kwargs)

Cancels the execution of a job for a given thing.

Requires permission to access the CancelJobExecution action.

See also: AWS API Documentation

Request Syntax

response = client.cancel_job_execution(
    jobId='string',
    thingName='string',
    force=True|False,
    expectedVersion=123,
    statusDetails={
        'string': 'string'
    }
)
Parameters
  • jobId (string) --

    [REQUIRED]

    The ID of the job to be canceled.

  • thingName (string) --

    [REQUIRED]

    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 (dict) --

    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.

    • (string) --
      • (string) --
Returns

None

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.InvalidStateTransitionException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.VersionConflictException
clear_default_authorizer()

Clears the default authorizer.

Requires permission to access the ClearDefaultAuthorizer action.

See also: AWS API Documentation

Request Syntax

response = client.clear_default_authorizer()
Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
confirm_topic_rule_destination(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.confirm_topic_rule_destination(
    confirmationToken='string'
)
Parameters
confirmationToken (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InternalException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ConflictingResourceUpdateException
create_audit_suppression(**kwargs)

Creates a Device Defender audit suppression.

Requires permission to access the CreateAuditSuppression action.

See also: AWS API Documentation

Request Syntax

response = client.create_audit_suppression(
    checkName='string',
    resourceIdentifier={
        'deviceCertificateId': 'string',
        'caCertificateId': 'string',
        'cognitoIdentityPoolId': 'string',
        'clientId': 'string',
        'policyVersionIdentifier': {
            'policyName': 'string',
            'policyVersionId': 'string'
        },
        'account': 'string',
        'iamRoleArn': 'string',
        'roleAliasArn': 'string'
    },
    expirationDate=datetime(2015, 1, 1),
    suppressIndefinitely=True|False,
    description='string',
    clientRequestToken='string'
)
Parameters
  • checkName (string) --

    [REQUIRED]

    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 (dict) --

    [REQUIRED]

    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 (dict) --

      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.

  • expirationDate (datetime) -- 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) --

    [REQUIRED]

    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.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.LimitExceededException
create_authorizer(**kwargs)

Creates an authorizer.

Requires permission to access the CreateAuthorizer action.

See also: AWS API Documentation

Request Syntax

response = client.create_authorizer(
    authorizerName='string',
    authorizerFunctionArn='string',
    tokenKeyName='string',
    tokenSigningPublicKeys={
        'string': 'string'
    },
    status='ACTIVE'|'INACTIVE',
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    signingDisabled=True|False
)
Parameters
  • authorizerName (string) --

    [REQUIRED]

    The authorizer name.

  • authorizerFunctionArn (string) --

    [REQUIRED]

    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 (dict) --

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

    • (string) --
      • (string) --
  • status (string) -- The status of the create authorizer request.
  • tags (list) --

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

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

  • signingDisabled (boolean) -- Specifies whether IoT validates the token signature in an authorization request.
Return type

dict

Returns

Response Syntax

{
    'authorizerName': 'string',
    'authorizerArn': 'string'
}

Response Structure

  • (dict) --

    • authorizerName (string) --

      The authorizer's name.

    • authorizerArn (string) --

      The authorizer ARN.

Exceptions

  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.LimitExceededException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
create_billing_group(**kwargs)

Creates a billing group.

Requires permission to access the CreateBillingGroup action.

See also: AWS API Documentation

Request Syntax

response = client.create_billing_group(
    billingGroupName='string',
    billingGroupProperties={
        'billingGroupDescription': 'string'
    },
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • billingGroupName (string) --

    [REQUIRED]

    The name you wish to give to the billing group.

  • billingGroupProperties (dict) --

    The properties of the billing group.

    • billingGroupDescription (string) --

      The description of the billing group.

  • tags (list) --

    Metadata which can be used to manage the billing group.

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

Return type

dict

Returns

Response Syntax

{
    'billingGroupName': 'string',
    'billingGroupArn': 'string',
    'billingGroupId': 'string'
}

Response Structure

  • (dict) --

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

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
create_certificate_from_csr(**kwargs)

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

Note: The CSR must include a public key that is either an RSA key with a length of at least 2048 bits or an ECC key from NIST P-256, NIST P-384, or NIST P-512 curves. For supported certificates, consult Certificate signing algorithms supported by IoT .

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

Requires permission to access the CreateCertificateFromCsr action.

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

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

On Linux and OS X, the command is:

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

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

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

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

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

> ls -Name my-csr-directory | %{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"

See also: AWS API Documentation

Request Syntax

response = client.create_certificate_from_csr(
    certificateSigningRequest='string',
    setAsActive=True|False
)
Parameters
  • certificateSigningRequest (string) --

    [REQUIRED]

    The certificate signing request (CSR).

  • setAsActive (boolean) -- Specifies whether the certificate is active.
Return type

dict

Returns

Response Syntax

{
    'certificateArn': 'string',
    'certificateId': 'string',
    'certificatePem': 'string'
}

Response Structure

  • (dict) --

    The output from the CreateCertificateFromCsr operation.

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

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
create_custom_metric(**kwargs)

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

Requires permission to access the CreateCustomMetric action.

See also: AWS API Documentation

Request Syntax

response = client.create_custom_metric(
    metricName='string',
    displayName='string',
    metricType='string-list'|'ip-address-list'|'number-list'|'number',
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    clientRequestToken='string'
)
Parameters
  • metricName (string) --

    [REQUIRED]

    The name of the custom metric. This will be used in the metric report submitted from the device/thing. Shouldn't begin with aws: . Cannot be updated once defined.

  • displayName (string) -- Field represents a friendly name in the console for the custom metric; it doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated once defined.
  • metricType (string) --

    [REQUIRED]

    The type of the custom metric. Types include string-list , ip-address-list , number-list , and number .

  • tags (list) --

    Metadata that can be used to manage the custom metric.

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

  • clientRequestToken (string) --

    [REQUIRED]

    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.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'metricName': 'string',
    'metricArn': 'string'
}

Response Structure

  • (dict) --

    • 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, e.g. ``arn:aws-partition :iot:region :accountId :custommetric/metricName ``

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.LimitExceededException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
create_dimension(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.create_dimension(
    name='string',
    type='TOPIC_FILTER',
    stringValues=[
        'string',
    ],
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    clientRequestToken='string'
)
Parameters
  • name (string) --

    [REQUIRED]

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

    [REQUIRED]

    Specifies the type of dimension. Supported types: TOPIC_FILTER.

  • stringValues (list) --

    [REQUIRED]

    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/#").

    • (string) --
  • tags (list) --

    Metadata that can be used to manage the dimension.

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

  • clientRequestToken (string) --

    [REQUIRED]

    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.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'name': 'string',
    'arn': 'string'
}

Response Structure

  • (dict) --

    • name (string) --

      A unique identifier for the dimension.

    • arn (string) --

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

Exceptions

  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.LimitExceededException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.ThrottlingException
create_domain_configuration(**kwargs)

Creates a domain configuration.

Requires permission to access the CreateDomainConfiguration action.

See also: AWS API Documentation

Request Syntax

response = client.create_domain_configuration(
    domainConfigurationName='string',
    domainName='string',
    serverCertificateArns=[
        'string',
    ],
    validationCertificateArn='string',
    authorizerConfig={
        'defaultAuthorizerName': 'string',
        'allowAuthorizerOverride': True|False
    },
    serviceType='DATA'|'CREDENTIAL_PROVIDER'|'JOBS',
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • domainConfigurationName (string) --

    [REQUIRED]

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

  • domainName (string) -- The name of the domain.
  • serverCertificateArns (list) --

    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.

    • (string) --
  • 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 (dict) --

    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.

  • tags (list) --

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

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

Return type

dict

Returns

Response Syntax

{
    'domainConfigurationName': 'string',
    'domainConfigurationArn': 'string'
}

Response Structure

  • (dict) --

    • domainConfigurationName (string) --

      The name of the domain configuration.

    • domainConfigurationArn (string) --

      The ARN of the domain configuration.

Exceptions

  • IoT.Client.exceptions.LimitExceededException
  • IoT.Client.exceptions.CertificateValidationException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ThrottlingException
create_dynamic_thing_group(**kwargs)

Creates a dynamic thing group.

Requires permission to access the CreateDynamicThingGroup action.

See also: AWS API Documentation

Request Syntax

response = client.create_dynamic_thing_group(
    thingGroupName='string',
    thingGroupProperties={
        'thingGroupDescription': 'string',
        'attributePayload': {
            'attributes': {
                'string': 'string'
            },
            'merge': True|False
        }
    },
    indexName='string',
    queryString='string',
    queryVersion='string',
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • thingGroupName (string) --

    [REQUIRED]

    The dynamic thing group name to create.

  • thingGroupProperties (dict) --

    The dynamic thing group properties.

    • thingGroupDescription (string) --

      The thing group description.

    • attributePayload (dict) --

      The thing group attributes in JSON format.

      • attributes (dict) --

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

        {\"attributes\":{\"string1\":\"string2\"}}
        • (string) --
          • (string) --
      • 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) --

    [REQUIRED]

    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 (list) --

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

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

Return type

dict

Returns

Response Syntax

{
    'thingGroupName': 'string',
    'thingGroupArn': 'string',
    'thingGroupId': 'string',
    'indexName': 'string',
    'queryString': 'string',
    'queryVersion': 'string'
}

Response Structure

  • (dict) --

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

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.InvalidQueryException
  • IoT.Client.exceptions.LimitExceededException
create_fleet_metric(**kwargs)

Creates a fleet metric.

Requires permission to access the CreateFleetMetric action.

See also: AWS API Documentation

Request Syntax

response = client.create_fleet_metric(
    metricName='string',
    queryString='string',
    aggregationType={
        'name': 'Statistics'|'Percentiles'|'Cardinality',
        'values': [
            'string',
        ]
    },
    period=123,
    aggregationField='string',
    description='string',
    queryVersion='string',
    indexName='string',
    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',
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • metricName (string) --

    [REQUIRED]

    The name of the fleet metric to create.

  • queryString (string) --

    [REQUIRED]

    The search query string.

  • aggregationType (dict) --

    [REQUIRED]

    The type of the aggregation query.

    • name (string) -- [REQUIRED]

      The name of the aggregation type.

    • values (list) --

      A list of the values of aggregation types.

      • (string) --
  • period (integer) --

    [REQUIRED]

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

  • aggregationField (string) --

    [REQUIRED]

    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.
  • tags (list) --

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

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

Return type

dict

Returns

Response Syntax

{
    'metricName': 'string',
    'metricArn': 'string'
}

Response Structure

  • (dict) --

    • metricName (string) --

      The name of the fleet metric to create.

    • metricArn (string) --

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

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.LimitExceededException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidQueryException
  • IoT.Client.exceptions.InvalidAggregationException
  • IoT.Client.exceptions.IndexNotReadyException
create_job(**kwargs)

Creates a job.

Requires permission to access the CreateJob action.

See also: AWS API Documentation

Request Syntax

response = client.create_job(
    jobId='string',
    targets=[
        'string',
    ],
    documentSource='string',
    document='string',
    description='string',
    presignedUrlConfig={
        'roleArn': 'string',
        'expiresInSec': 123
    },
    targetSelection='CONTINUOUS'|'SNAPSHOT',
    jobExecutionsRolloutConfig={
        'maximumPerMinute': 123,
        'exponentialRate': {
            'baseRatePerMinute': 123,
            'incrementFactor': 123.0,
            'rateIncreaseCriteria': {
                'numberOfNotifiedThings': 123,
                'numberOfSucceededThings': 123
            }
        }
    },
    abortConfig={
        'criteriaList': [
            {
                'failureType': 'FAILED'|'REJECTED'|'TIMED_OUT'|'ALL',
                'action': 'CANCEL',
                'thresholdPercentage': 123.0,
                'minNumberOfExecutedThings': 123
            },
        ]
    },
    timeoutConfig={
        'inProgressTimeoutInMinutes': 123
    },
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    namespaceId='string',
    jobTemplateArn='string',
    documentParameters={
        'string': 'string'
    }
)
Parameters
  • jobId (string) --

    [REQUIRED]

    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 (list) --

    [REQUIRED]

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

    • (string) --
  • documentSource (string) --

    An S3 link to the job document. Required if you don't specify a value for document .

    Note

    If the job document resides in an S3 bucket, you must use a placeholder link when specifying the document.

    The placeholder link is of the following form:

    ${aws:iot:s3-presigned-url:https://s3.amazonaws.com/*bucket* /*key* }

    where bucket is your bucket name and key is the object in the bucket to which you are linking.

  • 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 (dict) --

    Configuration information for pre-signed S3 URLs.

    • roleArn (string) --

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

    • expiresInSec (integer) --

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

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

    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 (dict) --

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

      • baseRatePerMinute (integer) -- [REQUIRED]

        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.

      • incrementFactor (float) -- [REQUIRED]

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

      • rateIncreaseCriteria (dict) -- [REQUIRED]

        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 (dict) --

    Allows you to create criteria to abort a job.

    • criteriaList (list) -- [REQUIRED]

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

      • (dict) --

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

        • failureType (string) -- [REQUIRED]

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

        • action (string) -- [REQUIRED]

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

        • thresholdPercentage (float) -- [REQUIRED]

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

        • minNumberOfExecutedThings (integer) -- [REQUIRED]

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

  • timeoutConfig (dict) --

    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 (list) --

    Metadata which can be used to manage the job.

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        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 in public preview.

  • jobTemplateArn (string) -- The ARN of the job template used to create the job.
  • documentParameters (dict) --

    Parameters of a managed template that you can specify to create the job document.

    • (string) --
      • (string) --
Return type

dict

Returns

Response Syntax

{
    'jobArn': 'string',
    'jobId': 'string',
    'description': 'string'
}

Response Structure

  • (dict) --

    • jobArn (string) --

      The job ARN.

    • jobId (string) --

      The unique identifier you assigned to this job.

    • description (string) --

      The job description.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.LimitExceededException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.ServiceUnavailableException
create_job_template(**kwargs)

Creates a job template.

Requires permission to access the CreateJobTemplate action.

See also: AWS API Documentation

Request Syntax

response = client.create_job_template(
    jobTemplateId='string',
    jobArn='string',
    documentSource='string',
    document='string',
    description='string',
    presignedUrlConfig={
        'roleArn': 'string',
        'expiresInSec': 123
    },
    jobExecutionsRolloutConfig={
        'maximumPerMinute': 123,
        'exponentialRate': {
            'baseRatePerMinute': 123,
            'incrementFactor': 123.0,
            'rateIncreaseCriteria': {
                'numberOfNotifiedThings': 123,
                'numberOfSucceededThings': 123
            }
        }
    },
    abortConfig={
        'criteriaList': [
            {
                'failureType': 'FAILED'|'REJECTED'|'TIMED_OUT'|'ALL',
                'action': 'CANCEL',
                'thresholdPercentage': 123.0,
                'minNumberOfExecutedThings': 123
            },
        ]
    },
    timeoutConfig={
        'inProgressTimeoutInMinutes': 123
    },
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • jobTemplateId (string) --

    [REQUIRED]

    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 to the job document to use in the template. Required if you don't specify a value for document .

    Note

    If the job document resides in an S3 bucket, you must use a placeholder link when specifying the document.

    The placeholder link is of the following form:

    ${aws:iot:s3-presigned-url:https://s3.amazonaws.com/*bucket* /*key* }

    where bucket is your bucket name and key is the object in the bucket to which you are linking.

  • document (string) -- The job document. Required if you don't specify a value for documentSource .
  • description (string) --

    [REQUIRED]

    A description of the job document.

  • presignedUrlConfig (dict) --

    Configuration for pre-signed S3 URLs.

    • roleArn (string) --

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

    • expiresInSec (integer) --

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

  • jobExecutionsRolloutConfig (dict) --

    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 (dict) --

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

      • baseRatePerMinute (integer) -- [REQUIRED]

        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.

      • incrementFactor (float) -- [REQUIRED]

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

      • rateIncreaseCriteria (dict) -- [REQUIRED]

        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 (dict) --

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

    • criteriaList (list) -- [REQUIRED]

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

      • (dict) --

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

        • failureType (string) -- [REQUIRED]

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

        • action (string) -- [REQUIRED]

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

        • thresholdPercentage (float) -- [REQUIRED]

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

        • minNumberOfExecutedThings (integer) -- [REQUIRED]

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

  • timeoutConfig (dict) --

    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 (list) --

    Metadata that can be used to manage the job template.

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

Return type

dict

Returns

Response Syntax

{
    'jobTemplateArn': 'string',
    'jobTemplateId': 'string'
}

Response Structure

  • (dict) --

    • jobTemplateArn (string) --

      The ARN of the job template.

    • jobTemplateId (string) --

      The unique identifier of the job template.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ConflictException
  • IoT.Client.exceptions.LimitExceededException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
create_keys_and_certificate(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.create_keys_and_certificate(
    setAsActive=True|False
)
Parameters
setAsActive (boolean) -- Specifies whether the certificate is active.
Return type
dict
Returns
Response Syntax
{
    'certificateArn': 'string',
    'certificateId': 'string',
    'certificatePem': 'string',
    'keyPair': {
        'PublicKey': 'string',
        'PrivateKey': 'string'
    }
}

Response Structure

  • (dict) --

    The output of the CreateKeysAndCertificate operation.

    • 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 (dict) --

      The generated key pair.

      • PublicKey (string) --

        The public key.

      • PrivateKey (string) --

        The private key.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
create_mitigation_action(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.create_mitigation_action(
    actionName='string',
    roleArn='string',
    actionParams={
        'updateDeviceCertificateParams': {
            'action': 'DEACTIVATE'
        },
        'updateCACertificateParams': {
            'action': 'DEACTIVATE'
        },
        'addThingsToThingGroupParams': {
            'thingGroupNames': [
                'string',
            ],
            'overrideDynamicGroups': True|False
        },
        'replaceDefaultPolicyVersionParams': {
            'templateName': 'BLANK_POLICY'
        },
        'enableIoTLoggingParams': {
            'roleArnForLogging': 'string',
            'logLevel': 'DEBUG'|'INFO'|'ERROR'|'WARN'|'DISABLED'
        },
        'publishFindingToSnsParams': {
            'topicArn': 'string'
        }
    },
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • actionName (string) --

    [REQUIRED]

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

  • roleArn (string) --

    [REQUIRED]

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

  • actionParams (dict) --

    [REQUIRED]

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

    • updateDeviceCertificateParams (dict) --

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

      • action (string) -- [REQUIRED]

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

    • updateCACertificateParams (dict) --

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

      • action (string) -- [REQUIRED]

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

    • addThingsToThingGroupParams (dict) --

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

      • thingGroupNames (list) -- [REQUIRED]

        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.

        • (string) --
      • 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 (dict) --

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

      • templateName (string) -- [REQUIRED]

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

    • enableIoTLoggingParams (dict) --

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

      • roleArnForLogging (string) -- [REQUIRED]

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

      • logLevel (string) -- [REQUIRED]

        Specifies the type of information to be logged.

    • publishFindingToSnsParams (dict) --

      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.

      • topicArn (string) -- [REQUIRED]

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

  • tags (list) --

    Metadata that can be used to manage the mitigation action.

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

Return type

dict

Returns

Response Syntax

{
    'actionArn': 'string',
    'actionId': 'string'
}

Response Structure

  • (dict) --

    • actionArn (string) --

      The ARN for the new mitigation action.

    • actionId (string) --

      A unique identifier for the new mitigation action.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.LimitExceededException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
create_ota_update(**kwargs)

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

Requires permission to access the CreateOTAUpdate action.

See also: AWS API Documentation

Request Syntax

response = client.create_ota_update(
    otaUpdateId='string',
    description='string',
    targets=[
        'string',
    ],
    protocols=[
        'MQTT'|'HTTP',
    ],
    targetSelection='CONTINUOUS'|'SNAPSHOT',
    awsJobExecutionsRolloutConfig={
        'maximumPerMinute': 123,
        'exponentialRate': {
            'baseRatePerMinute': 123,
            'incrementFactor': 123.0,
            'rateIncreaseCriteria': {
                'numberOfNotifiedThings': 123,
                'numberOfSucceededThings': 123
            }
        }
    },
    awsJobPresignedUrlConfig={
        'expiresInSec': 123
    },
    awsJobAbortConfig={
        'abortCriteriaList': [
            {
                'failureType': 'FAILED'|'REJECTED'|'TIMED_OUT'|'ALL',
                'action': 'CANCEL',
                'thresholdPercentage': 123.0,
                'minNumberOfExecutedThings': 123
            },
        ]
    },
    awsJobTimeoutConfig={
        'inProgressTimeoutInMinutes': 123
    },
    files=[
        {
            'fileName': 'string',
            'fileType': 123,
            'fileVersion': 'string',
            'fileLocation': {
                'stream': {
                    'streamId': 'string',
                    'fileId': 123
                },
                's3Location': {
                    'bucket': 'string',
                    'key': 'string',
                    'version': 'string'
                }
            },
            'codeSigning': {
                'awsSignerJobId': 'string',
                'startSigningJobParameter': {
                    'signingProfileParameter': {
                        'certificateArn': 'string',
                        'platform': 'string',
                        'certificatePathOnDevice': 'string'
                    },
                    'signingProfileName': 'string',
                    'destination': {
                        's3Destination': {
                            'bucket': 'string',
                            'prefix': 'string'
                        }
                    }
                },
                'customCodeSigning': {
                    'signature': {
                        'inlineDocument': b'bytes'
                    },
                    'certificateChain': {
                        'certificateName': 'string',
                        'inlineDocument': 'string'
                    },
                    'hashAlgorithm': 'string',
                    'signatureAlgorithm': 'string'
                }
            },
            'attributes': {
                'string': 'string'
            }
        },
    ],
    roleArn='string',
    additionalParameters={
        'string': 'string'
    },
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • otaUpdateId (string) --

    [REQUIRED]

    The ID of the OTA update to be created.

  • description (string) -- The description of the OTA update.
  • targets (list) --

    [REQUIRED]

    The devices targeted to receive OTA updates.

    • (string) --
  • protocols (list) --

    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.

    • (string) --
  • 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.
  • awsJobExecutionsRolloutConfig (dict) --

    Configuration for the rollout of OTA updates.

    • maximumPerMinute (integer) --

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

    • exponentialRate (dict) --

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

      • baseRatePerMinute (integer) -- [REQUIRED]

        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.

      • incrementFactor (float) -- [REQUIRED]

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

      • rateIncreaseCriteria (dict) -- [REQUIRED]

        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 (dict) --

    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 (dict) --

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

    • abortCriteriaList (list) -- [REQUIRED]

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

      • (dict) --

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

        • failureType (string) -- [REQUIRED]

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

        • action (string) -- [REQUIRED]

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

        • thresholdPercentage (float) -- [REQUIRED]

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

        • minNumberOfExecutedThings (integer) -- [REQUIRED]

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

  • awsJobTimeoutConfig (dict) --

    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 (list) --

    [REQUIRED]

    The files to be streamed by the OTA update.

    • (dict) --

      Describes a file to be associated with an 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 (dict) --

        The location of the updated firmware.

        • stream (dict) --

          The stream that contains the OTA update.

          • streamId (string) --

            The stream ID.

          • fileId (integer) --

            The ID of a file associated with a stream.

        • s3Location (dict) --

          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 (dict) --

        The code signing method of the file.

        • awsSignerJobId (string) --

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

        • startSigningJobParameter (dict) --

          Describes the code-signing job.

          • signingProfileParameter (dict) --

            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 (dict) --

            The location to write the code-signed file.

            • s3Destination (dict) --

              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 (dict) --

          A custom method for code signing a file.

          • signature (dict) --

            The signature for the file.

            • inlineDocument (bytes) --

              A base64 encoded binary representation of the code signing signature.

          • certificateChain (dict) --

            The certificate chain.

            • certificateName (string) --

              The name of the certificate.

            • inlineDocument (string) --

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

          • hashAlgorithm (string) --

            The hash algorithm used to code sign the file.

          • signatureAlgorithm (string) --

            The signature algorithm used to code sign the file.

      • attributes (dict) --

        A list of name/attribute pairs.

        • (string) --
          • (string) --
  • roleArn (string) --

    [REQUIRED]

    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 (dict) --

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

    • (string) --
      • (string) --
  • tags (list) --

    Metadata which can be used to manage updates.

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

Return type

dict

Returns

Response Syntax

{
    'otaUpdateId': 'string',
    'awsIotJobId': 'string',
    'otaUpdateArn': 'string',
    'awsIotJobArn': 'string',
    'otaUpdateStatus': 'CREATE_PENDING'|'CREATE_IN_PROGRESS'|'CREATE_COMPLETE'|'CREATE_FAILED'
}

Response Structure

  • (dict) --

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

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.LimitExceededException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ServiceUnavailableException
create_policy(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.create_policy(
    policyName='string',
    policyDocument='string',
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • policyName (string) --

    [REQUIRED]

    The policy name.

  • policyDocument (string) --

    [REQUIRED]

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

  • tags (list) --

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

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

Return type

dict

Returns

Response Syntax

{
    'policyName': 'string',
    'policyArn': 'string',
    'policyDocument': 'string',
    'policyVersionId': 'string'
}

Response Structure

  • (dict) --

    The output from the CreatePolicy operation.

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

Exceptions

  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.MalformedPolicyException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
create_policy_version(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.create_policy_version(
    policyName='string',
    policyDocument='string',
    setAsDefault=True|False
)
Parameters
  • policyName (string) --

    [REQUIRED]

    The policy name.

  • policyDocument (string) --

    [REQUIRED]

    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).
Return type

dict

Returns

Response Syntax

{
    'policyArn': 'string',
    'policyDocument': 'string',
    'policyVersionId': 'string',
    'isDefaultVersion': True|False
}

Response Structure

  • (dict) --

    The output of the CreatePolicyVersion operation.

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

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.MalformedPolicyException
  • IoT.Client.exceptions.VersionsLimitExceededException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
create_provisioning_claim(**kwargs)

Creates a provisioning claim.

Requires permission to access the CreateProvisioningClaim action.

See also: AWS API Documentation

Request Syntax

response = client.create_provisioning_claim(
    templateName='string'
)
Parameters
templateName (string) --

[REQUIRED]

The name of the provisioning template to use.

Return type
dict
Returns
Response Syntax
{
    'certificateId': 'string',
    'certificatePem': 'string',
    'keyPair': {
        'PublicKey': 'string',
        'PrivateKey': 'string'
    },
    'expiration': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --
    • certificateId (string) --

      The ID of the certificate.

    • certificatePem (string) --

      The provisioning claim certificate.

    • keyPair (dict) --

      The provisioning claim key pair.

      • PublicKey (string) --

        The public key.

      • PrivateKey (string) --

        The private key.

    • expiration (datetime) --

      The provisioning claim expiration time.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
create_provisioning_template(**kwargs)

Creates a fleet provisioning template.

Requires permission to access the CreateProvisioningTemplate action.

See also: AWS API Documentation

Request Syntax

response = client.create_provisioning_template(
    templateName='string',
    description='string',
    templateBody='string',
    enabled=True|False,
    provisioningRoleArn='string',
    preProvisioningHook={
        'payloadVersion': 'string',
        'targetArn': 'string'
    },
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • templateName (string) --

    [REQUIRED]

    The name of the fleet provisioning template.

  • description (string) -- The description of the fleet provisioning template.
  • templateBody (string) --

    [REQUIRED]

    The JSON formatted contents of the fleet provisioning template.

  • enabled (boolean) -- True to enable the fleet provisioning template, otherwise false.
  • provisioningRoleArn (string) --

    [REQUIRED]

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

  • preProvisioningHook (dict) --

    Creates a pre-provisioning hook template.

    • payloadVersion (string) --

      The payload that was sent to the target function.

      Note: Only Lambda functions are currently supported.
    • targetArn (string) -- [REQUIRED]

      The ARN of the target function.

      Note: Only Lambda functions are currently supported.
  • tags (list) --

    Metadata which can be used to manage the fleet 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..."

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

Return type

dict

Returns

Response Syntax

{
    'templateArn': 'string',
    'templateName': 'string',
    'defaultVersionId': 123
}

Response Structure

  • (dict) --

    • templateArn (string) --

      The ARN that identifies the provisioning template.

    • templateName (string) --

      The name of the fleet provisioning template.

    • defaultVersionId (integer) --

      The default version of the fleet provisioning template.

Exceptions

  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.LimitExceededException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
create_provisioning_template_version(**kwargs)

Creates a new version of a fleet provisioning template.

Requires permission to access the CreateProvisioningTemplateVersion action.

See also: AWS API Documentation

Request Syntax

response = client.create_provisioning_template_version(
    templateName='string',
    templateBody='string',
    setAsDefault=True|False
)
Parameters
  • templateName (string) --

    [REQUIRED]

    The name of the fleet provisioning template.

  • templateBody (string) --

    [REQUIRED]

    The JSON formatted contents of the fleet provisioning template.

  • setAsDefault (boolean) -- Sets a fleet provision template version as the default version.
Return type

dict

Returns

Response Syntax

{
    'templateArn': 'string',
    'templateName': 'string',
    'versionId': 123,
    'isDefaultVersion': True|False
}

Response Structure

  • (dict) --

    • templateArn (string) --

      The ARN that identifies the provisioning template.

    • templateName (string) --

      The name of the fleet provisioning template.

    • versionId (integer) --

      The version of the fleet provisioning template.

    • isDefaultVersion (boolean) --

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

Exceptions

  • IoT.Client.exceptions.VersionsLimitExceededException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ConflictingResourceUpdateException
create_role_alias(**kwargs)

Creates a role alias.

Requires permission to access the CreateRoleAlias action.

See also: AWS API Documentation

Request Syntax

response = client.create_role_alias(
    roleAlias='string',
    roleArn='string',
    credentialDurationSeconds=123,
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • roleAlias (string) --

    [REQUIRED]

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

  • roleArn (string) --

    [REQUIRED]

    The role ARN.

  • credentialDurationSeconds (integer) -- How long (in seconds) the credentials will be valid. The default value is 3,600 seconds.
  • tags (list) --

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

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

Return type

dict

Returns

Response Syntax

{
    'roleAlias': 'string',
    'roleAliasArn': 'string'
}

Response Structure

  • (dict) --

    • roleAlias (string) --

      The role alias.

    • roleAliasArn (string) --

      The role alias ARN.

Exceptions

  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.LimitExceededException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
create_scheduled_audit(**kwargs)

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

Requires permission to access the CreateScheduledAudit action.

See also: AWS API Documentation

Request Syntax

response = client.create_scheduled_audit(
    frequency='DAILY'|'WEEKLY'|'BIWEEKLY'|'MONTHLY',
    dayOfMonth='string',
    dayOfWeek='SUN'|'MON'|'TUE'|'WED'|'THU'|'FRI'|'SAT',
    targetCheckNames=[
        'string',
    ],
    scheduledAuditName='string',
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • frequency (string) --

    [REQUIRED]

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

  • 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 .
  • targetCheckNames (list) --

    [REQUIRED]

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

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

  • scheduledAuditName (string) --

    [REQUIRED]

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

  • tags (list) --

    Metadata that can be used to manage the scheduled audit.

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

Return type

dict

Returns

Response Syntax

{
    'scheduledAuditArn': 'string'
}

Response Structure

  • (dict) --

    • scheduledAuditArn (string) --

      The ARN of the scheduled audit.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.LimitExceededException
create_security_profile(**kwargs)

Creates a Device Defender security profile.

Requires permission to access the CreateSecurityProfile action.

See also: AWS API Documentation

Request Syntax

response = client.create_security_profile(
    securityProfileName='string',
    securityProfileDescription='string',
    behaviors=[
        {
            'name': 'string',
            'metric': 'string',
            'metricDimension': {
                'dimensionName': 'string',
                'operator': 'IN'|'NOT_IN'
            },
            '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',
                'value': {
                    'count': 123,
                    'cidrs': [
                        'string',
                    ],
                    'ports': [
                        123,
                    ],
                    'number': 123.0,
                    'numbers': [
                        123.0,
                    ],
                    'strings': [
                        'string',
                    ]
                },
                'durationSeconds': 123,
                'consecutiveDatapointsToAlarm': 123,
                'consecutiveDatapointsToClear': 123,
                'statisticalThreshold': {
                    'statistic': 'string'
                },
                'mlDetectionConfig': {
                    'confidenceLevel': 'LOW'|'MEDIUM'|'HIGH'
                }
            },
            'suppressAlerts': True|False
        },
    ],
    alertTargets={
        'string': {
            'alertTargetArn': 'string',
            'roleArn': 'string'
        }
    },
    additionalMetricsToRetain=[
        'string',
    ],
    additionalMetricsToRetainV2=[
        {
            'metric': 'string',
            'metricDimension': {
                'dimensionName': 'string',
                'operator': 'IN'|'NOT_IN'
            }
        },
    ],
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • securityProfileName (string) --

    [REQUIRED]

    The name you are giving to the security profile.

  • securityProfileDescription (string) -- A description of the security profile.
  • behaviors (list) --

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

    • (dict) --

      A Device Defender security profile behavior.

      • name (string) -- [REQUIRED]

        The name you've given to the behavior.

      • metric (string) --

        What is measured by the behavior.

      • metricDimension (dict) --

        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.

        • dimensionName (string) -- [REQUIRED]

          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 .

      • criteria (dict) --

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

        • comparisonOperator (string) --

          The operator that relates the thing measured (metric ) to the criteria (containing a value or statisticalThreshold ). 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
        • value (dict) --

          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 (list) --

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

            • (string) --
          • ports (list) --

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

            • (integer) --
          • number (float) --

            The numeral value of a metric.

          • numbers (list) --

            The numeral values of a metric.

            • (float) --
          • strings (list) --

            The string values of a metric.

            • (string) --
        • 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 (dict) --

          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 (dict) --

          The configuration of an ML Detect

          • confidenceLevel (string) -- [REQUIRED]

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

      • suppressAlerts (boolean) --

        Suppresses alerts.

  • alertTargets (dict) --

    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.

    • (string) --

      The type of alert target: one of "SNS".

      • (dict) --

        A structure containing the alert target ARN and the role ARN.

        • alertTargetArn (string) -- [REQUIRED]

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

        • roleArn (string) -- [REQUIRED]

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

  • additionalMetricsToRetain (list) --
    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.

    • (string) --
  • additionalMetricsToRetainV2 (list) --

    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.

    • (dict) --

      The metric you want to retain. Dimensions are optional.

      • metric (string) -- [REQUIRED]

        What is measured by the behavior.

      • metricDimension (dict) --

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

        • dimensionName (string) -- [REQUIRED]

          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 .

  • tags (list) --

    Metadata that can be used to manage the security profile.

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

Return type

dict

Returns

Response Syntax

{
    'securityProfileName': 'string',
    'securityProfileArn': 'string'
}

Response Structure

  • (dict) --

    • securityProfileName (string) --

      The name you gave to the security profile.

    • securityProfileArn (string) --

      The ARN of the security profile.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
create_stream(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.create_stream(
    streamId='string',
    description='string',
    files=[
        {
            'fileId': 123,
            's3Location': {
                'bucket': 'string',
                'key': 'string',
                'version': 'string'
            }
        },
    ],
    roleArn='string',
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • streamId (string) --

    [REQUIRED]

    The stream ID.

  • description (string) -- A description of the stream.
  • files (list) --

    [REQUIRED]

    The files to stream.

    • (dict) --

      Represents a file to stream.

      • fileId (integer) --

        The file ID.

      • s3Location (dict) --

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

    [REQUIRED]

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

  • tags (list) --

    Metadata which can be used to manage streams.

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

Return type

dict

Returns

Response Syntax

{
    'streamId': 'string',
    'streamArn': 'string',
    'description': 'string',
    'streamVersion': 123
}

Response Structure

  • (dict) --

    • streamId (string) --

      The stream ID.

    • streamArn (string) --

      The stream ARN.

    • description (string) --

      A description of the stream.

    • streamVersion (integer) --

      The version of the stream.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.LimitExceededException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
create_thing(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.create_thing(
    thingName='string',
    thingTypeName='string',
    attributePayload={
        'attributes': {
            'string': 'string'
        },
        'merge': True|False
    },
    billingGroupName='string'
)
Parameters
  • thingName (string) --

    [REQUIRED]

    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 (dict) --

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

    {\"attributes\":{\"string1\":\"string2\"}}
    • attributes (dict) --

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

      {\"attributes\":{\"string1\":\"string2\"}}
      • (string) --
        • (string) --
    • 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.
Return type

dict

Returns

Response Syntax

{
    'thingName': 'string',
    'thingArn': 'string',
    'thingId': 'string'
}

Response Structure

  • (dict) --

    The output of the CreateThing operation.

    • thingName (string) --

      The name of the new thing.

    • thingArn (string) --

      The ARN of the new thing.

    • thingId (string) --

      The thing ID.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.ResourceNotFoundException
create_thing_group(**kwargs)

Create a thing group.

Note

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

Requires permission to access the CreateThingGroup action.

See also: AWS API Documentation

Request Syntax

response = client.create_thing_group(
    thingGroupName='string',
    parentGroupName='string',
    thingGroupProperties={
        'thingGroupDescription': 'string',
        'attributePayload': {
            'attributes': {
                'string': 'string'
            },
            'merge': True|False
        }
    },
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • thingGroupName (string) --

    [REQUIRED]

    The thing group name to create.

  • parentGroupName (string) -- The name of the parent thing group.
  • thingGroupProperties (dict) --

    The thing group properties.

    • thingGroupDescription (string) --

      The thing group description.

    • attributePayload (dict) --

      The thing group attributes in JSON format.

      • attributes (dict) --

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

        {\"attributes\":{\"string1\":\"string2\"}}
        • (string) --
          • (string) --
      • 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 (list) --

    Metadata which can be used to manage the thing group.

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

Return type

dict

Returns

Response Syntax

{
    'thingGroupName': 'string',
    'thingGroupArn': 'string',
    'thingGroupId': 'string'
}

Response Structure

  • (dict) --

    • thingGroupName (string) --

      The thing group name.

    • thingGroupArn (string) --

      The thing group ARN.

    • thingGroupId (string) --

      The thing group ID.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
create_thing_type(**kwargs)

Creates a new thing type.

Requires permission to access the CreateThingType action.

See also: AWS API Documentation

Request Syntax

response = client.create_thing_type(
    thingTypeName='string',
    thingTypeProperties={
        'thingTypeDescription': 'string',
        'searchableAttributes': [
            'string',
        ]
    },
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • thingTypeName (string) --

    [REQUIRED]

    The name of the thing type.

  • thingTypeProperties (dict) --

    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 (list) --

      A list of searchable thing attribute names.

      • (string) --
  • tags (list) --

    Metadata which can be used to manage the thing type.

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

Return type

dict

Returns

Response Syntax

{
    'thingTypeName': 'string',
    'thingTypeArn': 'string',
    'thingTypeId': 'string'
}

Response Structure

  • (dict) --

    The output of the CreateThingType operation.

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

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
create_topic_rule(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.create_topic_rule(
    ruleName='string',
    topicRulePayload={
        'sql': 'string',
        'description': 'string',
        'actions': [
            {
                'dynamoDB': {
                    'tableName': 'string',
                    'roleArn': 'string',
                    'operation': 'string',
                    'hashKeyField': 'string',
                    'hashKeyValue': 'string',
                    'hashKeyType': 'STRING'|'NUMBER',
                    'rangeKeyField': 'string',
                    'rangeKeyValue': 'string',
                    'rangeKeyType': 'STRING'|'NUMBER',
                    'payloadField': 'string'
                },
                'dynamoDBv2': {
                    'roleArn': 'string',
                    'putItem': {
                        'tableName': 'string'
                    }
                },
                'lambda': {
                    'functionArn': 'string'
                },
                'sns': {
                    'targetArn': 'string',
                    'roleArn': 'string',
                    'messageFormat': 'RAW'|'JSON'
                },
                'sqs': {
                    'roleArn': 'string',
                    'queueUrl': 'string',
                    'useBase64': True|False
                },
                'kinesis': {
                    'roleArn': 'string',
                    'streamName': 'string',
                    'partitionKey': 'string'
                },
                'republish': {
                    'roleArn': 'string',
                    'topic': 'string',
                    'qos': 123
                },
                's3': {
                    'roleArn': 'string',
                    'bucketName': 'string',
                    'key': 'string',
                    'cannedAcl': 'private'|'public-read'|'public-read-write'|'aws-exec-read'|'authenticated-read'|'bucket-owner-read'|'bucket-owner-full-control'|'log-delivery-write'
                },
                'firehose': {
                    'roleArn': 'string',
                    'deliveryStreamName': 'string',
                    'separator': 'string',
                    'batchMode': True|False
                },
                'cloudwatchMetric': {
                    'roleArn': 'string',
                    'metricNamespace': 'string',
                    'metricName': 'string',
                    'metricValue': 'string',
                    'metricUnit': 'string',
                    'metricTimestamp': 'string'
                },
                'cloudwatchAlarm': {
                    'roleArn': 'string',
                    'alarmName': 'string',
                    'stateReason': 'string',
                    'stateValue': 'string'
                },
                'cloudwatchLogs': {
                    'roleArn': 'string',
                    'logGroupName': 'string'
                },
                'elasticsearch': {
                    'roleArn': 'string',
                    'endpoint': 'string',
                    'index': 'string',
                    'type': 'string',
                    'id': 'string'
                },
                'salesforce': {
                    'token': 'string',
                    'url': 'string'
                },
                'iotAnalytics': {
                    'channelArn': 'string',
                    'channelName': 'string',
                    'batchMode': True|False,
                    'roleArn': 'string'
                },
                'iotEvents': {
                    'inputName': 'string',
                    'messageId': 'string',
                    'batchMode': True|False,
                    'roleArn': 'string'
                },
                'iotSiteWise': {
                    'putAssetPropertyValueEntries': [
                        {
                            'entryId': 'string',
                            'assetId': 'string',
                            'propertyId': 'string',
                            'propertyAlias': 'string',
                            'propertyValues': [
                                {
                                    'value': {
                                        'stringValue': 'string',
                                        'integerValue': 'string',
                                        'doubleValue': 'string',
                                        'booleanValue': 'string'
                                    },
                                    'timestamp': {
                                        'timeInSeconds': 'string',
                                        'offsetInNanos': 'string'
                                    },
                                    'quality': 'string'
                                },
                            ]
                        },
                    ],
                    'roleArn': 'string'
                },
                'stepFunctions': {
                    'executionNamePrefix': 'string',
                    'stateMachineName': 'string',
                    'roleArn': 'string'
                },
                'timestream': {
                    'roleArn': 'string',
                    'databaseName': 'string',
                    'tableName': 'string',
                    'dimensions': [
                        {
                            'name': 'string',
                            'value': 'string'
                        },
                    ],
                    'timestamp': {
                        'value': 'string',
                        'unit': 'string'
                    }
                },
                'http': {
                    'url': 'string',
                    'confirmationUrl': 'string',
                    'headers': [
                        {
                            'key': 'string',
                            'value': 'string'
                        },
                    ],
                    'auth': {
                        'sigv4': {
                            'signingRegion': 'string',
                            'serviceName': 'string',
                            'roleArn': 'string'
                        }
                    }
                },
                'kafka': {
                    'destinationArn': 'string',
                    'topic': 'string',
                    'key': 'string',
                    'partition': 'string',
                    'clientProperties': {
                        'string': 'string'
                    }
                },
                'openSearch': {
                    'roleArn': 'string',
                    'endpoint': 'string',
                    'index': 'string',
                    'type': 'string',
                    'id': 'string'
                }
            },
        ],
        'ruleDisabled': True|False,
        'awsIotSqlVersion': 'string',
        'errorAction': {
            'dynamoDB': {
                'tableName': 'string',
                'roleArn': 'string',
                'operation': 'string',
                'hashKeyField': 'string',
                'hashKeyValue': 'string',
                'hashKeyType': 'STRING'|'NUMBER',
                'rangeKeyField': 'string',
                'rangeKeyValue': 'string',
                'rangeKeyType': 'STRING'|'NUMBER',
                'payloadField': 'string'
            },
            'dynamoDBv2': {
                'roleArn': 'string',
                'putItem': {
                    'tableName': 'string'
                }
            },
            'lambda': {
                'functionArn': 'string'
            },
            'sns': {
                'targetArn': 'string',
                'roleArn': 'string',
                'messageFormat': 'RAW'|'JSON'
            },
            'sqs': {
                'roleArn': 'string',
                'queueUrl': 'string',
                'useBase64': True|False
            },
            'kinesis': {
                'roleArn': 'string',
                'streamName': 'string',
                'partitionKey': 'string'
            },
            'republish': {
                'roleArn': 'string',
                'topic': 'string',
                'qos': 123
            },
            's3': {
                'roleArn': 'string',
                'bucketName': 'string',
                'key': 'string',
                'cannedAcl': 'private'|'public-read'|'public-read-write'|'aws-exec-read'|'authenticated-read'|'bucket-owner-read'|'bucket-owner-full-control'|'log-delivery-write'
            },
            'firehose': {
                'roleArn': 'string',
                'deliveryStreamName': 'string',
                'separator': 'string',
                'batchMode': True|False
            },
            'cloudwatchMetric': {
                'roleArn': 'string',
                'metricNamespace': 'string',
                'metricName': 'string',
                'metricValue': 'string',
                'metricUnit': 'string',
                'metricTimestamp': 'string'
            },
            'cloudwatchAlarm': {
                'roleArn': 'string',
                'alarmName': 'string',
                'stateReason': 'string',
                'stateValue': 'string'
            },
            'cloudwatchLogs': {
                'roleArn': 'string',
                'logGroupName': 'string'
            },
            'elasticsearch': {
                'roleArn': 'string',
                'endpoint': 'string',
                'index': 'string',
                'type': 'string',
                'id': 'string'
            },
            'salesforce': {
                'token': 'string',
                'url': 'string'
            },
            'iotAnalytics': {
                'channelArn': 'string',
                'channelName': 'string',
                'batchMode': True|False,
                'roleArn': 'string'
            },
            'iotEvents': {
                'inputName': 'string',
                'messageId': 'string',
                'batchMode': True|False,
                'roleArn': 'string'
            },
            'iotSiteWise': {
                'putAssetPropertyValueEntries': [
                    {
                        'entryId': 'string',
                        'assetId': 'string',
                        'propertyId': 'string',
                        'propertyAlias': 'string',
                        'propertyValues': [
                            {
                                'value': {
                                    'stringValue': 'string',
                                    'integerValue': 'string',
                                    'doubleValue': 'string',
                                    'booleanValue': 'string'
                                },
                                'timestamp': {
                                    'timeInSeconds': 'string',
                                    'offsetInNanos': 'string'
                                },
                                'quality': 'string'
                            },
                        ]
                    },
                ],
                'roleArn': 'string'
            },
            'stepFunctions': {
                'executionNamePrefix': 'string',
                'stateMachineName': 'string',
                'roleArn': 'string'
            },
            'timestream': {
                'roleArn': 'string',
                'databaseName': 'string',
                'tableName': 'string',
                'dimensions': [
                    {
                        'name': 'string',
                        'value': 'string'
                    },
                ],
                'timestamp': {
                    'value': 'string',
                    'unit': 'string'
                }
            },
            'http': {
                'url': 'string',
                'confirmationUrl': 'string',
                'headers': [
                    {
                        'key': 'string',
                        'value': 'string'
                    },
                ],
                'auth': {
                    'sigv4': {
                        'signingRegion': 'string',
                        'serviceName': 'string',
                        'roleArn': 'string'
                    }
                }
            },
            'kafka': {
                'destinationArn': 'string',
                'topic': 'string',
                'key': 'string',
                'partition': 'string',
                'clientProperties': {
                    'string': 'string'
                }
            },
            'openSearch': {
                'roleArn': 'string',
                'endpoint': 'string',
                'index': 'string',
                'type': 'string',
                'id': 'string'
            }
        }
    },
    tags='string'
)
Parameters
  • ruleName (string) --

    [REQUIRED]

    The name of the rule.

  • topicRulePayload (dict) --

    [REQUIRED]

    The rule payload.

    • sql (string) -- [REQUIRED]

      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.

    • actions (list) -- [REQUIRED]

      The actions associated with the rule.

      • (dict) --

        Describes the actions associated with a rule.

        • dynamoDB (dict) --

          Write to a DynamoDB table.

          • tableName (string) -- [REQUIRED]

            The name of the DynamoDB table.

          • roleArn (string) -- [REQUIRED]

            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 .

          • hashKeyField (string) -- [REQUIRED]

            The hash key name.

          • hashKeyValue (string) -- [REQUIRED]

            The hash key value.

          • hashKeyType (string) --

            The hash key type. Valid values are "STRING" or "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"

          • payloadField (string) --

            The action payload. This name can be customized.

        • dynamoDBv2 (dict) --

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

          • roleArn (string) -- [REQUIRED]

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

          • putItem (dict) -- [REQUIRED]

            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.

            • tableName (string) -- [REQUIRED]

              The table where the message data will be written.

        • lambda (dict) --

          Invoke a Lambda function.

          • functionArn (string) -- [REQUIRED]

            The ARN of the Lambda function.

        • sns (dict) --

          Publish to an Amazon SNS topic.

          • targetArn (string) -- [REQUIRED]

            The ARN of the SNS topic.

          • roleArn (string) -- [REQUIRED]

            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.

        • sqs (dict) --

          Publish to an Amazon SQS queue.

          • roleArn (string) -- [REQUIRED]

            The ARN of the IAM role that grants access.

          • queueUrl (string) -- [REQUIRED]

            The URL of the Amazon SQS queue.

          • useBase64 (boolean) --

            Specifies whether to use Base64 encoding.

        • kinesis (dict) --

          Write data to an Amazon Kinesis stream.

          • roleArn (string) -- [REQUIRED]

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

          • streamName (string) -- [REQUIRED]

            The name of the Amazon Kinesis stream.

          • partitionKey (string) --

            The partition key.

        • republish (dict) --

          Publish to another MQTT topic.

          • roleArn (string) -- [REQUIRED]

            The ARN of the IAM role that grants access.

          • topic (string) -- [REQUIRED]

            The name of the MQTT topic.

          • qos (integer) --

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

        • s3 (dict) --

          Write to an Amazon S3 bucket.

          • roleArn (string) -- [REQUIRED]

            The ARN of the IAM role that grants access.

          • bucketName (string) -- [REQUIRED]

            The Amazon S3 bucket.

          • key (string) -- [REQUIRED]

            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 .

        • firehose (dict) --

          Write to an Amazon Kinesis Firehose stream.

          • roleArn (string) -- [REQUIRED]

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

          • deliveryStreamName (string) -- [REQUIRED]

            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), 'rn' (Windows newline), ',' (comma).

          • batchMode (boolean) --

            Whether to deliver the Kinesis Data Firehose stream as a batch by using ` PutRecordBatch https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html`__ . 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 https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html`__ request. The resulting array can't have more than 500 records.

        • cloudwatchMetric (dict) --

          Capture a CloudWatch metric.

          • roleArn (string) -- [REQUIRED]

            The IAM role that allows access to the CloudWatch metric.

          • metricNamespace (string) -- [REQUIRED]

            The CloudWatch metric namespace name.

          • metricName (string) -- [REQUIRED]

            The CloudWatch metric name.

          • metricValue (string) -- [REQUIRED]

            The CloudWatch metric value.

          • metricUnit (string) -- [REQUIRED]

            The metric unit supported by CloudWatch.

          • metricTimestamp (string) --

            An optional Unix timestamp .

        • cloudwatchAlarm (dict) --

          Change the state of a CloudWatch alarm.

          • roleArn (string) -- [REQUIRED]

            The IAM role that allows access to the CloudWatch alarm.

          • alarmName (string) -- [REQUIRED]

            The CloudWatch alarm name.

          • stateReason (string) -- [REQUIRED]

            The reason for the alarm change.

          • stateValue (string) -- [REQUIRED]

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

        • cloudwatchLogs (dict) --

          Send data to CloudWatch Logs.

          • roleArn (string) -- [REQUIRED]

            The IAM role that allows access to the CloudWatch log.

          • logGroupName (string) -- [REQUIRED]

            The CloudWatch log group to which the action sends data.

        • elasticsearch (dict) --

          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 .

          • roleArn (string) -- [REQUIRED]

            The IAM role ARN that has access to OpenSearch.

          • endpoint (string) -- [REQUIRED]

            The endpoint of your OpenSearch domain.

          • index (string) -- [REQUIRED]

            The index where you want to store your data.

          • type (string) -- [REQUIRED]

            The type of document you are storing.

          • id (string) -- [REQUIRED]

            The unique identifier for the document you are storing.

        • salesforce (dict) --

          Send a message to a Salesforce IoT Cloud Input Stream.

          • token (string) -- [REQUIRED]

            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.

          • url (string) -- [REQUIRED]

            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 (dict) --

          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 https://docs.aws.amazon.com/iotanalytics/latest/APIReference/API_BatchPutMessage.html`__ 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 (dict) --

          Sends an input to an IoT Events detector.

          • inputName (string) -- [REQUIRED]

            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 https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchPutMessage.html`__ . The resulting array can't have more than 10 messages.

          • roleArn (string) -- [REQUIRED]

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

        • iotSiteWise (dict) --

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

          • putAssetPropertyValueEntries (list) -- [REQUIRED]

            A list of asset property value entries.

            • (dict) --

              An asset property value entry containing the following information.

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

              • propertyValues (list) -- [REQUIRED]

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

                • (dict) --

                  An asset property value entry containing the following information.

                  • value (dict) -- [REQUIRED]

                    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.

                  • timestamp (dict) -- [REQUIRED]

                    The asset property value timestamp.

                    • timeInSeconds (string) -- [REQUIRED]

                      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 .

          • roleArn (string) -- [REQUIRED]

            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 (dict) --

          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.

          • stateMachineName (string) -- [REQUIRED]

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

          • roleArn (string) -- [REQUIRED]

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

        • timestream (dict) --

          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.

          • roleArn (string) -- [REQUIRED]

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

          • databaseName (string) -- [REQUIRED]

            The name of an Amazon Timestream database.

          • tableName (string) -- [REQUIRED]

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

          • dimensions (list) -- [REQUIRED]

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

            • (dict) --

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

              • name (string) -- [REQUIRED]

                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.

              • value (string) -- [REQUIRED]

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

          • timestamp (dict) --

            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.

            • value (string) -- [REQUIRED]

              An expression that returns a long epoch time value.

            • unit (string) -- [REQUIRED]

              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 (dict) --

          Send data to an HTTPS endpoint.

          • url (string) -- [REQUIRED]

            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 (list) --

            The HTTP headers to send with the message data.

            • (dict) --

              The HTTP action header.

              • key (string) -- [REQUIRED]

                The HTTP header key.

              • value (string) -- [REQUIRED]

                The HTTP header value. Substitution templates are supported.

          • auth (dict) --

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

            • sigv4 (dict) --

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

              • signingRegion (string) -- [REQUIRED]

                The signing region.

              • serviceName (string) -- [REQUIRED]

                The service name to use while signing with Sig V4.

              • roleArn (string) -- [REQUIRED]

                The ARN of the signing role.

        • kafka (dict) --

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

          • destinationArn (string) -- [REQUIRED]

            The ARN of Kafka action's VPC TopicRuleDestination .

          • topic (string) -- [REQUIRED]

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

          • key (string) --

            The Kafka message key.

          • partition (string) --

            The Kafka message partition.

          • clientProperties (dict) -- [REQUIRED]

            Properties of the Apache Kafka producer client.

            • (string) --
              • (string) --
        • openSearch (dict) --

          Write data to an Amazon OpenSearch Service domain.

          • roleArn (string) -- [REQUIRED]

            The IAM role ARN that has access to OpenSearch.

          • endpoint (string) -- [REQUIRED]

            The endpoint of your OpenSearch domain.

          • index (string) -- [REQUIRED]

            The OpenSearch index where you want to store your data.

          • type (string) -- [REQUIRED]

            The type of document you are storing.

          • id (string) -- [REQUIRED]

            The unique identifier for the document you are storing.

    • ruleDisabled (boolean) --

      Specifies whether the rule is disabled.

    • awsIotSqlVersion (string) --

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

    • errorAction (dict) --

      The action to take when an error occurs.

      • dynamoDB (dict) --

        Write to a DynamoDB table.

        • tableName (string) -- [REQUIRED]

          The name of the DynamoDB table.

        • roleArn (string) -- [REQUIRED]

          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 .

        • hashKeyField (string) -- [REQUIRED]

          The hash key name.

        • hashKeyValue (string) -- [REQUIRED]

          The hash key value.

        • hashKeyType (string) --

          The hash key type. Valid values are "STRING" or "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"

        • payloadField (string) --

          The action payload. This name can be customized.

      • dynamoDBv2 (dict) --

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

        • roleArn (string) -- [REQUIRED]

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

        • putItem (dict) -- [REQUIRED]

          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.

          • tableName (string) -- [REQUIRED]

            The table where the message data will be written.

      • lambda (dict) --

        Invoke a Lambda function.

        • functionArn (string) -- [REQUIRED]

          The ARN of the Lambda function.

      • sns (dict) --

        Publish to an Amazon SNS topic.

        • targetArn (string) -- [REQUIRED]

          The ARN of the SNS topic.

        • roleArn (string) -- [REQUIRED]

          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.

      • sqs (dict) --

        Publish to an Amazon SQS queue.

        • roleArn (string) -- [REQUIRED]

          The ARN of the IAM role that grants access.

        • queueUrl (string) -- [REQUIRED]

          The URL of the Amazon SQS queue.

        • useBase64 (boolean) --

          Specifies whether to use Base64 encoding.

      • kinesis (dict) --

        Write data to an Amazon Kinesis stream.

        • roleArn (string) -- [REQUIRED]

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

        • streamName (string) -- [REQUIRED]

          The name of the Amazon Kinesis stream.

        • partitionKey (string) --

          The partition key.

      • republish (dict) --

        Publish to another MQTT topic.

        • roleArn (string) -- [REQUIRED]

          The ARN of the IAM role that grants access.

        • topic (string) -- [REQUIRED]

          The name of the MQTT topic.

        • qos (integer) --

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

      • s3 (dict) --

        Write to an Amazon S3 bucket.

        • roleArn (string) -- [REQUIRED]

          The ARN of the IAM role that grants access.

        • bucketName (string) -- [REQUIRED]

          The Amazon S3 bucket.

        • key (string) -- [REQUIRED]

          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 .

      • firehose (dict) --

        Write to an Amazon Kinesis Firehose stream.

        • roleArn (string) -- [REQUIRED]

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

        • deliveryStreamName (string) -- [REQUIRED]

          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), 'rn' (Windows newline), ',' (comma).

        • batchMode (boolean) --

          Whether to deliver the Kinesis Data Firehose stream as a batch by using ` PutRecordBatch https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html`__ . 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 https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html`__ request. The resulting array can't have more than 500 records.

      • cloudwatchMetric (dict) --

        Capture a CloudWatch metric.

        • roleArn (string) -- [REQUIRED]

          The IAM role that allows access to the CloudWatch metric.

        • metricNamespace (string) -- [REQUIRED]

          The CloudWatch metric namespace name.

        • metricName (string) -- [REQUIRED]

          The CloudWatch metric name.

        • metricValue (string) -- [REQUIRED]

          The CloudWatch metric value.

        • metricUnit (string) -- [REQUIRED]

          The metric unit supported by CloudWatch.

        • metricTimestamp (string) --

          An optional Unix timestamp .

      • cloudwatchAlarm (dict) --

        Change the state of a CloudWatch alarm.

        • roleArn (string) -- [REQUIRED]

          The IAM role that allows access to the CloudWatch alarm.

        • alarmName (string) -- [REQUIRED]

          The CloudWatch alarm name.

        • stateReason (string) -- [REQUIRED]

          The reason for the alarm change.

        • stateValue (string) -- [REQUIRED]

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

      • cloudwatchLogs (dict) --

        Send data to CloudWatch Logs.

        • roleArn (string) -- [REQUIRED]

          The IAM role that allows access to the CloudWatch log.

        • logGroupName (string) -- [REQUIRED]

          The CloudWatch log group to which the action sends data.

      • elasticsearch (dict) --

        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 .

        • roleArn (string) -- [REQUIRED]

          The IAM role ARN that has access to OpenSearch.

        • endpoint (string) -- [REQUIRED]

          The endpoint of your OpenSearch domain.

        • index (string) -- [REQUIRED]

          The index where you want to store your data.

        • type (string) -- [REQUIRED]

          The type of document you are storing.

        • id (string) -- [REQUIRED]

          The unique identifier for the document you are storing.

      • salesforce (dict) --

        Send a message to a Salesforce IoT Cloud Input Stream.

        • token (string) -- [REQUIRED]

          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.

        • url (string) -- [REQUIRED]

          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 (dict) --

        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 https://docs.aws.amazon.com/iotanalytics/latest/APIReference/API_BatchPutMessage.html`__ 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 (dict) --

        Sends an input to an IoT Events detector.

        • inputName (string) -- [REQUIRED]

          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 https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchPutMessage.html`__ . The resulting array can't have more than 10 messages.

        • roleArn (string) -- [REQUIRED]

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

      • iotSiteWise (dict) --

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

        • putAssetPropertyValueEntries (list) -- [REQUIRED]

          A list of asset property value entries.

          • (dict) --

            An asset property value entry containing the following information.

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

            • propertyValues (list) -- [REQUIRED]

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

              • (dict) --

                An asset property value entry containing the following information.

                • value (dict) -- [REQUIRED]

                  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.

                • timestamp (dict) -- [REQUIRED]

                  The asset property value timestamp.

                  • timeInSeconds (string) -- [REQUIRED]

                    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 .

        • roleArn (string) -- [REQUIRED]

          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 (dict) --

        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.

        • stateMachineName (string) -- [REQUIRED]

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

        • roleArn (string) -- [REQUIRED]

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

      • timestream (dict) --

        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.

        • roleArn (string) -- [REQUIRED]

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

        • databaseName (string) -- [REQUIRED]

          The name of an Amazon Timestream database.

        • tableName (string) -- [REQUIRED]

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

        • dimensions (list) -- [REQUIRED]

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

          • (dict) --

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

            • name (string) -- [REQUIRED]

              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.

            • value (string) -- [REQUIRED]

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

        • timestamp (dict) --

          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.

          • value (string) -- [REQUIRED]

            An expression that returns a long epoch time value.

          • unit (string) -- [REQUIRED]

            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 (dict) --

        Send data to an HTTPS endpoint.

        • url (string) -- [REQUIRED]

          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 (list) --

          The HTTP headers to send with the message data.

          • (dict) --

            The HTTP action header.

            • key (string) -- [REQUIRED]

              The HTTP header key.

            • value (string) -- [REQUIRED]

              The HTTP header value. Substitution templates are supported.

        • auth (dict) --

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

          • sigv4 (dict) --

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

            • signingRegion (string) -- [REQUIRED]

              The signing region.

            • serviceName (string) -- [REQUIRED]

              The service name to use while signing with Sig V4.

            • roleArn (string) -- [REQUIRED]

              The ARN of the signing role.

      • kafka (dict) --

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

        • destinationArn (string) -- [REQUIRED]

          The ARN of Kafka action's VPC TopicRuleDestination .

        • topic (string) -- [REQUIRED]

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

        • key (string) --

          The Kafka message key.

        • partition (string) --

          The Kafka message partition.

        • clientProperties (dict) -- [REQUIRED]

          Properties of the Apache Kafka producer client.

          • (string) --
            • (string) --
      • openSearch (dict) --

        Write data to an Amazon OpenSearch Service domain.

        • roleArn (string) -- [REQUIRED]

          The IAM role ARN that has access to OpenSearch.

        • endpoint (string) -- [REQUIRED]

          The endpoint of your OpenSearch domain.

        • index (string) -- [REQUIRED]

          The OpenSearch index where you want to store your data.

        • type (string) -- [REQUIRED]

          The type of document you are storing.

        • id (string) -- [REQUIRED]

          The unique identifier for the document you are storing.

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

Returns

None

Exceptions

  • IoT.Client.exceptions.SqlParseException
  • IoT.Client.exceptions.InternalException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.ConflictingResourceUpdateException
create_topic_rule_destination(**kwargs)

Creates a topic rule destination. The destination must be confirmed prior to use.

Requires permission to access the CreateTopicRuleDestination action.

See also: AWS API Documentation

Request Syntax

response = client.create_topic_rule_destination(
    destinationConfiguration={
        'httpUrlConfiguration': {
            'confirmationUrl': 'string'
        },
        'vpcConfiguration': {
            'subnetIds': [
                'string',
            ],
            'securityGroups': [
                'string',
            ],
            'vpcId': 'string',
            'roleArn': 'string'
        }
    }
)
Parameters
destinationConfiguration (dict) --

[REQUIRED]

The topic rule destination configuration.

  • httpUrlConfiguration (dict) --

    Configuration of the HTTP URL.

    • confirmationUrl (string) -- [REQUIRED]

      The URL IoT uses to confirm ownership of or access to the topic rule destination URL.

  • vpcConfiguration (dict) --

    Configuration of the virtual private cloud (VPC) connection.

    • subnetIds (list) -- [REQUIRED]

      The subnet IDs of the VPC destination.

      • (string) --
    • securityGroups (list) --

      The security groups of the VPC destination.

      • (string) --
    • vpcId (string) -- [REQUIRED]

      The ID of the VPC.

    • roleArn (string) -- [REQUIRED]

      The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).

Return type
dict
Returns
Response Syntax
{
    'topicRuleDestination': {
        'arn': 'string',
        'status': 'ENABLED'|'IN_PROGRESS'|'DISABLED'|'ERROR'|'DELETING',
        'createdAt': datetime(2015, 1, 1),
        'lastUpdatedAt': datetime(2015, 1, 1),
        'statusReason': 'string',
        'httpUrlProperties': {
            'confirmationUrl': 'string'
        },
        'vpcProperties': {
            'subnetIds': [
                'string',
            ],
            'securityGroups': [
                'string',
            ],
            'vpcId': 'string',
            'roleArn': 'string'
        }
    }
}

Response Structure

  • (dict) --
    • topicRuleDestination (dict) --

      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.

      • createdAt (datetime) --

        The date and time when the topic rule destination was created.

      • lastUpdatedAt (datetime) --

        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 (dict) --

        Properties of the HTTP URL.

        • confirmationUrl (string) --

          The URL used to confirm the HTTP topic rule destination URL.

      • vpcProperties (dict) --

        Properties of the virtual private cloud (VPC) connection.

        • subnetIds (list) --

          The subnet IDs of the VPC destination.

          • (string) --
        • securityGroups (list) --

          The security groups of the VPC destination.

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

Exceptions

  • IoT.Client.exceptions.InternalException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.ConflictingResourceUpdateException
delete_account_audit_configuration(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_account_audit_configuration(
    deleteScheduledAudits=True|False
)
Parameters
deleteScheduledAudits (boolean) -- If true, all scheduled audits are deleted.
Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
delete_audit_suppression(**kwargs)

Deletes a Device Defender audit suppression.

Requires permission to access the DeleteAuditSuppression action.

See also: AWS API Documentation

Request Syntax

response = client.delete_audit_suppression(
    checkName='string',
    resourceIdentifier={
        'deviceCertificateId': 'string',
        'caCertificateId': 'string',
        'cognitoIdentityPoolId': 'string',
        'clientId': 'string',
        'policyVersionIdentifier': {
            'policyName': 'string',
            'policyVersionId': 'string'
        },
        'account': 'string',
        'iamRoleArn': 'string',
        'roleAliasArn': 'string'
    }
)
Parameters
  • checkName (string) --

    [REQUIRED]

    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 (dict) --

    [REQUIRED]

    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 (dict) --

      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.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
delete_authorizer(**kwargs)

Deletes an authorizer.

Requires permission to access the DeleteAuthorizer action.

See also: AWS API Documentation

Request Syntax

response = client.delete_authorizer(
    authorizerName='string'
)
Parameters
authorizerName (string) --

[REQUIRED]

The name of the authorizer to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.DeleteConflictException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
delete_billing_group(**kwargs)

Deletes the billing group.

Requires permission to access the DeleteBillingGroup action.

See also: AWS API Documentation

Request Syntax

response = client.delete_billing_group(
    billingGroupName='string',
    expectedVersion=123
)
Parameters
  • billingGroupName (string) --

    [REQUIRED]

    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 .
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.VersionConflictException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
delete_ca_certificate(**kwargs)

Deletes a registered CA certificate.

Requires permission to access the DeleteCACertificate action.

See also: AWS API Documentation

Request Syntax

response = client.delete_ca_certificate(
    certificateId='string'
)
Parameters
certificateId (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

    The output for the DeleteCACertificate operation.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.CertificateStateException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
delete_certificate(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_certificate(
    certificateId='string',
    forceDelete=True|False
)
Parameters
  • certificateId (string) --

    [REQUIRED]

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

None

Exceptions

  • IoT.Client.exceptions.CertificateStateException
  • IoT.Client.exceptions.DeleteConflictException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
delete_custom_metric(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_custom_metric(
    metricName='string'
)
Parameters
metricName (string) --

[REQUIRED]

The name of the custom metric.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
delete_dimension(**kwargs)

Removes the specified dimension from your Amazon Web Services accounts.

Requires permission to access the DeleteDimension action.

See also: AWS API Documentation

Request Syntax

response = client.delete_dimension(
    name='string'
)
Parameters
name (string) --

[REQUIRED]

The unique identifier for the dimension that you want to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
delete_domain_configuration(**kwargs)

Deletes the specified domain configuration.

Requires permission to access the DeleteDomainConfiguration action.

See also: AWS API Documentation

Request Syntax

response = client.delete_domain_configuration(
    domainConfigurationName='string'
)
Parameters
domainConfigurationName (string) --

[REQUIRED]

The name of the domain configuration to be deleted.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.InvalidRequestException
delete_dynamic_thing_group(**kwargs)

Deletes a dynamic thing group.

Requires permission to access the DeleteDynamicThingGroup action.

See also: AWS API Documentation

Request Syntax

response = client.delete_dynamic_thing_group(
    thingGroupName='string',
    expectedVersion=123
)
Parameters
  • thingGroupName (string) --

    [REQUIRED]

    The name of the dynamic thing group to delete.

  • expectedVersion (integer) -- The expected version of the dynamic thing group to delete.
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.VersionConflictException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
delete_fleet_metric(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_fleet_metric(
    metricName='string',
    expectedVersion=123
)
Parameters
  • metricName (string) --

    [REQUIRED]

    The name of the fleet metric to delete.

  • expectedVersion (integer) -- The expected version of the fleet metric to delete.
Returns

None

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.VersionConflictException
delete_job(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_job(
    jobId='string',
    force=True|False,
    namespaceId='string'
)
Parameters
  • jobId (string) --

    [REQUIRED]

    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 in public preview.

Returns

None

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.InvalidStateTransitionException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.LimitExceededException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.ServiceUnavailableException
delete_job_execution(**kwargs)

Deletes a job execution.

Requires permission to access the DeleteJobExecution action.

See also: AWS API Documentation

Request Syntax

response = client.delete_job_execution(
    jobId='string',
    thingName='string',
    executionNumber=123,
    force=True|False,
    namespaceId='string'
)
Parameters
  • jobId (string) --

    [REQUIRED]

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

  • thingName (string) --

    [REQUIRED]

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

  • executionNumber (integer) --

    [REQUIRED]

    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 in public preview.

Returns

None

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.InvalidStateTransitionException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.ServiceUnavailableException
delete_job_template(**kwargs)

Deletes the specified job template.

See also: AWS API Documentation

Request Syntax

response = client.delete_job_template(
    jobTemplateId='string'
)
Parameters
jobTemplateId (string) --

[REQUIRED]

The unique identifier of the job template to delete.

Returns
None

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
delete_mitigation_action(**kwargs)

Deletes a defined mitigation action from your Amazon Web Services accounts.

Requires permission to access the DeleteMitigationAction action.

See also: AWS API Documentation

Request Syntax

response = client.delete_mitigation_action(
    actionName='string'
)
Parameters
actionName (string) --

[REQUIRED]

The name of the mitigation action that you want to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
delete_ota_update(**kwargs)

Delete an OTA update.

Requires permission to access the DeleteOTAUpdate action.

See also: AWS API Documentation

Request Syntax

response = client.delete_ota_update(
    otaUpdateId='string',
    deleteStream=True|False,
    forceDeleteAWSJob=True|False
)
Parameters
  • otaUpdateId (string) --

    [REQUIRED]

    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.
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.VersionConflictException
delete_policy(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_policy(
    policyName='string'
)
Parameters
policyName (string) --

[REQUIRED]

The name of the policy to delete.

Returns
None

Exceptions

  • IoT.Client.exceptions.DeleteConflictException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
delete_policy_version(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_policy_version(
    policyName='string',
    policyVersionId='string'
)
Parameters
  • policyName (string) --

    [REQUIRED]

    The name of the policy.

  • policyVersionId (string) --

    [REQUIRED]

    The policy version ID.

Returns

None

Exceptions

  • IoT.Client.exceptions.DeleteConflictException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
delete_provisioning_template(**kwargs)

Deletes a fleet provisioning template.

Requires permission to access the DeleteProvisioningTemplate action.

See also: AWS API Documentation

Request Syntax

response = client.delete_provisioning_template(
    templateName='string'
)
Parameters
templateName (string) --

[REQUIRED]

The name of the fleet provision template to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.DeleteConflictException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.ConflictingResourceUpdateException
  • IoT.Client.exceptions.UnauthorizedException
delete_provisioning_template_version(**kwargs)

Deletes a fleet provisioning template version.

Requires permission to access the DeleteProvisioningTemplateVersion action.

See also: AWS API Documentation

Request Syntax

response = client.delete_provisioning_template_version(
    templateName='string',
    versionId=123
)
Parameters
  • templateName (string) --

    [REQUIRED]

    The name of the fleet provisioning template version to delete.

  • versionId (integer) --

    [REQUIRED]

    The fleet provisioning template version ID to delete.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ConflictingResourceUpdateException
  • IoT.Client.exceptions.DeleteConflictException
delete_registration_code()

Deletes a CA certificate registration code.

Requires permission to access the DeleteRegistrationCode action.

See also: AWS API Documentation

Request Syntax

response = client.delete_registration_code()
Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

    The output for the DeleteRegistrationCode operation.

Exceptions

  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
delete_role_alias(**kwargs)

Deletes a role alias

Requires permission to access the DeleteRoleAlias action.

See also: AWS API Documentation

Request Syntax

response = client.delete_role_alias(
    roleAlias='string'
)
Parameters
roleAlias (string) --

[REQUIRED]

The role alias to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.DeleteConflictException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
delete_scheduled_audit(**kwargs)

Deletes a scheduled audit.

Requires permission to access the DeleteScheduledAudit action.

See also: AWS API Documentation

Request Syntax

response = client.delete_scheduled_audit(
    scheduledAuditName='string'
)
Parameters
scheduledAuditName (string) --

[REQUIRED]

The name of the scheduled audit you want to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
delete_security_profile(**kwargs)

Deletes a Device Defender security profile.

Requires permission to access the DeleteSecurityProfile action.

See also: AWS API Documentation

Request Syntax

response = client.delete_security_profile(
    securityProfileName='string',
    expectedVersion=123
)
Parameters
  • securityProfileName (string) --

    [REQUIRED]

    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.
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.VersionConflictException
delete_stream(**kwargs)

Deletes a stream.

Requires permission to access the DeleteStream action.

See also: AWS API Documentation

Request Syntax

response = client.delete_stream(
    streamId='string'
)
Parameters
streamId (string) --

[REQUIRED]

The stream ID.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.DeleteConflictException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
delete_thing(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_thing(
    thingName='string',
    expectedVersion=123
)
Parameters
  • thingName (string) --

    [REQUIRED]

    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 .
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

    The output of the DeleteThing operation.

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.VersionConflictException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
delete_thing_group(**kwargs)

Deletes a thing group.

Requires permission to access the DeleteThingGroup action.

See also: AWS API Documentation

Request Syntax

response = client.delete_thing_group(
    thingGroupName='string',
    expectedVersion=123
)
Parameters
  • thingGroupName (string) --

    [REQUIRED]

    The name of the thing group to delete.

  • expectedVersion (integer) -- The expected version of the thing group to delete.
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.VersionConflictException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
delete_thing_type(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_thing_type(
    thingTypeName='string'
)
Parameters
thingTypeName (string) --

[REQUIRED]

The name of the thing type.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

    The output for the DeleteThingType operation.

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
delete_topic_rule(**kwargs)

Deletes the rule.

Requires permission to access the DeleteTopicRule action.

See also: AWS API Documentation

Request Syntax

response = client.delete_topic_rule(
    ruleName='string'
)
Parameters
ruleName (string) --

[REQUIRED]

The name of the rule.

Returns
None

Exceptions

  • IoT.Client.exceptions.InternalException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ConflictingResourceUpdateException
delete_topic_rule_destination(**kwargs)

Deletes a topic rule destination.

Requires permission to access the DeleteTopicRuleDestination action.

See also: AWS API Documentation

Request Syntax

response = client.delete_topic_rule_destination(
    arn='string'
)
Parameters
arn (string) --

[REQUIRED]

The ARN of the topic rule destination to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InternalException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ConflictingResourceUpdateException
delete_v2_logging_level(**kwargs)

Deletes a logging level.

Requires permission to access the DeleteV2LoggingLevel action.

See also: AWS API Documentation

Request Syntax

response = client.delete_v2_logging_level(
    targetType='DEFAULT'|'THING_GROUP',
    targetName='string'
)
Parameters
  • targetType (string) --

    [REQUIRED]

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

  • targetName (string) --

    [REQUIRED]

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

Returns

None

Exceptions

  • IoT.Client.exceptions.InternalException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ServiceUnavailableException
deprecate_thing_type(**kwargs)

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

Requires permission to access the DeprecateThingType action.

See also: AWS API Documentation

Request Syntax

response = client.deprecate_thing_type(
    thingTypeName='string',
    undoDeprecate=True|False
)
Parameters
  • thingTypeName (string) --

    [REQUIRED]

    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.
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

    The output for the DeprecateThingType operation.

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
describe_account_audit_configuration()

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.

See also: AWS API Documentation

Request Syntax

response = client.describe_account_audit_configuration()
Return type
dict
Returns
Response Syntax
{
    'roleArn': 'string',
    'auditNotificationTargetConfigurations': {
        'string': {
            'targetArn': 'string',
            'roleArn': 'string',
            'enabled': True|False
        }
    },
    'auditCheckConfigurations': {
        'string': {
            'enabled': True|False
        }
    }
}

Response Structure

  • (dict) --
    • 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 (dict) --

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

      • (string) --
        • (dict) --

          Information about the targets to which audit notifications are sent.

          • targetArn (string) --

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

          • roleArn (string) --

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

          • enabled (boolean) --

            True if notifications to the target are enabled.

    • auditCheckConfigurations (dict) --

      Which audit checks are enabled and disabled for this account.

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

        • (dict) --

          Which audit checks are enabled and disabled for this account.

          • enabled (boolean) --

            True if this audit check is enabled for this account.

Exceptions

  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
describe_audit_finding(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.describe_audit_finding(
    findingId='string'
)
Parameters
findingId (string) --

[REQUIRED]

A unique identifier for a single audit finding. You can use this identifier to apply mitigation actions to the finding.

Return type
dict
Returns
Response Syntax
{
    'finding': {
        'findingId': 'string',
        'taskId': 'string',
        'checkName': 'string',
        'taskStartTime': datetime(2015, 1, 1),
        'findingTime': datetime(2015, 1, 1),
        'severity': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW',
        'nonCompliantResource': {
            'resourceType': 'DEVICE_CERTIFICATE'|'CA_CERTIFICATE'|'IOT_POLICY'|'COGNITO_IDENTITY_POOL'|'CLIENT_ID'|'ACCOUNT_SETTINGS'|'ROLE_ALIAS'|'IAM_ROLE',
            'resourceIdentifier': {
                'deviceCertificateId': 'string',
                'caCertificateId': 'string',
                'cognitoIdentityPoolId': 'string',
                'clientId': 'string',
                'policyVersionIdentifier': {
                    'policyName': 'string',
                    'policyVersionId': 'string'
                },
                'account': 'string',
                'iamRoleArn': 'string',
                'roleAliasArn': 'string'
            },
            'additionalInfo': {
                'string': 'string'
            }
        },
        'relatedResources': [
            {
                'resourceType': 'DEVICE_CERTIFICATE'|'CA_CERTIFICATE'|'IOT_POLICY'|'COGNITO_IDENTITY_POOL'|'CLIENT_ID'|'ACCOUNT_SETTINGS'|'ROLE_ALIAS'|'IAM_ROLE',
                'resourceIdentifier': {
                    'deviceCertificateId': 'string',
                    'caCertificateId': 'string',
                    'cognitoIdentityPoolId': 'string',
                    'clientId': 'string',
                    'policyVersionIdentifier': {
                        'policyName': 'string',
                        'policyVersionId': 'string'
                    },
                    'account': 'string',
                    'iamRoleArn': 'string',
                    'roleAliasArn': 'string'
                },
                'additionalInfo': {
                    'string': 'string'
                }
            },
        ],
        'reasonForNonCompliance': 'string',
        'reasonForNonComplianceCode': 'string',
        'isSuppressed': True|False
    }
}

Response Structure

  • (dict) --
    • finding (dict) --

      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 (datetime) --

        The time the audit started.

      • findingTime (datetime) --

        The time the result (finding) was discovered.

      • severity (string) --

        The severity of the result (finding).

      • nonCompliantResource (dict) --

        The resource that was found to be noncompliant with the audit check.

        • resourceType (string) --

          The type of the noncompliant resource.

        • resourceIdentifier (dict) --

          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 (dict) --

            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.

        • additionalInfo (dict) --

          Other information about the noncompliant resource.

          • (string) --
            • (string) --
      • relatedResources (list) --

        The list of related resources.

        • (dict) --

          Information about a related resource.

          • resourceType (string) --

            The type of resource.

          • resourceIdentifier (dict) --

            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 (dict) --

              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.

          • additionalInfo (dict) --

            Other information about the resource.

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

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
describe_audit_mitigation_actions_task(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.describe_audit_mitigation_actions_task(
    taskId='string'
)
Parameters
taskId (string) --

[REQUIRED]

The unique identifier for the audit mitigation task.

Return type
dict
Returns
Response Syntax
{
    'taskStatus': 'IN_PROGRESS'|'COMPLETED'|'FAILED'|'CANCELED',
    'startTime': datetime(2015, 1, 1),
    'endTime': datetime(2015, 1, 1),
    'taskStatistics': {
        'string': {
            'totalFindingsCount': 123,
            'failedFindingsCount': 123,
            'succeededFindingsCount': 123,
            'skippedFindingsCount': 123,
            'canceledFindingsCount': 123
        }
    },
    'target': {
        'auditTaskId': 'string',
        'findingIds': [
            'string',
        ],
        'auditCheckToReasonCodeFilter': {
            'string': [
                'string',
            ]
        }
    },
    'auditCheckToActionsMapping': {
        'string': [
            'string',
        ]
    },
    'actionsDefinition': [
        {
            'name': 'string',
            'id': 'string',
            'roleArn': 'string',
            'actionParams': {
                'updateDeviceCertificateParams': {
                    'action': 'DEACTIVATE'
                },
                'updateCACertificateParams': {
                    'action': 'DEACTIVATE'
                },
                'addThingsToThingGroupParams': {
                    'thingGroupNames': [
                        'string',
                    ],
                    'overrideDynamicGroups': True|False
                },
                'replaceDefaultPolicyVersionParams': {
                    'templateName': 'BLANK_POLICY'
                },
                'enableIoTLoggingParams': {
                    'roleArnForLogging': 'string',
                    'logLevel': 'DEBUG'|'INFO'|'ERROR'|'WARN'|'DISABLED'
                },
                'publishFindingToSnsParams': {
                    'topicArn': 'string'
                }
            }
        },
    ]
}

Response Structure

  • (dict) --
    • taskStatus (string) --

      The current status of the task.

    • startTime (datetime) --

      The date and time when the task was started.

    • endTime (datetime) --

      The date and time when the task was completed or canceled.

    • taskStatistics (dict) --

      Aggregate counts of the results when the mitigation tasks were applied to the findings for this audit mitigation actions task.

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

        • (dict) --

          Provides summary counts of how many tasks for findings are in a particular state. This information is included in the response from DescribeAuditMitigationActionsTask.

          • 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 (dict) --

      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 (list) --

        If the task will apply a mitigation action to one or more listed findings, this value uniquely identifies those findings.

        • (string) --
      • auditCheckToReasonCodeFilter (dict) --

        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.

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

          • (list) --
            • (string) --
    • auditCheckToActionsMapping (dict) --

      Specifies the mitigation actions that should be applied to specific audit checks.

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

        • (list) --
          • (string) --
    • actionsDefinition (list) --

      Specifies the mitigation actions and their parameters that are applied as part of this task.

      • (dict) --

        Describes which changes should be applied as part of a mitigation action.

        • 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 (dict) --

          The set of parameters for this mitigation action. The parameters vary, depending on the kind of action you apply.

          • updateDeviceCertificateParams (dict) --

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

            • action (string) --

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

          • updateCACertificateParams (dict) --

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

            • action (string) --

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

          • addThingsToThingGroupParams (dict) --

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

            • thingGroupNames (list) --

              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.

              • (string) --
            • 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 (dict) --

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

            • templateName (string) --

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

          • enableIoTLoggingParams (dict) --

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

            • roleArnForLogging (string) --

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

            • logLevel (string) --

              Specifies the type of information to be logged.

          • publishFindingToSnsParams (dict) --

            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.

            • topicArn (string) --

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

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
describe_audit_suppression(**kwargs)

Gets information about a Device Defender audit suppression.

See also: AWS API Documentation

Request Syntax

response = client.describe_audit_suppression(
    checkName='string',
    resourceIdentifier={
        'deviceCertificateId': 'string',
        'caCertificateId': 'string',
        'cognitoIdentityPoolId': 'string',
        'clientId': 'string',
        'policyVersionIdentifier': {
            'policyName': 'string',
            'policyVersionId': 'string'
        },
        'account': 'string',
        'iamRoleArn': 'string',
        'roleAliasArn': 'string'
    }
)
Parameters
  • checkName (string) --

    [REQUIRED]

    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 (dict) --

    [REQUIRED]

    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 (dict) --

      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.

Return type

dict

Returns

Response Syntax

{
    'checkName': 'string',
    'resourceIdentifier': {
        'deviceCertificateId': 'string',
        'caCertificateId': 'string',
        'cognitoIdentityPoolId': 'string',
        'clientId': 'string',
        'policyVersionIdentifier': {
            'policyName': 'string',
            'policyVersionId': 'string'
        },
        'account': 'string',
        'iamRoleArn': 'string',
        'roleAliasArn': 'string'
    },
    'expirationDate': datetime(2015, 1, 1),
    'suppressIndefinitely': True|False,
    'description': 'string'
}

Response Structure

  • (dict) --

    • 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 (dict) --

      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 (dict) --

        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.

    • expirationDate (datetime) --

      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.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
describe_audit_task(**kwargs)

Gets information about a Device Defender audit.

Requires permission to access the DescribeAuditTask action.

See also: AWS API Documentation

Request Syntax

response = client.describe_audit_task(
    taskId='string'
)
Parameters
taskId (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'taskStatus': 'IN_PROGRESS'|'COMPLETED'|'FAILED'|'CANCELED',
    'taskType': 'ON_DEMAND_AUDIT_TASK'|'SCHEDULED_AUDIT_TASK',
    'taskStartTime': datetime(2015, 1, 1),
    'taskStatistics': {
        'totalChecks': 123,
        'inProgressChecks': 123,
        'waitingForDataCollectionChecks': 123,
        'compliantChecks': 123,
        'nonCompliantChecks': 123,
        'failedChecks': 123,
        'canceledChecks': 123
    },
    'scheduledAuditName': 'string',
    'auditDetails': {
        'string': {
            'checkRunStatus': 'IN_PROGRESS'|'WAITING_FOR_DATA_COLLECTION'|'CANCELED'|'COMPLETED_COMPLIANT'|'COMPLETED_NON_COMPLIANT'|'FAILED',
            'checkCompliant': True|False,
            'totalResourcesCount': 123,
            'nonCompliantResourcesCount': 123,
            'suppressedNonCompliantResourcesCount': 123,
            'errorCode': 'string',
            'message': 'string'
        }
    }
}

Response Structure

  • (dict) --
    • taskStatus (string) --

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

    • taskType (string) --

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

    • taskStartTime (datetime) --

      The time the audit started.

    • taskStatistics (dict) --

      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 (dict) --

      Detailed information about each check performed during this audit.

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

        • (dict) --

          Information about the audit check.

          • checkRunStatus (string) --

            The completion status of this check. One of "IN_PROGRESS", "WAITING_FOR_DATA_COLLECTION", "CANCELED", "COMPLETED_COMPLIANT", "COMPLETED_NON_COMPLIANT", or "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.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
describe_authorizer(**kwargs)

Describes an authorizer.

Requires permission to access the DescribeAuthorizer action.

See also: AWS API Documentation

Request Syntax

response = client.describe_authorizer(
    authorizerName='string'
)
Parameters
authorizerName (string) --

[REQUIRED]

The name of the authorizer to describe.

Return type
dict
Returns
Response Syntax
{
    'authorizerDescription': {
        'authorizerName': 'string',
        'authorizerArn': 'string',
        'authorizerFunctionArn': 'string',
        'tokenKeyName': 'string',
        'tokenSigningPublicKeys': {
            'string': 'string'
        },
        'status': 'ACTIVE'|'INACTIVE',
        'creationDate': datetime(2015, 1, 1),
        'lastModifiedDate': datetime(2015, 1, 1),
        'signingDisabled': True|False
    }
}

Response Structure

  • (dict) --
    • authorizerDescription (dict) --

      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 (dict) --

        The public keys used to validate the token signature returned by your custom authentication service.

        • (string) --
          • (string) --
      • status (string) --

        The status of the authorizer.

      • creationDate (datetime) --

        The UNIX timestamp of when the authorizer was created.

      • lastModifiedDate (datetime) --

        The UNIX timestamp of when the authorizer was last updated.

      • signingDisabled (boolean) --

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

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
describe_billing_group(**kwargs)

Returns information about a billing group.

Requires permission to access the DescribeBillingGroup action.

See also: AWS API Documentation

Request Syntax

response = client.describe_billing_group(
    billingGroupName='string'
)
Parameters
billingGroupName (string) --

[REQUIRED]

The name of the billing group.

Return type
dict
Returns
Response Syntax
{
    'billingGroupName': 'string',
    'billingGroupId': 'string',
    'billingGroupArn': 'string',
    'version': 123,
    'billingGroupProperties': {
        'billingGroupDescription': 'string'
    },
    'billingGroupMetadata': {
        'creationDate': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --
    • 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 (dict) --

      The properties of the billing group.

      • billingGroupDescription (string) --

        The description of the billing group.

    • billingGroupMetadata (dict) --

      Additional information about the billing group.

      • creationDate (datetime) --

        The date the billing group was created.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
describe_ca_certificate(**kwargs)

Describes a registered CA certificate.

Requires permission to access the DescribeCACertificate action.

See also: AWS API Documentation

Request Syntax

response = client.describe_ca_certificate(
    certificateId='string'
)
Parameters
certificateId (string) --

[REQUIRED]

The CA certificate identifier.

Return type
dict
Returns
Response Syntax
{
    'certificateDescription': {
        'certificateArn': 'string',
        'certificateId': 'string',
        'status': 'ACTIVE'|'INACTIVE',
        'certificatePem': 'string',
        'ownedBy': 'string',
        'creationDate': datetime(2015, 1, 1),
        'autoRegistrationStatus': 'ENABLE'|'DISABLE',
        'lastModifiedDate': datetime(2015, 1, 1),
        'customerVersion': 123,
        'generationId': 'string',
        'validity': {
            'notBefore': datetime(2015, 1, 1),
            'notAfter': datetime(2015, 1, 1)
        }
    },
    'registrationConfig': {
        'templateBody': 'string',
        'roleArn': 'string'
    }
}

Response Structure

  • (dict) --

    The output from the DescribeCACertificate operation.

    • certificateDescription (dict) --

      The CA certificate description.

      • certificateArn (string) --

        The CA certificate ARN.

      • certificateId (string) --

        The CA certificate ID.

      • status (string) --

        The status of a CA certificate.

      • certificatePem (string) --

        The CA certificate data, in PEM format.

      • ownedBy (string) --

        The owner of the CA certificate.

      • creationDate (datetime) --

        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"

      • lastModifiedDate (datetime) --

        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 (dict) --

        When the CA certificate is valid.

        • notBefore (datetime) --

          The certificate is not valid before this date.

        • notAfter (datetime) --

          The certificate is not valid after this date.

    • registrationConfig (dict) --

      Information about the registration configuration.

      • templateBody (string) --

        The template body.

      • roleArn (string) --

        The ARN of the role.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
describe_certificate(**kwargs)

Gets information about the specified certificate.

Requires permission to access the DescribeCertificate action.

See also: AWS API Documentation

Request Syntax

response = client.describe_certificate(
    certificateId='string'
)
Parameters
certificateId (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'certificateDescription': {
        'certificateArn': 'string',
        'certificateId': 'string',
        'caCertificateId': 'string',
        'status': 'ACTIVE'|'INACTIVE'|'REVOKED'|'PENDING_TRANSFER'|'REGISTER_INACTIVE'|'PENDING_ACTIVATION',
        'certificatePem': 'string',
        'ownedBy': 'string',
        'previousOwnedBy': 'string',
        'creationDate': datetime(2015, 1, 1),
        'lastModifiedDate': datetime(2015, 1, 1),
        'customerVersion': 123,
        'transferData': {
            'transferMessage': 'string',
            'rejectReason': 'string',
            'transferDate': datetime(2015, 1, 1),
            'acceptDate': datetime(2015, 1, 1),
            'rejectDate': datetime(2015, 1, 1)
        },
        'generationId': 'string',
        'validity': {
            'notBefore': datetime(2015, 1, 1),
            'notAfter': datetime(2015, 1, 1)
        },
        'certificateMode': 'DEFAULT'|'SNI_ONLY'
    }
}

Response Structure

  • (dict) --

    The output of the DescribeCertificate operation.

    • certificateDescription (dict) --

      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.

      • 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 (datetime) --

        The date and time the certificate was created.

      • lastModifiedDate (datetime) --

        The date and time the certificate was last modified.

      • customerVersion (integer) --

        The customer version of the certificate.

      • transferData (dict) --

        The transfer data.

        • transferMessage (string) --

          The transfer message.

        • rejectReason (string) --

          The reason why the transfer was rejected.

        • transferDate (datetime) --

          The date the transfer took place.

        • acceptDate (datetime) --

          The date the transfer was accepted.

        • rejectDate (datetime) --

          The date the transfer was rejected.

      • generationId (string) --

        The generation ID of the certificate.

      • validity (dict) --

        When the certificate is valid.

        • notBefore (datetime) --

          The certificate is not valid before this date.

        • notAfter (datetime) --

          The certificate is not valid after this date.

      • certificateMode (string) --

        The mode of the certificate.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
describe_custom_metric(**kwargs)

Gets information about a Device Defender detect custom metric.

Requires permission to access the DescribeCustomMetric action.

See also: AWS API Documentation

Request Syntax

response = client.describe_custom_metric(
    metricName='string'
)
Parameters
metricName (string) --

[REQUIRED]

The name of the custom metric.

Return type
dict
Returns
Response Syntax
{
    'metricName': 'string',
    'metricArn': 'string',
    'metricType': 'string-list'|'ip-address-list'|'number-list'|'number',
    'displayName': 'string',
    'creationDate': datetime(2015, 1, 1),
    'lastModifiedDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --
    • 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. Types include string-list , ip-address-list , number-list , and 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 (datetime) --

      The creation date of the custom metric in milliseconds since epoch.

    • lastModifiedDate (datetime) --

      The time the custom metric was last modified in milliseconds since epoch.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
describe_default_authorizer()

Describes the default authorizer.

Requires permission to access the DescribeDefaultAuthorizer action.

See also: AWS API Documentation

Request Syntax

response = client.describe_default_authorizer()
Return type
dict
Returns
Response Syntax
{
    'authorizerDescription': {
        'authorizerName': 'string',
        'authorizerArn': 'string',
        'authorizerFunctionArn': 'string',
        'tokenKeyName': 'string',
        'tokenSigningPublicKeys': {
            'string': 'string'
        },
        'status': 'ACTIVE'|'INACTIVE',
        'creationDate': datetime(2015, 1, 1),
        'lastModifiedDate': datetime(2015, 1, 1),
        'signingDisabled': True|False
    }
}

Response Structure

  • (dict) --
    • authorizerDescription (dict) --

      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 (dict) --

        The public keys used to validate the token signature returned by your custom authentication service.

        • (string) --
          • (string) --
      • status (string) --

        The status of the authorizer.

      • creationDate (datetime) --

        The UNIX timestamp of when the authorizer was created.

      • lastModifiedDate (datetime) --

        The UNIX timestamp of when the authorizer was last updated.

      • signingDisabled (boolean) --

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

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
describe_detect_mitigation_actions_task(**kwargs)

Gets information about a Device Defender ML Detect mitigation action.

Requires permission to access the DescribeDetectMitigationActionsTask action.

See also: AWS API Documentation

Request Syntax

response = client.describe_detect_mitigation_actions_task(
    taskId='string'
)
Parameters
taskId (string) --

[REQUIRED]

The unique identifier of the task.

Return type
dict
Returns
Response Syntax
{
    'taskSummary': {
        'taskId': 'string',
        'taskStatus': 'IN_PROGRESS'|'SUCCESSFUL'|'FAILED'|'CANCELED',
        'taskStartTime': datetime(2015, 1, 1),
        'taskEndTime': datetime(2015, 1, 1),
        'target': {
            'violationIds': [
                'string',
            ],
            'securityProfileName': 'string',
            'behaviorName': 'string'
        },
        'violationEventOccurrenceRange': {
            'startTime': datetime(2015, 1, 1),
            'endTime': datetime(2015, 1, 1)
        },
        'onlyActiveViolationsIncluded': True|False,
        'suppressedAlertsIncluded': True|False,
        'actionsDefinition': [
            {
                'name': 'string',
                'id': 'string',
                'roleArn': 'string',
                'actionParams': {
                    'updateDeviceCertificateParams': {
                        'action': 'DEACTIVATE'
                    },
                    'updateCACertificateParams': {
                        'action': 'DEACTIVATE'
                    },
                    'addThingsToThingGroupParams': {
                        'thingGroupNames': [
                            'string',
                        ],
                        'overrideDynamicGroups': True|False
                    },
                    'replaceDefaultPolicyVersionParams': {
                        'templateName': 'BLANK_POLICY'
                    },
                    'enableIoTLoggingParams': {
                        'roleArnForLogging': 'string',
                        'logLevel': 'DEBUG'|'INFO'|'ERROR'|'WARN'|'DISABLED'
                    },
                    'publishFindingToSnsParams': {
                        'topicArn': 'string'
                    }
                }
            },
        ],
        'taskStatistics': {
            'actionsExecuted': 123,
            'actionsSkipped': 123,
            'actionsFailed': 123
        }
    }
}

Response Structure

  • (dict) --
    • taskSummary (dict) --

      The description of a task.

      • taskId (string) --

        The unique identifier of the task.

      • taskStatus (string) --

        The status of the task.

      • taskStartTime (datetime) --

        The date the task started.

      • taskEndTime (datetime) --

        The date the task ended.

      • target (dict) --

        Specifies the ML Detect findings to which the mitigation actions are applied.

        • violationIds (list) --

          The unique identifiers of the violations.

          • (string) --
        • securityProfileName (string) --

          The name of the security profile.

        • behaviorName (string) --

          The name of the behavior.

      • violationEventOccurrenceRange (dict) --

        Specifies the time period of which violation events occurred between.

        • startTime (datetime) --

          The start date and time of a time period in which violation events occurred.

        • endTime (datetime) --

          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 (list) --

        The definition of the actions.

        • (dict) --

          Describes which changes should be applied as part of a mitigation action.

          • 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 (dict) --

            The set of parameters for this mitigation action. The parameters vary, depending on the kind of action you apply.

            • updateDeviceCertificateParams (dict) --

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

              • action (string) --

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

            • updateCACertificateParams (dict) --

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

              • action (string) --

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

            • addThingsToThingGroupParams (dict) --

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

              • thingGroupNames (list) --

                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.

                • (string) --
              • 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 (dict) --

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

              • templateName (string) --

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

            • enableIoTLoggingParams (dict) --

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

              • roleArnForLogging (string) --

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

              • logLevel (string) --

                Specifies the type of information to be logged.

            • publishFindingToSnsParams (dict) --

              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.

              • topicArn (string) --

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

      • taskStatistics (dict) --

        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.

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
describe_dimension(**kwargs)

Provides details about a dimension that is defined in your Amazon Web Services accounts.

Requires permission to access the DescribeDimension action.

See also: AWS API Documentation

Request Syntax

response = client.describe_dimension(
    name='string'
)
Parameters
name (string) --

[REQUIRED]

The unique identifier for the dimension.

Return type
dict
Returns
Response Syntax
{
    'name': 'string',
    'arn': 'string',
    'type': 'TOPIC_FILTER',
    'stringValues': [
        'string',
    ],
    'creationDate': datetime(2015, 1, 1),
    'lastModifiedDate': datetime(2015, 1, 1)
}

Response Structure

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

    • stringValues (list) --

      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.

      • (string) --
    • creationDate (datetime) --

      The date the dimension was created.

    • lastModifiedDate (datetime) --

      The date the dimension was last modified.

Exceptions

  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
describe_domain_configuration(**kwargs)

Gets summary information about a domain configuration.

Requires permission to access the DescribeDomainConfiguration action.

See also: AWS API Documentation

Request Syntax

response = client.describe_domain_configuration(
    domainConfigurationName='string'
)
Parameters
domainConfigurationName (string) --

[REQUIRED]

The name of the domain configuration.

Return type
dict
Returns
Response Syntax
{
    'domainConfigurationName': 'string',
    'domainConfigurationArn': 'string',
    'domainName': 'string',
    'serverCertificates': [
        {
            'serverCertificateArn': 'string',
            'serverCertificateStatus': 'INVALID'|'VALID',
            'serverCertificateStatusDetail': 'string'
        },
    ],
    'authorizerConfig': {
        'defaultAuthorizerName': 'string',
        'allowAuthorizerOverride': True|False
    },
    'domainConfigurationStatus': 'ENABLED'|'DISABLED',
    'serviceType': 'DATA'|'CREDENTIAL_PROVIDER'|'JOBS',
    'domainType': 'ENDPOINT'|'AWS_MANAGED'|'CUSTOMER_MANAGED',
    'lastStatusChangeDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --
    • domainConfigurationName (string) --

      The name of the domain configuration.

    • domainConfigurationArn (string) --

      The ARN of the domain configuration.

    • domainName (string) --

      The name of the domain.

    • serverCertificates (list) --

      A list containing summary information about the server certificate included in the domain configuration.

      • (dict) --

        An object that contains information about a server certificate.

        • serverCertificateArn (string) --

          The ARN of the server certificate.

        • serverCertificateStatus (string) --

          The status of the server certificate.

        • serverCertificateStatusDetail (string) --

          Details that explain the status of the server certificate.

    • authorizerConfig (dict) --

      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.

    • serviceType (string) --

      The type of service delivered by the endpoint.

    • domainType (string) --

      The type of the domain.

    • lastStatusChangeDate (datetime) --

      The date and time the domain configuration's status was last changed.

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
describe_endpoint(**kwargs)

Returns a unique endpoint specific to the Amazon Web Services account making the call.

Requires permission to access the DescribeEndpoint action.

See also: AWS API Documentation

Request Syntax

response = client.describe_endpoint(
    endpointType='string'
)
Parameters
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.

Return type
dict
Returns
Response Syntax
{
    'endpointAddress': 'string'
}

Response Structure

  • (dict) --

    The output from the DescribeEndpoint operation.

    • endpointAddress (string) --

      The endpoint. The format of the endpoint is as follows: identifier .iot.*region* .amazonaws.com.

Exceptions

  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ThrottlingException
describe_event_configurations()

Describes event configurations.

Requires permission to access the DescribeEventConfigurations action.

See also: AWS API Documentation

Request Syntax

response = client.describe_event_configurations()
Return type
dict
Returns
Response Syntax
{
    'eventConfigurations': {
        'string': {
            'Enabled': True|False
        }
    },
    'creationDate': datetime(2015, 1, 1),
    'lastModifiedDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --
    • eventConfigurations (dict) --

      The event configurations.

      • (string) --
        • (dict) --

          Configuration.

          • Enabled (boolean) --

            True to enable the configuration.

    • creationDate (datetime) --

      The creation date of the event configuration.

    • lastModifiedDate (datetime) --

      The date the event configurations were last modified.

Exceptions

  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ThrottlingException
describe_fleet_metric(**kwargs)

Gets information about the specified fleet metric.

Requires permission to access the DescribeFleetMetric action.

See also: AWS API Documentation

Request Syntax

response = client.describe_fleet_metric(
    metricName='string'
)
Parameters
metricName (string) --

[REQUIRED]

The name of the fleet metric to describe.

Return type
dict
Returns
Response Syntax
{
    'metricName': 'string',
    'queryString': 'string',
    'aggregationType': {
        'name': 'Statistics'|'Percentiles'|'Cardinality',
        'values': [
            'string',
        ]
    },
    'period': 123,
    'aggregationField': 'string',
    'description': 'string',
    'queryVersion': 'string',
    'indexName': 'string',
    'creationDate': datetime(2015, 1, 1),
    'lastModifiedDate': datetime(2015, 1, 1),
    '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',
    'version': 123,
    'metricArn': 'string'
}

Response Structure

  • (dict) --
    • metricName (string) --

      The name of the fleet metric to describe.

    • queryString (string) --

      The search query string.

    • aggregationType (dict) --

      The type of the aggregation query.

      • name (string) --

        The name of the aggregation type.

      • values (list) --

        A list of the values of aggregation types.

        • (string) --
    • 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 (datetime) --

      The date when the fleet metric is created.

    • lastModifiedDate (datetime) --

      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 .

    • version (integer) --

      The version of the fleet metric.

    • metricArn (string) --

      The ARN of the fleet metric to describe.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
describe_index(**kwargs)

Describes a search index.

Requires permission to access the DescribeIndex action.

See also: AWS API Documentation

Request Syntax

response = client.describe_index(
    indexName='string'
)
Parameters
indexName (string) --

[REQUIRED]

The index name.

Return type
dict
Returns
Response Syntax
{
    'indexName': 'string',
    'indexStatus': 'ACTIVE'|'BUILDING'|'REBUILDING',
    'schema': 'string'
}

Response Structure

  • (dict) --
    • indexName (string) --

      The index name.

    • indexStatus (string) --

      The index status.

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

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
describe_job(**kwargs)

Describes a job.

Requires permission to access the DescribeJob action.

See also: AWS API Documentation

Request Syntax

response = client.describe_job(
    jobId='string'
)
Parameters
jobId (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'documentSource': 'string',
    'job': {
        'jobArn': 'string',
        'jobId': 'string',
        'targetSelection': 'CONTINUOUS'|'SNAPSHOT',
        'status': 'IN_PROGRESS'|'CANCELED'|'COMPLETED'|'DELETION_IN_PROGRESS',
        'forceCanceled': True|False,
        'reasonCode': 'string',
        'comment': 'string',
        'targets': [
            'string',
        ],
        'description': 'string',
        'presignedUrlConfig': {
            'roleArn': 'string',
            'expiresInSec': 123
        },
        'jobExecutionsRolloutConfig': {
            'maximumPerMinute': 123,
            'exponentialRate': {
                'baseRatePerMinute': 123,
                'incrementFactor': 123.0,
                'rateIncreaseCriteria': {
                    'numberOfNotifiedThings': 123,
                    'numberOfSucceededThings': 123
                }
            }
        },
        'abortConfig': {
            'criteriaList': [
                {
                    'failureType': 'FAILED'|'REJECTED'|'TIMED_OUT'|'ALL',
                    'action': 'CANCEL',
                    'thresholdPercentage': 123.0,
                    'minNumberOfExecutedThings': 123
                },
            ]
        },
        'createdAt': datetime(2015, 1, 1),
        'lastUpdatedAt': datetime(2015, 1, 1),
        'completedAt': datetime(2015, 1, 1),
        'jobProcessDetails': {
            'processingTargets': [
                'string',
            ],
            'numberOfCanceledThings': 123,
            'numberOfSucceededThings': 123,
            'numberOfFailedThings': 123,
            'numberOfRejectedThings': 123,
            'numberOfQueuedThings': 123,
            'numberOfInProgressThings': 123,
            'numberOfRemovedThings': 123,
            'numberOfTimedOutThings': 123
        },
        'timeoutConfig': {
            'inProgressTimeoutInMinutes': 123
        },
        'namespaceId': 'string',
        'jobTemplateArn': 'string',
        'documentParameters': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --
    • documentSource (string) --

      An S3 link to the job document.

    • job (dict) --

      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.

      • status (string) --

        The status of the job, one of IN_PROGRESS , CANCELED , DELETION_IN_PROGRESS or COMPLETED .

      • 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 (list) --

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

        • (string) --
      • description (string) --

        A short text description of the job.

      • presignedUrlConfig (dict) --

        Configuration for pre-signed S3 URLs.

        • roleArn (string) --

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

        • expiresInSec (integer) --

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

      • jobExecutionsRolloutConfig (dict) --

        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 (dict) --

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

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

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

          • rateIncreaseCriteria (dict) --

            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 (dict) --

        Configuration for criteria to abort the job.

        • criteriaList (list) --

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

          • (dict) --

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

            • failureType (string) --

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

            • action (string) --

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

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

            • minNumberOfExecutedThings (integer) --

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

      • createdAt (datetime) --

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

      • lastUpdatedAt (datetime) --

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

      • completedAt (datetime) --

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

      • jobProcessDetails (dict) --

        Details about the job process.

        • processingTargets (list) --

          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.

          • (string) --
        • 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 (dict) --

        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 in public preview.

      • jobTemplateArn (string) --

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

      • documentParameters (dict) --

        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.

        • (string) --
          • (string) --

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.ServiceUnavailableException
describe_job_execution(**kwargs)

Describes a job execution.

Requires permission to access the DescribeJobExecution action.

See also: AWS API Documentation

Request Syntax

response = client.describe_job_execution(
    jobId='string',
    thingName='string',
    executionNumber=123
)
Parameters
  • jobId (string) --

    [REQUIRED]

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

  • thingName (string) --

    [REQUIRED]

    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.
Return type

dict

Returns

Response Syntax

{
    'execution': {
        'jobId': 'string',
        'status': 'QUEUED'|'IN_PROGRESS'|'SUCCEEDED'|'FAILED'|'TIMED_OUT'|'REJECTED'|'REMOVED'|'CANCELED',
        'forceCanceled': True|False,
        'statusDetails': {
            'detailsMap': {
                'string': 'string'
            }
        },
        'thingArn': 'string',
        'queuedAt': datetime(2015, 1, 1),
        'startedAt': datetime(2015, 1, 1),
        'lastUpdatedAt': datetime(2015, 1, 1),
        'executionNumber': 123,
        'versionNumber': 123,
        'approximateSecondsBeforeTimedOut': 123
    }
}

Response Structure

  • (dict) --

    • execution (dict) --

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

      • forceCanceled (boolean) --

        Will be true if the job execution was canceled with the optional force parameter set to true .

      • statusDetails (dict) --

        A collection of name/value pairs that describe the status of the job execution.

        • detailsMap (dict) --

          The job execution status.

          • (string) --
            • (string) --
      • thingArn (string) --

        The ARN of the thing on which the job execution is running.

      • queuedAt (datetime) --

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

      • startedAt (datetime) --

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

      • lastUpdatedAt (datetime) --

        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.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.ServiceUnavailableException
describe_job_template(**kwargs)

Returns information about a job template.

See also: AWS API Documentation

Request Syntax

response = client.describe_job_template(
    jobTemplateId='string'
)
Parameters
jobTemplateId (string) --

[REQUIRED]

The unique identifier of the job template.

Return type
dict
Returns
Response Syntax
{
    'jobTemplateArn': 'string',
    'jobTemplateId': 'string',
    'description': 'string',
    'documentSource': 'string',
    'document': 'string',
    'createdAt': datetime(2015, 1, 1),
    'presignedUrlConfig': {
        'roleArn': 'string',
        'expiresInSec': 123
    },
    'jobExecutionsRolloutConfig': {
        'maximumPerMinute': 123,
        'exponentialRate': {
            'baseRatePerMinute': 123,
            'incrementFactor': 123.0,
            'rateIncreaseCriteria': {
                'numberOfNotifiedThings': 123,
                'numberOfSucceededThings': 123
            }
        }
    },
    'abortConfig': {
        'criteriaList': [
            {
                'failureType': 'FAILED'|'REJECTED'|'TIMED_OUT'|'ALL',
                'action': 'CANCEL',
                'thresholdPercentage': 123.0,
                'minNumberOfExecutedThings': 123
            },
        ]
    },
    'timeoutConfig': {
        'inProgressTimeoutInMinutes': 123
    }
}

Response Structure

  • (dict) --
    • 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 (datetime) --

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

    • presignedUrlConfig (dict) --

      Configuration for pre-signed S3 URLs.

      • roleArn (string) --

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

      • expiresInSec (integer) --

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

    • jobExecutionsRolloutConfig (dict) --

      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 (dict) --

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

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

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

        • rateIncreaseCriteria (dict) --

          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 (dict) --

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

      • criteriaList (list) --

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

        • (dict) --

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

          • failureType (string) --

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

          • action (string) --

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

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

          • minNumberOfExecutedThings (integer) --

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

    • timeoutConfig (dict) --

      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.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
describe_managed_job_template(**kwargs)

View details of a managed job template.

See also: AWS API Documentation

Request Syntax

response = client.describe_managed_job_template(
    templateName='string',
    templateVersion='string'
)
Parameters
  • templateName (string) --

    [REQUIRED]

    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.
Return type

dict

Returns

Response Syntax

{
    'templateName': 'string',
    'templateArn': 'string',
    'description': 'string',
    'templateVersion': 'string',
    'environments': [
        'string',
    ],
    'documentParameters': [
        {
            'key': 'string',
            'description': 'string',
            'regex': 'string',
            'example': 'string',
            'optional': True|False
        },
    ],
    'document': 'string'
}

Response Structure

  • (dict) --

    • 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 (list) --

      A list of environments that are supported with the managed job template.

      • (string) --
    • documentParameters (list) --

      A map of key-value pairs that you can use as guidance to specify the inputs for creating a job from a managed template.

      • (dict) --

        A map of key-value pairs containing 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.

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

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalServerException
describe_mitigation_action(**kwargs)

Gets information about a mitigation action.

Requires permission to access the DescribeMitigationAction action.

See also: AWS API Documentation

Request Syntax

response = client.describe_mitigation_action(
    actionName='string'
)
Parameters
actionName (string) --

[REQUIRED]

The friendly name that uniquely identifies the mitigation action.

Return type
dict
Returns
Response Syntax
{
    'actionName': 'string',
    'actionType': 'UPDATE_DEVICE_CERTIFICATE'|'UPDATE_CA_CERTIFICATE'|'ADD_THINGS_TO_THING_GROUP'|'REPLACE_DEFAULT_POLICY_VERSION'|'ENABLE_IOT_LOGGING'|'PUBLISH_FINDING_TO_SNS',
    'actionArn': 'string',
    'actionId': 'string',
    'roleArn': 'string',
    'actionParams': {
        'updateDeviceCertificateParams': {
            'action': 'DEACTIVATE'
        },
        'updateCACertificateParams': {
            'action': 'DEACTIVATE'
        },
        'addThingsToThingGroupParams': {
            'thingGroupNames': [
                'string',
            ],
            'overrideDynamicGroups': True|False
        },
        'replaceDefaultPolicyVersionParams': {
            'templateName': 'BLANK_POLICY'
        },
        'enableIoTLoggingParams': {
            'roleArnForLogging': 'string',
            'logLevel': 'DEBUG'|'INFO'|'ERROR'|'WARN'|'DISABLED'
        },
        'publishFindingToSnsParams': {
            'topicArn': 'string'
        }
    },
    'creationDate': datetime(2015, 1, 1),
    'lastModifiedDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --
    • actionName (string) --

      The friendly name that uniquely identifies the mitigation action.

    • actionType (string) --

      The type of mitigation action.

    • 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 (dict) --

      Parameters that control how the mitigation action is applied, specific to the type of mitigation action.

      • updateDeviceCertificateParams (dict) --

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

        • action (string) --

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

      • updateCACertificateParams (dict) --

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

        • action (string) --

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

      • addThingsToThingGroupParams (dict) --

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

        • thingGroupNames (list) --

          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.

          • (string) --
        • 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 (dict) --

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

        • templateName (string) --

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

      • enableIoTLoggingParams (dict) --

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

        • roleArnForLogging (string) --

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

        • logLevel (string) --

          Specifies the type of information to be logged.

      • publishFindingToSnsParams (dict) --

        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.

        • topicArn (string) --

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

    • creationDate (datetime) --

      The date and time when the mitigation action was added to your Amazon Web Services accounts.

    • lastModifiedDate (datetime) --

      The date and time when the mitigation action was last changed.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
describe_provisioning_template(**kwargs)

Returns information about a fleet provisioning template.

Requires permission to access the DescribeProvisioningTemplate action.

See also: AWS API Documentation

Request Syntax

response = client.describe_provisioning_template(
    templateName='string'
)
Parameters
templateName (string) --

[REQUIRED]

The name of the fleet provisioning template.

Return type
dict
Returns
Response Syntax
{
    'templateArn': 'string',
    'templateName': 'string',
    'description': 'string',
    'creationDate': datetime(2015, 1, 1),
    'lastModifiedDate': datetime(2015, 1, 1),
    'defaultVersionId': 123,
    'templateBody': 'string',
    'enabled': True|False,
    'provisioningRoleArn': 'string',
    'preProvisioningHook': {
        'payloadVersion': 'string',
        'targetArn': 'string'
    }
}

Response Structure

  • (dict) --
    • templateArn (string) --

      The ARN of the fleet provisioning template.

    • templateName (string) --

      The name of the fleet provisioning template.

    • description (string) --

      The description of the fleet provisioning template.

    • creationDate (datetime) --

      The date when the fleet provisioning template was created.

    • lastModifiedDate (datetime) --

      The date when the fleet provisioning template was last modified.

    • defaultVersionId (integer) --

      The default fleet template version ID.

    • templateBody (string) --

      The JSON formatted contents of the fleet provisioning template.

    • enabled (boolean) --

      True if the fleet 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 (dict) --

      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.
      • targetArn (string) --

        The ARN of the target function.

        Note: Only Lambda functions are currently supported.

Exceptions

  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
describe_provisioning_template_version(**kwargs)

Returns information about a fleet provisioning template version.

Requires permission to access the DescribeProvisioningTemplateVersion action.

See also: AWS API Documentation

Request Syntax

response = client.describe_provisioning_template_version(
    templateName='string',
    versionId=123
)
Parameters
  • templateName (string) --

    [REQUIRED]

    The template name.

  • versionId (integer) --

    [REQUIRED]

    The fleet provisioning template version ID.

Return type

dict

Returns

Response Syntax

{
    'versionId': 123,
    'creationDate': datetime(2015, 1, 1),
    'templateBody': 'string',
    'isDefaultVersion': True|False
}

Response Structure

  • (dict) --

    • versionId (integer) --

      The fleet provisioning template version ID.

    • creationDate (datetime) --

      The date when the fleet provisioning template version was created.

    • templateBody (string) --

      The JSON formatted contents of the fleet provisioning template version.

    • isDefaultVersion (boolean) --

      True if the fleet provisioning template version is the default version.

Exceptions

  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.UnauthorizedException
describe_role_alias(**kwargs)

Describes a role alias.

Requires permission to access the DescribeRoleAlias action.

See also: AWS API Documentation

Request Syntax

response = client.describe_role_alias(
    roleAlias='string'
)
Parameters
roleAlias (string) --

[REQUIRED]

The role alias to describe.

Return type
dict
Returns
Response Syntax
{
    'roleAliasDescription': {
        'roleAlias': 'string',
        'roleAliasArn': 'string',
        'roleArn': 'string',
        'owner': 'string',
        'credentialDurationSeconds': 123,
        'creationDate': datetime(2015, 1, 1),
        'lastModifiedDate': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --
    • roleAliasDescription (dict) --

      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 (datetime) --

        The UNIX timestamp of when the role alias was created.

      • lastModifiedDate (datetime) --

        The UNIX timestamp of when the role alias was last modified.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
describe_scheduled_audit(**kwargs)

Gets information about a scheduled audit.

Requires permission to access the DescribeScheduledAudit action.

See also: AWS API Documentation

Request Syntax

response = client.describe_scheduled_audit(
    scheduledAuditName='string'
)
Parameters
scheduledAuditName (string) --

[REQUIRED]

The name of the scheduled audit whose information you want to get.

Return type
dict
Returns
Response Syntax
{
    'frequency': 'DAILY'|'WEEKLY'|'BIWEEKLY'|'MONTHLY',
    'dayOfMonth': 'string',
    'dayOfWeek': 'SUN'|'MON'|'TUE'|'WED'|'THU'|'FRI'|'SAT',
    'targetCheckNames': [
        'string',
    ],
    'scheduledAuditName': 'string',
    'scheduledAuditArn': 'string'
}

Response Structure

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

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

    • targetCheckNames (list) --

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

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

    • scheduledAuditName (string) --

      The name of the scheduled audit.

    • scheduledAuditArn (string) --

      The ARN of the scheduled audit.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
describe_security_profile(**kwargs)

Gets information about a Device Defender security profile.

Requires permission to access the DescribeSecurityProfile action.

See also: AWS API Documentation

Request Syntax

response = client.describe_security_profile(
    securityProfileName='string'
)
Parameters
securityProfileName (string) --

[REQUIRED]

The name of the security profile whose information you want to get.

Return type
dict
Returns
Response Syntax
{
    'securityProfileName': 'string',
    'securityProfileArn': 'string',
    'securityProfileDescription': 'string',
    'behaviors': [
        {
            'name': 'string',
            'metric': 'string',
            'metricDimension': {
                'dimensionName': 'string',
                'operator': 'IN'|'NOT_IN'
            },
            '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',
                'value': {
                    'count': 123,
                    'cidrs': [
                        'string',
                    ],
                    'ports': [
                        123,
                    ],
                    'number': 123.0,
                    'numbers': [
                        123.0,
                    ],
                    'strings': [
                        'string',
                    ]
                },
                'durationSeconds': 123,
                'consecutiveDatapointsToAlarm': 123,
                'consecutiveDatapointsToClear': 123,
                'statisticalThreshold': {
                    'statistic': 'string'
                },
                'mlDetectionConfig': {
                    'confidenceLevel': 'LOW'|'MEDIUM'|'HIGH'
                }
            },
            'suppressAlerts': True|False
        },
    ],
    'alertTargets': {
        'string': {
            'alertTargetArn': 'string',
            'roleArn': 'string'
        }
    },
    'additionalMetricsToRetain': [
        'string',
    ],
    'additionalMetricsToRetainV2': [
        {
            'metric': 'string',
            'metricDimension': {
                'dimensionName': 'string',
                'operator': 'IN'|'NOT_IN'
            }
        },
    ],
    'version': 123,
    'creationDate': datetime(2015, 1, 1),
    'lastModifiedDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --
    • 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 (list) --

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

      • (dict) --

        A Device Defender security profile behavior.

        • name (string) --

          The name you've given to the behavior.

        • metric (string) --

          What is measured by the behavior.

        • metricDimension (dict) --

          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.

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

        • criteria (dict) --

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

          • comparisonOperator (string) --

            The operator that relates the thing measured (metric ) to the criteria (containing a value or statisticalThreshold ). 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
          • value (dict) --

            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 (list) --

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

              • (string) --
            • ports (list) --

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

              • (integer) --
            • number (float) --

              The numeral value of a metric.

            • numbers (list) --

              The numeral values of a metric.

              • (float) --
            • strings (list) --

              The string values of a metric.

              • (string) --
          • 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 (dict) --

            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 (dict) --

            The configuration of an ML Detect

            • confidenceLevel (string) --

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

        • suppressAlerts (boolean) --

          Suppresses alerts.

    • alertTargets (dict) --

      Where the alerts are sent. (Alerts are always sent to the console.)

      • (string) --

        The type of alert target: one of "SNS".

        • (dict) --

          A structure containing the alert target ARN and the role ARN.

          • alertTargetArn (string) --

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

          • roleArn (string) --

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

    • additionalMetricsToRetain (list) --
      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.

      • (string) --
    • additionalMetricsToRetainV2 (list) --

      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.

      • (dict) --

        The metric you want to retain. Dimensions are optional.

        • metric (string) --

          What is measured by the behavior.

        • metricDimension (dict) --

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

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

    • version (integer) --

      The version of the security profile. A new version is generated whenever the security profile is updated.

    • creationDate (datetime) --

      The time the security profile was created.

    • lastModifiedDate (datetime) --

      The time the security profile was last modified.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
describe_stream(**kwargs)

Gets information about a stream.

Requires permission to access the DescribeStream action.

See also: AWS API Documentation

Request Syntax

response = client.describe_stream(
    streamId='string'
)
Parameters
streamId (string) --

[REQUIRED]

The stream ID.

Return type
dict
Returns
Response Syntax
{
    'streamInfo': {
        'streamId': 'string',
        'streamArn': 'string',
        'streamVersion': 123,
        'description': 'string',
        'files': [
            {
                'fileId': 123,
                's3Location': {
                    'bucket': 'string',
                    'key': 'string',
                    'version': 'string'
                }
            },
        ],
        'createdAt': datetime(2015, 1, 1),
        'lastUpdatedAt': datetime(2015, 1, 1),
        'roleArn': 'string'
    }
}

Response Structure

  • (dict) --
    • streamInfo (dict) --

      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 (list) --

        The files to stream.

        • (dict) --

          Represents a file to stream.

          • fileId (integer) --

            The file ID.

          • s3Location (dict) --

            The location of the file in S3.

            • bucket (string) --

              The S3 bucket.

            • key (string) --

              The S3 key.

            • version (string) --

              The S3 bucket version.

      • createdAt (datetime) --

        The date when the stream was created.

      • lastUpdatedAt (datetime) --

        The date when the stream was last updated.

      • roleArn (string) --

        An IAM role IoT assumes to access your S3 files.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
describe_thing(**kwargs)

Gets information about the specified thing.

Requires permission to access the DescribeThing action.

See also: AWS API Documentation

Request Syntax

response = client.describe_thing(
    thingName='string'
)
Parameters
thingName (string) --

[REQUIRED]

The name of the thing.

Return type
dict
Returns
Response Syntax
{
    'defaultClientId': 'string',
    'thingName': 'string',
    'thingId': 'string',
    'thingArn': 'string',
    'thingTypeName': 'string',
    'attributes': {
        'string': 'string'
    },
    'version': 123,
    'billingGroupName': 'string'
}

Response Structure

  • (dict) --

    The output from the DescribeThing operation.

    • 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 (dict) --

      The thing attributes.

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

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
describe_thing_group(**kwargs)

Describe a thing group.

Requires permission to access the DescribeThingGroup action.

See also: AWS API Documentation

Request Syntax

response = client.describe_thing_group(
    thingGroupName='string'
)
Parameters
thingGroupName (string) --

[REQUIRED]

The name of the thing group.

Return type
dict
Returns
Response Syntax
{
    'thingGroupName': 'string',
    'thingGroupId': 'string',
    'thingGroupArn': 'string',
    'version': 123,
    'thingGroupProperties': {
        'thingGroupDescription': 'string',
        'attributePayload': {
            'attributes': {
                'string': 'string'
            },
            'merge': True|False
        }
    },
    'thingGroupMetadata': {
        'parentGroupName': 'string',
        'rootToParentThingGroups': [
            {
                'groupName': 'string',
                'groupArn': 'string'
            },
        ],
        'creationDate': datetime(2015, 1, 1)
    },
    'indexName': 'string',
    'queryString': 'string',
    'queryVersion': 'string',
    'status': 'ACTIVE'|'BUILDING'|'REBUILDING'
}

Response Structure

  • (dict) --
    • 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 (dict) --

      The thing group properties.

      • thingGroupDescription (string) --

        The thing group description.

      • attributePayload (dict) --

        The thing group attributes in JSON format.

        • attributes (dict) --

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

          {\"attributes\":{\"string1\":\"string2\"}}
          • (string) --
            • (string) --
        • 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 (dict) --

      Thing group metadata.

      • parentGroupName (string) --

        The parent thing group name.

      • rootToParentThingGroups (list) --

        The root parent thing group.

        • (dict) --

          The name and ARN of a group.

          • groupName (string) --

            The group name.

          • groupArn (string) --

            The group ARN.

      • creationDate (datetime) --

        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.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
describe_thing_registration_task(**kwargs)

Describes a bulk thing provisioning task.

Requires permission to access the DescribeThingRegistrationTask action.

See also: AWS API Documentation

Request Syntax

response = client.describe_thing_registration_task(
    taskId='string'
)
Parameters
taskId (string) --

[REQUIRED]

The task ID.

Return type
dict
Returns
Response Syntax
{
    'taskId': 'string',
    'creationDate': datetime(2015, 1, 1),
    'lastModifiedDate': datetime(2015, 1, 1),
    'templateBody': 'string',
    'inputFileBucket': 'string',
    'inputFileKey': 'string',
    'roleArn': 'string',
    'status': 'InProgress'|'Completed'|'Failed'|'Cancelled'|'Cancelling',
    'message': 'string',
    'successCount': 123,
    'failureCount': 123,
    'percentageProgress': 123
}

Response Structure

  • (dict) --
    • taskId (string) --

      The task ID.

    • creationDate (datetime) --

      The task creation date.

    • lastModifiedDate (datetime) --

      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.

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

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
describe_thing_type(**kwargs)

Gets information about the specified thing type.

Requires permission to access the DescribeThingType action.

See also: AWS API Documentation

Request Syntax

response = client.describe_thing_type(
    thingTypeName='string'
)
Parameters
thingTypeName (string) --

[REQUIRED]

The name of the thing type.

Return type
dict
Returns
Response Syntax
{
    'thingTypeName': 'string',
    'thingTypeId': 'string',
    'thingTypeArn': 'string',
    'thingTypeProperties': {
        'thingTypeDescription': 'string',
        'searchableAttributes': [
            'string',
        ]
    },
    'thingTypeMetadata': {
        'deprecated': True|False,
        'deprecationDate': datetime(2015, 1, 1),
        'creationDate': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    The output for the DescribeThingType operation.

    • thingTypeName (string) --

      The name of the thing type.

    • thingTypeId (string) --

      The thing type ID.

    • thingTypeArn (string) --

      The thing type ARN.

    • thingTypeProperties (dict) --

      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 (list) --

        A list of searchable thing attribute names.

        • (string) --
    • thingTypeMetadata (dict) --

      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 (datetime) --

        The date and time when the thing type was deprecated.

      • creationDate (datetime) --

        The date and time when the thing type was created.

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
detach_policy(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.detach_policy(
    policyName='string',
    target='string'
)
Parameters
  • policyName (string) --

    [REQUIRED]

    The policy to detach.

  • target (string) --

    [REQUIRED]

    The target from which the policy will be detached.

Returns

None

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.LimitExceededException
detach_principal_policy(**kwargs)

Removes the specified policy from the specified certificate.

Note

This action is deprecated. Please use DetachPolicy instead.

Requires permission to access the DetachPrincipalPolicy action.

Danger

This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.

See also: AWS API Documentation

Request Syntax

response = client.detach_principal_policy(
    policyName='string',
    principal='string'
)
Parameters
  • policyName (string) --

    [REQUIRED]

    The name of the policy to detach.

  • principal (string) --

    [REQUIRED]

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

Returns

None

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
detach_security_profile(**kwargs)

Disassociates a Device Defender security profile from a thing group or from this account.

Requires permission to access the DetachSecurityProfile action.

See also: AWS API Documentation

Request Syntax

response = client.detach_security_profile(
    securityProfileName='string',
    securityProfileTargetArn='string'
)
Parameters
  • securityProfileName (string) --

    [REQUIRED]

    The security profile that is detached.

  • securityProfileTargetArn (string) --

    [REQUIRED]

    The ARN of the thing group from which the security profile is detached.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
detach_thing_principal(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.detach_thing_principal(
    thingName='string',
    principal='string'
)
Parameters
  • thingName (string) --

    [REQUIRED]

    The name of the thing.

  • principal (string) --

    [REQUIRED]

    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.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

    The output from the DetachThingPrincipal operation.

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
disable_topic_rule(**kwargs)

Disables the rule.

Requires permission to access the DisableTopicRule action.

See also: AWS API Documentation

Request Syntax

response = client.disable_topic_rule(
    ruleName='string'
)
Parameters
ruleName (string) --

[REQUIRED]

The name of the rule to disable.

Returns
None

Exceptions

  • IoT.Client.exceptions.InternalException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ConflictingResourceUpdateException
enable_topic_rule(**kwargs)

Enables the rule.

Requires permission to access the EnableTopicRule action.

See also: AWS API Documentation

Request Syntax

response = client.enable_topic_rule(
    ruleName='string'
)
Parameters
ruleName (string) --

[REQUIRED]

The name of the topic rule to enable.

Returns
None

Exceptions

  • IoT.Client.exceptions.InternalException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ConflictingResourceUpdateException
get_behavior_model_training_summaries(**kwargs)

Returns a Device Defender's ML Detect Security Profile training model's status.

Requires permission to access the GetBehaviorModelTrainingSummaries action.

See also: AWS API Documentation

Request Syntax

response = client.get_behavior_model_training_summaries(
    securityProfileName='string',
    maxResults=123,
    nextToken='string'
)
Parameters
  • securityProfileName (string) -- The name of the security profile.
  • maxResults (integer) -- The maximum number of results to return at one time. The default is 25.
  • nextToken (string) -- The token for the next set of results.
Return type

dict

Returns

Response Syntax

{
    'summaries': [
        {
            'securityProfileName': 'string',
            'behaviorName': 'string',
            'trainingDataCollectionStartDate': datetime(2015, 1, 1),
            'modelStatus': 'PENDING_BUILD'|'ACTIVE'|'EXPIRED',
            'datapointsCollectionPercentage': 123.0,
            'lastModelRefreshDate': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • summaries (list) --

      A list of all ML Detect behaviors and their model status for a given Security Profile.

      • (dict) --

        The summary of an ML Detect behavior model.

        • securityProfileName (string) --

          The name of the security profile.

        • behaviorName (string) --

          The name of the behavior.

        • trainingDataCollectionStartDate (datetime) --

          The date a training model started collecting data.

        • modelStatus (string) --

          The status of the behavior model.

        • datapointsCollectionPercentage (float) --

          The percentage of datapoints collected.

        • lastModelRefreshDate (datetime) --

          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.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
get_buckets_aggregation(**kwargs)

Aggregates on indexed data with search queries pertaining to particular fields.

Requires permission to access the GetBucketsAggregation action.

See also: AWS API Documentation

Request Syntax

response = client.get_buckets_aggregation(
    indexName='string',
    queryString='string',
    aggregationField='string',
    queryVersion='string',
    bucketsAggregationType={
        'termsAggregation': {
            'maxBuckets': 123
        }
    }
)
Parameters
  • indexName (string) -- The name of the index to search.
  • queryString (string) --

    [REQUIRED]

    The search query string.

  • aggregationField (string) --

    [REQUIRED]

    The aggregation field.

  • queryVersion (string) -- The version of the query.
  • bucketsAggregationType (dict) --

    [REQUIRED]

    The basic control of the response shape and the bucket aggregation type to perform.

    • termsAggregation (dict) --

      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.

Return type

dict

Returns

Response Syntax

{
    'totalCount': 123,
    'buckets': [
        {
            'keyValue': 'string',
            'count': 123
        },
    ]
}

Response Structure

  • (dict) --

    • totalCount (integer) --

      The total number of things that fit the query string criteria.

    • buckets (list) --

      The main part of the response with a list of buckets. Each bucket contains a keyValue and a count .

      keyValue : The aggregation field value counted for the particular bucket.

      count : The number of documents that have that value.

      • (dict) --

        A count of documents that meets a specific aggregation criteria.

        • keyValue (string) --

          The value counted for the particular bucket.

        • count (integer) --

          The number of documents that have the value counted for the particular bucket.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidQueryException
  • IoT.Client.exceptions.InvalidAggregationException
  • IoT.Client.exceptions.IndexNotReadyException
get_cardinality(**kwargs)

Returns the approximate count of unique values that match the query.

Requires permission to access the GetCardinality action.

See also: AWS API Documentation

Request Syntax

response = client.get_cardinality(
    indexName='string',
    queryString='string',
    aggregationField='string',
    queryVersion='string'
)
Parameters
  • indexName (string) -- The name of the index to search.
  • queryString (string) --

    [REQUIRED]

    The search query string.

  • aggregationField (string) -- The field to aggregate.
  • queryVersion (string) -- The query version.
Return type

dict

Returns

Response Syntax

{
    'cardinality': 123
}

Response Structure

  • (dict) --

    • cardinality (integer) --

      The approximate count of unique values that match the query.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidQueryException
  • IoT.Client.exceptions.InvalidAggregationException
  • IoT.Client.exceptions.IndexNotReadyException
get_effective_policies(**kwargs)

Gets a list of the policies that have an effect on the authorization behavior of the specified device when it connects to the IoT device gateway.

Requires permission to access the GetEffectivePolicies action.

See also: AWS API Documentation

Request Syntax

response = client.get_effective_policies(
    principal='string',
    cognitoIdentityPoolId='string',
    thingName='string'
)
Parameters
  • 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 ).
  • cognitoIdentityPoolId (string) -- The Cognito identity pool ID.
  • thingName (string) -- The thing name.
Return type

dict

Returns

Response Syntax

{
    'effectivePolicies': [
        {
            'policyName': 'string',
            'policyArn': 'string',
            'policyDocument': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • effectivePolicies (list) --

      The effective policies.

      • (dict) --

        The policy that has the effect on the authorization results.

        • policyName (string) --

          The policy name.

        • policyArn (string) --

          The policy ARN.

        • policyDocument (string) --

          The IAM policy document.

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.LimitExceededException
get_indexing_configuration()

Gets the indexing configuration.

Requires permission to access the GetIndexingConfiguration action.

See also: AWS API Documentation

Request Syntax

response = client.get_indexing_configuration()
Return type
dict
Returns
Response Syntax
{
    'thingIndexingConfiguration': {
        'thingIndexingMode': 'OFF'|'REGISTRY'|'REGISTRY_AND_SHADOW',
        'thingConnectivityIndexingMode': 'OFF'|'STATUS',
        'deviceDefenderIndexingMode': 'OFF'|'VIOLATIONS',
        'namedShadowIndexingMode': 'OFF'|'ON',
        'managedFields': [
            {
                'name': 'string',
                'type': 'Number'|'String'|'Boolean'
            },
        ],
        'customFields': [
            {
                'name': 'string',
                'type': 'Number'|'String'|'Boolean'
            },
        ]
    },
    'thingGroupIndexingConfiguration': {
        'thingGroupIndexingMode': 'OFF'|'ON',
        'managedFields': [
            {
                'name': 'string',
                'type': 'Number'|'String'|'Boolean'
            },
        ],
        'customFields': [
            {
                'name': 'string',
                'type': 'Number'|'String'|'Boolean'
            },
        ]
    }
}

Response Structure

  • (dict) --
    • thingIndexingConfiguration (dict) --

      Thing indexing configuration.

      • thingIndexingMode (string) --

        Thing indexing mode. Valid values are:

        • REGISTRY – Your thing index contains registry data only.
        • REGISTRY_AND_SHADOW - Your thing index contains registry and shadow data.
        • OFF - Thing indexing is disabled.
      • thingConnectivityIndexingMode (string) --

        Thing connectivity indexing mode. Valid values are:

        • STATUS – Your thing index contains connectivity status. To enable thing connectivity indexing, thingIndexMode must not be set to OFF.
        • OFF - Thing connectivity status indexing is disabled.
      • deviceDefenderIndexingMode (string) --

        Device Defender indexing mode. Valid values are:

        • VIOLATIONS – Your thing index contains Device Defender violations. To enable Device Defender indexing, deviceDefenderIndexingMode must not be set to OFF.
        • OFF - Device Defender indexing is disabled.

        For more information about Device Defender violations, see Device Defender Detect.

      • namedShadowIndexingMode (string) --

        Named shadow indexing mode. Valid values are:

        • ON – Your thing index contains named shadow. To enable thing named shadow indexing, namedShadowIndexingMode must not be set to OFF.
        • OFF - Named shadow indexing is disabled.

        For more information about Shadows, see IoT Device Shadow service.

      • managedFields (list) --

        Contains fields that are indexed and whose types are already known by the Fleet Indexing service.

        • (dict) --

          Describes the name and data type at a field.

          • name (string) --

            The name of the field.

          • type (string) --

            The data type of the field.

      • customFields (list) --

        Contains custom field names and their data type.

        • (dict) --

          Describes the name and data type at a field.

          • name (string) --

            The name of the field.

          • type (string) --

            The data type of the field.

    • thingGroupIndexingConfiguration (dict) --

      The index configuration.

      • thingGroupIndexingMode (string) --

        Thing group indexing mode.

      • managedFields (list) --

        Contains fields that are indexed and whose types are already known by the Fleet Indexing service.

        • (dict) --

          Describes the name and data type at a field.

          • name (string) --

            The name of the field.

          • type (string) --

            The data type of the field.

      • customFields (list) --

        A list of thing group fields to index. This list cannot contain any managed fields. Use the GetIndexingConfiguration API to get a list of managed fields.

        Contains custom field names and their data type.

        • (dict) --

          Describes the name and data type at a field.

          • name (string) --

            The name of the field.

          • type (string) --

            The data type of the field.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
get_job_document(**kwargs)

Gets a job document.

Requires permission to access the GetJobDocument action.

See also: AWS API Documentation

Request Syntax

response = client.get_job_document(
    jobId='string'
)
Parameters
jobId (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'document': 'string'
}

Response Structure

  • (dict) --
    • document (string) --

      The job document content.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.ServiceUnavailableException
get_logging_options()

Gets the logging options.

NOTE: use of this command is not recommended. Use GetV2LoggingOptions instead.

Requires permission to access the GetLoggingOptions action.

See also: AWS API Documentation

Request Syntax

response = client.get_logging_options()
Return type
dict
Returns
Response Syntax
{
    'roleArn': 'string',
    'logLevel': 'DEBUG'|'INFO'|'ERROR'|'WARN'|'DISABLED'
}

Response Structure

  • (dict) --

    The output from the GetLoggingOptions operation.

    • roleArn (string) --

      The ARN of the IAM role that grants access.

    • logLevel (string) --

      The logging level.

Exceptions

  • IoT.Client.exceptions.InternalException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ServiceUnavailableException
get_ota_update(**kwargs)

Gets an OTA update.

Requires permission to access the GetOTAUpdate action.

See also: AWS API Documentation

Request Syntax

response = client.get_ota_update(
    otaUpdateId='string'
)
Parameters
otaUpdateId (string) --

[REQUIRED]

The OTA update ID.

Return type
dict
Returns
Response Syntax
{
    'otaUpdateInfo': {
        'otaUpdateId': 'string',
        'otaUpdateArn': 'string',
        'creationDate': datetime(2015, 1, 1),
        'lastModifiedDate': datetime(2015, 1, 1),
        'description': 'string',
        'targets': [
            'string',
        ],
        'protocols': [
            'MQTT'|'HTTP',
        ],
        'awsJobExecutionsRolloutConfig': {
            'maximumPerMinute': 123,
            'exponentialRate': {
                'baseRatePerMinute': 123,
                'incrementFactor': 123.0,
                'rateIncreaseCriteria': {
                    'numberOfNotifiedThings': 123,
                    'numberOfSucceededThings': 123
                }
            }
        },
        'awsJobPresignedUrlConfig': {
            'expiresInSec': 123
        },
        'targetSelection': 'CONTINUOUS'|'SNAPSHOT',
        'otaUpdateFiles': [
            {
                'fileName': 'string',
                'fileType': 123,
                'fileVersion': 'string',
                'fileLocation': {
                    'stream': {
                        'streamId': 'string',
                        'fileId': 123
                    },
                    's3Location': {
                        'bucket': 'string',
                        'key': 'string',
                        'version': 'string'
                    }
                },
                'codeSigning': {
                    'awsSignerJobId': 'string',
                    'startSigningJobParameter': {
                        'signingProfileParameter': {
                            'certificateArn': 'string',
                            'platform': 'string',
                            'certificatePathOnDevice': 'string'
                        },
                        'signingProfileName': 'string',
                        'destination': {
                            's3Destination': {
                                'bucket': 'string',
                                'prefix': 'string'
                            }
                        }
                    },
                    'customCodeSigning': {
                        'signature': {
                            'inlineDocument': b'bytes'
                        },
                        'certificateChain': {
                            'certificateName': 'string',
                            'inlineDocument': 'string'
                        },
                        'hashAlgorithm': 'string',
                        'signatureAlgorithm': 'string'
                    }
                },
                'attributes': {
                    'string': 'string'
                }
            },
        ],
        'otaUpdateStatus': 'CREATE_PENDING'|'CREATE_IN_PROGRESS'|'CREATE_COMPLETE'|'CREATE_FAILED',
        'awsIotJobId': 'string',
        'awsIotJobArn': 'string',
        'errorInfo': {
            'code': 'string',
            'message': 'string'
        },
        'additionalParameters': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --
    • otaUpdateInfo (dict) --

      The OTA update info.

      • otaUpdateId (string) --

        The OTA update ID.

      • otaUpdateArn (string) --

        The OTA update ARN.

      • creationDate (datetime) --

        The date when the OTA update was created.

      • lastModifiedDate (datetime) --

        The date when the OTA update was last updated.

      • description (string) --

        A description of the OTA update.

      • targets (list) --

        The targets of the OTA update.

        • (string) --
      • protocols (list) --

        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.

        • (string) --
      • awsJobExecutionsRolloutConfig (dict) --

        Configuration for the rollout of OTA updates.

        • maximumPerMinute (integer) --

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

        • exponentialRate (dict) --

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

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

          • incrementFactor (float) --

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

          • rateIncreaseCriteria (dict) --

            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 (dict) --

        Configuration information for pre-signed URLs. Valid when protocols contains HTTP.

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

      • targetSelection (string) --

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

      • otaUpdateFiles (list) --

        A list of files associated with the OTA update.

        • (dict) --

          Describes a file to be associated with an 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 (dict) --

            The location of the updated firmware.

            • stream (dict) --

              The stream that contains the OTA update.

              • streamId (string) --

                The stream ID.

              • fileId (integer) --

                The ID of a file associated with a stream.

            • s3Location (dict) --

              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 (dict) --

            The code signing method of the file.

            • awsSignerJobId (string) --

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

            • startSigningJobParameter (dict) --

              Describes the code-signing job.

              • signingProfileParameter (dict) --

                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 (dict) --

                The location to write the code-signed file.

                • s3Destination (dict) --

                  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 (dict) --

              A custom method for code signing a file.

              • signature (dict) --

                The signature for the file.

                • inlineDocument (bytes) --

                  A base64 encoded binary representation of the code signing signature.

              • certificateChain (dict) --

                The certificate chain.

                • certificateName (string) --

                  The name of the certificate.

                • inlineDocument (string) --

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

              • hashAlgorithm (string) --

                The hash algorithm used to code sign the file.

              • signatureAlgorithm (string) --

                The signature algorithm used to code sign the file.

          • attributes (dict) --

            A list of name/attribute pairs.

            • (string) --
              • (string) --
      • otaUpdateStatus (string) --

        The status of the OTA update.

      • awsIotJobId (string) --

        The IoT job ID associated with the OTA update.

      • awsIotJobArn (string) --

        The IoT job ARN associated with the OTA update.

      • errorInfo (dict) --

        Error information associated with the OTA update.

        • code (string) --

          The error code.

        • message (string) --

          The error message.

      • additionalParameters (dict) --

        A collection of name/value pairs

        • (string) --
          • (string) --

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.ResourceNotFoundException
get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_percentiles(**kwargs)

Groups the aggregated values that match the query into percentile groupings. The default percentile groupings are: 1,5,25,50,75,95,99, although you can specify your own when you call GetPercentiles . This function returns a value for each percentile group specified (or the default percentile groupings). The percentile group "1" contains the aggregated field value that occurs in approximately one percent of the values that match the query. The percentile group "5" contains the aggregated field value that occurs in approximately five percent of the values that match the query, and so on. The result is an approximation, the more values that match the query, the more accurate the percentile values.

Requires permission to access the GetPercentiles action.

See also: AWS API Documentation

Request Syntax

response = client.get_percentiles(
    indexName='string',
    queryString='string',
    aggregationField='string',
    queryVersion='string',
    percents=[
        123.0,
    ]
)
Parameters
  • indexName (string) -- The name of the index to search.
  • queryString (string) --

    [REQUIRED]

    The search query string.

  • aggregationField (string) -- The field to aggregate.
  • queryVersion (string) -- The query version.
  • percents (list) --

    The percentile groups returned.

    • (float) --
Return type

dict

Returns

Response Syntax

{
    'percentiles': [
        {
            'percent': 123.0,
            'value': 123.0
        },
    ]
}

Response Structure

  • (dict) --

    • percentiles (list) --

      The percentile values of the aggregated fields.

      • (dict) --

        Describes the percentile and percentile value.

        • percent (float) --

          The percentile.

        • value (float) --

          The value of the percentile.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidQueryException
  • IoT.Client.exceptions.InvalidAggregationException
  • IoT.Client.exceptions.IndexNotReadyException
get_policy(**kwargs)

Gets information about the specified policy with the policy document of the default version.

Requires permission to access the GetPolicy action.

See also: AWS API Documentation

Request Syntax

response = client.get_policy(
    policyName='string'
)
Parameters
policyName (string) --

[REQUIRED]

The name of the policy.

Return type
dict
Returns
Response Syntax
{
    'policyName': 'string',
    'policyArn': 'string',
    'policyDocument': 'string',
    'defaultVersionId': 'string',
    'creationDate': datetime(2015, 1, 1),
    'lastModifiedDate': datetime(2015, 1, 1),
    'generationId': 'string'
}

Response Structure

  • (dict) --

    The output from the GetPolicy operation.

    • policyName (string) --

      The policy name.

    • policyArn (string) --

      The policy ARN.

    • policyDocument (string) --

      The JSON document that describes the policy.

    • defaultVersionId (string) --

      The default policy version ID.

    • creationDate (datetime) --

      The date the policy was created.

    • lastModifiedDate (datetime) --

      The date the policy was last modified.

    • generationId (string) --

      The generation ID of the policy.

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
get_policy_version(**kwargs)

Gets information about the specified policy version.

Requires permission to access the GetPolicyVersion action.

See also: AWS API Documentation

Request Syntax

response = client.get_policy_version(
    policyName='string',
    policyVersionId='string'
)
Parameters
  • policyName (string) --

    [REQUIRED]

    The name of the policy.

  • policyVersionId (string) --

    [REQUIRED]

    The policy version ID.

Return type

dict

Returns

Response Syntax

{
    'policyArn': 'string',
    'policyName': 'string',
    'policyDocument': 'string',
    'policyVersionId': 'string',
    'isDefaultVersion': True|False,
    'creationDate': datetime(2015, 1, 1),
    'lastModifiedDate': datetime(2015, 1, 1),
    'generationId': 'string'
}

Response Structure

  • (dict) --

    The output from the GetPolicyVersion operation.

    • policyArn (string) --

      The policy ARN.

    • policyName (string) --

      The policy name.

    • policyDocument (string) --

      The JSON document that describes the policy.

    • policyVersionId (string) --

      The policy version ID.

    • isDefaultVersion (boolean) --

      Specifies whether the policy version is the default.

    • creationDate (datetime) --

      The date the policy was created.

    • lastModifiedDate (datetime) --

      The date the policy was last modified.

    • generationId (string) --

      The generation ID of the policy version.

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
get_registration_code()

Gets a registration code used to register a CA certificate with IoT.

Requires permission to access the GetRegistrationCode action.

See also: AWS API Documentation

Request Syntax

response = client.get_registration_code()
Return type
dict
Returns
Response Syntax
{
    'registrationCode': 'string'
}

Response Structure

  • (dict) --

    The output from the GetRegistrationCode operation.

    • registrationCode (string) --

      The CA certificate registration code.

Exceptions

  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.InvalidRequestException
get_statistics(**kwargs)

Returns the count, average, sum, minimum, maximum, sum of squares, variance, and standard deviation for the specified aggregated field. If the aggregation field is of type String , only the count statistic is returned.

Requires permission to access the GetStatistics action.

See also: AWS API Documentation

Request Syntax

response = client.get_statistics(
    indexName='string',
    queryString='string',
    aggregationField='string',
    queryVersion='string'
)
Parameters
  • indexName (string) -- The name of the index to search. The default value is AWS_Things .
  • queryString (string) --

    [REQUIRED]

    The query used to search. You can specify "*" for the query string to get the count of all indexed things in your Amazon Web Services account.

  • aggregationField (string) -- The aggregation field name.
  • queryVersion (string) -- The version of the query used to search.
Return type

dict

Returns

Response Syntax

{
    'statistics': {
        'count': 123,
        'average': 123.0,
        'sum': 123.0,
        'minimum': 123.0,
        'maximum': 123.0,
        'sumOfSquares': 123.0,
        'variance': 123.0,
        'stdDeviation': 123.0
    }
}

Response Structure

  • (dict) --

    • statistics (dict) --

      The statistics returned by the Fleet Indexing service based on the query and aggregation field.

      • count (integer) --

        The count of things that match the query string criteria and contain a valid aggregation field value.

      • average (float) --

        The average of the aggregated field values.

      • sum (float) --

        The sum of the aggregated field values.

      • minimum (float) --

        The minimum aggregated field value.

      • maximum (float) --

        The maximum aggregated field value.

      • sumOfSquares (float) --

        The sum of the squares of the aggregated field values.

      • variance (float) --

        The variance of the aggregated field values.

      • stdDeviation (float) --

        The standard deviation of the aggregated field values.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException
  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidQueryException
  • IoT.Client.exceptions.InvalidAggregationException
  • IoT.Client.exceptions.IndexNotReadyException
get_topic_rule(**kwargs)

Gets information about the rule.

Requires permission to access the GetTopicRule action.

See also: AWS API Documentation

Request Syntax

response = client.get_topic_rule(
    ruleName='string'
)
Parameters
ruleName (string) --

[REQUIRED]

The name of the rule.

Return type
dict
Returns
Response Syntax
{
    'ruleArn': 'string',
    'rule': {
        'ruleName': 'string',
        'sql': 'string',
        'description': 'string',
        'createdAt': datetime(2015, 1, 1),
        'actions': [
            {
                'dynamoDB': {
                    'tableName': 'string',
                    'roleArn': 'string',
                    'operation': 'string',
                    'hashKeyField': 'string',
                    'hashKeyValue': 'string',
                    'hashKeyType': 'STRING'|'NUMBER',
                    'rangeKeyField': 'string',
                    'rangeKeyValue': 'string',
                    'rangeKeyType': 'STRING'|'NUMBER',
                    'payloadField': 'string'
                },
                'dynamoDBv2': {
                    'roleArn': 'string',
                    'putItem': {
                        'tableName': 'string'
                    }
                },
                'lambda': {
                    'functionArn': 'string'
                },
                'sns': {
                    'targetArn': 'string',
                    'roleArn': 'string',
                    'messageFormat': 'RAW'|'JSON'
                },
                'sqs': {
                    'roleArn': 'string',
                    'queueUrl': 'string',
                    'useBase64': True|False
                },
                'kinesis': {
                    'roleArn': 'string',
                    'streamName': 'string',
                    'partitionKey': 'string'
                },
                'republish': {
                    'roleArn': 'string',
                    'topic': 'string',
                    'qos': 123
                },
                's3': {
                    'roleArn': 'string',
                    'bucketName': 'string',
                    'key': 'string',
                    'cannedAcl': 'private'|'public-read'|'public-read-write'|'aws-exec-read'|'authenticated-read'|'bucket-owner-read'|'bucket-owner-full-control'|'log-delivery-write'
                },
                'firehose': {
                    'roleArn': 'string',
                    'deliveryStreamName': 'string',
                    'separator': 'string',
                    'batchMode': True|False
                },
                'cloudwatchMetric': {
                    'roleArn': 'string',
                    'metricNamespace': 'string',
                    'metricName': 'string',
                    'metricValue': 'string',
                    'metricUnit': 'string',
                    'metricTimestamp': 'string'
                },
                'cloudwatchAlarm': {
                    'roleArn': 'string',
                    'alarmName': 'string',
                    'stateReason': 'string',
                    'stateValue': 'string'
                },
                'cloudwatchLogs': {
                    'roleArn': 'string',
                    'logGroupName': 'string'
                },
                'elasticsearch': {
                    'roleArn': 'string',
                    'endpoint': 'string',
                    'index': 'string',
                    'type': 'string',
                    'id': 'string'
                },
                'salesforce': {
                    'token': 'string',
                    'url': 'string'
                },
                'iotAnalytics': {
                    'channelArn': 'string',
                    'channelName': 'string',
                    'batchMode': True|False,
                    'roleArn': 'string'
                },
                'iotEvents': {
                    'inputName': 'string',
                    'messageId': 'string',
                    'batchMode': True|False,
                    'roleArn': 'string'
                },
                'iotSiteWise': {
                    'putAssetPropertyValueEntries': [
                        {
                            'entryId': 'string',
                            'assetId': 'string',
                            'propertyId': 'string',
                            'propertyAlias': 'string',
                            'propertyValues': [
                                {
                                    'value': {
                                        'stringValue': 'string',
                                        'integerValue': 'string',
                                        'doubleValue': 'string',
                                        'booleanValue': 'string'
                                    },
                                    'timestamp': {
                                        'timeInSeconds': 'string',
                                        'offsetInNanos': 'string'
                                    },
                                    'quality': 'string'
                                },
                            ]
                        },
                    ],
                    'roleArn': 'string'
                },
                'stepFunctions': {
                    'executionNamePrefix': 'string',
                    'stateMachineName': 'string',
                    'roleArn': 'string'
                },
                'timestream': {
                    'roleArn': 'string',
                    'databaseName': 'string',
                    'tableName': 'string',
                    'dimensions': [
                        {
                            'name': 'string',
                            'value': 'string'
                        },
                    ],
                    'timestamp': {
                        'value': 'string',
                        'unit': 'string'
                    }
                },
                'http': {
                    'url': 'string',
                    'confirmationUrl': 'string',
                    'headers': [
                        {
                            'key': 'string',
                            'value': 'string'
                        },
                    ],
                    'auth': {
                        'sigv4': {
                            'signingRegion': 'string',
                            'serviceName': 'string',
                            'roleArn': 'string'
                        }
                    }
                },
                'kafka': {
                    'destinationArn': 'string',
                    'topic': 'string',
                    'key': 'string',
                    'partition': 'string',
                    'clientProperties': {
                        'string': 'string'
                    }
                },
                'openSearch': {
                    'roleArn': 'string',
                    'endpoint': 'string',
                    'index': 'string',
                    'type': 'string',
                    'id': 'string'
                }
            },
        ],
        'ruleDisabled': True|False,
        'awsIotSqlVersion': 'string',
        'errorAction': {
            'dynamoDB': {
                'tableName': 'string',
                'roleArn': 'string',
                'operation': 'string',
                'hashKeyField': 'string',
                'hashKeyValue': 'string',
                'hashKeyType': 'STRING'|'NUMBER',
                'rangeKeyField': 'string',
                'rangeKeyValue': 'string',
                'rangeKeyType': 'STRING'|'NUMBER',
                'payloadField': 'string'
            },
            'dynamoDBv2': {
                'roleArn': 'string',
                'putItem': {
                    'tableName': 'string'
                }
            },
            'lambda': {
                'functionArn': 'string'
            },
            'sns': {
                'targetArn': 'string',
                'roleArn': 'string',
                'messageFormat': 'RAW'|'JSON'
            },
            'sqs': {
                'roleArn': 'string',
                'queueUrl': 'string',
                'useBase64': True|False
            },
            'kinesis': {
                'roleArn': 'string',
                'streamName': 'string',
                'partitionKey': 'string'
            },
            'republish': {
                'roleArn': 'string',
                'topic': 'string',
                'qos': 123
            },
            's3': {
                'roleArn': 'string',
                'bucketName': 'string',
                'key': 'string',
                'cannedAcl': 'private'|'public-read'|'public-read-write'|'aws-exec-read'|'authenticated-read'|'bucket-owner-read'|'bucket-owner-full-control'|'log-delivery-write'
            },
            'firehose': {
                'roleArn': 'string',
                'deliveryStreamName': 'string',
                'separator': 'string',
                'batchMode': True|False
            },
            'cloudwatchMetric': {
                'roleArn': 'string',
                'metricNamespace': 'string',
                'metricName': 'string',
                'metricValue': 'string',
                'metricUnit': 'string',
                'metricTimestamp': 'string'
            },
            'cloudwatchAlarm': {
                'roleArn': 'string',
                'alarmName': 'string',
                'stateReason': 'string',
                'stateValue': 'string'
            },
            'cloudwatchLogs': {
                'roleArn': 'string',
                'logGroupName': 'string'
            },
            'elasticsearch': {
                'roleArn': 'string',
                'endpoint': 'string',
                'index': 'string',
                'type': 'string',
                'id': 'string'
            },
            'salesforce': {
                'token': 'string',
                'url': 'string'
            },
            'iotAnalytics': {
                'channelArn': 'string',
                'channelName': 'string',
                'batchMode': True|False,
                'roleArn': 'string'
            },
            'iotEvents': {
                'inputName': 'string',
                'messageId': 'string',
                'batchMode': True|False,
                'roleArn': 'string'
            },
            'iotSiteWise': {
                'putAssetPropertyValueEntries': [
                    {
                        'entryId': 'string',
                        'assetId': 'string',
                        'propertyId': 'string',
                        'propertyAlias': 'string',
                        'propertyValues': [
                            {
                                'value': {
                                    'stringValue': 'string',
                                    'integerValue': 'string',
                                    'doubleValue': 'string',
                                    'booleanValue': 'string'
                                },
                                'timestamp': {
                                    'timeInSeconds': 'string',
                                    'offsetInNanos': 'string'
                                },
                                'quality': 'string'
                            },
                        ]
                    },
                ],
                'roleArn': 'string'
            },
            'stepFunctions': {
                'executionNamePrefix': 'string',
                'stateMachineName': 'string',
                'roleArn': 'string'
            },
            'timestream': {
                'roleArn': 'string',
                'databaseName': 'string',
                'tableName': 'string',
                'dimensions': [
                    {
                        'name': 'string',
                        'value': 'string'
                    },
                ],
                'timestamp': {
                    'value': 'string',
                    'unit': 'string'
                }
            },
            'http': {
                'url': 'string',
                'confirmationUrl': 'string',
                'headers': [
                    {
                        'key': 'string',
                        'value': 'string'
                    },
                ],
                'auth': {
                    'sigv4': {
                        'signingRegion': 'string',
                        'serviceName': 'string',
                        'roleArn': 'string'
                    }
                }
            },
            'kafka': {
                'destinationArn': 'string',
                'topic': 'string',
                'key': 'string',
                'partition': 'string',
                'clientProperties': {
                    'string': 'string'
                }
            },
            'openSearch': {
                'roleArn': 'string',
                'endpoint': 'string',
                'index': 'string',
                'type': 'string',
                'id': 'string'
            }
        }
    }
}

Response Structure

  • (dict) --

    The output from the GetTopicRule operation.

    • ruleArn (string) --

      The rule ARN.

    • rule (dict) --

      The rule.

      • ruleName (string) --

        The name of the rule.

      • sql (string) --

        The SQL statement used to query the topic. When using a SQL query with multiple lines, be sure to escape the newline characters.

      • description (string) --

        The description of the rule.

      • createdAt (datetime) --

        The date and time the rule was created.

      • actions (list) --

        The actions associated with the rule.

        • (dict) --

          Describes the actions associated with a rule.

          • dynamoDB (dict) --

            Write to a DynamoDB table.

            • tableName (string) --

              The name of the DynamoDB table.

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

            • hashKeyField (string) --

              The hash key name.

            • hashKeyValue (string) --

              The hash key value.

            • hashKeyType (string) --

              The hash key type. Valid values are "STRING" or "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"

            • payloadField (string) --

              The action payload. This name can be customized.

          • dynamoDBv2 (dict) --

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

            • roleArn (string) --

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

            • putItem (dict) --

              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.

              • tableName (string) --

                The table where the message data will be written.

          • lambda (dict) --

            Invoke a Lambda function.

            • functionArn (string) --

              The ARN of the Lambda function.

          • sns (dict) --

            Publish to an Amazon SNS topic.

            • targetArn (string) --

              The ARN of the SNS topic.

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

          • sqs (dict) --

            Publish to an Amazon SQS queue.

            • roleArn (string) --

              The ARN of the IAM role that grants access.

            • queueUrl (string) --

              The URL of the Amazon SQS queue.

            • useBase64 (boolean) --

              Specifies whether to use Base64 encoding.

          • kinesis (dict) --

            Write data to an Amazon Kinesis stream.

            • roleArn (string) --

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

            • streamName (string) --

              The name of the Amazon Kinesis stream.

            • partitionKey (string) --

              The partition key.

          • republish (dict) --

            Publish to another MQTT topic.

            • roleArn (string) --

              The ARN of the IAM role that grants access.

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

          • s3 (dict) --

            Write to an Amazon S3 bucket.

            • roleArn (string) --

              The ARN of the IAM role that grants access.

            • bucketName (string) --

              The Amazon S3 bucket.

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

          • firehose (dict) --

            Write to an Amazon Kinesis Firehose stream.

            • roleArn (string) --

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

            • deliveryStreamName (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), 'rn' (Windows newline), ',' (comma).

            • batchMode (boolean) --

              Whether to deliver the Kinesis Data Firehose stream as a batch by using ` PutRecordBatch https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html`__ . 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 https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html`__ request. The resulting array can't have more than 500 records.

          • cloudwatchMetric (dict) --

            Capture a CloudWatch metric.

            • roleArn (string) --

              The IAM role that allows access to the CloudWatch metric.

            • metricNamespace (string) --

              The CloudWatch metric namespace name.

            • metricName (string) --

              The CloudWatch metric name.

            • metricValue (string) --

              The CloudWatch metric value.

            • metricUnit (string) --

              The metric unit supported by CloudWatch.

            • metricTimestamp (string) --

              An optional Unix timestamp .

          • cloudwatchAlarm (dict) --

            Change the state of a CloudWatch alarm.

            • roleArn (string) --

              The IAM role that allows access to the CloudWatch alarm.

            • alarmName (string) --

              The CloudWatch alarm name.

            • stateReason (string) --

              The reason for the alarm change.

            • stateValue (string) --

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

          • cloudwatchLogs (dict) --

            Send data to CloudWatch Logs.

            • roleArn (string) --

              The IAM role that allows access to the CloudWatch log.

            • logGroupName (string) --

              The CloudWatch log group to which the action sends data.

          • elasticsearch (dict) --

            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 .

            • roleArn (string) --

              The IAM role ARN that has access to OpenSearch.

            • endpoint (string) --

              The endpoint of your OpenSearch domain.

            • index (string) --

              The index where you want to store your data.

            • type (string) --

              The type of document you are storing.

            • id (string) --

              The unique identifier for the document you are storing.

          • salesforce (dict) --

            Send a message to a Salesforce IoT Cloud Input Stream.

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

            • url (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 (dict) --

            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 https://docs.aws.amazon.com/iotanalytics/latest/APIReference/API_BatchPutMessage.html`__ 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 (dict) --

            Sends an input to an IoT Events detector.

            • inputName (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 https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchPutMessage.html`__ . The resulting array can't have more than 10 messages.

            • roleArn (string) --

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

          • iotSiteWise (dict) --

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

            • putAssetPropertyValueEntries (list) --

              A list of asset property value entries.

              • (dict) --

                An asset property value entry containing the following information.

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

                • propertyValues (list) --

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

                  • (dict) --

                    An asset property value entry containing the following information.

                    • value (dict) --

                      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.

                    • timestamp (dict) --

                      The asset property value timestamp.

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

            • roleArn (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 (dict) --

            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.

            • stateMachineName (string) --

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

            • roleArn (string) --

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

          • timestream (dict) --

            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.

            • roleArn (string) --

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

            • databaseName (string) --

              The name of an Amazon Timestream database.

            • tableName (string) --

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

            • dimensions (list) --

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

              • (dict) --

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

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

                • value (string) --

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

            • timestamp (dict) --

              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.

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

          • http (dict) --

            Send data to an HTTPS endpoint.

            • url (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 (list) --

              The HTTP headers to send with the message data.

              • (dict) --

                The HTTP action header.

                • key (string) --

                  The HTTP header key.

                • value (string) --

                  The HTTP header value. Substitution templates are supported.

            • auth (dict) --

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

              • sigv4 (dict) --

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

                • signingRegion (string) --

                  The signing region.

                • serviceName (string) --

                  The service name to use while signing with Sig V4.

                • roleArn (string) --

                  The ARN of the signing role.

          • kafka (dict) --

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

            • destinationArn (string) --

              The ARN of Kafka action's VPC TopicRuleDestination .

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

            • clientProperties (dict) --

              Properties of the Apache Kafka producer client.

              • (string) --
                • (string) --
          • openSearch (dict) --

            Write data to an Amazon OpenSearch Service domain.

            • roleArn (string) --

              The IAM role ARN that has access to OpenSearch.

            • endpoint (string) --

              The endpoint of your OpenSearch domain.

            • index (string) --

              The OpenSearch index where you want to store your data.

            • type (string) --

              The type of document you are storing.

            • id (string) --

              The unique identifier for the document you are storing.

      • ruleDisabled (boolean) --

        Specifies whether the rule is disabled.

      • awsIotSqlVersion (string) --

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

      • errorAction (dict) --

        The action to perform when an error occurs.

        • dynamoDB (dict) --

          Write to a DynamoDB table.

          • tableName (string) --

            The name of the DynamoDB table.

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

          • hashKeyField (string) --

            The hash key name.

          • hashKeyValue (string) --

            The hash key value.

          • hashKeyType (string) --

            The hash key type. Valid values are "STRING" or "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"

          • payloadField (string) --

            The action payload. This name can be customized.

        • dynamoDBv2 (dict) --

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

          • roleArn (string) --

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

          • putItem (dict) --

            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.

            • tableName (string) --

              The table where the message data will be written.

        • lambda (dict) --

          Invoke a Lambda function.

          • functionArn (string) --

            The ARN of the Lambda function.

        • sns (dict) --

          Publish to an Amazon SNS topic.

          • targetArn (string) --

            The ARN of the SNS topic.

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

        • sqs (dict) --

          Publish to an Amazon SQS queue.

          • roleArn (string) --

            The ARN of the IAM role that grants access.

          • queueUrl (string) --

            The URL of the Amazon SQS queue.

          • useBase64 (boolean) --

            Specifies whether to use Base64 encoding.

        • kinesis (dict) --

          Write data to an Amazon Kinesis stream.

          • roleArn (string) --

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

          • streamName (string) --

            The name of the Amazon Kinesis stream.

          • partitionKey (string) --

            The partition key.

        • republish (dict) --

          Publish to another MQTT topic.

          • roleArn (string) --

            The ARN of the IAM role that grants access.

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

        • s3 (dict) --

          Write to an Amazon S3 bucket.

          • roleArn (string) --

            The ARN of the IAM role that grants access.

          • bucketName (string) --

            The Amazon S3 bucket.

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

        • firehose (dict) --

          Write to an Amazon Kinesis Firehose stream.

          • roleArn (string) --

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

          • deliveryStreamName (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), 'rn' (Windows newline), ',' (comma).

          • batchMode (boolean) --

            Whether to deliver the Kinesis Data Firehose stream as a batch by using ` PutRecordBatch https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html`__ . 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 https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html`__ request. The resulting array can't have more than 500 records.

        • cloudwatchMetric (dict) --

          Capture a CloudWatch metric.

          • roleArn (string) --

            The IAM role that allows access to the CloudWatch metric.

          • metricNamespace (string) --

            The CloudWatch metric namespace name.

          • metricName (string) --

            The CloudWatch metric name.

          • metricValue (string) --

            The CloudWatch metric value.

          • metricUnit (string) --

            The metric unit supported by CloudWatch.

          • metricTimestamp (string) --

            An optional Unix timestamp .

        • cloudwatchAlarm (dict) --

          Change the state of a CloudWatch alarm.

          • roleArn (string) --

            The IAM role that allows access to the CloudWatch alarm.

          • alarmName (string) --

            The CloudWatch alarm name.

          • stateReason (string) --

            The reason for the alarm change.

          • stateValue (string) --

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

        • cloudwatchLogs (dict) --

          Send data to CloudWatch Logs.

          • roleArn (string) --

            The IAM role that allows access to the CloudWatch log.

          • logGroupName (string) --

            The CloudWatch log group to which the action sends data.

        • elasticsearch (dict) --

          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 .

          • roleArn (string) --

            The IAM role ARN that has access to OpenSearch.

          • endpoint (string) --

            The endpoint of your OpenSearch domain.

          • index (string) --

            The index where you want to store your data.

          • type (string) --

            The type of document you are storing.

          • id (string) --

            The unique identifier for the document you are storing.

        • salesforce (dict) --

          Send a message to a Salesforce IoT Cloud Input Stream.

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

          • url (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 (dict) --

          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 https://docs.aws.amazon.com/iotanalytics/latest/APIReference/API_BatchPutMessage.html`__ 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 (dict) --

          Sends an input to an IoT Events detector.

          • inputName (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 https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchPutMessage.html`__ . The resulting array can't have more than 10 messages.

          • roleArn (string) --

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

        • iotSiteWise (dict) --

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

          • putAssetPropertyValueEntries (list) --

            A list of asset property value entries.

            • (dict) --

              An asset property value entry containing the following information.

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

              • propertyValues (list) --

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

                • (dict) --

                  An asset property value entry containing the following information.

                  • value (dict) --

                    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.

                  • timestamp (dict) --

                    The asset property value timestamp.

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

          • roleArn (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 (dict) --

          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.

          • stateMachineName (string) --

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

          • roleArn (string) --

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

        • timestream (dict) --

          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.

          • roleArn (string) --

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

          • databaseName (string) --

            The name of an Amazon Timestream database.

          • tableName (string) --

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

          • dimensions (list) --

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

            • (dict) --

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

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

              • value (string) --

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

          • timestamp (dict) --

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

            You can us