MoveMachine
const url = 'https://example.com/hopbox.admin.v1.MachineService/MoveMachine';const options = { method: 'POST', headers: { 'Connect-Protocol-Version': '1', 'Connect-Timeout-Ms': '1000', 'Content-Type': 'application/json' }, body: '{"targetServerId":"example","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/MoveMachine \ --header 'Connect-Protocol-Version: 1' \ --header 'Connect-Timeout-Ms: 1000' \ --header 'Content-Type: application/json' \ --data '{ "targetServerId": "example", "id": "example" }'MoveMachine moves any machine cold to another node: its node stops it, the other node pulls its disk, and boots it when its target was running. The machine keeps its name, URL, SSH port, and address. The call returns at once with the move, and ListMoves follows it. A retry with the same idempotency key returns the first result.
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”MoveMachineRequest names one machine, and the node to move it to.
object
Target_server_id, when set, is the UUID of the node to move the machine to. Empty lets placement pick a node.
Id is the UUID of the machine.
Example generated
{ "targetServerId": "example", "id": "example"}Responses
Section titled “Responses”Success
MoveMachineResponse holds the new move.
object
Move is the move, in its first state.
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"}