All Products
Search
Document Center

ApsaraMQ for Kafka:GetConsumerList

Last Updated:Apr 12, 2024

Queries one or more consumer groups in a specified Message Queue for Apache Kafka instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
alikafka:ListGroupRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

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

alikafka_post-cn-v0h18sav****
RegionIdstringYes

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

cn-hangzhou
CurrentPageintegerNo

The page number.

1
PageSizeintegerNo

The number of entries to be returned per page.

10
ConsumerIdstringNo

The name of the consumer group. If you do not configure this parameter, all consumer groups are queried.

kafka-test

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The HTTP status code returned. The HTTP status code 200 indicates that the request is successful.

200
Messagestring

The returned message.

operation success.
RequestIdstring

The ID of the request.

808F042B-CB9A-4FBC-9009-00E7DDB6****
Successboolean

Indicates whether the request is successful.

true
ConsumerListobject []

The consumer groups.

ConsumerIdstring

The consumer group ID.

kafka-test
InstanceIdstring

The instance ID.

alikafka_post-cn-v0h18sav****
Remarkstring

The instance description.

test
RegionIdstring

The ID of the region where the instance resides.

cn-hangzhou
Tagsobject []

The tags.

Keystring

The tag key.

test
Valuestring

The tag value.

test
AutomaticallyCreatedGroupboolean

Indicates that the consumer group was automatically created by the system.

Totallong

The total number of entries returned.

12
PageSizeinteger

The number of entries returned per page.

10
CurrentPageinteger

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

1

Examples

Sample success responses

JSONformat

{
  "Code": 200,
  "Message": "operation success.",
  "RequestId": "808F042B-CB9A-4FBC-9009-00E7DDB6****",
  "Success": true,
  "ConsumerList": {
    "ConsumerVO": [
      {
        "ConsumerId": "kafka-test",
        "InstanceId": "alikafka_post-cn-v0h18sav****",
        "Remark": "test",
        "RegionId": "cn-hangzhou",
        "Tags": {
          "TagVO": [
            {
              "Key": "test",
              "Value": "test"
            }
          ]
        },
        "AutomaticallyCreatedGroup": true
      }
    ]
  },
  "Total": 12,
  "PageSize": 10,
  "CurrentPage": 1
}

Error codes

HTTP status codeError codeError message
400MissingParameterThe %s parameter is required.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-03-20The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Added Error Codes: 400
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: CurrentPage
    Added Input Parameters: PageSize
Output ParametersThe response structure of the API has changed.
2022-12-27The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.