Class CfnDeployment
- All Implemented Interfaces:
IEnvironmentAware,IInspectable,ITaggable,IDeploymentRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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 .
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.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.greengrassv2.*;
Object rateIncreaseCriteria;
CfnDeployment cfnDeployment = CfnDeployment.Builder.create(this, "MyCfnDeployment")
.targetArn("targetArn")
// the properties below are optional
.components(Map.of(
"componentsKey", ComponentDeploymentSpecificationProperty.builder()
.componentVersion("componentVersion")
.configurationUpdate(ComponentConfigurationUpdateProperty.builder()
.merge("merge")
.reset(List.of("reset"))
.build())
.runWith(ComponentRunWithProperty.builder()
.posixUser("posixUser")
.systemResourceLimits(SystemResourceLimitsProperty.builder()
.cpus(123)
.memory(123)
.build())
.windowsUser("windowsUser")
.build())
.build()))
.deploymentName("deploymentName")
.deploymentPolicies(DeploymentPoliciesProperty.builder()
.componentUpdatePolicy(DeploymentComponentUpdatePolicyProperty.builder()
.action("action")
.timeoutInSeconds(123)
.build())
.configurationValidationPolicy(DeploymentConfigurationValidationPolicyProperty.builder()
.timeoutInSeconds(123)
.build())
.failureHandlingPolicy("failureHandlingPolicy")
.build())
.iotJobConfiguration(DeploymentIoTJobConfigurationProperty.builder()
.abortConfig(IoTJobAbortConfigProperty.builder()
.criteriaList(List.of(IoTJobAbortCriteriaProperty.builder()
.action("action")
.failureType("failureType")
.minNumberOfExecutedThings(123)
.thresholdPercentage(123)
.build()))
.build())
.jobExecutionsRolloutConfig(IoTJobExecutionsRolloutConfigProperty.builder()
.exponentialRate(IoTJobExponentialRolloutRateProperty.builder()
.baseRatePerMinute(123)
.incrementFactor(123)
.rateIncreaseCriteria(rateIncreaseCriteria)
.build())
.maximumPerMinute(123)
.build())
.timeoutConfig(IoTJobTimeoutConfigProperty.builder()
.inProgressTimeoutInMinutes(123)
.build())
.build())
.parentTargetArn("parentTargetArn")
.tags(Map.of(
"tagsKey", "tags"))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnDeployment.static interfaceContains information about a deployment's update to a component's configuration on AWS IoT Greengrass core devices.static interfaceContains information about a component to deploy.static interfaceContains information system user and group that the AWS IoT Greengrass Core software uses to run component processes on the core device.static interfaceContains information about a deployment's policy that defines when components are safe to update.static interfaceContains information about how long a component on a core device can validate its configuration updates before it times out.static interfaceContains information about an AWS IoT job configuration.static interfaceContains information about policies that define how a deployment updates components and handles failure.static interfaceContains a list of criteria that define when and how to cancel a configuration deployment.static interfaceContains criteria that define when and how to cancel a job.static interfaceContains information about the rollout configuration for a job.static interfaceContains information about an exponential rollout rate for a configuration deployment job.static interfaceContains information about the timeout configuration for a job.static interfaceContains information about system resource limits that the software applies to a component's processes.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.greengrassv2.IDeploymentRef
IDeploymentRef.Jsii$Default, IDeploymentRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnDeployment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDeployment(software.amazon.jsii.JsiiObjectRef objRef) CfnDeployment(software.constructs.Construct scope, String id, CfnDeploymentProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IDeploymentReffromDeploymentId(software.constructs.Construct scope, String id, String deploymentId) Creates a new IDeploymentRef from a deploymentId.The ID of the deployment.The components to deploy.The name of the deployment.The deployment policies for the deployment.A reference to a Deployment resource.The job configuration for the deployment configuration.The parent deployment's ARN for a subdeployment.getTags()Tag Manager which manages the tags for this resource.Application-specific metadata to attach to the deployment.The ARN of the target AWS IoT thing or thing group.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetComponents(Map<String, Object> value) The components to deploy.voidsetComponents(IResolvable value) The components to deploy.voidsetDeploymentName(String value) The name of the deployment.voidsetDeploymentPolicies(IResolvable value) The deployment policies for the deployment.voidThe deployment policies for the deployment.voidThe job configuration for the deployment configuration.voidThe job configuration for the deployment configuration.voidsetParentTargetArn(String value) The parent deployment's ARN for a subdeployment.voidsetTagsRaw(Map<String, String> value) Application-specific metadata to attach to the deployment.voidsetTargetArn(String value) The ARN of the target AWS IoT thing or thing group.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnDeployment
protected CfnDeployment(software.amazon.jsii.JsiiObjectRef objRef) -
CfnDeployment
protected CfnDeployment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnDeployment
@Stability(Stable) public CfnDeployment(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDeploymentProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
fromDeploymentId
@Stability(Stable) @NotNull public static IDeploymentRef fromDeploymentId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String deploymentId) Creates a new IDeploymentRef from a deploymentId.- Parameters:
scope- This parameter is required.id- This parameter is required.deploymentId- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrDeploymentId
The ID of the deployment. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getDeploymentRef
A reference to a Deployment resource.- Specified by:
getDeploymentRefin interfaceIDeploymentRef
-
getTags
Tag Manager which manages the tags for this resource. -
getTargetArn
The ARN of the target AWS IoT thing or thing group. -
setTargetArn
The ARN of the target AWS IoT thing or thing group. -
getComponents
The components to deploy.Returns union: either
IResolvableor Mapinvalid input: '<'String, eitherIResolvableorCfnDeployment.ComponentDeploymentSpecificationProperty> -
setComponents
The components to deploy. -
setComponents
The components to deploy. -
getDeploymentName
The name of the deployment. -
setDeploymentName
The name of the deployment. -
getDeploymentPolicies
The deployment policies for the deployment.Returns union: either
IResolvableorCfnDeployment.DeploymentPoliciesProperty -
setDeploymentPolicies
The deployment policies for the deployment. -
setDeploymentPolicies
@Stability(Stable) public void setDeploymentPolicies(@Nullable CfnDeployment.DeploymentPoliciesProperty value) The deployment policies for the deployment. -
getIotJobConfiguration
The job configuration for the deployment configuration.Returns union: either
IResolvableorCfnDeployment.DeploymentIoTJobConfigurationProperty -
setIotJobConfiguration
The job configuration for the deployment configuration. -
setIotJobConfiguration
@Stability(Stable) public void setIotJobConfiguration(@Nullable CfnDeployment.DeploymentIoTJobConfigurationProperty value) The job configuration for the deployment configuration. -
getParentTargetArn
The parent deployment's ARN for a subdeployment. -
setParentTargetArn
The parent deployment's ARN for a subdeployment. -
getTagsRaw
Application-specific metadata to attach to the deployment. -
setTagsRaw
Application-specific metadata to attach to the deployment.
-