Open a UDP port at the sandbox's IPv6 address
Opens a UDP port at the sandbox's own IPv6 address to the sources from lists, and to nobody else, or gives a port that is open those sources in place of the ones it had. Inbound is closed by default: what comes to the address is let in when it belongs to a connection the node has seen, when it is a ping, or when it is to a port open to its source; the rest is refused at once (a connection with a reset). ::/0 is everybody, and has to be said. The port is open from the moment the call answers, also while the sandbox sleeps (what comes wakes it). A sandbox opens 64 ports at the most.
Takes write.
https://api.glac.ai/v1/sandboxes/{id}/udp/{port}Autorizzazione
Parametri di percorso
Parametri di intestazione
Corpo della richiestaJSONobbligatorio
Returns
200
The port as it is open now, and where it is reached.
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_port: the port in the path is no number from 1 to 65535; invalid_from: from is missing, empty, longer than 32, or has what is no IPv6 prefix with nothing set past its length; invalid_inbound: the sandbox has 64 ports open already.
- 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. sandbox_not_found: no such sandbox.
- 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. no_ipv6: the sandbox has no IPv6 address of its own (its node has no pool, or its template's agent is from before addresses of their own), and nothing can be opened at one. static_instance: the sandbox is the instance the node keeps of a static spec (GET /internal/static): what is open at its address is its spec's.
- 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.