{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-kubernetes-engine/json-schema/google-kubernetes-engine-operation-schema.json",
  "title": "Operation",
  "description": "This operation resource represents operations that may have happened or are happening on the cluster. All fields are output only.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-kubernetes-engine-container-projects-api-openapi.yml#/components/schemas/Operation",
  "type": "object",
  "properties": {
    "detail": {
      "description": "Output only. Detailed operation progress, if available.",
      "type": "string",
      "readOnly": true
    },
    "selfLink": {
      "description": "Output only. Server-defined URI for the operation. Example: `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`.",
      "type": "string",
      "readOnly": true
    },
    "statusMessage": {
      "type": "string",
      "description": "Output only. If an error has occurred, a textual description of the error. Deprecated. Use the field error instead.",
      "readOnly": true,
      "deprecated": true
    },
    "startTime": {
      "description": "Output only. The time the operation started, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.",
      "readOnly": true,
      "type": "string"
    },
    "progress": {
      "$ref": "#/$defs/OperationProgress",
      "description": "Output only. Progress information for an operation."
    },
    "targetLink": {
      "type": "string",
      "description": "Output only. Server-defined URI for the target of the operation. The format of this is a URI to the resource being modified (such as a cluster, node pool, or node). For node pool repairs, there may be multiple nodes being repaired, but only one will be the target. Examples: - ## `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` ## `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node`",
      "readOnly": true
    },
    "zone": {
      "type": "string",
      "description": "Output only. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation is taking place. This field is deprecated, use location instead.",
      "readOnly": true,
      "deprecated": true
    },
    "status": {
      "type": "string",
      "description": "Output only. The current status of the operation.",
      "enum": [
        "STATUS_UNSPECIFIED",
        "PENDING",
        "RUNNING",
        "DONE",
        "ABORTING"
      ],
      "readOnly": true
    },
    "name": {
      "description": "Output only. The server-assigned ID for the operation.",
      "readOnly": true,
      "type": "string"
    },
    "nodepoolConditions": {
      "items": {
        "$ref": "#/$defs/StatusCondition"
      },
      "type": "array",
      "description": "Which conditions caused the current node pool state. Deprecated. Use field error instead.",
      "deprecated": true
    },
    "operationType": {
      "readOnly": true,
      "type": "string",
      "description": "Output only. The operation type.",
      "enum": [
        "TYPE_UNSPECIFIED",
        "CREATE_CLUSTER",
        "DELETE_CLUSTER",
        "UPGRADE_MASTER",
        "UPGRADE_NODES",
        "REPAIR_CLUSTER",
        "UPDATE_CLUSTER",
        "CREATE_NODE_POOL",
        "DELETE_NODE_POOL",
        "SET_NODE_POOL_MANAGEMENT",
        "AUTO_REPAIR_NODES",
        "AUTO_UPGRADE_NODES",
        "SET_LABELS",
        "SET_MASTER_AUTH",
        "SET_NODE_POOL_SIZE",
        "SET_NETWORK_POLICY",
        "SET_MAINTENANCE_POLICY",
        "RESIZE_CLUSTER",
        "FLEET_FEATURE_UPGRADE"
      ]
    },
    "endTime": {
      "description": "Output only. The time the operation completed, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.",
      "type": "string",
      "readOnly": true
    },
    "error": {
      "$ref": "#/$defs/Status",
      "description": "The error result of the operation in case of failure."
    },
    "location": {
      "description": "Output only. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) or [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) in which the cluster resides.",
      "type": "string",
      "readOnly": true
    },
    "clusterConditions": {
      "description": "Which conditions caused the current cluster state. Deprecated. Use field error instead.",
      "items": {
        "$ref": "#/$defs/StatusCondition"
      },
      "type": "array",
      "deprecated": true
    }
  },
  "$defs": {
    "Metric": {
      "type": "object",
      "properties": {
        "stringValue": {
          "description": "For metrics with custom values (ratios, visual progress, etc.).",
          "type": "string"
        },
        "intValue": {
          "description": "For metrics with integer value.",
          "type": "string",
          "format": "int64"
        },
        "name": {
          "description": "Required. Metric name, e.g., \"nodes total\", \"percent done\".",
          "type": "string"
        },
        "doubleValue": {
          "description": "For metrics with floating point value.",
          "type": "number",
          "format": "double"
        }
      },
      "description": "Progress metric is (string, int|float|string) pair."
    },
    "OperationProgress": {
      "properties": {
        "name": {
          "description": "A non-parameterized string describing an operation stage. Unset for single-stage operations.",
          "type": "string"
        },
        "status": {
          "enum": [
            "STATUS_UNSPECIFIED",
            "PENDING",
            "RUNNING",
            "DONE",
            "ABORTING"
          ],
          "description": "Status of an operation stage. Unset for single-stage operations.",
          "type": "string"
        },
        "stages": {
          "description": "Substages of an operation or a stage.",
          "items": {
            "$ref": "#/$defs/OperationProgress"
          },
          "type": "array"
        },
        "metrics": {
          "items": {
            "$ref": "#/$defs/Metric"
          },
          "description": "Progress metric bundle, for example: metrics: [{name: \"nodes done\", int_value: 15}, {name: \"nodes total\", int_value: 32}] or metrics: [{name: \"progress\", double_value: 0.56}, {name: \"progress scale\", double_value: 1.0}]",
          "type": "array"
        }
      },
      "type": "object",
      "description": "Information about operation (or operation stage) progress."
    },
    "Status": {
      "type": "object",
      "description": "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](https://github.com/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](https://cloud.google.com/apis/design/errors).",
      "properties": {
        "details": {
          "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.",
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": {
              "description": "Properties of the object. Contains field @type with type URL."
            }
          }
        },
        "code": {
          "type": "integer",
          "format": "int32",
          "description": "The status code, which should be an enum value of google.rpc.Code."
        },
        "message": {
          "description": "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.",
          "type": "string"
        }
      }
    },
    "StatusCondition": {
      "properties": {
        "code": {
          "enum": [
            "UNKNOWN",
            "GCE_STOCKOUT",
            "GKE_SERVICE_ACCOUNT_DELETED",
            "GCE_QUOTA_EXCEEDED",
            "SET_BY_OPERATOR",
            "CLOUD_KMS_KEY_ERROR",
            "CA_EXPIRING",
            "NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS",
            "CLOUD_KMS_KEY_DESTROYED"
          ],
          "type": "string",
          "description": "Machine-friendly representation of the condition Deprecated. Use canonical_code instead.",
          "deprecated": true
        },
        "message": {
          "description": "Human-friendly representation of the condition",
          "type": "string"
        },
        "canonicalCode": {
          "description": "Canonical code of the condition.",
          "enum": [
            "OK",
            "CANCELLED",
            "UNKNOWN",
            "INVALID_ARGUMENT",
            "DEADLINE_EXCEEDED",
            "NOT_FOUND",
            "ALREADY_EXISTS",
            "PERMISSION_DENIED",
            "UNAUTHENTICATED",
            "RESOURCE_EXHAUSTED",
            "FAILED_PRECONDITION",
            "ABORTED",
            "OUT_OF_RANGE",
            "UNIMPLEMENTED",
            "INTERNAL",
            "UNAVAILABLE",
            "DATA_LOSS"
          ],
          "type": "string"
        }
      },
      "description": "StatusCondition describes why a cluster or a node pool has a certain status (e.g., ERROR or DEGRADED).",
      "type": "object"
    }
  }
}