Skip to content

MoveMachine

POST
/hopbox.admin.v1.MachineService/MoveMachine
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.

Connect-Protocol-Version
Connect-Protocol-Version

Define the version of the Connect protocol

number
Allowed value: 1

Define the version of the Connect protocol

Example

1
Connect-Timeout-Ms
Connect-Timeout-Ms

Define the timeout, in ms

number

Define the timeout, in ms

Example

1000
Media typeapplication/json
Any of:
id

MoveMachineRequest names one machine, and the node to move it to.

object
targetServerId
target_server_id

Target_server_id, when set, is the UUID of the node to move the machine to. Empty lets placement pick a node.

string
id
id

Id is the UUID of the machine.

string
Any of:
Any of:

Example generated

{
"targetServerId": "example",
"id": "example"
}

Success

Media typeapplication/json
MoveMachineResponse

MoveMachineResponse holds the new move.

object
move
move

Move is the move, in its first state.

object
id
id

Id is the UUID of the move.

string
machineId
machine_id

Machine_id is the UUID of the machine.

string
sourceServerId
source_server_id

Source_server_id is the UUID of the node that the machine leaves.

string
targetServerId
target_server_id

Target_server_id is the UUID of the node that the machine moves to.

string
state
state

State is the state of the move.

string
Allowed values: MOVE_STATE_UNSPECIFIED MOVE_STATE_STOPPING MOVE_STATE_PULLING MOVE_STATE_DONE MOVE_STATE_FAILED
targetState
target_state

Target_state is the target state of the machine before the move. The machine gets it back on the target node.

string
Allowed values: MACHINE_STATE_UNSPECIFIED MACHINE_STATE_PENDING MACHINE_STATE_STARTING MACHINE_STATE_RUNNING MACHINE_STATE_STANDBY MACHINE_STATE_HIBERNATED MACHINE_STATE_STOPPED MACHINE_STATE_FAILED MACHINE_STATE_DELETED MACHINE_STATE_MOVING
error
error

Error says why the move failed.

string
cleanupServerId
cleanup_server_id

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.

string
createTime
create_time

Create_time is when the move started.

string format: date-time
updateTime
update_time

Update_time is when the move changed last.

string format: date-time
giveBack
give_back

Give_back is the give-back that an instance admin asked for, with the answer of the target node.

string
Allowed values: MOVE_GIVE_BACK_UNSPECIFIED MOVE_GIVE_BACK_REQUESTED MOVE_GIVE_BACK_DONE MOVE_GIVE_BACK_KEPT
giveBackNote
give_back_note

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.

string

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"
}
}

Error

Media typeapplication/json
Connect Error
object
code

The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

string
Allowed values: canceled unknown invalid_argument deadline_exceeded not_found already_exists permission_denied resource_exhausted failed_precondition aborted out_of_range unimplemented internal unavailable data_loss unauthenticated
message

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.

string
details

A list of messages that carry the error details. There is no limit on the number of messages.

Array<object>

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
type

A URL that acts as a globally unique identifier for the type of the serialized message. For example: type.googleapis.com/google.rpc.ErrorInfo.

string
value

The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the type field.

string format: byte
debug
Debug

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
key
additional properties
any
key
additional properties
any
key
additional properties
any

Example

{
"code": "canceled"
}