Skip to content

LifecycleRule

Source code in docs_src/capo_s3/types/lifecycle_rule.py
class LifecycleRule(TypedDict, closed=True):
    expiration: NotRequired["capo_s3.types.lifecycle_expiration.LifecycleExpiration"]
    """<p>Specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.</p>"""
    id: NotRequired["capo_s3.types.id.ID"]
    """<p>Unique identifier for the rule. The value cannot be longer than 255 characters.</p>"""
    prefix: NotRequired["capo_s3.types.prefix.Prefix"]
    """<p> The general purpose bucket prefix that identifies one or more objects to which the rule applies. We recommend using <code>Filter</code> instead of <code>Prefix</code> for new PUTs. Previous configurations where a prefix is defined will continue to operate as before.</p> <important> <p>Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints"> XML related object key constraints</a>.</p> </important>"""
    filter: NotRequired["capo_s3.types.lifecycle_rule_filter.LifecycleRuleFilter"]
    """<p>The <code>Filter</code> is used to identify objects that a Lifecycle Rule applies to. A <code>Filter</code> must have exactly one of <code>Prefix</code>, <code>Tag</code>, <code>ObjectSizeGreaterThan</code>, <code>ObjectSizeLessThan</code>, or <code>And</code> specified. <code>Filter</code> is required if the <code>LifecycleRule</code> does not contain a <code>Prefix</code> element.</p> <p>For more information about <code>Tag</code> filters, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-filters.html">Adding filters to Lifecycle rules</a> in the <i>Amazon S3 User Guide</i>.</p> <note> <p> <code>Tag</code> filters are not supported for directory buckets.</p> </note>"""
    status: "capo_s3.types.expiration_status.ExpirationStatus"
    """<p>If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not currently being applied.</p>"""
    transitions: NotRequired["capo_s3.types.transition_list.TransitionList"]
    """<p>Specifies when an Amazon S3 object transitions to a specified storage class.</p> <note> <p>This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.</p> </note>"""
    noncurrent_version_transitions: NotRequired[
        "capo_s3.types.noncurrent_version_transition_list.NoncurrentVersionTransitionList"
    ]
    """<p>Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to a specific storage class at a set period in the object's lifetime.</p> <note> <p>This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.</p> </note>"""
    noncurrent_version_expiration: NotRequired[
        "capo_s3.types.noncurrent_version_expiration.NoncurrentVersionExpiration"
    ]
    abort_incomplete_multipart_upload: NotRequired[
        "capo_s3.types.abort_incomplete_multipart_upload.AbortIncompleteMultipartUpload"
    ]

abort_incomplete_multipart_upload instance-attribute

abort_incomplete_multipart_upload: NotRequired[AbortIncompleteMultipartUpload]

expiration instance-attribute

expiration: NotRequired[LifecycleExpiration]

Specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.

filter instance-attribute

filter: NotRequired[LifecycleRuleFilter]

The Filter is used to identify objects that a Lifecycle Rule applies to. A Filter must have exactly one of Prefix, Tag, ObjectSizeGreaterThan, ObjectSizeLessThan, or And specified. Filter is required if the LifecycleRule does not contain a Prefix element.

For more information about Tag filters, see Adding filters to Lifecycle rules in the Amazon S3 User Guide.

Tag filters are not supported for directory buckets.

id instance-attribute

id: NotRequired[ID]

Unique identifier for the rule. The value cannot be longer than 255 characters.

noncurrent_version_expiration instance-attribute

noncurrent_version_expiration: NotRequired[NoncurrentVersionExpiration]

noncurrent_version_transitions instance-attribute

noncurrent_version_transitions: NotRequired[NoncurrentVersionTransitionList]

Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to a specific storage class at a set period in the object's lifetime.

This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.

prefix instance-attribute

prefix: NotRequired[Prefix]

The general purpose bucket prefix that identifies one or more objects to which the rule applies. We recommend using Filter instead of Prefix for new PUTs. Previous configurations where a prefix is defined will continue to operate as before.

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.

status instance-attribute

If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not currently being applied.

transitions instance-attribute

transitions: NotRequired[TransitionList]

Specifies when an Amazon S3 object transitions to a specified storage class.

This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.