A Compute Engine Operation.
Every mutating call (insert, delete, start, stop, …) is asynchronous
and returns an Operation. Wait for it with GcpCompute.Operations.wait/2 or
GcpCompute.Operations.poll_until_done/3.
Summary
Functions
True once the operation has reached the :done status.
True if the (done) operation carries an error payload.
Parse a decoded JSON operation map into a struct.
Where the operation lives — {:zone, z}, {:region, r}, or :global.
Convert a failed operation into a GcpCompute.Error.
Types
@type status() :: :pending | :running | :done | String.t()
@type t() :: %GcpCompute.Operation{ end_time: DateTime.t() | nil, error: map() | nil, http_error_message: String.t() | nil, http_error_status_code: integer() | nil, insert_time: DateTime.t() | nil, name: String.t() | nil, operation_type: String.t() | nil, progress: integer() | nil, raw: map(), region: String.t() | nil, start_time: DateTime.t() | nil, status: status() | nil, status_message: String.t() | nil, target_id: String.t() | nil, target_link: String.t() | nil, zone: String.t() | nil }
Functions
True once the operation has reached the :done status.
True if the (done) operation carries an error payload.
Parse a decoded JSON operation map into a struct.
Where the operation lives — {:zone, z}, {:region, r}, or :global.
@spec to_error(t()) :: GcpCompute.Error.t()
Convert a failed operation into a GcpCompute.Error.
Shape-matched rather than get_in/2-based: error?/1 is true for any
non-nil :error, so a binary error, or an "errors" value that is a map
instead of a list, used to raise ArgumentError on the failure path — the
worst place for a second failure.