CfnDeployment

class aws_cdk.aws_greengrassv2.CfnDeployment(scope, id, *, target_arn, components=None, deployment_name=None, deployment_policies=None, iot_job_configuration=None, parent_target_arn=None, tags=None)

Bases: CfnResource

A CloudFormation 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 . .. epigraph:

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 <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html>`_ .

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

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrassv2-deployment.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_greengrassv2 as greengrassv2

# rate_increase_criteria: Any

cfn_deployment = greengrassv2.CfnDeployment(self, "MyCfnDeployment",
    target_arn="targetArn",

    # the properties below are optional
    components={
        "components_key": greengrassv2.CfnDeployment.ComponentDeploymentSpecificationProperty(
            component_version="componentVersion",
            configuration_update=greengrassv2.CfnDeployment.ComponentConfigurationUpdateProperty(
                merge="merge",
                reset=["reset"]
            ),
            run_with=greengrassv2.CfnDeployment.ComponentRunWithProperty(
                posix_user="posixUser",
                system_resource_limits=greengrassv2.CfnDeployment.SystemResourceLimitsProperty(
                    cpus=123,
                    memory=123
                ),
                windows_user="windowsUser"
            )
        )
    },
    deployment_name="deploymentName",
    deployment_policies=greengrassv2.CfnDeployment.DeploymentPoliciesProperty(
        component_update_policy=greengrassv2.CfnDeployment.DeploymentComponentUpdatePolicyProperty(
            action="action",
            timeout_in_seconds=123
        ),
        configuration_validation_policy=greengrassv2.CfnDeployment.DeploymentConfigurationValidationPolicyProperty(
            timeout_in_seconds=123
        ),
        failure_handling_policy="failureHandlingPolicy"
    ),
    iot_job_configuration=greengrassv2.CfnDeployment.DeploymentIoTJobConfigurationProperty(
        abort_config=greengrassv2.CfnDeployment.IoTJobAbortConfigProperty(
            criteria_list=[greengrassv2.CfnDeployment.IoTJobAbortCriteriaProperty(
                action="action",
                failure_type="failureType",
                min_number_of_executed_things=123,
                threshold_percentage=123
            )]
        ),
        job_executions_rollout_config=greengrassv2.CfnDeployment.IoTJobExecutionsRolloutConfigProperty(
            exponential_rate=greengrassv2.CfnDeployment.IoTJobExponentialRolloutRateProperty(
                base_rate_per_minute=123,
                increment_factor=123,
                rate_increase_criteria=rate_increase_criteria
            ),
            maximum_per_minute=123
        ),
        timeout_config=greengrassv2.CfnDeployment.IoTJobTimeoutConfigProperty(
            in_progress_timeout_in_minutes=123
        )
    ),
    parent_target_arn="parentTargetArn",
    tags={
        "tags_key": "tags"
    }
)

Create a new AWS::GreengrassV2::Deployment.

Parameters:
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • target_arn (str) – The ARN of the target AWS IoT thing or thing group.

  • components (Union[IResolvable, Mapping[str, Union[IResolvable, ComponentDeploymentSpecificationProperty, Dict[str, Any]]], None]) – 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.

  • deployment_name (Optional[str]) – The name of the deployment.

  • deployment_policies (Union[IResolvable, DeploymentPoliciesProperty, Dict[str, Any], None]) – The deployment policies for the deployment. These policies define how the deployment updates components and handles failure.

  • iot_job_configuration (Union[IResolvable, DeploymentIoTJobConfigurationProperty, Dict[str, Any], None]) – The job configuration for the deployment configuration. The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.

  • parent_target_arn (Optional[str]) – The parent deployment’s ARN for a subdeployment.

  • tags (Optional[Mapping[str, str]]) – 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 most Tags implementations in AWS CloudFormation templates:: “Tags”: { “KeyName0”: “value”, “KeyName1”: “value”, “KeyName2”: “value” }

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type:

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:

attribute_name (str) – The name of the attribute.

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type:

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::GreengrassV2::Deployment'
attr_deployment_id

The ID of the deployment.

CloudformationAttribute:

DeploymentId

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrassv2-deployment.html#cfn-greengrassv2-deployment-components

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

deployment_name

The name of the deployment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrassv2-deployment.html#cfn-greengrassv2-deployment-deploymentname

deployment_policies

The deployment policies for the deployment.

These policies define how the deployment updates components and handles failure.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrassv2-deployment.html#cfn-greengrassv2-deployment-deploymentpolicies

iot_job_configuration

The job configuration for the deployment configuration.

The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrassv2-deployment.html#cfn-greengrassv2-deployment-iotjobconfiguration

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

node

The construct tree node associated with this construct.

parent_target_arn

//docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`_ for a subdeployment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrassv2-deployment.html#cfn-greengrassv2-deployment-parenttargetarn

Type:

The parent deployment’s `ARN <https

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

tags

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 most Tags implementations in AWS CloudFormation templates:

"Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value"
}
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrassv2-deployment.html#cfn-greengrassv2-deployment-tags

target_arn

The ARN of the target AWS IoT thing or thing group.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrassv2-deployment.html#cfn-greengrassv2-deployment-targetarn

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters:

construct (IConstruct) –

Return type:

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters:

x (Any) –

Return type:

bool

ComponentConfigurationUpdateProperty

class CfnDeployment.ComponentConfigurationUpdateProperty(*, merge=None, reset=None)

Bases: object

Contains information about a deployment’s update to a component’s configuration on AWS IoT Greengrass core devices.

For more information, see Update component configurations in the AWS IoT Greengrass V2 Developer Guide .

Parameters:
  • merge (Optional[str]) – A serialized JSON string that contains the configuration object to merge to target devices. The core device merges this configuration with the component’s existing configuration. If this is the first time a component deploys on a device, the core device merges this configuration with the component’s default configuration. This means that the core device keeps it’s existing configuration for keys and values that you don’t specify in this object. For more information, see Merge configuration updates in the AWS IoT Greengrass V2 Developer Guide .

  • reset (Optional[Sequence[str]]) – The list of configuration nodes to reset to default values on target devices. Use JSON pointers to specify each node to reset. JSON pointers start with a forward slash ( / ) and use forward slashes to separate the key for each level in the object. For more information, see the JSON pointer specification and Reset configuration updates in the AWS IoT Greengrass V2 Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-componentconfigurationupdate.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_greengrassv2 as greengrassv2

component_configuration_update_property = greengrassv2.CfnDeployment.ComponentConfigurationUpdateProperty(
    merge="merge",
    reset=["reset"]
)

Attributes

merge

A serialized JSON string that contains the configuration object to merge to target devices.

The core device merges this configuration with the component’s existing configuration. If this is the first time a component deploys on a device, the core device merges this configuration with the component’s default configuration. This means that the core device keeps it’s existing configuration for keys and values that you don’t specify in this object. For more information, see Merge configuration updates in the AWS IoT Greengrass V2 Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-componentconfigurationupdate.html#cfn-greengrassv2-deployment-componentconfigurationupdate-merge

reset

The list of configuration nodes to reset to default values on target devices.

Use JSON pointers to specify each node to reset. JSON pointers start with a forward slash ( / ) and use forward slashes to separate the key for each level in the object. For more information, see the JSON pointer specification and Reset configuration updates in the AWS IoT Greengrass V2 Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-componentconfigurationupdate.html#cfn-greengrassv2-deployment-componentconfigurationupdate-reset

ComponentDeploymentSpecificationProperty

class CfnDeployment.ComponentDeploymentSpecificationProperty(*, component_version=None, configuration_update=None, run_with=None)

Bases: object

Contains information about a component to deploy.

Parameters:
  • component_version (Optional[str]) – The version of the component.

  • configuration_update (Union[IResolvable, ComponentConfigurationUpdateProperty, Dict[str, Any], None]) – The configuration updates to deploy for the component. You can define reset updates and merge updates. A reset updates the keys that you specify to the default configuration for the component. A merge updates the core device’s component configuration with the keys and values that you specify. The AWS IoT Greengrass Core software applies reset updates before it applies merge updates. For more information, see Update component configuration .

  • run_with (Union[IResolvable, ComponentRunWithProperty, Dict[str, Any], None]) – The system user and group that the software uses to run component processes on the core device. If you omit this parameter, the software uses the system user and group that you configure for the core device. For more information, see Configure the user and group that run components in the AWS IoT Greengrass V2 Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-componentdeploymentspecification.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_greengrassv2 as greengrassv2

component_deployment_specification_property = greengrassv2.CfnDeployment.ComponentDeploymentSpecificationProperty(
    component_version="componentVersion",
    configuration_update=greengrassv2.CfnDeployment.ComponentConfigurationUpdateProperty(
        merge="merge",
        reset=["reset"]
    ),
    run_with=greengrassv2.CfnDeployment.ComponentRunWithProperty(
        posix_user="posixUser",
        system_resource_limits=greengrassv2.CfnDeployment.SystemResourceLimitsProperty(
            cpus=123,
            memory=123
        ),
        windows_user="windowsUser"
    )
)

Attributes

component_version

The version of the component.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-componentdeploymentspecification.html#cfn-greengrassv2-deployment-componentdeploymentspecification-componentversion

configuration_update

The configuration updates to deploy for the component.

You can define reset updates and merge updates. A reset updates the keys that you specify to the default configuration for the component. A merge updates the core device’s component configuration with the keys and values that you specify. The AWS IoT Greengrass Core software applies reset updates before it applies merge updates. For more information, see Update component configuration .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-componentdeploymentspecification.html#cfn-greengrassv2-deployment-componentdeploymentspecification-configurationupdate

run_with

The system user and group that the software uses to run component processes on the core device.

If you omit this parameter, the software uses the system user and group that you configure for the core device. For more information, see Configure the user and group that run components in the AWS IoT Greengrass V2 Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-componentdeploymentspecification.html#cfn-greengrassv2-deployment-componentdeploymentspecification-runwith

ComponentRunWithProperty

class CfnDeployment.ComponentRunWithProperty(*, posix_user=None, system_resource_limits=None, windows_user=None)

Bases: object

Contains information system user and group that the AWS IoT Greengrass Core software uses to run component processes on the core device.

For more information, see Configure the user and group that run components in the AWS IoT Greengrass V2 Developer Guide .

Parameters:
  • posix_user (Optional[str]) – The POSIX system user and (optional) group to use to run this component. Specify the user and group separated by a colon ( : ) in the following format: user:group . The group is optional. If you don’t specify a group, the AWS IoT Greengrass Core software uses the primary user for the group.

  • system_resource_limits (Union[IResolvable, SystemResourceLimitsProperty, Dict[str, Any], None]) – The system resource limits to apply to this component’s process on the core device. AWS IoT Greengrass supports this feature only on Linux core devices. If you omit this parameter, the AWS IoT Greengrass Core software uses the default system resource limits that you configure on the AWS IoT Greengrass nucleus component. For more information, see Configure system resource limits for components .

  • windows_user (Optional[str]) –

    The Windows user to use to run this component on Windows core devices. The user must exist on each Windows core device, and its name and password must be in the LocalSystem account’s Credentials Manager instance. If you omit this parameter, the AWS IoT Greengrass Core software uses the default Windows user that you configure on the AWS IoT Greengrass nucleus component. For more information, see Configure the user and group that run components .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-componentrunwith.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_greengrassv2 as greengrassv2

component_run_with_property = greengrassv2.CfnDeployment.ComponentRunWithProperty(
    posix_user="posixUser",
    system_resource_limits=greengrassv2.CfnDeployment.SystemResourceLimitsProperty(
        cpus=123,
        memory=123
    ),
    windows_user="windowsUser"
)

Attributes

posix_user

The POSIX system user and (optional) group to use to run this component.

Specify the user and group separated by a colon ( : ) in the following format: user:group . The group is optional. If you don’t specify a group, the AWS IoT Greengrass Core software uses the primary user for the group.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-componentrunwith.html#cfn-greengrassv2-deployment-componentrunwith-posixuser

system_resource_limits

The system resource limits to apply to this component’s process on the core device.

AWS IoT Greengrass supports this feature only on Linux core devices.

If you omit this parameter, the AWS IoT Greengrass Core software uses the default system resource limits that you configure on the AWS IoT Greengrass nucleus component. For more information, see Configure system resource limits for components .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-componentrunwith.html#cfn-greengrassv2-deployment-componentrunwith-systemresourcelimits

windows_user

The Windows user to use to run this component on Windows core devices.

The user must exist on each Windows core device, and its name and password must be in the LocalSystem account’s Credentials Manager instance.

If you omit this parameter, the AWS IoT Greengrass Core software uses the default Windows user that you configure on the AWS IoT Greengrass nucleus component. For more information, see Configure the user and group that run components .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-componentrunwith.html#cfn-greengrassv2-deployment-componentrunwith-windowsuser

DeploymentComponentUpdatePolicyProperty

class CfnDeployment.DeploymentComponentUpdatePolicyProperty(*, action=None, timeout_in_seconds=None)

Bases: object

Contains information about a deployment’s policy that defines when components are safe to update.

Each component on a device can report whether or not it’s ready to update. After a component and its dependencies are ready, they can apply the update in the deployment. You can configure whether or not the deployment notifies components of an update and waits for a response. You specify the amount of time each component has to respond to the update notification.

Parameters:
  • action (Optional[str]) –

    Whether or not to notify components and wait for components to become safe to update. Choose from the following options: - NOTIFY_COMPONENTS – The deployment notifies each component before it stops and updates that component. Components can use the SubscribeToComponentUpdates IPC operation to receive these notifications. Then, components can respond with the DeferComponentUpdate IPC operation. For more information, see the Create deployments in the AWS IoT Greengrass V2 Developer Guide . - SKIP_NOTIFY_COMPONENTS – The deployment doesn’t notify components or wait for them to be safe to update. Default: NOTIFY_COMPONENTS

  • timeout_in_seconds (Union[int, float, None]) – The amount of time in seconds that each component on a device has to report that it’s safe to update. If the component waits for longer than this timeout, then the deployment proceeds on the device. Default: 60

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-deploymentcomponentupdatepolicy.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_greengrassv2 as greengrassv2

deployment_component_update_policy_property = greengrassv2.CfnDeployment.DeploymentComponentUpdatePolicyProperty(
    action="action",
    timeout_in_seconds=123
)

Attributes

action

Whether or not to notify components and wait for components to become safe to update.

Choose from the following options:

  • NOTIFY_COMPONENTS – The deployment notifies each component before it stops and updates that component. Components can use the SubscribeToComponentUpdates IPC operation to receive these notifications. Then, components can respond with the DeferComponentUpdate IPC operation. For more information, see the Create deployments in the AWS IoT Greengrass V2 Developer Guide .

  • SKIP_NOTIFY_COMPONENTS – The deployment doesn’t notify components or wait for them to be safe to update.

Default: NOTIFY_COMPONENTS

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-deploymentcomponentupdatepolicy.html#cfn-greengrassv2-deployment-deploymentcomponentupdatepolicy-action

timeout_in_seconds

The amount of time in seconds that each component on a device has to report that it’s safe to update.

If the component waits for longer than this timeout, then the deployment proceeds on the device.

Default: 60

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-deploymentcomponentupdatepolicy.html#cfn-greengrassv2-deployment-deploymentcomponentupdatepolicy-timeoutinseconds

DeploymentConfigurationValidationPolicyProperty

class CfnDeployment.DeploymentConfigurationValidationPolicyProperty(*, timeout_in_seconds=None)

Bases: object

Contains information about how long a component on a core device can validate its configuration updates before it times out.

Components can use the SubscribeToValidateConfigurationUpdates IPC operation to receive notifications when a deployment specifies a configuration update. Then, components can respond with the SendConfigurationValidityReport IPC operation. For more information, see the Create deployments in the AWS IoT Greengrass V2 Developer Guide .

Parameters:

timeout_in_seconds (Union[int, float, None]) – The amount of time in seconds that a component can validate its configuration updates. If the validation time exceeds this timeout, then the deployment proceeds for the device. Default: 30

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-deploymentconfigurationvalidationpolicy.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_greengrassv2 as greengrassv2

deployment_configuration_validation_policy_property = greengrassv2.CfnDeployment.DeploymentConfigurationValidationPolicyProperty(
    timeout_in_seconds=123
)

Attributes

timeout_in_seconds

The amount of time in seconds that a component can validate its configuration updates.

If the validation time exceeds this timeout, then the deployment proceeds for the device.

Default: 30

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-deploymentconfigurationvalidationpolicy.html#cfn-greengrassv2-deployment-deploymentconfigurationvalidationpolicy-timeoutinseconds

DeploymentIoTJobConfigurationProperty

class CfnDeployment.DeploymentIoTJobConfigurationProperty(*, abort_config=None, job_executions_rollout_config=None, timeout_config=None)

Bases: object

Contains information about an AWS IoT job configuration.

Parameters:
  • abort_config (Union[IResolvable, IoTJobAbortConfigProperty, Dict[str, Any], None]) – The stop configuration for the job. This configuration defines when and how to stop a job rollout.

  • job_executions_rollout_config (Union[IResolvable, IoTJobExecutionsRolloutConfigProperty, Dict[str, Any], None]) – The rollout configuration for the job. This configuration defines the rate at which the job rolls out to the fleet of target devices.

  • timeout_config (Union[IResolvable, IoTJobTimeoutConfigProperty, Dict[str, Any], None]) – The timeout configuration for the job. This configuration defines the amount of time each device has to complete the job.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-deploymentiotjobconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_greengrassv2 as greengrassv2

# rate_increase_criteria: Any

deployment_io_tJob_configuration_property = greengrassv2.CfnDeployment.DeploymentIoTJobConfigurationProperty(
    abort_config=greengrassv2.CfnDeployment.IoTJobAbortConfigProperty(
        criteria_list=[greengrassv2.CfnDeployment.IoTJobAbortCriteriaProperty(
            action="action",
            failure_type="failureType",
            min_number_of_executed_things=123,
            threshold_percentage=123
        )]
    ),
    job_executions_rollout_config=greengrassv2.CfnDeployment.IoTJobExecutionsRolloutConfigProperty(
        exponential_rate=greengrassv2.CfnDeployment.IoTJobExponentialRolloutRateProperty(
            base_rate_per_minute=123,
            increment_factor=123,
            rate_increase_criteria=rate_increase_criteria
        ),
        maximum_per_minute=123
    ),
    timeout_config=greengrassv2.CfnDeployment.IoTJobTimeoutConfigProperty(
        in_progress_timeout_in_minutes=123
    )
)

Attributes

abort_config

The stop configuration for the job.

This configuration defines when and how to stop a job rollout.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-deploymentiotjobconfiguration.html#cfn-greengrassv2-deployment-deploymentiotjobconfiguration-abortconfig

job_executions_rollout_config

The rollout configuration for the job.

This configuration defines the rate at which the job rolls out to the fleet of target devices.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-deploymentiotjobconfiguration.html#cfn-greengrassv2-deployment-deploymentiotjobconfiguration-jobexecutionsrolloutconfig

timeout_config

The timeout configuration for the job.

This configuration defines the amount of time each device has to complete the job.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-deploymentiotjobconfiguration.html#cfn-greengrassv2-deployment-deploymentiotjobconfiguration-timeoutconfig

DeploymentPoliciesProperty

class CfnDeployment.DeploymentPoliciesProperty(*, component_update_policy=None, configuration_validation_policy=None, failure_handling_policy=None)

Bases: object

Contains information about policies that define how a deployment updates components and handles failure.

Parameters:
  • component_update_policy (Union[IResolvable, DeploymentComponentUpdatePolicyProperty, Dict[str, Any], None]) – The component update policy for the configuration deployment. This policy defines when it’s safe to deploy the configuration to devices.

  • configuration_validation_policy (Union[IResolvable, DeploymentConfigurationValidationPolicyProperty, Dict[str, Any], None]) – The configuration validation policy for the configuration deployment. This policy defines how long each component has to validate its configure updates.

  • failure_handling_policy (Optional[str]) – The failure handling policy for the configuration deployment. This policy defines what to do if the deployment fails. Default: ROLLBACK

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-deploymentpolicies.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_greengrassv2 as greengrassv2

deployment_policies_property = greengrassv2.CfnDeployment.DeploymentPoliciesProperty(
    component_update_policy=greengrassv2.CfnDeployment.DeploymentComponentUpdatePolicyProperty(
        action="action",
        timeout_in_seconds=123
    ),
    configuration_validation_policy=greengrassv2.CfnDeployment.DeploymentConfigurationValidationPolicyProperty(
        timeout_in_seconds=123
    ),
    failure_handling_policy="failureHandlingPolicy"
)

Attributes

component_update_policy

The component update policy for the configuration deployment.

This policy defines when it’s safe to deploy the configuration to devices.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-deploymentpolicies.html#cfn-greengrassv2-deployment-deploymentpolicies-componentupdatepolicy

configuration_validation_policy

The configuration validation policy for the configuration deployment.

This policy defines how long each component has to validate its configure updates.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-deploymentpolicies.html#cfn-greengrassv2-deployment-deploymentpolicies-configurationvalidationpolicy

failure_handling_policy

The failure handling policy for the configuration deployment. This policy defines what to do if the deployment fails.

Default: ROLLBACK

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-deploymentpolicies.html#cfn-greengrassv2-deployment-deploymentpolicies-failurehandlingpolicy

IoTJobAbortConfigProperty

class CfnDeployment.IoTJobAbortConfigProperty(*, criteria_list)

Bases: object

Contains a list of criteria that define when and how to cancel a configuration deployment.

Parameters:

criteria_list (Union[IResolvable, Sequence[Union[IResolvable, IoTJobAbortCriteriaProperty, Dict[str, Any]]]]) – The list of criteria that define when and how to cancel the configuration deployment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobabortconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_greengrassv2 as greengrassv2

io_tJob_abort_config_property = greengrassv2.CfnDeployment.IoTJobAbortConfigProperty(
    criteria_list=[greengrassv2.CfnDeployment.IoTJobAbortCriteriaProperty(
        action="action",
        failure_type="failureType",
        min_number_of_executed_things=123,
        threshold_percentage=123
    )]
)

Attributes

criteria_list

The list of criteria that define when and how to cancel the configuration deployment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobabortconfig.html#cfn-greengrassv2-deployment-iotjobabortconfig-criterialist

IoTJobAbortCriteriaProperty

class CfnDeployment.IoTJobAbortCriteriaProperty(*, action, failure_type, min_number_of_executed_things, threshold_percentage)

Bases: object

Contains criteria that define when and how to cancel a job.

The deployment stops if the following conditions are true:

  • The number of things that receive the deployment exceeds the minNumberOfExecutedThings .

  • The percentage of failures with type failureType exceeds the thresholdPercentage .

Parameters:
  • action (str) – The action to perform when the criteria are met.

  • failure_type (str) – The type of job deployment failure that can cancel a job.

  • min_number_of_executed_things (Union[int, float]) – The minimum number of things that receive the configuration before the job can cancel.

  • threshold_percentage (Union[int, float]) – The minimum percentage of failureType failures that occur before the job can cancel. This parameter supports up to two digits after the decimal (for example, you can specify 10.9 or 10.99 , but not 10.999 ).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobabortcriteria.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_greengrassv2 as greengrassv2

io_tJob_abort_criteria_property = greengrassv2.CfnDeployment.IoTJobAbortCriteriaProperty(
    action="action",
    failure_type="failureType",
    min_number_of_executed_things=123,
    threshold_percentage=123
)

Attributes

action

The action to perform when the criteria are met.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobabortcriteria.html#cfn-greengrassv2-deployment-iotjobabortcriteria-action

failure_type

The type of job deployment failure that can cancel a job.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobabortcriteria.html#cfn-greengrassv2-deployment-iotjobabortcriteria-failuretype

min_number_of_executed_things

The minimum number of things that receive the configuration before the job can cancel.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobabortcriteria.html#cfn-greengrassv2-deployment-iotjobabortcriteria-minnumberofexecutedthings

threshold_percentage

The minimum percentage of failureType failures that occur before the job can cancel.

This parameter supports up to two digits after the decimal (for example, you can specify 10.9 or 10.99 , but not 10.999 ).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobabortcriteria.html#cfn-greengrassv2-deployment-iotjobabortcriteria-thresholdpercentage

IoTJobExecutionsRolloutConfigProperty

class CfnDeployment.IoTJobExecutionsRolloutConfigProperty(*, exponential_rate=None, maximum_per_minute=None)

Bases: object

Contains information about the rollout configuration for a job.

This configuration defines the rate at which the job deploys a configuration to a fleet of target devices.

Parameters:
  • exponential_rate (Union[IResolvable, IoTJobExponentialRolloutRateProperty, Dict[str, Any], None]) – The exponential rate to increase the job rollout rate.

  • maximum_per_minute (Union[int, float, None]) – The maximum number of devices that receive a pending job notification, per minute.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobexecutionsrolloutconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_greengrassv2 as greengrassv2

# rate_increase_criteria: Any

io_tJob_executions_rollout_config_property = greengrassv2.CfnDeployment.IoTJobExecutionsRolloutConfigProperty(
    exponential_rate=greengrassv2.CfnDeployment.IoTJobExponentialRolloutRateProperty(
        base_rate_per_minute=123,
        increment_factor=123,
        rate_increase_criteria=rate_increase_criteria
    ),
    maximum_per_minute=123
)

Attributes

exponential_rate

The exponential rate to increase the job rollout rate.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobexecutionsrolloutconfig.html#cfn-greengrassv2-deployment-iotjobexecutionsrolloutconfig-exponentialrate

maximum_per_minute

The maximum number of devices that receive a pending job notification, per minute.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobexecutionsrolloutconfig.html#cfn-greengrassv2-deployment-iotjobexecutionsrolloutconfig-maximumperminute

IoTJobExponentialRolloutRateProperty

class CfnDeployment.IoTJobExponentialRolloutRateProperty(*, base_rate_per_minute, increment_factor, rate_increase_criteria)

Bases: object

Contains information about an exponential rollout rate for a configuration deployment job.

Parameters:
  • base_rate_per_minute (Union[int, float]) – The minimum number of devices that receive a pending job notification, per minute, when the job starts. This parameter defines the initial rollout rate of the job.

  • increment_factor (Union[int, float]) – The exponential factor to increase the rollout rate for the job. This parameter supports up to one digit after the decimal (for example, you can specify 1.5 , but not 1.55 ).

  • rate_increase_criteria (Any) – The criteria to increase the rollout rate for the job.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobexponentialrolloutrate.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_greengrassv2 as greengrassv2

# rate_increase_criteria: Any

io_tJob_exponential_rollout_rate_property = greengrassv2.CfnDeployment.IoTJobExponentialRolloutRateProperty(
    base_rate_per_minute=123,
    increment_factor=123,
    rate_increase_criteria=rate_increase_criteria
)

Attributes

base_rate_per_minute

The minimum number of devices that receive a pending job notification, per minute, when the job starts.

This parameter defines the initial rollout rate of the job.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobexponentialrolloutrate.html#cfn-greengrassv2-deployment-iotjobexponentialrolloutrate-baserateperminute

increment_factor

The exponential factor to increase the rollout rate for the job.

This parameter supports up to one digit after the decimal (for example, you can specify 1.5 , but not 1.55 ).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobexponentialrolloutrate.html#cfn-greengrassv2-deployment-iotjobexponentialrolloutrate-incrementfactor

rate_increase_criteria

The criteria to increase the rollout rate for the job.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobexponentialrolloutrate.html#cfn-greengrassv2-deployment-iotjobexponentialrolloutrate-rateincreasecriteria

IoTJobTimeoutConfigProperty

class CfnDeployment.IoTJobTimeoutConfigProperty(*, in_progress_timeout_in_minutes=None)

Bases: object

Contains information about the timeout configuration for a job.

Parameters:

in_progress_timeout_in_minutes (Union[int, float, None]) – The amount of time, in minutes, that devices have to complete the job. The timer starts when the job status is set to IN_PROGRESS . If the job status doesn’t change to a terminal state before the time expires, then the job status is set to TIMED_OUT . The timeout interval must be between 1 minute and 7 days (10080 minutes).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobtimeoutconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_greengrassv2 as greengrassv2

io_tJob_timeout_config_property = greengrassv2.CfnDeployment.IoTJobTimeoutConfigProperty(
    in_progress_timeout_in_minutes=123
)

Attributes

in_progress_timeout_in_minutes

The amount of time, in minutes, that devices have to complete the job.

The timer starts when the job status is set to IN_PROGRESS . If the job status doesn’t change to a terminal state before the time expires, then the job status is set to TIMED_OUT .

The timeout interval must be between 1 minute and 7 days (10080 minutes).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobtimeoutconfig.html#cfn-greengrassv2-deployment-iotjobtimeoutconfig-inprogresstimeoutinminutes

SystemResourceLimitsProperty

class CfnDeployment.SystemResourceLimitsProperty(*, cpus=None, memory=None)

Bases: object

Contains information about system resource limits that the software applies to a component’s processes.

Parameters:
  • cpus (Union[int, float, None]) – The maximum amount of CPU time that a component’s processes can use on the core device. A core device’s total CPU time is equivalent to the device’s number of CPU cores. For example, on a core device with 4 CPU cores, you can set this value to 2 to limit the component’s processes to 50 percent usage of each CPU core. On a device with 1 CPU core, you can set this value to 0.25 to limit the component’s processes to 25 percent usage of the CPU. If you set this value to a number greater than the number of CPU cores, the AWS IoT Greengrass Core software doesn’t limit the component’s CPU usage.

  • memory (Union[int, float, None]) –

    The maximum amount of RAM, expressed in kilobytes, that a component’s processes can use on the core device. For more information, see Configure system resource limits for components .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-systemresourcelimits.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_greengrassv2 as greengrassv2

system_resource_limits_property = greengrassv2.CfnDeployment.SystemResourceLimitsProperty(
    cpus=123,
    memory=123
)

Attributes

cpus

The maximum amount of CPU time that a component’s processes can use on the core device.

A core device’s total CPU time is equivalent to the device’s number of CPU cores. For example, on a core device with 4 CPU cores, you can set this value to 2 to limit the component’s processes to 50 percent usage of each CPU core. On a device with 1 CPU core, you can set this value to 0.25 to limit the component’s processes to 25 percent usage of the CPU. If you set this value to a number greater than the number of CPU cores, the AWS IoT Greengrass Core software doesn’t limit the component’s CPU usage.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-systemresourcelimits.html#cfn-greengrassv2-deployment-systemresourcelimits-cpus

memory

The maximum amount of RAM, expressed in kilobytes, that a component’s processes can use on the core device.

For more information, see Configure system resource limits for components .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-systemresourcelimits.html#cfn-greengrassv2-deployment-systemresourcelimits-memory