nsc reservation wait

Waits for a reservation to be fulfilled, returning the instance id.

reservation wait blocks until a pending capacity reservation is fulfilled, then prints the resulting instance ID. This is useful in scripts that need to wait for capacity to become available before proceeding — start a reservation, hand its ID to reservation wait, and continue once an instance is actually ready rather than polling reservation describe in a loop.

Usage

nsc reservation wait <reservation_id> [--cidfile <path>] [--wait_timeout <duration>]

Example

$ nsc reservation wait rsv_8f3k2m9p1q --cidfile /tmp/instance_id
  Instance ready: h9am86n6gi25m
 
$ cat /tmp/instance_id
  h9am86n6gi25m

Options

--cidfile <path>

If specified, write the resulting instance ID to this file. If the file already exists, it will be overwritten. This is useful for automation that needs to capture the ID of the instance backing a fulfilled reservation without parsing the terminal output — see the example above.

--wait_timeout <duration>

For how long to wait until the reservation is fulfilled. Defaults to 10m. Set to 0 to wait until the reservation's own deadline instead of applying a separate client-side timeout — useful when you'd rather let the reservation itself decide how long is too long.