Last update:2022-03-01 18:22:23
The interface is used to get lifecycle of the bucket.IAM wos:GetBucketLifecycle permission is required.
GET /?lifecycle HTTP/1.1
Host: Bucket.Endpoint
Date: date
Authorization: authorization string
None
Please use Common Request Headers .
None.
HTTP/1.1 200 OK
x-wos-request-id:
Date:
Server: WCS-Web-Server
Content-Length: 358
<?xml version="1.0" encoding="UTF-8"?>
<LifecycleConfiguration xmlns=" https://www.wangsu.com/document "
<Rule>
<ID>id</ID>
<Filter>
<Prefix> </Prefix>
</Filter>
<Status>Enabled</Status>
<Expiration>
<Days>365</Days>
</Expiration>
<Transition>
<Days>30</Days>
<StorageClass>IA</StorageClass>
</Transition>
</Rule>
</LifecycleConfiguration>
Please use Common Response Headers .
Field name | Description |
---|---|
LifecycleConfiguration | Define a list of lifecycle configurations.Type: XMLChild node: RuleParent node: empty |
Rule | Define a specific lifecycle configuration.Type: XMLParent node: LifecycleConfigurationChild node: Filter |
ID | Define a unique ID for each rule.Type: StringParent node: Rule |
Filter | Defines a subset of objects that conform to lifecycle rules.The filter is only able to filt objects by prefix. If filter is not defined ( |
Prefix | Defines the rule for the filter. This life cycle configuration will take effect only for objects that match this prefix in the bucket.Type: StringParent node: Filter |
Status | Lifecycle configuration status. Enable indicating that the configuration doesn’t take effect. Type: String Parent node: Rule |
Expiration | Defines the expiration time for objects which match the filter rule.Type: XMLChild node: Days|DateParent node: Rule |
Days | Define the relative expiration days of the object. For example, the value is 13 indicating that the object will expire after 13 days from the last modification time.Type: Positive integerParent node: Expiration |
GET /?lifecycle HTTP/1.1
Host: bucket.s3-cn-east-1.wcsapi.com
x-wos-date: Thu, 15 Nov 2016 00:17:21 GMT
Authorization: signatureValue
HTTP/1.1 200 OK
x-wos-request-id: 51991C342C575321
Date: Thu, 15 Nov 2016 00:17:23 GMT
Server: WCS-Web-Serve
Content-Length: 358
<?xml version="1.0" encoding="UTF-8"?>
<LifecycleConfiguration xmlns=" https://www.wangsu.com/document ">
<Rule>
<ID>Archive and then delete rule</ID>
<Filter>
<Prefix>projectdocs/</Prefix>
</Filter>
<Status>Enabled</Status>
<Expiration>
<Days>365</Days>
</Expiration>
<Transition>
<Days>30</Days>
<StorageClass>IA</StorageClass>
</Transition>
</Rule>
</LifecycleConfiguration>