AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::IoT1Click::Device

The AWS::IoT1Click::Device resource controls the enabled state of an AWS IoT 1-Click compatible device. For more information, see Device in the AWS IoT 1-Click Devices API Reference.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::IoT1Click::Device", "Properties" : { "DeviceId" : String, "Enabled" : String } }

YAML

Type: "AWS::IoT1Click::Device" Properties: DeviceId: String Enabled: String

Properties

DeviceId

The unique identifier of the device.

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 an AWS::IoT1Click::Device resource to the intrinsic Ref function, the function returns the device ARN, such as arn:aws:iot1click:us-west-2:123456789012:devices/G030PX0312744DWM.

For more information about using the Ref function, see Ref.

Fn::GetAtt

Fn::GetAtt returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

Arn

The ARN of the device, such as arn:aws:iot1click:us-west-2:123456789012:devices/G030PX0312744DWM.

DeviceId

The ID of the device, such as G030PX0312744DWM.

Enabled

A Boolean value indicating whether the device is enabled (true) or not (false).

For more information about using Fn::GetAtt, see Fn::GetAtt.

Examples

The following example enables a device.

JSON

{ "SampleDevice": { "Type": "AWS::IoT1Click::Device", "Properties": { "DeviceId": "G030PX0312744DWM", "Enabled": true } } }

YAML

SampleDevice: Type: "AWS::IoT1Click::Device" Properties: DeviceId: G030PX0312744DWM Enabled: True

See Also