Creating a Topic Quota

Updated on 2025-05-21 GMT+08:00

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

instance_id

Yes

String

Parameter description:

Instance ID. To obtain it, log in to the Kafka console and find the instance ID on the Kafka instance details page.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

project_id

Yes

String

Parameter description:

Project ID. For details, see Obtaining a Project ID.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Request Parameters

Table 2 Request body 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

Table 3 Response body parameters

Parameter

Type

Description

job_id

String

ID of a quota configuration task.

Example Requests

Deleting topic quotas

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

Successful

{
  "job_id" : "ff8080828bdc0f64018bdcadfd8f00d7"
}

Status Codes

Status Code

Description

200

Successful

Error Codes

See Error Codes.

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback