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

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.
  • The tag key cannot be an empty string.
  • The tag key can be up to 128 characters in length. It cannot start with aliyun or acs: and 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.
  • The tag value can be an empty string.
  • The tag value can be up to 128 characters in length. It cannot start with aliyun or acs: and cannot contain http:// or https://.

Response parameters

Parameter Type Example Description
Data Array of InstanceVO

A list of all Message Queue for Apache RocketMQ instances that have been published.

InstanceVO
IndependentNaming Boolean true

Indicates whether a namespace is configured for the Message Queue for Apache RocketMQ instance. Valid values:

  • true: An independent namespace is configured for the Message Queue for Apache RocketMQ instance. Resource names must be unique within the instance but can be the same across different instances.
  • false: An independent namespace is not configured for the Message Queue for Apache RocketMQ instance. Resource names must be globally unique across all Message Queue for Apache RocketMQ instances.
InstanceId String MQ_INST_188077086902****_BXSuW61e

The ID of the Message Queue for Apache RocketMQ instance.

InstanceName String test1

The name of the Message Queue for Apache RocketMQ 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 Message Queue for Apache RocketMQ instance. Valid values:

  • 0: An Enterprise Platinum Edition instance is being deployed.
  • 2: A pay-as-you-go instance is overdue.
  • 5: A pay-as-you-go 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 Message Queue for Apache RocketMQ instance. Valid values:

  • 1: Pay-as-you-go
  • 2: Enterprise Platinum Edition
ReleaseTime Long 1551024000000

The time when the Enterprise Platinum Edition instance expires.

Tags Array of Tag

The tags bound to the Message Queue for Apache RocketMQ 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.

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.