Modifying User or Client Quotas
Function
This API is used to submit a task to modify user or client quotas of a Kafka instance. A job_id is returned if the task succeeds.
URI
PUT /v2/kafka/{project_id}/instances/{instance_id}/kafka-user-client-quota
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
instance_id |
Yes |
String |
Instance ID. |
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
user |
No |
String |
Username. Either the username or the client ID must be specified if the quotas are not applied to all users or clients. |
client |
No |
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 |
No |
Boolean |
Whether to use the default user settings.
|
client-default |
No |
Boolean |
Whether to use the default client settings.
|
producer-byte-rate |
No |
Long |
Production rate limit. The unit is byte/s. |
consumer-byte-rate |
No |
Long |
Consumption rate limit. The unit is byte/s.
NOTE:
Either the production rate limit or the consumption rate limit must be specified.
|
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
job_id |
String |
ID of the task for modifying quotas. |
Example Requests
Modifying user or client quotas
PUT https://{endpoint}/v2/kafka/{project_id}/instances/{instance_id}/kafka-user-client-quota { "user" : "", "client" : "", "user-default" : false, "client-default" : true, "producer-byte-rate" : 3145728, "consumer-byte-rate" : 2097152 }
Example Responses
Status code: 200
User or client quotas modified.
{ "job_id" : "8abfa7b38ba79a20018ba9afc550576a" }
Status Codes
Status Code |
Description |
---|---|
200 |
User or client quotas modified. |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot