Skip to main content

units

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

Overview

Nameunits
TypeResource
Idgoogle.saasservicemgmt.units

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}/units/{unit}"
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
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.
dependenciesarrayOptional. Output only. Set of dependencies for this unit. Maximum 10.
dependentsarrayOptional. Output only. List of Units that depend on this unit. Unit can only be deprovisioned if this list is empty. Maximum 1000.
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.
inputVariablesarrayOptional. Output only. Indicates the current input variables deployed by the unit
labelsobjectOptional. The labels on the resource, which can be used for categorization. similar to Kubernetes resource labels.
maintenanceobjectOptional. 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)
managementModestringOptional. Immutable. Indicates whether the Unit life cycle is controlled by the user or by the system. Immutable once created.
ongoingOperationsarrayOptional. Output only. List of concurrent UnitOperations that are operating on this Unit.
outputVariablesarrayOptional. 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.
pendingOperationsarrayOptional. Output only. List of pending (wait to be executed) UnitOperations for this unit.
releasestringOptional. Output only. The current Release object for this Unit.
scheduledOperationsarrayOptional. Output only. List of scheduled UnitOperations for this unit.
statestringOptional. Output only. Current lifecycle state of the resource (e.g. if it's being created or ready to use).
systemCleanupAtstring (google-datetime)Optional. Output only. If set, indicates the time when the system will start removing the unit.
systemManagedStatestringOptional. Output only. Indicates the system managed state of the unit.
tenantstringOptional. 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)
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.
unitKindstringOptional. Reference to the UnitKind this Unit belongs to. Immutable once set.
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.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, unitsIdRetrieve a single unit.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByRetrieve a collection of units.
createinsertprojectsId, locationsIdunitId, validateOnly, requestIdCreate a new unit.
patchupdateprojectsId, locationsId, unitsIdvalidateOnly, requestId, updateMaskUpdate a single unit.
deletedeleteprojectsId, locationsId, unitsIdetag, validateOnly, requestIdDelete 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.

NameDatatypeDescription
locationsIdstring
projectsIdstring
unitsIdstring
etagstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
unitIdstring
updateMaskstring (google-fieldmask)
validateOnlyboolean

SELECT examples

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;

INSERT examples

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
;

UPDATE examples

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 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 }}';