Interface CfnBucket.ObjectLockConfigurationProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnBucket.ObjectLockConfigurationProperty.Jsii$Proxy
- Enclosing class:
CfnBucket
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 classA builder forCfnBucket.ObjectLockConfigurationPropertystatic final classAn 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
ObjectLockEnabledwhen you applyObjectLockConfigurationto a bucket.- See Also:
-
getRule
Specifies the Object Lock rule for the specified object.Enable this rule when you apply
ObjectLockConfigurationto a bucket. If Object Lock is turned on, bucket settings require bothModeand a period of eitherDaysorYears. You cannot specifyDaysandYearsat the same time. For more information, see ObjectLockRule and DefaultRetention .Returns union: either
IResolvableorCfnBucket.ObjectLockRuleProperty- See Also:
-
builder
-