Queries the basic information of a Message Queue for Apache RocketMQ instance and its endpoints for sending and subscribing to messages.

Usage notes

To send and subscribe to messages, a client must connect to a Message Queue for Apache RocketMQ instance by using an endpoint. You can call this operation to query the endpoints of the instance.

QPS limit

The queries-per-second (QPS) limit on this operation is 50 per user. Throttling is triggered when the number of calls to this operation per second exceeds the QPS limit. Throttling may affect your business. Therefore, call this operation based on your needs. For more information, see QPS limits.

Authorization information

By default, only Alibaba Cloud accounts can call this operation. RAM users can call this operation only after they are authorized to use it. The following table lists the authorization information of this operation. For more information, see Policies and examples.

API

Action

Resource

OnsInstanceBaseInfo

mq:QueryInstanceBaseInfo

acs:mq:*:*:{instanceId}

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 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 Struct

The returned instance information.

Endpoints Struct

The endpoints that correspond to different protocols.

HttpInternalEndpoint String http://138015630679****.mqrest.cn-zhangjiakou-internal.aliyuncs.com

The internal HTTP endpoint of the instance.

HttpInternetEndpoint String http://138015630679****.mqrest.cn-zhangjiakou.aliyuncs.com

The public HTTP endpoint of the instance.

HttpInternetSecureEndpoint String https://138015630679****.mqrest.cn-zhangjiakou.aliyuncs.com

The public HTTPS endpoint of the instance.

TcpEndpoint String http://MQ_INST_138015630679****_BAAy1Hac.cn-zhangjiakou.mq-internal.aliyuncs.com:8080

The TCP endpoint of the instance.

IndependentNaming Boolean true

Indicates whether a namespace is configured for the instance. Valid values:

  • true: A separate namespace is configured for the instance. Resource names must be unique within the instance but can be the same across different instances.
  • false: No separate namespace is configured for the instance. Resource names must be globally unique within the instance and across different instances.
InstanceId String MQ_INST_138015630679****_BAAy1Hac

The ID 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 (_).

InstanceStatus Integer 5

The status of the instance. Valid values:

  • 0: An Enterprise Platinum Edition instance is being deployed.
  • 2: A Standard Edition instance is overdue.
  • 5: A Standard Edition or Enterprise Platinum Edition instance is running.
  • 7: An Enterprise Platinum Edition instance is being upgraded and is available.
InstanceType Integer 2

The type of the instance. Valid values:

  • 1: Standard Edition (pay-as-you-go)
  • 2: Enterprise Platinum Edition (subscription)

For more information about the instance types and specifications of Message Queue for Apache RocketMQ, see Instance editions.

MaxTps Long 10000

The maximum transactions per second (TPS) for sending 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 applicable only to Message Queue for Apache RocketMQ Enterprise Platinum Edition instances.
ReleaseTime Long 1603555200000

The time when the Enterprise Platinum Edition instance expires.

Remark String test

The remarks.

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 applicable only to Message Queue for Apache RocketMQ Enterprise Platinum Edition instances.
RequestId String 6CC46974-65E8-4C20-AB07-D20D102E****

The ID of the request, which is a common parameter. Each request has a unique ID to facilitate troubleshooting and fault locating.

Examples

Sample requests

http(s)://ons.cn-zhangjiakou.aliyuncs.com/? Action=OnsInstanceBaseInfo
&InstanceId=MQ_INST_138015630679****_BAAy1Hac
&<Common request parameters>

Sample success responses

XML format

<InstanceBaseInfoResponse>
  <InstanceBaseInfo>
        <InstanceName>test</InstanceName>
        <MaxTps>10000</MaxTps>
        <Endpoints>
              <HttpInternalEndpoint>http://138015630679****.mqrest.cn-zhangjiakou-internal.aliyuncs.com</HttpInternalEndpoint>
              <TcpEndpoint>http://MQ_INST_138015630679****_BAAy1Hac.cn-zhangjiakou.mq-internal.aliyuncs.com:8080</TcpEndpoint>
              <HttpInternetEndpoint>http://138015630679****.mqrest.cn-zhangjiakou.aliyuncs.com</HttpInternetEndpoint>
              <HttpInternetSecureEndpoint>https://138015630679****.mqrest.cn-zhangjiakou.aliyuncs.com</HttpInternetSecureEndpoint>
        </Endpoints>
        <TopicCapacity>50</TopicCapacity>
        <InstanceId>MQ_INST_138015630679****_BAAy1Hac</InstanceId>
        <ReleaseTime>1603555200000</ReleaseTime>
        <InstanceStatus>5</InstanceStatus>
        <IndependentNaming>true</IndependentNaming>
        <InstanceType>2</InstanceType>
        <Remark>onspre-cn-m7r1r5f****</Remark>
  </InstanceBaseInfo>
  <RequestId>6CC46974-65E8-4C20-AB07-D20D102E****</RequestId>
</InstanceBaseInfoResponse>

JSON format

{
    "InstanceBaseInfo": {
        "InstanceName": "test",
        "MaxTps": 10000,
        "Endpoints": {
            "HttpInternalEndpoint": "http://138015630679****.mqrest.cn-zhangjiakou-internal.aliyuncs.com",
            "TcpEndpoint": "http://MQ_INST_138015630679****_BAAy1Hac.cn-zhangjiakou.mq-internal.aliyuncs.com:8080",
            "HttpInternetEndpoint": "http://138015630679****.mqrest.cn-zhangjiakou.aliyuncs.com",
            "HttpInternetSecureEndpoint": "https://138015630679****.mqrest.cn-zhangjiakou.aliyuncs.com"
        },
        "TopicCapacity": 50,
        "InstanceId": "MQ_INST_138015630679****_BAAy1Hac",
        "ReleaseTime": 1603555200000,
        "InstanceStatus": 5,
        "IndependentNaming": true,
        "InstanceType": 2,
        "Remark": "onspre-cn-m7r1r5f****"
    },
    "RequestId": "6CC46974-65E8-4C20-AB07-D20D102E****"
}

Error codes

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