Class CfnLifecyclePolicy
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.dlm.CfnLifecyclePolicy
- All Implemented Interfaces:
IInspectable,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.89.0 (build 2f74b3e)",
date="2023-10-26T00:56:06.367Z")
@Stability(Stable)
public class CfnLifecyclePolicy
extends CfnResource
implements IInspectable, ITaggable
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();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface[Event-based policies only] Specifies an action for an event-based policy.static interface[Snapshot policies only] Specifies information about the archive storage tier retention period.static interface[Snapshot policies only] Specifies a snapshot archiving rule for a schedule.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 interface[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[Snapshot and AMI policies only] Specifies a cross-Region copy rule for a snapshot and AMI policies.static interface[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[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 interface[Snapshot policies only] Describes the retention rule for archived snapshots.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.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnLifecyclePolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnLifecyclePolicy(software.amazon.jsii.JsiiObjectRef objRef) CfnLifecyclePolicy(software.constructs.Construct scope, String id) CfnLifecyclePolicy(software.constructs.Construct scope, String id, CfnLifecyclePolicyProps props) -
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()Tag Manager which manages the tags for this resource.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.voidsetTagsRaw(List<CfnTag> value) The tags to apply to the lifecycle policy during creation.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods 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 software.constructs.Construct scope, @NotNull String id, @Nullable CfnLifecyclePolicyProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties.
-
CfnLifecyclePolicy
@Stability(Stable) public CfnLifecyclePolicy(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
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. -
getAttrId
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getDescription
A description of the lifecycle policy. -
setDescription
A description of the lifecycle policy. -
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
The configuration details of the lifecycle policy. -
setPolicyDetails
@Stability(Stable) public void setPolicyDetails(@Nullable CfnLifecyclePolicy.PolicyDetailsProperty value) The configuration details of the lifecycle policy. -
getState
The activation state of the lifecycle policy. -
setState
The activation state of the lifecycle policy. -
getTagsRaw
The tags to apply to the lifecycle policy during creation. -
setTagsRaw
The tags to apply to the lifecycle policy during creation.
-