获取存储桶 ACL
功能说明
获取指定 Bucket 的 ACL 信息。
方法原型
func (s *BucketService) GetACL(ctx context.Context) (*BucketGetACLResult, *Response, error)
请求示例
v, resp, err := client.Bucket.GetACL(context.Background())
返回结果说明
type ACLXml struct {
Owner *Owner
AccessControlList []ACLGrant
}
type Owner struct {
ID string
DisplayName string
}
type ACLGrant struct {
Grantee *ACLGrantee
Permission string
}
type ACLGrantee struct {
Type string
ID string
DisplayName string
UIN string
}
参数名称 | 参数描述 | 类型 |
---|---|---|
Owner | Bucket 拥有者的信息,包括 DisplayName 和 ID | struct |
AccessControlList | Bucket 权限授予者的信息,包括 Grantee和 Permission | struct |
Grantee | 权限授予者的信息,包括 DisplayName,Type,ID 和 UIN | struct |
Type | 权限授予者的类型,类型为 CanonicalUser 或者 Group | string |
ID | Type 为 CanonicalUser 时,对应权限授予者的 ID | string |
DisplayName | 权限授予者的名字 | string |
UIN | Type 为 Group 时,对应权限授予者的 UIN | string |
Permission | 授予者所拥有的 Bucket 的权限,可选值有 FULL_CONTROL,WRITE,READ,分别对应读写权限、写权限、读权限 | string |