interface RuleProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.aws_s3express.CfnDirectoryBucket.RuleProperty |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awss3express#CfnDirectoryBucket_RuleProperty |
![]() | software.amazon.awscdk.services.s3express.CfnDirectoryBucket.RuleProperty |
![]() | aws_cdk.aws_s3express.CfnDirectoryBucket.RuleProperty |
![]() | aws-cdk-lib » aws_s3express » CfnDirectoryBucket » RuleProperty |
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
Name | Type | Description |
---|---|---|
status | string | If Enabled , the rule is currently being applied. |
abort | IResolvable | Abort | Specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will wait before permanently removing all parts of the upload. |
expiration | number | Indicates the number of days after creation when objects are deleted from Amazon S3 and Amazon S3 Glacier. |
id? | string | Unique identifier for the rule. |
object | string | Specifies the minimum object size in bytes for this rule to apply to. |
object | string | Specifies the maximum object size in bytes for this rule to apply to. |
prefix? | string | Object key prefix that identifies one or more objects to which this rule applies. |
status
Type:
string
If Enabled
, the rule is currently being applied.
If Disabled
, the rule is not currently being applied.
abortIncompleteMultipartUpload?
Type:
IResolvable
|
Abort
(optional)
Specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will wait before permanently removing all parts of the upload.
expirationInDays?
Type:
number
(optional)
Indicates the number of days after creation when objects are deleted from Amazon S3 and Amazon S3 Glacier.
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.
id?
Type:
string
(optional)
Unique identifier for the rule.
The value can't be longer than 255 characters.
objectSizeGreaterThan?
Type:
string
(optional)
Specifies the minimum object size in bytes for this rule to apply to.
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 .
objectSizeLessThan?
Type:
string
(optional)
Specifies the maximum object size in bytes for this rule to apply to.
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 .
prefix?
Type:
string
(optional)
Object key prefix that identifies one or more objects to which this rule applies.
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 .