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 interface
Example:static interface
Example:static final class
A 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
Example:static interface
Specifies 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 interface
Example: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
Example: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.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The 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
.protected
CfnLifecyclePolicy
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnLifecyclePolicy
(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.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setDescription
(String value) A description of the lifecycle policy.void
setExecutionRoleArn
(String value) The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.void
setPolicyDetails
(IResolvable value) The configuration details of the lifecycle policy.void
The configuration details of the lifecycle policy.void
The 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, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
inspect
in 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:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the lifecycle policy. -
getCfnProperties
- Overrides:
getCfnProperties
in 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.
-