Reassigning Replicas of 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 Reassigning Replicas of a Topic for a Kafka Instance.
URI
POST /v1.0/{project_id}/instances/{instance_id}/manage/topics/{topic}/replicas-reassignment
The following table describes the parameters.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| project_id | String | Yes | Project ID. |
| instance_id | String | Yes | Instance ID. |
| topic | String | Yes | Topic name. |
Request
Request parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| partitions | Array of object partitions | Yes | Assignment of replicas of the partition after the change. For details about the parameters, see Table 3. |
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| partition | Integer | Yes | Partition ID. |
| replicas | Array of integer | Yes | 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. |
Example request
{
"partitions": [
{
"partition": 1,
"replicas": [
1,
2
]
},
{
"partition": 0,
"replicas": [
0,
1
]
}
]
} Response
Response parameters
None.
Example response
None.
Status Code
The following table describes the status code for successful operations.
| Status Code | Description |
|---|---|
| 204 | Replicas re-assigned successfully. |
Last Article: Adding Partitions to a Topic for a Kafka Instance
Next Article: Other APIs
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.