Queries basic information about a Message Queue for Apache RocketMQ instance and its endpoints for publishing and subscribing to messages.
Usage notes
To publish and subscribe to messages, a client must be connected to a Message Queue for Apache RocketMQ instance by using an endpoint. You can call this operation to query the endpoints of the instance.
Request limits
You can call this operation up to 50 times per second with each Alibaba Cloud account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see Request limits.
Authorization
By default, only Alibaba Cloud accounts can call this operation. A Resource Access Management (RAM) user can call this operation only after the RAM user is granted the required permissions. The following table describes the permissions that must be granted to a RAM user to call this operation. For information about how to grant permissions, see Policies and examples.
API |
Action |
Resource |
---|---|---|
OnsInstanceBaseInfo |
mq:QueryInstanceBaseInfo |
acs:mq:*:*:{instanceId} |
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | OnsInstanceBaseInfo |
The operation that you want to perform. Set the value to OnsInstanceBaseInfo. |
InstanceId | String | Yes | MQ_INST_138015630679****_BAAy1Hac |
The ID of the instance that you want to query. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
InstanceBaseInfo | Object |
The information about the instance. |
|
Endpoints | Object |
The endpoints that correspond to different protocols. |
|
TcpEndpoint | String | http://MQ_INST_138015630679****_BAAy1Hac.cn-chengdu.mq-internal.aliyuncs.com:8080 |
The private TCP endpoint of the instance. |
TcpInternetEndpoint | String | http://MQ_INST_138015630679****_BAAy1Hac.mq.cn-chengdu.aliyuncs.com:80 |
The public TCP endpoint of the instance.
|
HttpInternetEndpoint | String | http://138015630679****.mqrest.cn-chengdu.aliyuncs.com |
The public HTTP endpoint of the instance. |
HttpInternalEndpoint | String | http://138015630679****.mqrest.cn-chengdu-internal.aliyuncs.com |
The private HTTP endpoint of the instance. |
HttpInternetSecureEndpoint | String | https://138015630679****.mqrest.cn-chengdu.aliyuncs.com |
The public HTTPS endpoint of the instance. |
IndependentNaming | Boolean | true |
Indicates whether a namespace is configured for the instance. Valid values:
|
MaxTps | Long | 10000 |
The maximum transactions per second (TPS) for publishing and subscribing to messages. Valid values: 5000, 10000, 20000, 50000, 100000, 200000, 300000, 500000, 800000, and 1000000. For more information, see the description on the buy page. Note This parameter is available only for Message Queue for Apache RocketMQ instances of
the Enterprise Platinum Edition.
|
Remark | String | onspre-cn-m7r1r5f**** |
The description of the instance. |
InstanceName | String | test |
The name of the instance. The name must be 3 to 64 characters in length and can contain letters, digits, hyphens (-), and underscores (_). |
ReleaseTime | Long | 1603555200000 |
The point in time when the Enterprise Platinum Edition instance expires. |
TopicCapacity | Integer | 50 |
The maximum number of topics that can be created on the instance. Valid values: 25, 50, 100, 300, and 500. Note This parameter is available only for Message Queue for Apache RocketMQ instances of
the Enterprise Platinum Edition.
|
InstanceStatus | Integer | 5 |
The status of the instance. Valid values:
|
InstanceId | String | MQ_INST_138015630679****_BAAy1Hac |
The ID of the instance. |
InstanceType | Integer | 2 |
The edition of the instance. Valid values:
For information about the instance editions and specifications of Message Queue for Apache RocketMQ, see Instance editions. |
RequestId | String | 6CC46974-65E8-4C20-AB07-D20D102E**** |
The ID of the request. The system generates a unique ID for each request. You can troubleshoot issues based on the request ID. |
Examples
Sample requests
http(s)://ons.cn-chengdu.aliyuncs.com/?Action=OnsInstanceBaseInfo
&InstanceId=MQ_INST_138015630679****_BAAy1Hac
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<OnsInstanceBaseInfoResponse>
<InstanceBaseInfo>
<Endpoints>
<TcpEndpoint>http://MQ_INST_138015630679****_BAAy1Hac.cn-chengdu.mq-internal.aliyuncs.com:8080</TcpEndpoint>
<HttpInternetEndpoint>http://138015630679****.mqrest.cn-chengdu.aliyuncs.com</HttpInternetEndpoint>
<HttpInternalEndpoint>http://138015630679****.mqrest.cn-chengdu-internal.aliyuncs.com</HttpInternalEndpoint>
<HttpInternetSecureEndpoint>https://138015630679****.mqrest.cn-chengdu.aliyuncs.com</HttpInternetSecureEndpoint>
<TcpInternetEndpoint>http://MQ_INST_138015630679****_BAAy1Hac.mq.cn-chengdu.aliyuncs.com:80</TcpInternetEndpoint>
</Endpoints>
<IndependentNaming>true</IndependentNaming>
<MaxTps>10000</MaxTps>
<Remark>onspre-cn-m7r1r5f****</Remark>
<InstanceName>test</InstanceName>
<ReleaseTime>1603555200000</ReleaseTime>
<TopicCapacity>50</TopicCapacity>
<InstanceStatus>5</InstanceStatus>
<InstanceId>MQ_INST_138015630679****_BAAy1Hac</InstanceId>
<InstanceType>2</InstanceType>
</InstanceBaseInfo>
<RequestId>6CC46974-65E8-4C20-AB07-D20D102E****</RequestId>
</OnsInstanceBaseInfoResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"InstanceBaseInfo" : {
"Endpoints" : {
"TcpEndpoint" : "http://MQ_INST_138015630679****_BAAy1Hac.cn-chengdu.mq-internal.aliyuncs.com:8080",
"HttpInternetEndpoint" : "http://138015630679****.mqrest.cn-chengdu.aliyuncs.com",
"HttpInternalEndpoint" : "http://138015630679****.mqrest.cn-chengdu-internal.aliyuncs.com",
"HttpInternetSecureEndpoint" : "https://138015630679****.mqrest.cn-chengdu.aliyuncs.com",
"TcpInternetEndpoint" : "http://MQ_INST_138015630679****_BAAy1Hac.mq.cn-chengdu.aliyuncs.com:80"
},
"IndependentNaming" : true,
"MaxTps" : 10000,
"Remark" : "onspre-cn-m7r1r5f****",
"InstanceName" : "test",
"ReleaseTime" : 1603555200000,
"TopicCapacity" : 50,
"InstanceStatus" : 5,
"InstanceId" : "MQ_INST_138015630679****_BAAy1Hac",
"InstanceType" : 2
},
"RequestId" : "6CC46974-65E8-4C20-AB07-D20D102E****"
}
Error codes
For a list of error codes, visit the API Error Center.