ListGroupId

Updated at:
Copy as MD

Lists all group IDs in a specified ApsaraMQ for MQTT instance.

Debugging

You can run this operation in OpenAPI Explorer without manually calculating signatures. After a successful call, OpenAPI Explorer automatically generates SDK code examples.

Request parameters

Name Type Required Example Description
Action String Yes ListGroupId

A required parameter. Set the value to ListGroupId.

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

The ID of the instance whose group IDs you want to query.

Note For more information, see Common parameters and Invocation methods.

Returned Data

Name Type Example Description
Data Array

The returned group ID details.

CreateTime Long 1564577317000

The time when the group ID was created.

GroupId String GID_test1

The group ID.

IndependentNaming Boolean true

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

  • true: The instance uses an independent namespace. Resource names must be unique within the instance but can be reused across instances.
  • false: The instance does not use an independent namespace. Resource names must be globally unique across all instances.
InstanceId String post-cn-45910tj****

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

UpdateTime Long 1564577317000

The time when the group ID was last updated.

RequestId String 95996EEB-D894-44FA-A87C-940F5CD97E6A

The request ID.

Examples

Request example

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

Successful response example

XML format

<ListGroupIdResponse>
  <RequestId>95996EEB-D894-44FA-A87C-940F5CD97E6A</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-940F5CD97E6A",
  "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

HttpCode Error Code Error Message Description
400 ParameterFieldCheckFailed Failed to validate the parameters. The parameters may be missing or invalid. Parameter verification failed. A parameter may be missing or invalid.
500 InternalError An error occurred while processing your request. Try again later. An error occurred in the MQTT backend service. Try again later.
400 InstancePermissionCheckFailed An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings. Instance permission verification failed. Verify the instance owner account and its permission settings.
400 InstanceNotFound Failed to find the instance. The instanceId may be invalid. The specified instance was not found. The instance ID 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. Resource permission verification failed. Check the ownership and permission settings of the instance, topic, and group ID.

For more information about error codes, visit the Error Center.