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

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 value cannot be an empty string.
  • The value 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 value can be an empty string.
  • The 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

The returned list of all published Message Queue for Apache RocketMQ instances.

InstanceVO
IndependentNaming Boolean true

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

  • true: A separate namespace is configured for the Message Queue for Apache RocketMQ instance. Resource names must be unique within the Message Queue for Apache RocketMQ instance but can be the same across different Message Queue for Apache RocketMQ instances.
  • false: No separate namespaces are configured for the Message Queue for Apache RocketMQ instance. Resource names must be globally unique either within the Message Queue for Apache RocketMQ instance or across different Message Queue for Apache RocketMQ instances.
InstanceId String MQ_INST_111111111111_DOxxxxxx

The ID of the Message Queue for Apache RocketMQ instance.

InstanceName String test1

The name of the Message Queue for Apache RocketMQ instance.

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

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

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=OnsInstanceInServiceList
&Tag.1.Key=CartService
&Tag.1.Value=SericeA
&<Common request parameters>

Sample success responses

XML format

<OnsInstanceInServiceListResponse>
  <RequestId>0598E46F-DB06-40E2-AD7B-C45923EEC788</RequestId>
  <Data>
        <InstanceVO>
              <InstanceName>test1</InstanceName>
              <InstanceId>MQ_INST_111111111111_DOxxxxxx</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-C45923EEC788",
        "Data": {
            "InstanceVO": [ {
                "InstanceName": "test1",
                "InstanceId": "MQ_INST_111111111111_DOxxxxxx",
                "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.