public static interface CfnBucket.ObjectLockConfigurationProperty
The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket. For more information, see Locking Objects .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.s3.*; ObjectLockConfigurationProperty objectLockConfigurationProperty = ObjectLockConfigurationProperty.builder() .objectLockEnabled("objectLockEnabled") .rule(ObjectLockRuleProperty.builder() .defaultRetention(DefaultRetentionProperty.builder() .days(123) .mode("mode") .years(123) .build()) .build()) .build();
Modifier and Type | Interface and Description |
---|---|
static class |
CfnBucket.ObjectLockConfigurationProperty.Builder
A builder for
CfnBucket.ObjectLockConfigurationProperty |
static class |
CfnBucket.ObjectLockConfigurationProperty.Jsii$Proxy
An implementation for
CfnBucket.ObjectLockConfigurationProperty |
Modifier and Type | Method and Description |
---|---|
static CfnBucket.ObjectLockConfigurationProperty.Builder |
builder() |
default java.lang.String |
getObjectLockEnabled()
Indicates whether this bucket has an Object Lock configuration enabled.
|
default java.lang.Object |
getRule()
Specifies the Object Lock rule for the specified object.
|
default java.lang.String getObjectLockEnabled()
Enable ObjectLockEnabled
when you apply ObjectLockConfiguration
to a bucket.
default java.lang.Object getRule()
Enable the 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 .
static CfnBucket.ObjectLockConfigurationProperty.Builder builder()