Class CfnLifecyclePolicy.DeprecateRuleProperty.Builder
java.lang.Object
software.amazon.awscdk.services.dlm.CfnLifecyclePolicy.DeprecateRuleProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLifecyclePolicy.DeprecateRuleProperty>
- Enclosing interface:
CfnLifecyclePolicy.DeprecateRuleProperty
@Stability(Stable)
public static final class CfnLifecyclePolicy.DeprecateRuleProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLifecyclePolicy.DeprecateRuleProperty>
A builder for
CfnLifecyclePolicy.DeprecateRuleProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnLifecyclePolicy.DeprecateRuleProperty.getCount()
Sets the value ofCfnLifecyclePolicy.DeprecateRuleProperty.getInterval()
intervalUnit
(String intervalUnit) Sets the value ofCfnLifecyclePolicy.DeprecateRuleProperty.getIntervalUnit()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
count
Sets the value ofCfnLifecyclePolicy.DeprecateRuleProperty.getCount()
- Parameters:
count
- If the schedule has a count-based retention rule, this parameter specifies the number of oldest AMIs to deprecate. The count must be less than or equal to the schedule's retention count, and it can't be greater than 1000.- Returns:
this
-
interval
@Stability(Stable) public CfnLifecyclePolicy.DeprecateRuleProperty.Builder interval(Number interval) Sets the value ofCfnLifecyclePolicy.DeprecateRuleProperty.getInterval()
- Parameters:
interval
- If the schedule has an age-based retention rule, this parameter specifies the period after which to deprecate AMIs created by the schedule. The period must be less than or equal to the schedule's retention period, and it can't be greater than 10 years. This is equivalent to 120 months, 520 weeks, or 3650 days.- Returns:
this
-
intervalUnit
@Stability(Stable) public CfnLifecyclePolicy.DeprecateRuleProperty.Builder intervalUnit(String intervalUnit) Sets the value ofCfnLifecyclePolicy.DeprecateRuleProperty.getIntervalUnit()
- Parameters:
intervalUnit
- The unit of time in which to measure the Interval .- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLifecyclePolicy.DeprecateRuleProperty>
- Returns:
- a new instance of
CfnLifecyclePolicy.DeprecateRuleProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-