Skip to main content

unit_operations

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

Overview

Nameunit_operations
TypeResource
Idgoogle.saasservicemgmt.unit_operations

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The resource name (full URI of the resource) following the standard naming scheme: "projects/{project}/locations/{location}/unitOperations/{unitOperation}"
annotationsobjectOptional. Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/user-guide/annotations
cancelbooleanOptional. When true, attempt to cancel the operation. Cancellation may fail if the operation is already executing. (Optional)
conditionsarrayOptional. Output only. A set of conditions which indicate the various conditions this resource can have.
createTimestring (google-datetime)Output only. The timestamp when the resource was created.
deprovisionobjectDeprovision is the unit operation that deprovision the underlying resources represented by a Unit. Can only execute if the Unit is currently provisioned. (id: Deprovision)
engineStatestringOptional. Output only. The engine state for on-going deployment engine operation(s). This field is opaque for external usage.
errorCategorystringOptional. Output only. UnitOperationErrorCategory describe the error category.
etagstringOutput only. An opaque value that uniquely identifies a version or generation of a resource. It can be used to confirm that the client and server agree on the ordering of a resource being written.
labelsobjectOptional. The labels on the resource, which can be used for categorization. similar to Kubernetes resource labels.
parentUnitOperationstringOptional. Reference to parent resource: UnitOperation. If an operation needs to create other operations as part of its workflow, each of the child operations should have this field set to the parent. This can be used for tracing. (Optional)
provisionobjectProvision is the unit operation that provision the underlying resources represented by a Unit. Can only execute if the Unit is not currently provisioned. (id: Provision)
rolloutstringOptional. Specifies which rollout created this Unit Operation. This cannot be modified and is used for filtering purposes only. If a dependent unit and unit operation are created as part of another unit operation, they will use the same rolloutId.
scheduleobjectOptional. When to schedule this operation. (id: Schedule)
statestringOptional. Output only. UnitOperationState describes the current state of the unit operation.
uidstringOutput only. The unique identifier of the resource. UID is unique in the time and space for this resource within the scope of the service. It is typically generated by the server on successful creation of a resource and must not be changed. UID is used to uniquely identify resources with resource name reuses. This should be a UUID4.
unitstringRequired. Immutable. The Unit a given UnitOperation will act upon.
updateTimestring (google-datetime)Output only. The timestamp when the resource was last updated. Any change to the resource made by users must refresh this value. Changes to a resource made by the service should refresh this value.
upgradeobjectUpgrade is the unit operation that upgrades a provisioned unit, which may also include the underlying resources represented by a Unit. Can only execute if the Unit is currently provisioned. (id: Upgrade)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, unitOperationsIdRetrieve a single unit operation.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByRetrieve a collection of unit operations.
createinsertprojectsId, locationsIdunitOperationId, validateOnly, requestIdCreate a new unit operation.
patchupdateprojectsId, locationsId, unitOperationsIdvalidateOnly, requestId, updateMaskUpdate a single unit operation.
deletedeleteprojectsId, locationsId, unitOperationsIdetag, validateOnly, requestIdDelete a single unit 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
projectsIdstring
unitOperationsIdstring
etagstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
unitOperationIdstring
updateMaskstring (google-fieldmask)
validateOnlyboolean

SELECT examples

Retrieve a single unit operation.

SELECT
name,
annotations,
cancel,
conditions,
createTime,
deprovision,
engineState,
errorCategory,
etag,
labels,
parentUnitOperation,
provision,
rollout,
schedule,
state,
uid,
unit,
updateTime,
upgrade
FROM google.saasservicemgmt.unit_operations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND unitOperationsId = '{{ unitOperationsId }}' -- required;

INSERT examples

Create a new unit operation.

INSERT INTO google.saasservicemgmt.unit_operations (
data__provision,
data__upgrade,
data__deprovision,
data__name,
data__unit,
data__parentUnitOperation,
data__rollout,
data__cancel,
data__schedule,
data__labels,
data__annotations,
projectsId,
locationsId,
unitOperationId,
validateOnly,
requestId
)
SELECT
'{{ provision }}',
'{{ upgrade }}',
'{{ deprovision }}',
'{{ name }}',
'{{ unit }}',
'{{ parentUnitOperation }}',
'{{ rollout }}',
{{ cancel }},
'{{ schedule }}',
'{{ labels }}',
'{{ annotations }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ unitOperationId }}',
'{{ validateOnly }}',
'{{ requestId }}'
RETURNING
name,
annotations,
cancel,
conditions,
createTime,
deprovision,
engineState,
errorCategory,
etag,
labels,
parentUnitOperation,
provision,
rollout,
schedule,
state,
uid,
unit,
updateTime,
upgrade
;

UPDATE examples

Update a single unit operation.

UPDATE google.saasservicemgmt.unit_operations
SET
data__provision = '{{ provision }}',
data__upgrade = '{{ upgrade }}',
data__deprovision = '{{ deprovision }}',
data__name = '{{ name }}',
data__unit = '{{ unit }}',
data__parentUnitOperation = '{{ parentUnitOperation }}',
data__rollout = '{{ rollout }}',
data__cancel = {{ cancel }},
data__schedule = '{{ schedule }}',
data__labels = '{{ labels }}',
data__annotations = '{{ annotations }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND unitOperationsId = '{{ unitOperationsId }}' --required
AND validateOnly = {{ validateOnly}}
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
RETURNING
name,
annotations,
cancel,
conditions,
createTime,
deprovision,
engineState,
errorCategory,
etag,
labels,
parentUnitOperation,
provision,
rollout,
schedule,
state,
uid,
unit,
updateTime,
upgrade;

DELETE examples

Delete a single unit operation.

DELETE FROM google.saasservicemgmt.unit_operations
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND unitOperationsId = '{{ unitOperationsId }}' --required
AND etag = '{{ etag }}'
AND validateOnly = '{{ validateOnly }}'
AND requestId = '{{ requestId }}';