Interface CfnLifecyclePolicy.ScheduleProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnLifecyclePolicy.ScheduleProperty.Jsii$Proxy
Enclosing class:
CfnLifecyclePolicy

@Stability(Stable) public static interface CfnLifecyclePolicy.ScheduleProperty extends software.amazon.jsii.JsiiSerializable
[Snapshot and AMI policies only] Specifies a schedule for a snapshot or AMI 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.*;
 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")
                 .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();
 
  • Method Details

    • getArchiveRule

      @Stability(Stable) @Nullable default Object getArchiveRule()
      CfnLifecyclePolicy.ScheduleProperty.ArchiveRule.
    • getCopyTags

      @Stability(Stable) @Nullable default Object getCopyTags()
      Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
    • getCreateRule

      @Stability(Stable) @Nullable default Object getCreateRule()
      The creation rule.
    • getCrossRegionCopyRules

      @Stability(Stable) @Nullable default Object 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. If the policy creates snapshots in a Region, then snapshots can be copied to up to three Regions or Outposts.

    • getDeprecateRule

      @Stability(Stable) @Nullable default Object getDeprecateRule()
      CfnLifecyclePolicy.ScheduleProperty.DeprecateRule.
    • getFastRestoreRule

      @Stability(Stable) @Nullable default Object getFastRestoreRule()
      [Snapshot policies only] The rule for enabling fast snapshot restore.
    • getName

      @Stability(Stable) @Nullable default String getName()
      The name of the schedule.
    • getRetainRule

      @Stability(Stable) @Nullable default Object getRetainRule()
      The retention rule for snapshots or AMIs created by the policy.
    • getShareRules

      @Stability(Stable) @Nullable default Object getShareRules()
      [Snapshot policies only] The rule for sharing snapshots with other AWS accounts .
    • getTagsToAdd

      @Stability(Stable) @Nullable default Object getTagsToAdd()
      The tags to apply to policy-created resources.

      These user-defined tags are in addition to the AWS -added lifecycle tags.

    • getVariableTags

      @Stability(Stable) @Nullable default Object 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.

    • builder

      @Stability(Stable) static CfnLifecyclePolicy.ScheduleProperty.Builder builder()
      Returns:
      a CfnLifecyclePolicy.ScheduleProperty.Builder of CfnLifecyclePolicy.ScheduleProperty