All Products
Search
Document Center

ApsaraMQ for MQTT:ListGroupId

Last Updated:Jan 04, 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 per second (TPS) and is included in your billing. 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 whose Group IDs you want to query.

mqtt-cn-0pp1ldu****

Tag

array<object>

No

object

No

Key

string

No

Value

string

No

Note

For more information about other parameters, see Common parameters and Endpoints.

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID. This is a common parameter and is unique for each request.

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

Data

array<object>

The details of the queried Group IDs.

array<object>

UpdateTime

integer

The time when the Group ID was last updated.

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, the names of resources in the instance must be unique. Resources in different instances can have the same name.

  • false: The instance does not have an independent namespace. In this case, the names of resources in the instance must be globally unique. Resources in different instances cannot have the same name.

true

GroupId

string

The Group ID of the instance.

GID_test1

CreateTime

integer

The time when the Group ID was created.

1564577317000

Tags

array<object>

object

TagKey

string

TagValue

string

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": "",
          "TagValue": ""
        }
      ]
    }
  ]
}

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.