StorageClass

class aws_cdk.aws_s3.StorageClass(value)

Bases: object

Storage class to move an object to.

ExampleMetadata:

infused

Example:

bucket = s3.Bucket(self, "MyBucket",
    lifecycle_rules=[s3.LifecycleRule(
        abort_incomplete_multipart_upload_after=Duration.minutes(30),
        enabled=False,
        expiration=Duration.days(30),
        expiration_date=Date(),
        expired_object_delete_marker=False,
        id="id",
        noncurrent_version_expiration=Duration.days(30),

        # the properties below are optional
        noncurrent_versions_to_retain=123,
        noncurrent_version_transitions=[s3.NoncurrentVersionTransition(
            storage_class=s3.StorageClass.GLACIER,
            transition_after=Duration.days(30),

            # the properties below are optional
            noncurrent_versions_to_retain=123
        )
        ],
        object_size_greater_than=500,
        prefix="prefix",
        object_size_less_than=10000,
        transitions=[s3.Transition(
            storage_class=s3.StorageClass.GLACIER,

            # the properties below are optional
            transition_after=Duration.days(30),
            transition_date=Date()
        )
        ]
    )
    ]
)
Parameters:

value (str) –

Methods

to_string()
Return type:

str

Attributes

DEEP_ARCHIVE = <aws_cdk.aws_s3.StorageClass object>
GLACIER = <aws_cdk.aws_s3.StorageClass object>
GLACIER_INSTANT_RETRIEVAL = <aws_cdk.aws_s3.StorageClass object>
INFREQUENT_ACCESS = <aws_cdk.aws_s3.StorageClass object>
INTELLIGENT_TIERING = <aws_cdk.aws_s3.StorageClass object>
ONE_ZONE_INFREQUENT_ACCESS = <aws_cdk.aws_s3.StorageClass object>
value