All Products
Search
Document Center

ApsaraMQ for RocketMQ:OnsInstanceInServiceList

Last Updated:Jun 10, 2026

Mengkueri semua instans ApsaraMQ for RocketMQ 4.x di wilayah tertentu.

Deskripsi operasi

Penting

The OpenAPI provided by Alibaba Cloud is a management Application Programming Interface (API). Use this API to manage and query resources for Alibaba Cloud services. Integrate the API for management purposes only. Do not rely on the API for core data links that send and receive messages. This can introduce threats to your data links.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

mq:QueryInstanceBaseInfo

list

Instance

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

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

Tag

array<object>

No

Daftar tag yang terpasang pada instans. Daftar dapat berisi hingga 20 elemen.

object

No

A tag attached to the instance.

Key

string

No

The tag key. Specify both Key and Value to filter instances by tag. Omit both to query all instances.

  • This parameter cannot be an empty string.

  • The tag key can be up to 128 characters long. It cannot start with aliyun or acs:. It cannot contain http:// or https://.

CartService

Value

string

No

The tag value. Specify both Key and Value to filter instances by tag. Omit both to query all instances.

  • This parameter can be an empty string.

  • The tag value can be up to 128 characters long. It cannot start with aliyun or acs:. It cannot contain http:// or https://.

SericeA

NeedResourceInfo

boolean

No

Apakah akan mengembalikan statistik sumber daya. Statistik mencakup jumlah topik dan grup di instans.

true

Elemen respons

Element

Type

Description

Example

object

RequestId

string

The ID of the request. This is a common parameter. Each request has a unique ID. Use this ID to troubleshoot and locate issues.

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

Data

object

InstanceVO

array<object>

A list of all published instances.

array<object>

A list of all published instances.

IndependentNaming

boolean

Indicates whether a namespace is used for the instance. Valid values:

  • true: A separate namespace is used for the instance. The identifier of each resource in the instance must be unique within the instance. However, the identifier of a resource in the instance can be the same as the identifier of a resource in another instance that uses a different namespace.

  • false: A separate namespace is not used for the instance. The name of each resource must be globally unique within the instance and across all instances.

true

InstanceName

string

The instance name.

The name must be 3 to 64 characters in length and can contain letters, digits, hyphens (-), and underscores (_).

test1

ReleaseTime

integer

The time when the instance expires. If the instance is of Enterprise Platinum Edition, this parameter is returned.

1551024000000

InstanceStatus

integer

The instance status. Valid values:

  • 0: The instance is being deployed. This value is valid only for Enterprise Platinum Edition instances.

  • 2: The instance has overdue payments. This value is valid only for Standard Edition instances.

  • 5: The instance is running. This value is valid only for Standard Edition instances and Enterprise Platinum Edition instances.

  • 7: The instance is being upgraded and is running. This value is valid only for Enterprise Platinum Edition instances.

5

Tags

object

Tag

array<object>

The tags that are attached to the instance.

object

Key

string

The tag key.

CartService

Value

string

The tag value.

ServiceA

InstanceId

string

The instance ID.

MQ_INST_188077086902****_BXSuW61e

InstanceType

integer

The instance type. Valid values:

  • 1: Standard Edition

  • 2: Enterprise Platinum Edition

For information about the instance editions and the differences between the editions, see Instance editions.

2

CreateTime

integer

The time when the instance was created. 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

Contoh

Respons sukses

JSONformat

{
  "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
      }
    ]
  }
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.