-
Content-MD5
Vault Extension to the S3 API
The Vault system supports the following Request Headers as extensions to the "PUT Bucket lifecycle" operation:
Parameter |
Description |
Required |
||||
---|---|---|---|---|---|---|
x-gmt-tieringinfo |
This extension header enables you to configure a bucket for schedule-based automatic transitioning (also known as "auto-tiering") of objects from Vault storage to Amazon S3 storage or Amazon Glacier storage. You can also auto-tier objects from one Vault region to another, or to a third party Vault system. The x-gmt-tieringinfo header is formatted as follows: x-gmt-tieringinfo: url-encode(S3/S3GLACIER|EndPoint:url-encode(s3-endpoint), [Action:stream/nostream/redirect])
# Example 1 (before URL encoding) - Tiering to Amazon S3 x-gmt-tieringinfo: S3|EndPoint:http://s3.amazonaws.com. # Example 2 (before URL encoding) - Tiering to a different Vault region x-gmt-tieringinfo: S3|EndPoint:http://s3-west.my-organization.com. # Example 3 (before URL encoding) - Tiering to a third party # Vault service x-gmt-tieringinfo: S3|EndPoint:http://s3.other-organization.com. # Example 4 (before URL encoding) - Tiering to Glacier x-gmt-tieringinfo: S3GLACIER|EndPoint:http://s3.amazonaws.com. # URL encoding of Example 4 x-gmt-tieringinfo: S3GLACIER%7CEndPoint%3Ahttp%253A%252F%252Fs3.amazonaws.com. |
No |
||||
x-gmt-compare |
If you include this extension header in your "PUT Bucket lifecycle" request and set the header value to "LAT", then in lifecycle rules that you configure with the "Days" comparator the rule will be implemented as number of days since the object’s Last Access Time. If you do not use this extension header, or if you include the header but assign it no value or any value other than "LAT", then "Days" based lifecycle rules will be implemented as number of days since the object’s creation (the default Amazon S3 behavior). You can use this header to create:
|
No |
If you are using the x-gmt-tieringinfo request header, then for the request element StorageClass you must specify "GLACIER". This is true regardless of whether you want to transition the objects to Amazon Glacier, Amazon S3, a different Vault service region, or a third party Vault service. |
A sample PUT Bucket Lifecycle request/response pair is below. This rule transitions objects in the user’s Vault S3 storage bucket to Amazon S3 90 days after Last Access Time. Note that the StorageClass element specifies GLACIER even though the tiering target is actually Amazon S3.
# Request PUT /?lifecycle HTTP/1.1. Host: bucket1.nicmanlab.com:80. Accept-Encoding: identity. Content-Length: 216. User-Agent: Boto/2.24.0 Python/2.6.6 Linux/2.6.32-358.23.2.el6.x86_64. x-gmt-tieringinfo: S3%7CEndPoint%3Ahttp%253A%252F%252Fs3.amazonaws.com. x-gmt-compare: LAT Date: Sun, 16 Nov 2014 17:54:16 GMT. Content-MD5: Nip5xNP0P41djj608bRHNQ==. Content-Type: text/xml. Authorization: AWS a-key:NfPRnsSbTcxBZ2vN2MX4ZsArJAQ=. . <?xml version="1.0" encoding="UTF-8"?> <LifecycleConfiguration> <Rule> <ID>Transition to Amazon S3</ID> <Prefix></Prefix> <Status>Enabled</Status> <Transition> <StorageClass>GLACIER</StorageClass> <Days>90</Days> </Transition> </Rule> </LifecycleConfiguration> # Response HTTP/1.1 200 OK. Date: Sun, 16 Nov 2014 17:54:16 GMT. x-amz-request-id: AF5C7C2098C511E3. x-gmt-usage: 0,1,623,89,0. Content-Length: 0. Server: Nicmanlab.
A second sample PUT Bucket Lifecycle request/response pair is below. This rule transitions all objects in the user’s Vault S3 storage bucket to Amazon Glacier one year after object creation, and then expires (deletes) the objects five years after object creation. Note that the EndPoint is an Amazon S3 endpoint even though the ultimate tiering target is Glacier.
# Request PUT /?lifecycle HTTP/1.1. Host: bucket1.nicmanlab.com:80. Accept-Encoding: identity. Content-Length: 235. User-Agent: Boto/2.24.0 Python/2.6.6 Linux/2.6.32-358.23.2.el6.x86_64. x-gmt-tieringinfo: S3GLACIER%7CEndPoint%3Ahttp%253A%252F%252Fs3.amazonaws.com. Date: Tue, 18 Feb 2014 17:54:16 GMT. Content-MD5: Nip5xNP0P41djj608bRQHN==. Content-Type: text/xml. Authorization: AWS a-key:NfPRnsSbTcxBZ2vN2MX4ZsArJAQ=. . <?xml version="1.0" encoding="UTF-8"?> <LifecycleConfiguration> <Rule> <ID>Transition to Glacier and later delete</ID> <Prefix></Prefix> <Status>Enabled</Status> <Transition> <StorageClass>GLACIER</StorageClass> <Days>365</Days> </Transition> <Expiration> <Days>1825</Days> </Expiration> </Rule> </LifecycleConfiguration> # Response HTTP/1.1 200 OK. Date: Tue, 18 Feb 2014 17:58:16 GMT. x-amz-request-id: AF5C7C2098C522F4. x-gmt-usage: 0,1,623,89,0. Content-Length: 0. Server: nicmanlab.