Class CfnLifecyclePolicyPropsMixin.RetainRuleProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.dlm.CfnLifecyclePolicyPropsMixin.RetainRuleProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLifecyclePolicyPropsMixin.RetainRuleProperty>
- Enclosing interface:
CfnLifecyclePolicyPropsMixin.RetainRuleProperty
@Stability(Stable)
public static final class CfnLifecyclePolicyPropsMixin.RetainRuleProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLifecyclePolicyPropsMixin.RetainRuleProperty>
A builder for
CfnLifecyclePolicyPropsMixin.RetainRuleProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnLifecyclePolicyPropsMixin.RetainRuleProperty.getCount()Sets the value ofCfnLifecyclePolicyPropsMixin.RetainRuleProperty.getInterval()intervalUnit(String intervalUnit) Sets the value ofCfnLifecyclePolicyPropsMixin.RetainRuleProperty.getIntervalUnit()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
count
@Stability(Stable) public CfnLifecyclePolicyPropsMixin.RetainRuleProperty.Builder count(Number count) Sets the value ofCfnLifecyclePolicyPropsMixin.RetainRuleProperty.getCount()- Parameters:
count- The number of snapshots to retain for each volume, up to a maximum of 1000. For example if you want to retain a maximum of three snapshots, specify3. When the fourth snapshot is created, the oldest retained snapshot is deleted, or it is moved to the archive tier if you have specified an ArchiveRule .- Returns:
this
-
interval
@Stability(Stable) public CfnLifecyclePolicyPropsMixin.RetainRuleProperty.Builder interval(Number interval) Sets the value ofCfnLifecyclePolicyPropsMixin.RetainRuleProperty.getInterval()- Parameters:
interval- The amount of time to retain each snapshot. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.- Returns:
this
-
intervalUnit
@Stability(Stable) public CfnLifecyclePolicyPropsMixin.RetainRuleProperty.Builder intervalUnit(String intervalUnit) Sets the value ofCfnLifecyclePolicyPropsMixin.RetainRuleProperty.getIntervalUnit()- Parameters:
intervalUnit- The unit of time for time-based retention. For example, to retain snapshots for 3 months, specifyInterval=3andIntervalUnit=MONTHS. Once the snapshot has been retained for 3 months, it is deleted, or it is moved to the archive tier if you have specified an ArchiveRule .- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnLifecyclePolicyPropsMixin.RetainRuleProperty>- Returns:
- a new instance of
CfnLifecyclePolicyPropsMixin.RetainRuleProperty - Throws:
NullPointerException- if any required attribute was not provided
-