Querying User or Client Quotas
Function
This API is used to query quotas of a Kafka instance. A list of quotas is returned if the query succeeds.
Calling Method
For details, see Calling APIs.
URI
GET /v2/kafka/{project_id}/instances/{instance_id}/kafka-user-client-quota
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details, see Obtaining a Project ID. |
| instance_id | Yes | String | Instance ID. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| offset | No | Integer | Offset. The records after this offset will be queried. |
| limit | No | Integer | Maximum number of records that can be returned. |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| quotas | Array of QuotaResp objects | Client quotas. |
| count | Integer | Number of user or client quotas. |
| Parameter | Type | Description |
|---|---|---|
| user | String | Username. Either the username or the client ID must be specified if the quotas are not applied to all users or clients. |
| client | String | Client ID. Either the username or the client ID must be specified if the quotas are not applied to all users or clients. |
| user-default | Boolean | Whether to use the default user settings. |
| client-default | Boolean | Whether to use the default client settings. |
| producer-byte-rate | Long | Production rate limit. The unit is byte/s. |
| consumer-byte-rate | Long | Consumption rate limit. The unit is byte/s. NOTE: Either the production rate limit or the consumption rate limit must be specified. |
Example Requests
None
Example Responses
Status code: 200
Client quotas queried.
{
"quotas" : [ {
"user" : "",
"client" : "",
"user-default" : false,
"client-default" : true,
"producer-byte-rate" : 2097152,
"consumer-byte-rate" : 2097152
} ],
"count" : 1
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Client quotas queried. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.