DescribeRegions
Queries public, internal, and acceleration endpoints for all or a specified OSS region.
Usage notes
-
Querying region endpoints requires the
oss:DescribeRegionspermission. For more information, see Grant a custom policy. -
DescribeRegions requests support only second-level domains, such as oss-cn-hangzhou.aliyuncs.com.
Request syntax
-
Query the endpoints of all supported regions
GET /?regions HTTP/1.1 Host: oss.example.com Date: GMT Date Authorization: SignatureValue -
Query the endpoints of a specific region
NoteSpecify the region using its OSS region ID from Regions and OSS endpoints in the public cloud.
GET /?regions=oss-cn-hangzhou HTTP/1.1 Host: oss.example.com Date: GMT Date Authorization: SignatureValue
Request headers
DescribeRegions uses only common request headers. For more information, see Common request headers.
Response headers
The response contains only common response headers. For more information, see Common response headers.
Response elements
|
Element |
Type |
Example |
Description |
|
RegionInfoList |
Container |
N/A |
List of regions. Child nodes: RegionInfo Parent nodes: none |
|
RegionInfo |
Container |
N/A |
Region details. Child nodes: Region, InternetEndpoint, InternalEndpoint, and AccelerateEndpoint Parent nodes: RegionInfoList |
|
Region |
String |
oss-cn-hangzhou |
OSS region ID. Parent nodes: RegionInfo |
|
InternetEndpoint |
String |
oss-cn-hangzhou.aliyuncs.com |
Public endpoint of the region. Parent nodes: RegionInfo |
|
InternalEndpoint |
String |
oss-cn-hangzhou-internal.aliyuncs.com |
Internal endpoint of the region. Parent nodes: RegionInfo |
|
AccelerateEndpoint |
String |
oss-accelerate.aliyuncs.com |
Acceleration endpoint. Fixed value: oss-accelerate.aliyuncs.com. Parent nodes: RegionInfo |
Examples
-
Query the endpoints of all supported regions
-
Sample request
GET /?regions HTTP/1.1 Host: oss-cn-hangzhou.aliyuncs.com Date: Fri, 20 Aug 2021 06:38:30 GMT Authorization: SignatureValue -
Sample response
HTTP/1.1 200 OK x-oss-request-id: 3a8f-2e2d-7965-3ff9-51c875b***** Date: Fri, 20 Aug 2021 06:38:30 GMT Content-Type: application/xml Content-Length: 344606 Server: AliyunOSS <?xml version="1.0" encoding="UTF-8"?> <RegionInfoList> <RegionInfo> <Region>oss-cn-hangzhou</Region> <InternetEndpoint>oss-cn-hangzhou.aliyuncs.com</InternetEndpoint> <InternalEndpoint>oss-cn-hangzhou-internal.aliyuncs.com</InternalEndpoint> <AccelerateEndpoint>oss-accelerate.aliyuncs.com</AccelerateEndpoint> </RegionInfo> <RegionInfo> <Region>oss-cn-shanghai</Region> <InternetEndpoint>oss-cn-shanghai.aliyuncs.com</InternetEndpoint> <InternalEndpoint>oss-cn-shanghai-internal.aliyuncs.com</InternalEndpoint> <AccelerateEndpoint>oss-accelerate.aliyuncs.com</AccelerateEndpoint> </RegionInfo> </RegionInfoList>
-
-
Query the endpoints of a specific region
-
Sample request
GET /?regions=oss-cn-hangzhou HTTP/1.1 Host: oss-cn-hangzhou.aliyuncs.com Date: Fri, 20 Aug 2021 06:40:30 GMT Authorization: SignatureValue -
Sample response
HTTP/1.1 200 OK x-oss-request-id: 3a8f-2e2d-7965-3ff9-51c875b***** Date: Fri, 20 Aug 2021 06:40:30 GMT Content-Type: application/xml Content-Length: 3446 Server: AliyunOSS <?xml version="1.0" encoding="UTF-8"?> <RegionInfoList> <RegionInfo> <Region>oss-cn-hangzhou</Region> <InternetEndpoint>oss-cn-hangzhou.aliyuncs.com</InternetEndpoint> <InternalEndpoint>oss-cn-hangzhou-internal.aliyuncs.com</InternalEndpoint> <AccelerateEndpoint>oss-accelerate.aliyuncs.com</AccelerateEndpoint> </RegionInfo> </RegionInfoList>
-
ossutil
For information about the ossutil command that corresponds to the DescribeRegions operation, see describe-regions.
OSS SDKs
Call DescribeRegions with the following OSS SDKs:
Error codes
|
Error code |
HTTP status code |
Description |
|
AccessDenied |
403 |
Possible causes:
|
|
InvalidArgument |
400 |
One or more specified parameters are invalid. |
|
NoSuchRegion |
404 |
The region does not exist. |