@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:37.930Z") @Stability(value=Stable) public class CfnLifecyclePolicy extends CfnResource implements IInspectable
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()
.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();
| Modifier and Type | Class and Description |
|---|---|
static interface |
CfnLifecyclePolicy.ActionProperty
Specifies an action for an event-based policy.
|
static class |
CfnLifecyclePolicy.Builder
A fluent builder for
CfnLifecyclePolicy. |
static interface |
CfnLifecyclePolicy.CreateRuleProperty
Specifies when to create snapshots of EBS volumes.
|
static interface |
CfnLifecyclePolicy.CrossRegionCopyActionProperty
Specifies a rule for copying shared snapshots across Regions.
|
static interface |
CfnLifecyclePolicy.CrossRegionCopyDeprecateRuleProperty
Specifies an AMI deprecation rule for cross-Region AMI copies created by a cross-Region copy rule.
|
static interface |
CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty
Specifies the retention rule for cross-Region snapshot copies.
|
static interface |
CfnLifecyclePolicy.CrossRegionCopyRuleProperty
Specifies a rule for cross-Region snapshot copies.
|
static interface |
CfnLifecyclePolicy.DeprecateRuleProperty
Specifies an AMI deprecation rule for a schedule.
|
static interface |
CfnLifecyclePolicy.EncryptionConfigurationProperty
Specifies the encryption settings for shared snapshots that are copied across Regions.
|
static interface |
CfnLifecyclePolicy.EventParametersProperty
Specifies an event that triggers an event-based policy.
|
static interface |
CfnLifecyclePolicy.EventSourceProperty
Specifies an event that triggers an event-based policy.
|
static interface |
CfnLifecyclePolicy.FastRestoreRuleProperty
Specifies a rule for enabling fast snapshot restore.
|
static interface |
CfnLifecyclePolicy.ParametersProperty
Specifies optional parameters to add to a policy.
|
static interface |
CfnLifecyclePolicy.PolicyDetailsProperty
Specifies the configuration of a lifecycle policy.
|
static interface |
CfnLifecyclePolicy.RetainRuleProperty
Specifies the retention rule for a lifecycle policy.
|
static interface |
CfnLifecyclePolicy.ScheduleProperty
Specifies a backup schedule for a snapshot or AMI lifecycle policy.
|
static interface |
CfnLifecyclePolicy.ShareRuleProperty
Specifies a rule for sharing snapshots across AWS accounts .
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnLifecyclePolicy(software.constructs.Construct scope,
String id)
Create a new `AWS::DLM::LifecyclePolicy`.
|
|
CfnLifecyclePolicy(software.constructs.Construct scope,
String id,
CfnLifecyclePolicyProps props)
Create a new `AWS::DLM::LifecyclePolicy`.
|
protected |
CfnLifecyclePolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnLifecyclePolicy(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrArn()
The Amazon Resource Name (ARN) of the lifecycle policy.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDescription()
A description of the lifecycle policy.
|
String |
getExecutionRoleArn()
The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.
|
Object |
getPolicyDetails()
The configuration details of the lifecycle policy.
|
String |
getState()
The activation state of the lifecycle policy.
|
TagManager |
getTags()
The tags to apply to the lifecycle policy during creation.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
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(CfnLifecyclePolicy.PolicyDetailsProperty value)
The configuration details of the lifecycle policy.
|
void |
setPolicyDetails(IResolvable value)
The configuration details of the lifecycle policy.
|
void |
setState(String value)
The activation state of the lifecycle policy.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnLifecyclePolicy(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnLifecyclePolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnLifecyclePolicy(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
CfnLifecyclePolicyProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties.@Stability(value=Stable)
public CfnLifecyclePolicy(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @Nullable public String getDescription()
The characters ^[0-9A-Za-z _-]+$ are supported.
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
The characters ^[0-9A-Za-z _-]+$ are supported.
@Stability(value=Stable) @Nullable public String getExecutionRoleArn()
@Stability(value=Stable)
public void setExecutionRoleArn(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getPolicyDetails()
@Stability(value=Stable)
public void setPolicyDetails(@Nullable
CfnLifecyclePolicy.PolicyDetailsProperty value)
@Stability(value=Stable)
public void setPolicyDetails(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public String getState()
@Stability(value=Stable)
public void setState(@Nullable
String value)
Copyright © 2022. All rights reserved.