units
Creates, updates, deletes, gets or lists an units
resource.
Overview
Name | units |
Type | Resource |
Id | google.saasservicemgmt.units |
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}/units/{unit}" |
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 |
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. |
dependencies | array | Optional. Output only. Set of dependencies for this unit. Maximum 10. |
dependents | array | Optional. Output only. List of Units that depend on this unit. Unit can only be deprovisioned if this list is empty. Maximum 1000. |
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. |
inputVariables | array | Optional. Output only. Indicates the current input variables deployed by the unit |
labels | object | Optional. The labels on the resource, which can be used for categorization. similar to Kubernetes resource labels. |
maintenance | object | Optional. Captures requested directives for performing future maintenance on the unit. This includes a request for the unit to skip maintenance for a period of time and remain pinned to its current release as well as controls for postponing maintenance scheduled in future. (id: MaintenanceSettings) |
managementMode | string | Optional. Immutable. Indicates whether the Unit life cycle is controlled by the user or by the system. Immutable once created. |
ongoingOperations | array | Optional. Output only. List of concurrent UnitOperations that are operating on this Unit. |
outputVariables | array | Optional. Output only. Set of key/value pairs corresponding to output variables from execution of actuation templates. The variables are declared in actuation configs (e.g in helm chart or terraform) and the values are fetched and returned by the actuation engine upon completion of execution. |
pendingOperations | array | Optional. Output only. List of pending (wait to be executed) UnitOperations for this unit. |
release | string | Optional. Output only. The current Release object for this Unit. |
scheduledOperations | array | Optional. Output only. List of scheduled UnitOperations for this unit. |
state | string | Optional. Output only. Current lifecycle state of the resource (e.g. if it's being created or ready to use). |
systemCleanupAt | string (google-datetime) | Optional. Output only. If set, indicates the time when the system will start removing the unit. |
systemManagedState | string | Optional. Output only. Indicates the system managed state of the unit. |
tenant | string | Optional. Reference to the Saas Tenant resource this unit belongs to. This for example informs the maintenance policies to use for scheduling future updates on a unit. (optional and immutable once created) |
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. |
unitKind | string | Optional. Reference to the UnitKind this Unit belongs to. Immutable once set. |
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. |
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}/units/{unit}" |
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 |
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. |
dependencies | array | Optional. Output only. Set of dependencies for this unit. Maximum 10. |
dependents | array | Optional. Output only. List of Units that depend on this unit. Unit can only be deprovisioned if this list is empty. Maximum 1000. |
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. |
inputVariables | array | Optional. Output only. Indicates the current input variables deployed by the unit |
labels | object | Optional. The labels on the resource, which can be used for categorization. similar to Kubernetes resource labels. |
maintenance | object | Optional. Captures requested directives for performing future maintenance on the unit. This includes a request for the unit to skip maintenance for a period of time and remain pinned to its current release as well as controls for postponing maintenance scheduled in future. (id: MaintenanceSettings) |
managementMode | string | Optional. Immutable. Indicates whether the Unit life cycle is controlled by the user or by the system. Immutable once created. |
ongoingOperations | array | Optional. Output only. List of concurrent UnitOperations that are operating on this Unit. |
outputVariables | array | Optional. Output only. Set of key/value pairs corresponding to output variables from execution of actuation templates. The variables are declared in actuation configs (e.g in helm chart or terraform) and the values are fetched and returned by the actuation engine upon completion of execution. |
pendingOperations | array | Optional. Output only. List of pending (wait to be executed) UnitOperations for this unit. |
release | string | Optional. Output only. The current Release object for this Unit. |
scheduledOperations | array | Optional. Output only. List of scheduled UnitOperations for this unit. |
state | string | Optional. Output only. Current lifecycle state of the resource (e.g. if it's being created or ready to use). |
systemCleanupAt | string (google-datetime) | Optional. Output only. If set, indicates the time when the system will start removing the unit. |
systemManagedState | string | Optional. Output only. Indicates the system managed state of the unit. |
tenant | string | Optional. Reference to the Saas Tenant resource this unit belongs to. This for example informs the maintenance policies to use for scheduling future updates on a unit. (optional and immutable once created) |
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. |
unitKind | string | Optional. Reference to the UnitKind this Unit belongs to. Immutable once set. |
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. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , unitsId | Retrieve a single unit. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter , orderBy | Retrieve a collection of units. |
create | insert | projectsId , locationsId | unitId , validateOnly , requestId | Create a new unit. |
patch | update | projectsId , locationsId , unitsId | validateOnly , requestId , updateMask | Update a single unit. |
delete | delete | projectsId , locationsId , unitsId | etag , validateOnly , requestId | Delete a single unit. |
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 | |
unitsId | string | |
etag | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
unitId | string | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean |
SELECT
examples
- get
- list
Retrieve a single unit.
SELECT
name,
annotations,
conditions,
createTime,
dependencies,
dependents,
etag,
inputVariables,
labels,
maintenance,
managementMode,
ongoingOperations,
outputVariables,
pendingOperations,
release,
scheduledOperations,
state,
systemCleanupAt,
systemManagedState,
tenant,
uid,
unitKind,
updateTime
FROM google.saasservicemgmt.units
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND unitsId = '{{ unitsId }}' -- required;
Retrieve a collection of units.
SELECT
name,
annotations,
conditions,
createTime,
dependencies,
dependents,
etag,
inputVariables,
labels,
maintenance,
managementMode,
ongoingOperations,
outputVariables,
pendingOperations,
release,
scheduledOperations,
state,
systemCleanupAt,
systemManagedState,
tenant,
uid,
unitKind,
updateTime
FROM google.saasservicemgmt.units
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.
INSERT INTO google.saasservicemgmt.units (
data__name,
data__unitKind,
data__tenant,
data__maintenance,
data__managementMode,
data__labels,
data__annotations,
projectsId,
locationsId,
unitId,
validateOnly,
requestId
)
SELECT
'{{ name }}',
'{{ unitKind }}',
'{{ tenant }}',
'{{ maintenance }}',
'{{ managementMode }}',
'{{ labels }}',
'{{ annotations }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ unitId }}',
'{{ validateOnly }}',
'{{ requestId }}'
RETURNING
name,
annotations,
conditions,
createTime,
dependencies,
dependents,
etag,
inputVariables,
labels,
maintenance,
managementMode,
ongoingOperations,
outputVariables,
pendingOperations,
release,
scheduledOperations,
state,
systemCleanupAt,
systemManagedState,
tenant,
uid,
unitKind,
updateTime
;
# Description fields are for documentation purposes
- name: units
props:
- name: projectsId
value: string
description: Required parameter for the units resource.
- name: locationsId
value: string
description: Required parameter for the units resource.
- name: name
value: string
description: >
Identifier. The resource name (full URI of the resource) following the standard naming scheme: "projects/{project}/locations/{location}/units/{unit}"
- name: unitKind
value: string
description: >
Optional. Reference to the UnitKind this Unit belongs to. Immutable once set.
- name: tenant
value: string
description: >
Optional. Reference to the Saas Tenant resource this unit belongs to. This for example informs the maintenance policies to use for scheduling future updates on a unit. (optional and immutable once created)
- name: maintenance
value: object
description: >
Optional. Captures requested directives for performing future maintenance on the unit. This includes a request for the unit to skip maintenance for a period of time and remain pinned to its current release as well as controls for postponing maintenance scheduled in future.
- name: managementMode
value: string
description: >
Optional. Immutable. Indicates whether the Unit life cycle is controlled by the user or by the system. Immutable once created.
valid_values: ['MANAGEMENT_MODE_UNSPECIFIED', 'MANAGEMENT_MODE_USER', 'MANAGEMENT_MODE_SYSTEM']
- 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: unitId
value: string
- name: validateOnly
value: boolean
- name: requestId
value: string
UPDATE
examples
- patch
Update a single unit.
UPDATE google.saasservicemgmt.units
SET
data__name = '{{ name }}',
data__unitKind = '{{ unitKind }}',
data__tenant = '{{ tenant }}',
data__maintenance = '{{ maintenance }}',
data__managementMode = '{{ managementMode }}',
data__labels = '{{ labels }}',
data__annotations = '{{ annotations }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND unitsId = '{{ unitsId }}' --required
AND validateOnly = {{ validateOnly}}
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
RETURNING
name,
annotations,
conditions,
createTime,
dependencies,
dependents,
etag,
inputVariables,
labels,
maintenance,
managementMode,
ongoingOperations,
outputVariables,
pendingOperations,
release,
scheduledOperations,
state,
systemCleanupAt,
systemManagedState,
tenant,
uid,
unitKind,
updateTime;
DELETE
examples
- delete
Delete a single unit.
DELETE FROM google.saasservicemgmt.units
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND unitsId = '{{ unitsId }}' --required
AND etag = '{{ etag }}'
AND validateOnly = '{{ validateOnly }}'
AND requestId = '{{ requestId }}';