Class CfnDeployment
Creates a continuous deployment for a target, which is a AWS IoT Greengrass core device or group of core devices.
Inherited Members
Namespace: Amazon.CDK.AWS.GreengrassV2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnDeployment : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnDeployment
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
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.
CloudformationResource: AWS::GreengrassV2::Deployment
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.GreengrassV2;
var rateIncreaseCriteria;
var cfnDeployment = new CfnDeployment(this, "MyCfnDeployment", new CfnDeploymentProps {
TargetArn = "targetArn",
// the properties below are optional
Components = new Dictionary<string, object> {
{ "componentsKey", new ComponentDeploymentSpecificationProperty {
ComponentVersion = "componentVersion",
ConfigurationUpdate = new ComponentConfigurationUpdateProperty {
Merge = "merge",
Reset = new [] { "reset" }
},
RunWith = new ComponentRunWithProperty {
PosixUser = "posixUser",
SystemResourceLimits = new SystemResourceLimitsProperty {
Cpus = 123,
Memory = 123
},
WindowsUser = "windowsUser"
}
} }
},
DeploymentName = "deploymentName",
DeploymentPolicies = new DeploymentPoliciesProperty {
ComponentUpdatePolicy = new DeploymentComponentUpdatePolicyProperty {
Action = "action",
TimeoutInSeconds = 123
},
ConfigurationValidationPolicy = new DeploymentConfigurationValidationPolicyProperty {
TimeoutInSeconds = 123
},
FailureHandlingPolicy = "failureHandlingPolicy"
},
IotJobConfiguration = new DeploymentIoTJobConfigurationProperty {
AbortConfig = new IoTJobAbortConfigProperty {
CriteriaList = new [] { new IoTJobAbortCriteriaProperty {
Action = "action",
FailureType = "failureType",
MinNumberOfExecutedThings = 123,
ThresholdPercentage = 123
} }
},
JobExecutionsRolloutConfig = new IoTJobExecutionsRolloutConfigProperty {
ExponentialRate = new IoTJobExponentialRolloutRateProperty {
BaseRatePerMinute = 123,
IncrementFactor = 123,
RateIncreaseCriteria = rateIncreaseCriteria
},
MaximumPerMinute = 123
},
TimeoutConfig = new IoTJobTimeoutConfigProperty {
InProgressTimeoutInMinutes = 123
}
},
ParentTargetArn = "parentTargetArn",
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
}
});
Synopsis
Constructors
CfnDeployment(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnDeployment(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnDeployment(Construct, String, ICfnDeploymentProps) |
Properties
AttrDeploymentId | The ID of the deployment. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Components | The components to deploy. |
DeploymentName | The name of the deployment. |
DeploymentPolicies | The deployment policies for the deployment. |
IotJobConfiguration | The job configuration for the deployment configuration. |
ParentTargetArn | The parent deployment's ARN for a subdeployment. |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | Application-specific metadata to attach to the deployment. |
TargetArn | The ARN of the target AWS IoT thing or thing group. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnDeployment(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnDeployment(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnDeployment(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnDeployment(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnDeployment(Construct, String, ICfnDeploymentProps)
public CfnDeployment(Construct scope, string id, ICfnDeploymentProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnDeploymentProps
Resource properties.
Properties
AttrDeploymentId
The ID of the deployment.
public virtual string AttrDeploymentId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: DeploymentId
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Components
The components to deploy.
public virtual object Components { get; set; }
Property Value
System.Object
DeploymentName
The name of the deployment.
public virtual string DeploymentName { get; set; }
Property Value
System.String
DeploymentPolicies
The deployment policies for the deployment.
public virtual object DeploymentPolicies { get; set; }
Property Value
System.Object
IotJobConfiguration
The job configuration for the deployment configuration.
public virtual object IotJobConfiguration { get; set; }
Property Value
System.Object
ParentTargetArn
The parent deployment's ARN for a subdeployment.
public virtual string ParentTargetArn { get; set; }
Property Value
System.String
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
Application-specific metadata to attach to the deployment.
public virtual IDictionary<string, string> TagsRaw { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
TargetArn
The ARN of the target AWS IoT thing or thing group.
public virtual string TargetArn { get; set; }
Property Value
System.String
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>