Class CfnLifecyclePolicyPropsMixin.DeprecateRuleProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.dlm.CfnLifecyclePolicyPropsMixin.DeprecateRuleProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLifecyclePolicyPropsMixin.DeprecateRuleProperty>
- Enclosing interface:
CfnLifecyclePolicyPropsMixin.DeprecateRuleProperty
@Stability(Stable)
public static final class CfnLifecyclePolicyPropsMixin.DeprecateRuleProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLifecyclePolicyPropsMixin.DeprecateRuleProperty>
A builder for
CfnLifecyclePolicyPropsMixin.DeprecateRuleProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnLifecyclePolicyPropsMixin.DeprecateRuleProperty.getCount()Sets the value ofCfnLifecyclePolicyPropsMixin.DeprecateRuleProperty.getInterval()intervalUnit(String intervalUnit) Sets the value ofCfnLifecyclePolicyPropsMixin.DeprecateRuleProperty.getIntervalUnit()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
count
@Stability(Stable) public CfnLifecyclePolicyPropsMixin.DeprecateRuleProperty.Builder count(Number count) Sets the value ofCfnLifecyclePolicyPropsMixin.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 CfnLifecyclePolicyPropsMixin.DeprecateRuleProperty.Builder interval(Number interval) Sets the value ofCfnLifecyclePolicyPropsMixin.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 CfnLifecyclePolicyPropsMixin.DeprecateRuleProperty.Builder intervalUnit(String intervalUnit) Sets the value ofCfnLifecyclePolicyPropsMixin.DeprecateRuleProperty.getIntervalUnit()- Parameters:
intervalUnit- The unit of time in which to measure the Interval .- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnLifecyclePolicyPropsMixin.DeprecateRuleProperty>- Returns:
- a new instance of
CfnLifecyclePolicyPropsMixin.DeprecateRuleProperty - Throws:
NullPointerException- if any required attribute was not provided
-