更新时间:2024-01-02 GMT+08:00
获取桶ACL
功能介绍
用户执行获取桶ACL的操作,返回信息包含指定桶的权限控制列表信息。用户必须拥有对指定桶READ_ACP的权限或FULL_CONTROL权限,才能执行获取桶ACL的操作。
请求消息样式
1 2 3 4 |
GET /?acl HTTP/1.1
Host: bucketname.obs.region.example.com
Date: date
Authorization: authorization
|
请求消息参数
该请求消息中不使用消息参数。
请求消息头
该请求使用公共消息头,具体参见表3。
请求消息元素
该请求消息中不使用消息元素。
响应消息样式
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
HTTP/1.1 status_code
Date: date
Content-Length: length
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AccessControlPolicy xmlns="http://obs.region.example.com/doc/2015-06-30/">
<Owner>
<ID>id</ID>
</Owner>
<AccessControlList>
<Grant>
<Grantee>
<ID>id</ID>
</Grantee>
<Permission>permission</Permission>
<Delivered>false</Delivered>
</Grant>
</AccessControlList>
</AccessControlPolicy>
|
响应消息头
该请求的响应消息使用公共消息头,具体请参考表1。
响应消息元素
该请求的响应中以消息元素的形式返回桶的ACL信息,元素的具体意义如表1所示。
错误响应消息
无特殊错误,所有错误已经包含在表2中。
请求示例
1 2 3 4 5 6 |
GET /?acl HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.region.example.com
Accept: */*
Date: WED, 01 Jul 2015 02:39:28 GMT
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:X7HtzGsIEkzJbd8vo1DRu30vVrs=
|
响应示例
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
HTTP/1.1 200 OK
Server: OBS
x-obs-request-id: BF260000016436B69D82F14E93528658
x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSjTh8661+HF5y8uAnTOBIpNO133hji+
Content-Type: application/xml
Date: WED, 01 Jul 2015 02:39:28 GMT
Content-Length: 784
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AccessControlPolicy xmlns="http://obs.example.com/doc/2015-06-30/">
<Owner>
<ID>b4bf1b36d9ca43d984fbcb9491b6fce9</ID>
</Owner>
<AccessControlList>
<Grant>
<Grantee>
<ID>b4bf1b36d9ca43d984fbcb9491b6fce9</ID>
</Grantee>
<Permission>FULL_CONTROL</Permission>
</Grant>
<Grant>
<Grantee>
<ID>783fc6652cf246c096ea836694f71855</ID>
</Grantee>
<Permission>READ</Permission>
<Delivered>false</Delivered>
</Grant>
<Grant>
<Grantee>
<Canned>Everyone</Canned>
</Grantee>
<Permission>READ_ACP</Permission>
</Grant>
</AccessControlList>
</AccessControlPolicy>
|
父主题: 桶的高级配置