• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (OBS)
  4. Operations on Buckets
  5. GET Bucket lifecycle
  6. Examples

Examples

Sample Request

GET /?lifecycle HTTP/1.1
User-Agent: curl/7.29.0 
 Host: bucketname.obs.example.com
 Accept: */*
 Date: Thu, 05 Sep 2013 10:09:36 +0000 
 Authorization: AWS B9A70C60A39C4D551A16:oNFuFZV8JLUqxsaFPI1Gs/HPRKg=

Sample Response

HTTP/1.1 200 OK
Server: OBS
x-amz-request-id: 90E2BA0A420C00000140ED9939AF099E
x-amz-id-2: UHQoAKndcsk628TszydX75G/Q2+I5MwYJ3IJYqzEkNInMkBMn96hunAVsoiMCHZh
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
Content-Type: application/xml
Date: Thu, 05 Sep 2015 10:09:36 GMT
Content-Length: 425

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<LifecycleConfiguration xmlns="http://obs.example.com/doc/2015-06-30/">
<Rule>
<ID>delete-test/-1-day</ID>
<Prefix>test/</Prefix>
<Status>Enabled</Status>
<Expiration>
<Date>2015-07-12T00:00:00.000Z</Date>
</Expiration>
<NoncurrentVersionExpiration>
<NoncurrentDays>365</NoncurrentDays>
</NoncurrentVersionExpiration>
<Transition> 
<Date>2015-07-10T00:00:00.000Z</Date> 
<StorageClass>STANDARD_IA</StorageClass> 
</Transition> 
<Transition> 
<Date>2015-07-11T00:00:00.000Z</Date> 
<StorageClass>GLACIER</StorageClass> 
</Transition> 
<NoncurrentVersionTransition> 
<NoncurrentDays>30</NoncurrentDays> 
<StorageClass>STANDARD_IA</StorageClass> 
</NoncurrentVersionTransition> 
<NoncurrentVersionTransition> 
<NoncurrentDays>60</NoncurrentDays> 
<StorageClass>GLACIER</StorageClass> 
</NoncurrentVersionTransition>
</Rule>
</LifecycleConfiguration>