Queries all consumer groups of the current account when you use AMQP server-side subscriptions. You can also call this operation to perform a fuzzy search by consumer group name.

Limits

Each Alibaba Cloud account can run a maximum of 5 queries per second (QPS).

Note RAM users of an Alibaba Cloud account share the quota of the account.

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 QueryConsumerGroupList

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

CurrentPage Integer Yes 1

The number of the page to return. Pages start from page 1.

PageSize Integer No 2

The number of entries to return on each page. Valid values: 1 to 1000.

IotInstanceId String No iot-cn-0pp1n8t****

The ID of the instance. You can view the instance ID on the Overview page in the IoT Platform console.

Notice
  • If your instance has an ID, you must configure this parameter. If you do not set this parameter, the call fails.
  • If your instance has no Overview page or ID, you do not need to set this parameter.

For more information, see Overview.

Fuzzy Boolean No false

Specifies whether to perform a fuzzy search. Valid values:

  • true: performs a fuzzy search. You must specify the GroupName parameter.
  • false: queries all consumer groups of the current account.

Default value: false.

GroupName String No Consumer groups of the A type

The name of the consumer group to be queried. This parameter is required if the Fuzzy parameter is set to true.

In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this operation. For more information, see Common request parameters.

Response parameters

Parameter Type Example Description
Code String iot.system.SystemException

The error code returned if the call fails. For more information, see Error codes.

CurrentPage Integer 1

The number of the returned page.

Data Array of ConsumerGroupDTO

The details about the consumer group. This parameter is returned if the call is successful. For more information, see ConsumerGroupDTO.

ConsumerGroupDTO
CreateTime String 2020-05-20T00:05:20.000Z

The time when the consumer group was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ss.SSSZ format. The time is displayed in UTC and accurate to milliseconds.

GroupId String nJRaJPn5U1JITGf******

The ID of the consumer group.

GroupName String Consumer Group 1

The name of the consumer group.

ErrorMessage String A system exception occurred.

The error message returned if the call fails.

PageCount Integer 4

The total number of returned pages.

PageSize Integer 2

The number of entries returned per page.

RequestId String 73B9DF43-7780-47DE-8BED-077729D28BD2

The ID of the request.

Success Boolean true

Indicates whether the call was successful.

  • true: The call was successful.
  • false: The call failed.
Total Integer 8

The total number of entries.

Examples

Sample requests

https://iot.cn-shanghai.aliyuncs.com/?Action=QueryConsumerGroupList
&CurrentPage=1
&PageSize=2
&Fuzzy=true
&GroupName=Consumer groups of the A type
&<Common request parameters>

Sample success responses

XML format

<QueryConsumerGroupListResponse>
    <PageSize>2</PageSize>
    <PageCount>4</PageCount>
    <CurrentPage>1</CurrentPage>
    <Total>8</Total>
    <Data>
        <ConsumerGroupDTO>
            <GroupId>nJRaJPn5U1JITGf******</GroupId>
            <GroupName>Consumer Group 1</GroupName>
            <CreateTime>2020-05-29T03:37:56.000Z</CreateTime>
        </ConsumerGroupDTO>
        <ConsumerGroupDTO>
            <GroupId>qJRaJPndeefwgef******</GroupId>
            <GroupName>Consumer Group 2</GroupName>
            <CreateTime>2020-01-17T07:27:01.000Z</CreateTime>
        </ConsumerGroupDTO>
    </Data>
    <RequestId>73B9DF43-7780-47DE-8BED-077729D28BD2</RequestId>
    <Success>true</Success>
</QueryConsumerGroupListResponse>

JSON format

{
    "PageSize": 2,
    "PageCount": 4,
    "CurrentPage": 1,
    "Total": 8,
    "Data": {
        "ConsumerGroupDTO": [
            {
                "GroupId": "nJRaJPn5U1JITGf******",
                "GroupName": "Consumer Group 1",
                "CreateTime": "2020-05-29T03:37:56.000Z"
            },
            {
                "GroupId": "qJRaJPndeefwgef******",
                "GroupName": "Consumer Group 2",
                "CreateTime": "2020-01-17T07:27:01.000Z"
            }
        ]
    },
  "RequestId": "73B9DF43-7780-47DE-8BED-077729D28BD2",
  "Success": true
}

Error codes

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