All Products
Search
Document Center

ApsaraMQ for RocketMQ:ListInstances

Last Updated:Dec 19, 2025

Queries the ApsaraMQ for RocketMQ instances in a specified region.

Operation description

Important Alibaba Cloud OpenAPI is a management API that you can use to manage and query Alibaba Cloud service resources. Integrate OpenAPI only on the control plane. Do not use OpenAPI on the core data plane for sending or receiving messages. This prevents potential risks to your data links.

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

rocketmq:ListInstances

list

*Instance

acs:rocketmq:{#regionId}:{#accountId}:instance/*

None None

Request syntax

GET /instances HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

filter

string

No

The filter condition. If you do not specify this parameter, all instances are queried.

rmq-cn-7e22ody****

pageNumber

integer

No

The page number.

Valid values: 1 to 100,000,000.

If you specify a value less than 1, the system uses 1. If you specify a value greater than 100,000,000, the system uses 100,000,000.

1

pageSize

integer

No

The number of entries to return on each page.

Valid values: 10 to 200.

If you specify a value less than 10, the system uses 10. If you specify a value greater than 200, the system uses 200.

10

resourceGroupId

string

No

The ID of the resource group to which the instance belongs.

rg-acfmx7caj******

tags

string

No

A list of resource tags used to filter instances.

[{"key": "rmq-test", "value": "test"}]

seriesCodes

array

No

The primary series codes of the instances.

Valid values:

  • standard: Standard Edition

  • ultimate: Platinum Edition

  • professional: Professional Edition

  • dedicated: Exclusive Edition

  • shared: Shared Edition

string

No

The primary series code of the instance.

standard

storageSecretKey

string

No

The storage encryption key.

xxxxx

Response elements

Element

Type

Description

Example

object

Result<MyPage<InstanceDto>>

requestId

string

The request ID. This ID is unique to each request. Use this ID to troubleshoot issues.

84445A20-2B50-5306-A3C0-AF99FC1833C6

success

boolean

Indicates whether the call was successful.

true

data

object

The returned data.

pageNumber

integer

The page number.

1

pageSize

integer

The number of entries per page.

10

totalCount

integer

The total number of entries.

100

list

array<object>

The paginated data.

array<object>

regionId

string

The ID of the region where the instance resides.

cn-hangzhou

instanceId

string

The instance ID.

rmq-cn-7e22ody****

instanceName

string

The instance name.

test instance

status

string

The instance status.

Valid values:

  • RELEASED

  • RUNNING

  • STOPPED

  • CHANGING

  • CREATING

Valid values:

  • RELEASED :

    Released

  • RUNNING :

    Running

  • STOPPED :

    Stopped

  • CHANGING :

    Changing

  • CREATING :

    Creating

RUNNING

startTime

string

The time when the instance was created.

2022-08-01 00:00:00

expireTime

string

The time when the instance expires.

2022-09-01 00:00:00

releaseTime

string

The time when the instance was released.

2022-09-07 00:00:00

userId

string

The ID of the user to which the instance belongs.

6W0xz2uPfiwp****

commodityCode

string

The commodity code of the ApsaraMQ for RocketMQ 5.x series instance, such as ons_rmqsub_public_cn.

ons_rmqsub_public_cn

serviceCode

string

The service code of the instance. The service code for ApsaraMQ for RocketMQ is rmq.

rmq

seriesCode

string

The primary series code of the instance.

Valid values:

  • standard: Standard Edition

  • Ultimate: Enterprise Platinum Edition

  • professional: Professional Edition

  • shared: Shared Edition

  • dedicated: Exclusive Edition

Valid values:

  • standard :

    Standard Edition

  • ultimate :

    Platinum Edition

  • professional :

    Professional Edition

standard

subSeriesCode

string

The sub-series code of the instance.

Valid values:

  • cluster_ha: High-availability Cluster Edition

  • single_node: Single Node Edition

  • serverless: Serverless Edition

Valid values:

  • cluster_ha :

    High-availability Edition

  • single_node :

    Single Node Edition

cluster_ha

paymentType

string

The billing method of the instance.

Valid values:

  • PayAsYouGo: Pay-as-you-go

  • Subscription: Subscription

Valid values:

  • PayAsYouGo :

    Pay-as-you-go (postpaid)

  • Subscription :

    Subscription (prepaid)

Subscription

remark

string

The remarks on the instance.

This is remark for instance.

topicCount

integer

The number of topics created in the instance.

20

groupCount

integer

The number of consumer groups created in the instance.

10

createTime

string

The update time of the instance version.

2022-08-01 00:00:00

updateTime

string

The time when the instance was last modified.

2022-08-02 00:00:00

resourceGroupId

string

The ID of the resource group to which the instance belongs.

rg-acfmx7caj******

tags

array<object>

The list of resource tags.

object

The resource tag.

key

string

The key of the resource tag.

key

value

string

The value of the resource tag.

value

productInfo

object

The product information.

traceOn

boolean

Indicates whether the message trace feature is enabled.

  • true: enabled

  • false: disabled

This parameter is not yet in effect. The message trace feature is supported by default regardless of whether this parameter is enabled.

true

capacityType

string

The capacity mode:

  • provisioned: reserved and elastic

  • ondemand: pay-as-you-go

provisioned

code

string

The error code.

MissingPageNumber

message

string

The error message.

Parameter pageNumber is mandatory for this action .

httpStatusCode

integer

The HTTP status code.

400

dynamicCode

string

The dynamic error code.

PageNumber

dynamicMessage

string

The dynamic error message.

pageNumber

Examples

Success response

JSON format

{
  "requestId": "84445A20-2B50-5306-A3C0-AF99FC1833C6",
  "success": true,
  "data": {
    "pageNumber": 1,
    "pageSize": 10,
    "totalCount": 100,
    "list": [
      {
        "regionId": "cn-hangzhou",
        "instanceId": "rmq-cn-7e22ody****",
        "instanceName": "test instance",
        "status": "RUNNING",
        "startTime": "2022-08-01 00:00:00",
        "expireTime": "2022-09-01 00:00:00",
        "releaseTime": "2022-09-07 00:00:00",
        "userId": "6W0xz2uPfiwp****",
        "commodityCode": "ons_rmqsub_public_cn",
        "serviceCode": "rmq",
        "seriesCode": "standard",
        "subSeriesCode": "cluster_ha",
        "paymentType": "Subscription",
        "remark": "This is remark for instance.",
        "topicCount": 20,
        "groupCount": 10,
        "createTime": "2022-08-01 00:00:00",
        "updateTime": "2022-08-02 00:00:00",
        "resourceGroupId": "rg-acfmx7caj******",
        "tags": [
          {
            "key": "key",
            "value": "value"
          }
        ],
        "productInfo": {
          "traceOn": true,
          "capacityType": "provisioned"
        }
      }
    ]
  },
  "code": "MissingPageNumber",
  "message": "Parameter pageNumber is mandatory for this action .",
  "httpStatusCode": 400,
  "dynamicCode": "PageNumber",
  "dynamicMessage": "pageNumber"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.