Interface CfnBucket.ObjectLockConfigurationProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnBucket.ObjectLockConfigurationProperty.Jsii$Proxy
- Enclosing class:
CfnBucket
@Stability(Stable)
public static interface CfnBucket.ObjectLockConfigurationProperty
extends software.amazon.jsii.JsiiSerializable
Places an Object Lock configuration on the specified bucket.
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();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forCfnBucket.ObjectLockConfigurationProperty
static final class
An implementation forCfnBucket.ObjectLockConfigurationProperty
-
Method Summary
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getObjectLockEnabled
Indicates whether this bucket has an Object Lock configuration enabled.Enable
ObjectLockEnabled
when you applyObjectLockConfiguration
to a bucket.- See Also:
-
getRule
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 bothMode
and a period of eitherDays
orYears
. You cannot specifyDays
andYears
at the same time. For more information, see ObjectLockRule and DefaultRetention .- See Also:
-
builder
-