Get Bucket Lifecycle
Returns information about the lifecycle rules configured on the bucket. The user needs to be the bucket owner or to have been granted s3:GetLifecycleConfiguration permission on the bucket.
GET /?lifecycle HTTP/1.1
Host: {bucket}.{region}.cdn77-storage.com
Response
Name | Description |
---|---|
Rulenone | A container holding elements with information about a singe lifecycle rule. |
IDstring | A unique string identifying the rule. It may contain up to 255 characters including spaces. |
Statusstring | A string that specifies whether or not the lifecycle rule will be acted upon. The only valid values are Enabled or Disabled. |
Prefixstring | A string specifying the objects to which the rule will be applied. When provided, only objects whose keys begin with the prefix will be acted upon. If empty or not present, all object in the bucket will be affected. |
Expirationnone | When present, matching objects are expired and automatically deleted. This container will specify either a Date or Days element. |
Daysinteger | An integer specifying the number of days after an object’s creation until the rule takes effect. |
Datenone | A date in ISO 8601 format specifying the day that the rule takes effect. The action will be run at midnight UTC. |
AbortIncompleteMultipartUploadnone | When present, incomplete multipart uploads of matching objects will be removed. This container will specify a DaysAfterInitiation element. |
DaysAfterInitiationinteger | An integer specifying the number of days after an incomplete multipart upload was initiated until the rule takes effect. |
Example Response
<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Rule>
<ID>Expire old project versions</ID>
<Prefix>project/</Prefix>
<Status>Enabled</Status>
<Expiration>
<Days>30</Days>
</Expiration>
</Rule>
<Rule>
<ID>Remove uncompleted uploads</ID>
<Status>Enabled</Status>
<Prefix/>
<AbortIncompleteMultipartUpload>
<DaysAfterInitiation>1</DaysAfterInitiation>
</AbortIncompleteMultipartUpload>
</Rule>
</LifecycleConfiguration>
Updated on 10th September, 2024