From 6e587292f37379501e3b1b5f68fce6f46f3ea408 Mon Sep 17 00:00:00 2001 From: Erik Wilson Date: Thu, 22 Jan 2015 16:09:38 -0600 Subject: [PATCH] Adds scheduling objects for deletion info to End User Guide With the moving of the Object Storage API content from a long-form dev guide to a specification, some topics needed To be added to the End User Guide. Change-Id: I3a009139cc5d3b890fd12d4850e61b41401ee461 Partial-bug: 1392382 --- doc/user-guide/ch_sdk.xml | 1 + .../large-object-upload-next-segment-req.txt | 2 +- .../large-object-upload-segment-req.txt | 2 +- .../section_object-api-expire-objects.xml | 69 +++++++++++++++++++ 4 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 doc/user-guide/section_object-api-expire-objects.xml diff --git a/doc/user-guide/ch_sdk.xml b/doc/user-guide/ch_sdk.xml index f2821ab7c3..97202acb45 100644 --- a/doc/user-guide/ch_sdk.xml +++ b/doc/user-guide/ch_sdk.xml @@ -30,6 +30,7 @@ + diff --git a/doc/user-guide/samples/large-object-upload-next-segment-req.txt b/doc/user-guide/samples/large-object-upload-next-segment-req.txt index b0ec4575a6..da66393960 100644 --- a/doc/user-guide/samples/large-object-upload-next-segment-req.txt +++ b/doc/user-guide/samples/large-object-upload-next-segment-req.txt @@ -1,5 +1,5 @@ PUT /{api_version}/{account}/{container}/{object} HTTP/1.1 -Host: storage.clouddrive.com +Host: storage.example.com X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb ETag: 8a964ee2a5e88be344f36c22562a6486 Content-Length: 1 diff --git a/doc/user-guide/samples/large-object-upload-segment-req.txt b/doc/user-guide/samples/large-object-upload-segment-req.txt index b0ec4575a6..da66393960 100644 --- a/doc/user-guide/samples/large-object-upload-segment-req.txt +++ b/doc/user-guide/samples/large-object-upload-segment-req.txt @@ -1,5 +1,5 @@ PUT /{api_version}/{account}/{container}/{object} HTTP/1.1 -Host: storage.clouddrive.com +Host: storage.example.com X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb ETag: 8a964ee2a5e88be344f36c22562a6486 Content-Length: 1 diff --git a/doc/user-guide/section_object-api-expire-objects.xml b/doc/user-guide/section_object-api-expire-objects.xml new file mode 100644 index 0000000000..4bdce4c097 --- /dev/null +++ b/doc/user-guide/section_object-api-expire-objects.xml @@ -0,0 +1,69 @@ + + %openstack; ]> +
+ Schedule objects for deletion + Scheduling an object for deletion is helpful for managing + objects that you do not want to permanently store, such as log + files, recurring full backups of a dataset, or documents or + images that become outdated at a specified future time. + To schedule an object for deletion, include one of these + headers with the &PUT; or &POST; request on the object: + + + X-Delete-At + + A UNIX epoch timestamp, in integer form. For + example, 1348691905 represents + Wed, 26 Sept 2012 20:38:25 + GMT. Specifies the time when you + want the object to expire, no longer be served, + and be deleted completely from the object + store. + + + + X-Delete-After + + An integer value. Specifies the number of + seconds from the time of the request to when you + want to delete the object. + This header is converted to an + X-Delete-At header that is + set to the sum of the + X-Delete-After value plus + the current time, in seconds. + + + + + Use http://www.epochconverter.com/ to convert + dates to and from epoch timestamps and for batch + conversions. + + Use the &POST; method to assign expiration headers to + existing objects that you want to expire. + + Delete object at specified time request + In this example, the X-Delete-At + header is assigned a UNIX epoch timestamp in integer form + for Mon, 11 Jun 2012 15:38:25 GMT. + $ curl -i publicURL/marktwain/goodbye -X PUT -H "X-Auth-Token: token" \ +-H "X-Delete-At: 1390581073" -H "Content-Length: 14" -H \ +"Content-Type: application/octet-stream" + + + Delete object after specified interval request + In this example, the X-Delete-After header + is set to 864000 seconds. After this time, the object + expires. + PUT /<api version>/<account>/<container>/<object> HTTP/1.1 +Host: storage.example.com +X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb +Content-Type: image/jpeg +X-Delete-After: 864000 + +