AWS IoT

2018/11/19 - AWS IoT - 15 new 14 updated api methods

Changes  IoT now supports resource tagging and tag based access control for Billing Groups, Thing Groups, Thing Types, Jobs, and Security Profiles. IoT Billing Groups help you group devices to categorize and track your costs. AWS IoT Device Management also introduces three new features: 1. Dynamic thing groups. 2. Jobs dynamic rollouts. 3. Device connectivity indexing. Dynamic thing groups lets you to create a group of devices using a Fleet Indexing query. The devices in your group will be automatically added or removed when they match your specified query criteria. Jobs dynamic rollout allows you to configure an exponentially increasing rate of deployment for device updates and define failure criteria to cancel your job. Device connectivity indexing allows you to index your devices' lifecycle events to discover whether devices are connected or disconnected to AWS IoT.

ListBillingGroups (new) Link ¶

Lists the billing groups you have created.

See also: AWS API Documentation

Request Syntax

client.list_billing_groups(
    nextToken='string',
    maxResults=123,
    namePrefixFilter='string'
)
type nextToken

string

param nextToken

The token to retrieve the next set of results.

type maxResults

integer

param maxResults

The maximum number of results to return per request.

type namePrefixFilter

string

param namePrefixFilter

Limit the results to billing groups whose names have the given prefix.

rtype

dict

returns

Response Syntax

{
    'billingGroups': [
        {
            'groupName': 'string',
            'groupArn': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • billingGroups (list) --

      The list of billing groups.

      • (dict) --

        The name and ARN of a group.

        • groupName (string) --

          The group name.

        • groupArn (string) --

          The group ARN.

    • nextToken (string) --

      The token used to get the next set of results, or null if there are no additional results.

DeleteDynamicThingGroup (new) Link ¶

Deletes a dynamic thing group.

See also: AWS API Documentation

Request Syntax

client.delete_dynamic_thing_group(
    thingGroupName='string',
    expectedVersion=123
)
type thingGroupName

string

param thingGroupName

[REQUIRED]

The name of the dynamic thing group to delete.

type expectedVersion

integer

param expectedVersion

The expected version of the dynamic thing group to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DescribeBillingGroup (new) Link ¶

Returns information about a billing group.

See also: AWS API Documentation

Request Syntax

client.describe_billing_group(
    billingGroupName='string'
)
type billingGroupName

string

param billingGroupName

[REQUIRED]

The name of the billing group.

rtype

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.

TagResource (new) Link ¶

Adds to or modifies the tags of the given resource. Tags are metadata which can be used to manage a resource.

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    resourceArn='string',
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type resourceArn

string

param resourceArn

[REQUIRED]

The ARN of the resource.

type tags

list

param tags

[REQUIRED]

The new or modified tags for the resource.

  • (dict) --

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

    • Key (string) --

      The tag's key.

    • Value (string) --

      The tag's value.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

UntagResource (new) Link ¶

Removes the given tags (metadata) from the resource.

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    resourceArn='string',
    tagKeys=[
        'string',
    ]
)
type resourceArn

string

param resourceArn

[REQUIRED]

The ARN of the resource.

type tagKeys

list

param tagKeys

[REQUIRED]

A list of the keys of the tags to be removed from the resource.

  • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CreateBillingGroup (new) Link ¶

Creates a billing group.

See also: AWS API Documentation

Request Syntax

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

string

param billingGroupName

[REQUIRED]

The name you wish to give to the billing group.

type billingGroupProperties

dict

param billingGroupProperties

The properties of the billing group.

  • billingGroupDescription (string) --

    The description of the billing group.

type tags

list

param tags

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

      The tag's key.

    • Value (string) --

      The tag's value.

rtype

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.

UpdateBillingGroup (new) Link ¶

Updates information about the billing group.

See also: AWS API Documentation

Request Syntax

client.update_billing_group(
    billingGroupName='string',
    billingGroupProperties={
        'billingGroupDescription': 'string'
    },
    expectedVersion=123
)
type billingGroupName

string

param billingGroupName

[REQUIRED]

The name of the billing group.

type billingGroupProperties

dict

param billingGroupProperties

[REQUIRED]

The properties of the billing group.

  • billingGroupDescription (string) --

    The description of the billing group.

type expectedVersion

integer

param expectedVersion

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

rtype

dict

returns

Response Syntax

{
    'version': 123
}

Response Structure

  • (dict) --

    • version (integer) --

      The latest version of the billing group.

ListThingsInBillingGroup (new) Link ¶

Lists the things you have added to the given billing group.

See also: AWS API Documentation

Request Syntax

client.list_things_in_billing_group(
    billingGroupName='string',
    nextToken='string',
    maxResults=123
)
type billingGroupName

string

param billingGroupName

[REQUIRED]

The name of the billing group.

type nextToken

string

param nextToken

The token to retrieve the next set of results.

type maxResults

integer

param maxResults

The maximum number of results to return per request.

rtype

dict

returns

Response Syntax

{
    'things': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • things (list) --

      A list of things in the billing group.

      • (string) --

    • nextToken (string) --

      The token used to get the next set of results, or null if there are no additional results.

DeleteBillingGroup (new) Link ¶

Deletes the billing group.

See also: AWS API Documentation

Request Syntax

client.delete_billing_group(
    billingGroupName='string',
    expectedVersion=123
)
type billingGroupName

string

param billingGroupName

[REQUIRED]

The name of the billing group.

type expectedVersion

integer

param expectedVersion

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 .

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

AddThingToBillingGroup (new) Link ¶

Adds a thing to a billing group.

See also: AWS API Documentation

Request Syntax

client.add_thing_to_billing_group(
    billingGroupName='string',
    billingGroupArn='string',
    thingName='string',
    thingArn='string'
)
type billingGroupName

string

param billingGroupName

The name of the billing group.

type billingGroupArn

string

param billingGroupArn

The ARN of the billing group.

type thingName

string

param thingName

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

type thingArn

string

param thingArn

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

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

UpdateDynamicThingGroup (new) Link ¶

Updates a dynamic thing group.

See also: AWS API Documentation

Request Syntax

client.update_dynamic_thing_group(
    thingGroupName='string',
    thingGroupProperties={
        'thingGroupDescription': 'string',
        'attributePayload': {
            'attributes': {
                'string': 'string'
            },
            'merge': True|False
        }
    },
    expectedVersion=123,
    indexName='string',
    queryString='string',
    queryVersion='string'
)
type thingGroupName

string

param thingGroupName

[REQUIRED]

The name of the dynamic thing group to update.

type thingGroupProperties

dict

param thingGroupProperties

[REQUIRED]

The dynamic thing group properties to update.

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

type expectedVersion

integer

param expectedVersion

The expected version of the dynamic thing group to update.

type indexName

string

param indexName

The dynamic thing group index to update.

Note

Currently one index is supported: 'AWS_Things'.

type queryString

string

param queryString

The dynamic thing group search query string to update.

type queryVersion

string

param queryVersion

The dynamic thing group query version to update.

Note

Currently one query version is supported: "2017-09-30". If not specified, the query version defaults to this value.

rtype

dict

returns

Response Syntax

{
    'version': 123
}

Response Structure

  • (dict) --

    • version (integer) --

      The dynamic thing group version.

CreateDynamicThingGroup (new) Link ¶

Creates a dynamic thing group.

See also: AWS API Documentation

Request Syntax

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'
        },
    ]
)
type thingGroupName

string

param thingGroupName

[REQUIRED]

The dynamic thing group name to create.

type thingGroupProperties

dict

param thingGroupProperties

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 .

type indexName

string

param indexName

The dynamic thing group index name.

Note

Currently one index is supported: "AWS_Things".

type queryString

string

param queryString

[REQUIRED]

The dynamic thing group search query string.

See Query Syntax for information about query string syntax.

type queryVersion

string

param queryVersion

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.

type tags

list

param tags

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

      The tag's key.

    • Value (string) --

      The tag's value.

rtype

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.

UpdateJob (new) Link ¶

Updates supported fields of the specified job.

See also: AWS API Documentation

Request Syntax

client.update_job(
    jobId='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
    }
)
type jobId

string

param jobId

[REQUIRED]

The ID of the job to be updated.

type description

string

param description

A short text description of the job.

type presignedUrlConfig

dict

param presignedUrlConfig

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.

type jobExecutionsRolloutConfig

dict

param jobExecutionsRolloutConfig

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.

    • rateIncreaseCriteria (dict) -- [REQUIRED]

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

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

      • numberOfNotifiedThings (integer) --

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

      • numberOfSucceededThings (integer) --

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

type abortConfig

dict

param abortConfig

Allows you to create criteria to abort a job.

  • criteriaList (list) -- [REQUIRED]

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

    • (dict) --

      Details of abort criteria to define rules to abort the job.

      • failureType (string) -- [REQUIRED]

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

      • action (string) -- [REQUIRED]

        The type of abort action to initiate a job abort.

      • thresholdPercentage (float) -- [REQUIRED]

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

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

      • minNumberOfExecutedThings (integer) -- [REQUIRED]

        Minimum number of executed things before evaluating an abort rule.

type timeoutConfig

dict

param timeoutConfig

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.

returns

None

RemoveThingFromBillingGroup (new) Link ¶

Removes the given thing from the billing group.

See also: AWS API Documentation

Request Syntax

client.remove_thing_from_billing_group(
    billingGroupName='string',
    billingGroupArn='string',
    thingName='string',
    thingArn='string'
)
type billingGroupName

string

param billingGroupName

The name of the billing group.

type billingGroupArn

string

param billingGroupArn

The ARN of the billing group.

type thingName

string

param thingName

The name of the thing to be removed from the billing group.

type thingArn

string

param thingArn

The ARN of the thing to be removed from the billing group.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ListTagsForResource (new) Link ¶

Lists the tags (metadata) you have assigned to the resource.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    resourceArn='string',
    nextToken='string'
)
type resourceArn

string

param resourceArn

[REQUIRED]

The ARN of the resource.

type nextToken

string

param nextToken

The token to retrieve the next set of results.

rtype

dict

returns

Response Syntax

{
    'tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • tags (list) --

      The list of tags assigned to the resource.

      • (dict) --

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

        • Key (string) --

          The tag's key.

        • Value (string) --

          The tag's value.

    • nextToken (string) --

      The token used to get the next set of results, or null if there are no additional results.

AddThingToThingGroup (updated) Link ¶
Changes (request)
{'overrideDynamicGroups': 'boolean'}

Adds a thing to a thing group.

See also: AWS API Documentation

Request Syntax

client.add_thing_to_thing_group(
    thingGroupName='string',
    thingGroupArn='string',
    thingName='string',
    thingArn='string',
    overrideDynamicGroups=True|False
)
type thingGroupName

string

param thingGroupName

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

type thingGroupArn

string

param thingGroupArn

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

type thingName

string

param thingName

The name of the thing to add to a group.

type thingArn

string

param thingArn

The ARN of the thing to add to a group.

type overrideDynamicGroups

boolean

param overrideDynamicGroups

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.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CancelJob (updated) Link ¶
Changes (request)
{'reasonCode': 'string'}

Cancels a job.

See also: AWS API Documentation

Request Syntax

client.cancel_job(
    jobId='string',
    reasonCode='string',
    comment='string',
    force=True|False
)
type jobId

string

param jobId

[REQUIRED]

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

type reasonCode

string

param reasonCode

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

type comment

string

param comment

An optional comment string describing why the job was canceled.

type force

boolean

param force

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

rtype

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.

CreateJob (updated) Link ¶
Changes (request)
{'abortConfig': {'criteriaList': [{'action': 'CANCEL',
                                   'failureType': 'FAILED | REJECTED | '
                                                  'TIMED_OUT | ALL',
                                   'minNumberOfExecutedThings': 'integer',
                                   'thresholdPercentage': 'double'}]},
 'jobExecutionsRolloutConfig': {'exponentialRate': {'baseRatePerMinute': 'integer',
                                                    'incrementFactor': 'double',
                                                    'rateIncreaseCriteria': {'numberOfNotifiedThings': 'integer',
                                                                             'numberOfSucceededThings': 'integer'}}},
 'tags': [{'Key': 'string', 'Value': 'string'}]}

Creates a job.

See also: AWS API Documentation

Request Syntax

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'
        },
    ]
)
type jobId

string

param jobId

[REQUIRED]

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

type targets

list

param targets

[REQUIRED]

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

  • (string) --

type documentSource

string

param documentSource

An S3 link to the job document.

type document

string

param document

The job document.

Note

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

The placeholder link is of the following form:

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

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

type description

string

param description

A short text description of the job.

type presignedUrlConfig

dict

param presignedUrlConfig

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.

type targetSelection

string

param targetSelection

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.

type jobExecutionsRolloutConfig

dict

param jobExecutionsRolloutConfig

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.

    • rateIncreaseCriteria (dict) -- [REQUIRED]

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

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

      • numberOfNotifiedThings (integer) --

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

      • numberOfSucceededThings (integer) --

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

type abortConfig

dict

param abortConfig

Allows you to create criteria to abort a job.

  • criteriaList (list) -- [REQUIRED]

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

    • (dict) --

      Details of abort criteria to define rules to abort the job.

      • failureType (string) -- [REQUIRED]

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

      • action (string) -- [REQUIRED]

        The type of abort action to initiate a job abort.

      • thresholdPercentage (float) -- [REQUIRED]

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

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

      • minNumberOfExecutedThings (integer) -- [REQUIRED]

        Minimum number of executed things before evaluating an abort rule.

type timeoutConfig

dict

param timeoutConfig

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.

type tags

list

param tags

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

      The tag's key.

    • Value (string) --

      The tag's value.

rtype

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.

CreateSecurityProfile (updated) Link ¶
Changes (request)
{'tags': [{'Key': 'string', 'Value': 'string'}]}

Creates a Device Defender security profile.

See also: AWS API Documentation

Request Syntax

client.create_security_profile(
    securityProfileName='string',
    securityProfileDescription='string',
    behaviors=[
        {
            'name': 'string',
            'metric': 'string',
            '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',
                'value': {
                    'count': 123,
                    'cidrs': [
                        'string',
                    ],
                    'ports': [
                        123,
                    ]
                },
                'durationSeconds': 123
            }
        },
    ],
    alertTargets={
        'string': {
            'alertTargetArn': 'string',
            'roleArn': 'string'
        }
    },
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type securityProfileName

string

param securityProfileName

[REQUIRED]

The name you are giving to the security profile.

type securityProfileDescription

string

param securityProfileDescription

A description of the security profile.

type behaviors

list

param behaviors

[REQUIRED]

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 have given to the behavior.

    • metric (string) --

      What is measured by the behavior.

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

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

      • durationSeconds (integer) --

        Use this to specify the period of time over which the behavior is evaluated, for those criteria which have a time dimension (for example, NUM_MESSAGES_SENT ).

type alertTargets

dict

param alertTargets

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

type tags

list

param tags

Metadata which can be used to manage the security profile.

  • (dict) --

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

    • Key (string) --

      The tag's key.

    • Value (string) --

      The tag's value.

rtype

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.

CreateThing (updated) Link ¶
Changes (request)
{'billingGroupName': 'string'}

Creates a thing record in the registry.

Note

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

See also: AWS API Documentation

Request Syntax

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

string

param thingName

[REQUIRED]

The name of the thing to create.

type thingTypeName

string

param thingTypeName

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

type attributePayload

dict

param attributePayload

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 .

type billingGroupName

string

param billingGroupName

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

rtype

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.

CreateThingGroup (updated) Link ¶
Changes (request)
{'tags': [{'Key': 'string', 'Value': 'string'}]}

Create a thing group.

Note

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

See also: AWS API Documentation

Request Syntax

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

string

param thingGroupName

[REQUIRED]

The thing group name to create.

type parentGroupName

string

param parentGroupName

The name of the parent thing group.

type thingGroupProperties

dict

param thingGroupProperties

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 .

type tags

list

param tags

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

      The tag's key.

    • Value (string) --

      The tag's value.

rtype

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.

CreateThingType (updated) Link ¶
Changes (request)
{'tags': [{'Key': 'string', 'Value': 'string'}]}

Creates a new thing type.

See also: AWS API Documentation

Request Syntax

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

string

param thingTypeName

[REQUIRED]

The name of the thing type.

type thingTypeProperties

dict

param thingTypeProperties

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

type tags

list

param tags

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

      The tag's key.

    • Value (string) --

      The tag's value.

rtype

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.

DescribeJob (updated) Link ¶
Changes (response)
{'job': {'abortConfig': {'criteriaList': [{'action': 'CANCEL',
                                           'failureType': 'FAILED | REJECTED | '
                                                          'TIMED_OUT | ALL',
                                           'minNumberOfExecutedThings': 'integer',
                                           'thresholdPercentage': 'double'}]},
         'jobExecutionsRolloutConfig': {'exponentialRate': {'baseRatePerMinute': 'integer',
                                                            'incrementFactor': 'double',
                                                            'rateIncreaseCriteria': {'numberOfNotifiedThings': 'integer',
                                                                                     'numberOfSucceededThings': 'integer'}}},
         'reasonCode': 'string'}}

Describes a job.

See also: AWS API Documentation

Request Syntax

client.describe_job(
    jobId='string'
)
type jobId

string

param jobId

[REQUIRED]

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

rtype

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

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.

          • rateIncreaseCriteria (dict) --

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

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

            • numberOfNotifiedThings (integer) --

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

            • numberOfSucceededThings (integer) --

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

      • abortConfig (dict) --

        Configuration for criteria to abort the job.

        • criteriaList (list) --

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

          • (dict) --

            Details of abort criteria to define rules to abort the job.

            • failureType (string) --

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

            • action (string) --

              The type of abort action to initiate a job abort.

            • thresholdPercentage (float) --

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

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

            • minNumberOfExecutedThings (integer) --

              Minimum number of executed things before evaluating an abort rule.

      • createdAt (datetime) --

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

      • lastUpdatedAt (datetime) --

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

      • completedAt (datetime) --

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

DescribeThing (updated) Link ¶
Changes (response)
{'billingGroupName': 'string'}

Gets information about the specified thing.

See also: AWS API Documentation

Request Syntax

client.describe_thing(
    thingName='string'
)
type thingName

string

param thingName

[REQUIRED]

The name of the thing.

rtype

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 client ID.

    • thingName (string) --

      The name of the thing.

    • thingId (string) --

      The ID of the thing to describe.

    • thingArn (string) --

      The ARN of the thing to describe.

    • thingTypeName (string) --

      The thing type name.

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

DescribeThingGroup (updated) Link ¶
Changes (response)
{'indexName': 'string',
 'queryString': 'string',
 'queryVersion': 'string',
 'status': 'ACTIVE | BUILDING | REBUILDING'}

Describe a thing group.

See also: AWS API Documentation

Request Syntax

client.describe_thing_group(
    thingGroupName='string'
)
type thingGroupName

string

param thingGroupName

[REQUIRED]

The name of the thing group.

rtype

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 .

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

GetIndexingConfiguration (updated) Link ¶
Changes (response)
{'thingIndexingConfiguration': {'thingConnectivityIndexingMode': 'OFF | '
                                                                 'STATUS'}}

Gets the search configuration.

See also: AWS API Documentation

Request Syntax

client.get_indexing_configuration()
rtype

dict

returns

Response Syntax

{
    'thingIndexingConfiguration': {
        'thingIndexingMode': 'OFF'|'REGISTRY'|'REGISTRY_AND_SHADOW',
        'thingConnectivityIndexingMode': 'OFF'|'STATUS'
    },
    'thingGroupIndexingConfiguration': {
        'thingGroupIndexingMode': 'OFF'|'ON'
    }
}

Response Structure

  • (dict) --

    • thingIndexingConfiguration (dict) --

      Thing indexing configuration.

      • thingIndexingMode (string) --

        Thing indexing mode. Valid values are:

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

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

        • OFF - Thing indexing is disabled.

      • thingConnectivityIndexingMode (string) --

        Thing connectivity indexing mode. Valid values are:

        • STATUS – Your thing index will contain connectivity status. In order to enable thing connectivity indexing, thingIndexMode must not be set to OFF.

        • OFF - Thing connectivity status indexing is disabled.

    • thingGroupIndexingConfiguration (dict) --

      The index configuration.

      • thingGroupIndexingMode (string) --

        Thing group indexing mode.

SearchIndex (updated) Link ¶
Changes (response)
{'things': {'connectivity': {'connected': 'boolean', 'timestamp': 'long'}}}

The query search index.

See also: AWS API Documentation

Request Syntax

client.search_index(
    indexName='string',
    queryString='string',
    nextToken='string',
    maxResults=123,
    queryVersion='string'
)
type indexName

string

param indexName

The search index name.

type queryString

string

param queryString

[REQUIRED]

The search query string.

type nextToken

string

param nextToken

The token used to get the next set of results, or null if there are no additional results.

type maxResults

integer

param maxResults

The maximum number of results to return at one time.

type queryVersion

string

param queryVersion

The query version.

rtype

dict

returns

Response Syntax

{
    'nextToken': 'string',
    'things': [
        {
            'thingName': 'string',
            'thingId': 'string',
            'thingTypeName': 'string',
            'thingGroupNames': [
                'string',
            ],
            'attributes': {
                'string': 'string'
            },
            'shadow': 'string',
            'connectivity': {
                'connected': True|False,
                'timestamp': 123
            }
        },
    ],
    'thingGroups': [
        {
            'thingGroupName': 'string',
            'thingGroupId': 'string',
            'thingGroupDescription': 'string',
            'attributes': {
                'string': 'string'
            },
            'parentGroupNames': [
                'string',
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      The token used to get the next set of results, or null if there are no additional results.

    • things (list) --

      The things that match the search query.

      • (dict) --

        The thing search index document.

        • thingName (string) --

          The thing name.

        • thingId (string) --

          The thing ID.

        • thingTypeName (string) --

          The thing type name.

        • thingGroupNames (list) --

          Thing group names.

          • (string) --

        • attributes (dict) --

          The attributes.

          • (string) --

            • (string) --

        • shadow (string) --

          The shadow.

        • connectivity (dict) --

          Indicates whether or not the thing is connected to the AWS IoT service.

          • connected (boolean) --

            True if the thing is connected to the AWS IoT service, false if it is not connected.

          • timestamp (integer) --

            The epoch time (in milliseconds) when the thing last connected or disconnected. Note that if the thing has been disconnected for more than a few weeks, the time value can be missing.

    • thingGroups (list) --

      The thing groups that match the search query.

      • (dict) --

        The thing group search index document.

        • thingGroupName (string) --

          The thing group name.

        • thingGroupId (string) --

          The thing group ID.

        • thingGroupDescription (string) --

          The thing group description.

        • attributes (dict) --

          The thing group attributes.

          • (string) --

            • (string) --

        • parentGroupNames (list) --

          Parent group names.

          • (string) --

UpdateIndexingConfiguration (updated) Link ¶
Changes (request)
{'thingIndexingConfiguration': {'thingConnectivityIndexingMode': 'OFF | '
                                                                 'STATUS'}}

Updates the search configuration.

See also: AWS API Documentation

Request Syntax

client.update_indexing_configuration(
    thingIndexingConfiguration={
        'thingIndexingMode': 'OFF'|'REGISTRY'|'REGISTRY_AND_SHADOW',
        'thingConnectivityIndexingMode': 'OFF'|'STATUS'
    },
    thingGroupIndexingConfiguration={
        'thingGroupIndexingMode': 'OFF'|'ON'
    }
)
type thingIndexingConfiguration

dict

param thingIndexingConfiguration

Thing indexing configuration.

  • thingIndexingMode (string) -- [REQUIRED]

    Thing indexing mode. Valid values are:

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

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

    • OFF - Thing indexing is disabled.

  • thingConnectivityIndexingMode (string) --

    Thing connectivity indexing mode. Valid values are:

    • STATUS – Your thing index will contain connectivity status. In order to enable thing connectivity indexing, thingIndexMode must not be set to OFF.

    • OFF - Thing connectivity status indexing is disabled.

type thingGroupIndexingConfiguration

dict

param thingGroupIndexingConfiguration

Thing group indexing configuration.

  • thingGroupIndexingMode (string) -- [REQUIRED]

    Thing group indexing mode.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

UpdateThingGroupsForThing (updated) Link ¶
Changes (request)
{'overrideDynamicGroups': 'boolean'}

Updates the groups to which the thing belongs.

See also: AWS API Documentation

Request Syntax

client.update_thing_groups_for_thing(
    thingName='string',
    thingGroupsToAdd=[
        'string',
    ],
    thingGroupsToRemove=[
        'string',
    ],
    overrideDynamicGroups=True|False
)
type thingName

string

param thingName

The thing whose group memberships will be updated.

type thingGroupsToAdd

list

param thingGroupsToAdd

The groups to which the thing will be added.

  • (string) --

type thingGroupsToRemove

list

param thingGroupsToRemove

The groups from which the thing will be removed.

  • (string) --

type overrideDynamicGroups

boolean

param overrideDynamicGroups

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.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --