AWS::IoT1Click::Device
The AWS::IoT1Click::Device resource controls the enabled state of an Amazon IoT 1-Click compatible device. For more information,
see Device in the Amazon IoT 1-Click Devices API Reference.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::IoT1Click::Device", "Properties" : { "DeviceId" :String, "Enabled" :Boolean} }
Properties
DeviceId-
The ID of the device, such as
G030PX0312744DWM.Required: Yes
Type: String
Update requires: Replacement
Enabled-
A Boolean value indicating whether the device is enabled (
true) or not (false).Required: Yes
Type: Boolean
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Reffunction, Refreturns the device ARN, such as arn:aws:iot1click:us-west-2:123456789012:devices/G030PX0312744DWM.
For more information about using the Reffunction, see Ref.
Fn::GetAtt
The Fn::GetAttintrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAttintrinsic function, see Fn::GetAtt.
Examples
Enable a device
JSON
{ "SampleDevice": { "Type": "AWS::IoT1Click::Device", "Properties": { "DeviceId": "G030PX0312744DWM", "Enabled": true } } }
YAML
SampleDevice: Type: "AWS::IoT1Click::Device" Properties: DeviceId: G030PX0312744DWM Enabled: True