Skip to content

RenameMachine

POST
/hopbox.v1.MachineService/RenameMachine
curl --request POST \
--url https://example.com/hopbox.v1.MachineService/RenameMachine \
--header 'Connect-Protocol-Version: 1' \
--header 'Connect-Timeout-Ms: 1000' \
--header 'Content-Type: application/json' \
--data '{ "newName": "example", "id": "example" }'

RenameMachine gives a machine a new name. The old name stays reserved for the org for 7 days. A rename reboots a running machine, and then waits for the new boot. A machine in standby or hibernated, or on its way in or out of either, refuses a new name with failed_precondition: resume or wake it first.

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

RenameMachineRequest names one machine and its new name.

object
newName
new_name

New_name is the new name.

string
id
id

Id is the UUID of the machine.

string
Any of:
Any of:

Example generated

{
"newName": "example",
"id": "example"
}

Success

Media typeapplication/json
RenameMachineResponse

RenameMachineResponse holds the machine after the wait.

object
machine
machine

Machine is the machine at the end of the wait.

object
id
id

Id is the UUID of the machine.

string
orgId
org_id

Org_id is the UUID of the org of the machine.

string
name
name

Name is the name of the machine, unique in the install. It is the first label of its URL.

string
state
state

State is the current state.

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
targetState
target_state

Target_state is the state that the machine must reach.

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
size
size

Size is the size of the machine.

object
name
name

Name is the name of the size, for example default.

string
vcpus
vcpus

Vcpus is the count of vCPUs.

integer format: int32
memoryBytes
memory_bytes

Memory_bytes is the RAM, in bytes.

string format: int64
diskBytes
disk_bytes

Disk_bytes is the size of the sparse disk, in bytes.

string format: int64
imageName
image_name

Image_name is the name of the image that the machine started from, for example default.

string
imageDigest
image_digest

Image_digest is the digest of that image: “sha256:” and 64 hex digits.

string
creatorAccountId
creator_account_id

Creator_account_id is the UUID of the account that made the machine. It is empty for a machine that an org key made, and after the delete of the account.

string
creatorKeyId
creator_key_id

Creator_key_id is the UUID of the org key that made the machine, or empty.

string
shared
shared

Shared is true for a machine that is open to the whole org.

boolean
restartPolicy
restart_policy

Restart_policy says what happens when the machine stops by itself.

string
Allowed values: RESTART_POLICY_UNSPECIFIED RESTART_POLICY_ALWAYS RESTART_POLICY_NEVER
startCommand
start_command

Start_command is the command that the guest agent runs after each boot, or empty.

string
autoDeleteTimeout
auto_delete_timeout

Auto_delete_timeout is the time without use after which hopbox deletes the machine. Unset is off. The delete comes 1 to 2 minutes after this time from the last recorded use: a use is recorded at most once a minute, and the auto-delete job runs once a minute.

string format: duration
url
url

Url is https://., or empty while the install has no domain.

string
urlPort
url_port

Url_port is the port in the machine that the URL reaches. The default is 8000.

integer format: int32
urlVisibility
url_visibility

Url_visibility says who can open the URL.

string
Allowed values: URL_VISIBILITY_UNSPECIFIED URL_VISIBILITY_PRIVATE URL_VISIBILITY_PUBLIC
sshPort
ssh_port

Ssh_port is the SSH port of the machine on the edge servers, 10000 to 30000. It never changes.

integer format: int32
rebootPending
reboot_pending

Reboot_pending is true while a reboot that a request asked for did not run yet.

boolean
lastActivityTime
last_activity_time

Last_activity_time is the last use of the machine, for the auto-delete timeout.

string format: date-time
stateChangeTime
state_change_time

State_change_time is the time of the last change of the current state.

string format: date-time
deleteRequestTime
delete_request_time

Delete_request_time is the time of the delete request, or unset.

string format: date-time
version
version

Version grows by 1 with each change of the machine: by a request, by a report of its executor, or by an env change that reaches it.

string format: int64
createTime
create_time

Create_time is the creation time of the machine.

string format: date-time
updateTime
update_time

Update_time is the time of the last change that a request made.

string format: date-time
skippedEnvVars
skipped_env_vars

Skipped_env_vars is the count of env vars and secrets that the guest agent of the running machine left out, because their names break its rules.

integer format: int32
memorySaved
memory_saved

Memory_saved is true while the node keeps a memory file of the machine: after a hibernate, and after a wake that failed. DiscardMemory drops it.

boolean
autoStandbyTimeout
auto_standby_timeout

Auto_standby_timeout is the time without inbound traffic after which a running machine goes to standby. Unset is off. Like the auto-delete timeout, it counts from last_activity_time, 1 to 2 minutes late.

string format: duration
autoHibernateTimeout
auto_hibernate_timeout

Auto_hibernate_timeout is the time without inbound traffic after which the machine hibernates, from running or from standby. Unset is off. Like the auto-delete timeout, it counts from last_activity_time, 1 to 2 minutes late.

string format: duration
backupPeriod
backup_period

Backup_period is the time between two scheduled backups of the machine. Unset is off, the default.

string format: duration
backupRetention
backup_retention

Backup_retention is how long hopbox keeps each backup of the machine. The default is 7 days.

string format: duration
duration
duration

Duration is how long the call took, the wait included.

string format: duration
done
done

Done is true when the machine has its new name, and a running machine runs its new boot.

boolean

Example

{
"machine": {
"state": "MACHINE_STATE_UNSPECIFIED",
"targetState": "MACHINE_STATE_UNSPECIFIED",
"restartPolicy": "RESTART_POLICY_UNSPECIFIED",
"urlVisibility": "URL_VISIBILITY_UNSPECIFIED",
"lastActivityTime": "2023-01-15T01:30:15.01Z",
"stateChangeTime": "2023-01-15T01:30:15.01Z",
"deleteRequestTime": "2023-01-15T01:30:15.01Z",
"createTime": "2023-01-15T01:30:15.01Z",
"updateTime": "2023-01-15T01:30:15.01Z"
}
}

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