RuleProperty Struct
Specifies lifecycle rules for an Amazon S3 bucket.
For more information, see Put Bucket Lifecycle Configuration in the Amazon S3 API Reference . For examples, see Put Bucket Lifecycle Configuration Examples .
You must specify at least one of the following properties: AbortIncompleteMultipartUpload , or ExpirationInDays .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_s3express as s3express } from 'aws-cdk-lib';
const ruleProperty: s3express.CfnDirectoryBucket.RuleProperty = {
status: 'status',
// the properties below are optional
abortIncompleteMultipartUpload: {
daysAfterInitiation: 123,
},
expirationInDays: 123,
id: 'id',
objectSizeGreaterThan: 'objectSizeGreaterThan',
objectSizeLessThan: 'objectSizeLessThan',
prefix: 'prefix',
};
Properties
abortIncompleteMultipartUploadoptionalIResolvable | CfnDirectoryBucket.AbortIncompleteMultipartUploadPropertyabort_incomplete_multipart_uploadoptionaltyping.Union[IResolvable, AbortIncompleteMultipartUploadProperty]abortIncompleteMultipartUploadoptionalIResolvableAbortIncompleteMultipartUploadoptionalIResolvableAbortIncompleteMultipartUploadoptionalinterface{}#expirationInDaysoptionalnumberexpiration_in_daysoptionalint | floatexpirationInDaysoptionalNumberExpirationInDaysoptionaldoubleExpirationInDaysoptional*float64#If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.
The value can't be longer than 255 characters.
objectSizeGreaterThanoptionalstringobject_size_greater_thanoptionalstrobjectSizeGreaterThanoptionalStringObjectSizeGreaterThanoptionalstringObjectSizeGreaterThanoptional*string#notes
Objects must be larger than this value in bytes. For more information about size based rules, see Lifecycle configuration using size-based rules in the Amazon S3 User Guide .
objectSizeLessThanoptionalstringobject_size_less_thanoptionalstrobjectSizeLessThanoptionalStringObjectSizeLessThanoptionalstringObjectSizeLessThanoptional*string#notes
Objects must be smaller than this value in bytes. For more information about sized based rules, see Lifecycle configuration using size-based rules in the Amazon S3 User Guide .
notes
Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints .
If Disabled , the rule is not currently being applied.