CancelMove
const url = 'https://example.com/hopbox.admin.v1.MachineService/CancelMove';const options = { method: 'POST', headers: { 'Connect-Protocol-Version': '1', 'Connect-Timeout-Ms': '1000', 'Content-Type': 'application/json' }, body: '{"giveBack":true,"withdrawGiveBack":true,"id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/hopbox.admin.v1.MachineService/CancelMove \ --header 'Connect-Protocol-Version: 1' \ --header 'Connect-Timeout-Ms: 1000' \ --header 'Content-Type: application/json' \ --data '{ "giveBack": true, "withdrawGiveBack": true, "id": "example" }'CancelMove ends the move of a machine that runs. The machine stays on its source node with its disk, or goes back there, stopped. The target node removes what it pulled. With give_back, it also asks the target node to give back a machine that a failed move left there while its source keeps a copy of its disk.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Define the version of the Connect protocol
Define the version of the Connect protocol
Example
1Define the timeout, in ms
Define the timeout, in ms
Example
1000Request Bodyrequired
Section titled “Request Bodyrequired”CancelMoveRequest names the machine whose move ends.
object
Give_back asks the target node of the move to give the machine back to the source node, when the move fails or failed while the machine was not in the state moving on the target, and the source keeps a copy of its disk. The target node gives it back only when it never proved the pull of the move. Otherwise it keeps the machine, and the source removes its copy. The answer shows in give_back of the move.
Withdraw_give_back takes back a give-back that waits for the answer of the target node. The move gets back its state from before the request, and the spec of the target no longer names it. It cancels no move.
Id is the UUID of the machine.
CancelMoveRequest names the machine whose move ends.
object
Give_back asks the target node of the move to give the machine back to the source node, when the move fails or failed while the machine was not in the state moving on the target, and the source keeps a copy of its disk. The target node gives it back only when it never proved the pull of the move. Otherwise it keeps the machine, and the source removes its copy. The answer shows in give_back of the move.
Withdraw_give_back takes back a give-back that waits for the answer of the target node. The move gets back its state from before the request, and the spec of the target no longer names it. It cancels no move.
Name is the name of the machine.
Example generated
{ "giveBack": true, "withdrawGiveBack": true, "id": "example"}Responses
Section titled “Responses”Success
CancelMoveResponse holds the move that ended.
object
Move is the move, in the state failed.
object
Id is the UUID of the move.
Machine_id is the UUID of the machine.
Source_server_id is the UUID of the node that the machine leaves.
Target_server_id is the UUID of the node that the machine moves to.
State is the state of the move.
Target_state is the target state of the machine before the move. The machine gets it back on the target node.
Error says why the move failed.
Cleanup_server_id is the UUID of the node that still holds an old copy of the files of the machine: the source node after a move that is done, the target node after a move that failed. It is empty once that node removed them.
Create_time is when the move started.
Update_time is when the move changed last.
Give_back is the give-back that an instance admin asked for, with the answer of the target node.
Give_back_note says why the target node does not answer a give-back that waits, such as a disk file on the target without the proof of the pull. It is empty otherwise.
Example
{ "move": { "state": "MOVE_STATE_UNSPECIFIED", "targetState": "MACHINE_STATE_UNSPECIFIED", "createTime": "2023-01-15T01:30:15.01Z", "updateTime": "2023-01-15T01:30:15.01Z", "giveBack": "MOVE_GIVE_BACK_UNSPECIFIED" }}default
Section titled “default”Error
Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation
object
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
A list of messages that carry the error details. There is no limit on the number of messages.
Contains an arbitrary serialized message along with a @type that describes the type of the serialized message, with an additional debug field for ConnectRPC error details.
object
A URL that acts as a globally unique identifier for the type of the serialized message. For example: type.googleapis.com/google.rpc.ErrorInfo.
The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the type field.
Deserialized error detail payload. The ‘type’ field indicates the schema. This field is for easier debugging and should not be relied upon for application logic.
object
Example
{ "code": "canceled"}