获取存储桶 ACL

功能说明

获取指定 Bucket 的 ACL 信息。

方法原型

  1. func (s *BucketService) GetACL(ctx context.Context) (*BucketGetACLResult, *Response, error)

请求示例

  1. v, resp, err := client.Bucket.GetACL(context.Background())

返回结果说明

  1. type ACLXml struct {
  2. Owner *Owner
  3. AccessControlList []ACLGrant
  4. }
  5. type Owner struct {
  6. ID string
  7. DisplayName string
  8. }
  9. type ACLGrant struct {
  10. Grantee *ACLGrantee
  11. Permission string
  12. }
  13. type ACLGrantee struct {
  14. Type string
  15. ID string
  16. DisplayName string
  17. UIN string
  18. }
参数名称参数描述类型
OwnerBucket 拥有者的信息,包括 DisplayName 和 IDstruct
AccessControlListBucket 权限授予者的信息,包括 Grantee和 Permissionstruct
Grantee权限授予者的信息,包括 DisplayName,Type,ID 和 UINstruct
Type权限授予者的类型,类型为 CanonicalUser 或者 Groupstring
IDType 为 CanonicalUser 时,对应权限授予者的 IDstring
DisplayName权限授予者的名字string
UINType 为 Group 时,对应权限授予者的 UINstring
Permission授予者所拥有的 Bucket 的权限,可选值有 FULL_CONTROL,WRITE,READ,分别对应读写权限、写权限、读权限string