@Stability(value=Stable)
public static interface CfnBucket.DefaultRetentionProperty
extends software.amazon.jsii.JsiiSerializable
- The
DefaultRetentionsettings require both a mode and a period.- The
DefaultRetentionperiod can be eitherDaysorYearsbut you must select one. You cannot specifyDaysandYearsat the same time.
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.*;
DefaultRetentionProperty defaultRetentionProperty = DefaultRetentionProperty.builder()
.days(123)
.mode("mode")
.years(123)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnBucket.DefaultRetentionProperty.Builder
A builder for
CfnBucket.DefaultRetentionProperty |
static class |
CfnBucket.DefaultRetentionProperty.Jsii$Proxy
An implementation for
CfnBucket.DefaultRetentionProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnBucket.DefaultRetentionProperty.Builder |
builder() |
default Number |
getDays()
The number of days that you want to specify for the default retention period.
|
default String |
getMode()
The default Object Lock retention mode you want to apply to new objects placed in the specified bucket.
|
default Number |
getYears()
The number of years that you want to specify for the default retention period.
|
@Stability(value=Stable) @Nullable default Number getDays()
If Object Lock is turned on, you must specify Mode and specify either Days or Years .
@Stability(value=Stable) @Nullable default String getMode()
If Object Lock is turned on, you must specify Mode and specify either Days or Years .
@Stability(value=Stable) @Nullable default Number getYears()
If Object Lock is turned on, you must specify Mode and specify either Days or Years .
@Stability(value=Stable) static CfnBucket.DefaultRetentionProperty.Builder builder()
Copyright © 2022. All rights reserved.