Interface CfnBucket.ObjectLockRuleProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnBucket.ObjectLockRuleProperty.Jsii$Proxy
- Enclosing class:
CfnBucket
@Stability(Stable)
public static interface CfnBucket.ObjectLockRuleProperty
extends software.amazon.jsii.JsiiSerializable
Specifies the Object Lock rule for the specified object.
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();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forCfnBucket.ObjectLockRuleProperty
static final class
An implementation forCfnBucket.ObjectLockRuleProperty
-
Method Summary
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDefaultRetention
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 eitherDays
orYears
. You cannot specifyDays
andYears
at the same time. For more information about allowable values for mode and period, see DefaultRetention .- See Also:
-
builder
-