AWS::GreengrassV2::Deployment
Creates a continuous deployment for a target, which is a Amazon 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, Amazon 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. Amazon 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 Amazon 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 Amazon 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:ValueStringDeploymentPolicies:DeploymentPoliciesIotJobConfiguration:DeploymentIoTJobConfigurationParentTargetArn:StringTags:TargetArn:Key:ValueString
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: Map of ComponentDeploymentSpecification
Update requires: Replacement
DeploymentName-
The name of the deployment.
Required: No
Type: String
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
Update requires: Replacement
Tags-
Application-specific metadata to attach to the deployment. You can use tags in IAM policies to control access to Amazon IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see Tag your Amazon IoT Greengrass Version 2 resources in the Amazon IoT Greengrass V2 Developer Guide.
This
Jsonproperty type is processed as a map of key-value pairs. It uses the following format, which is different from mostTagsimplementations in Amazon CloudFormation templates."Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value" }Required: No
Type: Map of String
Update requires: No interruption
TargetArn-
The ARN of the target Amazon IoT thing or thing group.
Required: Yes
Type: String
Update requires: Replacement
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Reffunction, Refreturns the DeploymentId.
For more information about using the Reffunction, see Ref.
Fn::GetAtt
The Fn::GetAttintrinsic 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::GetAttintrinsic function, see Fn::GetAtt.