forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: weihongmin1 <weihongmin1@huawei.com> Co-committed-by: weihongmin1 <weihongmin1@huawei.com>
514 lines
47 KiB
HTML
514 lines
47 KiB
HTML
<a name="obs_04_0034"></a><a name="obs_04_0034"></a>
|
|
|
|
<h1 class="topictitle1">Configuring Bucket Lifecycle Rules</h1>
|
|
<div id="body33721912"><div class="section" id="obs_04_0034__section5584184924715"><h4 class="sectiontitle">Functions</h4><p class="msonormal" id="obs_04_0034__p44290180">This operation configures lifecycle rules that can delete or migrate objects from a bucket at a specified time. Typical application scenarios:</p>
|
|
<ul id="obs_04_0034__ul63067307"><li id="obs_04_0034__li35061754">Delete periodically uploaded files. Some files uploaded periodically need only to be retained for only one week or one month.</li><li id="obs_04_0034__li47120336">Delete files that are frequently accessed within a certain period of time but are seldom accessed afterward. You can archive these files and then schedule the time for deletion.</li></ul>
|
|
<p class="msonormal" id="obs_04_0034__p30734851">You can perform this operation to create or update the lifecycle configuration of a bucket.</p>
|
|
<div class="note" id="obs_04_0034__note8824913257"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_04_0034__ul2453192813258"><li id="obs_04_0034__li545313284253">Expired objects deleted based on a lifecycle rule cannot be recovered.</li></ul>
|
|
</div></div>
|
|
<p class="msonormal" id="obs_04_0034__p8178206">To perform this operation, you must have the <strong id="obs_04_0034__b34476226">PutLifecycleConfiguration</strong> permission. By default, only the bucket owner can perform this operation. The bucket owner can grant the permission to other users by configuring the bucket policy or user policy.</p>
|
|
<p class="msonormal" id="obs_04_0034__p6494998">The lifecycle configuration enables OBS to delete objects and transition object storage classes at a scheduled time. To prevent a user from doing so, the following permissions granted to the user must be revoked:</p>
|
|
<ul id="obs_04_0034__ul58454987"><li id="obs_04_0034__li21429841">DeleteObject</li><li id="obs_04_0034__li58650848">DeleteObjectVersion</li><li id="obs_04_0034__li58095589">PutLifecycleConfiguration</li></ul>
|
|
<p class="msonormal" id="obs_04_0034__p56332838">If you want to forbid a user to set the bucket lifecycle configuration, revoke the <strong id="obs_04_0034__b7848125310471">PutLifecycleConfiguration</strong> permission from the user.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0034__section37233496"><h4 class="sectiontitle">Request Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0034__screen8122269"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
|
|
<span class="normal"> 2</span>
|
|
<span class="normal"> 3</span>
|
|
<span class="normal"> 4</span>
|
|
<span class="normal"> 5</span>
|
|
<span class="normal"> 6</span>
|
|
<span class="normal"> 7</span>
|
|
<span class="normal"> 8</span>
|
|
<span class="normal"> 9</span>
|
|
<span class="normal">10</span>
|
|
<span class="normal">11</span>
|
|
<span class="normal">12</span>
|
|
<span class="normal">13</span>
|
|
<span class="normal">14</span>
|
|
<span class="normal">15</span>
|
|
<span class="normal">16</span>
|
|
<span class="normal">17</span>
|
|
<span class="normal">18</span>
|
|
<span class="normal">19</span>
|
|
<span class="normal">20</span>
|
|
<span class="normal">21</span>
|
|
<span class="normal">22</span>
|
|
<span class="normal">23</span>
|
|
<span class="normal">24</span>
|
|
<span class="normal">25</span>
|
|
<span class="normal">26</span>
|
|
<span class="normal">27</span>
|
|
<span class="normal">28</span>
|
|
<span class="normal">29</span>
|
|
<span class="normal">30</span>
|
|
<span class="normal">31</span>
|
|
<span class="normal">32</span>
|
|
<span class="normal">33</span>
|
|
<span class="normal">34</span>
|
|
<span class="normal">35</span>
|
|
<span class="normal">36</span>
|
|
<span class="normal">37</span>
|
|
<span class="normal">38</span>
|
|
<span class="normal">39</span>
|
|
<span class="normal">40</span>
|
|
<span class="normal">41</span>
|
|
<span class="normal">42</span>
|
|
<span class="normal">43</span>
|
|
<span class="normal">44</span>
|
|
<span class="normal">45</span>
|
|
<span class="normal">46</span></pre></div></td><td class="code"><div><pre><span></span>PUT<span class="w"> </span>/?lifecycle<span class="w"> </span>HTTP/1.1<span class="w"> </span>
|
|
Host:<span class="w"> </span>bucketname.obs.region.example.com
|
|
Content-Length:<span class="w"> </span>length
|
|
Date:<span class="w"> </span>date
|
|
Authorization:<span class="w"> </span>authorization
|
|
Content-MD5:<span class="w"> </span>MD5
|
|
<span class="cp"><?xml version="1.0" encoding="UTF-8"?></span><span class="w"> </span>
|
|
<span class="nt"><LifecycleConfiguration></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Rule></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><ID></span>id<span class="nt"></ID></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Filter></span>
|
|
<span class="w"> </span><span class="nt"><And></span>
|
|
<span class="w"> </span><span class="nt"><Prefix></span>prefix<span class="nt"></Prefix></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Tag><Key></span>key1<span class="nt"></Key><Value></span>value1<span class="nt"></Value></Tag></span>
|
|
<span class="w"> </span><span class="nt"><Tag><Key></span>key2<span class="nt"></Key><Value></span>value2<span class="nt"></Value></Tag></span>
|
|
<span class="w"> </span><span class="nt"></And></span>
|
|
<span class="w"> </span><span class="nt"></Filter></span>
|
|
<span class="w"> </span><span class="nt"><Prefix></span>prefix<span class="nt"></Prefix></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Status></span>status<span class="nt"></Status></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Expiration></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Days></span>days<span class="nt"></Days></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></Expiration></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><NoncurrentVersionExpiration></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><NoncurrentDays></span>days<span class="nt"></NoncurrentDays></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></NoncurrentVersionExpiration></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Transition></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Days></span>30<span class="nt"></Days></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><StorageClass></span>WARM<span class="nt"></StorageClass></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></Transition></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Transition></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Days></span>60<span class="nt"></Days></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><StorageClass></span>COLD<span class="nt"></StorageClass></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></Transition></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><NoncurrentVersionTransition></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><NoncurrentDays></span>30<span class="nt"></NoncurrentDays></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><StorageClass></span>WARM<span class="nt"></StorageClass></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></NoncurrentVersionTransition></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><NoncurrentVersionTransition></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><NoncurrentDays></span>60<span class="nt"></NoncurrentDays></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><StorageClass></span>COLD<span class="nt"></StorageClass></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></NoncurrentVersionTransition></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><AbortIncompleteMultipartUpload></span>
|
|
<span class="w"> </span><span class="nt"><DaysAfterInitiation></span>10<span class="nt"></DaysAfterInitiation></span>
|
|
<span class="w"> </span><span class="nt"></AbortIncompleteMultipartUpload></span>
|
|
<span class="w"> </span><span class="nt"></Rule></span><span class="w"> </span>
|
|
<span class="nt"></LifecycleConfiguration></span>
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0034__section66666010"><h4 class="sectiontitle">Request Parameters</h4><p class="msonormal" id="obs_04_0034__p15223485">This request contains no parameters.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0034__section63123181"><h4 class="sectiontitle">Request Headers</h4><p class="msonormal" id="obs_04_0034__p3387192"><a href="#obs_04_0034__table436706591789">Table 1</a> lists the request header.</p>
|
|
|
|
<div class="tablenoborder"><a name="obs_04_0034__table436706591789"></a><a name="table436706591789"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0034__table436706591789" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request headers</caption><thead align="left"><tr id="obs_04_0034__row8434645"><th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.4.3.2.4.1.1"><p id="obs_04_0034__p12117621">Header</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="53.54%" id="mcps1.3.4.3.2.4.1.2"><p id="obs_04_0034__p42003254">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.240000000000002%" id="mcps1.3.4.3.2.4.1.3"><p id="obs_04_0034__p46820415">Mandatory (Yes/No)</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0034__row4729222202812"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.4.3.2.4.1.1 "><p id="obs_04_0034__p9393112511286">Content-MD5</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.54%" headers="mcps1.3.4.3.2.4.1.2 "><p id="obs_04_0034__p98098395286">Base64-encoded 128-bit MD5 digest of the message according to RFC 1864. </p>
|
|
<p id="obs_04_0034__p18809103962812">Type: string</p>
|
|
<p id="obs_04_0034__p128101339192819">Example: <strong id="obs_04_0034__b175495437445">n58IG6hfM7vqI4K0vnWpog==</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.240000000000002%" headers="mcps1.3.4.3.2.4.1.3 "><p id="obs_04_0034__p1393182532820">Yes</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0034__section31237723"><h4 class="sectiontitle">Request Elements</h4><p class="msonormal" id="obs_04_0034__p40760362">In this request body, you need to specify the lifecycle configuration in XML format. <a href="#obs_04_0034__table49391898171726">Table 2</a> describes the specific XML configuration elements. </p>
|
|
<ul id="obs_04_0034__ul6251638157"><li class="msonormal" id="obs_04_0034__li18251173817514">If the versioning of a bucket is enabled or suspended, you can set <strong id="obs_04_0034__b93725946316203">NoncurrentVersionTransition</strong> or <strong id="obs_04_0034__b26771811202419">NoncurrentVersionExpiration</strong> to control the lifecycle of historical object versions. The lifecycle of a historical version depends on the time when it becomes a historical one (time when the version is replaced by a new version) and the value of <strong id="obs_04_0034__b32934054202615">NoncurrentDays</strong>. If <strong id="obs_04_0034__b21857385203350">NoncurrentDays</strong> is set to <strong id="obs_04_0034__b62498741203350">1</strong> in an object deletion scenario, an object version will be deleted one day after it becomes historical. If the version V1 of object A is created on the first date of a month and new version V2 is uploaded on the fifth date of the month, V1 becomes a historical version. At 00:00 on the seventh date of the month, V1 will expire. If an object version does not meet the deletion conditions, but <strong id="obs_04_0034__b18238545306">NoncurrentDays</strong> is set to <strong id="obs_04_0034__b1123914173017">1</strong> and <strong id="obs_04_0034__b6239749305">StorageClass</strong> is set to <strong id="obs_04_0034__b1523910433017">WARM</strong>, the version transitions to the <span id="obs_04_0034__text12476111615314">Warm</span> storage class one day after it has become a historical version. For example, the V1 version of object A is created on the first day of a month, and its new version V2 is uploaded on the fifth day of the month. Then V1 becomes a historical version. One day later, that is, at 0 o'clock of the seventh day, V1 transitions to the <span id="obs_04_0034__text2579193515313">Warm</span> storage class. The deletion or transition of the object after the expiration time may be delayed. The delay is within 48 hours.</li><li class="msonormal" id="obs_04_0034__li96774421756">Objects are processed according to the following procedures, if their latest versions meet the expiration rule and versioning is enabled or suspended for the bucket.<ul id="obs_04_0034__ul67026557"><li id="obs_04_0034__li66368102">Versioning enabled:<p id="obs_04_0034__p60442011"><a name="obs_04_0034__li66368102"></a><a name="li66368102"></a>If the latest object version is not a delete marker, a new delete marker will be inserted for the object.</p>
|
|
<p id="obs_04_0034__p5971938173212">If the latest object version is a delete marker and is the only version of the object, this latest version will be deleted.</p>
|
|
<p id="obs_04_0034__p63964689">If the object of the latest version has the DeleteMarker and the object has other versions, all versions of the object remain unchanged.</p>
|
|
</li><li id="obs_04_0034__li38811293">Versioning suspended:<p id="obs_04_0034__p12126619102710"><a name="obs_04_0034__li38811293"></a><a name="li38811293"></a>If the latest version of the object does not have the DeleteMarker and is not the null version, the object generates a new DeleteMarker for the null version.</p>
|
|
<p id="obs_04_0034__p81261119152710">If the latest version of the object does not have the DeleteMarker but is the null version, this null version is overwritten by a new DeleteMarker generated for the null version.</p>
|
|
<p id="obs_04_0034__p41266197278">If the latest object version is a delete marker and is the only version of the object, this latest version will be deleted.</p>
|
|
<p id="obs_04_0034__p312681912275">If the object of the latest version has the DeleteMarker and the object has other versions, all versions of the object remain unchanged.</p>
|
|
</li></ul>
|
|
</li><li class="msonormal" id="obs_04_0034__li49157541956">The following lists the processing when the versioning is enabled or suspended for a bucket and objects of the latest versions meet the transition rules:<ul id="obs_04_0034__ul1312555284313"><li class="msonormal" id="obs_04_0034__li1241419577520">If the latest version of the object has the DeleteMarker, the storage class of this version will not be transitioned.</li><li class="msonormal" id="obs_04_0034__li1240125919514">If the latest version of the object does not have the DeleteMarker and meets the transition rule, the storage class of this version will be transitioned.</li></ul>
|
|
</li></ul>
|
|
|
|
<div class="tablenoborder"><a name="obs_04_0034__table49391898171726"></a><a name="table49391898171726"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0034__table49391898171726" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response elements for lifecycle configuration</caption><thead align="left"><tr id="obs_04_0034__row22939932"><th align="left" class="cellrowborder" valign="top" width="27.27%" id="mcps1.3.5.4.2.4.1.1"><p id="obs_04_0034__p46195190">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="52.53%" id="mcps1.3.5.4.2.4.1.2"><p id="obs_04_0034__p50822929">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20.200000000000003%" id="mcps1.3.5.4.2.4.1.3"><p id="obs_04_0034__p23016597">Mandatory (Yes/No)</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0034__row52405032"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p16949237">Date</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p54741087">Specifies that OBS executes lifecycle rules for objects before the specified date. The date must be compliant with the ISO8601 format, and the time must be compliant with the UTC format of 00:00:00. For example, <strong id="obs_04_0034__b112888253374">2018-01-01T00:00:00.000Z</strong> indicates that objects whose last modification time is earlier than <strong id="obs_04_0034__b178232214380">2018-01-01T00:00:00.000Z</strong> are deleted or transitioned to another storage class. Objects whose last modification time is equal to or later than the specified time are not deleted or transitioned to another storage class.</p>
|
|
<p id="obs_04_0034__p4558679">Type: string</p>
|
|
<p id="obs_04_0034__p41028117">Parent: Expiration, Transition</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p34943146">Yes if the <strong id="obs_04_0034__b47419568203147">Days</strong> element is absent.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row46052859"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p39294138">Days</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p28708642">Specifies the number of days (since the latest update to the latest object version) after which the lifecycle rule takes effect.</p>
|
|
<p id="obs_04_0034__p57051188">Type: integer</p>
|
|
<p id="obs_04_0034__p43698650">Parent: Expiration, Transition</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p49929738">Yes if the <strong id="obs_04_0034__b13908192203147">Date</strong> element is absent.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row46714463"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p25775159">StorageClass</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p7413148">The storage class to which the object is transitioned.</p>
|
|
<p id="obs_04_0034__p311371114214">Type: string</p>
|
|
<p id="obs_04_0034__p66718334">Value options: <strong id="obs_04_0034__b32941757878">WARM</strong>, <strong id="obs_04_0034__b1229919570717">COLD</strong></p>
|
|
<p id="obs_04_0034__p63594101">Parent: Transition, NoncurrentVersionTransition</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p50848555">Yes if the <strong id="obs_04_0034__b84235270695824">Transition</strong> or <strong id="obs_04_0034__b84235270695830">NoncurrentVersionTransition</strong> element is present.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row54983812"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p24503759">Transition</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p38647467">Transition time and the object storage class after transition (valid only for the latest object version).</p>
|
|
<p id="obs_04_0034__p12282887">Type: XML</p>
|
|
<p id="obs_04_0034__p43437119">Child: Date or Days, StorageClass</p>
|
|
<p id="obs_04_0034__p55389758">Parent: Rule</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p57385434">Yes if the <strong id="obs_04_0034__b84235270610359">NoncurrentVersionTransition</strong>, <strong id="obs_04_0034__b8423527061043">Expiration</strong>, <strong id="obs_04_0034__b78833945211">AbortIncompleteMultipartUpload</strong>, and <strong id="obs_04_0034__b84235270610412">NoncurrentVersionExpiration</strong> elements are absent.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row46706866"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p25159776">Expiration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p24675942">Container for the object expiration rule (only applicable to the latest versions of objects).</p>
|
|
<p id="obs_04_0034__p20756890">Type: XML</p>
|
|
<p id="obs_04_0034__p52594285">Child: Date or Days</p>
|
|
<p id="obs_04_0034__p3586520">Parent: Rule</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p22072707">Yes if <strong id="obs_04_0034__b0148521182610">Transition</strong>, <strong id="obs_04_0034__b559532462619">NoncurrentVersionTransition</strong>, <strong id="obs_04_0034__b8835115316558">AbortIncompleteMultipartUpload</strong>, and <strong id="obs_04_0034__b927162912267">NoncurrentVersionExpiration</strong> are absent.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row64436636"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p51985045">ID</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p50039086">Unique identifier of a rule. The value can contain a maximum of 255 characters.</p>
|
|
<p id="obs_04_0034__p47698590">Type: string</p>
|
|
<p id="obs_04_0034__p26634127">Parent: Rule</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p9880673">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row21817195"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p22362409">LifecycleConfiguration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p66524715">Container for lifecycle rules. You can add multiple rules. The total size of the rules cannot exceed 20 KB.</p>
|
|
<p id="obs_04_0034__p61851530">Type: XML</p>
|
|
<p id="obs_04_0034__p19792858">Child: Rule</p>
|
|
<p id="obs_04_0034__p43917997">Parent: none</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p588042">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row5292381"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p26029697">NoncurrentDays</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p28030706">Number of days when the specified rule takes effect after the object becomes a historical version (only applicable to an object's historical version).</p>
|
|
<p id="obs_04_0034__p50949762">Type: integer</p>
|
|
<p id="obs_04_0034__p55894679">Parent: NoncurrentVersionExpiration, NoncurrentVersionTransition</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p31175128">Yes if the <strong id="obs_04_0034__b84235270610649">NoncurrentVersionExpiration</strong> or <strong id="obs_04_0034__b1351124272162545">NoncurrentVersionTransition</strong> element is present.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row12140703"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p43872919">NoncurrentVersionTransition</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p64045535">Transition time of historical object versions and the object storage class after transition.</p>
|
|
<p id="obs_04_0034__p39538904">Type: XML</p>
|
|
<p id="obs_04_0034__p20305823">Child: NoncurrentDays, StorageClass</p>
|
|
<p id="obs_04_0034__p48534684">Parent: Rule</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p38995332">Yes if the <strong id="obs_04_0034__b2144196458">Transition</strong>, <strong id="obs_04_0034__b172070009">Expiration</strong>, <strong id="obs_04_0034__b187701445812">AbortIncompleteMultipartUpload</strong>, and <strong id="obs_04_0034__b1062639783">NoncurrentVersionExpiration</strong> elements are absent.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row15413673"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p40548035">NoncurrentVersionExpiration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p63165430">Container for the expiration time of objects' historical versions. If versioning is enabled or suspended for a bucket, you can set <strong id="obs_04_0034__b842352706153831">NoncurrentVersionExpiration</strong> to delete historical versions of objects that match the lifecycle rule (only applicable to the historical versions of objects).</p>
|
|
<p id="obs_04_0034__p31617960">Type: XML</p>
|
|
<p id="obs_04_0034__p16126185">Child: NoncurrentDays</p>
|
|
<p id="obs_04_0034__p10917938">Parent: Rule</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p11937768">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row684674519414"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p18475453419">AbortIncompleteMultipartUpload</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p1984714456419">Container for specifying when the not merged parts (fragments) in an incomplete upload will be deleted.</p>
|
|
<p id="obs_04_0034__p22531162611">Type: XML</p>
|
|
<p id="obs_04_0034__p1225318162067">Child: DaysAfterInitiation</p>
|
|
<p id="obs_04_0034__p3253316061">Parent: Rule</p>
|
|
<div class="note" id="obs_04_0034__note88646561443"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_04_0034__p7864756104413">AbortIncompleteMultipartUpload does not support filtering by tag.</p>
|
|
</div></div>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p13847194517412">Yes if the <strong id="obs_04_0034__b28611145105812">Transition</strong>, <strong id="obs_04_0034__b28627452583">Expiration</strong>, <strong id="obs_04_0034__b9151221145920">NoncurrentVersionExpiration</strong>, and <strong id="obs_04_0034__b4581182495916">NoncurrentVersionTransition</strong> elements are absent.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row76989381197"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p3698938997">DaysAfterInitiation</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p7593183511109">Specifies the number of days since the initiation of an incomplete multipart upload that OBS will wait before deleting the not merged parts (fragments) of the upload.</p>
|
|
<p id="obs_04_0034__p14593163531010">Type: integer</p>
|
|
<p id="obs_04_0034__p19593133511015">Parent: AbortIncompleteMultipartUpload</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p1098034854512">Yes if the <strong id="obs_04_0034__b26471861405">AbortIncompleteMultipartUpload</strong> element is present.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row177435120344"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p7495815193516">Filter</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p34951115113520">A specific filter. The lifecycle rule will apply to the objects matching this filter in a bucket.</p>
|
|
<p id="obs_04_0034__p15495915143519">You can filter objects by object key prefix, object tag, or both. If there are multiple filters in a rule, use the And logic to combine them.</p>
|
|
<p id="obs_04_0034__p84950154359">Type: XML</p>
|
|
<p id="obs_04_0034__p9495141517353">Parent: Rule</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p141346260538">Either Filter or Prefix can be configured at the same level under Rule.</p>
|
|
<p id="obs_04_0034__p413111263536">Prefix can be a child node of Filter.</p>
|
|
<p id="obs_04_0034__p17495101510359"></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row12993459113410"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p1872513011355">And</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p672593093519">The And logic among filtering criteria.</p>
|
|
<p id="obs_04_0034__p17725113017351">The And logic can be used when both the object name prefix and object tag are used or multiple object tags are used.</p>
|
|
<p id="obs_04_0034__p172563012352">Type: XML</p>
|
|
<p id="obs_04_0034__p12725143011358">Parent: Filter</p>
|
|
<p id="obs_04_0034__p17251730133517">Constraints:</p>
|
|
<ol id="obs_04_0034__ol37257302352"><li id="obs_04_0034__li1072593073511">And must have child nodes.</li><li id="obs_04_0034__li12725230153512">If Filter has Tag or Prefix as its child node, And cannot be a child node at the same level as the Tag or Prefix child node under Filter. (Tag and Prefix can be included in And.)</li></ol>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p1372573019359">Yes if there are multiple Prefix and Tag rules.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row89941659183416"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p2072553011352">Tag</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p13725113093519">Specifies which objects can match the current Rule.</p>
|
|
<p id="obs_04_0034__p1072593073517">Type: container</p>
|
|
<p id="obs_04_0034__p77251930123511">Parent: Filter or And</p>
|
|
<p id="obs_04_0034__p13725143053517">Constraints:</p>
|
|
<ol id="obs_04_0034__ol1172623017355"><li id="obs_04_0034__li17266300357">If Tag is configured as a child node of Filter, there can be only one Tag node. If Filter has a Prefix child node, there cannot be any Tag node at the same level with Prefix under Filter.</li><li id="obs_04_0034__li672623015350">If Tag is configured under And, there can be a maximum of 10 Tag nodes, and the tag key values must be different.</li><li id="obs_04_0034__li672611301354">If AbortIncompleteMultipartUpload exists as a child node of Rule, Tag cannot be configured to filter fragments.</li><li id="obs_04_0034__li1172610306357">If the tags in multiple rules overlap and lifecycle actions conflict, the configuration is not allowed. For example, rule 1 uses one tag (<em id="obs_04_0034__i821373731614">key1</em>, <em id="obs_04_0034__i18213113716163">value1</em>) and deletes objects 90 days after creation, while rule 2 uses two tags (<em id="obs_04_0034__i4213163701612">key1</em>, <em id="obs_04_0034__i192138377161">value1</em>; <em id="obs_04_0034__i621316371161">key2</em>, <em id="obs_04_0034__i321303719163">value2</em>) and transitions objects to COLD 120 days after creation. In this case, the tags in two rules overlap and lifecycle actions conflict, so such configuration is not allowed.</li></ol>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p1472613043514">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row1499410591347"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p1564911417362">Key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p106491418364">The key of the tag.</p>
|
|
<p id="obs_04_0034__p126491341173616">Type: string</p>
|
|
<p id="obs_04_0034__p86491941183617">Parent: Tag</p>
|
|
<p id="obs_04_0034__p186491941183615">Constraints:</p>
|
|
<ul id="obs_04_0034__ul2211184554710"><li id="obs_04_0034__obs_04_0172_li1292270143417">If there are multiple tags specified for an object, each tag key must be unique.</li><li id="obs_04_0034__obs_04_0172_li18508753193311">A tag key must contain 1 to 36 characters and be case sensitive.</li><li id="obs_04_0034__obs_04_0172_li14722332342">A tag key cannot start or end with a space or contain the following characters: ,/|<>=*\</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p14649741143618">Yes if Tag is present.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row0994105933418"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p126499413362">Value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p764984115367">The value of the tag.</p>
|
|
<p id="obs_04_0034__p19649114116366">Type: string</p>
|
|
<p id="obs_04_0034__p1065013413363">Parent: Tag</p>
|
|
<p id="obs_04_0034__p156501441203617">Constraints:</p>
|
|
<ul id="obs_04_0034__ul1821711516492"><li id="obs_04_0034__obs_04_0172_li12001550163712">A tag value can contain 0 to 43 characters and must be case sensitive.</li><li id="obs_04_0034__obs_04_0172_li44584673710">A tag value cannot contain the following characters: ,/|<>=*\</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p965064113619">Yes if Tag is present.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row40331056"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p45590100">Prefix</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p1810649">Object name prefix that identifies one or more objects to which the rule applies.</p>
|
|
<p id="obs_04_0034__p16295847">Type: string</p>
|
|
<p id="obs_04_0034__p12444903">Parent: Rule</p>
|
|
<p id="obs_04_0034__p179517215526">Constraints:</p>
|
|
<ol id="obs_04_0034__ol496017115214"><li id="obs_04_0034__li199691755210">When you configure a lifecycle rule by specifying a prefix, if the specified prefix and the prefix of an existing lifecycle rule overlap, OBS regards these two rules as one and forbids you to configure this rule. For example, if there is a rule with the object prefix <strong id="obs_04_0034__b24071456112411">abc</strong> configured in the system, another rule with the object prefix starting with <strong id="obs_04_0034__b16407205682418">abc</strong> cannot be configured.</li><li id="obs_04_0034__li1953313223529">If there is already a lifecycle rule that is based on an object prefix, you are not allowed to configure another rule that is applied to the entire bucket.</li></ol>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p1404197">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row12637773"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p17026711">Rule</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p36986341">Container for a specific lifecycle rule.</p>
|
|
<p id="obs_04_0034__p64441617">Type: container</p>
|
|
<p id="obs_04_0034__p43103648">Parent: LifecycleConfiguration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p1734575">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0034__row15611178"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_04_0034__p56545875">Status</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.53%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_04_0034__p16813124">Indicates whether the rule is enabled.</p>
|
|
<p id="obs_04_0034__p17100391">Type: string</p>
|
|
<p id="obs_04_0034__p19685798">Parent: Rule</p>
|
|
<p id="obs_04_0034__p42954456">Value options: <strong id="obs_04_0034__b42412451399">Enabled</strong>, <strong id="obs_04_0034__b1153509398">Disabled</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_04_0034__p56758950">Yes</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0034__section12704051"><h4 class="sectiontitle">Response Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0034__screen34072248"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>status_code
|
|
Date:<span class="w"> </span>date
|
|
Content-Length:<span class="w"> </span>length
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0034__section47227600"><h4 class="sectiontitle">Response Headers</h4><p class="msonormal" id="obs_04_0034__p1512332591013">The response to the request uses common headers. For details, see <a href="obs_04_0013.html#obs_04_0013__d0e686">Table 1</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0034__section22395217"><h4 class="sectiontitle">Response Elements</h4><p class="msonormal" id="obs_04_0034__p49591759">This response contains no elements.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0034__section230369"><h4 class="sectiontitle">Error Responses</h4><p class="msonormal" id="obs_04_0034__p57509508">No special error responses are returned. For details about error responses, see <a href="obs_04_0115.html#obs_04_0115__d0e843">Table 2</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0034__section14482163815396"><h4 class="sectiontitle">Sample Request</h4><div class="codecoloring" codetype="Xml" id="obs_04_0034__screen8484163863919"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
|
|
<span class="normal"> 2</span>
|
|
<span class="normal"> 3</span>
|
|
<span class="normal"> 4</span>
|
|
<span class="normal"> 5</span>
|
|
<span class="normal"> 6</span>
|
|
<span class="normal"> 7</span>
|
|
<span class="normal"> 8</span>
|
|
<span class="normal"> 9</span>
|
|
<span class="normal">10</span>
|
|
<span class="normal">11</span>
|
|
<span class="normal">12</span>
|
|
<span class="normal">13</span>
|
|
<span class="normal">14</span>
|
|
<span class="normal">15</span>
|
|
<span class="normal">16</span>
|
|
<span class="normal">17</span>
|
|
<span class="normal">18</span>
|
|
<span class="normal">19</span>
|
|
<span class="normal">20</span>
|
|
<span class="normal">21</span>
|
|
<span class="normal">22</span>
|
|
<span class="normal">23</span>
|
|
<span class="normal">24</span>
|
|
<span class="normal">25</span>
|
|
<span class="normal">26</span>
|
|
<span class="normal">27</span>
|
|
<span class="normal">28</span>
|
|
<span class="normal">29</span>
|
|
<span class="normal">30</span>
|
|
<span class="normal">31</span>
|
|
<span class="normal">32</span>
|
|
<span class="normal">33</span>
|
|
<span class="normal">34</span>
|
|
<span class="normal">35</span>
|
|
<span class="normal">36</span>
|
|
<span class="normal">37</span>
|
|
<span class="normal">38</span>
|
|
<span class="normal">39</span>
|
|
<span class="normal">40</span>
|
|
<span class="normal">41</span>
|
|
<span class="normal">42</span>
|
|
<span class="normal">43</span>
|
|
<span class="normal">44</span>
|
|
<span class="normal">45</span></pre></div></td><td class="code"><div><pre><span></span>PUT<span class="w"> </span>/?lifecycle<span class="w"> </span>HTTP/1.1
|
|
User-Agent:<span class="w"> </span>curl/7.29.0
|
|
Host:<span class="w"> </span>examplebucket.obs.region.example.com
|
|
Accept:<span class="w"> </span>*/*
|
|
Date:<span class="w"> </span>WED,<span class="w"> </span>01<span class="w"> </span>Jul<span class="w"> </span>2015<span class="w"> </span>03:05:34<span class="w"> </span>GMT
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:DpSAlmLX/BTdjxU5HOEwflhM0WI=
|
|
Content-MD5:<span class="w"> </span>ujCZn5p3fmczNiQQxdsGaQ==
|
|
Content-Length:<span class="w"> </span>919
|
|
|
|
<span class="cp"><?xml version="1.0" encoding="utf-8"?></span>
|
|
<span class="nt"><LifecycleConfiguration></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Rule></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><ID></span>lifecycle-rule-id<span class="nt"></ID></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Filter></span>
|
|
<span class="w"> </span><span class="nt"><And></span>
|
|
<span class="w"> </span><span class="nt"><Prefix></span>prefix<span class="nt"></Prefix></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Tag><Key></span>key1<span class="nt"></Key><Value></span>value1<span class="nt"></Value></Tag></span>
|
|
<span class="w"> </span><span class="nt"><Tag><Key></span>key2<span class="nt"></Key><Value></span>value2<span class="nt"></Value></Tag></span>
|
|
<span class="w"> </span><span class="nt"></And></span>
|
|
<span class="w"> </span><span class="nt"></Filter></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Status></span>Enabled<span class="nt"></Status></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Expiration></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Days></span>70<span class="nt"></Days></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></Expiration></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><NoncurrentVersionExpiration></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><NoncurrentDays></span>70<span class="nt"></NoncurrentDays></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></NoncurrentVersionExpiration></span>
|
|
<span class="w"> </span><span class="nt"><Transition></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Days></span>30<span class="nt"></Days></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><StorageClass></span>WARM<span class="nt"></StorageClass></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></Transition></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Transition></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Days></span>60<span class="nt"></Days></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><StorageClass></span>COLD<span class="nt"></StorageClass></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></Transition></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><NoncurrentVersionTransition></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><NoncurrentDays></span>30<span class="nt"></NoncurrentDays></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><StorageClass></span>WARM<span class="nt"></StorageClass></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></NoncurrentVersionTransition></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><NoncurrentVersionTransition></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><NoncurrentDays></span>60<span class="nt"></NoncurrentDays></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><StorageClass></span>COLD<span class="nt"></StorageClass></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></NoncurrentVersionTransition></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></Rule></span>
|
|
<span class="nt"></LifecycleConfiguration></span>
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0034__section76081155815"><h4 class="sectiontitle">Sample Response</h4><div class="codecoloring" codetype="Xml" id="obs_04_0034__screen8485113814"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>200<span class="w"> </span>OK
|
|
Server:<span class="w"> </span>OBS
|
|
x-obs-request-id:<span class="w"> </span>BF26000001643670AC06E7B9A7767921
|
|
x-obs-id-2:<span class="w"> </span>32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSvK6z8HV6nrJh49gsB5vqzpgtohkiFm
|
|
Date:<span class="w"> </span>WED,<span class="w"> </span>01<span class="w"> </span>Jul<span class="w"> </span>2015<span class="w"> </span>03:05:34<span class="w"> </span>GMT
|
|
Content-Length:<span class="w"> </span>0
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0034__section7189162714324"><h4 class="sectiontitle">Sample Request: Deleting Fragments</h4><pre class="screen" id="obs_04_0034__screen9651634173414">PUT /?lifecycle HTTP/1.1
|
|
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:iqSPeUBl66PwXDApxjRKk6hlcN4=
|
|
User-Agent: curl/7.29.0
|
|
Host: examplebucket.obs.<em id="obs_04_0034__i18649162214532">region</em>.example.com
|
|
Date: Thu, 24 Apr 2025 14:28:22 GMT
|
|
Content-Type: application/xml
|
|
Content-MD5: PBgGafte2ACjUwYxdJA47Q==
|
|
|
|
<LifecycleConfiguration>
|
|
<Rule>
|
|
<ID>lifecycle-rule-id</ID>
|
|
<Prefix>test/</Prefix>
|
|
<Status>Enabled</Status>
|
|
<AbortIncompleteMultipartUpload>
|
|
<DaysAfterInitiation>10</DaysAfterInitiation>
|
|
</AbortIncompleteMultipartUpload>
|
|
</Rule>
|
|
</LifecycleConfiguration></pre>
|
|
</div>
|
|
<div class="section" id="obs_04_0034__section64477249349"><h4 class="sectiontitle">Sample Response: Deleting Fragments</h4><pre class="screen" id="obs_04_0034__screen1934914513413">HTTP/1.1 200 OK
|
|
x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCTlN+glNMVGtTicAnVXkTVDjR5xKSLuH
|
|
x-obs-request-id: 0000018A2BE86742D2C6989CA79E136C
|
|
Server: OBS
|
|
Content-Length: 0
|
|
Date: Thu, 24 Apr 2025 14:28:23 GMT</pre>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_04_0026.html">Advanced Bucket Settings</a></div>
|
|
</div>
|
|
</div>
|
|
|