Class CfnBucketPropsMixin.ObjectLockRuleProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.s3.CfnBucketPropsMixin.ObjectLockRuleProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnBucketPropsMixin.ObjectLockRuleProperty>
- Enclosing interface:
CfnBucketPropsMixin.ObjectLockRuleProperty
@Stability(Stable)
public static final class CfnBucketPropsMixin.ObjectLockRuleProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnBucketPropsMixin.ObjectLockRuleProperty>
A builder for
CfnBucketPropsMixin.ObjectLockRuleProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.defaultRetention(CfnBucketPropsMixin.DefaultRetentionProperty defaultRetention) Sets the value ofCfnBucketPropsMixin.ObjectLockRuleProperty.getDefaultRetention()defaultRetention(IResolvable defaultRetention) Sets the value ofCfnBucketPropsMixin.ObjectLockRuleProperty.getDefaultRetention()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
defaultRetention
@Stability(Stable) public CfnBucketPropsMixin.ObjectLockRuleProperty.Builder defaultRetention(IResolvable defaultRetention) Sets the value ofCfnBucketPropsMixin.ObjectLockRuleProperty.getDefaultRetention()- Parameters:
defaultRetention- The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket. If Object Lock is turned on, bucket settings require bothModeand a period of eitherDaysorYears. You cannot specifyDaysandYearsat the same time. For more information about allowable values for mode and period, see DefaultRetention .- Returns:
this
-
defaultRetention
@Stability(Stable) public CfnBucketPropsMixin.ObjectLockRuleProperty.Builder defaultRetention(CfnBucketPropsMixin.DefaultRetentionProperty defaultRetention) Sets the value ofCfnBucketPropsMixin.ObjectLockRuleProperty.getDefaultRetention()- Parameters:
defaultRetention- The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket. If Object Lock is turned on, bucket settings require bothModeand a period of eitherDaysorYears. You cannot specifyDaysandYearsat the same time. For more information about allowable values for mode and period, see DefaultRetention .- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnBucketPropsMixin.ObjectLockRuleProperty>- Returns:
- a new instance of
CfnBucketPropsMixin.ObjectLockRuleProperty - Throws:
NullPointerException- if any required attribute was not provided
-