Class CfnLifecyclePolicy.ScheduleProperty.Builder
java.lang.Object
software.amazon.awscdk.services.dlm.CfnLifecyclePolicy.ScheduleProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLifecyclePolicy.ScheduleProperty>
- Enclosing interface:
CfnLifecyclePolicy.ScheduleProperty
@Stability(Stable)
public static final class CfnLifecyclePolicy.ScheduleProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLifecyclePolicy.ScheduleProperty>
A builder for
CfnLifecyclePolicy.ScheduleProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionarchiveRule
(IResolvable archiveRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getArchiveRule()
archiveRule
(CfnLifecyclePolicy.ArchiveRuleProperty archiveRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getArchiveRule()
build()
Builds the configured instance.Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getCopyTags()
copyTags
(IResolvable copyTags) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getCopyTags()
createRule
(IResolvable createRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getCreateRule()
createRule
(CfnLifecyclePolicy.CreateRuleProperty createRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getCreateRule()
crossRegionCopyRules
(List<? extends Object> crossRegionCopyRules) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getCrossRegionCopyRules()
crossRegionCopyRules
(IResolvable crossRegionCopyRules) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getCrossRegionCopyRules()
deprecateRule
(IResolvable deprecateRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getDeprecateRule()
deprecateRule
(CfnLifecyclePolicy.DeprecateRuleProperty deprecateRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getDeprecateRule()
fastRestoreRule
(IResolvable fastRestoreRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getFastRestoreRule()
fastRestoreRule
(CfnLifecyclePolicy.FastRestoreRuleProperty fastRestoreRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getFastRestoreRule()
Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getName()
retainRule
(IResolvable retainRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getRetainRule()
retainRule
(CfnLifecyclePolicy.RetainRuleProperty retainRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getRetainRule()
shareRules
(List<? extends Object> shareRules) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getShareRules()
shareRules
(IResolvable shareRules) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getShareRules()
Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getTagsToAdd()
tagsToAdd
(IResolvable tagsToAdd) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getTagsToAdd()
variableTags
(List<? extends Object> variableTags) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getVariableTags()
variableTags
(IResolvable variableTags) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getVariableTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
archiveRule
@Stability(Stable) public CfnLifecyclePolicy.ScheduleProperty.Builder archiveRule(IResolvable archiveRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getArchiveRule()
- Parameters:
archiveRule
-CfnLifecyclePolicy.ScheduleProperty.ArchiveRule
.- Returns:
this
-
archiveRule
@Stability(Stable) public CfnLifecyclePolicy.ScheduleProperty.Builder archiveRule(CfnLifecyclePolicy.ArchiveRuleProperty archiveRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getArchiveRule()
- Parameters:
archiveRule
-CfnLifecyclePolicy.ScheduleProperty.ArchiveRule
.- Returns:
this
-
copyTags
Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getCopyTags()
- Parameters:
copyTags
- Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.- Returns:
this
-
copyTags
@Stability(Stable) public CfnLifecyclePolicy.ScheduleProperty.Builder copyTags(IResolvable copyTags) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getCopyTags()
- Parameters:
copyTags
- Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.- Returns:
this
-
createRule
@Stability(Stable) public CfnLifecyclePolicy.ScheduleProperty.Builder createRule(IResolvable createRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getCreateRule()
- Parameters:
createRule
- The creation rule.- Returns:
this
-
createRule
@Stability(Stable) public CfnLifecyclePolicy.ScheduleProperty.Builder createRule(CfnLifecyclePolicy.CreateRuleProperty createRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getCreateRule()
- Parameters:
createRule
- The creation rule.- Returns:
this
-
crossRegionCopyRules
@Stability(Stable) public CfnLifecyclePolicy.ScheduleProperty.Builder crossRegionCopyRules(IResolvable crossRegionCopyRules) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getCrossRegionCopyRules()
- Parameters:
crossRegionCopyRules
- 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.
- Returns:
this
-
crossRegionCopyRules
@Stability(Stable) public CfnLifecyclePolicy.ScheduleProperty.Builder crossRegionCopyRules(List<? extends Object> crossRegionCopyRules) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getCrossRegionCopyRules()
- Parameters:
crossRegionCopyRules
- 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.
- Returns:
this
-
deprecateRule
@Stability(Stable) public CfnLifecyclePolicy.ScheduleProperty.Builder deprecateRule(IResolvable deprecateRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getDeprecateRule()
- Parameters:
deprecateRule
-CfnLifecyclePolicy.ScheduleProperty.DeprecateRule
.- Returns:
this
-
deprecateRule
@Stability(Stable) public CfnLifecyclePolicy.ScheduleProperty.Builder deprecateRule(CfnLifecyclePolicy.DeprecateRuleProperty deprecateRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getDeprecateRule()
- Parameters:
deprecateRule
-CfnLifecyclePolicy.ScheduleProperty.DeprecateRule
.- Returns:
this
-
fastRestoreRule
@Stability(Stable) public CfnLifecyclePolicy.ScheduleProperty.Builder fastRestoreRule(IResolvable fastRestoreRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getFastRestoreRule()
- Parameters:
fastRestoreRule
- [Snapshot policies only] The rule for enabling fast snapshot restore.- Returns:
this
-
fastRestoreRule
@Stability(Stable) public CfnLifecyclePolicy.ScheduleProperty.Builder fastRestoreRule(CfnLifecyclePolicy.FastRestoreRuleProperty fastRestoreRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getFastRestoreRule()
- Parameters:
fastRestoreRule
- [Snapshot policies only] The rule for enabling fast snapshot restore.- Returns:
this
-
name
Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getName()
- Parameters:
name
- The name of the schedule.- Returns:
this
-
retainRule
@Stability(Stable) public CfnLifecyclePolicy.ScheduleProperty.Builder retainRule(IResolvable retainRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getRetainRule()
- Parameters:
retainRule
- The retention rule for snapshots or AMIs created by the policy.- Returns:
this
-
retainRule
@Stability(Stable) public CfnLifecyclePolicy.ScheduleProperty.Builder retainRule(CfnLifecyclePolicy.RetainRuleProperty retainRule) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getRetainRule()
- Parameters:
retainRule
- The retention rule for snapshots or AMIs created by the policy.- Returns:
this
-
tagsToAdd
@Stability(Stable) public CfnLifecyclePolicy.ScheduleProperty.Builder tagsToAdd(IResolvable tagsToAdd) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getTagsToAdd()
- Parameters:
tagsToAdd
- The tags to apply to policy-created resources. These user-defined tags are in addition to the AWS -added lifecycle tags.- Returns:
this
-
tagsToAdd
@Stability(Stable) public CfnLifecyclePolicy.ScheduleProperty.Builder tagsToAdd(List<? extends Object> tagsToAdd) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getTagsToAdd()
- Parameters:
tagsToAdd
- The tags to apply to policy-created resources. These user-defined tags are in addition to the AWS -added lifecycle tags.- Returns:
this
-
variableTags
@Stability(Stable) public CfnLifecyclePolicy.ScheduleProperty.Builder variableTags(IResolvable variableTags) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getVariableTags()
- Parameters:
variableTags
- [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:
this
-
variableTags
@Stability(Stable) public CfnLifecyclePolicy.ScheduleProperty.Builder variableTags(List<? extends Object> variableTags) Sets the value ofCfnLifecyclePolicy.ScheduleProperty.getVariableTags()
- Parameters:
variableTags
- [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:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLifecyclePolicy.ScheduleProperty>
- Returns:
- a new instance of
CfnLifecyclePolicy.ScheduleProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-