ee.data.getOperation

  • The API retrieves the status of an operation or a list of operations, providing details like progress, errors, and timing.

  • Each operation status includes information such as name, completion status, error details, and operation-specific metadata like state, description, and resource usage.

  • Operation metadata provides insights into the operation's lifecycle, including creation, start, update, and end times, as well as retry attempts and resource consumption.

  • Users can fetch operation details using the ee.data.getOperation() function, providing the operation name and an optional callback for asynchronous execution.

  • Upon successful execution, the function returns a dictionary containing the operation status or a map of operation names to their respective statuses.

Gets information on an operation or list of operations.

See more details on Operations here: https://cloud.google.com/apis/design/design_patterns#long_running_operations

Returns operation status, or a map from operation names to status. Each Operation contains:

  - name: operation name in the format projects/X/operations/Y

  - done: true when operation has finished running.

  - error: may be set when done=true. Contains message and other fields from https://cloud.google.com/tasks/docs/reference/rpc/google.rpc#status

  - metadata, which contains

    + state: PENDING, RUNNING, CANCELLING, SUCCEEDED, CANCELLED, or FAILED

    + description: Supplied task description

    + type: EXPORT_IMAGE, EXPORT_FEATURES, etc.

    + create_time: Time the operation was first submitted.

    + update_time: Timestamp of most recent update.

    + start_time: Time the operation started, when so.

    + end_time: Time the operation finished running, when so.

    + attempt: Number of retries of this task, starting at 1.

    + destination_uris: Resources output by this operation.

    + batch_eecu_usage_seconds: CPU used by this operation.

UsageReturns
ee.data.getOperation(operationName, callback)Dictionary<api.Operation>|api.Operation
ArgumentTypeDetails
operationNameList<String>|StringOperation name(s).
callbackFunction, optionalAn optional callback. If not supplied, the call is made synchronously.