All Products
Search
Document Center

ApsaraMQ for RocketMQ:OnsInstanceInServiceList

Last Updated:Mar 03, 2024

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

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
mq:OnsInstanceBaseInfoList
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
Tagobject []No

The tags that you want to attach to the instance. You can attach up to 20 tags to the instance.

KeystringNo

The tag key. This parameter is not required. If you configure this parameter, you must also configure Value.**** If you configure Key and Value in a request, this operation queries only the instances that use the specified tags. If you do not configure these parameters in a request, this operation queries all instances that you can access.

  • The value of this parameter cannot be an empty string.
  • The tag key can be up to 128 characters in length and cannot start with acs: or aliyun. The tag key cannot contain http:// or https://.
CartService
ValuestringNo

The tag value. This parameter is not required. If you configure this parameter, you must also configure Key.**** If you configure Key and Value in a request, this operation queries only the instances that use the specified tags. If you do not configure these parameters in a request, this operation queries all instances that you can access.

  • The value of this parameter can be an empty string.
  • The tag value can be up to 128 characters in length and cannot contain http:// or https://. The tag value cannot start with acs: or aliyun.
SericeA
NeedResourceInfobooleanNo

Specifies whether you want the resource information to be returned.

true

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

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

0598E46F-DB06-40E2-AD7B-C45923EE****
Dataobject []

The returned information about the queried instances.

IndependentNamingboolean

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
InstanceNamestring

The instance name.

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

test1
ReleaseTimelong

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

1551024000000
InstanceStatusinteger

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
Tagsobject []

The tags that are attached to the instance.

Keystring

The tag key.

CartService
Valuestring

The tag value.

ServiceA
InstanceIdstring

The instance ID.

MQ_INST_188077086902****_BXSuW61e
InstanceTypeinteger

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
CreateTimelong

The time when the instance was created. The value of this parameter is a UNIX timestamp in milliseconds.

1640847284000
TopicCountinteger

The number of topics.

1
GroupCountinteger

The number of consumer groups.

3

Examples

Sample success responses

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

Error codes

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

Change history

Change timeSummary of changesOperation
2023-08-22The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: NeedResourceInfo
Output ParametersThe response structure of the API has changed.