Queries all group IDs on a Message Queue for MQTT instance.

Note Each successful call to the ListGroupId operation is calculated as a message transaction per second (TPS). This way, you are billed for the call. For more information, seeBilling.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListGroupId

The operation that you want to perform. Set the value to ListGroupId.

InstanceId String Yes mqtt-cn-0pp1ldu****

The ID of the Message Queue for MQTT instance whose group IDs you want to query.

Note For more information about these parameters, see Common parameters and Endpoints.

Response parameters

Parameter Type Example Description
Data Array of MqttGroupIdDo

Details about a group ID that you queried.

CreateTime Long 1564577317000

The time when the group ID was created.

GroupId String GID_test1

The group ID that belongs to the Message Queue for MQTT instance.

IndependentNaming Boolean true

Indicates whether any separate namespace is configured for the Message Queue for MQTT instance. Valid values:

  • true: A separate namespace is configured for the Message Queue for MQTT instance. Resource names must be unique within the Message Queue for MQTT instance but can be the same across different Message Queue for MQTT instances.
  • false: No separate namespaces are configured for the Message Queue for MQTT instance. Resource names must be globally unique within the Message Queue for MQTT instance and across different Message Queue for MQTT instances.
InstanceId String post-cn-45910tj****

The ID of the Message Queue for MQTT instance to which the group ID belongs.

UpdateTime Long 1564577317000

The last time when the group ID was updated.

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

The ID of the request.

Examples

Sample requests

http(s)://onsmqtt.cn-hangzhou.aliyuncs.com/? Action=ListGroupId
&InstanceId=mqtt-cn-0pp1ldu****
&<Common request parameters>

Sample success responses

XML format

<ListGroupIdResponse>
  <RequestId>95996EEB-D894-44FA-A87C-940F5CD9****</RequestId>
  <Data>
        <InstanceId>post-cn-45910tj****</InstanceId>
        <CreateTime>1564577317000</CreateTime>
        <UpdateTime>1564577317000</UpdateTime>
        <IndependentNaming>true</IndependentNaming>
        <GroupId>GID_test2</GroupId>
  </Data>
  <Data>
        <InstanceId>post-cn-45910tj****</InstanceId>
        <CreateTime>1563200655000</CreateTime>
        <UpdateTime>1563200655000</UpdateTime>
        <IndependentNaming>true</IndependentNaming>
        <GroupId>GID_test1</GroupId>
  </Data>
</ListGroupIdResponse>

JSON format

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

Error codes

HTTP status code Error code Error message Description
400 ParameterFieldCheckFailed Failed to validate the parameters. The parameters may be missing or invalid. The error message returned because parameter verification failed. This parameter may be missing or invalid.
500 InternalError An error occurred while processing your request. Try again later. The error message returned because an internal error occurred to the Message Queue for MQTT instance. Please try again.
400 InstancePermissionCheckFailed An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings. The error message returned because instance permission verification failed. Check the ownership and authorization policy of the Message Queue for MQTT instance.
400 InstanceNotFound Failed to find the instance. The instanceId may be invalid. The error message returned because the specified instance is not found.
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. The error message returned because resource permission verification failed. Check the permissions and authorization policies of the instance, topic, and group ID.

For a list of error codes, visit the API Error Center.