更新时间:2024-03-04 GMT+08:00
获取镜像回源规则
功能介绍
本接口用于查询指定桶的镜像回源策略。如果策略存在,则返回成功,status code返回值为200。
请求消息样式
GET /?mirrorBackToSource HTTP/1.1 Host: bucketname.obs.region.myhuaweicloud.com Authorization: authorization Date: date
请求消息参数
该请求消息中不使用消息参数。
请求消息头
该请求使用公共消息头,具体参见表3。
请求消息元素
该请求消息中不使用消息元素。
响应消息样式
HTTP/1.1 status_code Server: OBS Date: date Content-Type: type Content-Length: length policy json body
响应消息头
该请求的响应消息使用公共消息头,具体请参考表1。
响应消息元素
该请求的响应消息中不带消息元素。
请求示例
GET /?mirrorBackToSource HTTP/1.1 Host: bucketname.obs.region.myhuaweicloud.com Authorization: OBS H4IPJX0TQTHTHEBQQCEC:sc2PM13Wlfcoc/YZLK0MwsI2Zpo= Date: Tue, 21 Jul 2020 22:28:46 GMT
响应示例
HTTP/1.1 200 OK Server: OBS Date: Tue, 07 Jul 2020 07:28:46 GMT Content-Type: application/json Content-Length: 1063 { "rules": [{ "id": "abc123", "condition": { "httpErrorCodeReturnedEquals": 404, "objectKeyPrefixEquals": "video/" }, "redirect": { "agency": "agency", "publicSource": { "sourceEndpoint": { "master":["http://bucket1.xxx.yyy.com", "https://bucket2.xxx.yyy.com"], "slave": ["http://bucket3.xxx.yyy.com", "https://bucket4.xxx.yyy.com"] } }, "retryConditions": ["4XX", "5XX"], "passQueryString": true, "mirrorFollowRedirect": true, "redirectWithoutReferer": true, "mirrorHttpHeader": { "passAll": false, "pass": ["content-encoding"], "remove": ["content-type"], "set": [{ "key": "helloworld", "value": "2222" }] }, "replaceKeyWith": "prefix${key}suffix", "replaceKeyPrefixWith": "picture/", "vpcEndpointURN": "001" } }] }
父主题: 桶的高级配置