最近更新时间:2025-06-03 15:20:30
此操作可以查看桶是否开启同城冗余。该接口使用者必须为桶拥有者或具有ks3:GetBucketDataRedundancySwitch
权限。
1. 同城冗余和本地冗余类型的桶均支持调用该接口。
2. 如果桶没有开启同城冗余,调用该接口将返回:404 NotFound,NoSuchBucketDataRedundancySwitchRule
。
GET /?dataRedundancySwitch HTTP/1.1
Host: {BucketName}.{endpoint}
Date: {date}
Authorization: {SignatureValue}
该接口不使用请求参数。
该接口只使用常用请求头部。获取更多信息,请点击公共请求头。
该接口不使用请求内容。
该接口除了返回公共响应头外,还返回以下响应头:
名称 | 描述 |
---|---|
x-kss-data-redundancy-type | 有效值:
|
返回XML中的参数如下所示:
名称 | 类型 | 示例值 | 描述 |
BucketDataRedundancySwitch | 容器 | 不涉及 | 包含桶的冗余类型和同城冗余开启时间的容器
|
DataRedundancyType | 容器 |
| 桶的冗余类型
|
SwitchTime | String | 2024-03-01T12:00:00+08:00 | 同城冗余开启的时间
|
GET /?dataRedundancySwitch HTTP/1.1
Host: example.ks3-cn-beijing.ksyuncs.com
Date: Fri, 17 Nov 2024 08:40:17 GMT
Authorization: qn6q**************:77Dv****************
HTTP/1.1 200 ok
x-ks3-request-id: 655726F18EAD9B710C00B235
Date: Fri, 17 Nov 2024 08:40:17 GMT
Content-Type: application/xml
Content-Length: 151
Server: KS3
<?xml version="1.0" encoding="UTF-8"?>
<BucketDataRedundancySwitch>
<DataRedundancyType>ZRS</DataRedundancyType>
<SwitchTime>2024-10-11T00:00:00.000Z</SwitchTime>
</BucketDataRedundancyTransition>
错误码 | HTTP状态码 | 描述 |
---|---|---|
AccessDenied | 403 Forbidden | 没有对应的权限或者签名不匹配 |
NoSuchBucket | 404 NotFound | 桶不存在 |
纯净模式