interface DefaultRetentionProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.S3.CfnBucket.DefaultRetentionProperty |
Java | software.amazon.awscdk.services.s3.CfnBucket.DefaultRetentionProperty |
Python | aws_cdk.aws_s3.CfnBucket.DefaultRetentionProperty |
TypeScript | @aws-cdk/aws-s3 » CfnBucket » DefaultRetentionProperty |
The container element for 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 * as s3 from '@aws-cdk/aws-s3';
const defaultRetentionProperty: s3.CfnBucket.DefaultRetentionProperty = {
days: 123,
mode: 'mode',
years: 123,
};
Properties
Name | Type | Description |
---|---|---|
days? | number | The number of days that you want to specify for the default retention period. |
mode? | string | The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. |
years? | number | The number of years that you want to specify for the default retention period. |
days?
Type:
number
(optional)
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 either Days
or Years
.
mode?
Type:
string
(optional)
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 either Days
or Years
.
years?
Type:
number
(optional)
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 either Days
or Years
.