Removing the TTL of an object

Asked by André Cruz

According to http://docs.openstack.org/api/openstack-object-storage/1.0/content/Expiring_Objects-e1e3228.html it is possible to add a TTL to an existing object. But nothing is said about removing a TTL from an object.

Is it possible to make a temporary object permanent?

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
gholt
Solved:
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
André Cruz (andrefcruz) said :
#2

Bump.

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
André Cruz (andrefcruz) said :
#4

Bump.

Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
André Cruz (andrefcruz) said :
#6

Bump.

Revision history for this message
Best gholt (gholt) said :
#7

You just POST to the object with no X-Delete-At and no X-Delete-After header:

Here's an object I have that's set to expire:

$ curl -I 'http://127.0.0.1:8080/v1/AUTH_test/container/object' -H 'X-Auth-Token: AUTH_tk06174d1ef50c4ad1821ac5b1642604d0'

...
X-Delete-At: 1343155714

So then I POST to the object to update it's metadata (note: this example clears ALL metadata):

$ curl -X POST 'http://127.0.0.1:8080/v1/AUTH_test/container/object' -H 'X-Auth-Token: AUTH_tk06174d1ef50c4ad1821ac5b1642604d0'

And then check to see it has no X-Delete-At anymore:

$ curl -I 'http://127.0.0.1:8080/v1/AUTH_test/container/object' -H 'X-Auth-Token: AUTH_tk06174d1ef50c4ad1821ac5b1642604d0'

...

If you have other metadata on the object you wish to keep, you'll have to resubmit those headers with the POST.

Revision history for this message
André Cruz (andrefcruz) said :
#8

Thank you!

Revision history for this message
André Cruz (andrefcruz) said :
#9

Thanks gholt, that solved my question.