2019/03/25 - AWS IoT 1-Click Devices Service - 3 new 3 updated api methods
Changes This release adds tagging support for AWS IoT 1-Click Device resources. Use these APIs to add, remove, or list tags on Devices, and leverage the tags for various authorization and billing scenarios. This release also adds the ARN property for DescribeDevice response object.
Removes the association of tags from an AWS IoT 1-Click resource.
See also: AWS API Documentation
Request Syntax
client.untag_resource( ResourceArn='string', TagKeys=[ 'string', ] )
string
[REQUIRED]
The AWS IoT 1-Click resource the tags will be removed from. This value is an Amazon Resource Name (ARN).
list
[REQUIRED]
A list of tag keys. Existing tags of the resource whose keys are members of this list will be removed from the AWS IoT 1-Click resource.
(string) --
None
List all tags on an AWS IoT 1-Click resource.
See also: AWS API Documentation
Request Syntax
client.list_tags_for_resource( ResourceArn='string' )
string
[REQUIRED]
The AWS IoT 1-Click resource with tags to be listed. This value is an Amazon Resource Name (ARN).
dict
Response Syntax
{ 'Tags': { 'string': 'string' } }
Response Structure
(dict) --
Tags (dict) --
The tags currently associated with the AWS IoT 1-Click resource.
(string) --
(string) --
Associate a set of tags with an AWS IoT 1-Click resource. You can then activate these user-defined tags so that they appear on the Billing and Cost Management console for cost allocation tracking.
See also: AWS API Documentation
Request Syntax
client.tag_resource( ResourceArn='string', Tags={ 'string': 'string' } )
string
[REQUIRED]
Identifies the AWS IoT 1-Click resource to which tags should be added. This value is an Amazon Resource Name (ARN).
dict
[REQUIRED]
The tags to be assigned to the AWS IoT 1-Click resource.
(string) --
(string) --
None
{'DeviceDescription': {'Arn': 'string', 'Tags': {'string': 'string'}}}
Given a device ID, returns a DescribeDeviceResponse object describing the details of the device.
See also: AWS API Documentation
Request Syntax
client.describe_device( DeviceId='string' )
string
[REQUIRED]
The unique identifier of the device.
dict
Response Syntax
{ 'DeviceDescription': { 'Arn': 'string', 'Attributes': { 'string': 'string' }, 'DeviceId': 'string', 'Enabled': True|False, 'RemainingLife': 123.0, 'Type': 'string', 'Tags': { 'string': 'string' } } }
Response Structure
(dict) --
200 response
DeviceDescription (dict) --
Device details.
Arn (string) --
The ARN of the device.
Attributes (dict) --
An array of zero or more elements of DeviceAttribute objects providing user specified device attributes.
(string) --
(string) --
DeviceId (string) --
The unique identifier of the device.
Enabled (boolean) --
A Boolean value indicating whether or not the device is enabled.
RemainingLife (float) --
A value between 0 and 1 inclusive, representing the fraction of life remaining for the device.
Type (string) --
The type of the device, such as "button".
Tags (dict) --
The tags currently associated with the AWS IoT 1-Click device.
(string) --
(string) --
{'Tags': {'string': 'string'}}
Given a device ID, finalizes the claim request for the associated device.
Note
Claiming a device consists of initiating a claim, then publishing a device event, and finalizing the claim. For a device of type button, a device event can be published by simply clicking the device.
See also: AWS API Documentation
Request Syntax
client.finalize_device_claim( DeviceId='string', Tags={ 'string': 'string' } )
string
[REQUIRED]
The unique identifier of the device.
dict
The tags to be assigned to the AWS IoT 1-Click device.
(string) --
(string) --
dict
Response Syntax
{ 'State': 'string' }
Response Structure
(dict) --
200 response
State (string) --
The device's final claim state.
{'Devices': {'Arn': 'string', 'Tags': {'string': 'string'}}}
Lists the 1-Click compatible devices associated with your AWS account.
See also: AWS API Documentation
Request Syntax
client.list_devices( DeviceType='string', MaxResults=123, NextToken='string' )
string
The type of the device, such as "button".
integer
The maximum number of results to return per request. If not set, a default value of 100 is used.
string
The token to retrieve the next set of results.
dict
Response Syntax
{ 'Devices': [ { 'Arn': 'string', 'Attributes': { 'string': 'string' }, 'DeviceId': 'string', 'Enabled': True|False, 'RemainingLife': 123.0, 'Type': 'string', 'Tags': { 'string': 'string' } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
200 response
Devices (list) --
A list of devices.
(dict) --
Arn (string) --
The ARN of the device.
Attributes (dict) --
An array of zero or more elements of DeviceAttribute objects providing user specified device attributes.
(string) --
(string) --
DeviceId (string) --
The unique identifier of the device.
Enabled (boolean) --
A Boolean value indicating whether or not the device is enabled.
RemainingLife (float) --
A value between 0 and 1 inclusive, representing the fraction of life remaining for the device.
Type (string) --
The type of the device, such as "button".
Tags (dict) --
The tags currently associated with the AWS IoT 1-Click device.
(string) --
(string) --
NextToken (string) --
The token to retrieve the next set of results.