2015/10/08 - AWS IoT - 39 new api methods
Creates a new version of the specified AWS IoT policy.
Request Syntax
client.create_policy_version( policyName='string', policyDocument='string', setAsDefault=True|False )
string
[REQUIRED]
The policy name.
string
[REQUIRED]
The JSON document that describes the policy.
boolean
Specifies whether the policy version is set as the default.
dict
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.
Attaches the specified principal to the specified thing.
Request Syntax
client.attach_thing_principal( thingName='string', principal='string' )
string
[REQUIRED]
The name of the thing.
string
[REQUIRED]
The principal (certificate or other credential).
dict
Response Syntax
{}
Response Structure
(dict) --
The output from the AttachThingPrincipal operation.
Replaces the specified rule. You must specify all parameters for the new rule.
Request Syntax
client.replace_topic_rule( ruleName='string', topicRulePayload={ 'sql': 'string', 'description': 'string', 'actions': [ { 'dynamoDB': { 'tableName': 'string', 'roleArn': 'string', 'hashKeyField': 'string', 'hashKeyValue': 'string', 'rangeKeyField': 'string', 'rangeKeyValue': 'string', 'payloadField': 'string' }, 'lambda': { 'functionArn': 'string' }, 'sns': { 'targetArn': 'string', 'roleArn': 'string' }, 'sqs': { 'roleArn': 'string', 'queueUrl': 'string', 'useBase64': True|False }, 'kinesis': { 'roleArn': 'string', 'streamName': 'string', 'partitionKey': 'string' }, 'republish': { 'roleArn': 'string', 'topic': 'string' }, 's3': { 'roleArn': 'string', 'bucketName': 'string', 'key': 'string' }, 'firehose': { 'roleArn': 'string', 'deliveryStreamName': 'string' } }, ], 'ruleDisabled': True|False } )
string
[REQUIRED]
The name of the rule.
dict
[REQUIRED]
The rule payload.
sql (string) -- [REQUIRED]
The SQL statement used to query the topic. For more information, see AWS IoT SQL Reference in the AWS IoT Developer Guide.
description (string) --
The description of the rule.
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.
hashKeyField (string) -- [REQUIRED]
The hash key name.
hashKeyValue (string) -- [REQUIRED]
The hash key value.
rangeKeyField (string) -- [REQUIRED]
The range key name.
rangeKeyValue (string) -- [REQUIRED]
The range key value.
payloadField (string) --
The action payload.
lambda (dict) --
Invoke a Lambda function.
functionArn (string) -- [REQUIRED]
The ARN of the Lambda function.
sns (dict) --
Publish to an SNS topic.
targetArn (string) -- [REQUIRED]
The ARN of the SNS topic.
roleArn (string) -- [REQUIRED]
The ARN of the IAM role that grants access.
sqs (dict) --
Publish to an 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 a Kinesis stream.
roleArn (string) -- [REQUIRED]
The ARN of the IAM role that grants access.
streamName (string) -- [REQUIRED]
The name of the 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.
s3 (dict) --
Write to an S3 bucket.
roleArn (string) -- [REQUIRED]
The ARN of the IAM role that grants access.
bucketName (string) -- [REQUIRED]
The S3 bucket.
key (string) -- [REQUIRED]
The object key.
firehose (dict) --
roleArn (string) -- [REQUIRED]
deliveryStreamName (string) -- [REQUIRED]
ruleDisabled (boolean) --
Specifies whether the rule is disabled.
None
Sets the specified policy version as the default for the specified policy.
Request Syntax
client.set_default_policy_version( policyName='string', policyVersionId='string' )
string
[REQUIRED]
The policy name.
string
[REQUIRED]
The policy version ID.
None
Creates a 2048 bit RSA key pair and issues an X.509 certificate using the issued public key.
Note This is the only time AWS IoT issues the private key for this certificate. It is important to keep track of the private key.
Request Syntax
client.create_keys_and_certificate( setAsActive=True|False )
boolean
Specifies whether the certificate is active.
dict
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. AWS IoT issues a default subject name for the certificate (e.g., AWS 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.
Removes the specified policy from the specified certificate.
Request Syntax
client.detach_principal_policy( policyName='string', principal='string' )
string
[REQUIRED]
The name of the policy to detach.
string
[REQUIRED]
The principal
If the principal is a certificate, specify the certificate ARN. If the principal is a Cognito identity specify the identity ID.
None
Creates a rule.
Request Syntax
client.create_topic_rule( ruleName='string', topicRulePayload={ 'sql': 'string', 'description': 'string', 'actions': [ { 'dynamoDB': { 'tableName': 'string', 'roleArn': 'string', 'hashKeyField': 'string', 'hashKeyValue': 'string', 'rangeKeyField': 'string', 'rangeKeyValue': 'string', 'payloadField': 'string' }, 'lambda': { 'functionArn': 'string' }, 'sns': { 'targetArn': 'string', 'roleArn': 'string' }, 'sqs': { 'roleArn': 'string', 'queueUrl': 'string', 'useBase64': True|False }, 'kinesis': { 'roleArn': 'string', 'streamName': 'string', 'partitionKey': 'string' }, 'republish': { 'roleArn': 'string', 'topic': 'string' }, 's3': { 'roleArn': 'string', 'bucketName': 'string', 'key': 'string' }, 'firehose': { 'roleArn': 'string', 'deliveryStreamName': 'string' } }, ], 'ruleDisabled': True|False } )
string
[REQUIRED]
The name of the rule.
dict
[REQUIRED]
The rule payload.
sql (string) -- [REQUIRED]
The SQL statement used to query the topic. For more information, see AWS IoT SQL Reference in the AWS IoT Developer Guide.
description (string) --
The description of the rule.
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.
hashKeyField (string) -- [REQUIRED]
The hash key name.
hashKeyValue (string) -- [REQUIRED]
The hash key value.
rangeKeyField (string) -- [REQUIRED]
The range key name.
rangeKeyValue (string) -- [REQUIRED]
The range key value.
payloadField (string) --
The action payload.
lambda (dict) --
Invoke a Lambda function.
functionArn (string) -- [REQUIRED]
The ARN of the Lambda function.
sns (dict) --
Publish to an SNS topic.
targetArn (string) -- [REQUIRED]
The ARN of the SNS topic.
roleArn (string) -- [REQUIRED]
The ARN of the IAM role that grants access.
sqs (dict) --
Publish to an 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 a Kinesis stream.
roleArn (string) -- [REQUIRED]
The ARN of the IAM role that grants access.
streamName (string) -- [REQUIRED]
The name of the 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.
s3 (dict) --
Write to an S3 bucket.
roleArn (string) -- [REQUIRED]
The ARN of the IAM role that grants access.
bucketName (string) -- [REQUIRED]
The S3 bucket.
key (string) -- [REQUIRED]
The object key.
firehose (dict) --
roleArn (string) -- [REQUIRED]
deliveryStreamName (string) -- [REQUIRED]
ruleDisabled (boolean) --
Specifies whether the rule is disabled.
None
Attaches the specified policy to the specified principal (certificate or other credential).
Request Syntax
client.attach_principal_policy( policyName='string', principal='string' )
string
[REQUIRED]
The policy name.
string
[REQUIRED]
The principal which can be a certificate ARN (as returned from the CreateCertificate operation) or a Cognito ID.
None
Gets information about the specified policy with the policy document of the default version.
Request Syntax
client.get_policy( policyName='string' )
string
[REQUIRED]
The name of the policy.
dict
Response Syntax
{ 'policyName': 'string', 'policyArn': 'string', 'policyDocument': 'string', 'defaultVersionId': '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.
Updates the data for a thing.
Request Syntax
client.update_thing( thingName='string', attributePayload={ 'attributes': { 'string': 'string' } } )
string
[REQUIRED]
The thing name.
dict
[REQUIRED]
The attribute payload, a JSON string containing up to three key-value pairs.
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) --
dict
Response Syntax
{}
Response Structure
(dict) --
The output from the UpdateThing operation.
Updates the status of the specified certificate. This operation is idempotent.
Moving a cert from the ACTIVE state (including REVOKED) will NOT disconnect currently-connected devices, although these devices will be unable to reconnect.
The ACTIVE state is required to authenticate devices connecting to AWS IoT using a certificate.
Request Syntax
client.update_certificate( certificateId='string', newStatus='ACTIVE'|'INACTIVE'|'REVOKED'|'PENDING_TRANSFER' )
string
[REQUIRED]
The ID of the certificate.
string
[REQUIRED]
The new status.
None
Lists your certificates.
The results are paginated with a default page size of 25. You can retrieve additional results using the returned marker.
Request Syntax
client.list_certificates( pageSize=123, marker='string', ascendingOrder=True|False )
integer
The result page size.
string
The marker for the next set of results.
boolean
Specifies the order for results. If True, the results are returned in ascending order, based on the creation date.
dict
Response Syntax
{ 'certificates': [ { 'certificateArn': 'string', 'certificateId': 'string', 'status': 'ACTIVE'|'INACTIVE'|'REVOKED'|'PENDING_TRANSFER', 'creationDate': datetime(2015, 1, 1) }, ], 'nextMarker': 'string' }
Response Structure
(dict) --
The output of the ListCertificates operation.
certificates (list) --
The descriptions of the certificates.
(dict) --
Information about a certificate.
certificateArn (string) --
The ARN of the certificate.
certificateId (string) --
The ID of the certificate.
status (string) --
The status of the certificate.
creationDate (datetime) --
The date and time the certificate was created.
nextMarker (string) --
The marker for the next set of results, or null if there are no additional results.
Lists your policies.
Request Syntax
client.list_policies( marker='string', pageSize=123, ascendingOrder=True|False )
string
The marker for the next set of results.
integer
The result page size.
boolean
Specifies the order for results. If true, the results are returned in ascending creation order.
dict
Response Syntax
{ 'policies': [ { 'policyName': 'string', 'policyArn': 'string' }, ], 'nextMarker': 'string' }
Response Structure
(dict) --
The output from the ListPolicies operation.
policies (list) --
The descriptions of the policies.
(dict) --
Describes an AWS IoT policy.
policyName (string) --
The policy name.
policyArn (string) --
The policy ARN.
nextMarker (string) --
The marker for the next set of results, or null if there are no additional results.
Transfers the specified certificate to the specified AWS account.
You can cancel the transfer until it is acknowledged by the recipient.
No notification is sent to the transfer destination's account, it is up to the caller to notify the transfer target.
The certificate being transferred must not be in the ACTIVE state. It can be deactivated using the UpdateCertificate API.
The certificate must not have any policies attached to it. These can be detached using the DetachPrincipalPolicy API.
Request Syntax
client.transfer_certificate( certificateId='string', targetAwsAccount='string' )
string
[REQUIRED]
The ID of the certificate.
string
[REQUIRED]
The AWS account.
dict
Response Syntax
{ 'transferredCertificateArn': 'string' }
Response Structure
(dict) --
The output from the TransferCertificate operation.
transferredCertificateArn (string) --
The ARN of the certificate.
Deletes the specified certificate.
A certificate cannot be deleted if it has a policy attached to it. To delete a certificate, first detach all policies using the DetachPrincipalPolicy operation.
In addition, a certificate cannot be deleted if it is in ACTIVE status. To delete a certificate, first change the status to INACTIVE using the UpdateCertificate operation.
Request Syntax
client.delete_certificate( certificateId='string' )
string
[REQUIRED]
The ID of the certificate.
None
Lists the versions of the specified policy, and identifies the default version.
Request Syntax
client.list_policy_versions( policyName='string' )
string
[REQUIRED]
The policy name.
dict
Response Syntax
{ 'policyVersions': [ { 'versionId': 'string', 'isDefaultVersion': True|False, 'createDate': datetime(2015, 1, 1) }, ] }
Response Structure
(dict) --
The output from the ListPolicyVersions operation.
policyVersions (list) --
The policy versions.
(dict) --
Describes a policy version.
versionId (string) --
The policy version ID.
isDefaultVersion (boolean) --
Specifies whether the policy version is the default.
createDate (datetime) --
The date and time the policy was created.
Deletes the specified rule.
Request Syntax
client.delete_topic_rule( ruleName='string' )
string
[REQUIRED]
The name of the rule.
None
Lists your things. You can pass an AttributeName and/or AttributeValue to filter your things. For example: "ListThings where AttributeName=Color and AttributeValue=Red"
Request Syntax
client.list_things( nextToken='string', maxResults=123, attributeName='string', attributeValue='string' )
string
The token for the next value.
integer
The maximum number of results.
string
The attribute name.
string
The attribute value.
dict
Response Syntax
{ 'things': [ { 'thingName': 'string', 'attributes': { 'string': 'string' } }, ], 'nextToken': 'string' }
Response Structure
(dict) --
The output from the ListThings operation.
things (list) --
The things.
(dict) --
Describes a thing attribute.
thingName (string) --
The name of the thing.
attributes (dict) --
The attributes.
(string) --
(string) --
nextToken (string) --
A token used to retrieve the next value.
Lists the rules for the specific topic.
Request Syntax
client.list_topic_rules( topic='string', maxResults=123, nextToken='string', ruleDisabled=True|False )
string
The topic.
integer
The maximum number of results to return.
string
A token used to retrieve the next value.
boolean
Specifies whether the rule is disabled.
dict
Response Syntax
{ 'rules': [ { 'ruleName': 'string', 'topicPattern': 'string', 'createdAt': datetime(2015, 1, 1), 'ruleDisabled': True|False }, ], 'nextToken': 'string' }
Response Structure
(dict) --
The output from the ListTopicRules operation.
rules (list) --
The rules.
(dict) --
Describes a rule.
ruleName (string) --
The name of the rule.
topicPattern (string) --
The pattern for the topic names that apply.
createdAt (datetime) --
The date and time the rule was created.
ruleDisabled (boolean) --
Specifies whether the rule is disabled.
nextToken (string) --
A token used to retrieve the next value.
Lists the policies attached to the specified principal. If you use an Amazon Cognito identity, the ID needs to be in Amazon Cognito Identity format.
Request Syntax
client.list_principal_policies( principal='string', marker='string', pageSize=123, ascendingOrder=True|False )
string
[REQUIRED]
The principal.
string
The marker for the next set of results.
integer
The result page size.
boolean
Specifies the order for results. If true, results are returned in ascending creation order.
dict
Response Syntax
{ 'policies': [ { 'policyName': 'string', 'policyArn': 'string' }, ], 'nextMarker': 'string' }
Response Structure
(dict) --
The output from the ListPrincipalPolicies operation.
policies (list) --
The policies.
(dict) --
Describes an AWS IoT policy.
policyName (string) --
The policy name.
policyArn (string) --
The policy ARN.
nextMarker (string) --
The marker for the next set of results, or null if there are no additional results.
Lists the things associated with the specified principal.
Request Syntax
client.list_principal_things( nextToken='string', maxResults=123, principal='string' )
string
integer
string
[REQUIRED]
The principal.
dict
Response Syntax
{ 'things': [ 'string', ], 'nextToken': 'string' }
Response Structure
(dict) --
The output from the ListPrincipalThings operation.
things (list) --
The things.
(string) --
nextToken (string) --
A token used to retrieve the next value.
Deletes the specified policy.
A policy cannot be deleted if:
it has non-default versions
it is attached to any certificate
To delete a policy:
First delete all the non-default versions of the policy using the DeletePolicyVersion API.
Detach it from any certificate using the DetachPrincipalPolicy API.
When a policy is deleted, its default version is deleted with it.
Request Syntax
client.delete_policy( policyName='string' )
string
[REQUIRED]
The name of the policy to delete.
None
Gets information about the specified thing.
Request Syntax
client.describe_thing( thingName='string' )
string
[REQUIRED]
The name of the thing.
dict
Response Syntax
{ 'defaultClientId': 'string', 'thingName': 'string', 'attributes': { 'string': 'string' } }
Response Structure
(dict) --
The output from the DescribeThing operation.
defaultClientId (string) --
The default client ID.
thingName (string) --
The name of the thing.
attributes (dict) --
The attributes which are name/value pairs in JSON format. For example:
{"attributes":{"some-name1":"some-value1”}, {"some-name2":"some-value2”}, {"some-name3":"some-value3”}}
(string) --
(string) --
Detaches the specified principal from the specified thing.
Request Syntax
client.detach_thing_principal( thingName='string', principal='string' )
string
[REQUIRED]
The name of the thing.
string
[REQUIRED]
The principal.
dict
Response Syntax
{}
Response Structure
(dict) --
The output from the DetachThingPrincipal operation.
Returns a unique URL specific to the AWS account making the call. The URL points to the AWS IoT data plane endpoint. The customer-specific endpoint should be provided to all data plane operations.
Request Syntax
client.describe_endpoint()
dict
Response Syntax
{ 'endpointAddress': 'string' }
Response Structure
(dict) --
The output from the DescribeEndpoint operation.
endpointAddress (string) --
The address.
Rejects a pending certificate transfer. After AWS IoT rejects a certificate transfer, the certificate status changes from PENDING_TRANFER to INACTIVE.
To check for pending certificate transfers, call ListCertificates to enumerate your certificates.
This operation can only be called by the transfer destination. Once called, the certificate will be returned to the source's account in the INACTIVE state.
Request Syntax
client.reject_certificate_transfer( certificateId='string' )
string
[REQUIRED]
The ID of the certificate.
None
Creates an X.509 certificate using the specified certificate signing request.
Note Reusing the same certificate signing request (CSR) results in a distinct certificate.
Request Syntax
client.create_certificate_from_csr( certificateSigningRequest='string', setAsActive=True|False )
string
[REQUIRED]
The certificate signing request (CSR).
boolean
Specifies whether the certificate is active.
dict
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.
Sets the logging options.
Request Syntax
client.set_logging_options( loggingOptionsPayload={ 'roleArn': 'string', 'logLevel': 'DEBUG'|'INFO'|'ERROR'|'WARN'|'DISABLED' } )
dict
The logging options payload.
roleArn (string) -- [REQUIRED]
The ARN of the IAM role that grants access.
logLevel (string) --
The logging level.
None
Deletes the specified version of the specified policy. The default version of the policy cannot be deleted.
To delete the default version use the DeletePolicy API or mark the policy as non-default and then delete it.
Request Syntax
client.delete_policy_version( policyName='string', policyVersionId='string' )
string
[REQUIRED]
The name of the policy.
string
[REQUIRED]
The policy version ID.
None
Creates a thing in the thing registry.
Request Syntax
client.create_thing( thingName='string', attributePayload={ 'attributes': { 'string': 'string' } } )
string
[REQUIRED]
The name of the thing.
dict
The attribute payload. Which consists of up to 3 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) --
dict
Response Syntax
{ 'thingName': 'string', 'thingArn': 'string' }
Response Structure
(dict) --
The output of the CreateThing operation.
thingName (string) --
The name of the thing.
thingArn (string) --
The thing ARN.
Cancels a pending transfer for the specified certificate.
Note Only the transfer source account can use this operation to cancel a transfer (transfer destinations can use RejectCertificateTransfer instead). After transfer, AWS IoT returns the certificate to the source account in the INACTIVE state. Once the destination account has accepted the transfer, the transfer may no longer be cancelled.
After a certificate transfer is cancelled, the status of the certificate changes from PENDING_TRANSFER to INACTIVE.
Request Syntax
client.cancel_certificate_transfer( certificateId='string' )
string
[REQUIRED]
The ID of the certificate.
None
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.
Request Syntax
client.accept_certificate_transfer( certificateId='string', setAsActive=True|False )
string
[REQUIRED]
The ID of the certificate.
boolean
Specifies whether the certificate is active.
None
Gets information about the specified rule.
Request Syntax
client.get_topic_rule( ruleName='string' )
string
[REQUIRED]
The name of the rule.
dict
Response Syntax
{ 'rule': { 'ruleName': 'string', 'sql': 'string', 'description': 'string', 'createdAt': datetime(2015, 1, 1), 'actions': [ { 'dynamoDB': { 'tableName': 'string', 'roleArn': 'string', 'hashKeyField': 'string', 'hashKeyValue': 'string', 'rangeKeyField': 'string', 'rangeKeyValue': 'string', 'payloadField': 'string' }, 'lambda': { 'functionArn': 'string' }, 'sns': { 'targetArn': 'string', 'roleArn': 'string' }, 'sqs': { 'roleArn': 'string', 'queueUrl': 'string', 'useBase64': True|False }, 'kinesis': { 'roleArn': 'string', 'streamName': 'string', 'partitionKey': 'string' }, 'republish': { 'roleArn': 'string', 'topic': 'string' }, 's3': { 'roleArn': 'string', 'bucketName': 'string', 'key': 'string' }, 'firehose': { 'roleArn': 'string', 'deliveryStreamName': 'string' } }, ], 'ruleDisabled': True|False } }
Response Structure
(dict) --
The output from the GetTopicRule operation.
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 properly.
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.
hashKeyField (string) --
The hash key name.
hashKeyValue (string) --
The hash key value.
rangeKeyField (string) --
The range key name.
rangeKeyValue (string) --
The range key value.
payloadField (string) --
The action payload.
lambda (dict) --
Invoke a Lambda function.
functionArn (string) --
The ARN of the Lambda function.
sns (dict) --
Publish to an SNS topic.
targetArn (string) --
The ARN of the SNS topic.
roleArn (string) --
The ARN of the IAM role that grants access.
sqs (dict) --
Publish to an 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 a Kinesis stream.
roleArn (string) --
The ARN of the IAM role that grants access.
streamName (string) --
The name of the 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.
s3 (dict) --
Write to an S3 bucket.
roleArn (string) --
The ARN of the IAM role that grants access.
bucketName (string) --
The S3 bucket.
key (string) --
The object key.
firehose (dict) --
roleArn (string) --
deliveryStreamName (string) --
ruleDisabled (boolean) --
Specifies whether the rule is disabled.
Deletes the specified thing from the Thing Registry.
Request Syntax
client.delete_thing( thingName='string' )
string
[REQUIRED]
The thing name.
dict
Response Syntax
{}
Response Structure
(dict) --
The output of the DeleteThing operation.
Gets information about the specified policy version.
Request Syntax
client.get_policy_version( policyName='string', policyVersionId='string' )
string
[REQUIRED]
The name of the policy.
string
[REQUIRED]
The policy version ID.
dict
Response Syntax
{ 'policyArn': 'string', 'policyName': 'string', 'policyDocument': 'string', 'policyVersionId': 'string', 'isDefaultVersion': True|False }
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.
Gets the logging options.
Request Syntax
client.get_logging_options()
dict
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.
Gets information about the specified certificate.
Request Syntax
client.describe_certificate( certificateId='string' )
string
[REQUIRED]
The ID of the certificate.
dict
Response Syntax
{ 'certificateDescription': { 'certificateArn': 'string', 'certificateId': 'string', 'status': 'ACTIVE'|'INACTIVE'|'REVOKED'|'PENDING_TRANSFER', 'certificatePem': 'string', 'ownedBy': 'string', 'creationDate': datetime(2015, 1, 1), 'lastModifiedDate': datetime(2015, 1, 1) } }
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.
status (string) --
The status of the certificate.
certificatePem (string) --
The certificate data, in PEM format.
ownedBy (string) --
The ID of the AWS account that owns the certificate.
creationDate (datetime) --
The date and time the certificate was created.
lastModifiedDate (datetime) --
The date and time the certificate was last modified.
Creates an AWS IoT policy.
The created policy is the default version for the policy. This operation creates a policy version with a version identifier of 1 and sets 1 as the policy's default version.
Request Syntax
client.create_policy( policyName='string', policyDocument='string' )
string
[REQUIRED]
The policy name.
string
[REQUIRED]
The JSON document that describes the policy. The length of the policyDocument must be a minimum length of 1, with a maximum length of 2048, excluding whitespace.
dict
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.
Lists the principals associated with the specified thing.
Request Syntax
client.list_thing_principals( thingName='string' )
string
[REQUIRED]
The name of the thing.
dict
Response Syntax
{ 'principals': [ 'string', ] }
Response Structure
(dict) --
The output from the ListThingPrincipals operation.
principals (list) --
The principals.
(string) --