1
0
forked from docs/doc-exports
doc-exports/docs/dms/api-ref/CreatePartition.html
Chen, Junjie ef239b7410 DMS API-REF 20230201 Version
Reviewed-by: Ziuzko, Stanislav <stanislav.ziuzko@t-systems.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2024-07-03 17:41:26 +00:00

7.6 KiB

Adding Partitions to a Topic for a Kafka Instance

Function

This API is used to add partitions to a topic for a Kafka instance.

This API is out-of-date and may not be maintained in the future. Please use the API described in Modifying Topics of a Kafka Instance.

URI

POST /v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions-reassignment

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain a project ID, see Obtaining a Project ID.

instance_id

Yes

String

Instance ID.

topic

Yes

String

Topic name.

Request

Table 2 Request parameter

Parameter

Mandatory

Type

Description

partition

No

Integer

Total number of partitions after the addition. The value must be larger than current number of partitions. Maximum value: 100.

Response

None.

Example Request

Adding partitions to a topic.

POST https://{endpoint}/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions-reassignment

{
  "partition" : 3
}

Example Response

None.

Status Code

Status Code

Description

204

Partitions added successfully.

Error Code

For details, see Error Codes.