interface LifecycleConfigurationProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.S3.CfnBucket.LifecycleConfigurationProperty |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awss3#CfnBucket_LifecycleConfigurationProperty |
![]() | software.amazon.awscdk.services.s3.CfnBucket.LifecycleConfigurationProperty |
![]() | aws_cdk.aws_s3.CfnBucket.LifecycleConfigurationProperty |
![]() | 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 | Indicates which default minimum object size behavior is applied to the lifecycle configuration. |
rules
Type:
IResolvable
|
IResolvable
|
Rule
[]
A lifecycle rule for individual objects in an Amazon S3 bucket.
transitionDefaultMinimumObjectSize?
Type:
string
(optional)
Indicates which default minimum object size behavior is applied to the lifecycle configuration.
This parameter applies to general purpose buckets only. It isn't supported for directory bucket lifecycle configurations.
all_storage_classes_128K
- Objects smaller than 128 KB will not transition to any storage class by default.varies_by_storage_class
- Objects smaller than 128 KB will transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By default, all other storage classes will prevent transitions smaller than 128 KB.
To customize the minimum object size for any transition you can add a filter that specifies a custom ObjectSizeGreaterThan
or ObjectSizeLessThan
in the body of your transition rule. Custom filters always take precedence over the default transition behavior.