Obtaining Back-to-Source by Mirroring Rules
Functions
This API is used to obtain the back-to-source by mirroring rules of a bucket if such rules have been configured. If such a rule exists, a success message is returned with status code 200. For more information about back to source by mirroring, Using Mirroring-Based Back to Source to Retrieve Data.
Authorization Information
To call this API, you must be the bucket owner or have the Tenant Administrator permission. To configure the Tenant Administrator permission, you need to use role/policy-based authorization (IAM v3 APIs in the old IAM version). For details, see Using IAM for Authorization.
Request Syntax
GET /?mirrorBackToSource HTTP/1.1 Host: bucketname.obs.region.myhuaweicloud.com Authorization: authorization Date: date
URI Parameters
This request contains no message parameters.
Request Headers
This request uses common headers. For details, see Table 3.
Request Body
This request contains no request body parameters.
Response Syntax
HTTP/1.1 status_code Server: OBS Date: date Content-Type: type Content-Length: length policy json body
Response Headers
This response uses common headers. For details, see Table 1.
Response Body
This response contains no elements.
Error Responses
No special error responses are returned. For details about error responses, see Table 2 and Table 3.
Sample Request
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
Sample Response
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"
}
}]
} References
- For more information about back to source by mirroring, see Using Back to Source by Mirroring to Retrieve Data.
- For details about the billing items involved in API operations, see Billing Items.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot