文档简介:
GET Bucket location
此操作用来获取Bucket的索引位置和数据位置,只有根用户和拥有GET Bucket location权限的子用户才能执行此操作。
请求语法
GET /?location HTTP/1.1 Host: BucketName.oos-cn.ctyunapi.cn Content-Length: length Date: date Authorization: signatureValue |
响应元素
名称 |
描述 |
BucketConfiguration |
设置Bucket索引位置和数据位置的容器。 类型:容器 |
MetadataLocationConstraint |
设置Bucket的索引位置。 类型:容器 父节点:CreateBucketConfiguration |
DataLocationConstraint |
设置Bucket的数据位置。 类型:容器 父节点:CreateBucketConfiguration |
Type |
数据位置的类型 类型:枚举 有效值:Local(本地) |Specified(指定位置) 默认:Local 父节点:DataLocationConstraint |
LocationList |
指定的数据位置 类型:容器 父节点:DataLocationConstraint |
Location |
索引位置或数据位置。 类型:String 有效值:
默认值:无 父节点:MetadataLocationConstraint或LocationList
|
ScheduleStrategy |
指定数据时的调度策略 类型:枚举 有效值:Allowed(允许OOS自动调度)|NotAllowed(不允许OOS自动调度) 默认:Allowed 父节点:DataLocationConstraint |
请求示例
获取一个名叫picture的bucket,索引位置为Beijing,数据位置为优先本地:
GET /?location HTTP/1.1 Host: picture.oos-cn.ctyunapi.cn Content-Length:200 Date: Mon, 03 Sep 2012 12:00:00 GMT Authorization: AWS 7799e793ce4624ee7e5a:9N/W/kmYwFhbqHYFTvQor317qVw= |
返回示例
HTTP/1.1 200 OK x-amz-request-id: 236A8905248E5A01 Date: Mon, 03Sep 2012 12:00:00 GMT Content-Length: 200 Connection: close Server: CTYUN
<BucketConfiguration xmlns="/doc/2006-03-01/"> <MetadataLocationConstraint> <Location>BeiJing</Location> </MetadataLocationConstraint> <DataLocationConstraint> <Type>Local</Type> </DataLocationConstraint> <BucketConfiguration> |