Class CfnLifecyclePolicyPropsMixin

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.dlm.CfnLifecyclePolicyPropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:19:58.113Z") @Stability(Stable) public class CfnLifecyclePolicyPropsMixin extends Mixin implements software.constructs.IMixin
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.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cfnpropertymixins.services.dlm.*;
 import software.amazon.awscdk.*;
 Object crossRegionCopyTargets;
 Object excludeTags;
 Object excludeVolumeTypes;
 IMergeStrategy mergeStrategy;
 CfnLifecyclePolicyPropsMixin cfnLifecyclePolicyPropsMixin = CfnLifecyclePolicyPropsMixin.Builder.create(CfnLifecyclePolicyMixinProps.builder()
         .copyTags(false)
         .createInterval(123)
         .crossRegionCopyTargets(crossRegionCopyTargets)
         .defaultPolicy("defaultPolicy")
         .description("description")
         .exclusions(ExclusionsProperty.builder()
                 .excludeBootVolumes(false)
                 .excludeTags(excludeTags)
                 .excludeVolumeTypes(excludeVolumeTypes)
                 .build())
         .executionRoleArn("executionRoleArn")
         .extendDeletion(false)
         .policyDetails(PolicyDetailsProperty.builder()
                 .actions(List.of(ActionProperty.builder()
                         .crossRegionCopy(List.of(CrossRegionCopyActionProperty.builder()
                                 .encryptionConfiguration(EncryptionConfigurationProperty.builder()
                                         .cmkArn("cmkArn")
                                         .encrypted(false)
                                         .build())
                                 .retainRule(CrossRegionCopyRetainRuleProperty.builder()
                                         .interval(123)
                                         .intervalUnit("intervalUnit")
                                         .build())
                                 .target("target")
                                 .build()))
                         .name("name")
                         .build()))
                 .copyTags(false)
                 .createInterval(123)
                 .crossRegionCopyTargets(crossRegionCopyTargets)
                 .eventSource(EventSourceProperty.builder()
                         .parameters(EventParametersProperty.builder()
                                 .descriptionRegex("descriptionRegex")
                                 .eventType("eventType")
                                 .snapshotOwner(List.of("snapshotOwner"))
                                 .build())
                         .type("type")
                         .build())
                 .exclusions(ExclusionsProperty.builder()
                         .excludeBootVolumes(false)
                         .excludeTags(excludeTags)
                         .excludeVolumeTypes(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()
                                 .cmkArn("cmkArn")
                                 .copyTags(false)
                                 .deprecateRule(CrossRegionCopyDeprecateRuleProperty.builder()
                                         .interval(123)
                                         .intervalUnit("intervalUnit")
                                         .build())
                                 .encrypted(false)
                                 .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()
                                 .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())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnLifecyclePolicyPropsMixin

      protected CfnLifecyclePolicyPropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnLifecyclePolicyPropsMixin

      protected CfnLifecyclePolicyPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnLifecyclePolicyPropsMixin

      @Stability(Stable) public CfnLifecyclePolicyPropsMixin(@NotNull CfnLifecyclePolicyMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::DLM::LifecyclePolicy.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnLifecyclePolicyPropsMixin

      @Stability(Stable) public CfnLifecyclePolicyPropsMixin(@NotNull CfnLifecyclePolicyMixinProps props)
      Create a mixin to apply properties to AWS::DLM::LifecyclePolicy.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnLifecyclePolicyMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()