Amazon S3 Bucket Rule
The Rule property type describes lifecycle rules.
The Rules subproperty of the Amazon S3 Bucket LifecycleConfiguration property contains a list of Rule property types.
For more information, see PUT Bucket lifecycle
in the Amazon Simple Storage Service (Amazon S3) API Reference.
Syntax
JSON
{ "AbortIncompleteMultipartUpload" :AbortIncompleteMultipartUpload, "ExpirationDate" :String, "ExpirationInDays" :Integer, "Id" :String, "NoncurrentVersionExpirationInDays" :Integer, "NoncurrentVersionTransition (deprecated)" :NoncurrentVersionTransition, "NoncurrentVersionTransitions" : [NoncurrentVersionTransition, ...], "Prefix" :String, "Status" :String, "TagFilters" : [ TagFilter, ... ], "Transition (deprecated)" :Transition, "Transitions" : [Transition, ...] }
YAML
AbortIncompleteMultipartUpload:AbortIncompleteMultipartUploadExpirationDate:StringExpirationInDays:IntegerId:StringNoncurrentVersionExpirationInDays:IntegerNoncurrentVersionTransition (deprecated):NoncurrentVersionTransitionNoncurrentVersionTransitions: -NoncurrentVersionTransitionPrefix:StringStatus:StringTagFilters: - TagFilter Transition (deprecated):TransitionTransitions: -Transition
Properties
AbortIncompleteMultipartUpload-
Specifies a lifecycle rule that aborts incomplete multipart uploads to an Amazon S3 bucket.
Required: Conditional. You must specify at least one of the following properties:
AbortIncompleteMultipartUpload,ExpirationDate,ExpirationInDays,NoncurrentVersionExpirationInDays,NoncurrentVersionTransition,NoncurrentVersionTransitions,Transition, orTransitions. ExpirationDate-
Indicates when objects are deleted from Amazon S3 and Glacier. The date value must be in ISO 8601 format. The time is always midnight UTC. 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.
Required: Conditional. You must specify at least one of the following properties:
AbortIncompleteMultipartUpload,ExpirationDate,ExpirationInDays,NoncurrentVersionExpirationInDays,NoncurrentVersionTransition,NoncurrentVersionTransitions,Transition, orTransitions.Type: String
ExpirationInDays-
Indicates the number of days after creation when objects are deleted from Amazon S3 and 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.
Required: Conditional. You must specify at least one of the following properties:
AbortIncompleteMultipartUpload,ExpirationDate,ExpirationInDays,NoncurrentVersionExpirationInDays,NoncurrentVersionTransition,NoncurrentVersionTransitions,Transition, orTransitions.Type: Integer
Id-
A unique identifier for this rule. The value cannot be more than 255 characters.
Required: No
Type: String
NoncurrentVersionExpirationInDays-
For buckets with versioning enabled (or suspended), specifies the time, in days, between when a new version of the object is uploaded to the bucket and when old versions of the object expire. When object versions expire, Amazon S3 permanently deletes them. If you specify a transition and expiration time, the expiration time must be later than the transition time.
Required: Conditional. You must specify at least one of the following properties:
AbortIncompleteMultipartUpload,ExpirationDate,ExpirationInDays,NoncurrentVersionExpirationInDays,NoncurrentVersionTransition,NoncurrentVersionTransitions,Transition, orTransitions.Type: Integer
NoncurrentVersionTransition(deprecated)-
For buckets with versioning enabled (or suspended), specifies when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the
NoncurrentVersionTransitionsproperty.Required: Conditional. You must specify at least one of the following properties:
AbortIncompleteMultipartUpload,ExpirationDate,ExpirationInDays,NoncurrentVersionExpirationInDays,NoncurrentVersionTransition,NoncurrentVersionTransitions,Transition, orTransitions. NoncurrentVersionTransitions-
For buckets with versioning enabled (or suspended), one or more transition rules that specify when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the
NoncurrentVersionTransitionproperty.Required: Conditional. You must specify at least one of the following properties:
AbortIncompleteMultipartUpload,ExpirationDate,ExpirationInDays,NoncurrentVersionExpirationInDays,NoncurrentVersionTransition,NoncurrentVersionTransitions,Transition, orTransitions.Type: List of Amazon S3 Bucket NoncurrentVersionTransition
Prefix-
Object key prefix that identifies one or more objects to which this rule applies.
Required: No
Type: String
Status-
Specify either
EnabledorDisabled. If you specifyEnabled, Amazon S3 executes this rule as scheduled. If you specifyDisabled, Amazon S3 ignores this rule.Required: Yes
Type: String
TagFilters-
Tags to use to identify a subset of objects to which the lifecycle rule applies.
Required: No
Type: List of TagFilter
Update requires: No interruption
Transition(deprecated)-
Specifies when an object transitions to a specified storage class. 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. If you specify this property, don't specify the
Transitionsproperty.Required: Conditional. You must specify at least one of the following properties:
AbortIncompleteMultipartUpload,ExpirationDate,ExpirationInDays,NoncurrentVersionExpirationInDays,NoncurrentVersionTransition,NoncurrentVersionTransitions,Transition, orTransitions. Transitions-
One or more transition rules that specify when an object transitions to a specified storage class. 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. If you specify this property, don't specify the
Transitionproperty.Required: Conditional. You must specify at least one of the following properties:
AbortIncompleteMultipartUpload,ExpirationDate,ExpirationInDays,NoncurrentVersionExpirationInDays,NoncurrentVersionTransition,NoncurrentVersionTransitions,Transition, orTransitions.Type: List of Amazon S3 Bucket Transition
