All Products
Search
Document Center

ApsaraMQ for RocketMQ:ListInstances

Last Updated:Sep 24, 2024

Queries all ApsaraMQ for RocketMQ instances in a specific region.

Operation description

Note API operations provided by Alibaba Cloud are used to manage and query resources of Alibaba Cloud services. We recommend that you integrate these API operations only in management systems. Do not use these API operations in the core system of messaging services. Otherwise, system risks may occur.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
rocketmq:ListInstanceslist
  • Instance
    acs:rocketmq:{#regionId}:{#accountId}:instance/*
    none
none

Request syntax

GET /instances HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
filterstringNo

The filter condition that is used to query instances. If you do not configure this parameter, all instances are queried.

rmq-cn-7e22ody****
pageNumberintegerNo

The page number.

Valid values: 1 to 100000000.

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

1
pageSizeintegerNo

The number of entries per page.

Value values: 10 to 200.

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

10
resourceGroupIdstringNo

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

rg-acfmx7caj******
tagsstringNo

The tags that are used to filter instances.

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

The primary edition of the instance.

Valid values:

  • standard: Standard Edition
  • ultimate: Enterprise Platinum Edition
  • professional: Professional Edition
stringNo

The primary edition of the instance.

standard

Response parameters

ParameterTypeDescriptionExample
object

Result<MyPage>

requestIdstring

The ID of the request. Each request has a unique ID. You can use this ID to troubleshoot issues.

84445A20-2B50-5306-A3C0-AF99FC1833C6
successboolean

Indicates whether the call was successful.

true
dataobject

The returned data.

pageNumberlong

The page number of the returned page.

1
pageSizelong

The number of entries returned on each page.

10
totalCountlong

The total number of returned entries.

100
listarray<object>

The pagination information.

listobject
regionIdstring

The ID of the region in which the instance resides.

cn-hangzhou
instanceIdstring

The instance ID.

rmq-cn-7e22ody****
instanceNamestring

The instance name.

test instance
statusstring

The instance status.

Valid values:

  • RELEASED
  • RUNNING
  • STOPPED
  • CHANGING
  • CREATING
RUNNING
startTimestring

The time when the instance was created.

2022-08-01 00:00:00
expireTimestring

The time when the instance expires.

2022-09-01 00:00:00
releaseTimestring

The time when the instance was released.

2022-09-07 00:00:00
userIdstring

The ID of the user who owns the instance.

6W0xz2uPfiwp****
commodityCodestring

The commodity code of the instance. The commodity code of ApsaraMQ for RocketMQ 5.0 instances has a similar format to ons_rmqsub_public_cn.

ons_rmqsub_public_cn
serviceCodestring

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

rmq
seriesCodestring

The primary edition of the instance.

Valid values:

  • standard: Standard Edition
  • ultimate: Enterprise Platinum Edition
  • professional: Professional Edition
standard
subSeriesCodestring

The sub-category edition of the instance.

Valid values:

  • cluster_ha: Cluster High-availability Edition
  • single_node: Standalone Edition
cluster_ha
paymentTypestring

The billing method of the instance.

Valid values:

  • PayAsYouGo
  • Subscription
Subscription
remarkstring

The instance description.

This is remark for instance.
topicCountlong

The number of topics that are created on the instance.

20
groupCountlong

The number of consumer groups that are created on the instance.

10
createTimestring

The time when the version of the instance was updated.

2022-08-01 00:00:00
updateTimestring

The time when the instance was last modified.

2022-08-02 00:00:00
resourceGroupIdstring

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

rg-acfmx7caj******
tagsarray<object>

The resource tags.

tagsobject
keystring

The tag key of the resource.

key
valuestring

The tag value of the resource.

value
productInfoobject

The product information.

traceOnboolean

Indicates whether the message trace feature is enabled. Valid values:

  • true
  • false

This parameter is not in use. By default, the message trace feature is enabled for ApsaraMQ for RocketMQ instances, regardless of whether this parameter is configured.

true
codestring

The error code returned if the call failed.

MissingPageNumber
messagestring

The error message.

Parameter pageNumber is mandatory for this action .
httpStatusCodeinteger

The HTTP status code returned.

400
dynamicCodestring

The dynamic error code.

PageNumber
dynamicMessagestring

The dynamic error message.

pageNumber

Examples

Sample success responses

JSONformat

{
  "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
        }
      }
    ]
  },
  "code": "MissingPageNumber",
  "message": "Parameter pageNumber is mandatory for this action .",
  "httpStatusCode": 400,
  "dynamicCode": "PageNumber",
  "dynamicMessage": "pageNumber"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-05-31The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-10-09The response structure of the API has changedView Change Details
2023-08-02The request parameters of the API has changed. The response structure of the API has changedView Change Details
2023-05-08The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-03-14The internal configuration of the API is changed, but the call is not affectedView Change Details