Skip to main content

deployment_groups

Creates, updates, deletes, gets or lists a deployment_groups resource.

Overview

Namedeployment_groups
TypeResource
Idgoogle.config.deployment_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. The name of the deployment group. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.
annotationsobjectOptional. Arbitrary key-value metadata storage e.g. to help client tools identify deployment group during automation. See https://google.aip.dev/148#annotations for details on format and size limitations.
createTimestring (google-datetime)Output only. Time when the deployment group was created.
deploymentUnitsarrayThe deployment units of the deployment group in a DAG like structure. When a deployment group is being provisioned, the deployment units are deployed in a DAG order. The provided units must be in a DAG order, otherwise an error will be returned.
labelsobjectOptional. User-defined metadata for the deployment group.
provisioningErrorobjectOutput only. The error status of the deployment group provisioning or deprovisioning. (id: Status)
provisioningStatestringOutput only. The provisioning state of the deployment group. (PROVISIONING_STATE_UNSPECIFIED, PROVISIONING, PROVISIONED, FAILED_TO_PROVISION, DEPROVISIONING, DEPROVISIONED, FAILED_TO_DEPROVISION)
provisioningStateDescriptionstringOutput only. Additional information regarding the current provisioning state.
statestringOutput only. Current state of the deployment group. (STATE_UNSPECIFIED, CREATING, ACTIVE, UPDATING, DELETING, FAILED, SUSPENDED, DELETED)
stateDescriptionstringOutput only. Additional information regarding the current state.
updateTimestring (google-datetime)Output only. Time when the deployment group was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, deploymentGroupsIdGet a DeploymentGroup for a given project and location.
listselectprojectsId, locationsIdpageSize, filter, pageToken, orderByList DeploymentGroups for a given project and location.
createinsertprojectsId, locationsIddeploymentGroupId, requestIdCreates a DeploymentGroup The newly created DeploymentGroup will be in the CREATING state and can be retrieved via Get and List calls.
patchupdateprojectsId, locationsId, deploymentGroupsIdupdateMask, requestIdUpdates a DeploymentGroup
deletedeleteprojectsId, locationsId, deploymentGroupsIdrequestId, deploymentReferencePolicy, forceDeletes a DeploymentGroup
provisionexecprojectsId, locationsId, deploymentGroupsIdProvisions a deployment group. NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the last successful DeploymentGroupRevision but are no longer included in the current DeploymentGroup definition (e.g., following an UpdateDeploymentGroup call), along with their actuated resources.
deprovisionexecprojectsId, locationsId, deploymentGroupsIdDeprovisions a deployment group. NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the last successful DeploymentGroupRevision but are no longer included in the current DeploymentGroup definition (e.g., following an UpdateDeploymentGroup call), along with their actuated resources.

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
deploymentGroupsIdstring
locationsIdstring
projectsIdstring
deploymentGroupIdstring
deploymentReferencePolicystring
filterstring
forceboolean
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Get a DeploymentGroup for a given project and location.

SELECT
name,
annotations,
createTime,
deploymentUnits,
labels,
provisioningError,
provisioningState,
provisioningStateDescription,
state,
stateDescription,
updateTime
FROM google.config.deployment_groups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND deploymentGroupsId = '{{ deploymentGroupsId }}' -- required
;

INSERT examples

Creates a DeploymentGroup The newly created DeploymentGroup will be in the CREATING state and can be retrieved via Get and List calls.

INSERT INTO google.config.deployment_groups (
data__deploymentUnits,
data__name,
data__labels,
data__annotations,
projectsId,
locationsId,
deploymentGroupId,
requestId
)
SELECT
'{{ deploymentUnits }}',
'{{ name }}',
'{{ labels }}',
'{{ annotations }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ deploymentGroupId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates a DeploymentGroup

UPDATE google.config.deployment_groups
SET
data__deploymentUnits = '{{ deploymentUnits }}',
data__name = '{{ name }}',
data__labels = '{{ labels }}',
data__annotations = '{{ annotations }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND deploymentGroupsId = '{{ deploymentGroupsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a DeploymentGroup

DELETE FROM google.config.deployment_groups
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND deploymentGroupsId = '{{ deploymentGroupsId }}' --required
AND requestId = '{{ requestId }}'
AND deploymentReferencePolicy = '{{ deploymentReferencePolicy }}'
AND force = '{{ force }}'
;

Lifecycle Methods

Provisions a deployment group. NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the last successful DeploymentGroupRevision but are no longer included in the current DeploymentGroup definition (e.g., following an UpdateDeploymentGroup call), along with their actuated resources.

EXEC google.config.deployment_groups.provision
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@deploymentGroupsId='{{ deploymentGroupsId }}' --required
@@json=
'{
"deploymentSpecs": "{{ deploymentSpecs }}"
}'
;