Executes a specified operation on a migration task.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
rocketmq:ExecuteMigrationOperation |
update |
*Instance
|
None | None |
Request syntax
POST /migrations/{migrationId}/stages/{stageType}/operations/{operationId}/execute HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| migrationId |
integer |
Yes |
The migration ID. |
44 |
| instanceId |
string |
No |
The instance ID. |
rmq-cn-x0r37kel*** |
| stageType |
string |
Yes |
The migration stage type. The value is MIGRATE_MESSAGE. Valid values:
|
MIGRATE_MESSAGE |
| operationId |
integer |
Yes |
The migration operation ID. |
2729 |
| body |
object |
No |
The request body structure. |
|
| operationParam |
object |
No |
The operation parameters. |
|
| paramData |
any |
No |
The parameter information. The parameter is a JSON string. For more information, see the example. The valid values for the `action` (operation) field are as follows:
The valid values for the `targetStage` (target stage) field are as follows:
Note
|
迁移前进:{"action":"MIGRATE_FORWARD","targetStage":"MIGRATE_FINISH"} 迁移后退:{"action":"MIGRATE_BACKWARD","targetStage":"MIGRATE_WAIT"} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Result |
||
| requestId |
string |
The request ID. |
814BCD66-2D76-5080-AAD2-E50E5BDB0995 |
| success |
boolean |
Indicates whether the request was successful. |
true |
| data |
object |
The returned result. |
|
| operationId |
integer |
The migration operation ID. |
110 |
| migrationId |
integer |
The migration ID. |
6 |
| stageType |
string |
The migration stage type. Valid values:
|
MIGRATE_MESSAGE |
| operationType |
string |
The operation type. The value is MIGRATE_MESSAGE (Migrate messages). |
MIGRATE_MESSAGE |
| operationStatus |
string |
The operation status:
Valid values:
|
DOING |
| operationKey |
string |
The primary key of the operation object. |
normal-topic-1 |
| businessStatus |
string |
The business status of the operation:
Valid values:
|
MIGRATE_WAIT |
| operationParam |
object |
The operation parameters. |
|
| paramData |
any |
The parameter information. |
{"action":"MIGRATE_FORWARD","targetStage":"MIGRATE_FINISH"} |
| operationResult |
object |
The operation result. |
|
| resultData |
any |
The operation result. |
{ "checkStatus": "WAIT_CHECK", "sourceTopicStatus": "PERM_6", "targetTopicStatus": "PERM_4", "checkResult": {}, "migrateStage": "DOUBLE_READ" } |
| createTime |
string |
The creation time. |
2022-08-01 20:05:50 |
| updateTime |
string |
The modification time. |
2022-08-01 20:05:50 |
| code |
string |
The error code. |
Topic.NotFound |
| message |
string |
The error message. |
The topic already exists. |
| httpStatusCode |
integer |
The HTTP status code. |
200 |
| dynamicCode |
string |
The dynamic error code. |
InstanceId |
| dynamicMessage |
string |
The dynamic error message. |
instanceId |
Examples
Success response
JSON format
{
"requestId": "814BCD66-2D76-5080-AAD2-E50E5BDB0995",
"success": true,
"data": {
"operationId": 110,
"migrationId": 6,
"stageType": "MIGRATE_MESSAGE",
"operationType": "MIGRATE_MESSAGE",
"operationStatus": "DOING",
"operationKey": "normal-topic-1",
"businessStatus": "MIGRATE_WAIT",
"operationParam": {
"paramData": "{\"action\":\"MIGRATE_FORWARD\",\"targetStage\":\"MIGRATE_FINISH\"}"
},
"operationResult": {
"resultData": "{\n \"checkStatus\": \"WAIT_CHECK\",\n \"sourceTopicStatus\": \"PERM_6\",\n \"targetTopicStatus\": \"PERM_4\",\n \"checkResult\": {},\n \"migrateStage\": \"DOUBLE_READ\"\n}"
},
"createTime": "2022-08-01 20:05:50",
"updateTime": "2022-08-01 20:05:50"
},
"code": "Topic.NotFound",
"message": "The topic already exists.",
"httpStatusCode": 200,
"dynamicCode": "InstanceId",
"dynamicMessage": "instanceId"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.