AWS::GreengrassV2::Deployment
Creates a continuous deployment for a target, which is a AWS IoT Greengrass core device or group of core devices. When you add a new core device to a group of core devices that has a deployment, AWS IoT Greengrass deploys that group's deployment to the new device.
You can define one deployment for each target. When you create a new deployment for a target that has an existing deployment, you replace the previous deployment. AWS IoT Greengrass applies the new deployment to the target devices.
You can only add, update, or delete up to 10 deployments at a time to a single target.
Every deployment has a revision number that indicates how many deployment revisions you define for a target. Use this operation to create a new revision of an existing deployment. This operation returns the revision number of the new deployment when you create it.
For more information, see the Create deployments in the AWS IoT Greengrass V2 Developer Guide.
Important
Deployment resources are deleted when you delete stacks. To keep the deployments in a
stack, you must specify "DeletionPolicy": "Retain"
on each deployment resource
in the stack template that you want to keep. For more information, see DeletionPolicy.
You can only delete up to 10 deployment resources at a time. If you delete more than 10 resources, you receive an error.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::GreengrassV2::Deployment", "Properties" : { "Components" :
{
, "DeploymentName" :Key
:Value
, ...}String
, "DeploymentPolicies" :DeploymentPolicies
, "IotJobConfiguration" :DeploymentIoTJobConfiguration
, "ParentTargetArn" :String
, "Tags" :{
, "TargetArn" :Key
:Value
, ...}String
} }
YAML
Type: AWS::GreengrassV2::Deployment Properties: Components:
DeploymentName:
Key
:Value
String
DeploymentPolicies:DeploymentPolicies
IotJobConfiguration:DeploymentIoTJobConfiguration
ParentTargetArn:String
Tags:TargetArn:
Key
:Value
String
Properties
Components
-
The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.
Required: No
Type: Object of ComponentDeploymentSpecification
Update requires: Replacement
DeploymentName
-
The name of the deployment.
Required: No
Type: String
Minimum:
1
Maximum:
256
Update requires: Replacement
DeploymentPolicies
-
The deployment policies for the deployment. These policies define how the deployment updates components and handles failure.
Required: No
Type: DeploymentPolicies
Update requires: Replacement
IotJobConfiguration
-
The job configuration for the deployment configuration. The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.
Required: No
Type: DeploymentIoTJobConfiguration
Update requires: Replacement
ParentTargetArn
-
The parent deployment's ARN for a subdeployment.
Required: No
Type: String
Pattern:
arn:[^:]*:iot:[^:]*:[0-9]+:thinggroup/.+
Update requires: Replacement
-
Application-specific metadata to attach to the deployment. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see Tag your AWS IoT Greengrass Version 2 resources in the AWS IoT Greengrass V2 Developer Guide.
This
Json
property type is processed as a map of key-value pairs. It uses the following format, which is different from mostTags
implementations in AWS CloudFormation templates."Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value" }
Required: No
Type: Object of String
Pattern:
.*
Maximum:
256
Update requires: No interruption
TargetArn
-
The ARN of the target AWS IoT thing or thing group.
Required: Yes
Type: String
Pattern:
arn:[^:]*:iot:[^:]*:[0-9]+:(thing|thinggroup)/.+
Update requires: Replacement
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the DeploymentId
.
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
.
DeploymentId
-
The ID of the deployment.