AWS::IoT1Click::Placement
The AWS::IoT1Click::Placement resource creates a placement to be associated
with an AWS IoT 1-Click project. For more information, see Projects, Templates,
and Placements in the AWS IoT 1-Click Developer Guide.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::IoT1Click::Placement", "Properties" : { "AssociatedDevices" :Json, "Attributes" :Json, "PlacementName" :String, "ProjectName" :String} }
YAML
Type: "AWS::IoT1Click::Placement" Properties: AssociatedDevices:JsonAttributes:JsonPlacementName:StringProjectName:String
Properties
AssociatedDevices-
The device(s) to associate with the placement, as defined by a mapping of zero or more key/value pairs wherein the key is a template name and the value is a device ID.
Required: No
Type: Json
Update requires: Replacement
Attributes-
User specified attribute(s) in the form of key/value pairs.
Required: No
Type: Json
Update requires: No interruption
PlacementName-
The name of this placement.
Required: No
Type: String
Update requires: Replacement
ProjectName-
The name of the project that will contain this placement.
Required: Yes
Type: String
Update requires: Replacement
Return Values
Ref
When you pass the logical ID of an AWS::IoT1Click::Placement resource to
the intrinsic Ref function, the function returns a string of the form
projects/
where A/placements/BA is the name of the project and
B is the name of the placement.
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.
PlacementName-
The name of the placement, such as
floor17. ProjectName-
The name of the project containing the placement, such as
conference-rooms.
For more information about using Fn::GetAtt, see Fn::GetAtt.
Example
The following example declares a project and placement.
JSON
{ "BasicProjectWithPlacement": { "Type": "AWS::IoT1Click::Project", "Properties": { "ProjectName": "project-with-placements", "Description": "description", "PlacementTemplate": { "DefaultAttributes": { "Attribute": "Value", "Foo": "Bar" }, "DeviceTemplates": { "testButton": { "DeviceType": "button", "CallbackOverrides": { "onClickCallback": "" } } } } } }, "BasicPlacement": { "Type": "AWS::IoT1Click::Placement", "Properties": { "ProjectName": { "Ref": "BasicProjectWithPlacement" }, "PlacementName": "placement" } } }
YAML
BasicProjectWithPlacement: Type: "AWS::IoT1Click::Project" Properties: ProjectName: "project-with-placements" Description: "description" PlacementTemplate: DefaultAttributes: Attribute: Value Foo: Bar DeviceTemplates: testButton: DeviceType: "button" CallbackOverrides: onClickCallback: "" BasicPlacement: Type: "AWS::IoT1Click::Placement" Properties: ProjectName: !Ref BasicProjectWithPlacement PlacementName: "placement"
