Get Bucket Info操作用于查看bucket的相关信息。 包括如下内容:
GET /?bucketInfo HTTP/1.1
Host: BucketName.oss.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue
名称 | 描述 | |
BucketInfo | 保存Bucket信息内容的容器 类型:容器 子节点:Bucket节点 父节点:无 | |
Bucket | 保存Bucket具体信息的容器 类型:容器 父节点:BucketInfo节点 | |
CreationDate | Bucket创建时间。时间格式 2013-07-31T10:56:21.000Z 类型:时间父节点:BucketInfo.Bucket | |
ExtranetEndpoint | Bucket访问的外网域名 类型:字符串父节点:BucketInfo.Bucket | |
IntranetEndpoint | 同区域ECS访问Bucket的内网域名类型:字符串父节点:BucketInfo.Bucket | |
Location | Bucket所在数据中心的区域 类型:字符串父节点:BucketInfo.Bucket | |
Name | Bucket名字类型:字符串父节点:BucketInfo.Bucket | |
Owner | 用于存放Bucket拥有者信息的容器。类型:容器父节点:BucketInfo.Bucket | |
ID | Bucket拥有者的用户ID。类型:字符串父节点:BucketInfo.Bucket.Owner | |
DisplayName | Bucket拥有者的名称 (目前和ID一致)。类型:字符串父节点:BucketInfo.Bucket.Owner | |
AccessControlList | 存储ACL信息的容器类型:容器父节点:BucketInfo.Bucket | |
Grant | Bucket的ACL权限。类型:枚举字符串有效值:private、public-read、public-read-write父节点:BucketInfo.Bucket.AccessControlList |
Get /?bucketInfo HTTP/1.1
Host: oss-example.oss.aliyuncs.com
Date: Sat, 12 Sep 2015 07:51:28 GMT
Authorization: OSS qn6qrrqxo2oawuk53otfj byc: BuG4rRK+zNhH1AcF51NNHD39zXw=
HTTP/1.1 200
x-oss-request-id: 534B371674E88A4D8906008B
Date: Sat, 12 Sep 2015 07:51:28 GMT
Connection: keep-alive
Content-Length: 531
Server: AliyunOSS
<?xml version="1.0" encoding="UTF-8"?>
<BucketInfo>
<Bucket>
<CreationDate>2013-07-31T10:56:21.000Z</CreationDate>
<ExtranetEndpoint>oss-cn-hangzhou.aliyuncs.com</ExtranetEndpoint>
<IntranetEndpoint>oss-cn-hangzhou-internal.aliyuncs.com</IntranetEndpoint>
<Location>oss-cn-hangzhou</Location>
<Name>oss-example</Name>
<Owner>
<DisplayName>username</DisplayName>
<ID>271834739143143</ID>
</Owner>
<AccessControlList>
<Grant>private</Grant>
</AccessControlList>
</Bucket>
</BucketInfo>
HTTP/1.1 404
x-oss-request-id: 534B371674E88A4D8906009B
Date: Sat, 12 Sep 2015 07:51:28 GMT
Connection: keep-alive
Content-Length: 308
Server: AliyunOSS
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>NoSuchBucket</Code>
<Message>The specified bucket does not exist.</Message>
<RequestId>568D547F31243C673BA14274</RequestId>
<HostId>nosuchbucket.oss.aliyuncs.com</HostId>
<BucketName>nosuchbucket</BucketName>
</Error>
HTTP/1.1 403
x-oss-request-id: 534B371674E88A4D8906008C
Date: Sat, 12 Sep 2015 07:51:28 GMT
Connection: keep-alive
Content-Length: 209
Server: AliyunOSS
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>AccessDenied</Code>
<Message>AccessDenied</Message>
<RequestId>568D5566F2D0F89F5C0EB66E</RequestId>
<HostId>test.oss.aliyuncs.com</HostId>
</Error>
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。