Creating a Topic Quota
Function
This API is used to submit a topic-level quota creation task to a Kafka instance. If the task is successfully submitted, a job ID of the quota task is returned.
Calling Method
For details, see Calling APIs.
URI
POST /v2/kafka/{project_id}/instances/{instance_id}/kafka-topic-quota
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| instance_id | Yes | String | Definition: Instance ID. You can call the API for querying all instances to obtain the instance ID. The instance ID is in the response body. Constraints: N/A Range: N/A Default Value: N/A |
| project_id | Yes | String | Definition: Project ID. For details, see Obtaining a Project ID. Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| topic | No | String | Topic name. |
| producer_byte_rate | No | Integer | Producer rate. |
| consumer_byte_rate | No | Integer | Consumer rate. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| job_id | String | ID of a quota configuration task. |
Example Requests
Deleting a topic quota
POST https://{endpoint}/v2/kafka/{project_id}/instances/{instance_id}/kafka-topic-quota
{
"topic" : "topic-001",
"producer_byte_rate" : 1024,
"consumer_byte_rate" : 2048
} Example Responses
Status code: 200
Topic quota deleted.
{
"job_id" : "ff8080828bdc0f64018bdcadfd8f00d7"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Topic quota deleted. |
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.