To list a bucket's lifecycle configuration you make a GET request that is
scoped to a bucket and you use the
lifecycle query string parameter. The
lifecycle configuration is returned in an XML document in the response body.
Query string parameters
||You can use this to display the lifecycle configuration of an existing bucket.||No|
Request body elements
This request does not include an XML document in the request body.
The following syntax applies to GET Bucket requests that use the
lifecycle query string parameter.
GET /?lifecycle HTTP/1.1 Host: <bucket>.storage.googleapis.com Date: <date> Content-Length: <request body length> Authorization: <authentication string>
The request can return a variety of response headers depending on the request headers you use.
Response body elements
The following response body elements are applicable only if you use the
lifecycle query string parameter to display the bucket's lifecycle
||Defines the lifecycle management policies for the bucket, which contains
0 or more (up to 100) rules. An empty element (for example
||Defines a lifecycle management rule, which is made of an action and the conditions that must be met for the action to occur.|
||Defines the action to occur when the specified conditions are met.|
||Action element to delete objects in the bucket.|
||Action element to change the storage class of objects in the bucket.|
||Conditions that must be met for the action to occurs. Every rule contains at least one condition element.|
||Condition element that matches objects over the specified age (in days).|
||Condition element that matches objects created before midnight of the specified date in UTC. The value is an ISO date string without a time zone, e.g. "2019-01-15".|
||Condition element typically only used in conjunction with
object versioning. When set
||Condition element that matches objects that have the given storage class.|
||Condition element relevant only for versioned objects. If the value is N, the condition is satisfied when there are at least N versions (including the live version) newer than this version of the object.|