# REST Resource: projects.locations.zones.ops

- [Resource: ZoneOperation](https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#ZoneOperation)
  - [JSON representation](https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#ZoneOperation.SCHEMA_REPRESENTATION)
- [Type](https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#Type)
- [State](https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#State)
- [ZoneOperationStep](https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#ZoneOperationStep)
  - [JSON representation](https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#ZoneOperationStep.SCHEMA_REPRESENTATION)
- [ExpansionStep](https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#ExpansionStep)
- [StepState](https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#StepState)
- [Methods](https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#METHODS_SUMMARY)

## Resource: ZoneOperation

Represents an operation on a zone.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "type": enum (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#Type`), "impactedHardware": [ string ], "state": enum (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#State`), "currentStep": { object (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#ZoneOperationStep`) }, "stepHistory": [ { object (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#ZoneOperationStep`) } ], "etag": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. Name of the operation. Format: "projects/{project}/locations/{location}/zones/{zone}/ops/{zoneOperation}" |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Time when this operation was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Time when this operation was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `labels` | `map (key: string, value: string)` Optional. Labels associated with this operation as key value pairs. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `type` | ``enum (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#Type`)`` Required. Immutable. The type of this operation. |
| `impactedHardware[]` | `string` Optional. The hardware impacted by this zone operation. |
| `state` | ``enum (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#State`)`` Output only. The state of the operation. |
| `currentStep` | ``object (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#ZoneOperationStep`)`` Output only. The current step of the operation. |
| `stepHistory[]` | ``object (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#ZoneOperationStep`)`` Output only. History of steps for the operation. |
| `etag` | `string` Optional. Adding an etag based on go/ccfe-etag. |

## Type

The type of operation.

| Enums ||
|---|---|
| `TYPE_UNSPECIFIED` | Type not set. |
| `EXPANSION` | Zone expansion operation. |

## State

Valid states for a zone operation.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | State not set. |
| `RUNNING` | The operation is in progress. |
| `SUCCEEDED` | The operation completed successfully. |
| `FAILED` | The operation failed. |
| `CANCELLED` | The operation was cancelled. |

## ZoneOperationStep

Represents a workflow step.

| JSON representation |
|---|
| ``` { "state": enum (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#StepState`), "startTime": string, "endTime": string, "error": { object (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/Status`) }, // Union field `step_type` can be only one of the following: "expansionStep": enum (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#ExpansionStep`) // End of list of possible types for union field `step_type`. } ``` |

| Fields ||
|---|---|
| `state` | ``enum (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#StepState`)`` Output only. The state of the workflow step. |
| `startTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time when the workflow step started. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `endTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time when the workflow step ended. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `error` | ``object (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/Status`)`` Output only. The error message for the workflow step if it failed. |
| Union field `step_type`. The type of step. `step_type` can be only one of the following: ||
| `expansionStep` | ``enum (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops#ExpansionStep`)`` Step for the EXPANSION operation type. |

## ExpansionStep

Valid steps of an EXPANSION workflow.

| Enums ||
|---|---|
| `EXPANSION_STEP_UNSPECIFIED` | Step unspecified. |
| `PREPARING_ZONE` | Updates the zone intent for logical turnup. |
| `HW_ID_UPDATE` | Updates the hardware list with identifiers. |

## StepState

Valid states of a workflow step.

| Enums ||
|---|---|
| `STEP_STATE_UNSPECIFIED` | Unspecified workflow step state. |
| `PENDING` | The step is waiting to start. |
| `RUNNING` | The step is in progress. |
| `SUCCEEDED` | The step completed successfully. |
| `FAILED` | The step failed. |
| `SKIPPED` | The step was skipped. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops/create` | Creates a new ZoneOperation in a given Zone. |
| ### `https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops/delete` | Deletes a single ZoneOperation. |
| ### `https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops/get` | Gets details of a single ZoneOperation. |
| ### `https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops/list` | Lists ZoneOperations in a given project and location. |
| ### `https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/projects.locations.zones.ops/patch` | Updates the parameters of a single ZoneOperation. |