This API is used to reassign replicas of a topic for a Kafka instance.
POST /v2/{project_id}/instances/{instance_id}/management/topics/{topic}/replicas-reassignment
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
instance_id |
Yes |
String |
Instance ID. |
topic |
Yes |
String |
Topic name. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
partitions |
No |
Array of partitions objects |
Assignment of replicas of the partition after the change. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
partition |
No |
Integer |
Partition ID. |
replicas |
No |
Array of integers |
ID of the broker where the replica is expected to reside. The first integer in the array represents the leader replica broker ID. All partitions must have the same number of replicas. The number of replicas cannot be larger than the number of brokers. |
None
POST https://{endpoint}/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/replicas-reassignment { "partitions" : [ { "partition" : 1, "replicas" : [ 1, 2 ] }, { "partition" : 0, "replicas" : [ 0, 1 ] } ] }
None
Status Code |
Description |
---|---|
204 |
The replicas are reassigned successfully. |
See Error Codes.