public static final class CfnBucket.ObjectLockRuleProperty.Builder
extends java.lang.Object
CfnBucket.ObjectLockRuleProperty
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
CfnBucket.ObjectLockRuleProperty |
build()
Builds the configured instance.
|
CfnBucket.ObjectLockRuleProperty.Builder |
defaultRetention(CfnBucket.DefaultRetentionProperty defaultRetention)
Sets the value of
CfnBucket.ObjectLockRuleProperty.getDefaultRetention() |
CfnBucket.ObjectLockRuleProperty.Builder |
defaultRetention(IResolvable defaultRetention)
Sets the value of
CfnBucket.ObjectLockRuleProperty.getDefaultRetention() |
public CfnBucket.ObjectLockRuleProperty.Builder defaultRetention(IResolvable defaultRetention)
CfnBucket.ObjectLockRuleProperty.getDefaultRetention()
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 both Mode
and a period of either Days
or Years
. You cannot specify Days
and Years
at the same time. For more information about allowable values for mode and period, see DefaultRetention .this
public CfnBucket.ObjectLockRuleProperty.Builder defaultRetention(CfnBucket.DefaultRetentionProperty defaultRetention)
CfnBucket.ObjectLockRuleProperty.getDefaultRetention()
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 both Mode
and a period of either Days
or Years
. You cannot specify Days
and Years
at the same time. For more information about allowable values for mode and period, see DefaultRetention .this
public CfnBucket.ObjectLockRuleProperty build()
CfnBucket.ObjectLockRuleProperty
java.lang.NullPointerException
- if any required attribute was not provided