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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface[Event-based policies only] Specifies an action for an event-based policy.static interface[Custom snapshot policies only] Specifies information about the archive storage tier retention period.static interface[Custom snapshot policies only] Specifies a snapshot archiving rule for a schedule.static final classA fluent builder forCfnLifecyclePolicyPropsMixin.static interface[Custom snapshot and AMI policies only] Specifies when the policy should create snapshots or AMIs.static interface[Event-based policies only] Specifies a cross-Region copy action for event-based policies.static interface[Custom AMI policies only] Specifies an AMI deprecation rule for cross-Region AMI copies created by an AMI policy.static interfaceSpecifies a retention rule for cross-Region snapshot copies created by snapshot or event-based policies, or cross-Region AMI copies created by AMI policies.static interface[Custom snapshot and AMI policies only] Specifies a cross-Region copy rule for a snapshot and AMI policies.static interface[Custom AMI policies only] Specifies an AMI deprecation rule for AMIs created by an AMI lifecycle policy.static interface[Event-based policies only] Specifies the encryption settings for cross-Region snapshot copies created by event-based policies.static interface[Event-based policies only] Specifies an event that activates an event-based policy.static interface[Event-based policies only] Specifies an event that activates an event-based policy.static interface[Default policies only] Specifies exclusion parameters for volumes or instances for which you do not want to create snapshots or AMIs.static interface[Custom snapshot policies only] Specifies a rule for enabling fast snapshot restore for snapshots created by snapshot policies.static interface[Custom snapshot and AMI policies only] Specifies optional parameters for snapshot and AMI policies.static interfaceSpecifies the configuration of a lifecycle policy.static interface[Custom snapshot and AMI policies only] Specifies a retention rule for snapshots created by snapshot policies, or for AMIs created by AMI policies.static interface[Custom snapshot policies only] Describes the retention rule for archived snapshots.static interface[Custom snapshot and AMI policies only] Specifies a schedule for a snapshot or AMI lifecycle policy.static interface[Custom snapshot policies that target instances only] Information about pre and/or post scripts for a snapshot lifecycle policy that targets instances.static interface[Custom snapshot policies only] Specifies a rule for sharing snapshots across AWS accounts .Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::DLM::LifecyclePolicy.Create a mixin to apply properties toAWS::DLM::LifecyclePolicy.protectedCfnLifecyclePolicyPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnLifecyclePolicyPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnLifecyclePolicyMixinPropsgetProps()protected IMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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 toAWS::DLM::LifecyclePolicy.- Parameters:
props- L1 properties to apply. This parameter is required.options- Mixin options.
-
CfnLifecyclePolicyPropsMixin
Create a mixin to apply properties toAWS::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. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-