Class CfnBucket.DefaultRetentionProperty.Builder
java.lang.Object
software.amazon.awscdk.services.s3.CfnBucket.DefaultRetentionProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnBucket.DefaultRetentionProperty>
- Enclosing interface:
CfnBucket.DefaultRetentionProperty
@Stability(Stable)
public static final class CfnBucket.DefaultRetentionProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnBucket.DefaultRetentionProperty>
A builder for
CfnBucket.DefaultRetentionProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnBucket.DefaultRetentionProperty.getDays()Sets the value ofCfnBucket.DefaultRetentionProperty.getMode()Sets the value ofCfnBucket.DefaultRetentionProperty.getYears()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
days
Sets the value ofCfnBucket.DefaultRetentionProperty.getDays()- Parameters:
days- The number of days that you want to specify for the default retention period. If Object Lock is turned on, you must specifyModeand specify eitherDaysorYears.- Returns:
this
-
mode
Sets the value ofCfnBucket.DefaultRetentionProperty.getMode()- Parameters:
mode- The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. If Object Lock is turned on, you must specifyModeand specify eitherDaysorYears.- Returns:
this
-
years
Sets the value ofCfnBucket.DefaultRetentionProperty.getYears()- Parameters:
years- The number of years that you want to specify for the default retention period. If Object Lock is turned on, you must specifyModeand specify eitherDaysorYears.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnBucket.DefaultRetentionProperty>- Returns:
- a new instance of
CfnBucket.DefaultRetentionProperty - Throws:
NullPointerException- if any required attribute was not provided
-