forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
152 lines
11 KiB
HTML
152 lines
11 KiB
HTML
<a name="EN-US_TOPIC_0125560249"></a><a name="EN-US_TOPIC_0125560249"></a>
|
|
|
|
<h1 class="topictitle1">GET Bucket tagging</h1>
|
|
<div id="body1494815431748"><p id="EN-US_TOPIC_0125560249__p17452173152848">This implementation of the <strong id="EN-US_TOPIC_0125560249__b75351732878">GET</strong> operation uses the <strong id="EN-US_TOPIC_0125560249__b997533910719">tagging</strong> subresource to return the tag set associated with the bucket. However, searching for buckets by tag is not supported.</p>
|
|
<p id="EN-US_TOPIC_0125560249__p61351301203352">Only users granted the <strong id="EN-US_TOPIC_0125560249__b15290799203352">s3:GetBucketTagging</strong> permission can perform this operation. By default, the permission is granted to the bucket owner only. However, it can be granted to other users by configuring the bucket policy.</p>
|
|
<div class="section" id="EN-US_TOPIC_0125560249__section38789260145638"><h4 class="sectiontitle">Request Syntax</h4><pre class="screen" id="EN-US_TOPIC_0125560249__screen54922357145638">GET /?tagging HTTP/1.1
|
|
User-Agent: agent
|
|
Host: bucketname.obs.example.com
|
|
Accept: */*
|
|
Date: date
|
|
Authorization: authorization string</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560249__section24539173145638"><h4 class="sectiontitle">Request Parameters</h4><p id="EN-US_TOPIC_0125560249__p41515982145638">This request contains no parameter.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560249__section38099522145638"><h4 class="sectiontitle">Request Headers</h4><p id="EN-US_TOPIC_0125560249__p5406870610467">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_0125560249__section58590878145638"><h4 class="sectiontitle">Request Elements</h4><p id="EN-US_TOPIC_0125560249__p48240660145638">This request contains no element.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560249__section5866353914519"><h4 class="sectiontitle">Response Syntax</h4><pre class="screen" id="EN-US_TOPIC_0125560249__screen5412621714519">HTTP/1.1 200 OK
|
|
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: application/xml
|
|
Content-Length: 0
|
|
Date: date
|
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
|
|
<Tagging xmlns="http://obs.example.com/doc/2015-06-30/">
|
|
<TagSet>
|
|
<Tag>
|
|
<Key>TagNameJJ1</Key>
|
|
<Value>tytttasceettt</Value>
|
|
</Tag>
|
|
</TagSet>
|
|
</Tagging></pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560249__section1737390614519"><h4 class="sectiontitle">Response Headers</h4><p id="EN-US_TOPIC_0125560249__p64499290104851">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_0125560249__section4911114514519"><h4 class="sectiontitle">Response Elements</h4><p id="EN-US_TOPIC_0125560249__p3285574105048">This response contains elements to detail bucket lifecycle configuration. The following table describes the elements.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560249__table55855374145027" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Elements to be configured for bucket tags</caption><thead align="left"><tr id="EN-US_TOPIC_0125560249__row43394869145027"><th align="left" class="cellrowborder" valign="top" width="20.200000000000003%" id="mcps1.3.9.3.2.4.1.1"><p id="EN-US_TOPIC_0125560249__p25323481145027">Element</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60.61%" id="mcps1.3.9.3.2.4.1.2"><p id="EN-US_TOPIC_0125560249__p37936074145027">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.189999999999998%" id="mcps1.3.9.3.2.4.1.3"><p id="EN-US_TOPIC_0125560249__p52923119145027">Mandatory or Not</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0125560249__row58914224145027"><td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.9.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560249__p46789943103837">Tagging</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.61%" headers="mcps1.3.9.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560249__p31889035103837">Container for the <strong id="EN-US_TOPIC_0125560249__b18565866103837">TagSet</strong> and <strong id="EN-US_TOPIC_0125560249__b32875072103837">Tag</strong> elements</p>
|
|
<p id="EN-US_TOPIC_0125560249__p27440198103837">Type: Container</p>
|
|
<p id="EN-US_TOPIC_0125560249__p45635198103837">Ancestor: None</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.189999999999998%" headers="mcps1.3.9.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560249__p5463532103837">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560249__row30825325103856"><td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.9.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560249__p63172917103947">TagSet</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.61%" headers="mcps1.3.9.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560249__p16732614103947">Container for a set of tags</p>
|
|
<p id="EN-US_TOPIC_0125560249__p16375801103947">Type: Container</p>
|
|
<p id="EN-US_TOPIC_0125560249__p13164488103947">Ancestor: Tagging</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.189999999999998%" headers="mcps1.3.9.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560249__p59690594103947">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560249__row2629709410396"><td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.9.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560249__p27899690103947">Tag</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.61%" headers="mcps1.3.9.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560249__p45282441103947">Container for tag information</p>
|
|
<p id="EN-US_TOPIC_0125560249__p4888788103947">Type: Container. Each bucket supports a maximum of 20 tags.</p>
|
|
<p id="EN-US_TOPIC_0125560249__p43999100103947">Ancestor: TagSet</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.189999999999998%" headers="mcps1.3.9.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560249__p7157356103947">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560249__row19744018103911"><td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.9.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560249__p50330179103947">Key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.61%" headers="mcps1.3.9.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560249__p50212713103947">Name of the tag</p>
|
|
<p id="EN-US_TOPIC_0125560249__p49261238103947">Type: String. It can contain a maximum of 36 characters, including A to Z, a to z, 0 to 9, hyphens (-), underscores (_), and Unicode(\u4E00-\u9FFF). In the same bucket, the key of a tag must be unique.</p>
|
|
<p id="EN-US_TOPIC_0125560249__p40697959103947">Ancestor: Tag</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.189999999999998%" headers="mcps1.3.9.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560249__p8200422103947">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560249__row9143931103933"><td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.9.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560249__p5419392103947">Value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.61%" headers="mcps1.3.9.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560249__p36317623103947">Value of the tag</p>
|
|
<p id="EN-US_TOPIC_0125560249__p58423158103947">Type: String. It can contain a maximum of 43 characters, including A to Z, a to z, 0 to 9, hyphens (-), underscores (_), periods (.), and Unicode(\u4E00-\u9FFF). Note that periods (.) can be used for this parameter.</p>
|
|
<p id="EN-US_TOPIC_0125560249__p56046379103947">Ancestor: Tag</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.189999999999998%" headers="mcps1.3.9.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560249__p43462851103947">Yes</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560249__section3300087714519"><h4 class="sectiontitle">Error Responses</h4><p id="EN-US_TOPIC_0125560249__p7106395105136">Except for common error responses, special error responses are also returned. The following table lists error responses and possible causes.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560249__table3266664814519" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Error responses and possible causes</caption><thead align="left"><tr id="EN-US_TOPIC_0125560249__row4080837914519"><th align="left" class="cellrowborder" valign="top" width="22.45%" id="mcps1.3.10.3.2.4.1.1"><p id="EN-US_TOPIC_0125560249__p1714439414519">Error Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="59.18%" id="mcps1.3.10.3.2.4.1.2"><p id="EN-US_TOPIC_0125560249__p4651869814519">Possible Cause</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.37%" id="mcps1.3.10.3.2.4.1.3"><p id="EN-US_TOPIC_0125560249__p991821114519">HTTP Status Code</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0125560249__row6517759614519"><td class="cellrowborder" valign="top" width="22.45%" headers="mcps1.3.10.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560249__p8664140105157">NoSuchTagSet</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.18%" headers="mcps1.3.10.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560249__p30706709105157">The specified bucket is not configured with a tag.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.37%" headers="mcps1.3.10.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560249__p4215462105157">404 Not Found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560249__section21401127145254"><h4 class="sectiontitle">Sample Request</h4><pre class="screen" id="EN-US_TOPIC_0125560249__screen55769758145254">GET /?tagging HTTP/1.1
|
|
User-Agent: curl/7.19.7 (x86_64-suse-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8j zlib/1.2.7 libidn/1.10
|
|
Host: bucketname.obs.example.com
|
|
Accept: */*
|
|
Date: Tue, 09 May 2017 03:17:07 +0000
|
|
Authorization: authorization string</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560249__section32165774145254"><h4 class="sectiontitle">Sample Response</h4><pre class="screen" id="EN-US_TOPIC_0125560249__screen55290886145254">HTTP/1.1 200 OK
|
|
Server: OBS
|
|
x-amz-request-id: 0002B7532E0000015BEB35330C5884X1
|
|
x-amz-id-2: s12w20LYNQqSb7moq4ibgJwmQRSmVQV+rFBqplOGYkXUpXeS/nOmbkyD+E35K79j
|
|
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
|
|
Content-Type: application/xml
|
|
Date: Tue, 09 May 2017 03:16:23 GMT
|
|
Content-Length: 441
|
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<Tagging xmlns="http://obs.example.com/doc/2015-06-30/">
|
|
<TagSet>
|
|
<Tag>
|
|
<Key>TagNameJJ1</Key>
|
|
<Value>tytttasceettt</Value>
|
|
</Tag>
|
|
</TagSet>
|
|
</Tagging></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>
|
|
|