All Products
Search
Document Center

ApsaraMQ for MQTT:ListGroupId

Last Updated:Apr 15, 2026

You can call the ListGroupId operation to query all Group IDs in an instance.

Operation description

Each successful call to the ListGroupId operation is counted as one message transaction and is billed based on transactions per second (TPS). For more information, see billing details.

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

mq:ListMqttGroupId

get

*Instance

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

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The ID of the instance for which you want to list group IDs.

mqtt-cn-0pp1ldu****

Tag

array<object>

No

The list of tags.

object

No

A list of resource tags. You can specify up to 20 tags.

Key

string

No

The tag key.

test

Value

string

No

The tag value.

test

Note

For more information about other parameters, see common parameters and endpoint.

Response elements

Element

Type

Description

Example

object

RequestId

string

The unique ID for the request. This is a common parameter.

95996EEB-D894-44FA-A87C-940F5CD9****

Data

array<object>

The details of the returned group IDs.

array<object>

UpdateTime

integer

The timestamp of the last update for the group ID.

1564577317000

InstanceId

string

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

post-cn-45910tj****

IndependentNaming

boolean

Indicates whether the instance has an independent namespace. Valid values:

  • true: The instance has an independent namespace. In this case, resource names must be unique within the instance, but they can be the same as resource names in other instances.

  • false: The instance does not have an independent namespace. In this case, resource names must be globally unique across all instances.

true

GroupId

string

The group ID.

GID_test1

CreateTime

integer

The creation timestamp of the group ID.

1564577317000

Tags

array<object>

The tags attached to the group ID.

object

The tags that are associated with the group ID.

TagKey

string

The tag key.

key

TagValue

string

The tag value.

value

Examples

Success response

JSON format

{
  "RequestId": "95996EEB-D894-44FA-A87C-940F5CD9****",
  "Data": [
    {
      "UpdateTime": 1564577317000,
      "InstanceId": "post-cn-45910tj****",
      "IndependentNaming": true,
      "GroupId": "GID_test1",
      "CreateTime": 1564577317000,
      "Tags": [
        {
          "TagKey": "key",
          "TagValue": "value"
        }
      ]
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 ParameterFieldCheckFailed Failed to validate the parameters. The parameters may be missing or invalid.
400 InstancePermissionCheckFailed An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.
400 InstanceNotFound Failed to find the instance. The instanceId may be invalid.
400 PermissionCheckFailed An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.
500 InternalError An error occurred while processing your request. Try again later.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.