All Products
Search
Document Center

ApsaraMQ for RocketMQ:ListInstances

Last Updated:Sep 24, 2026

Queries the list of all ApsaraMQ for RocketMQ instances in a specified region.

Operation description

Important The OpenAPI operations provided by Alibaba Cloud are management API operations that are used to manage and query resources of Alibaba Cloud services. Integrate OpenAPI operations only into the management data link. Do not use OpenAPI operations in the core data link for sending and receiving messages. Otherwise, risks may occur on the data 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

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 for the query. If you do not specify this parameter, all instances are queried.

rmq-cn-7e22ody****

pageNumber

integer

No

The paging number. Specifies the page of results to return.

Valid values: 1 to 100000000.

If you set this parameter to a value less than 1, the system uses 1 as the default value. If you set this parameter to a value greater than 100000000, the system uses 100000000 as the default value.

1

pageSize

integer

No

The paging size. The maximum number of results to return on each page.

Valid values: 10 to 200.

If you set this parameter to a value less than 10, the system uses 10 as the default value. If you set this parameter to a value greater than 200, the system uses 200 as the default value.

10

resourceGroupId

string

No

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

rg-acfmx7caj******

tags

string

No

The list of resource labels that are used to filter instances.

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

seriesCodes

array

No

The primary series encoding of the instance.

Valid values:

  • standard: Standard Edition.

  • ultimate: Platinum Edition.

  • professional: Professional Edition.

  • dedicated: Dedicated Edition.

  • shared: Shared Edition.

string

No

The primary series encoding of the instance.

standard

storageSecretKey

string

No

The storage encryption key.

xxxxx

Response elements

Element

Type

Description

Example

object

Result<MyPage>

requestId

string

The request ID. Each request has a unique ID that you can use to troubleshoot and locate issues.

84445A20-2B50-5306-A3C0-AF99FC1833C6

success

boolean

Indicates whether the operation was successful.

true

data

object

The response result.

pageNumber

integer

The current page number.

1

pageSize

integer

The page size.

10

totalCount

integer

The total number of returned results.

100

list

array<object>

The paged data.

array<object>

regionId

string

The ID of the region to which the instance belongs.

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: Released.

  • RUNNING: Running.

  • STOPPED: Stopped.

  • CHANGING: Changing.

  • CREATING: Creating.

Valid values:

  • RELEASED :

    Released.

  • RUNNING :

    Running.

  • STOPPED :

    Stopped.

  • CHANGING :

    Changing.

  • CREATING :

    Creating.

RUNNING

startTime

string

The time when the instance was created, in YYYY-MM-DD HH:mm:ss format.

2022-08-01 00:00:00

expireTime

string

The time when the instance expires, in YYYY-MM-DD HH:mm:ss format.

2022-09-01 00:00:00

releaseTime

string

The time when the instance was released, in YYYY-MM-DD HH:mm:ss format.

2022-09-07 00:00:00

userId

string

The ID of the user to whom 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: Platinum Edition.

  • professional: Professional Edition.

  • shared: Shared Edition.

  • dedicated: Dedicated 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: cluster high-availability edition.

  • single_node: single-node edition.

  • serverless: serverless edition.

Valid values:

  • cluster_ha :

    Cluster 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 (postpaid).

  • Subscription: subscription (prepaid).

Valid values:

  • PayAsYouGo :

    Pay-as-you-go (postpaid)

  • Subscription :

    Subscription (prepaid)

Subscription

remark

string

The remarks for 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 time when the instance version was last updated, in YYYY-MM-DD HH:mm:ss format.

2022-08-01 00:00:00

updateTime

string

The time when the instance was last modified, in YYYY-MM-DD HH:mm:ss format.

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 resource tag list.

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

Specifies whether the message trace feature is enabled.

  • true: The message trace feature is enabled.

  • false: The message trace feature is disabled.

This parameter does not take effect. Regardless of whether this parameter is enabled, the instance supports the message trace feature by default.

true

capacityType

string

The capacity mode. Valid values:

  • provisioned: reserved capacity with elastic scaling.

  • 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.