LifecycleConfigurationProperty Struct
Container for lifecycle rules. You can add as many as 1000 rules.
For more information see, Creating and managing a lifecycle configuration for directory buckets in the Amazon S3 User Guide .
| Source | |
|---|---|
| Type last changed |
Example
ts
// 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 lifecycleConfigurationProperty: s3express.CfnDirectoryBucket.LifecycleConfigurationProperty = {
rules: [{
status: 'status',
// the properties below are optional
abortIncompleteMultipartUpload: {
daysAfterInitiation: 123,
},
expirationInDays: 123,
id: 'id',
objectSizeGreaterThan: 'objectSizeGreaterThan',
objectSizeLessThan: 'objectSizeLessThan',
prefix: 'prefix',
}],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_s3express as s3express
lifecycle_configuration_property = s3express.CfnDirectoryBucket.LifecycleConfigurationProperty(
rules=[s3express.CfnDirectoryBucket.RuleProperty(
status="status",
# the properties below are optional
abort_incomplete_multipart_upload=s3express.CfnDirectoryBucket.AbortIncompleteMultipartUploadProperty(
days_after_initiation=123
),
expiration_in_days=123,
id="id",
object_size_greater_than="objectSizeGreaterThan",
object_size_less_than="objectSizeLessThan",
prefix="prefix"
)]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.s3express.*;
LifecycleConfigurationProperty lifecycleConfigurationProperty = LifecycleConfigurationProperty.builder()
.rules(List.of(RuleProperty.builder()
.status("status")
// the properties below are optional
.abortIncompleteMultipartUpload(AbortIncompleteMultipartUploadProperty.builder()
.daysAfterInitiation(123)
.build())
.expirationInDays(123)
.id("id")
.objectSizeGreaterThan("objectSizeGreaterThan")
.objectSizeLessThan("objectSizeLessThan")
.prefix("prefix")
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3Express;
var lifecycleConfigurationProperty = new LifecycleConfigurationProperty {
Rules = new [] { new RuleProperty {
Status = "status",
// the properties below are optional
AbortIncompleteMultipartUpload = new AbortIncompleteMultipartUploadProperty {
DaysAfterInitiation = 123
},
ExpirationInDays = 123,
Id = "id",
ObjectSizeGreaterThan = "objectSizeGreaterThan",
ObjectSizeLessThan = "objectSizeLessThan",
Prefix = "prefix"
} }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
lifecycleConfigurationProperty := &LifecycleConfigurationProperty{
Rules: []interface{}{
&RuleProperty{
Status: jsii.String("status"),
// the properties below are optional
AbortIncompleteMultipartUpload: &AbortIncompleteMultipartUploadProperty{
DaysAfterInitiation: jsii.Number(123),
},
ExpirationInDays: jsii.Number(123),
Id: jsii.String("id"),
ObjectSizeGreaterThan: jsii.String("objectSizeGreaterThan"),
ObjectSizeLessThan: jsii.String("objectSizeLessThan"),
Prefix: jsii.String("prefix"),
},
},
}
Properties
rulesIResolvable | IResolvable | CfnDirectoryBucket.RuleProperty[]rulestyping.Union[IResolvable, typing.List[typing.Union[IResolvable, RuleProperty]]]rulesIResolvableRulesIResolvableRulesinterface{} required #A lifecycle rule for individual objects in an Amazon S3 Express bucket.