{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-compute-engine/json-schema/google-cloud-compute-engine-operation-schema.json",
  "title": "Operation",
  "description": "Represents an Operation resource.\n\nGoogle Compute Engine has three Operation resources:\n\n* [Global](/compute/docs/reference/rest/v1/globalOperations)\n* [Regional](/compute/docs/reference/rest/v1/regionOperations)\n* [Zonal](/compute/docs/reference/rest/v1/zoneOperations)\n\nYou can use an operation resource to manage asynchronous API requests.\nFor more information, readHandling\nAPI responses.\n\nOperations can be global, regional or zonal.\n   \n   - For global operations, use the `globalOperations`\n   resource. \n   - For regional operations, use the\n   `regionOperations` resource. \n   - For zonal operations, use\n   the `zoneOperations` resource.\n\n\n\nFor more information, read\nGlobal, Regional, and Zonal Resources.\n\nNote that completed Operation resources have a limited \nretention period.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-compute-engine-addresses-api-openapi.yml#/components/schemas/Operation",
  "type": "object",
  "properties": {
    "progress": {
      "format": "int32",
      "description": "[Output Only] An optional progress indicator that ranges from 0 to 100.\nThere is no requirement that this be linear or support any granularity of\noperations. This should not be used to guess when the operation will be\ncomplete. This number should monotonically increase as the operation\nprogresses.",
      "type": "integer"
    },
    "insertTime": {
      "type": "string",
      "description": "[Output Only] The time that this operation was requested.\nThis value is inRFC3339\ntext format."
    },
    "setCommonInstanceMetadataOperationMetadata": {
      "$ref": "#/$defs/SetCommonInstanceMetadataOperationMetadata",
      "description": "Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,\nthis field will contain information on all underlying zonal actions and\ntheir state."
    },
    "httpErrorStatusCode": {
      "type": "integer",
      "format": "int32",
      "description": "[Output Only] If the operation fails, this field contains the HTTP error\nstatus code that was returned. For example, a `404` means the\nresource was not found."
    },
    "targetLink": {
      "description": "[Output Only] The URL of the resource that the operation modifies. For\noperations related to creating a snapshot, this points to the disk\nthat the snapshot was created from.",
      "type": "string"
    },
    "httpErrorMessage": {
      "type": "string",
      "description": "[Output Only] If the operation fails, this field contains the HTTP error\nmessage that was returned, such as `NOT FOUND`."
    },
    "selfLink": {
      "type": "string",
      "description": "[Output Only] Server-defined URL for the resource."
    },
    "instancesBulkInsertOperationMetadata": {
      "$ref": "#/$defs/InstancesBulkInsertOperationMetadata"
    },
    "startTime": {
      "description": "[Output Only] The time that this operation was started by the server.\nThis value is inRFC3339\ntext format.",
      "type": "string"
    },
    "zone": {
      "type": "string",
      "description": "[Output Only] The URL of the zone where the operation resides. Only\napplicable when performing per-zone operations."
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).",
                  "type": "string"
                },
                "value": {
                  "description": "[Output Only] A warning data value corresponding to the key.",
                  "type": "string"
                }
              }
            },
            "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n  {\n   \"key\": \"scope\",\n   \"value\": \"zones/us-east1-d\"\n  }]"
          },
          "message": {
            "description": "[Output Only] A human-readable description of the warning code.",
            "type": "string"
          },
          "code": {
            "type": "string",
            "enum": [
              "CLEANUP_FAILED",
              "DEPRECATED_RESOURCE_USED",
              "DEPRECATED_TYPE_USED",
              "DISK_SIZE_LARGER_THAN_IMAGE_SIZE",
              "EXPERIMENTAL_TYPE_USED",
              "EXTERNAL_API_WARNING",
              "FIELD_VALUE_OVERRIDEN",
              "INJECTED_KERNELS_DEPRECATED",
              "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB",
              "LARGE_DEPLOYMENT_WARNING",
              "LIST_OVERHEAD_QUOTA_EXCEED",
              "MISSING_TYPE_DEPENDENCY",
              "NEXT_HOP_ADDRESS_NOT_ASSIGNED",
              "NEXT_HOP_CANNOT_IP_FORWARD",
              "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE",
              "NEXT_HOP_INSTANCE_NOT_FOUND",
              "NEXT_HOP_INSTANCE_NOT_ON_NETWORK",
              "NEXT_HOP_NOT_RUNNING",
              "NOT_CRITICAL_ERROR",
              "NO_RESULTS_ON_PAGE",
              "PARTIAL_SUCCESS",
              "QUOTA_INFO_UNAVAILABLE",
              "REQUIRED_TOS_AGREEMENT",
              "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING",
              "RESOURCE_NOT_DELETED",
              "SCHEMA_VALIDATION_IGNORED",
              "SINGLE_INSTANCE_PROPERTY_TEMPLATE",
              "UNDECLARED_PROPERTIES",
              "UNREACHABLE"
            ],
            "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response."
          }
        }
      },
      "description": "[Output Only] If warning messages are generated during processing of the\noperation, this field will be populated."
    },
    "endTime": {
      "type": "string",
      "description": "[Output Only] The time that this operation was completed. This value is inRFC3339\ntext format."
    },
    "operationType": {
      "type": "string",
      "description": "[Output Only] The type of operation, such as `insert`,\n`update`, or `delete`, and so on."
    },
    "operationGroupId": {
      "description": "Output only. [Output Only] An ID that represents a group of operations, such as when a\ngroup of operations results from a `bulkInsert` API request.",
      "readOnly": true,
      "type": "string"
    },
    "targetId": {
      "format": "uint64",
      "type": "string",
      "description": "[Output Only] The unique target ID, which identifies a specific incarnation\nof the target resource."
    },
    "user": {
      "type": "string",
      "description": "[Output Only] User who requested the operation, for example:\n`user@example.com` or\n`alice_smith_identifier (global/workforcePools/example-com-us-employees)`."
    },
    "region": {
      "description": "[Output Only] The URL of the region where the operation resides. Only\napplicable when performing regional operations.",
      "type": "string"
    },
    "getVersionOperationMetadata": {
      "$ref": "#/$defs/GetVersionOperationMetadata"
    },
    "id": {
      "description": "[Output Only] The unique identifier for the operation. This identifier is\ndefined by the server.",
      "format": "uint64",
      "type": "string"
    },
    "kind": {
      "description": "Output only. [Output Only] Type of the resource. Always `compute#operation` for\nOperation resources.",
      "default": "compute#operation",
      "type": "string",
      "readOnly": true
    },
    "name": {
      "description": "[Output Only] Name of the operation.",
      "type": "string"
    },
    "getHealthOperationMetadata": {
      "$ref": "#/$defs/GetHealthOperationMetadata",
      "description": "Output only. Metadata for GetHealth operations."
    },
    "creationTimestamp": {
      "description": "[Deprecated] This field is deprecated.",
      "type": "string"
    },
    "clientOperationId": {
      "description": "[Output Only] The value of `requestId` if you provided it in the request.\nNot present otherwise.",
      "type": "string"
    },
    "statusMessage": {
      "type": "string",
      "description": "[Output Only] An optional textual description of the current status of the\noperation."
    },
    "error": {
      "type": "object",
      "description": "[Output Only] If errors are generated during processing of the operation,\nthis field will be populated.",
      "properties": {
        "errors": {
          "items": {
            "type": "object",
            "properties": {
              "message": {
                "description": "[Output Only] An optional, human-readable error message.",
                "type": "string"
              },
              "code": {
                "type": "string",
                "description": "[Output Only] The error type identifier for this error."
              },
              "errorDetails": {
                "type": "array",
                "description": "[Output Only] An optional list of messages that contain the error\ndetails. There is a set of defined message types to use for providing\ndetails.The syntax depends on the error code. For example,\nQuotaExceededInfo will have details when the error code is\nQUOTA_EXCEEDED.",
                "items": {
                  "description": "Container for structured error details providing additional context\nspecific to the encountered error code.",
                  "properties": {
                    "localizedMessage": {
                      "$ref": "#/$defs/LocalizedMessage",
                      "description": "A localized human-readable error message intended for end users."
                    },
                    "quotaInfo": {
                      "$ref": "#/$defs/QuotaExceededInfo",
                      "description": "Details about quota limits and metrics when a quota is exceeded."
                    },
                    "errorInfo": {
                      "$ref": "#/$defs/ErrorInfo",
                      "description": "Error information containing structured domain, reason, and metadata."
                    },
                    "help": {
                      "$ref": "#/$defs/Help",
                      "description": "Links and information to help the user resolve the error."
                    }
                  },
                  "type": "object"
                }
              },
              "location": {
                "description": "[Output Only] Indicates the field in the request that caused the error.\nThis property is optional.",
                "type": "string"
              }
            },
            "description": "Represents a single error encountered during the processing of an\noperation."
          },
          "description": "[Output Only] The array of errors encountered while processing this\noperation.",
          "type": "array"
        }
      }
    },
    "status": {
      "description": "[Output Only] The status of the operation, which can be one of the\nfollowing:\n`PENDING`, `RUNNING`, or `DONE`.",
      "enum": [
        "DONE",
        "PENDING",
        "RUNNING"
      ],
      "type": "string"
    },
    "description": {
      "type": "string",
      "description": "[Output Only] A textual description of the operation, which is\nset when the operation is created."
    }
  },
  "$defs": {
    "BulkInsertOperationStatus": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "CREATING",
            "DONE",
            "ROLLING_BACK",
            "STATUS_UNSPECIFIED"
          ],
          "description": "[Output Only] Creation status of BulkInsert operation - information\nif the flow is rolling forward or rolling back."
        },
        "failedToCreateVmCount": {
          "format": "int32",
          "description": "[Output Only] Count of VMs that started creating but encountered an\nerror.",
          "type": "integer"
        },
        "deletedVmCount": {
          "format": "int32",
          "type": "integer",
          "description": "[Output Only] Count of VMs that got deleted during rollback."
        },
        "createdVmCount": {
          "format": "int32",
          "type": "integer",
          "description": "[Output Only] Count of VMs successfully created so far."
        },
        "targetVmCount": {
          "type": "integer",
          "format": "int32",
          "description": "[Output Only] Count of VMs originally planned to be created."
        }
      }
    },
    "ErrorInfo": {
      "properties": {
        "domain": {
          "type": "string",
          "description": "The logical grouping to which the \"reason\" belongs. The error domain\nis typically the registered service name of the tool or product that\ngenerates the error. Example: \"pubsub.googleapis.com\". If the error is\ngenerated by some common infrastructure, the error domain must be a\nglobally unique value that identifies the infrastructure. For Google API\ninfrastructure, the error domain is \"googleapis.com\"."
        },
        "reason": {
          "type": "string",
          "description": "The reason of the error. This is a constant value that identifies the\nproximate cause of the error. Error reasons are unique within a particular\ndomain of errors. This should be at most 63 characters and match a\nregular expression of `A-Z+[A-Z0-9]`, which represents\nUPPER_SNAKE_CASE."
        },
        "metadatas": {
          "description": "Additional structured details about this error.\n\nKeys must match a regular expression of `a-z+` but should\nideally be lowerCamelCase. Also, they must be limited to 64 characters in\nlength. When identifying the current value of an exceeded limit, the units\nshould be contained in the key, not the value.  For example, rather than\n`{\"instanceLimit\": \"100/request\"}`, should be returned as,\n`{\"instanceLimitPerRequest\": \"100\"}`, if the client exceeds the number of\ninstances that can be created in a single (batch) request.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "type": "object",
      "description": "Describes the cause of the error with structured details.\n\nExample of an error when contacting the \"pubsub.googleapis.com\" API when it\nis not enabled:\n\n    { \"reason\": \"API_DISABLED\"\n      \"domain\": \"googleapis.com\"\n      \"metadata\": {\n        \"resource\": \"projects/123\",\n        \"service\": \"pubsub.googleapis.com\"\n      }\n    }\n\nThis response indicates that the pubsub.googleapis.com API is not enabled.\n\nExample of an error that is returned when attempting to create a Spanner\ninstance in a region that is out of stock:\n\n    { \"reason\": \"STOCKOUT\"\n      \"domain\": \"spanner.googleapis.com\",\n      \"metadata\": {\n        \"availableRegions\": \"us-central1,us-east2\"\n      }\n    }"
    },
    "GetHealthOperationMetadata": {
      "description": "Metadata for GetHealth operations.",
      "properties": {
        "healthInfo": {
          "$ref": "#/$defs/GetHealthOperationMetadataHealthInfo",
          "description": "Output only. The health information."
        }
      },
      "type": "object"
    },
    "GetHealthOperationMetadataHealthInfo": {
      "properties": {
        "updateTime": {
          "format": "google-datetime",
          "readOnly": true,
          "type": "string",
          "description": "Output only. The time when health info was updated."
        },
        "availabilitySloStatus": {
          "readOnly": true,
          "enum": [
            "AVAILABILITY_SLO_STATUS_IN_SLO",
            "AVAILABILITY_SLO_STATUS_OUT_OF_SLO",
            "AVAILABILITY_SLO_STATUS_SLO_UNKNOWN",
            "AVAILABILITY_SLO_STATUS_UNSPECIFIED"
          ],
          "type": "string",
          "description": "Output only. The availability SLO status."
        },
        "unhealthyReason": {
          "description": "Output only. The reason for unhealthy status.",
          "type": "string",
          "readOnly": true,
          "enum": [
            "UNHEALTHY_REASON_PENDING_USER_APPROVAL",
            "UNHEALTHY_REASON_REPAIRING",
            "UNHEALTHY_REASON_UNSCHEDULABLE",
            "UNHEALTHY_REASON_UNSPECIFIED"
          ]
        },
        "healthStatus": {
          "description": "Output only. The health status.",
          "enum": [
            "HEALTH_STATUS_HEALTHY",
            "HEALTH_STATUS_UNHEALTHY",
            "HEALTH_STATUS_UNSPECIFIED"
          ],
          "readOnly": true,
          "type": "string"
        },
        "repairCategory": {
          "type": "string",
          "description": "Output only. The repair category.",
          "readOnly": true,
          "enum": [
            "REPAIR_CATEGORY_CRITICAL_FAILURE",
            "REPAIR_CATEGORY_EMERGENT_MAINTENANCE",
            "REPAIR_CATEGORY_PLANNED_MAINTENANCE",
            "REPAIR_CATEGORY_UNSPECIFIED",
            "REPAIR_CATEGORY_USER_REPORTED_FAULT"
          ]
        }
      },
      "description": "Health information.",
      "type": "object"
    },
    "GetVersionOperationMetadata": {
      "properties": {
        "inlineSbomInfo": {
          "$ref": "#/$defs/GetVersionOperationMetadataSbomInfo"
        }
      },
      "type": "object"
    },
    "GetVersionOperationMetadataSbomInfo": {
      "properties": {
        "currentComponentVersions": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A mapping of components to their currently-applied versions or other\nappropriate identifiers."
        },
        "targetComponentVersions": {
          "description": "A mapping of components to their target versions or other appropriate\nidentifiers.",
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    "Help": {
      "properties": {
        "links": {
          "items": {
            "$ref": "#/$defs/HelpLink"
          },
          "type": "array",
          "description": "URL(s) pointing to additional information on handling the current error."
        }
      },
      "type": "object",
      "description": "Provides links to documentation or for performing an out of band action.\n\nFor example, if a quota check failed with an error indicating the calling\nproject hasn't enabled the accessed service, this can contain a URL pointing\ndirectly to the right place in the developer console to flip the bit."
    },
    "HelpLink": {
      "properties": {
        "url": {
          "type": "string",
          "description": "The URL of the link."
        },
        "description": {
          "description": "Describes what the link offers.",
          "type": "string"
        }
      },
      "type": "object",
      "description": "Describes a URL link."
    },
    "InstancesBulkInsertOperationMetadata": {
      "properties": {
        "perLocationStatus": {
          "additionalProperties": {
            "$ref": "#/$defs/BulkInsertOperationStatus"
          },
          "type": "object",
          "description": "Status information per location (location name is key).\nExample key: zones/us-central1-a"
        }
      },
      "type": "object"
    },
    "LocalizedMessage": {
      "description": "Provides a localized error message that is safe to return to the user\nwhich can be attached to an RPC error.",
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "The localized error message in the above locale."
        },
        "locale": {
          "description": "The locale used following the specification defined at\nhttps://www.rfc-editor.org/rfc/bcp/bcp47.txt.\nExamples are: \"en-US\", \"fr-CH\", \"es-MX\"",
          "type": "string"
        }
      }
    },
    "QuotaExceededInfo": {
      "description": "Additional details for quota exceeded error for resource quota.",
      "type": "object",
      "properties": {
        "metricName": {
          "description": "The Compute Engine quota metric name.",
          "type": "string"
        },
        "futureLimit": {
          "description": "Future quota limit being rolled out. The limit's unit depends on the quota\n type or metric.",
          "format": "double",
          "type": "number"
        },
        "dimensions": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "The map holding related quota dimensions.",
          "type": "object"
        },
        "limit": {
          "description": "Current effective quota limit. The limit's unit depends on the quota type\nor metric.",
          "format": "double",
          "type": "number"
        },
        "limitName": {
          "type": "string",
          "description": "The name of the quota limit."
        },
        "rolloutStatus": {
          "type": "string",
          "enum": [
            "IN_PROGRESS",
            "ROLLOUT_STATUS_UNSPECIFIED"
          ],
          "description": "Rollout status of the future quota limit."
        }
      }
    },
    "SetCommonInstanceMetadataOperationMetadata": {
      "type": "object",
      "properties": {
        "clientOperationId": {
          "description": "[Output Only] The client operation id.",
          "type": "string"
        },
        "perLocationOperations": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo"
          },
          "description": "[Output Only] Status information per location (location name is key).\nExample key: zones/us-central1-a"
        }
      }
    },
    "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo": {
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "ABANDONED",
            "DONE",
            "FAILED",
            "PROPAGATED",
            "PROPAGATING",
            "UNSPECIFIED"
          ],
          "description": "[Output Only] Status of the action, which can be one of the following:\n`PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`."
        },
        "error": {
          "$ref": "#/$defs/Status",
          "description": "[Output Only] If state is `ABANDONED` or `FAILED`, this field is\npopulated."
        }
      },
      "type": "object"
    },
    "Status": {
      "properties": {
        "details": {
          "items": {
            "additionalProperties": {
              "description": "Properties of the object. Contains field @type with type URL."
            },
            "type": "object",
            "format": "google.protobuf.Any"
          },
          "type": "array",
          "description": "A list of messages that carry the error details.  There is a common set of\nmessage types for APIs to use."
        },
        "message": {
          "type": "string",
          "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client."
        },
        "code": {
          "type": "integer",
          "description": "The status code, which should be an enum value of google.rpc.Code.",
          "format": "int32"
        }
      },
      "type": "object",
      "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)."
    }
  }
}