AWS::IoT1Click::Project
The AWS::IoT1Click::Project resource creates an empty project with a placement
template. A project contains zero or more placements that adhere to the placement
template
defined in the project. For more information, see CreateProject in the AWS IoT 1-Click Projects API Reference.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::IoT1Click::Project", "Properties" : { "Description" :String, "PlacementTemplate" : PlacementTemplate, "ProjectName" :String} }
YAML
Type: "AWS::IoT1Click::Project" Properties: Description:StringPlacementTemplate: PlacementTemplate ProjectName:String
Properties
Description-
An optional description for the project.
Required: No
Type: String
Update requires: No interruption
PlacementTemplate-
The template defining the placement to be created. A placement template defines placement default attributes and device templates. You cannot add or remove device templates after the project has been created. However, you can update
callbackOverridesfor the device templates using theUpdateProjectAPI.Required: Yes
Type: PlacementTemplate
Update requires: No interruption
ProjectName-
The name of the project to create.
Required: No
Type: String
Update requires: Replacement
Return Values
Ref
When you pass the logical ID of an AWS::IoT1Click::Project resource to the
intrinsic Ref function, the function returns the project ARN, such as
arn:aws:iot1click:us-west-2:0123456789012:projects/test-project.
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 Amazon Resource Name (ARN) of the project, such as
arn:aws:iot1click:us-east-1:123456789012:projects/project-a1bzhi. ProjectName-
The name of the project, such as
project-a1bzhi.
For more information about using Fn::GetAtt, see Fn::GetAtt.
Example
The following example declares an AWS IoT 1-Click project.
JSON
{ "Description": "AWS IoT1Click Project test", "Resources": { "BasicProject": { "Type": "AWS::IoT1Click::Project", "Properties": { "ProjectName": "project", "Description": "description", "PlacementTemplate": { "DefaultAttributes": { "Attribute": "Value", "Foo": "Bar" }, "DeviceTemplates": { "testButton": { "DeviceType": "button", "CallbackOverrides": { "onClickCallback": "" } } } } } } }, "Outputs": { "ProjectId": { "Value": { "Ref": "BasicProject" } } } }
YAML
Description: "AWS IoT1Click Project test" Resources: BasicProject: Type: "AWS::IoT1Click::Project" Properties: ProjectName: "project" Description: "description" PlacementTemplate: DefaultAttributes: Attribute: Value Foo: Bar DeviceTemplates: testButton: DeviceType: "button" CallbackOverrides: onClickCallback: "" Outputs: ProjectId: Value: !Ref BasicProject
