doc-exports/docs/obs/s3api/en-us_topic_0125560291.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

216 lines
14 KiB
HTML

<a name="EN-US_TOPIC_0125560291"></a><a name="EN-US_TOPIC_0125560291"></a>
<h1 class="topictitle1">GET Object acl</h1>
<div id="body50153981"><p class="msonormal" id="EN-US_TOPIC_0125560291__p30836194">You can use this operation to view the ACL of an object, as long as you have <strong id="EN-US_TOPIC_0125560291__b171706141616">READ_ACP</strong> permission for the object.</p>
<div class="section" id="EN-US_TOPIC_0125560291__section9090291"><h4 class="sectiontitle">Versioning</h4><p class="msonormal" id="EN-US_TOPIC_0125560291__p55030134">By default, the ACL of the object of the latest version is obtained. If the version ID of the object is a deletion mark, <strong id="EN-US_TOPIC_0125560291__b137466015180">404</strong> is returned. You can specify <strong id="EN-US_TOPIC_0125560291__b25509161">versionId</strong> to obtain the ACL of an object of the desired version.</p>
</div>
<div class="section" id="EN-US_TOPIC_0125560291__section51424131"><h4 class="sectiontitle">Request Syntax</h4><pre class="screen" id="EN-US_TOPIC_0125560291__screen18576074113819">GET /ObjectName?acl 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_0125560291__section60163996"><h4 class="sectiontitle">Request Parameters</h4><p id="EN-US_TOPIC_0125560291__p58066551">This request uses parameters to specify the object ACL to be obtained. <a href="#EN-US_TOPIC_0125560291__table22962068">Table 1</a> describes the parameters.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0125560291__table22962068"></a><a name="table22962068"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560291__table22962068" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameter</caption><thead align="left"><tr id="EN-US_TOPIC_0125560291__row903863"><th align="left" class="cellrowborder" valign="top" width="24.09240924092409%" id="mcps1.3.4.3.2.4.1.1"><p id="EN-US_TOPIC_0125560291__p6104091">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.164916491649166%" id="mcps1.3.4.3.2.4.1.2"><p id="EN-US_TOPIC_0125560291__p24669326">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.742674267426747%" id="mcps1.3.4.3.2.4.1.3"><p id="EN-US_TOPIC_0125560291__p52058427">Remarks</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0125560291__row55983048"><td class="cellrowborder" valign="top" width="24.09240924092409%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560291__p38333021">acl</p>
</td>
<td class="cellrowborder" valign="top" width="49.164916491649166%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560291__p17967011">Indicates that the object ACL to be obtained.</p>
<p id="EN-US_TOPIC_0125560291__p27485376">Type: String</p>
</td>
<td class="cellrowborder" valign="top" width="26.742674267426747%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560291__p11722961">Mandatory</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560291__row38397792"><td class="cellrowborder" valign="top" width="24.09240924092409%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560291__p23213480">versionId</p>
</td>
<td class="cellrowborder" valign="top" width="49.164916491649166%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560291__p1243712">Indicates the version ID of the specified object.</p>
<p id="EN-US_TOPIC_0125560291__p11193409">Type: String</p>
</td>
<td class="cellrowborder" valign="top" width="26.742674267426747%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560291__p34250965">Optional</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0125560291__section4605057"><h4 class="sectiontitle">Request Headers</h4><p id="EN-US_TOPIC_0125560291__p4456442">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_0125560291__section41445513"><h4 class="sectiontitle">Request Elements</h4><p id="EN-US_TOPIC_0125560291__p46366183">This request involves no elements.</p>
</div>
<div class="section" id="EN-US_TOPIC_0125560291__section12994411"><h4 class="sectiontitle">Response Syntax</h4><pre class="screen" id="EN-US_TOPIC_0125560291__screen20552317113845">HTTP/1.1 status_code
Server: bucketname.obs.example.com
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
Date: date
Content-Length: length
Content-Type: type
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;AccessControlPolicy xmlns="http://obs.example.com/doc/2015-06-30/"&gt;
&lt;Owner&gt;
&lt;ID&gt;id&lt;/ID&gt;
&lt;DisplayName&gt;name&lt;/DisplayName&gt;
&lt;/Owner&gt;
&lt;AccessControlList&gt;
&lt;Grant&gt;
&lt;Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"&gt;
&lt;ID&gt;id&lt;/ID&gt;
&lt;DisplayName&gt;name&lt;/DisplayName&gt;
&lt;/Grantee&gt;
&lt;Permission&gt;permission&lt;/Permission&gt;
&lt;/Grant&gt;
&lt;/AccessControlList&gt;
&lt;/AccessControlPolicy&gt;</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560291__section49840843"><h4 class="sectiontitle">Response Headers</h4><p id="EN-US_TOPIC_0125560291__p49167069">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>
<p id="EN-US_TOPIC_0125560291__p6660211">This response also uses one optional header, as described in <a href="#EN-US_TOPIC_0125560291__table14642465">Table 2</a>.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0125560291__table14642465"></a><a name="table14642465"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560291__table14642465" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Optional response header</caption><thead align="left"><tr id="EN-US_TOPIC_0125560291__row45794042"><th align="left" class="cellrowborder" valign="top" width="28.610000000000003%" id="mcps1.3.8.4.2.3.1.1"><p id="EN-US_TOPIC_0125560291__p18329947">Header</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="71.39%" id="mcps1.3.8.4.2.3.1.2"><p id="EN-US_TOPIC_0125560291__p8330777">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0125560291__row3704347"><td class="cellrowborder" valign="top" width="28.610000000000003%" headers="mcps1.3.8.4.2.3.1.1 "><p id="EN-US_TOPIC_0125560291__p31616714">x-amz-version-id</p>
</td>
<td class="cellrowborder" valign="top" width="71.39%" headers="mcps1.3.8.4.2.3.1.2 "><p id="EN-US_TOPIC_0125560291__p10817037">Indicates the version ID of the specified object.</p>
<p id="EN-US_TOPIC_0125560291__p30244474">Valid values: String</p>
<p id="EN-US_TOPIC_0125560291__p3764813">Default: None</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0125560291__section45914410"><h4 class="sectiontitle">Response Elements</h4><p id="EN-US_TOPIC_0125560291__p36514417">This response contains elements to specify the returned object ACL. <a href="#EN-US_TOPIC_0125560291__table23161487">Table 3</a> describes the elements.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0125560291__table23161487"></a><a name="table23161487"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560291__table23161487" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response elements</caption><thead align="left"><tr id="EN-US_TOPIC_0125560291__row45665679"><th align="left" class="cellrowborder" valign="top" width="28.610000000000003%" id="mcps1.3.9.3.2.3.1.1"><p id="EN-US_TOPIC_0125560291__p7932481">Element</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="71.39%" id="mcps1.3.9.3.2.3.1.2"><p id="EN-US_TOPIC_0125560291__p38551240">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0125560291__row35642764"><td class="cellrowborder" valign="top" width="28.610000000000003%" headers="mcps1.3.9.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560291__p1382772">DisplayName</p>
</td>
<td class="cellrowborder" valign="top" width="71.39%" headers="mcps1.3.9.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560291__p44895721">Indicates the user name.</p>
<p id="EN-US_TOPIC_0125560291__p1408307">Type: String</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560291__row12674770"><td class="cellrowborder" valign="top" width="28.610000000000003%" headers="mcps1.3.9.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560291__p20023448">ID</p>
</td>
<td class="cellrowborder" valign="top" width="71.39%" headers="mcps1.3.9.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560291__p11286562">DomainId of the user.</p>
<p id="EN-US_TOPIC_0125560291__p34470196">Type: String</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560291__row41796312"><td class="cellrowborder" valign="top" width="28.610000000000003%" headers="mcps1.3.9.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560291__p30058148">AccessControlList</p>
</td>
<td class="cellrowborder" valign="top" width="71.39%" headers="mcps1.3.9.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560291__p18790891">Indicates the ACL that records all users who have permission to access the bucket.</p>
<p id="EN-US_TOPIC_0125560291__p34900297">Type: XML</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560291__row45667223"><td class="cellrowborder" valign="top" width="28.610000000000003%" headers="mcps1.3.9.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560291__p8057616">Grant</p>
</td>
<td class="cellrowborder" valign="top" width="71.39%" headers="mcps1.3.9.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560291__p48687165">Container for the grantee and its permission.</p>
<p id="EN-US_TOPIC_0125560291__p35531307">Type: XML</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560291__row51346311"><td class="cellrowborder" valign="top" width="28.610000000000003%" headers="mcps1.3.9.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560291__p65410517">Grantee</p>
</td>
<td class="cellrowborder" valign="top" width="71.39%" headers="mcps1.3.9.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560291__p63760528">Container for the details about the grantee.</p>
<p id="EN-US_TOPIC_0125560291__p36973841">Type: XML</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560291__row64329119"><td class="cellrowborder" valign="top" width="28.610000000000003%" headers="mcps1.3.9.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560291__p43276139">Permission</p>
</td>
<td class="cellrowborder" valign="top" width="71.39%" headers="mcps1.3.9.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560291__p15706331">Indicates the grantee's permission for an object.</p>
<p id="EN-US_TOPIC_0125560291__p7139252">Type: String</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0125560291__section10576514"><h4 class="sectiontitle">Error Responses</h4><p id="EN-US_TOPIC_0125560291__p37132488">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_0125560291__section56611863"><h4 class="sectiontitle">Sample Request</h4><pre class="screen" id="EN-US_TOPIC_0125560291__screen2486982111399">GET /test?acl HTTP/1.1
User-Agent: Jakarta Commons-HttpClient/3.1
Host: bucketname.obs.example.com
Accept: */*
Date: Mon, 27 Sep 2010 01:51:25 GMT
Authorization: AWS 04RZT432N80TGDF2Y2G2:pkRtbbpzetVSUoTralXIkRLWsCQ= </pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560291__section39744725"><h4 class="sectiontitle">Sample Response</h4><pre class="screen" id="EN-US_TOPIC_0125560291__screen66301954113929">HTTP/1.1 200 OK
Server: OBS
x-amz-request-id: 5FBCAEB7BB9A1AD0FF1285552415340
x-amz-id-2: NUZCQ0FFQjdCQjlBMUFEMEZGMTI4NTU1MjQxNTM0MEFBQUFBQUFBYmJiYmJiYmJD
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
Content-Type: application/xml
Date: Mon, 27 Sep 2010 01:53:35 GMT
Content-Length: 560
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;AccessControlPolicy xmlns="http://obs.example.com/doc/2015-06-30/"&gt;
&lt;Owner&gt;
&lt;ID&gt;bcaf1ffd86f41caff1a493dc2ad8c2c281e37522a640e161ca5fb16fd081034f&lt;/ID&gt;
&lt;DisplayName&gt;apple&lt;/DisplayName&gt;
&lt;/Owner&gt;
&lt;AccessControlList&gt;
&lt;Grant&gt;
&lt;Grantee xmlns:xsi="http:// www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"&gt; &lt;ID&gt;bcaf1ffd86f41caff1a493dc2ad8c2c281e37522a640e161ca5fb16fd081034f&lt;/ID&gt;
&lt;DisplayName&gt;apple&lt;/DisplayName&gt;
&lt;/Grantee&gt;
&lt;Permission&gt;FULL_CONTROL&lt;/Permission&gt;
&lt;/Grant&gt;
&lt;/AccessControlList&gt;
&lt;/AccessControlPolicy&gt;</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560291__section65206156"><h4 class="sectiontitle">Sample Request (Getting the ACL of an Object with Version ID Specified)</h4><pre class="screen" id="EN-US_TOPIC_0125560291__screen27272856113939">GET /object?acl&amp;versionId=AAABQ4-glIvc0vycq3gAAAAVVURTRkha HTTP/1.1
User-Agent: Jakarta Commons-HttpClient/3.1
Host: bucketname.obs.example.com
Accept: */*
Date: Tue, 14 Jan 2014 07:32:21 +0000
Authorization: AWS C9590CEB8EC051BDEC9D:IsCyQSOY8rbyp8E6W/ftU6GFcGg= </pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560291__section49984495"><h4 class="sectiontitle">Sample Response (Getting the ACL of an Object with Version ID Specified)</h4><pre class="screen" id="EN-US_TOPIC_0125560291__screen46985189144627">HTTP/1.1 200 OK
Server: OBS
x-amz-request-id: DCD2FC9CAB78000001438FAA5667BFF4
x-amz-id-2: 5R2cHP9X7aa+ukdrBQEVgW688/0yEpB+0wgUE7J3QdBLAi9NmHAfeCudmlwgxhk4
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
Content-Type: application/xml
x-amz-version-id: AAABQ4-glIvc0vycq3gAAAAVVURTRkha
Date: Tue, 14 Jan 2014 07:32:21 GMT
Content-Length: 494
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;AccessControlPolicy xmlns="http://obs.example.com/doc/2015-06-30/"&gt;
&lt;Owner&gt;
&lt;ID&gt;DCD2FC9CAB78000001438EC051BD0002&lt;/ID&gt;
&lt;DisplayName&gt;user&lt;/DisplayName&gt;
&lt;/Owner&gt;
&lt;AccessControlList&gt;
&lt;Grant&gt;
&lt;Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"&gt;
&lt;ID&gt;DCD2FC9CAB78000001438EC051BD0002&lt;/ID&gt;
&lt;DisplayName&gt;user&lt;/DisplayName&gt;
&lt;/Grantee&gt;
&lt;Permission&gt;FULL_CONTROL&lt;/Permission&gt;
&lt;/Grant&gt;
&lt;/AccessControlList&gt;
&lt;/AccessControlPolicy&gt;</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0125560489.html">Operations on Objects</a></div>
</div>
</div>