Class CfnLifecyclePolicy
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.CfnElement
software.amazon.awscdk.core.CfnRefElement
software.amazon.awscdk.core.CfnResource
software.amazon.awscdk.services.dlm.CfnLifecyclePolicy
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:29:56.279Z")
@Stability(Stable)
public class CfnLifecyclePolicy
extends CfnResource
implements IInspectable
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.
Example:
// 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.*;
CfnLifecyclePolicy cfnLifecyclePolicy = CfnLifecyclePolicy.Builder.create(this, "MyCfnLifecyclePolicy")
.description("description")
.executionRoleArn("executionRoleArn")
.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()))
.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())
.parameters(ParametersProperty.builder()
.excludeBootVolume(false)
.excludeDataVolumeTags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.noReboot(false)
.build())
.policyType("policyType")
.resourceLocations(List.of("resourceLocations"))
.resourceTypes(List.of("resourceTypes"))
.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")
.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()
.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())
.state("state")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface[Event-based policies only] Specifies an action for an event-based policy.static interfaceExample:static interfaceExample:static final classA fluent builder forCfnLifecyclePolicy.static interface[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 interfaceExample: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[Snapshot and AMI policies only] Specifies a cross-Region copy rule for snapshot and AMI policies.static interfaceExample: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[Snapshot policies only] Specifies a rule for enabling fast snapshot restore for snapshots created by snapshot policies.static interface[Snapshot and AMI policies only] Specifies optional parameters for snapshot and AMI policies.static interface[All policy types] Specifies the configuration of a lifecycle policy.static interface[Snapshot and AMI policies only] Specifies a retention rule for snapshots created by snapshot policies, or for AMIs created by AMI policies.static interfaceExample:static interface[Snapshot and AMI policies only] Specifies a schedule for a snapshot or AMI lifecycle policy.static interface[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.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnLifecyclePolicy(Construct scope, String id) Create a newAWS::DLM::LifecyclePolicy.CfnLifecyclePolicy(Construct scope, String id, CfnLifecyclePolicyProps props) Create a newAWS::DLM::LifecyclePolicy.protectedCfnLifecyclePolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnLifecyclePolicy(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of the lifecycle policy.A description of the lifecycle policy.The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.The configuration details of the lifecycle policy.getState()The activation state of the lifecycle policy.getTags()The tags to apply to the lifecycle policy during creation.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDescription(String value) A description of the lifecycle policy.voidsetExecutionRoleArn(String value) The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.voidsetPolicyDetails(IResolvable value) The configuration details of the lifecycle policy.voidThe configuration details of the lifecycle policy.voidThe activation state of the lifecycle policy.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods 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, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnLifecyclePolicy
protected CfnLifecyclePolicy(software.amazon.jsii.JsiiObjectRef objRef) -
CfnLifecyclePolicy
protected CfnLifecyclePolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnLifecyclePolicy
@Stability(Stable) public CfnLifecyclePolicy(@NotNull Construct scope, @NotNull String id, @Nullable CfnLifecyclePolicyProps props) Create a newAWS::DLM::LifecyclePolicy.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
CfnLifecyclePolicy
Create a newAWS::DLM::LifecyclePolicy.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the lifecycle policy. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
The tags to apply to the lifecycle policy during creation. -
getDescription
A description of the lifecycle policy.The characters ^[0-9A-Za-z _-]+$ are supported.
-
setDescription
A description of the lifecycle policy.The characters ^[0-9A-Za-z _-]+$ are supported.
-
getExecutionRoleArn
The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy. -
setExecutionRoleArn
The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy. -
getPolicyDetails
The configuration details of the lifecycle policy. -
setPolicyDetails
@Stability(Stable) public void setPolicyDetails(@Nullable CfnLifecyclePolicy.PolicyDetailsProperty value) The configuration details of the lifecycle policy. -
setPolicyDetails
The configuration details of the lifecycle policy. -
getState
The activation state of the lifecycle policy. -
setState
The activation state of the lifecycle policy.
-