Interface CfnBucket.DefaultRetentionProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnBucket.DefaultRetentionProperty.Jsii$Proxy
- Enclosing class:
CfnBucket
@Stability(Stable)
public static interface CfnBucket.DefaultRetentionProperty
extends software.amazon.jsii.JsiiSerializable
The container element for optionally specifying the default Object Lock retention settings for new objects placed in the specified bucket.
- 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();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forCfnBucket.DefaultRetentionProperty
static final class
An implementation forCfnBucket.DefaultRetentionProperty
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
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.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDays
The number of days that you want to specify for the default retention period.If Object Lock is turned on, you must specify
Mode
and specify eitherDays
orYears
.- See Also:
-
getMode
The default Object Lock retention mode you want to apply to new objects placed in the specified bucket.If Object Lock is turned on, you must specify
Mode
and specify eitherDays
orYears
.- See Also:
-
getYears
The number of years that you want to specify for the default retention period.If Object Lock is turned on, you must specify
Mode
and specify eitherDays
orYears
.- See Also:
-
builder
-