REST Resource: projects.locations.operations

Resource: Operation

This operation resource represents operations that may have happened or are happening on the cluster. All fields are output only.

JSON representation
{
  "name": string,
  "zone": string,
  "operationType": enum (Type),
  "status": enum (Status),
  "detail": string,
  "statusMessage": string,
  "selfLink": string,
  "targetLink": string,
  "location": string,
  "startTime": string,
  "endTime": string,
  "progress": {
    object (OperationProgress)
  },
  "clusterConditions": [
    {
      object (StatusCondition)
    }
  ],
  "nodepoolConditions": [
    {
      object (StatusCondition)
    }
  ],
  "error": {
    object (Status)
  }
}
Fields
name

string

The server-assigned ID for the operation.

zone
(deprecated)

string

The name of the Google Compute Engine zone in which the operation is taking place. This field is deprecated, use location instead.

operationType

enum (Type)

The operation type.

status

enum (Status)

The current status of the operation.

detail

string

Detailed operation progress, if available.

statusMessage
(deprecated)

string

Output only. If an error has occurred, a textual description of the error. Deprecated. Use field error instead.

location

string

[Output only] The name of the Google Compute Engine zone or region in which the cluster resides.

startTime

string

[Output only] The time the operation started, in RFC3339 text format.

endTime

string

[Output only] The time the operation completed, in RFC3339 text format.

progress

object (OperationProgress)

Output only. [Output only] Progress information for an operation.

clusterConditions[]
(deprecated)

object (StatusCondition)

Which conditions caused the current cluster state. Deprecated. Use field error instead.

nodepoolConditions[]
(deprecated)

object (StatusCondition)

Which conditions caused the current node pool state. Deprecated. Use field error instead.

error

object (Status)

The error result of the operation in case of failure.

Type

Operation type.

Enums
TYPE_UNSPECIFIED Not set.
CREATE_CLUSTER Cluster create.
DELETE_CLUSTER Cluster delete.
UPGRADE_MASTER A master upgrade.
UPGRADE_NODES A node upgrade.
REPAIR_CLUSTER Cluster repair.
UPDATE_CLUSTER Cluster update.
CREATE_NODE_POOL Node pool create.
DELETE_NODE_POOL Node pool delete.
SET_NODE_POOL_MANAGEMENT Set node pool management.
AUTO_REPAIR_NODES Automatic node pool repair.
AUTO_UPGRADE_NODES Automatic node upgrade.
SET_LABELS Set labels.
SET_MASTER_AUTH Set/generate master auth materials
SET_NODE_POOL_SIZE Set node pool size.
SET_NETWORK_POLICY Updates network policy for a cluster.
SET_MAINTENANCE_POLICY Set the maintenance policy.

Status

Current status of the operation.

Enums
STATUS_UNSPECIFIED Not set.
PENDING The operation has been created.
RUNNING The operation is currently running.
DONE The operation is done, either cancelled or completed.
ABORTING The operation is aborting.

OperationProgress

Information about operation (or operation stage) progress.

JSON representation
{
  "name": string,
  "status": enum (Status),
  "metrics": [
    {
      object (Metric)
    }
  ],
  "stages": [
    {
      object (OperationProgress)
    }
  ]
}
Fields
name

string

A non-parameterized string describing an operation stage. Unset for single-stage operations.

status

enum (Status)

Status of an operation stage. Unset for single-stage operations.

metrics[]

object (Metric)

Progress metric bundle, for example: metrics: [{name: "nodes done", intValue: 15}, {name: "nodes total", intValue: 32}] or metrics: [{name: "progress", doubleValue: 0.56}, {name: "progress scale", doubleValue: 1.0}]

stages[]

object (OperationProgress)

Substages of an operation or a stage.

Metric

Progress metric is (string, int|float|string) pair.

JSON representation
{
  "name": string,

  // Union field value can be only one of the following:
  "intValue": string,
  "doubleValue": number,
  "stringValue": string
  // End of list of possible types for union field value.
}
Fields
name

string

Required. Metric name, e.g., "nodes total", "percent done".

Union field value. Strictly one of the values is required. value can be only one of the following:
intValue

string (int64 format)

For metrics with integer value.

doubleValue

number

For metrics with floating point value.

stringValue

string

For metrics with custom values (ratios, visual progress, etc.).

Status

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details.

You can find out more about this error model and how to work with it in the API Design Guide.

JSON representation
{
  "code": integer,
  "message": string,
  "details": [
    {
      "@type": string,
      field1: ...,
      ...
    }
  ]
}
Fields
code

integer

The status code, which should be an enum value of google.rpc.Code.

message

string

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.

details[]

object

A list of messages that carry the error details. There is a common set of message types for APIs to use.

An object containing fields of an arbitrary type. An additional field "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" }.

Methods

cancel

Cancels the specified operation.

get

Gets the specified operation.

list

Lists all operations in a project in the specified zone or all zones.