Class CfnBucket.ObjectLockRuleProperty.Builder
java.lang.Object
software.amazon.awscdk.services.s3.CfnBucket.ObjectLockRuleProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnBucket.ObjectLockRuleProperty>
- Enclosing interface:
CfnBucket.ObjectLockRuleProperty
@Stability(Stable)
public static final class CfnBucket.ObjectLockRuleProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnBucket.ObjectLockRuleProperty>
A builder for
CfnBucket.ObjectLockRuleProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.defaultRetention
(IResolvable defaultRetention) Sets the value ofCfnBucket.ObjectLockRuleProperty.getDefaultRetention()
defaultRetention
(CfnBucket.DefaultRetentionProperty defaultRetention) Sets the value ofCfnBucket.ObjectLockRuleProperty.getDefaultRetention()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
defaultRetention
@Stability(Stable) public CfnBucket.ObjectLockRuleProperty.Builder defaultRetention(IResolvable defaultRetention) Sets the value ofCfnBucket.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 bothMode
and a period of eitherDays
orYears
. You cannot specifyDays
andYears
at the same time. For more information about allowable values for mode and period, see DefaultRetention .- Returns:
this
-
defaultRetention
@Stability(Stable) public CfnBucket.ObjectLockRuleProperty.Builder defaultRetention(CfnBucket.DefaultRetentionProperty defaultRetention) Sets the value ofCfnBucket.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 bothMode
and a period of eitherDays
orYears
. You cannot specifyDays
andYears
at the same time. For more information about allowable values for mode and period, see DefaultRetention .- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnBucket.ObjectLockRuleProperty>
- Returns:
- a new instance of
CfnBucket.ObjectLockRuleProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-