All Products
Search
Document Center

ApsaraMQ for RocketMQ:OnsInstanceInServiceList

Last Updated:Oct 27, 2026

Queries the information about all ApsaraMQ for RocketMQ 4.x instances in a specified region for the current account.

Operation description

Important OpenAPI operations provided by Alibaba Cloud are management APIs used to manage and query resources of Alibaba Cloud services. Integrate these APIs only into management workflows. Do not rely on OpenAPI operations in the core data link for message sending and receiving. Otherwise, risks may occur in the link.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

mq:QueryInstanceBaseInfo

list

Instance

acs:mq:{#regionId}:{#accountId}:{#InstanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

Tag

array<object>

No

The list of tags bound to the instances. The list can contain a maximum of 20 elements.

object

No

The tag bound to the instance.

Key

string

No

The tag key of the instance. Key and Value must be both specified or both left empty. If both are specified, instances are filtered based on the tag. If neither is specified, all instances are queried.

  • If this value is specified, it 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://.

CartService

Value

string

No

The tag value of the resource. Key and Value must be both specified or both left empty. If both are specified, instances are filtered based on the tag. If neither is specified, all instances are queried.

  • If this value is specified, it 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://.

SericeA

NeedResourceInfo

boolean

No

Specifies whether to return resource statistics information, including the number of topics and the number of consumer groups in the instance.

true

Response elements

Element

Type

Description

Example

object

RequestId

string

The common parameter. The ID of each request is unique and can be used for troubleshooting and locating issues.

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

Data

object

InstanceVO

array<object>

The list of information about all instances.

array<object>

The list of information about all instances.

IndependentNaming

boolean

Indicates whether the instance has a namespace. Valid values:

  • true: The instance has an independent namespace. Resource names are unique within the instance but can be duplicated across instances.

  • false: The instance does not have an independent namespace. Resource names must be globally unique within and across instances.

true

InstanceName

string

The name of the instance.

test1

ReleaseTime

integer

The expiration time of the Enterprise Platinum Edition instance.

1551024000000

InstanceStatus

integer

The instance status. Valid values:

  • 0: The Enterprise Platinum Edition instance is being deployed.

  • 2: The standard instance has an overdue payment.

  • 5: The standard instance or Enterprise Platinum Edition instance is in service.

  • 7: The Enterprise Platinum Edition instance is being upgraded and the service is available.

5

Tags

object

Tag

array<object>

The tag bound to the instance.

object

The tag bound to the instance.

Key

string

The tag key.

CartService

Value

string

The tag value.

ServiceA

InstanceId

string

The instance ID.

MQ_INST_188077086902****_BXSuW61e

InstanceType

integer

The type of the instance. Valid values:

  • 1: Standard Standard instance

  • 2: Enterprise Platinum Standard instance

For more information about the specifications and differences of each instance type, see Instance specifications.

2

CreateTime

integer

The creation time of the instance. The value of this parameter is a UNIX timestamp in milliseconds.

1640847284000

TopicCount

integer

The number of topics.

1

GroupCount

integer

The number of consumer groups.

3

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.