GetBucketACL
更新时间 2026-04-10 20:09:06
最近更新时间: 2026-04-10 20:09:06
功能说明
GetBucketACL接口用于获取桶的访问控制列表。
注意事项
该操作需要READ_ACP权限。需要注意的是,如果设置桶的ACL时以邮箱类型设置,返回结果中将会以对应被授权用户的ID形式出现,即Type不会是AmazonCustomerByEmail,而是CanonicalUser,这种情况会将邮箱信息一并返回。
请求消息样式
GET /{Bucket}?acl HTTP/1.1
Host: xxx.zos.ctyun.cn
x-amz-date: Date
x-amz-content-sha256: Content-SHA256
Authorization: Auth String请求消息参数
| 参数名称 | 参数描述 | 类型 | 是否必须 |
|---|---|---|---|
| Bucket | 参数解释: 桶的名称。 | String | 是 |
请求消息头
该请求使用公共的请求消息头,请参见如何调用API-构造请求-请求消息头。
请求消息元素
该请求消息中不带消息元素。
响应消息样式
HTTP/1.1 Status Code
x-amz-request-id: Request Id
Content-Type: ContentType
Content-Length: ContentLength
Date: Date
Connection: Keep-Alive
<?xml version="1.0" encoding="UTF-8"?>
<AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Owner>
<ID>string</ID>
<DisplayName>string</DisplayName>
</Owner>
<AccessControlList>
<Grant>
<Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type=string>
<ID>string</ID>
<DisplayName>string</DisplayName>
<EmailAddress>string</EmailAddress>
<URI>string</URI>
</Grantee>
<Permission>string</Permission>
</Grant>
</AccessControlList>
</AccessControlPolicy>响应消息头
该请求的响应消息使用公共的响应消息头,请参见如何调用API-响应结果-响应消息头。
响应消息元素
| 参数名称 | 参数描述 | 类型 |
|---|---|---|
| AccessControlPolicy | 参数解释: 授权信息的根标签。 | Container |
表AccessControlPolicy
| 参数名称 | 参数描述 | 类型 |
|---|---|---|
| Owner | 参数解释: 桶的所有者。 | Container |
| AccessControlList | 参数解释: 授权列表。 | Container |
表Owner
| 参数名称 | 参数描述 | 类型 |
|---|---|---|
| ID | 参数解释: 桶所有者的uid。 | String |
| DisplayName | 参数解释: 桶所有者的展示名称。 | String |
表AccessControlList
| 参数名称 | 参数描述 | 类型 |
|---|---|---|
| Grant | 参数解释: 授权信息。 | Container |
表Grant
| 参数名称 | 参数描述 | 类型 |
|---|---|---|
| Grantee | 参数解释: 授权主体。 | Container |
| Permission | 参数解释: 取值范围: FULL_CONTROL、WRITE、WRITE_ACP、READ、READ_ACP | String |
表Grantee
| 参数名称 | 参数描述 | 类型 |
|---|---|---|
| ID | 参数解释: 被授权用户的UID。 | String |
| xsi:type | 参数解释: 被授权用户类型。 | String |
| URI | 参数解释: 被授权组URI。 | String |
错误码
请参见调用前必知-错误码-全局错误码。