forked from docs/doc-exports
OBS S3 API DOC
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
This commit is contained in:
@ -1933,7 +1933,7 @@
|
||||
"node_id":"en-us_topic_0125560276.xml",
|
||||
"product_code":"obs",
|
||||
"code":"108",
|
||||
"des":"Released OnWhat's New2025-04-07Updated the following content:Updated informations in PUT Bucket lifecycle and PUT Bucket tagging.2024-08-02Updated the following content:D",
|
||||
"des":"Released OnWhat's New2025-06-17Updated the following content:Updated informations in PUT Bucket lifecycle and GET Bucket lifecycle.2025-04-07Updated the following content",
|
||||
"doc_type":"api_obs",
|
||||
"kw":"Change History,API Reference (S3)",
|
||||
"search_title":"",
|
||||
|
||||
@ -963,7 +963,7 @@
|
||||
"code":"107"
|
||||
},
|
||||
{
|
||||
"desc":"Released OnWhat's New2025-04-07Updated the following content:Updated informations in PUT Bucket lifecycle and PUT Bucket tagging.2024-08-02Updated the following content:D",
|
||||
"desc":"Released OnWhat's New2025-06-17Updated the following content:Updated informations in PUT Bucket lifecycle and GET Bucket lifecycle.2025-04-07Updated the following content",
|
||||
"product_code":"obs",
|
||||
"title":"Change History",
|
||||
"uri":"en-us_topic_0125560276.html",
|
||||
|
||||
@ -6,6 +6,12 @@
|
||||
<th valign="bottom" align="left" id="stentry13652467194436" width="69.36%"><p id="EN-US_TOPIC_0125560276__p55763344194436">What's New</p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr id="EN-US_TOPIC_0125560276__strow780418420437"><td valign="top" id="stentry12804242114318" headers="stentry41593773194436"><p id="EN-US_TOPIC_0125560276__p198041642164319">2025-06-17</p>
|
||||
</td>
|
||||
<td valign="top" id="stentry13804242144318" headers="stentry13652467194436"><p id="EN-US_TOPIC_0125560276__p280464254311">Updated the following content:</p>
|
||||
<p id="EN-US_TOPIC_0125560276__p179099220442">Updated informations in <a href="en-us_topic_0125560423.html">PUT Bucket lifecycle</a> and <a href="en-us_topic_0125560497.html">GET Bucket lifecycle</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="EN-US_TOPIC_0125560276__strow34605104393"><td valign="top" id="stentry846021011397" headers="stentry41593773194436"><p id="EN-US_TOPIC_0125560276__p3452185873914">2025-04-07</p>
|
||||
</td>
|
||||
<td valign="top" id="stentry204601610153915" headers="stentry13652467194436"><p id="EN-US_TOPIC_0125560276__p1545211589393">Updated the following content:</p>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<div class="note" id="EN-US_TOPIC_0125560305__note23960039"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0125560305__p55170850161711">In multiple regions scenarios, if user A creates a bucket, deletes the bucket later, and immediately creates a bucket with the same name in different regions, the system will respond <strong id="EN-US_TOPIC_0125560305__b1970124344814">409</strong>. If user A creates a bucket with the same name in different regions 30 minutes later, the system will respond <strong id="EN-US_TOPIC_0125560305__b10199133994817">200</strong>.</p>
|
||||
<p id="EN-US_TOPIC_0125560305__p3836447020218">If a 5<em id="EN-US_TOPIC_0125560305__i732732184916">xx</em> error is returned from the server or the request times out during bucket creation, the system takes about 10 minutes to make bucket information consistent. During the process, bucket information is inaccurate.</p>
|
||||
</div></div>
|
||||
<div class="section" id="EN-US_TOPIC_0125560305__section47363625202820"><h4 class="sectiontitle">Storage Class</h4><p id="EN-US_TOPIC_0125560305__p34127054202820">Users are allowed to create buckets of different storage classes. The <strong id="EN-US_TOPIC_0125560305__b38708033202820">x-default-storage-class</strong> header in a bucket creation request specifies the default storage class for a bucket. The storage class of the objects in a bucket is the same as that of the bucket. There are three storage classes: STANDARD (OBS Standard), STANDARD_IA (OBS Warm), and GLACIER (OBS Cold). If this header is not in the request, the storage class of the bucket created is OBS Standard. When users upload an object to a bucket, if they do not set the storage class of the object (see <a href="en-us_topic_0125560399.html">PUT Object</a>), the object will use the default storage class of the bucket.</p>
|
||||
<div class="section" id="EN-US_TOPIC_0125560305__section47363625202820"><h4 class="sectiontitle">Storage Class</h4><p id="EN-US_TOPIC_0125560305__p34127054202820">Users are allowed to create buckets of different storage classes. The <strong id="EN-US_TOPIC_0125560305__b38708033202820">x-default-storage-class</strong> header in a bucket creation request specifies the default storage class for a bucket. There are three storage classes: STANDARD (OBS Standard), STANDARD_IA (OBS Warm), and GLACIER (OBS Cold). If this header is not in the request, the storage class of the bucket created is OBS Standard. When users upload an object to a bucket, if they do not set the storage class of the object (see <a href="en-us_topic_0125560399.html">PUT Object</a>), the object will use the default storage class of the bucket.</p>
|
||||
</div>
|
||||
<div class="section" id="EN-US_TOPIC_0125560305__section38116128"><h4 class="sectiontitle">Request Syntax</h4><pre class="screen" id="EN-US_TOPIC_0125560305__screen17691597104928">PUT / HTTP/1.1
|
||||
User-Agent: agent
|
||||
|
||||
@ -59,7 +59,7 @@ Content-Length: 0</pre>
|
||||
</div>
|
||||
<div class="section" id="EN-US_TOPIC_0125560403__section48517371224023"><h4 class="sectiontitle">Error Responses</h4><p id="EN-US_TOPIC_0125560403__p1233774214499">No special error responses are returned. For details about error responses, see <a href="en-us_topic_0125560440.html#EN-US_TOPIC_0125560440__table30733758">Table 1</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="EN-US_TOPIC_0125560403__section31331064"><h4 class="sectiontitle">Sample Request</h4><pre class="screen" id="EN-US_TOPIC_0125560403__screen2592113">PUT / HTTP/1.1
|
||||
<div class="section" id="EN-US_TOPIC_0125560403__section31331064"><h4 class="sectiontitle">Sample Request</h4><pre class="screen" id="EN-US_TOPIC_0125560403__screen2592113">PUT /?storagePolicy HTTP/1.1
|
||||
User-Agent: Jakarta Commons-HttpClient/3.1
|
||||
Host: bucketname.obs.example.com
|
||||
Accept: */*
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
<h1 class="topictitle1">PUT Bucket lifecycle</h1>
|
||||
<div id="body15767494"><p class="msonormal" id="EN-US_TOPIC_0125560423__p3989940">OBS supports periodic transition and deletion of objects in a bucket based on a specified rule. This is implemented in lifecycle configuration. After the bucket lifecycle is set, OBS automatically deletes objects at the time specified in this operation. This operation can be used to delete:</p>
|
||||
<ul id="EN-US_TOPIC_0125560423__ul35909463"><li id="EN-US_TOPIC_0125560423__li7689721">Periodically uploaded files: Some periodically uploaded files need to be retained for only one week or one month.</li><li id="EN-US_TOPIC_0125560423__li2098632">Documents that are seldom accessed after a certain period of time. These documents may be archived for another period of time and be deleted then.</li><li id="EN-US_TOPIC_0125560423__li11556151335620">The minimum time for the transition of the bucket storage to Warm or to Cold can be configured. The value ranges from <strong id="EN-US_TOPIC_0125560423__b842352706193456">24</strong> to <strong id="EN-US_TOPIC_0125560423__b84235270619350">8640</strong>.</li></ul>
|
||||
<ul id="EN-US_TOPIC_0125560423__ul35909463"><li id="EN-US_TOPIC_0125560423__li7689721">Periodically uploaded files: Some periodically uploaded files need to be retained for only one week or one month.</li><li id="EN-US_TOPIC_0125560423__li2098632">Documents that are seldom accessed after a certain period of time. These documents may be archived for another period of time and be deleted then.</li></ul>
|
||||
<p class="msonormal" id="EN-US_TOPIC_0125560423__p54749715">This operation is used to create or update the lifecycle configuration of a bucket.</p>
|
||||
<p class="msonormal" id="EN-US_TOPIC_0125560423__p22985394">Only users granted the <strong id="EN-US_TOPIC_0125560423__b215161710217">s3:PutLifecycleConfiguration</strong> permission can create or update the bucket lifecycle configuration. By default, only the bucket owner can set the bucket lifecycle configuration. The bucket owner can allow other users to set the bucket lifecycle configuration by granting them the permission.</p>
|
||||
<p class="msonormal" id="EN-US_TOPIC_0125560423__p49877601">The lifecycle configuration supports periodic deletion and transition of objects. If you want to prevent a user from deleting and transitioning objects, disable the following permissions:</p>
|
||||
@ -21,7 +21,7 @@ Expect: expect
|
||||
<LifecycleConfiguration>
|
||||
<Rule>
|
||||
<ID>id</ID>
|
||||
<Prefix>prefix</Prefix>
|
||||
<Prefix><em id="EN-US_TOPIC_0125560423__i593372394116">prefix</em></Prefix>
|
||||
<Status>status</Status>
|
||||
<Expiration>
|
||||
<Days>365</Days>
|
||||
@ -129,7 +129,7 @@ Expect: expect
|
||||
<p id="EN-US_TOPIC_0125560423__p846465011119">Children: Date or Days, StorageClass</p>
|
||||
<p id="EN-US_TOPIC_0125560423__p11464350317">Ancestor: Rule</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560423__p1946417501118">Mandatory if <strong id="EN-US_TOPIC_0125560423__b546413501214">NoncurrentVersionTransition</strong>, <strong id="EN-US_TOPIC_0125560423__b11464175010117">Expiration</strong>, and <strong id="EN-US_TOPIC_0125560423__b24649501917">NoncurrentVersionExpiration</strong> are absent.</p>
|
||||
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560423__p1946417501118">Mandatory if <strong id="EN-US_TOPIC_0125560423__b546413501214">NoncurrentVersionTransition</strong>, <strong id="EN-US_TOPIC_0125560423__b11464175010117">Expiration</strong>, <strong id="EN-US_TOPIC_0125560423__b17574195673513">AbortIncompleteMultipartUpload</strong>, and <strong id="EN-US_TOPIC_0125560423__b1457416568351">NoncurrentVersionExpiration</strong> are absent.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="EN-US_TOPIC_0125560423__row6675738"><td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560423__p3863873">Expiration</p>
|
||||
@ -304,8 +304,7 @@ Content-Length: length </pre>
|
||||
<DaysAfterInitiation>10</DaysAfterInitiation>
|
||||
</AbortIncompleteMultipartUpload>
|
||||
</Rule>
|
||||
</LifecycleConfiguration>
|
||||
</pre>
|
||||
</LifecycleConfiguration></pre>
|
||||
</div>
|
||||
<div class="section" id="EN-US_TOPIC_0125560423__section58259743"><h4 class="sectiontitle">Sample Response 1</h4><pre class="screen" id="EN-US_TOPIC_0125560423__screen4214788812421">HTTP/1.1 200 OK
|
||||
Date: Thu, 05 Sep 2013 09:35:44 GMT
|
||||
|
||||
@ -29,7 +29,7 @@ Content-Length: 425
|
||||
<LifecycleConfiguration xmlns="http://obs.example.com/doc/2015-06-30/">
|
||||
<Rule>
|
||||
<ID>id</ID>
|
||||
<Prefix>prefix</Prefix>
|
||||
<Prefix><em id="EN-US_TOPIC_0125560497__i197056272571">prefix</em></Prefix>
|
||||
<Status>status</Status>
|
||||
<Expiration>
|
||||
<Date>date</Date>
|
||||
|
||||
Reference in New Issue
Block a user