AWS::IoT::Certificate
Use the AWS::IoT::Certificate resource to declare an X.509 certificate.
For information about working with X.509 certificates, see Authentication in AWS IoT in the AWS IoT Developer Guide.
Syntax
JSON
{ "Type": "AWS::IoT::Certificate", "Properties": { "CertificateSigningRequest":String, "Status":String} }
YAML
Type: AWS::IoT::Certificate Properties: CertificateSigningRequest:StringStatus:String
Properties
CertificateSigningRequest-
The certificate signing request (CSR).
Required: Yes
Type: String
Update requires: Replacement
Status-
The status of the certificate.
Required: Yes
Type: String
Update requires: No interruption
Return Values
Ref
When you provide the logical ID of this resource to the Ref intrinsic
function, Ref returns the certificate ID. For
example:
{ "Ref": "MyCertificate" }
A value similar to the following is returned:
a1234567b89c012d3e4fg567hij8k9l01mno1p23q45678901rs234567890t1u2
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-
Returns the Amazon Resource Name (ARN) for the instance profile. For example:
{ "Fn::GetAtt": ["MyCertificate", "Arn"] }A value similar to the following is returned:
arn:aws:iot:ap-southeast-2:123456789012:cert/a1234567b89c012d3e4fg567hij8k9l01mno1p23q45678901rs234567890t1u2
For more information about using Fn::GetAtt, see Fn::GetAtt.
Example
The following example declares an X.509 certificate and its status.
JSON
{ "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "MyCertificate": { "Type": "AWS::IoT::Certificate", "Properties": { "CertificateSigningRequest": { "Ref": "CSRParameter" }, "Status": { "Ref": "StatusParameter" } } } }, "Parameters": { "CSRParameter": { "Type": "String" }, "StatusParameter": { "Type": "String" } } }
YAML
AWSTemplateFormatVersion: "2010-09-09" Resources: MyCertificate: Type: AWS::IoT::Certificate Properties: CertificateSigningRequest: Ref: "CSRParameter" Status: Ref: "StatusParameter" Parameters: CSRParameter: Type: "String" StatusParameter: Type: "String"
