CfnLifecyclePolicy

class aws_cdk.aws_dlm.CfnLifecyclePolicy(scope, id, *, description=None, execution_role_arn=None, policy_details=None, state=None, tags=None)

Bases: CfnResource

A CloudFormation AWS::DLM::LifecyclePolicy.

Specifies a lifecycle policy, which is used to automate operations on Amazon EBS resources.

The properties are required when you add a lifecycle policy and optional when you update a lifecycle policy.

CloudformationResource:

AWS::DLM::LifecyclePolicy

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dlm-lifecyclepolicy.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_dlm as dlm

cfn_lifecycle_policy = dlm.CfnLifecyclePolicy(self, "MyCfnLifecyclePolicy",
    description="description",
    execution_role_arn="executionRoleArn",
    policy_details=dlm.CfnLifecyclePolicy.PolicyDetailsProperty(
        actions=[dlm.CfnLifecyclePolicy.ActionProperty(
            cross_region_copy=[dlm.CfnLifecyclePolicy.CrossRegionCopyActionProperty(
                encryption_configuration=dlm.CfnLifecyclePolicy.EncryptionConfigurationProperty(
                    encrypted=False,

                    # the properties below are optional
                    cmk_arn="cmkArn"
                ),
                target="target",

                # the properties below are optional
                retain_rule=dlm.CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty(
                    interval=123,
                    interval_unit="intervalUnit"
                )
            )],
            name="name"
        )],
        event_source=dlm.CfnLifecyclePolicy.EventSourceProperty(
            type="type",

            # the properties below are optional
            parameters=dlm.CfnLifecyclePolicy.EventParametersProperty(
                event_type="eventType",
                snapshot_owner=["snapshotOwner"],

                # the properties below are optional
                description_regex="descriptionRegex"
            )
        ),
        parameters=dlm.CfnLifecyclePolicy.ParametersProperty(
            exclude_boot_volume=False,
            exclude_data_volume_tags=[CfnTag(
                key="key",
                value="value"
            )],
            no_reboot=False
        ),
        policy_type="policyType",
        resource_locations=["resourceLocations"],
        resource_types=["resourceTypes"],
        schedules=[dlm.CfnLifecyclePolicy.ScheduleProperty(
            archive_rule=dlm.CfnLifecyclePolicy.ArchiveRuleProperty(
                retain_rule=dlm.CfnLifecyclePolicy.ArchiveRetainRuleProperty(
                    retention_archive_tier=dlm.CfnLifecyclePolicy.RetentionArchiveTierProperty(
                        count=123,
                        interval=123,
                        interval_unit="intervalUnit"
                    )
                )
            ),
            copy_tags=False,
            create_rule=dlm.CfnLifecyclePolicy.CreateRuleProperty(
                cron_expression="cronExpression",
                interval=123,
                interval_unit="intervalUnit",
                location="location",
                times=["times"]
            ),
            cross_region_copy_rules=[dlm.CfnLifecyclePolicy.CrossRegionCopyRuleProperty(
                encrypted=False,

                # the properties below are optional
                cmk_arn="cmkArn",
                copy_tags=False,
                deprecate_rule=dlm.CfnLifecyclePolicy.CrossRegionCopyDeprecateRuleProperty(
                    interval=123,
                    interval_unit="intervalUnit"
                ),
                retain_rule=dlm.CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty(
                    interval=123,
                    interval_unit="intervalUnit"
                ),
                target="target",
                target_region="targetRegion"
            )],
            deprecate_rule=dlm.CfnLifecyclePolicy.DeprecateRuleProperty(
                count=123,
                interval=123,
                interval_unit="intervalUnit"
            ),
            fast_restore_rule=dlm.CfnLifecyclePolicy.FastRestoreRuleProperty(
                availability_zones=["availabilityZones"],
                count=123,
                interval=123,
                interval_unit="intervalUnit"
            ),
            name="name",
            retain_rule=dlm.CfnLifecyclePolicy.RetainRuleProperty(
                count=123,
                interval=123,
                interval_unit="intervalUnit"
            ),
            share_rules=[dlm.CfnLifecyclePolicy.ShareRuleProperty(
                target_accounts=["targetAccounts"],
                unshare_interval=123,
                unshare_interval_unit="unshareIntervalUnit"
            )],
            tags_to_add=[CfnTag(
                key="key",
                value="value"
            )],
            variable_tags=[CfnTag(
                key="key",
                value="value"
            )]
        )],
        target_tags=[CfnTag(
            key="key",
            value="value"
        )]
    ),
    state="state",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Create a new AWS::DLM::LifecyclePolicy.

Parameters:
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • description (Optional[str]) – A description of the lifecycle policy. The characters ^[0-9A-Za-z _-]+$ are supported.

  • execution_role_arn (Optional[str]) – The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.

  • policy_details (Union[PolicyDetailsProperty, Dict[str, Any], IResolvable, None]) – The configuration details of the lifecycle policy.

  • state (Optional[str]) – The activation state of the lifecycle policy.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – The tags to apply to the lifecycle policy during creation.

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::DLM::LifecyclePolicy'
attr_arn

The Amazon Resource Name (ARN) of the lifecycle policy.

CloudformationAttribute:

Arn

cfn_options

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

cfn_resource_type

AWS resource type.

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.

description

A description of the lifecycle policy.

The characters ^[0-9A-Za-z _-]+$ are supported.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dlm-lifecyclepolicy.html#cfn-dlm-lifecyclepolicy-description

execution_role_arn

The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dlm-lifecyclepolicy.html#cfn-dlm-lifecyclepolicy-executionrolearn

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.

policy_details

The configuration details of the lifecycle policy.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dlm-lifecyclepolicy.html#cfn-dlm-lifecyclepolicy-policydetails

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).

state

The activation state of the lifecycle policy.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dlm-lifecyclepolicy.html#cfn-dlm-lifecyclepolicy-state

tags

The tags to apply to the lifecycle policy during creation.

Link:

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

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

ActionProperty

class CfnLifecyclePolicy.ActionProperty(*, cross_region_copy, name)

Bases: object

[Event-based policies only] Specifies an action for an event-based policy.

Parameters:
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-action.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_dlm as dlm

action_property = dlm.CfnLifecyclePolicy.ActionProperty(
    cross_region_copy=[dlm.CfnLifecyclePolicy.CrossRegionCopyActionProperty(
        encryption_configuration=dlm.CfnLifecyclePolicy.EncryptionConfigurationProperty(
            encrypted=False,

            # the properties below are optional
            cmk_arn="cmkArn"
        ),
        target="target",

        # the properties below are optional
        retain_rule=dlm.CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty(
            interval=123,
            interval_unit="intervalUnit"
        )
    )],
    name="name"
)

Attributes

cross_region_copy

The rule for copying shared snapshots across Regions.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-action.html#cfn-dlm-lifecyclepolicy-action-crossregioncopy

name

A descriptive name for the action.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-action.html#cfn-dlm-lifecyclepolicy-action-name

ArchiveRetainRuleProperty

class CfnLifecyclePolicy.ArchiveRetainRuleProperty(*, retention_archive_tier)

Bases: object

Parameters:

retention_archive_tier (Union[IResolvable, RetentionArchiveTierProperty, Dict[str, Any]]) – CfnLifecyclePolicy.ArchiveRetainRuleProperty.RetentionArchiveTier.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-archiveretainrule.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_dlm as dlm

archive_retain_rule_property = dlm.CfnLifecyclePolicy.ArchiveRetainRuleProperty(
    retention_archive_tier=dlm.CfnLifecyclePolicy.RetentionArchiveTierProperty(
        count=123,
        interval=123,
        interval_unit="intervalUnit"
    )
)

Attributes

retention_archive_tier

CfnLifecyclePolicy.ArchiveRetainRuleProperty.RetentionArchiveTier.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-archiveretainrule.html#cfn-dlm-lifecyclepolicy-archiveretainrule-retentionarchivetier

ArchiveRuleProperty

class CfnLifecyclePolicy.ArchiveRuleProperty(*, retain_rule)

Bases: object

Parameters:

retain_rule (Union[IResolvable, ArchiveRetainRuleProperty, Dict[str, Any]]) – CfnLifecyclePolicy.ArchiveRuleProperty.RetainRule.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-archiverule.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_dlm as dlm

archive_rule_property = dlm.CfnLifecyclePolicy.ArchiveRuleProperty(
    retain_rule=dlm.CfnLifecyclePolicy.ArchiveRetainRuleProperty(
        retention_archive_tier=dlm.CfnLifecyclePolicy.RetentionArchiveTierProperty(
            count=123,
            interval=123,
            interval_unit="intervalUnit"
        )
    )
)

Attributes

retain_rule

CfnLifecyclePolicy.ArchiveRuleProperty.RetainRule.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-archiverule.html#cfn-dlm-lifecyclepolicy-archiverule-retainrule

CreateRuleProperty

class CfnLifecyclePolicy.CreateRuleProperty(*, cron_expression=None, interval=None, interval_unit=None, location=None, times=None)

Bases: object

[Snapshot and AMI policies only] Specifies when the policy should create snapshots or AMIs.

  • You must specify either CronExpression , or Interval , IntervalUnit , and Times .

  • If you need to specify an ArchiveRule for the schedule, then you must specify a creation frequency of at least 28 days.

Parameters:
  • cron_expression (Optional[str]) – The schedule, as a Cron expression. The schedule interval must be between 1 hour and 1 year. For more information, see Cron expressions in the Amazon CloudWatch User Guide .

  • interval (Union[int, float, None]) – The interval between snapshots. The supported values are 1, 2, 3, 4, 6, 8, 12, and 24.

  • interval_unit (Optional[str]) – The interval unit.

  • location (Optional[str]) – [Snapshot policies only] Specifies the destination for snapshots created by the policy. To create snapshots in the same Region as the source resource, specify CLOUD . To create snapshots on the same Outpost as the source resource, specify OUTPOST_LOCAL . If you omit this parameter, CLOUD is used by default. If the policy targets resources in an AWS Region , then you must create snapshots in the same Region as the source resource. If the policy targets resources on an Outpost, then you can create snapshots on the same Outpost as the source resource, or in the Region of that Outpost.

  • times (Optional[Sequence[str]]) – The time, in UTC, to start the operation. The supported format is hh:mm. The operation occurs within a one-hour window following the specified time. If you do not specify a time, Amazon Data Lifecycle Manager selects a time within the next 24 hours.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-createrule.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_dlm as dlm

create_rule_property = dlm.CfnLifecyclePolicy.CreateRuleProperty(
    cron_expression="cronExpression",
    interval=123,
    interval_unit="intervalUnit",
    location="location",
    times=["times"]
)

Attributes

cron_expression

The schedule, as a Cron expression.

The schedule interval must be between 1 hour and 1 year. For more information, see Cron expressions in the Amazon CloudWatch User Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-createrule.html#cfn-dlm-lifecyclepolicy-createrule-cronexpression

interval

The interval between snapshots.

The supported values are 1, 2, 3, 4, 6, 8, 12, and 24.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-createrule.html#cfn-dlm-lifecyclepolicy-createrule-interval

interval_unit

The interval unit.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-createrule.html#cfn-dlm-lifecyclepolicy-createrule-intervalunit

location

[Snapshot policies only] Specifies the destination for snapshots created by the policy.

To create snapshots in the same Region as the source resource, specify CLOUD . To create snapshots on the same Outpost as the source resource, specify OUTPOST_LOCAL . If you omit this parameter, CLOUD is used by default.

If the policy targets resources in an AWS Region , then you must create snapshots in the same Region as the source resource. If the policy targets resources on an Outpost, then you can create snapshots on the same Outpost as the source resource, or in the Region of that Outpost.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-createrule.html#cfn-dlm-lifecyclepolicy-createrule-location

times

The operation occurs within a one-hour window following the specified time. If you do not specify a time, Amazon Data Lifecycle Manager selects a time within the next 24 hours.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-createrule.html#cfn-dlm-lifecyclepolicy-createrule-times

Type:

The time, in UTC, to start the operation. The supported format is hh

CrossRegionCopyActionProperty

class CfnLifecyclePolicy.CrossRegionCopyActionProperty(*, encryption_configuration, target, retain_rule=None)

Bases: object

[Event-based policies only] Specifies a cross-Region copy action for event-based policies.

To specify a cross-Region copy rule for snapshot and AMI policies, use CrossRegionCopyRule .

Parameters:
  • encryption_configuration (Union[IResolvable, EncryptionConfigurationProperty, Dict[str, Any]]) – The encryption settings for the copied snapshot.

  • target (str) – The target Region.

  • retain_rule (Union[IResolvable, CrossRegionCopyRetainRuleProperty, Dict[str, Any], None]) – Specifies a retention rule for cross-Region snapshot copies created by snapshot or event-based policies, or cross-Region AMI copies created by AMI policies. After the retention period expires, the cross-Region copy is deleted.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyaction.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_dlm as dlm

cross_region_copy_action_property = dlm.CfnLifecyclePolicy.CrossRegionCopyActionProperty(
    encryption_configuration=dlm.CfnLifecyclePolicy.EncryptionConfigurationProperty(
        encrypted=False,

        # the properties below are optional
        cmk_arn="cmkArn"
    ),
    target="target",

    # the properties below are optional
    retain_rule=dlm.CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty(
        interval=123,
        interval_unit="intervalUnit"
    )
)

Attributes

encryption_configuration

The encryption settings for the copied snapshot.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyaction.html#cfn-dlm-lifecyclepolicy-crossregioncopyaction-encryptionconfiguration

retain_rule

Specifies a retention rule for cross-Region snapshot copies created by snapshot or event-based policies, or cross-Region AMI copies created by AMI policies.

After the retention period expires, the cross-Region copy is deleted.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyaction.html#cfn-dlm-lifecyclepolicy-crossregioncopyaction-retainrule

target

The target Region.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyaction.html#cfn-dlm-lifecyclepolicy-crossregioncopyaction-target

CrossRegionCopyDeprecateRuleProperty

class CfnLifecyclePolicy.CrossRegionCopyDeprecateRuleProperty(*, interval, interval_unit)

Bases: object

Parameters:
  • interval (Union[int, float]) – CfnLifecyclePolicy.CrossRegionCopyDeprecateRuleProperty.Interval.

  • interval_unit (str) – CfnLifecyclePolicy.CrossRegionCopyDeprecateRuleProperty.IntervalUnit.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopydeprecaterule.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_dlm as dlm

cross_region_copy_deprecate_rule_property = dlm.CfnLifecyclePolicy.CrossRegionCopyDeprecateRuleProperty(
    interval=123,
    interval_unit="intervalUnit"
)

Attributes

interval

CfnLifecyclePolicy.CrossRegionCopyDeprecateRuleProperty.Interval.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopydeprecaterule.html#cfn-dlm-lifecyclepolicy-crossregioncopydeprecaterule-interval

interval_unit

CfnLifecyclePolicy.CrossRegionCopyDeprecateRuleProperty.IntervalUnit.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopydeprecaterule.html#cfn-dlm-lifecyclepolicy-crossregioncopydeprecaterule-intervalunit

CrossRegionCopyRetainRuleProperty

class CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty(*, interval, interval_unit)

Bases: object

Specifies a retention rule for cross-Region snapshot copies created by snapshot or event-based policies, or cross-Region AMI copies created by AMI policies.

After the retention period expires, the cross-Region copy is deleted.

Parameters:
  • interval (Union[int, float]) – The amount of time to retain a cross-Region snapshot or AMI copy. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.

  • interval_unit (str) – The unit of time for time-based retention. For example, to retain a cross-Region copy for 3 months, specify Interval=3 and IntervalUnit=MONTHS .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyretainrule.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_dlm as dlm

cross_region_copy_retain_rule_property = dlm.CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty(
    interval=123,
    interval_unit="intervalUnit"
)

Attributes

interval

The amount of time to retain a cross-Region snapshot or AMI copy.

The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyretainrule.html#cfn-dlm-lifecyclepolicy-crossregioncopyretainrule-interval

interval_unit

The unit of time for time-based retention.

For example, to retain a cross-Region copy for 3 months, specify Interval=3 and IntervalUnit=MONTHS .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyretainrule.html#cfn-dlm-lifecyclepolicy-crossregioncopyretainrule-intervalunit

CrossRegionCopyRuleProperty

class CfnLifecyclePolicy.CrossRegionCopyRuleProperty(*, encrypted, cmk_arn=None, copy_tags=None, deprecate_rule=None, retain_rule=None, target=None, target_region=None)

Bases: object

[Snapshot and AMI policies only] Specifies a cross-Region copy rule for snapshot and AMI policies.

To specify a cross-Region copy action for event-based polices, use CrossRegionCopyAction .

Parameters:
  • encrypted (Union[bool, IResolvable]) – To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter. Copies of encrypted snapshots are encrypted, even if this parameter is false or if encryption by default is not enabled.

  • cmk_arn (Optional[str]) – The Amazon Resource Name (ARN) of the AWS KMS key to use for EBS encryption. If this parameter is not specified, the default KMS key for the account is used.

  • copy_tags (Union[bool, IResolvable, None]) – Indicates whether to copy all user-defined tags from the source snapshot or AMI to the cross-Region copy.

  • deprecate_rule (Union[IResolvable, CrossRegionCopyDeprecateRuleProperty, Dict[str, Any], None]) – CfnLifecyclePolicy.CrossRegionCopyRuleProperty.DeprecateRule.

  • retain_rule (Union[IResolvable, CrossRegionCopyRetainRuleProperty, Dict[str, Any], None]) – The retention rule that indicates how long the cross-Region snapshot or AMI copies are to be retained in the destination Region.

  • target (Optional[str]) – The target Region or the Amazon Resource Name (ARN) of the target Outpost for the snapshot copies. Use this parameter instead of TargetRegion . Do not specify both.

  • target_region (Optional[str]) –

    Avoid using this parameter when creating new policies. Instead, use Target to specify a target Region or a target Outpost for snapshot copies. .. epigraph:: For policies created before the Target parameter was introduced, this parameter indicates the target Region for snapshot copies.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyrule.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_dlm as dlm

cross_region_copy_rule_property = dlm.CfnLifecyclePolicy.CrossRegionCopyRuleProperty(
    encrypted=False,

    # the properties below are optional
    cmk_arn="cmkArn",
    copy_tags=False,
    deprecate_rule=dlm.CfnLifecyclePolicy.CrossRegionCopyDeprecateRuleProperty(
        interval=123,
        interval_unit="intervalUnit"
    ),
    retain_rule=dlm.CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty(
        interval=123,
        interval_unit="intervalUnit"
    ),
    target="target",
    target_region="targetRegion"
)

Attributes

cmk_arn

The Amazon Resource Name (ARN) of the AWS KMS key to use for EBS encryption.

If this parameter is not specified, the default KMS key for the account is used.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyrule.html#cfn-dlm-lifecyclepolicy-crossregioncopyrule-cmkarn

copy_tags

Indicates whether to copy all user-defined tags from the source snapshot or AMI to the cross-Region copy.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyrule.html#cfn-dlm-lifecyclepolicy-crossregioncopyrule-copytags

deprecate_rule

CfnLifecyclePolicy.CrossRegionCopyRuleProperty.DeprecateRule.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyrule.html#cfn-dlm-lifecyclepolicy-crossregioncopyrule-deprecaterule

encrypted

To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter.

Copies of encrypted snapshots are encrypted, even if this parameter is false or if encryption by default is not enabled.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyrule.html#cfn-dlm-lifecyclepolicy-crossregioncopyrule-encrypted

retain_rule

The retention rule that indicates how long the cross-Region snapshot or AMI copies are to be retained in the destination Region.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyrule.html#cfn-dlm-lifecyclepolicy-crossregioncopyrule-retainrule

target

The target Region or the Amazon Resource Name (ARN) of the target Outpost for the snapshot copies.

Use this parameter instead of TargetRegion . Do not specify both.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyrule.html#cfn-dlm-lifecyclepolicy-crossregioncopyrule-target

target_region

Avoid using this parameter when creating new policies.

Instead, use Target to specify a target Region or a target Outpost for snapshot copies. .. epigraph:

For policies created before the *Target* parameter was introduced, this parameter indicates the target Region for snapshot copies.
link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyrule.html#cfn-dlm-lifecyclepolicy-crossregioncopyrule-targetregion

DeprecateRuleProperty

class CfnLifecyclePolicy.DeprecateRuleProperty(*, count=None, interval=None, interval_unit=None)

Bases: object

Parameters:
  • count (Union[int, float, None]) – CfnLifecyclePolicy.DeprecateRuleProperty.Count.

  • interval (Union[int, float, None]) – CfnLifecyclePolicy.DeprecateRuleProperty.Interval.

  • interval_unit (Optional[str]) – CfnLifecyclePolicy.DeprecateRuleProperty.IntervalUnit.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-deprecaterule.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_dlm as dlm

deprecate_rule_property = dlm.CfnLifecyclePolicy.DeprecateRuleProperty(
    count=123,
    interval=123,
    interval_unit="intervalUnit"
)

Attributes

count

CfnLifecyclePolicy.DeprecateRuleProperty.Count.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-deprecaterule.html#cfn-dlm-lifecyclepolicy-deprecaterule-count

interval

CfnLifecyclePolicy.DeprecateRuleProperty.Interval.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-deprecaterule.html#cfn-dlm-lifecyclepolicy-deprecaterule-interval

interval_unit

CfnLifecyclePolicy.DeprecateRuleProperty.IntervalUnit.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-deprecaterule.html#cfn-dlm-lifecyclepolicy-deprecaterule-intervalunit

EncryptionConfigurationProperty

class CfnLifecyclePolicy.EncryptionConfigurationProperty(*, encrypted, cmk_arn=None)

Bases: object

[Event-based policies only] Specifies the encryption settings for cross-Region snapshot copies created by event-based policies.

Parameters:
  • encrypted (Union[bool, IResolvable]) – To encrypt a copy of an unencrypted snapshot when encryption by default is not enabled, enable encryption using this parameter. Copies of encrypted snapshots are encrypted, even if this parameter is false or when encryption by default is not enabled.

  • cmk_arn (Optional[str]) – The Amazon Resource Name (ARN) of the AWS KMS key to use for EBS encryption. If this parameter is not specified, the default KMS key for the account is used.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-encryptionconfiguration.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_dlm as dlm

encryption_configuration_property = dlm.CfnLifecyclePolicy.EncryptionConfigurationProperty(
    encrypted=False,

    # the properties below are optional
    cmk_arn="cmkArn"
)

Attributes

cmk_arn

The Amazon Resource Name (ARN) of the AWS KMS key to use for EBS encryption.

If this parameter is not specified, the default KMS key for the account is used.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-encryptionconfiguration.html#cfn-dlm-lifecyclepolicy-encryptionconfiguration-cmkarn

encrypted

To encrypt a copy of an unencrypted snapshot when encryption by default is not enabled, enable encryption using this parameter.

Copies of encrypted snapshots are encrypted, even if this parameter is false or when encryption by default is not enabled.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-encryptionconfiguration.html#cfn-dlm-lifecyclepolicy-encryptionconfiguration-encrypted

EventParametersProperty

class CfnLifecyclePolicy.EventParametersProperty(*, event_type, snapshot_owner, description_regex=None)

Bases: object

[Event-based policies only] Specifies an event that activates an event-based policy.

Parameters:
  • event_type (str) – The type of event. Currently, only snapshot sharing events are supported.

  • snapshot_owner (Sequence[str]) – The IDs of the AWS accounts that can trigger policy by sharing snapshots with your account. The policy only runs if one of the specified AWS accounts shares a snapshot with your account.

  • description_regex (Optional[str]) – The snapshot description that can trigger the policy. The description pattern is specified using a regular expression. The policy runs only if a snapshot with a description that matches the specified pattern is shared with your account. For example, specifying ^.*Created for policy: policy-1234567890abcdef0.*$ configures the policy to run only if snapshots created by policy policy-1234567890abcdef0 are shared with your account.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-eventparameters.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_dlm as dlm

event_parameters_property = dlm.CfnLifecyclePolicy.EventParametersProperty(
    event_type="eventType",
    snapshot_owner=["snapshotOwner"],

    # the properties below are optional
    description_regex="descriptionRegex"
)

Attributes

description_regex

The snapshot description that can trigger the policy.

The description pattern is specified using a regular expression. The policy runs only if a snapshot with a description that matches the specified pattern is shared with your account.

For example, specifying ^.*Created for policy: policy-1234567890abcdef0.*$ configures the policy to run only if snapshots created by policy policy-1234567890abcdef0 are shared with your account.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-eventparameters.html#cfn-dlm-lifecyclepolicy-eventparameters-descriptionregex

event_type

The type of event.

Currently, only snapshot sharing events are supported.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-eventparameters.html#cfn-dlm-lifecyclepolicy-eventparameters-eventtype

snapshot_owner

The IDs of the AWS accounts that can trigger policy by sharing snapshots with your account.

The policy only runs if one of the specified AWS accounts shares a snapshot with your account.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-eventparameters.html#cfn-dlm-lifecyclepolicy-eventparameters-snapshotowner

EventSourceProperty

class CfnLifecyclePolicy.EventSourceProperty(*, type, parameters=None)

Bases: object

[Event-based policies only] Specifies an event that activates an event-based policy.

Parameters:
  • type (str) – The source of the event. Currently only managed CloudWatch Events rules are supported.

  • parameters (Union[IResolvable, EventParametersProperty, Dict[str, Any], None]) – Information about the event.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-eventsource.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_dlm as dlm

event_source_property = dlm.CfnLifecyclePolicy.EventSourceProperty(
    type="type",

    # the properties below are optional
    parameters=dlm.CfnLifecyclePolicy.EventParametersProperty(
        event_type="eventType",
        snapshot_owner=["snapshotOwner"],

        # the properties below are optional
        description_regex="descriptionRegex"
    )
)

Attributes

parameters

Information about the event.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-eventsource.html#cfn-dlm-lifecyclepolicy-eventsource-parameters

type

The source of the event.

Currently only managed CloudWatch Events rules are supported.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-eventsource.html#cfn-dlm-lifecyclepolicy-eventsource-type

FastRestoreRuleProperty

class CfnLifecyclePolicy.FastRestoreRuleProperty(*, availability_zones=None, count=None, interval=None, interval_unit=None)

Bases: object

[Snapshot policies only] Specifies a rule for enabling fast snapshot restore for snapshots created by snapshot policies.

You can enable fast snapshot restore based on either a count or a time interval.

Parameters:
  • availability_zones (Optional[Sequence[str]]) – The Availability Zones in which to enable fast snapshot restore.

  • count (Union[int, float, None]) – The number of snapshots to be enabled with fast snapshot restore.

  • interval (Union[int, float, None]) – The amount of time to enable fast snapshot restore. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.

  • interval_unit (Optional[str]) – The unit of time for enabling fast snapshot restore.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-fastrestorerule.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_dlm as dlm

fast_restore_rule_property = dlm.CfnLifecyclePolicy.FastRestoreRuleProperty(
    availability_zones=["availabilityZones"],
    count=123,
    interval=123,
    interval_unit="intervalUnit"
)

Attributes

availability_zones

The Availability Zones in which to enable fast snapshot restore.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-fastrestorerule.html#cfn-dlm-lifecyclepolicy-fastrestorerule-availabilityzones

count

The number of snapshots to be enabled with fast snapshot restore.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-fastrestorerule.html#cfn-dlm-lifecyclepolicy-fastrestorerule-count

interval

The amount of time to enable fast snapshot restore.

The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-fastrestorerule.html#cfn-dlm-lifecyclepolicy-fastrestorerule-interval

interval_unit

The unit of time for enabling fast snapshot restore.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-fastrestorerule.html#cfn-dlm-lifecyclepolicy-fastrestorerule-intervalunit

ParametersProperty

class CfnLifecyclePolicy.ParametersProperty(*, exclude_boot_volume=None, exclude_data_volume_tags=None, no_reboot=None)

Bases: object

[Snapshot and AMI policies only] Specifies optional parameters for snapshot and AMI policies.

The set of valid parameters depends on the combination of policy type and target resource type.

If you choose to exclude boot volumes and you specify tags that consequently exclude all of the additional data volumes attached to an instance, then Amazon Data Lifecycle Manager will not create any snapshots for the affected instance, and it will emit a SnapshotsCreateFailed Amazon CloudWatch metric. For more information, see Monitor your policies using Amazon CloudWatch .

Parameters:
  • exclude_boot_volume (Union[bool, IResolvable, None]) – [Snapshot policies that target instances only] Indicates whether to exclude the root volume from multi-volume snapshot sets. The default is false . If you specify true , then the root volumes attached to targeted instances will be excluded from the multi-volume snapshot sets created by the policy.

  • exclude_data_volume_tags (Union[IResolvable, Sequence[Union[IResolvable, CfnTag, Dict[str, Any]]], None]) – CfnLifecyclePolicy.ParametersProperty.ExcludeDataVolumeTags.

  • no_reboot (Union[bool, IResolvable, None]) – [AMI policies only] Indicates whether targeted instances are rebooted when the lifecycle policy runs. true indicates that targeted instances are not rebooted when the policy runs. false indicates that target instances are rebooted when the policy runs. The default is true (instances are not rebooted).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-parameters.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_dlm as dlm

parameters_property = dlm.CfnLifecyclePolicy.ParametersProperty(
    exclude_boot_volume=False,
    exclude_data_volume_tags=[CfnTag(
        key="key",
        value="value"
    )],
    no_reboot=False
)

Attributes

exclude_boot_volume

[Snapshot policies that target instances only] Indicates whether to exclude the root volume from multi-volume snapshot sets.

The default is false . If you specify true , then the root volumes attached to targeted instances will be excluded from the multi-volume snapshot sets created by the policy.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-parameters.html#cfn-dlm-lifecyclepolicy-parameters-excludebootvolume

exclude_data_volume_tags

CfnLifecyclePolicy.ParametersProperty.ExcludeDataVolumeTags.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-parameters.html#cfn-dlm-lifecyclepolicy-parameters-excludedatavolumetags

no_reboot

[AMI policies only] Indicates whether targeted instances are rebooted when the lifecycle policy runs.

true indicates that targeted instances are not rebooted when the policy runs. false indicates that target instances are rebooted when the policy runs. The default is true (instances are not rebooted).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-parameters.html#cfn-dlm-lifecyclepolicy-parameters-noreboot

PolicyDetailsProperty

class CfnLifecyclePolicy.PolicyDetailsProperty(*, actions=None, event_source=None, parameters=None, policy_type=None, resource_locations=None, resource_types=None, schedules=None, target_tags=None)

Bases: object

[All policy types] Specifies the configuration of a lifecycle policy.

Parameters:
  • actions (Union[IResolvable, Sequence[Union[IResolvable, ActionProperty, Dict[str, Any]]], None]) – [Event-based policies only] The actions to be performed when the event-based policy is activated. You can specify only one action per policy.

  • event_source (Union[IResolvable, EventSourceProperty, Dict[str, Any], None]) – [Event-based policies only] The event that activates the event-based policy.

  • parameters (Union[IResolvable, ParametersProperty, Dict[str, Any], None]) – [Snapshot and AMI policies only] A set of optional parameters for snapshot and AMI lifecycle policies. .. epigraph:: If you are modifying a policy that was created or previously modified using the Amazon Data Lifecycle Manager console, then you must include this parameter and specify either the default values or the new values that you require. You can’t omit this parameter or set its values to null.

  • policy_type (Optional[str]) – [All policy types] The valid target resource types and actions a policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT to create a lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify IMAGE_MANAGEMENT to create a lifecycle policy that manages the lifecycle of EBS-backed AMIs. Specify EVENT_BASED_POLICY to create an event-based policy that performs specific actions when a defined event occurs in your AWS account . The default is EBS_SNAPSHOT_MANAGEMENT .

  • resource_locations (Optional[Sequence[str]]) – [Snapshot and AMI policies only] The location of the resources to backup. If the source resources are located in an AWS Region , specify CLOUD . If the source resources are located on an Outpost in your account, specify OUTPOST . If you specify OUTPOST , Amazon Data Lifecycle Manager backs up all resources of the specified type with matching target tags across all of the Outposts in your account.

  • resource_types (Optional[Sequence[str]]) – [Snapshot policies only] The target resource type for snapshot and AMI lifecycle policies. Use VOLUME to create snapshots of individual volumes or use INSTANCE to create multi-volume snapshots from the volumes for an instance.

  • schedules (Union[IResolvable, Sequence[Union[IResolvable, ScheduleProperty, Dict[str, Any]]], None]) – [Snapshot and AMI policies only] The schedules of policy-defined actions for snapshot and AMI lifecycle policies. A policy can have up to four schedules—one mandatory schedule and up to three optional schedules.

  • target_tags (Union[IResolvable, Sequence[Union[IResolvable, CfnTag, Dict[str, Any]]], None]) – [Snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-policydetails.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_dlm as dlm

policy_details_property = dlm.CfnLifecyclePolicy.PolicyDetailsProperty(
    actions=[dlm.CfnLifecyclePolicy.ActionProperty(
        cross_region_copy=[dlm.CfnLifecyclePolicy.CrossRegionCopyActionProperty(
            encryption_configuration=dlm.CfnLifecyclePolicy.EncryptionConfigurationProperty(
                encrypted=False,

                # the properties below are optional
                cmk_arn="cmkArn"
            ),
            target="target",

            # the properties below are optional
            retain_rule=dlm.CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty(
                interval=123,
                interval_unit="intervalUnit"
            )
        )],
        name="name"
    )],
    event_source=dlm.CfnLifecyclePolicy.EventSourceProperty(
        type="type",

        # the properties below are optional
        parameters=dlm.CfnLifecyclePolicy.EventParametersProperty(
            event_type="eventType",
            snapshot_owner=["snapshotOwner"],

            # the properties below are optional
            description_regex="descriptionRegex"
        )
    ),
    parameters=dlm.CfnLifecyclePolicy.ParametersProperty(
        exclude_boot_volume=False,
        exclude_data_volume_tags=[CfnTag(
            key="key",
            value="value"
        )],
        no_reboot=False
    ),
    policy_type="policyType",
    resource_locations=["resourceLocations"],
    resource_types=["resourceTypes"],
    schedules=[dlm.CfnLifecyclePolicy.ScheduleProperty(
        archive_rule=dlm.CfnLifecyclePolicy.ArchiveRuleProperty(
            retain_rule=dlm.CfnLifecyclePolicy.ArchiveRetainRuleProperty(
                retention_archive_tier=dlm.CfnLifecyclePolicy.RetentionArchiveTierProperty(
                    count=123,
                    interval=123,
                    interval_unit="intervalUnit"
                )
            )
        ),
        copy_tags=False,
        create_rule=dlm.CfnLifecyclePolicy.CreateRuleProperty(
            cron_expression="cronExpression",
            interval=123,
            interval_unit="intervalUnit",
            location="location",
            times=["times"]
        ),
        cross_region_copy_rules=[dlm.CfnLifecyclePolicy.CrossRegionCopyRuleProperty(
            encrypted=False,

            # the properties below are optional
            cmk_arn="cmkArn",
            copy_tags=False,
            deprecate_rule=dlm.CfnLifecyclePolicy.CrossRegionCopyDeprecateRuleProperty(
                interval=123,
                interval_unit="intervalUnit"
            ),
            retain_rule=dlm.CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty(
                interval=123,
                interval_unit="intervalUnit"
            ),
            target="target",
            target_region="targetRegion"
        )],
        deprecate_rule=dlm.CfnLifecyclePolicy.DeprecateRuleProperty(
            count=123,
            interval=123,
            interval_unit="intervalUnit"
        ),
        fast_restore_rule=dlm.CfnLifecyclePolicy.FastRestoreRuleProperty(
            availability_zones=["availabilityZones"],
            count=123,
            interval=123,
            interval_unit="intervalUnit"
        ),
        name="name",
        retain_rule=dlm.CfnLifecyclePolicy.RetainRuleProperty(
            count=123,
            interval=123,
            interval_unit="intervalUnit"
        ),
        share_rules=[dlm.CfnLifecyclePolicy.ShareRuleProperty(
            target_accounts=["targetAccounts"],
            unshare_interval=123,
            unshare_interval_unit="unshareIntervalUnit"
        )],
        tags_to_add=[CfnTag(
            key="key",
            value="value"
        )],
        variable_tags=[CfnTag(
            key="key",
            value="value"
        )]
    )],
    target_tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

actions

[Event-based policies only] The actions to be performed when the event-based policy is activated.

You can specify only one action per policy.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-policydetails.html#cfn-dlm-lifecyclepolicy-policydetails-actions

event_source

[Event-based policies only] The event that activates the event-based policy.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-policydetails.html#cfn-dlm-lifecyclepolicy-policydetails-eventsource

parameters

[Snapshot and AMI policies only] A set of optional parameters for snapshot and AMI lifecycle policies.

If you are modifying a policy that was created or previously modified using the Amazon Data Lifecycle Manager console, then you must include this parameter and specify either the default values or the new values that you require. You can’t omit this parameter or set its values to null.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-policydetails.html#cfn-dlm-lifecyclepolicy-policydetails-parameters

policy_type

[All policy types] The valid target resource types and actions a policy can manage.

Specify EBS_SNAPSHOT_MANAGEMENT to create a lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify IMAGE_MANAGEMENT to create a lifecycle policy that manages the lifecycle of EBS-backed AMIs. Specify EVENT_BASED_POLICY to create an event-based policy that performs specific actions when a defined event occurs in your AWS account .

The default is EBS_SNAPSHOT_MANAGEMENT .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-policydetails.html#cfn-dlm-lifecyclepolicy-policydetails-policytype

resource_locations

[Snapshot and AMI policies only] The location of the resources to backup.

If the source resources are located in an AWS Region , specify CLOUD . If the source resources are located on an Outpost in your account, specify OUTPOST .

If you specify OUTPOST , Amazon Data Lifecycle Manager backs up all resources of the specified type with matching target tags across all of the Outposts in your account.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-policydetails.html#cfn-dlm-lifecyclepolicy-policydetails-resourcelocations

resource_types

[Snapshot policies only] The target resource type for snapshot and AMI lifecycle policies.

Use VOLUME to create snapshots of individual volumes or use INSTANCE to create multi-volume snapshots from the volumes for an instance.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-policydetails.html#cfn-dlm-lifecyclepolicy-policydetails-resourcetypes

schedules

[Snapshot and AMI policies only] The schedules of policy-defined actions for snapshot and AMI lifecycle policies.

A policy can have up to four schedules—one mandatory schedule and up to three optional schedules.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-policydetails.html#cfn-dlm-lifecyclepolicy-policydetails-schedules

target_tags

[Snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-policydetails.html#cfn-dlm-lifecyclepolicy-policydetails-targettags

RetainRuleProperty

class CfnLifecyclePolicy.RetainRuleProperty(*, count=None, interval=None, interval_unit=None)

Bases: object

[Snapshot and AMI policies only] Specifies a retention rule for snapshots created by snapshot policies, or for AMIs created by AMI policies.

For snapshot policies that have an ArchiveRule , this retention rule applies to standard tier retention. When the retention threshold is met, snapshots are moved from the standard to the archive tier.

For snapshot policies that do not have an ArchiveRule , snapshots are permanently deleted when this retention threshold is met.

You can retain snapshots based on either a count or a time interval.

  • Count-based retention

You must specify Count . If you specify an ArchiveRule for the schedule, then you can specify a retention count of 0 to archive snapshots immediately after creation. If you specify a FastRestoreRule , ShareRule , or a CrossRegionCopyRule , then you must specify a retention count of 1 or more.

  • Age-based retention

You must specify Interval and IntervalUnit . If you specify an ArchiveRule for the schedule, then you can specify a retention interval of 0 days to archive snapshots immediately after creation. If you specify a FastRestoreRule , ShareRule , or a CrossRegionCopyRule , then you must specify a retention interval of 1 day or more.

Parameters:
  • count (Union[int, float, None]) – The number of snapshots to retain for each volume, up to a maximum of 1000. For example if you want to retain a maximum of three snapshots, specify 3 . When the fourth snapshot is created, the oldest retained snapshot is deleted, or it is moved to the archive tier if you have specified an ArchiveRule .

  • interval (Union[int, float, None]) – The amount of time to retain each snapshot. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.

  • interval_unit (Optional[str]) – The unit of time for time-based retention. For example, to retain snapshots for 3 months, specify Interval=3 and IntervalUnit=MONTHS . Once the snapshot has been retained for 3 months, it is deleted, or it is moved to the archive tier if you have specified an ArchiveRule .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-retainrule.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_dlm as dlm

retain_rule_property = dlm.CfnLifecyclePolicy.RetainRuleProperty(
    count=123,
    interval=123,
    interval_unit="intervalUnit"
)

Attributes

count

The number of snapshots to retain for each volume, up to a maximum of 1000.

For example if you want to retain a maximum of three snapshots, specify 3 . When the fourth snapshot is created, the oldest retained snapshot is deleted, or it is moved to the archive tier if you have specified an ArchiveRule .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-retainrule.html#cfn-dlm-lifecyclepolicy-retainrule-count

interval

The amount of time to retain each snapshot.

The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-retainrule.html#cfn-dlm-lifecyclepolicy-retainrule-interval

interval_unit

The unit of time for time-based retention.

For example, to retain snapshots for 3 months, specify Interval=3 and IntervalUnit=MONTHS . Once the snapshot has been retained for 3 months, it is deleted, or it is moved to the archive tier if you have specified an ArchiveRule .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-retainrule.html#cfn-dlm-lifecyclepolicy-retainrule-intervalunit

RetentionArchiveTierProperty

class CfnLifecyclePolicy.RetentionArchiveTierProperty(*, count=None, interval=None, interval_unit=None)

Bases: object

Parameters:
  • count (Union[int, float, None]) – CfnLifecyclePolicy.RetentionArchiveTierProperty.Count.

  • interval (Union[int, float, None]) – CfnLifecyclePolicy.RetentionArchiveTierProperty.Interval.

  • interval_unit (Optional[str]) – CfnLifecyclePolicy.RetentionArchiveTierProperty.IntervalUnit.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-retentionarchivetier.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_dlm as dlm

retention_archive_tier_property = dlm.CfnLifecyclePolicy.RetentionArchiveTierProperty(
    count=123,
    interval=123,
    interval_unit="intervalUnit"
)

Attributes

count

CfnLifecyclePolicy.RetentionArchiveTierProperty.Count.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-retentionarchivetier.html#cfn-dlm-lifecyclepolicy-retentionarchivetier-count

interval

CfnLifecyclePolicy.RetentionArchiveTierProperty.Interval.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-retentionarchivetier.html#cfn-dlm-lifecyclepolicy-retentionarchivetier-interval

interval_unit

CfnLifecyclePolicy.RetentionArchiveTierProperty.IntervalUnit.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-retentionarchivetier.html#cfn-dlm-lifecyclepolicy-retentionarchivetier-intervalunit

ScheduleProperty

class CfnLifecyclePolicy.ScheduleProperty(*, archive_rule=None, copy_tags=None, create_rule=None, cross_region_copy_rules=None, deprecate_rule=None, fast_restore_rule=None, name=None, retain_rule=None, share_rules=None, tags_to_add=None, variable_tags=None)

Bases: object

[Snapshot and AMI policies only] Specifies a schedule for a snapshot or AMI lifecycle policy.

Parameters:
  • archive_rule (Union[IResolvable, ArchiveRuleProperty, Dict[str, Any], None]) – CfnLifecyclePolicy.ScheduleProperty.ArchiveRule.

  • copy_tags (Union[bool, IResolvable, None]) – Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.

  • create_rule (Union[IResolvable, CreateRuleProperty, Dict[str, Any], None]) – The creation rule.

  • cross_region_copy_rules (Union[IResolvable, Sequence[Union[IResolvable, CrossRegionCopyRuleProperty, Dict[str, Any]]], None]) – Specifies a rule for copying snapshots or AMIs across regions. .. epigraph:: You can’t specify cross-Region copy rules for policies that create snapshots on an Outpost. If the policy creates snapshots in a Region, then snapshots can be copied to up to three Regions or Outposts.

  • deprecate_rule (Union[IResolvable, DeprecateRuleProperty, Dict[str, Any], None]) – CfnLifecyclePolicy.ScheduleProperty.DeprecateRule.

  • fast_restore_rule (Union[IResolvable, FastRestoreRuleProperty, Dict[str, Any], None]) – [Snapshot policies only] The rule for enabling fast snapshot restore.

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

  • retain_rule (Union[IResolvable, RetainRuleProperty, Dict[str, Any], None]) – The retention rule for snapshots or AMIs created by the policy.

  • share_rules (Union[IResolvable, Sequence[Union[IResolvable, ShareRuleProperty, Dict[str, Any]]], None]) – [Snapshot policies only] The rule for sharing snapshots with other AWS accounts .

  • tags_to_add (Union[IResolvable, Sequence[Union[IResolvable, CfnTag, Dict[str, Any]]], None]) – The tags to apply to policy-created resources. These user-defined tags are in addition to the AWS -added lifecycle tags.

  • variable_tags (Union[IResolvable, Sequence[Union[IResolvable, CfnTag, Dict[str, Any]]], None]) – [AMI policies and snapshot policies that target instances only] A collection of key/value pairs with values determined dynamically when the policy is executed. Keys may be any valid Amazon EC2 tag key. Values must be in one of the two following formats: $(instance-id) or $(timestamp) . Variable tags are only valid for EBS Snapshot Management – Instance policies.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-schedule.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_dlm as dlm

schedule_property = dlm.CfnLifecyclePolicy.ScheduleProperty(
    archive_rule=dlm.CfnLifecyclePolicy.ArchiveRuleProperty(
        retain_rule=dlm.CfnLifecyclePolicy.ArchiveRetainRuleProperty(
            retention_archive_tier=dlm.CfnLifecyclePolicy.RetentionArchiveTierProperty(
                count=123,
                interval=123,
                interval_unit="intervalUnit"
            )
        )
    ),
    copy_tags=False,
    create_rule=dlm.CfnLifecyclePolicy.CreateRuleProperty(
        cron_expression="cronExpression",
        interval=123,
        interval_unit="intervalUnit",
        location="location",
        times=["times"]
    ),
    cross_region_copy_rules=[dlm.CfnLifecyclePolicy.CrossRegionCopyRuleProperty(
        encrypted=False,

        # the properties below are optional
        cmk_arn="cmkArn",
        copy_tags=False,
        deprecate_rule=dlm.CfnLifecyclePolicy.CrossRegionCopyDeprecateRuleProperty(
            interval=123,
            interval_unit="intervalUnit"
        ),
        retain_rule=dlm.CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty(
            interval=123,
            interval_unit="intervalUnit"
        ),
        target="target",
        target_region="targetRegion"
    )],
    deprecate_rule=dlm.CfnLifecyclePolicy.DeprecateRuleProperty(
        count=123,
        interval=123,
        interval_unit="intervalUnit"
    ),
    fast_restore_rule=dlm.CfnLifecyclePolicy.FastRestoreRuleProperty(
        availability_zones=["availabilityZones"],
        count=123,
        interval=123,
        interval_unit="intervalUnit"
    ),
    name="name",
    retain_rule=dlm.CfnLifecyclePolicy.RetainRuleProperty(
        count=123,
        interval=123,
        interval_unit="intervalUnit"
    ),
    share_rules=[dlm.CfnLifecyclePolicy.ShareRuleProperty(
        target_accounts=["targetAccounts"],
        unshare_interval=123,
        unshare_interval_unit="unshareIntervalUnit"
    )],
    tags_to_add=[CfnTag(
        key="key",
        value="value"
    )],
    variable_tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

archive_rule

CfnLifecyclePolicy.ScheduleProperty.ArchiveRule.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-schedule.html#cfn-dlm-lifecyclepolicy-schedule-archiverule

copy_tags

Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-schedule.html#cfn-dlm-lifecyclepolicy-schedule-copytags

create_rule

The creation rule.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-schedule.html#cfn-dlm-lifecyclepolicy-schedule-createrule

cross_region_copy_rules

Specifies a rule for copying snapshots or AMIs across regions.

You can’t specify cross-Region copy rules for policies that create snapshots on an Outpost. If the policy creates snapshots in a Region, then snapshots can be copied to up to three Regions or Outposts.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-schedule.html#cfn-dlm-lifecyclepolicy-schedule-crossregioncopyrules

deprecate_rule

CfnLifecyclePolicy.ScheduleProperty.DeprecateRule.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-schedule.html#cfn-dlm-lifecyclepolicy-schedule-deprecaterule

fast_restore_rule

[Snapshot policies only] The rule for enabling fast snapshot restore.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-schedule.html#cfn-dlm-lifecyclepolicy-schedule-fastrestorerule

name

The name of the schedule.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-schedule.html#cfn-dlm-lifecyclepolicy-schedule-name

retain_rule

The retention rule for snapshots or AMIs created by the policy.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-schedule.html#cfn-dlm-lifecyclepolicy-schedule-retainrule

share_rules

[Snapshot policies only] The rule for sharing snapshots with other AWS accounts .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-schedule.html#cfn-dlm-lifecyclepolicy-schedule-sharerules

tags_to_add

The tags to apply to policy-created resources.

These user-defined tags are in addition to the AWS -added lifecycle tags.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-schedule.html#cfn-dlm-lifecyclepolicy-schedule-tagstoadd

variable_tags

[AMI policies and snapshot policies that target instances only] A collection of key/value pairs with values determined dynamically when the policy is executed.

Keys may be any valid Amazon EC2 tag key. Values must be in one of the two following formats: $(instance-id) or $(timestamp) . Variable tags are only valid for EBS Snapshot Management – Instance policies.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-schedule.html#cfn-dlm-lifecyclepolicy-schedule-variabletags

ShareRuleProperty

class CfnLifecyclePolicy.ShareRuleProperty(*, target_accounts=None, unshare_interval=None, unshare_interval_unit=None)

Bases: object

[Snapshot policies only] Specifies a rule for sharing snapshots across AWS accounts .

Parameters:
  • target_accounts (Optional[Sequence[str]]) – The IDs of the AWS accounts with which to share the snapshots.

  • unshare_interval (Union[int, float, None]) – The period after which snapshots that are shared with other AWS accounts are automatically unshared.

  • unshare_interval_unit (Optional[str]) – The unit of time for the automatic unsharing interval.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-sharerule.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_dlm as dlm

share_rule_property = dlm.CfnLifecyclePolicy.ShareRuleProperty(
    target_accounts=["targetAccounts"],
    unshare_interval=123,
    unshare_interval_unit="unshareIntervalUnit"
)

Attributes

target_accounts

The IDs of the AWS accounts with which to share the snapshots.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-sharerule.html#cfn-dlm-lifecyclepolicy-sharerule-targetaccounts

unshare_interval

The period after which snapshots that are shared with other AWS accounts are automatically unshared.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-sharerule.html#cfn-dlm-lifecyclepolicy-sharerule-unshareinterval

unshare_interval_unit

The unit of time for the automatic unsharing interval.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-sharerule.html#cfn-dlm-lifecyclepolicy-sharerule-unshareintervalunit