Rename a snapshot or change when it expires
A merge: fields left out stay as they are.
Takes write.
https://api.glac.ai/v1/snapshots/{id}Autorización
Parámetros de ruta
Parámetros de encabezado
Cuerpo de la solicitudJSONopcional
Returns
200
The snapshot as it is now.
- replicatedbooleanrequired
Whether the snapshot is in the object store the node copies its disks to, complete (every part of it there and its index written last), so that a node of the site that copies to the same store can make a sandbox from it, fork from it and roll a sandbox back to it. A node that copies its disks (
--upload) publishes every snapshot it takes, in the background, a second or two after the call that took it answered. Its disk is not copied: the publication pins the state the sandbox's own disk had in the store at the snapshot, and carries only the blocks that were not there yet; its memory goes as a sleep's image does. False until then, and for good for a snapshot of a node that copies to no store, one taken before snapshots were published, and one of a machine whose memory is not in layers: such a snapshot is used on its node, as ever. - last_replication_statusstringrequired
How its publication stands:
pending(taken, not asked of the node's uploader yet: its files are being forced),replicating(the uploader is at it),replicated,failed(the last try failed, and the node tries again, twenty seconds later and twice as long after each failure, at most a quarter of an hour),not_replicable(it is never published, for the reasons underreplicated). - memory_loadablebooleanrequired
Whether a sandbox made from the snapshot on this node continues from the snapshot's instant, processes included. False: the snapshot's memory was saved by a build of Firecracker the host does not keep, or with other settings for the machine's devices than the node starts machines with now (or the snapshot is
lost); one that a kept build saved is loaded by that build (Node.firecrackers). The snapshot is kept as it is, and is loadable again on a node that is started with what saved it. Meanwhile a sandbox created from it, or rolled back to it, gets the snapshot's disk and starts from that: nothing that ran in the snapshot runs in it, and itshost_failuresays so (causenode_changed). - statusstringrequired
ready: the call that takes a snapshot returns when it is complete.lost: the node's host went down hard before the snapshot's files were on its disk (the node writes them there within a second or two of the call's answer, without holding the call up); it is listed so that its owner knows, sandboxes cannot be created from it or restored to it (409snapshot_lost), and it can be deleted. - size_bytesintegerrequired
What it holds, in bytes, fixed when it is taken: what its sandbox had of its own at that moment (the pages of its memory that are not its template's, the state of its devices, the layer of its disk over the image) and nothing of the template or the image. The three parts a sleeping sandbox is counted as keeping. It is the same whatever else exists: another snapshot of the sandbox holds its own number, and deleting one changes no other's. A node counts a snapshot as keeping this for as long as it is there (a
lostone as keeping nothing).format: int64 · minimum: 0
400
The request is not one this call takes. invalid_json: the body is not a JSON object; unknown_field: the body has a field this call does not take; unknown_parameter: the query has a parameter this call does not take; invalid_field: a field or query parameter has the wrong type or is out of range; invalid_name: name is not a valid name; expires_in_the_past: expires_at is not in the future.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.
401
missing_api_key, invalid_api_key, expired_api_key, invalid_token.
403
The credential may not do this. needs_api_key: a sandbox token cannot do this.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.
404
Something the request names does not exist. snapshot_not_found: no such snapshot.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.
409
The state of something stands in the way. name_taken: another snapshot has the name.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.
default
Any other failure, in the same shape. internal (500): the node failed; the message says no more, and the node's log has the reason under the request's id. unavailable (503, retryable): no_capacity, every network slot of the node is in use; memory_full, a machine the call has to start (made, woken, booted from its disk, resumed, rolled back, built) does not fit in the host's memory beside what the machines that run on it are promised, and nothing paused or idle could be put to sleep to make room for it (memory of the node); drive_full, the call would have a template built and the node's data drive has no room for one (drive of the node); unavailable, the node is shutting down, the sandbox was still starting after 10 minutes, or it did not answer, or it is being moved to this node (with Retry-After: 1); fenced, the node's lease fences the sandbox (Node.lease). moved (409): the sandbox was moved to another node, which to names.
- exec_idoptionalstring
With
sandbox_movedofPOST …/run: the id of the command the call started and waited for, which goes on where the sandbox went: wait for it there through the control plane withGET …/exec/{exec_id}?wait_seconds=once the move is over. The same call made again starts the command a second time, unless it comes with the same Idempotency-Key.