Skip to main content

operations

Creates, updates, deletes, gets or lists an operations resource.

Overview​

Nameoperations
TypeResource
Idgoogle.container.operations

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringOutput only. The server-assigned ID for the operation.
clusterConditionsarrayWhich conditions caused the current cluster state. Deprecated. Use field error instead.
detailstringOutput only. Detailed operation progress, if available.
endTimestringOutput only. The time the operation completed, in RFC3339 text format.
errorobjectThe error result of the operation in case of failure. (id: Status)
locationstringOutput only. The name of the Google Compute Engine zone or region in which the cluster resides.
nodepoolConditionsarrayWhich conditions caused the current node pool state. Deprecated. Use field error instead.
operationTypestringOutput only. The operation type. (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)
progressobjectOutput only. Progress information for an operation. (id: OperationProgress)
selfLinkstringOutput only. Server-defined URI for the operation. Example: https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123.
startTimestringOutput only. The time the operation started, in RFC3339 text format.
statusstringOutput only. The current status of the operation. (STATUS_UNSPECIFIED, PENDING, RUNNING, DONE, ABORTING)
statusMessagestringOutput only. If an error has occurred, a textual description of the error. Deprecated. Use the field error instead.
targetLinkstringOutput 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
zonestringOutput only. The name of the Google Compute Engine zone in which the operation is taking place. This field is deprecated, use location instead.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_operations_getselectprojectsId, locationsId, operationsIdoperationId, projectId, zoneGets the specified operation.
projects_zones_operations_getselectprojectId, zone, operationIdnameGets the specified operation.
projects_locations_operations_listselectprojectsId, locationsIdprojectId, zoneLists all operations in a project in a specific zone or all zones.
projects_zones_operations_listselectprojectId, zoneparentLists all operations in a project in a specific zone or all zones.
projects_locations_operations_cancelexecprojectsId, locationsId, operationsIdCancels the specified operation.
projects_zones_operations_cancelexecprojectId, zone, operationIdCancels the specified operation.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
locationsIdstring
operationIdstring
operationsIdstring
projectIdstring
projectsIdstring
zonestring
namestring
operationIdstring
parentstring
projectIdstring
zonestring

SELECT examples​

Gets the specified operation.

SELECT
name,
clusterConditions,
detail,
endTime,
error,
location,
nodepoolConditions,
operationType,
progress,
selfLink,
startTime,
status,
statusMessage,
targetLink,
zone
FROM google.container.operations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND operationsId = '{{ operationsId }}' -- required
AND operationId = '{{ operationId }}'
AND projectId = '{{ projectId }}'
AND zone = '{{ zone }}'
;

Lifecycle Methods​

Cancels the specified operation.

EXEC google.container.operations.projects_locations_operations_cancel
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@operationsId='{{ operationsId }}' --required
@@json=
'{
"name": "{{ name }}",
"operationId": "{{ operationId }}",
"projectId": "{{ projectId }}",
"zone": "{{ zone }}"
}'
;