unit_operations
Creates, updates, deletes, gets or lists an unit_operations
resource.
Overview
Name | unit_operations |
Type | Resource |
Id | google.saasservicemgmt.unit_operations |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name (full URI of the resource) following the standard naming scheme: "projects/{project}/locations/{location}/unitOperations/{unitOperation}" |
annotations | object | Optional. 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 |
cancel | boolean | Optional. When true, attempt to cancel the operation. Cancellation may fail if the operation is already executing. (Optional) |
conditions | array | Optional. Output only. A set of conditions which indicate the various conditions this resource can have. |
createTime | string (google-datetime) | Output only. The timestamp when the resource was created. |
deprovision | object | Deprovision is the unit operation that deprovision the underlying resources represented by a Unit. Can only execute if the Unit is currently provisioned. (id: Deprovision) |
engineState | string | Optional. Output only. The engine state for on-going deployment engine operation(s). This field is opaque for external usage. |
errorCategory | string | Optional. Output only. UnitOperationErrorCategory describe the error category. |
etag | string | Output 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. |
labels | object | Optional. The labels on the resource, which can be used for categorization. similar to Kubernetes resource labels. |
parentUnitOperation | string | Optional. 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) |
provision | object | Provision 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) |
rollout | string | Optional. 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. |
schedule | object | Optional. When to schedule this operation. (id: Schedule) |
state | string | Optional. Output only. UnitOperationState describes the current state of the unit operation. |
uid | string | Output 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. |
unit | string | Required. Immutable. The Unit a given UnitOperation will act upon. |
updateTime | string (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. |
upgrade | object | Upgrade 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) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name (full URI of the resource) following the standard naming scheme: "projects/{project}/locations/{location}/unitOperations/{unitOperation}" |
annotations | object | Optional. 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 |
cancel | boolean | Optional. When true, attempt to cancel the operation. Cancellation may fail if the operation is already executing. (Optional) |
conditions | array | Optional. Output only. A set of conditions which indicate the various conditions this resource can have. |
createTime | string (google-datetime) | Output only. The timestamp when the resource was created. |
deprovision | object | Deprovision is the unit operation that deprovision the underlying resources represented by a Unit. Can only execute if the Unit is currently provisioned. (id: Deprovision) |
engineState | string | Optional. Output only. The engine state for on-going deployment engine operation(s). This field is opaque for external usage. |
errorCategory | string | Optional. Output only. UnitOperationErrorCategory describe the error category. |
etag | string | Output 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. |
labels | object | Optional. The labels on the resource, which can be used for categorization. similar to Kubernetes resource labels. |
parentUnitOperation | string | Optional. 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) |
provision | object | Provision 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) |
rollout | string | Optional. 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. |
schedule | object | Optional. When to schedule this operation. (id: Schedule) |
state | string | Optional. Output only. UnitOperationState describes the current state of the unit operation. |
uid | string | Output 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. |
unit | string | Required. Immutable. The Unit a given UnitOperation will act upon. |
updateTime | string (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. |
upgrade | object | Upgrade 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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , unitOperationsId | Retrieve a single unit operation. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter , orderBy | Retrieve a collection of unit operations. |
create | insert | projectsId , locationsId | unitOperationId , validateOnly , requestId | Create a new unit operation. |
patch | update | projectsId , locationsId , unitOperationsId | validateOnly , requestId , updateMask | Update a single unit operation. |
delete | delete | projectsId , locationsId , unitOperationsId | etag , validateOnly , requestId | Delete 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.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
projectsId | string | |
unitOperationsId | string | |
etag | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
unitOperationId | string | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean |
SELECT
examples
- get
- list
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;
Retrieve a collection of unit operations.
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: unit_operations
props:
- name: projectsId
value: string
description: Required parameter for the unit_operations resource.
- name: locationsId
value: string
description: Required parameter for the unit_operations resource.
- name: provision
value: object
description: >
Provision is the unit operation that provision the underlying resources represented by a Unit. Can only execute if the Unit is not currently provisioned.
- name: upgrade
value: object
description: >
Upgrade 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.
- name: deprovision
value: object
description: >
Deprovision is the unit operation that deprovision the underlying resources represented by a Unit. Can only execute if the Unit is currently provisioned.
- name: name
value: string
description: >
Identifier. The resource name (full URI of the resource) following the standard naming scheme: "projects/{project}/locations/{location}/unitOperations/{unitOperation}"
- name: unit
value: string
description: >
Required. Immutable. The Unit a given UnitOperation will act upon.
- name: parentUnitOperation
value: string
description: >
Optional. 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)
- name: rollout
value: string
description: >
Optional. 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.
- name: cancel
value: boolean
description: >
Optional. When true, attempt to cancel the operation. Cancellation may fail if the operation is already executing. (Optional)
- name: schedule
value: object
description: >
Optional. When to schedule this operation.
- name: labels
value: object
description: >
Optional. The labels on the resource, which can be used for categorization. similar to Kubernetes resource labels.
- name: annotations
value: object
description: >
Optional. 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
- name: unitOperationId
value: string
- name: validateOnly
value: boolean
- name: requestId
value: string
UPDATE
examples
- patch
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
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 }}';