Queries all Message Queue for Apache RocketMQ instances in a region within the current account.

Usage notes

When you call this operation, you do not have to set Value or Key. If you need to set the two parameters, you must specify values for both Value and Key at the same time.

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

Alibaba Cloud accounts and RAM users can call this operation without the need to be authorized. For more information, see Policies and examples.

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 OnsInstanceInServiceList

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

Tag.N.Key String Yes CartService

The key of tag N bound to the resource.

  • Valid values of N: 1 to 20.
  • You do not have to set this parameter. However, if you specify a value for this parameter, you must also specify a value for the Value parameter.
  • The value can be up to 128 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.
Tag.N.Value String Yes SericeA

The value of tag N bound to the resource.

  • Valid values of N: 1 to 20.
  • You do not have to set this parameter. However, if you specify a value for this parameter, you must also specify a value for the Key parameter.
  • The value can be up to 128 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

Response parameters

Parameter Type Example Description
Data Array of InstanceVO

The returned list of all published instance information.

InstanceVO
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_188077086902****_BXSuW61e

The ID of the instance.

InstanceName String test1

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
  • 2: Enterprise Platinum Edition

For more information about the instance types and their differences, see Instance editions.

ReleaseTime Long 1551024000000

The time when the Enterprise Platinum Edition instance expires.

Tags Array of Tag

The tags bound to the instance.

Tag
Key String CartService

The key of the tag.

Value String ServiceA

The value of the tag.

RequestId String 0598E46F-DB06-40E2-AD7B-C45923EE****

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=OnsInstanceInServiceList
&Tag.1.Key=CartService
&Tag.1.Value=SericeA
&<Common request parameters>

Sample success responses

XML format

<OnsInstanceInServiceListResponse>
  <RequestId>0598E46F-DB06-40E2-AD7B-C45923EE****</RequestId>
  <Data>
        <InstanceVO>
              <InstanceName>test1</InstanceName>
              <InstanceId>MQ_INST_188077086902****_BXSuW61e</InstanceId>
              <ReleaseTime>1551024000000</ReleaseTime>
              <InstanceStatus>5</InstanceStatus>
              <IndependentNaming>true</IndependentNaming>
              <InstanceType>2</InstanceType>
              <Tags>
                    <Tag>
                          <Value>ServiceA</Value>
                          <Key>CartService</Key>
                    </Tag>
              </Tags>
        </InstanceVO>
  </Data>
</OnsInstanceInServiceListResponse>

JSON format

{
        "RequestId": "0598E46F-DB06-40E2-AD7B-C45923EE****",
        "Data": {
            "InstanceVO": [ {
                "InstanceName": "test1",
                "InstanceId": "MQ_INST_188077086902****_BXSuW61e",
                "ReleaseTime": 1551024000000,
                "InstanceStatus": 5,
                "IndependentNaming": true,
                "InstanceType": 2,
                "Tags": {
                    "Tag": [
                        {
                        "Value": "ServiceA",
                        "Key": "CartService"
                    }
                ]
            }
        }
    ]
}
}

Error codes

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