The GET Bucket location API is used to obtain the location information of the Bucket. The GET operation uses the location sub-resource to return the location of the Bucket. Only the Bucket holder has the operation permission of the API.
GET /?location HTTP/1.1 Host: <Bucketname-APPID>.cos.<Region>.myqcloud.com Date: GMT Date Authorization: Auth String
Authorization: Auth String (see Request Signature for details)
GET /?location HTTP/1.1
The API accepts
The implementation of this request operation uses the common request header. For details on the common request header, see the Common Request Header.
The request operation has no special request header information.
The request request body is empty.
The response uses a common response header. For a detailed description of the public response header, see the Common Response Header section.
The request operation has no special response header information.
The response body is empty if the upload is successful.
"1.0" encoding="UTF-8" xml version=<LocationConstraint>string</LocationConstraint>
The specific data is described as follows:
|Node Name||Parent Node||Description||Type||Required|
|LocationConstraint||None||Describes the location of the bucket. For the enumerated values, see Availability Zones documents, such as: ap-beijing, ap-hongkong, eu- Frankfurt et al||String||Yes|
|Error Code||Description||HTTP Status Code|
|SignatureDoesNotMatch||Does not match the rule||403 Forbidden|
|NoSuchBucket||The Bucket does not exist||404 Not Found|
GET /?location HTTP/1.1 Host: arlenhuangtestsgnoversion-1251668577.cos.ap-beijing.myqcloud.com Date: Wed, 18 Oct 2014 22:32:00 GMT Authorization: q-sign-algorithm = sha1 & q-ak = AKIDWtTCBYjM5OwLB9CAwA1Qb2ThTSUjfGFO & q-sign-time = 1484817522; 32557713522 & q-key-time = 1484817522; 32557713522 & q-header-list = host & q-url-param-list = location & q-signature = ceb96fc929663dd4d2e6dc0aeb304cdde6761ed
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: 92 Connection: keep-alive Date: Wed, 18 Oct 2014 22:32:00 GMT Server: tencent-cos X-cos-request-id: NTg4MDg0NzlfNDYyMDRlXzM0OWFfZjFk <LocationConstraint>cos.ap-beijing</LocationConstraint