public static interface CfnBucket.ObjectLockRuleProperty
Enable the this rule when you apply ObjectLockConfiguration
to a bucket.
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.*; ObjectLockRuleProperty objectLockRuleProperty = ObjectLockRuleProperty.builder() .defaultRetention(DefaultRetentionProperty.builder() .days(123) .mode("mode") .years(123) .build()) .build();
Modifier and Type | Interface and Description |
---|---|
static class |
CfnBucket.ObjectLockRuleProperty.Builder
A builder for
CfnBucket.ObjectLockRuleProperty |
static class |
CfnBucket.ObjectLockRuleProperty.Jsii$Proxy
An implementation for
CfnBucket.ObjectLockRuleProperty |
Modifier and Type | Method and Description |
---|---|
static CfnBucket.ObjectLockRuleProperty.Builder |
builder() |
default java.lang.Object |
getDefaultRetention()
The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket.
|
default java.lang.Object getDefaultRetention()
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 .
static CfnBucket.ObjectLockRuleProperty.Builder builder()