You can call this operation to query the regions where Message Queue for Apache RocketMQ is supported.

When you use the SDK to gain access to a Message Queue for Apache RocketMQ instance and perform management operations on the instance, you need to sequentially specify the information about two regions. You can obtain the information about the second region by calling the OnsRegionList operation. The following describes the scenario:

  • Connect your application to a Message Queue for Apache RocketMQ instance: Select the nearest API gateway endpoint based on the region where your application is deployed and enter the region ID. The region ID is used to gain access to the Alibaba Cloud API gateway because Message Queue for Apache RocketMQ instances provide API services through the Alibaba Cloud OpenAPI platform, which is also called POP.
  • Connect a region to perform management operations: Specify a region where you want to operate Message Queue for Apache RocketMQ resources and enter the region ID. You can query the region ID by calling the OnsRegionList operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes OnsRegionList

The operation that you want to perform. Set the value to OnsRegionList.

Response parameters

Parameter Type Example Description
Data Array

The returned query results.

RegionDo
OnsRegionId String cn-hangzhou

The ID of the region.

RegionName String China (Hangzhou)

The name of the region.

RequestId String 72D14A84-45E5-4E01-A6DB-F63C4721A046

The ID of the request. This is a common parameter.

Examples

Sample requests

http(s)://[Endpoint]/? Action=OnsRegionList
&<Common request parameters>

Sample success responses

XML format

<OnsRegionListResponse>
<Data>
    <RegionDo>
        <RegionName>Internet</RegionName>
        <OnsRegionId>mq-internet-access</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>China (Qingdao)</RegionName>
        <OnsRegionId>cn-qingdao</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>China (Shenzhen)</RegionName>
        <OnsRegionId>cn-shenzhen</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>China (Hangzhou)</RegionName>
        <OnsRegionId>cn-hangzhou</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>China (Beijing)</RegionName>
        <OnsRegionId>cn-beijing</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>China (Shanghai)</RegionName>
        <OnsRegionId>cn-shanghai</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>China (Chengdu)</RegionName>
        <OnsRegionId>cn-chengdu</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>China (Zhangjiakou-Beijing Winter Olympics)</RegionName>
        <OnsRegionId>cn-zhangjiakou</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>China (Hohhot)</RegionName>
        <OnsRegionId>cn-huhehaote</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>China (Hong Kong)</RegionName>
        <OnsRegionId>cn-hongkong</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>Singapore (Singapore)</RegionName>
        <OnsRegionId>ap-southeast-1</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>Japan (Tokyo)</RegionName>
        <OnsRegionId>ap-northeast-1</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>Malaysia (Kuala Lumpur)</RegionName>
        <OnsRegionId>ap-southeast-3</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>India (Mumbai)</RegionName>
        <OnsRegionId>ap-south-1</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>UAE (Dubai)</RegionName>
        <OnsRegionId>me-east-1</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>Germany (Frankfurt)</RegionName>
        <OnsRegionId>eu-central-1</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>US (Silicon Valley)</RegionName>
        <OnsRegionId>us-west-1</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>US (Virginia)</RegionName>
        <OnsRegionId>us-east-1</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>Australia (Sydney)</RegionName>
        <OnsRegionId>ap-southeast-2</OnsRegionId>
    </RegionDo>
    <RegionDo>
        <RegionName>UK (London)</RegionName>
        <OnsRegionId>eu-west-1</OnsRegionId>
    </RegionDo>
</Data>
<RequestId>72D14A84-45E5-4E01-A6DB-F63C4721A046</RequestId>
<OnsRegionListResponse>

JSON format

{
	"Data": {
		"RegionDo": [
			{
				"RegionName": "Internet",
				"OnsRegionId": "mq-internet-access"
			},
			{
				"RegionName": "China (Qingdao)",
				"OnsRegionId": "cn-qingdao"
			},
			{
				"RegionName": "China (Shenzhen)",
				"OnsRegionId": "cn-shenzhen"
			},
			{
				"RegionName": "China (Hangzhou)",
				"OnsRegionId": "cn-hangzhou"
			},
			{
				"RegionName": "China (Beijing)",
				"OnsRegionId": "cn-beijing"
			},
			{
				"RegionName": "China (Shanghai)",
				"OnsRegionId": "cn-shanghai"
			},
			{
				"RegionName": "China (Chengdu)",
				"OnsRegionId": "cn-chengdu"
			},
			{
				"RegionName": "China (Zhangjiakou-Beijing Winter Olympics)",
				"OnsRegionId": "cn-zhangjiakou"
			},
			{
				"RegionName": "China (Hohhot)",
				"OnsRegionId": "cn-huhehaote"
			},
			{
				"RegionName": "China (Hong Kong)",
				"OnsRegionId": "cn-hongkong"
			},
			{
				"RegionName": "Singapore (Singapore)",
				"OnsRegionId": "ap-southeast-1"
			},
			{
				"RegionName": "Japan (Tokyo)",
				"OnsRegionId": "ap-northeast-1"
			},
			{
				"RegionName": "Malaysia (Kuala Lumpur)",
				"OnsRegionId": "ap-southeast-3"
			},
			{
				"RegionName": "India (Mumbai)",
				"OnsRegionId": "ap-south-1"
			},
			{
				"RegionName": "UAE (Dubai)",
				"OnsRegionId": "me-east-1"
			},
			{
				"RegionName": "Germany (Frankfurt)",
				"OnsRegionId": "eu-central-1"
			},
			{
				"RegionName": "US (Silicon Valley)",
				"OnsRegionId": "us-west-1"
			},
			{
				"RegionName": "US (Virginia)",
				"OnsRegionId": "us-east-1"
			},
			{
				"RegionName": "Australia (Sydney)",
				"OnsRegionId": "ap-southeast-2"
			},
			{
				"RegionName": "UK (London)",
				"OnsRegionId": "eu-west-1"
			}
		]
	},
	"RequestId": "72D14A84-45E5-4E01-A6DB-F63C4721A046"
}

Error codes

For a list of error codes, visit the API Error Center.