AWS::IoT::SoftwarePackageVersion - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

AWS::IoT::SoftwarePackageVersion

Use the AWS::IoT::SoftwarePackageVersion resource to create a software package version.

For information about working with software package versions, see Amazon IoT Device Management Software Package Catalog and Creating a software package and package version in the Amazon IoT Developer Guide. See also, CreatePackageVersion in the API Guide.

Note

The associated software package must exist before the package version is created. If you create a software package and package version in the same CloudFormation template, set the software package as a dependency of the package version. If they are created out of sequence, you will receive an error.

Package versions and created in a draft state, for more information, see Package version lifecycle. To change the package version state after it’s created, use the UpdatePackageVersionAPI command.

Syntax

To declare this entity in your Amazon CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::IoT::SoftwarePackageVersion", "Properties" : { "Attributes" : {Key: Value, ...}, "Description" : String, "PackageName" : String, "Tags" : [ Tag, ... ], "VersionName" : String } }

YAML

Type: AWS::IoT::SoftwarePackageVersion Properties: Attributes: Key: Value Description: String PackageName: String Tags: - Tag VersionName: String

Properties

Attributes

Property description not available.

Required: No

Type: Object of String

Pattern: ^[a-zA-Z0-9:_-]+$

Minimum: 1

Update requires: No interruption

Description

Property description not available.

Required: No

Type: String

Pattern: ^[^\p{C}]+$

Minimum: 0

Maximum: 1024

Update requires: No interruption

PackageName

Property description not available.

Required: Yes

Type: String

Pattern: ^[a-zA-Z0-9-_.]+$

Minimum: 1

Maximum: 128

Update requires: Replacement

Tags

Property description not available.

Required: No

Type: Array of Tag

Maximum: 50

Update requires: No interruption

VersionName

Property description not available.

Required: No

Type: String

Pattern: ^[a-zA-Z0-9-_.]+$

Minimum: 1

Maximum: 64

Update requires: Replacement

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the software package name and package version. For example:

{ "Ref": "MyPackageVersion" }

Response:

package-name|version-name

For a stack named MyStack, a value that is similar to the following is returned:

MyStack-MyPackageVersion-AB1CDEFGHIJK

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

For example:

{ "GetAtt": "MySoftwarePackageVersion.PackageVersionArn" }

ErrorReason

Error reason for a package version failure during creation or update.

PackageVersionArn

The Amazon Resource Name (ARN) for the package.

Status

The status of the package version. For more information, see Package version lifecycle.

Examples

The following example declares a package version and the values of its attributes.

JSON

{ "AWSTemplateFormatVersion":"2010-09-09", "Resources":{ "MyPackageVersion":{ "Type": "AWS::IoT::SoftwarePackageVersion", "Properties": { "PackageName": "PackageName", "VersionName": "1.0.0", "Description": "description", "Tags": [ { "Key": "TagKey", "Value": "TagValue" } ] } } }

YAML

AWSTemplateFormatVersion: '2010-09-09' Resources: MyPackageVersion: Type: AWS::IoT::SoftwarePackageVersion Properties: PackageName: "PackageName" VersionName: "1.0.0" Description: "description" Tags: - Key: "TagKey" Value: "TagValue"