@Stability(value=Stable)
public static interface CfnBucket.ObjectLockRuleProperty
extends software.amazon.jsii.JsiiSerializable
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 Object |
getDefaultRetention()
The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket.
|
@Stability(value=Stable) @Nullable default 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 .
@Stability(value=Stable) static CfnBucket.ObjectLockRuleProperty.Builder builder()
Copyright © 2022. All rights reserved.