interface LifecycleConfigurationProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.S3.CfnBucket.LifecycleConfigurationProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awss3#CfnBucket_LifecycleConfigurationProperty |
Java | software.amazon.awscdk.services.s3.CfnBucket.LifecycleConfigurationProperty |
Python | aws_cdk.aws_s3.CfnBucket.LifecycleConfigurationProperty |
TypeScript | aws-cdk-lib » aws_s3 » CfnBucket » LifecycleConfigurationProperty |
Specifies the lifecycle configuration for objects in an Amazon S3 bucket.
For more information, see Object Lifecycle Management in the Amazon S3 User Guide .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_s3 as s3 } from 'aws-cdk-lib';
const lifecycleConfigurationProperty: s3.CfnBucket.LifecycleConfigurationProperty = {
rules: [{
status: 'status',
// the properties below are optional
abortIncompleteMultipartUpload: {
daysAfterInitiation: 123,
},
expirationDate: new Date(),
expirationInDays: 123,
expiredObjectDeleteMarker: false,
id: 'id',
noncurrentVersionExpiration: {
noncurrentDays: 123,
// the properties below are optional
newerNoncurrentVersions: 123,
},
noncurrentVersionExpirationInDays: 123,
noncurrentVersionTransition: {
storageClass: 'storageClass',
transitionInDays: 123,
// the properties below are optional
newerNoncurrentVersions: 123,
},
noncurrentVersionTransitions: [{
storageClass: 'storageClass',
transitionInDays: 123,
// the properties below are optional
newerNoncurrentVersions: 123,
}],
objectSizeGreaterThan: 123,
objectSizeLessThan: 123,
prefix: 'prefix',
tagFilters: [{
key: 'key',
value: 'value',
}],
transition: {
storageClass: 'storageClass',
// the properties below are optional
transitionDate: new Date(),
transitionInDays: 123,
},
transitions: [{
storageClass: 'storageClass',
// the properties below are optional
transitionDate: new Date(),
transitionInDays: 123,
}],
}],
// the properties below are optional
transitionDefaultMinimumObjectSize: 'transitionDefaultMinimumObjectSize',
};
Properties
Name | Type | Description |
---|---|---|
rules | IResolvable | IResolvable | Rule [] | A lifecycle rule for individual objects in an Amazon S3 bucket. |
transition | string |
rules
Type:
IResolvable
|
IResolvable
|
Rule
[]
A lifecycle rule for individual objects in an Amazon S3 bucket.
transitionDefaultMinimumObjectSize?
Type:
string
(optional)