---
title: "POST /v1/{+parent}/units"
method: POST
path: "/v1/{+parent}/units"
tags: ["projects"]
---

# POST /v1/{+parent}/units

`POST /v1/{+parent}/units`

Create a new unit.

## Path parameters

- `parent` string, required

## Query parameters

- `requestId` string
- `unitId` string
- `validateOnly` boolean

## Request body

- Unit — A unit of deployment that has its lifecycle via a CRUD API using an actuation engine under the hood (e.g. based on Terraform, Helm or a custom implementation provided by a service producer). A building block of a SaaS Tenant.
  - `inputVariables` UnitVariable[] — Optional. Output only. Indicates the current input variables deployed by the unit
    - `type` 'TYPE_UNSPECIFIED' | 'STRING' | 'INT' | 'BOOL' | 'STRUCT' | 'LIST' — Optional. Immutable. Name of a supported variable type. Supported types are string, int, bool.
    - `value` string — Optional. String encoded value for the variable.
    - `variable` string — Required. Immutable. Name of the variable from actuation configs.
  - `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.
  - `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.
  - `maintenance` MaintenanceSettings — 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.
    - `pinnedUntilTime` string, google-datetime — Optional. If present, it fixes the release on the unit until the given time; i.e. changes to the release field will be rejected. Rollouts should and will also respect this by not requesting an upgrade in the first place.
  - `outputVariables` UnitVariable[] — 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.
    - `type` 'TYPE_UNSPECIFIED' | 'STRING' | 'INT' | 'BOOL' | 'STRUCT' | 'LIST' — Optional. Immutable. Name of a supported variable type. Supported types are string, int, bool.
    - `value` string — Optional. String encoded value for the variable.
    - `variable` string — Required. Immutable. Name of the variable from actuation configs.
  - `satisfiesPzs` boolean — Output only. Indicates whether the resource location satisfies Zone Separation constraints. This is false by default.
  - `scheduledOperations` string[] — Optional. Output only. List of scheduled UnitOperations for this unit.
  - `dependents` UnitDependency[] — Optional. Output only. List of Units that depend on this unit. Unit can only be deprovisioned if this list is empty. Maximum 1000.
    - `alias` string — Output only. Alias for the name of the dependency.
    - `unit` string — Output only. A reference to the Unit object.
  - `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)
  - `pendingOperations` string[] — Optional. Output only. List of pending (wait to be executed) UnitOperations for this unit.
  - `conditions` UnitCondition[] — Optional. Output only. A set of conditions which indicate the various conditions this resource can have.
    - `reason` string — Required. Brief reason for the condition's last transition.
    - `status` 'STATUS_UNSPECIFIED' | 'STATUS_UNKNOWN' | 'STATUS_TRUE' | 'STATUS_FALSE' — Required. Status of the condition.
    - `type` 'TYPE_UNSPECIFIED' | 'TYPE_READY' | 'TYPE_UPDATING' | 'TYPE_PROVISIONED' | 'TYPE_OPERATION_ERROR' | 'TYPE_FLAGS_CONFIG_INITIALIZED' | 'TYPE_APP_CREATED_OR_ALREADY_EXISTS' | 'TYPE_APP_COMPONENTS_REGISTERED' — Required. Type of the condition.
    - `lastTransitionTime` string, google-datetime — Required. Last time the condition transited from one status to another.
    - `message` string — Required. Human readable message indicating details about the last transition.
  - `createTime` string, google-datetime — Output only. The timestamp when the resource was created.
  - `state` 'UNIT_STATE_UNSPECIFIED' | 'UNIT_STATE_NOT_PROVISIONED' | 'UNIT_STATE_PROVISIONING' | 'UNIT_STATE_UPDATING' | 'UNIT_STATE_DEPROVISIONING' | 'UNIT_STATE_READY' | 'UNIT_STATE_ERROR' — Optional. Output only. Current lifecycle state of the resource (e.g. if it's being created or ready to use).
  - `managementMode` 'MANAGEMENT_MODE_UNSPECIFIED' | 'MANAGEMENT_MODE_USER' | 'MANAGEMENT_MODE_SYSTEM' — Optional. Immutable. Indicates whether the Unit life cycle is controlled by the user or by the system. Immutable once created.
  - `flagRevisions` string[] — Optional. Output only. Flag revisions used by this Unit.
  - `satisfiesPzi` boolean — Output only. Reserved for future use.
  - `systemCleanupAt` string, google-datetime — Optional. Output only. If set, indicates the time when the system will start removing the unit.
  - `labels` object — Optional. The labels on the resource, which can be used for categorization. similar to Kubernetes resource labels.
  - `systemManagedState` 'SYSTEM_MANAGED_STATE_UNSPECIFIED' | 'SYSTEM_MANAGED_STATE_ACTIVE' | 'SYSTEM_MANAGED_STATE_INACTIVE' | 'SYSTEM_MANAGED_STATE_DECOMMISSIONED' — Optional. Output only. Indicates the system managed state of the unit.
  - `name` string — Identifier. The resource name (full URI of the resource) following the standard naming scheme: "projects/{project}/locations/{location}/units/{unit}"
  - `unitKind` string — Optional. Reference to the UnitKind this Unit belongs to. Immutable once set.
  - `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
  - `release` string — Optional. Output only. The current Release object for this Unit.
  - `ongoingOperations` string[] — Optional. Output only. List of concurrent UnitOperations that are operating on this Unit.
  - `dependencies` UnitDependency[] — Optional. Output only. Set of dependencies for this unit. Maximum 10.
    - `alias` string — Output only. Alias for the name of the dependency.
    - `unit` string — Output only. A reference to the Unit object.
  - `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.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/saasservicemgmt.md) · [All operations](https://skmtc.net/google/apis/saasservicemgmt/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/saasservicemgmt/versions/f94de4124ae2/schema)
