Skip to content
v2.278.0

CfnLifecyclePolicyProps Struct ​

Properties for defining a CfnLifecyclePolicy.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_dlm as dlm } from 'aws-cdk-lib';
const cfnLifecyclePolicyProps: dlm.CfnLifecyclePolicyProps = {
  copyTags: false,
  createInterval: 123,
  crossRegionCopyTargets: [{
    targetRegion: 'targetRegion',
  }],
  defaultPolicy: 'defaultPolicy',
  description: 'description',
  exclusions: {
    excludeBootVolumes: false,
    excludeTags: [{
      key: 'key',
      value: 'value',
    }],
    excludeVolumeTypes: ['excludeVolumeTypes'],
  },
  executionRoleArn: 'executionRoleArn',
  extendDeletion: false,
  policyDetails: {
    actions: [{
      crossRegionCopy: [{
        encryptionConfiguration: {
          encrypted: false,

          // the properties below are optional
          cmkArn: 'cmkArn',
        },
        target: 'target',

        // the properties below are optional
        retainRule: {
          interval: 123,
          intervalUnit: 'intervalUnit',
        },
      }],
      name: 'name',
    }],
    copyTags: false,
    createInterval: 123,
    crossRegionCopyTargets: [{
      targetRegion: 'targetRegion',
    }],
    eventSource: {
      type: 'type',

      // the properties below are optional
      parameters: {
        eventType: 'eventType',
        snapshotOwner: ['snapshotOwner'],

        // the properties below are optional
        descriptionRegex: 'descriptionRegex',
      },
    },
    exclusions: {
      excludeBootVolumes: false,
      excludeTags: [{
        key: 'key',
        value: 'value',
      }],
      excludeVolumeTypes: ['excludeVolumeTypes'],
    },
    extendDeletion: false,
    parameters: {
      excludeBootVolume: false,
      excludeDataVolumeTags: [{
        key: 'key',
        value: 'value',
      }],
      noReboot: false,
    },
    policyLanguage: 'policyLanguage',
    policyType: 'policyType',
    resourceLocations: ['resourceLocations'],
    resourceType: 'resourceType',
    resourceTypes: ['resourceTypes'],
    retainInterval: 123,
    schedules: [{
      archiveRule: {
        retainRule: {
          retentionArchiveTier: {
            count: 123,
            interval: 123,
            intervalUnit: 'intervalUnit',
          },
        },
      },
      copyTags: false,
      createRule: {
        cronExpression: 'cronExpression',
        interval: 123,
        intervalUnit: 'intervalUnit',
        location: 'location',
        scripts: [{
          executeOperationOnScriptFailure: false,
          executionHandler: 'executionHandler',
          executionHandlerService: 'executionHandlerService',
          executionTimeout: 123,
          maximumRetryCount: 123,
          stages: ['stages'],
        }],
        times: ['times'],
      },
      crossRegionCopyRules: [{
        encrypted: false,

        // the properties below are optional
        cmkArn: 'cmkArn',
        copyTags: false,
        deprecateRule: {
          interval: 123,
          intervalUnit: 'intervalUnit',
        },
        retainRule: {
          interval: 123,
          intervalUnit: 'intervalUnit',
        },
        target: 'target',
        targetRegion: 'targetRegion',
      }],
      deprecateRule: {
        count: 123,
        interval: 123,
        intervalUnit: 'intervalUnit',
      },
      fastRestoreRule: {
        availabilityZoneIds: ['availabilityZoneIds'],
        availabilityZones: ['availabilityZones'],
        count: 123,
        interval: 123,
        intervalUnit: 'intervalUnit',
      },
      name: 'name',
      retainRule: {
        count: 123,
        interval: 123,
        intervalUnit: 'intervalUnit',
      },
      shareRules: [{
        targetAccounts: ['targetAccounts'],
        unshareInterval: 123,
        unshareIntervalUnit: 'unshareIntervalUnit',
      }],
      tagsToAdd: [{
        key: 'key',
        value: 'value',
      }],
      variableTags: [{
        key: 'key',
        value: 'value',
      }],
    }],
    targetTags: [{
      key: 'key',
      value: 'value',
    }],
  },
  retainInterval: 123,
  state: 'state',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag, CfnTag, CfnTag, CfnTag, CfnTag, CfnTag, CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_dlm as dlm

cfn_lifecycle_policy_props = dlm.CfnLifecyclePolicyProps(
    copy_tags=False,
    create_interval=123,
    cross_region_copy_targets=[dlm.CfnLifecyclePolicy.CrossRegionCopyTargetProperty(
        target_region="targetRegion"
    )],
    default_policy="defaultPolicy",
    description="description",
    exclusions=dlm.CfnLifecyclePolicy.ExclusionsProperty(
        exclude_boot_volumes=False,
        exclude_tags=[CfnTag(
            key="key",
            value="value"
        )],
        exclude_volume_types=["excludeVolumeTypes"]
    ),
    execution_role_arn="executionRoleArn",
    extend_deletion=False,
    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"
        )],
        copy_tags=False,
        create_interval=123,
        cross_region_copy_targets=[dlm.CfnLifecyclePolicy.CrossRegionCopyTargetProperty(
            target_region="targetRegion"
        )],
        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"
            )
        ),
        exclusions=dlm.CfnLifecyclePolicy.ExclusionsProperty(
            exclude_boot_volumes=False,
            exclude_tags=[CfnTag(
                key="key",
                value="value"
            )],
            exclude_volume_types=["excludeVolumeTypes"]
        ),
        extend_deletion=False,
        parameters=dlm.CfnLifecyclePolicy.ParametersProperty(
            exclude_boot_volume=False,
            exclude_data_volume_tags=[CfnTag(
                key="key",
                value="value"
            )],
            no_reboot=False
        ),
        policy_language="policyLanguage",
        policy_type="policyType",
        resource_locations=["resourceLocations"],
        resource_type="resourceType",
        resource_types=["resourceTypes"],
        retain_interval=123,
        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",
                scripts=[dlm.CfnLifecyclePolicy.ScriptProperty(
                    execute_operation_on_script_failure=False,
                    execution_handler="executionHandler",
                    execution_handler_service="executionHandlerService",
                    execution_timeout=123,
                    maximum_retry_count=123,
                    stages=["stages"]
                )],
                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_zone_ids=["availabilityZoneIds"],
                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"
        )]
    ),
    retain_interval=123,
    state="state",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.dlm.*;

CfnLifecyclePolicyProps cfnLifecyclePolicyProps = CfnLifecyclePolicyProps.builder()
        .copyTags(false)
        .createInterval(123)
        .crossRegionCopyTargets(List.of(CrossRegionCopyTargetProperty.builder()
                .targetRegion("targetRegion")
                .build()))
        .defaultPolicy("defaultPolicy")
        .description("description")
        .exclusions(ExclusionsProperty.builder()
                .excludeBootVolumes(false)
                .excludeTags(List.of(CfnTag.builder()
                        .key("key")
                        .value("value")
                        .build()))
                .excludeVolumeTypes(List.of("excludeVolumeTypes"))
                .build())
        .executionRoleArn("executionRoleArn")
        .extendDeletion(false)
        .policyDetails(PolicyDetailsProperty.builder()
                .actions(List.of(ActionProperty.builder()
                        .crossRegionCopy(List.of(CrossRegionCopyActionProperty.builder()
                                .encryptionConfiguration(EncryptionConfigurationProperty.builder()
                                        .encrypted(false)

                                        // the properties below are optional
                                        .cmkArn("cmkArn")
                                        .build())
                                .target("target")

                                // the properties below are optional
                                .retainRule(CrossRegionCopyRetainRuleProperty.builder()
                                        .interval(123)
                                        .intervalUnit("intervalUnit")
                                        .build())
                                .build()))
                        .name("name")
                        .build()))
                .copyTags(false)
                .createInterval(123)
                .crossRegionCopyTargets(List.of(CrossRegionCopyTargetProperty.builder()
                        .targetRegion("targetRegion")
                        .build()))
                .eventSource(EventSourceProperty.builder()
                        .type("type")

                        // the properties below are optional
                        .parameters(EventParametersProperty.builder()
                                .eventType("eventType")
                                .snapshotOwner(List.of("snapshotOwner"))

                                // the properties below are optional
                                .descriptionRegex("descriptionRegex")
                                .build())
                        .build())
                .exclusions(ExclusionsProperty.builder()
                        .excludeBootVolumes(false)
                        .excludeTags(List.of(CfnTag.builder()
                                .key("key")
                                .value("value")
                                .build()))
                        .excludeVolumeTypes(List.of("excludeVolumeTypes"))
                        .build())
                .extendDeletion(false)
                .parameters(ParametersProperty.builder()
                        .excludeBootVolume(false)
                        .excludeDataVolumeTags(List.of(CfnTag.builder()
                                .key("key")
                                .value("value")
                                .build()))
                        .noReboot(false)
                        .build())
                .policyLanguage("policyLanguage")
                .policyType("policyType")
                .resourceLocations(List.of("resourceLocations"))
                .resourceType("resourceType")
                .resourceTypes(List.of("resourceTypes"))
                .retainInterval(123)
                .schedules(List.of(ScheduleProperty.builder()
                        .archiveRule(ArchiveRuleProperty.builder()
                                .retainRule(ArchiveRetainRuleProperty.builder()
                                        .retentionArchiveTier(RetentionArchiveTierProperty.builder()
                                                .count(123)
                                                .interval(123)
                                                .intervalUnit("intervalUnit")
                                                .build())
                                        .build())
                                .build())
                        .copyTags(false)
                        .createRule(CreateRuleProperty.builder()
                                .cronExpression("cronExpression")
                                .interval(123)
                                .intervalUnit("intervalUnit")
                                .location("location")
                                .scripts(List.of(ScriptProperty.builder()
                                        .executeOperationOnScriptFailure(false)
                                        .executionHandler("executionHandler")
                                        .executionHandlerService("executionHandlerService")
                                        .executionTimeout(123)
                                        .maximumRetryCount(123)
                                        .stages(List.of("stages"))
                                        .build()))
                                .times(List.of("times"))
                                .build())
                        .crossRegionCopyRules(List.of(CrossRegionCopyRuleProperty.builder()
                                .encrypted(false)

                                // the properties below are optional
                                .cmkArn("cmkArn")
                                .copyTags(false)
                                .deprecateRule(CrossRegionCopyDeprecateRuleProperty.builder()
                                        .interval(123)
                                        .intervalUnit("intervalUnit")
                                        .build())
                                .retainRule(CrossRegionCopyRetainRuleProperty.builder()
                                        .interval(123)
                                        .intervalUnit("intervalUnit")
                                        .build())
                                .target("target")
                                .targetRegion("targetRegion")
                                .build()))
                        .deprecateRule(DeprecateRuleProperty.builder()
                                .count(123)
                                .interval(123)
                                .intervalUnit("intervalUnit")
                                .build())
                        .fastRestoreRule(FastRestoreRuleProperty.builder()
                                .availabilityZoneIds(List.of("availabilityZoneIds"))
                                .availabilityZones(List.of("availabilityZones"))
                                .count(123)
                                .interval(123)
                                .intervalUnit("intervalUnit")
                                .build())
                        .name("name")
                        .retainRule(RetainRuleProperty.builder()
                                .count(123)
                                .interval(123)
                                .intervalUnit("intervalUnit")
                                .build())
                        .shareRules(List.of(ShareRuleProperty.builder()
                                .targetAccounts(List.of("targetAccounts"))
                                .unshareInterval(123)
                                .unshareIntervalUnit("unshareIntervalUnit")
                                .build()))
                        .tagsToAdd(List.of(CfnTag.builder()
                                .key("key")
                                .value("value")
                                .build()))
                        .variableTags(List.of(CfnTag.builder()
                                .key("key")
                                .value("value")
                                .build()))
                        .build()))
                .targetTags(List.of(CfnTag.builder()
                        .key("key")
                        .value("value")
                        .build()))
                .build())
        .retainInterval(123)
        .state("state")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.DLM;

var cfnLifecyclePolicyProps = new CfnLifecyclePolicyProps {
    CopyTags = false,
    CreateInterval = 123,
    CrossRegionCopyTargets = new [] { new CrossRegionCopyTargetProperty {
        TargetRegion = "targetRegion"
    } },
    DefaultPolicy = "defaultPolicy",
    Description = "description",
    Exclusions = new ExclusionsProperty {
        ExcludeBootVolumes = false,
        ExcludeTags = new [] { new CfnTag {
            Key = "key",
            Value = "value"
        } },
        ExcludeVolumeTypes = new [] { "excludeVolumeTypes" }
    },
    ExecutionRoleArn = "executionRoleArn",
    ExtendDeletion = false,
    PolicyDetails = new PolicyDetailsProperty {
        Actions = new [] { new ActionProperty {
            CrossRegionCopy = new [] { new CrossRegionCopyActionProperty {
                EncryptionConfiguration = new EncryptionConfigurationProperty {
                    Encrypted = false,

                    // the properties below are optional
                    CmkArn = "cmkArn"
                },
                Target = "target",

                // the properties below are optional
                RetainRule = new CrossRegionCopyRetainRuleProperty {
                    Interval = 123,
                    IntervalUnit = "intervalUnit"
                }
            } },
            Name = "name"
        } },
        CopyTags = false,
        CreateInterval = 123,
        CrossRegionCopyTargets = new [] { new CrossRegionCopyTargetProperty {
            TargetRegion = "targetRegion"
        } },
        EventSource = new EventSourceProperty {
            Type = "type",

            // the properties below are optional
            Parameters = new EventParametersProperty {
                EventType = "eventType",
                SnapshotOwner = new [] { "snapshotOwner" },

                // the properties below are optional
                DescriptionRegex = "descriptionRegex"
            }
        },
        Exclusions = new ExclusionsProperty {
            ExcludeBootVolumes = false,
            ExcludeTags = new [] { new CfnTag {
                Key = "key",
                Value = "value"
            } },
            ExcludeVolumeTypes = new [] { "excludeVolumeTypes" }
        },
        ExtendDeletion = false,
        Parameters = new ParametersProperty {
            ExcludeBootVolume = false,
            ExcludeDataVolumeTags = new [] { new CfnTag {
                Key = "key",
                Value = "value"
            } },
            NoReboot = false
        },
        PolicyLanguage = "policyLanguage",
        PolicyType = "policyType",
        ResourceLocations = new [] { "resourceLocations" },
        ResourceType = "resourceType",
        ResourceTypes = new [] { "resourceTypes" },
        RetainInterval = 123,
        Schedules = new [] { new ScheduleProperty {
            ArchiveRule = new ArchiveRuleProperty {
                RetainRule = new ArchiveRetainRuleProperty {
                    RetentionArchiveTier = new RetentionArchiveTierProperty {
                        Count = 123,
                        Interval = 123,
                        IntervalUnit = "intervalUnit"
                    }
                }
            },
            CopyTags = false,
            CreateRule = new CreateRuleProperty {
                CronExpression = "cronExpression",
                Interval = 123,
                IntervalUnit = "intervalUnit",
                Location = "location",
                Scripts = new [] { new ScriptProperty {
                    ExecuteOperationOnScriptFailure = false,
                    ExecutionHandler = "executionHandler",
                    ExecutionHandlerService = "executionHandlerService",
                    ExecutionTimeout = 123,
                    MaximumRetryCount = 123,
                    Stages = new [] { "stages" }
                } },
                Times = new [] { "times" }
            },
            CrossRegionCopyRules = new [] { new CrossRegionCopyRuleProperty {
                Encrypted = false,

                // the properties below are optional
                CmkArn = "cmkArn",
                CopyTags = false,
                DeprecateRule = new CrossRegionCopyDeprecateRuleProperty {
                    Interval = 123,
                    IntervalUnit = "intervalUnit"
                },
                RetainRule = new CrossRegionCopyRetainRuleProperty {
                    Interval = 123,
                    IntervalUnit = "intervalUnit"
                },
                Target = "target",
                TargetRegion = "targetRegion"
            } },
            DeprecateRule = new DeprecateRuleProperty {
                Count = 123,
                Interval = 123,
                IntervalUnit = "intervalUnit"
            },
            FastRestoreRule = new FastRestoreRuleProperty {
                AvailabilityZoneIds = new [] { "availabilityZoneIds" },
                AvailabilityZones = new [] { "availabilityZones" },
                Count = 123,
                Interval = 123,
                IntervalUnit = "intervalUnit"
            },
            Name = "name",
            RetainRule = new RetainRuleProperty {
                Count = 123,
                Interval = 123,
                IntervalUnit = "intervalUnit"
            },
            ShareRules = new [] { new ShareRuleProperty {
                TargetAccounts = new [] { "targetAccounts" },
                UnshareInterval = 123,
                UnshareIntervalUnit = "unshareIntervalUnit"
            } },
            TagsToAdd = new [] { new CfnTag {
                Key = "key",
                Value = "value"
            } },
            VariableTags = new [] { new CfnTag {
                Key = "key",
                Value = "value"
            } }
        } },
        TargetTags = new [] { new CfnTag {
            Key = "key",
            Value = "value"
        } }
    },
    RetainInterval = 123,
    State = "state",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnLifecyclePolicyProps := &CfnLifecyclePolicyProps{
	CopyTags: jsii.Boolean(false),
	CreateInterval: jsii.Number(123),
	CrossRegionCopyTargets: []interface{}{
		&CrossRegionCopyTargetProperty{
			TargetRegion: jsii.String("targetRegion"),
		},
	},
	DefaultPolicy: jsii.String("defaultPolicy"),
	Description: jsii.String("description"),
	Exclusions: &ExclusionsProperty{
		ExcludeBootVolumes: jsii.Boolean(false),
		ExcludeTags: []interface{}{
			&CfnTag{
				Key: jsii.String("key"),
				Value: jsii.String("value"),
			},
		},
		ExcludeVolumeTypes: []*string{
			jsii.String("excludeVolumeTypes"),
		},
	},
	ExecutionRoleArn: jsii.String("executionRoleArn"),
	ExtendDeletion: jsii.Boolean(false),
	PolicyDetails: &PolicyDetailsProperty{
		Actions: []interface{}{
			&ActionProperty{
				CrossRegionCopy: []interface{}{
					&CrossRegionCopyActionProperty{
						EncryptionConfiguration: &EncryptionConfigurationProperty{
							Encrypted: jsii.Boolean(false),

							// the properties below are optional
							CmkArn: jsii.String("cmkArn"),
						},
						Target: jsii.String("target"),

						// the properties below are optional
						RetainRule: &CrossRegionCopyRetainRuleProperty{
							Interval: jsii.Number(123),
							IntervalUnit: jsii.String("intervalUnit"),
						},
					},
				},
				Name: jsii.String("name"),
			},
		},
		CopyTags: jsii.Boolean(false),
		CreateInterval: jsii.Number(123),
		CrossRegionCopyTargets: []interface{}{
			&CrossRegionCopyTargetProperty{
				TargetRegion: jsii.String("targetRegion"),
			},
		},
		EventSource: &EventSourceProperty{
			Type: jsii.String("type"),

			// the properties below are optional
			Parameters: &EventParametersProperty{
				EventType: jsii.String("eventType"),
				SnapshotOwner: []*string{
					jsii.String("snapshotOwner"),
				},

				// the properties below are optional
				DescriptionRegex: jsii.String("descriptionRegex"),
			},
		},
		Exclusions: &ExclusionsProperty{
			ExcludeBootVolumes: jsii.Boolean(false),
			ExcludeTags: []interface{}{
				&CfnTag{
					Key: jsii.String("key"),
					Value: jsii.String("value"),
				},
			},
			ExcludeVolumeTypes: []*string{
				jsii.String("excludeVolumeTypes"),
			},
		},
		ExtendDeletion: jsii.Boolean(false),
		Parameters: &ParametersProperty{
			ExcludeBootVolume: jsii.Boolean(false),
			ExcludeDataVolumeTags: []interface{}{
				&CfnTag{
					Key: jsii.String("key"),
					Value: jsii.String("value"),
				},
			},
			NoReboot: jsii.Boolean(false),
		},
		PolicyLanguage: jsii.String("policyLanguage"),
		PolicyType: jsii.String("policyType"),
		ResourceLocations: []*string{
			jsii.String("resourceLocations"),
		},
		ResourceType: jsii.String("resourceType"),
		ResourceTypes: []*string{
			jsii.String("resourceTypes"),
		},
		RetainInterval: jsii.Number(123),
		Schedules: []interface{}{
			&ScheduleProperty{
				ArchiveRule: &ArchiveRuleProperty{
					RetainRule: &ArchiveRetainRuleProperty{
						RetentionArchiveTier: &RetentionArchiveTierProperty{
							Count: jsii.Number(123),
							Interval: jsii.Number(123),
							IntervalUnit: jsii.String("intervalUnit"),
						},
					},
				},
				CopyTags: jsii.Boolean(false),
				CreateRule: &CreateRuleProperty{
					CronExpression: jsii.String("cronExpression"),
					Interval: jsii.Number(123),
					IntervalUnit: jsii.String("intervalUnit"),
					Location: jsii.String("location"),
					Scripts: []interface{}{
						&ScriptProperty{
							ExecuteOperationOnScriptFailure: jsii.Boolean(false),
							ExecutionHandler: jsii.String("executionHandler"),
							ExecutionHandlerService: jsii.String("executionHandlerService"),
							ExecutionTimeout: jsii.Number(123),
							MaximumRetryCount: jsii.Number(123),
							Stages: []*string{
								jsii.String("stages"),
							},
						},
					},
					Times: []*string{
						jsii.String("times"),
					},
				},
				CrossRegionCopyRules: []interface{}{
					&CrossRegionCopyRuleProperty{
						Encrypted: jsii.Boolean(false),

						// the properties below are optional
						CmkArn: jsii.String("cmkArn"),
						CopyTags: jsii.Boolean(false),
						DeprecateRule: &CrossRegionCopyDeprecateRuleProperty{
							Interval: jsii.Number(123),
							IntervalUnit: jsii.String("intervalUnit"),
						},
						RetainRule: &CrossRegionCopyRetainRuleProperty{
							Interval: jsii.Number(123),
							IntervalUnit: jsii.String("intervalUnit"),
						},
						Target: jsii.String("target"),
						TargetRegion: jsii.String("targetRegion"),
					},
				},
				DeprecateRule: &DeprecateRuleProperty{
					Count: jsii.Number(123),
					Interval: jsii.Number(123),
					IntervalUnit: jsii.String("intervalUnit"),
				},
				FastRestoreRule: &FastRestoreRuleProperty{
					AvailabilityZoneIds: []*string{
						jsii.String("availabilityZoneIds"),
					},
					AvailabilityZones: []*string{
						jsii.String("availabilityZones"),
					},
					Count: jsii.Number(123),
					Interval: jsii.Number(123),
					IntervalUnit: jsii.String("intervalUnit"),
				},
				Name: jsii.String("name"),
				RetainRule: &RetainRuleProperty{
					Count: jsii.Number(123),
					Interval: jsii.Number(123),
					IntervalUnit: jsii.String("intervalUnit"),
				},
				ShareRules: []interface{}{
					&ShareRuleProperty{
						TargetAccounts: []*string{
							jsii.String("targetAccounts"),
						},
						UnshareInterval: jsii.Number(123),
						UnshareIntervalUnit: jsii.String("unshareIntervalUnit"),
					},
				},
				TagsToAdd: []interface{}{
					&CfnTag{
						Key: jsii.String("key"),
						Value: jsii.String("value"),
					},
				},
				VariableTags: []interface{}{
					&CfnTag{
						Key: jsii.String("key"),
						Value: jsii.String("value"),
					},
				},
			},
		},
		TargetTags: []interface{}{
			&CfnTag{
				Key: jsii.String("key"),
				Value: jsii.String("value"),
			},
		},
	},
	RetainInterval: jsii.Number(123),
	State: jsii.String("state"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

copyTagsoptionalboolean | IResolvablecopy_tagsoptionaltyping.Union[bool, IResolvable]copyTagsoptionalBooleanCopyTagsoptionalboolCopyTagsoptionalinterface{} #
*[Default policies only]* Indicates whether the policy should copy tags from the source resource to the snapshot or AMI.

If you do not specify a value, the default is false .

Default: false

createIntervaloptionalnumbercreate_intervaloptionalint | floatcreateIntervaloptionalNumberCreateIntervaloptionaldoubleCreateIntervaloptional*float64 #
*[Default policies only]* Specifies how often the policy should run and create snapshots or AMIs.

The creation frequency can range from 1 to 7 days. If you do not specify a value, the default is 1.

Default: 1

crossRegionCopyTargetsoptionalIResolvable | IResolvable | CfnLifecyclePolicy.CrossRegionCopyTargetProperty[]cross_region_copy_targetsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, CrossRegionCopyTargetProperty]]]crossRegionCopyTargetsoptionalIResolvableCrossRegionCopyTargetsoptionalIResolvableCrossRegionCopyTargetsoptionalinterface{} #
*[Default policies only]* Specifies destination Regions for snapshot or AMI copies.

You can specify up to 3 destination Regions. If you do not want to create cross-Region copies, omit this parameter.

defaultPolicyoptionalstringdefault_policyoptionalstrdefaultPolicyoptionalStringDefaultPolicyoptionalstringDefaultPolicyoptional*string #
*[Default policies only]* Specify the type of default policy to create.
notes
  • To create a default policy for EBS snapshots, that creates snapshots of all volumes in the Region that do not have recent backups, specify VOLUME .
  • To create a default policy for EBS-backed AMIs, that creates EBS-backed AMIs from all instances in the Region that do not have recent backups, specify INSTANCE .
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
A description of the lifecycle policy.

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

exclusionsoptionalIResolvable | CfnLifecyclePolicy.ExclusionsPropertyexclusionsoptionaltyping.Union[IResolvable, ExclusionsProperty]exclusionsoptionalIResolvableExclusionsoptionalIResolvableExclusionsoptionalinterface{} #
*[Default policies only]* Specifies exclusion parameters for volumes or instances for which you do not want to create snapshots or AMIs.

The policy will not create snapshots or AMIs for target resources that match any of the specified exclusion parameters.

executionRoleArnoptionalstringexecution_role_arnoptionalstrexecutionRoleArnoptionalStringExecutionRoleArnoptionalstringExecutionRoleArnoptional*string #
The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.
extendDeletionoptionalboolean | IResolvableextend_deletionoptionaltyping.Union[bool, IResolvable]extendDeletionoptionalBooleanExtendDeletionoptionalboolExtendDeletionoptionalinterface{} #
*[Default policies only]* Defines the snapshot or AMI retention behavior for the policy if the source volume or instance is deleted, or if the policy enters the error, disabled, or deleted state.
notes

By default ( ExtendDeletion=false ):

  • If a source resource is deleted, Amazon Data Lifecycle Manager will continue to delete previously created snapshots or AMIs, up to but not including the last one, based on the specified retention period. If you want Amazon Data Lifecycle Manager to delete all snapshots or AMIs, including the last one, specify true .
  • If a policy enters the error, disabled, or deleted state, Amazon Data Lifecycle Manager stops deleting snapshots and AMIs. If you want Amazon Data Lifecycle Manager to continue deleting snapshots or AMIs, including the last one, if the policy enters one of these states, specify true .

If you enable extended deletion ( ExtendDeletion=true ), you override both default behaviors simultaneously.

If you do not specify a value, the default is false .

Default: false

policyDetailsoptionalIResolvable | CfnLifecyclePolicy.PolicyDetailsPropertypolicy_detailsoptionaltyping.Union[IResolvable, PolicyDetailsProperty]policyDetailsoptionalIResolvablePolicyDetailsoptionalIResolvablePolicyDetailsoptionalinterface{} #
The configuration details of the lifecycle policy.

If you create a default policy, you can specify the request parameters either in the request body, or in the PolicyDetails request structure, but not both.

retainIntervaloptionalnumberretain_intervaloptionalint | floatretainIntervaloptionalNumberRetainIntervaloptionaldoubleRetainIntervaloptional*float64 #
*[Default policies only]* Specifies how long the policy should retain snapshots or AMIs before deleting them.
notes

The retention period can range from 2 to 14 days, but it must be greater than the creation frequency to ensure that the policy retains at least 1 snapshot or AMI at any given time. If you do not specify a value, the default is 7.

Default: 7

stateoptionalstringstateoptionalstrstateoptionalStringStateoptionalstringStateoptional*string #
The activation state of the lifecycle policy.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
The tags to apply to the lifecycle policy during creation.