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 specifying the default Object Lock retention settings for new objects placed in the specified bucket.
- 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();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnBucket.DefaultRetentionPropertystatic final classAn implementation forCfnBucket.DefaultRetentionProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default NumbergetDays()The number of days that you want to specify for the default retention period.default StringgetMode()The default Object Lock retention mode you want to apply to new objects placed in the specified bucket.default NumbergetYears()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
Modeand specify eitherDaysorYears. -
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
Modeand specify eitherDaysorYears. -
getYears
The number of years that you want to specify for the default retention period.If Object Lock is turned on, you must specify
Modeand specify eitherDaysorYears. -
builder
-