public static final class CfnBucket.ObjectLockConfigurationProperty.Builder
extends java.lang.Object
CfnBucket.ObjectLockConfigurationProperty
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
CfnBucket.ObjectLockConfigurationProperty |
build()
Builds the configured instance.
|
CfnBucket.ObjectLockConfigurationProperty.Builder |
objectLockEnabled(java.lang.String objectLockEnabled)
Sets the value of
CfnBucket.ObjectLockConfigurationProperty.getObjectLockEnabled() |
CfnBucket.ObjectLockConfigurationProperty.Builder |
rule(CfnBucket.ObjectLockRuleProperty rule)
Sets the value of
CfnBucket.ObjectLockConfigurationProperty.getRule() |
CfnBucket.ObjectLockConfigurationProperty.Builder |
rule(IResolvable rule)
Sets the value of
CfnBucket.ObjectLockConfigurationProperty.getRule() |
public CfnBucket.ObjectLockConfigurationProperty.Builder objectLockEnabled(java.lang.String objectLockEnabled)
CfnBucket.ObjectLockConfigurationProperty.getObjectLockEnabled()
objectLockEnabled
- Indicates whether this bucket has an Object Lock configuration enabled.
Enable ObjectLockEnabled
when you apply ObjectLockConfiguration
to a bucket.this
public CfnBucket.ObjectLockConfigurationProperty.Builder rule(IResolvable rule)
CfnBucket.ObjectLockConfigurationProperty.getRule()
rule
- Specifies the Object Lock rule for the specified object.
Enable this rule when you apply ObjectLockConfiguration
to a 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, see ObjectLockRule and DefaultRetention .this
public CfnBucket.ObjectLockConfigurationProperty.Builder rule(CfnBucket.ObjectLockRuleProperty rule)
CfnBucket.ObjectLockConfigurationProperty.getRule()
rule
- Specifies the Object Lock rule for the specified object.
Enable this rule when you apply ObjectLockConfiguration
to a 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, see ObjectLockRule and DefaultRetention .this
public CfnBucket.ObjectLockConfigurationProperty build()
CfnBucket.ObjectLockConfigurationProperty
java.lang.NullPointerException
- if any required attribute was not provided