AWS CloudFormation
User Guide (API Version 2010-05-15)
AWS 服务或AWS文档中描述的功能,可能因地区/位置而异。请点击 Amazon AWS 入门,可查看中国地区的具体差异

AWS::IoT::ThingPrincipalAttachment

使用 AWS::IoT::ThingPrincipalAttachment 资源将委托人(X.509 证书或其他凭证)附加到事务。

有关使用 AWS IoT 事务和委托人的信息,请参阅 AWS IoT 开发人员指南 中的授权

语法

要在 AWS CloudFormation 模板中声明此实体,请使用以下语法:

JSON

{ "Type": "AWS::IoT::ThingPrincipalAttachment", "Properties": { "Principal": String, "ThingName": String } }

YAML

Type: "AWS::IoT::ThingPrincipalAttachment" Properties: Principal: String ThingName: String

属性

Principal

委托人,可以是证书 ARN(从 CreateCertificate 操作中返回)或 Amazon Cognito ID。

Required: Yes

Type: String

更新要求替换

ThingName

AWS IoT 事务的名称。

Required: Yes

Type: String

更新要求替换

示例

以下示例将委托人附加到事务。

JSON

{ "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" } } }

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"

本页内容: