public static interface CfnBucket.DefaultRetentionProperty
- The
DefaultRetention
settings require both a mode and a period.- The
DefaultRetention
period can be eitherDays
orYears
but you must select one. You cannot specifyDays
andYears
at 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 java.lang.Number |
getDays()
The number of days that you want to specify for the default retention period.
|
default java.lang.String |
getMode()
The default Object Lock retention mode you want to apply to new objects placed in the specified bucket.
|
default java.lang.Number |
getYears()
The number of years that you want to specify for the default retention period.
|
default java.lang.Number getDays()
If Object Lock is turned on, you must specify Mode
and specify either Days
or Years
.
default java.lang.String getMode()
If Object Lock is turned on, you must specify Mode
and specify either Days
or Years
.
default java.lang.Number getYears()
If Object Lock is turned on, you must specify Mode
and specify either Days
or Years
.
static CfnBucket.DefaultRetentionProperty.Builder builder()