doc-exports/docs/obs/s3api/en-us_topic_0125560345.html
Jawei, Li 1a4c1a720a OBS s3api 2.0.38.SP5
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Jawei, Li <lijiawei5@huawei.com>
Co-committed-by: Jawei, Li <lijiawei5@huawei.com>
2022-11-16 14:51:13 +00:00

121 lines
8.3 KiB
HTML

<a name="EN-US_TOPIC_0125560345"></a><a name="EN-US_TOPIC_0125560345"></a>
<h1 class="topictitle1">GET Bucket versioning</h1>
<div id="body15933636"><p class="msonormal" id="EN-US_TOPIC_0125560345__p2927765">The owner of a bucket can use this operation to get the versioning state of the bucket<sub id="EN-US_TOPIC_0125560345__sub9185002">.</sub></p>
<p class="msonormal" id="EN-US_TOPIC_0125560345__p26349888">If versioning is not configured for a bucket, no versioning state information will be returned after this operation. For details, see <strong id="EN-US_TOPIC_0125560345__b15556157">Sample Response (Bucket Versioning Not Configured)</strong>.</p>
<div class="section" id="EN-US_TOPIC_0125560345__section26289097"><h4 class="sectiontitle">Request Syntax</h4><pre class="screen" id="EN-US_TOPIC_0125560345__screen64347720121111">GET /?versioning HTTP/1.1
User-Agent: agent
Host: bucketname.obs.example.com
Accept: */*
Date: date
Authorization: authorization</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560345__section35275281"><h4 class="sectiontitle">Request Parameters</h4><p id="EN-US_TOPIC_0125560345__p1967662">This request involves no parameters.</p>
</div>
<div class="section" id="EN-US_TOPIC_0125560345__section49042080"><h4 class="sectiontitle">Request Headers</h4><p id="EN-US_TOPIC_0125560345__p25162958">This request uses common headers. For details about common request headers, see section <a href="en-us_topic_0125560462.html">Common Request Headers</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0125560345__section38725542"><h4 class="sectiontitle">Request Elements</h4><p id="EN-US_TOPIC_0125560345__p6366624">This request involves no elements.</p>
</div>
<div class="section" id="EN-US_TOPIC_0125560345__section20853488"><h4 class="sectiontitle">Response Syntax</h4><pre class="screen" id="EN-US_TOPIC_0125560345__screen14424925121126">HTTP/1.1 status_code
Server: Server Name
x-amz-request-id: request id
x-amz-id-2: id
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
Content-Type: type
Date: date
Content-Length: length
&lt;VersioningConfiguration xmlns="http://obs.example.com/doc/2015-06-30/"&gt;
&lt;Status&gt;status&lt;/Status&gt;
&lt;/VersioningConfiguration&gt;</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560345__section53463670"><h4 class="sectiontitle">Response Headers</h4><p id="EN-US_TOPIC_0125560345__p21463943">This response uses common headers. For details about common response headers, see section <a href="en-us_topic_0125560484.html">Common Response Headers</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0125560345__section11410990"><h4 class="sectiontitle">Response elements</h4><p id="EN-US_TOPIC_0125560345__p30539719">This response contains elements to specify the bucket versioning state. <a href="#EN-US_TOPIC_0125560345__table57299616">Table 1</a> describes the elements.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0125560345__table57299616"></a><a name="table57299616"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560345__table57299616" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Response elements</caption><thead align="left"><tr id="EN-US_TOPIC_0125560345__row12098568"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.9.3.2.4.1.1"><p id="EN-US_TOPIC_0125560345__p40459966">Element</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.9.3.2.4.1.2"><p id="EN-US_TOPIC_0125560345__p56031820">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.9.3.2.4.1.3"><p id="EN-US_TOPIC_0125560345__p42283611">Remarks</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0125560345__row2420499"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.9.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560345__p61842715">VersioningConfiguration</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.9.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560345__p43203995">Indicates the container for versioning state information.</p>
<p id="EN-US_TOPIC_0125560345__p53291640">Type: Container</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.9.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560345__p21655584">Mandatory</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560345__row60682533"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.9.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560345__p16338175">Status</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.9.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560345__p48323826">Specifies the versioning state of the bucket.</p>
<p id="EN-US_TOPIC_0125560345__p32261252">Type: Enumeration</p>
<p id="EN-US_TOPIC_0125560345__p21915813">Valid Values: Enabled, Suspended</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.9.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560345__p30350400">Optional</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0125560345__section35590047"><h4 class="sectiontitle">Error Responses</h4><p id="EN-US_TOPIC_0125560345__p46625744">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_0125560345__section13517902"><h4 class="sectiontitle">Sample Request</h4><pre class="screen" id="EN-US_TOPIC_0125560345__screen13081916121147">GET /?versioning HTTP/1.1
User-Agent: curl/7.29.0
Host: bucketname.obs.example.com
Accept: */*
Date: Mon, 13 Jan 2014 07:41:08 +0000
Authorization: AWS C5780CDE717D50F4CDAA:0FuFgUd3e9dqi3OeXPj1DiQMJgk=</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560345__section54552261"><h4 class="sectiontitle">Sample Response (Bucket Versioning Enabled)</h4><pre class="screen" id="EN-US_TOPIC_0125560345__screen19548059121157">HTTP/1.1 200 OK
Server: OBS
x-amz-request-id: DCD2FC9CAB78000001438A8C029703EB
x-amz-id-2: TazfhHdpZ7V0YzmLQynVfaQ2+9zaWlTiNokK3wk8+HZPW9lWWBdsz35BXWZiQ1lk
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
Content-Type: application/xml
Date: Mon, 13 Jan 2014 09:41:08 GMT
Content-Length: 178
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;VersioningConfiguration xmlns="http://obs.example.com/doc/2015-06-30/"&gt;
&lt;Status&gt;Enabled&lt;/Status&gt;
&lt;/VersioningConfiguration&gt;</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560345__section21208306"><h4 class="sectiontitle">Sample Response (Bucket Versioning Suspended)</h4><pre class="screen" id="EN-US_TOPIC_0125560345__screen2217790912128">HTTP/1.1 200 OK
Server: OBS
x-amz-request-id: DCD2FC9CAB7800000143954C3AE7C0A0
x-amz-id-2: zmHdfVr7HvmASeSRQ70pbCkpuiV2shwt2V3pBGzAzue65i8HdixOtLi4ud5ZemN0
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
Content-Type: application/xml
Date: Wed, 13 Jan 2014 09:47:17 GMT
Content-Length: 180
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;VersioningConfiguration xmlns="http://obs.example.com/doc/2015-06-30/"&gt;
&lt;Status&gt;Suspended&lt;/Status&gt;
&lt;/VersioningConfiguration&gt;</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560345__section26978383175228"><h4 class="sectiontitle">Sample Response (Bucket Versioning Not Configured)</h4><pre class="screen" id="EN-US_TOPIC_0125560345__screen10075648121219">HTTP/1.1 200 OK
Server: OBS
x-amz-request-id: DCD2FC9CAB780000014395468DB0BDB4
x-amz-id-2: iDh4134qyYwtV7mlUr7vhe33DSDiDs/AuGOiU8ggUaz+B1wrNVUO6grsQDDsWf7J
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
Content-Type: application/xml
Date: Wed, 13 Jan 2014 09:40:00 GMT
Content-Length: 129
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;VersioningConfiguration xmlns="http://obs.example.com/doc/2015-06-30/"&gt; </pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0125560493.html">Operations on Buckets</a></div>
</div>
</div>