Get Bucket Location
更新时间 2025-10-10 15:40:14
最近更新时间: 2025-10-10 15:40:14
本节主要介绍GET Bucket Location。
此操作用来获取Bucket的索引位置和数据位置,只有根用户和拥有GET Bucket location权限的子用户才能执行此操作。
注意
香港节点不支持此接口。
请求语法
GET /?location HTTP/1.1
Host: BucketName.oos-cn.ctyunapi.cn
Date: date
Authorization: SignatureValue请求参数
| 名称 | 描述 | 是否必须 |
|---|---|---|
| BucketName | 存储桶名称。 | 是 |
响应结果
| 名称 | 描述 |
|---|---|
| BucketConfiguration | 设置Bucket索引位置和数据位置的容器。 类型:容器。 子节点:MetadataLocationConstraint、DataLocationConstraint。 |
| MetadataLocationConstraint | 设置Bucket的索引位置。 类型:容器。 父节点:CreateBucketConfiguration。 子节点:Location。 |
| DataLocationConstraint | 设置Bucket的数据位置。 类型:容器。 父节点:CreateBucketConfiguration。 子节点:Type、LocationList、ScheduleStrategy。 |
| Type | 数据位置的类型。 类型:枚举。 取值:
默认Local。 父节点:DataLocationConstraint。 |
| LocationList | 指定的数据位置。 类型:容器。 父节点:DataLocationConstraint。 子节点:Location。 |
| Location | 索引位置或数据位置。 类型:字符串。 取值:
父节点:MetadataLocationConstraint或LocationList。 |
| ScheduleStrategy | 指定数据时的调度策略 类型:枚举 取值:
父节点:DataLocationConstraint |
请求示例
获取一个名叫docs的Bucket的数据位置和索引位置:
GET /?location HTTP/1.1
Host: docs.oos-cn.ctyunapi.cn
Content-Type: application/xml;charset=utf-8
Date: Mon, 03 Sep 2012 12:00:00 GMT
Authorization: SignatureValue响应示例
HTTP/1.1 200 OK
x-amz-request-id: b9e8da1354774e89d14437463b484a500f111b0507090b0d0f
Date: Mon, 03 Sep 2012 12:00:00 GMT
Content-Type: application/xml;charset=utf-8
Content-Length: 200
Server: CTYUN
<BucketConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<MetadataLocationConstraint>
<Location>WuHu</Location>
</MetadataLocationConstraint>
<DataLocationConstraint>
<Type>Local</Type>
</DataLocationConstraint>
</BucketConfiguration>