@Stability(value=Stable)
public static interface CfnBucket.ObjectLockConfigurationProperty
extends software.amazon.jsii.JsiiSerializable
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 String |
getObjectLockEnabled()
Indicates whether this bucket has an Object Lock configuration enabled.
|
default Object |
getRule()
Specifies the Object Lock rule for the specified object.
|
@Stability(value=Stable) @Nullable default String getObjectLockEnabled()
Enable ObjectLockEnabled when you apply ObjectLockConfiguration to a bucket.
@Stability(value=Stable) @Nullable default 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 .
@Stability(value=Stable) static CfnBucket.ObjectLockConfigurationProperty.Builder builder()
Copyright © 2022. All rights reserved.