forked from docs/doc-exports
Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: Jawei, Li <lijiawei5@huawei.com> Co-committed-by: Jawei, Li <lijiawei5@huawei.com>
199 lines
12 KiB
HTML
199 lines
12 KiB
HTML
<a name="obs_04_0063"></a><a name="obs_04_0063"></a>
|
|
|
|
<h1 class="topictitle1">Obtaining Bucket Encryption Configuration</h1>
|
|
<div id="body1549963978429"><div class="section" id="obs_04_0063__section154118471125"><h4 class="sectiontitle">Functions</h4><p id="obs_04_0063__p328123010563">OBS uses the GET method to obtain the encryption configuration of a specified bucket.</p>
|
|
<p id="obs_04_0063__p028114308563">To perform this operation, you must have the <strong id="obs_04_0063__b10590602547">GetEncryptionConfiguration</strong> permission. By default, only the bucket owner can delete the tags of a bucket. The bucket owner can allow other users to perform this operation by setting a bucket policy or granting them the permission.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0063__section4392141416911"><h4 class="sectiontitle">Request Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0063__screen656246211548"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
|
2
|
|
3
|
|
4
|
|
5
|
|
6</pre></div></td><td class="code"><div class="highlight"><pre><span></span>GET /?encryption HTTP/1.1
|
|
User-Agent: curl/7.29.0
|
|
Host: bucketname.obs.region.example.com
|
|
Accept: */*
|
|
Date: date
|
|
Authorization: authorization string
|
|
</pre></div>
|
|
</td></tr></table></div>
|
|
</div>
|
|
<div class="section" id="obs_04_0063__section5883101142415"><h4 class="sectiontitle">Request parameters</h4><p id="obs_04_0063__p174461242241">This request contains no parameter.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0063__section1363153342420"><h4 class="sectiontitle">Request Headers</h4><p id="obs_04_0063__p146681635112411">This request uses common headers. For details, see <a href="obs_04_0007.html#obs_04_0007__table25197309">Table 3</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0063__section7215381270"><h4 class="sectiontitle">Request Elements</h4><p id="obs_04_0063__p13726103911272">This request involves no elements.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0063__section126840198427"><h4 class="sectiontitle">Response Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0063__screen1351602445911"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
|
2
|
|
3
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
|
11
|
|
12
|
|
13
|
|
14
|
|
15
|
|
16
|
|
17</pre></div></td><td class="code"><div class="highlight"><pre><span></span>HTTP/1.1 status_code
|
|
x-obs-request-id: request id
|
|
x-obs-id-2: id
|
|
Content-Type: application/xml
|
|
Content-Length: length
|
|
Date: date
|
|
|
|
<span class="cp"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span>
|
|
<span class="nt"><ServerSideEncryptionConfiguration</span> <span class="na">xmlns=</span><span class="s">"http://obs.region.example.com/doc/2015-06-30/"</span><span class="nt">></span>
|
|
<span class="nt"><Rule></span>
|
|
<span class="nt"><ApplyServerSideEncryptionByDefault></span>
|
|
<span class="nt"><SSEAlgorithm></span>kms<span class="nt"></SSEAlgorithm></span>
|
|
<span class="nt"><KMSMasterKeyID></span>kmskeyid-value<span class="nt"></KMSMasterKeyID></span>
|
|
<span class="nt"><ProjectID></span>projectid<span class="nt"></ProjectID></span>
|
|
<span class="nt"></ApplyServerSideEncryptionByDefault></span>
|
|
<span class="nt"></Rule></span>
|
|
<span class="nt"></ServerSideEncryptionConfiguration></span>
|
|
</pre></div>
|
|
</td></tr></table></div>
|
|
</div>
|
|
<div class="section" id="obs_04_0063__section1111516502421"><h4 class="sectiontitle">Response Headers</h4><p class="msonormal" id="obs_04_0063__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_0063__section1684610713438"><h4 class="sectiontitle">Response Elements</h4><p id="obs_04_0063__p128781711134314">This response contains the following elements to detail bucket encryption configuration:</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0063__table1181123018399" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Configuration elements of bucket encryption</caption><thead align="left"><tr id="obs_04_0063__row2018917307393"><th align="left" class="cellrowborder" valign="top" width="39.35%" id="mcps1.3.8.3.2.3.1.1"><p id="obs_04_0063__p19190143043913">Header</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60.650000000000006%" id="mcps1.3.8.3.2.3.1.2"><p id="obs_04_0063__p019273012397">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0063__row7197230193913"><td class="cellrowborder" valign="top" width="39.35%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0063__p125361017184212">ServerSideEncryptionConfiguration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.650000000000006%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0063__p6536111718422">Root element of the default encryption configuration of a bucket.</p>
|
|
<p id="obs_04_0063__p85368172423">Type: element</p>
|
|
<p id="obs_04_0063__p125365178429">Ancestor: none</p>
|
|
<p id="obs_04_0063__p1555484273118">Children: Rule</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0063__row12641636422"><td class="cellrowborder" valign="top" width="39.35%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0063__p3911152616425">Rule</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.650000000000006%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0063__p591252604217">Sub-element of the default encryption configuration of a bucket.</p>
|
|
<p id="obs_04_0063__p391202634216">Type: element</p>
|
|
<p id="obs_04_0063__p4912142604210">Ancestor: ServerSideEncryptionConfiguration</p>
|
|
<p id="obs_04_0063__p83382043312">Children: ApplyServerSideEncryptionByDefault</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0063__row944320444211"><td class="cellrowborder" valign="top" width="39.35%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0063__p163325395428">ApplyServerSideEncryptionByDefault</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.650000000000006%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0063__p8333639114218">Sub-element of the default encryption configuration of a bucket.</p>
|
|
<p id="obs_04_0063__p1233323919429">Type: element</p>
|
|
<p id="obs_04_0063__p0333163974214">Ancestor: Rule</p>
|
|
<p id="obs_04_0063__p2559123813510">Children: SSEAlgorithm, KMSMasterKeyID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0063__row1314615104218"><td class="cellrowborder" valign="top" width="39.35%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0063__p11495174818425">SSEAlgorithm</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.650000000000006%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0063__p74952488427">The server-side encryption algorithm used for encryption configuration of a bucket.</p>
|
|
<p id="obs_04_0063__p1543373514489">Type: string</p>
|
|
<p id="obs_04_0063__p1349514814423">Valid values: <strong id="obs_04_0063__b7731144973819">kms</strong></p>
|
|
<p id="obs_04_0063__p1089135793715">Ancestor: ApplyServerSideEncryptionByDefault</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0063__row13866105154213"><td class="cellrowborder" valign="top" width="39.35%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0063__p196161654134219"><span style="color:#444444;">KMSMasterKeyID</span></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.650000000000006%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0063__p19616854174215">ID of the customer master key (CMK) used for SSE-KMS.</p>
|
|
<p id="obs_04_0063__p7616135414424">Type: string</p>
|
|
<p id="obs_04_0063__p2616105415423">Ancestor: ApplyServerSideEncryptionByDefault</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0063__row1588165219426"><td class="cellrowborder" valign="top" width="39.35%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0063__p11881252154211">ProjectID</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.650000000000006%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0063__p1088752184212">ID of the project to which the KMS master key belongs in the SSE-KMS mode.</p>
|
|
<p id="obs_04_0063__p1251114204310">Type: string</p>
|
|
<p id="obs_04_0063__p9167154814430">Ancestor: ApplyServerSideEncryptionByDefault</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0063__section1821915316431"><h4 class="sectiontitle">Error Responses</h4><p id="obs_04_0063__p2866601656">In addition common error codes, this API also returns other error codes. The following table lists common errors and possible causes. For details, see <a href="#obs_04_0063__table1488314173514">Table 2</a>.</p>
|
|
|
|
<div class="tablenoborder"><a name="obs_04_0063__table1488314173514"></a><a name="table1488314173514"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0063__table1488314173514" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Error codes related to getting bucket encryption configuration</caption><thead align="left"><tr id="obs_04_0063__row6181181352"><th align="left" class="cellrowborder" valign="top" width="33.67000000000001%" id="mcps1.3.9.3.2.4.1.1"><p id="obs_04_0063__p11810181514">Error Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="45.63%" id="mcps1.3.9.3.2.4.1.2"><p id="obs_04_0063__p618131810511">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20.700000000000003%" id="mcps1.3.9.3.2.4.1.3"><p id="obs_04_0063__p18190181851">HTTP Status Code</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0063__row1719418653"><td class="cellrowborder" valign="top" width="33.67000000000001%" headers="mcps1.3.9.3.2.4.1.1 "><p id="obs_04_0063__p35545542212">NoSuchEncryptionConfiguration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.63%" headers="mcps1.3.9.3.2.4.1.2 "><p id="obs_04_0063__p14197185516">The specified bucket does not have any encryption configurations</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.700000000000003%" headers="mcps1.3.9.3.2.4.1.3 "><p id="obs_04_0063__p21916186514">404 Not Found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0063__section521982018473"><h4 class="sectiontitle">Sample Request</h4><div class="codecoloring" codetype="Xml" id="obs_04_0063__screen8484163863919"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
|
2
|
|
3
|
|
4
|
|
5
|
|
6</pre></div></td><td class="code"><div class="highlight"><pre><span></span>GET /?encryption HTTP/1.1
|
|
User-Agent: curl/7.29.0
|
|
Host: examplebucket.obs.region.example.com
|
|
Accept: */*
|
|
Date: Thu, 21 Feb 2019 03:05:34 GMT
|
|
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:DpSAlmLX/BTdjxU5HOEwflhM0WI=
|
|
</pre></div>
|
|
</td></tr></table></div>
|
|
</div>
|
|
<div class="section" id="obs_04_0063__section76081155815"><h4 class="sectiontitle">Sample Response</h4><div class="codecoloring" codetype="Xml" id="obs_04_0063__screen8485113814"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
|
2
|
|
3
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
|
11
|
|
12
|
|
13
|
|
14
|
|
15
|
|
16</pre></div></td><td class="code"><div class="highlight"><pre><span></span>HTTP/1.1 200 OK
|
|
Server: OBS
|
|
x-obs-request-id: BF26000001643670AC06E7B9A7767921
|
|
x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSvK6z8HV6nrJh49gsB5vqzpgtohkiFm
|
|
Date: Thu, 21 Feb 2019 03:05:34 GMT
|
|
Content-Length: 788
|
|
|
|
<span class="cp"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span>
|
|
<span class="nt"><ServerSideEncryptionConfiguration</span> <span class="na">xmlns=</span><span class="s">"http://obs.region.example.com/doc/2015-06-30/"</span><span class="nt">></span>
|
|
<span class="nt"><Rule></span>
|
|
<span class="nt"><ApplyServerSideEncryptionByDefault></span>
|
|
<span class="nt"><SSEAlgorithm></span>kms<span class="nt"></SSEAlgorithm></span>
|
|
<span class="nt"><KMSMasterKeyID></span>4f1cd4de-ab64-4807-920a-47fc42e7f0d0<span class="nt"></KMSMasterKeyID></span>
|
|
<span class="nt"></ApplyServerSideEncryptionByDefault></span>
|
|
<span class="nt"></Rule></span>
|
|
<span class="nt"></ServerSideEncryptionConfiguration></span>
|
|
</pre></div>
|
|
</td></tr></table></div>
|
|
</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>
|
|
|