This is the new Amazon CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the Amazon CloudFormation User Guide.
AWS::IoT::ThingPrincipalAttachment
Use the AWS::IoT::ThingPrincipalAttachment resource to attach a principal
         (an X.509 certificate or another credential) to a thing.
For more information about working with Amazon IoT things and principals, see Authorization in the Amazon IoT Developer Guide.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::IoT::ThingPrincipalAttachment", "Properties" : { "Principal" :String, "ThingName" :String, "ThingPrincipalType" :String} }
YAML
Type: AWS::IoT::ThingPrincipalAttachment Properties: Principal:StringThingName:StringThingPrincipalType:String
Properties
- Principal
- 
                    The principal, which can be a certificate ARN (as returned from the CreateCertificateoperation) or an Amazon Cognito ID.Required: Yes Type: String Update requires: Replacement 
- ThingName
- 
                    The name of the Amazon IoT thing. Required: Yes Type: String Update requires: Replacement 
- ThingPrincipalType
- Property description not available. - Required: No - Type: String - Update requires: No interruption 
Examples
The following example attaches a principal to a thing.
JSON
{ "AWSTemplateFormatVersion": "2010-09-09", "Parameters": { "NameParameter": { "Type": "String", "Description": "Name of the IoT Thing to attach the principal to" } }, "Resources": { "MyThingPrincipalAttachment": { "Type": "AWS::IoT::ThingPrincipalAttachment", "Properties": { "ThingName": { "Ref": "NameParameter" }, "Principal": "arn:aws:iot:ap-southeast-2:123456789012:cert/a1234567b89c012d3e4fg567hij8k9l01mno1p23q45678901rs234567890t1u2" } } } }
YAML
AWSTemplateFormatVersion: '2010-09-09' Resources: MyThingPrincipalAttachment: Type: AWS::IoT::ThingPrincipalAttachment Properties: ThingName: Ref: NameParameter Principal: arn:aws:iot:ap-southeast-2:123456789012:cert/a1234567b89c012d3e4fg567hij8k9l01mno1p23q45678901rs234567890t1u2 Parameters: NameParameter: Type: String