Interface CfnLifecyclePolicy.ScheduleProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnLifecyclePolicy.ScheduleProperty.Jsii$Proxy
- Enclosing class:
CfnLifecyclePolicy
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.*;
ScheduleProperty scheduleProperty = 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()
.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();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnLifecyclePolicy.SchedulePropertystatic final classAn implementation forCfnLifecyclePolicy.ScheduleProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default Object[Custom snapshot policies that target volumes only] The snapshot archiving rule for the schedule.default ObjectCopy all user-defined tags on a source volume to snapshots of the volume created by this policy.default ObjectThe creation rule.default ObjectSpecifies a rule for copying snapshots or AMIs across Regions.default Object[Custom AMI policies only] The AMI deprecation rule for the schedule.default Object[Custom snapshot policies only] The rule for enabling fast snapshot restore.default StringgetName()The name of the schedule.default ObjectThe retention rule for snapshots or AMIs created by the policy.default Object[Custom snapshot policies only] The rule for sharing snapshots with other AWS accounts .default ObjectThe tags to apply to policy-created resources.default Object[AMI policies and snapshot policies that target instances only] A collection of key/value pairs with values determined dynamically when the policy is executed.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getArchiveRule
[Custom snapshot policies that target volumes only] The snapshot archiving rule for the schedule.When you specify an archiving rule, snapshots are automatically moved from the standard tier to the archive tier once the schedule's retention threshold is met. Snapshots are then retained in the archive tier for the archive retention period that you specify.
For more information about using snapshot archiving, see Considerations for snapshot lifecycle policies .
Returns union: either
IResolvableorCfnLifecyclePolicy.ArchiveRuleProperty- See Also:
-
getCopyTags
Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.Returns union: either
BooleanorIResolvable- See Also:
-
getCreateRule
The creation rule.Returns union: either
IResolvableorCfnLifecyclePolicy.CreateRuleProperty- See Also:
-
getCrossRegionCopyRules
Specifies a rule for copying snapshots or AMIs across Regions.You can't specify cross-Region copy rules for policies that create snapshots on an Outpost or in a Local Zone. If the policy creates snapshots in a Region, then snapshots can be copied to up to three Regions or Outposts.
Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnLifecyclePolicy.CrossRegionCopyRuleProperty>- See Also:
-
getDeprecateRule
[Custom AMI policies only] The AMI deprecation rule for the schedule.Returns union: either
IResolvableorCfnLifecyclePolicy.DeprecateRuleProperty- See Also:
-
getFastRestoreRule
[Custom snapshot policies only] The rule for enabling fast snapshot restore.Returns union: either
IResolvableorCfnLifecyclePolicy.FastRestoreRuleProperty- See Also:
-
getName
The name of the schedule.- See Also:
-
getRetainRule
The retention rule for snapshots or AMIs created by the policy.Returns union: either
IResolvableorCfnLifecyclePolicy.RetainRuleProperty- See Also:
-
getTagsToAdd
The tags to apply to policy-created resources.These user-defined tags are in addition to the AWS -added lifecycle tags.
Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnTag>- See Also:
-
getVariableTags
[AMI policies and snapshot policies that target instances only] A collection of key/value pairs with values determined dynamically when the policy is executed.Keys may be any valid Amazon EC2 tag key. Values must be in one of the two following formats:
$(instance-id)or$(timestamp). Variable tags are only valid for EBS Snapshot Management – Instance policies.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnTag>- See Also:
-
builder
-