Skip to main content

deployments

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

Overview

Namedeployments
TypeResource
Idgoogle.workloadmanager.deployments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the deployment resource. The format is 'projects/{project_id}/locations/{location_id}/deployments/{deployment_id}'.
createTimestring (google-datetime)Output only. Create time stamp.
descriptionstringDescription of the deployment.
sapSystemS4ConfigobjectSAP system workload input. (id: SapSystemS4Config)
serviceAccountstringUser-specified Service Account (SA) credentials to be used for Cloud Build. Format: projects/{projectID}/serviceAccounts/{serviceAccount} The default Cloud Build SA will be used initially if this field is not set during deployment creation.
sqlServerWorkloadobjectMS SQL workload input. (id: SqlServerWorkload)
statestringOutput only. Current state of the deployment. (STATE_UNSPECIFIED, CREATING, ACTIVE, UPDATING, DELETING, FAILED)
terraformVariablesobjectOptional. terraform_variables represents all the Terraform variables for the deployment workload. The key is the name of the Terraform variable, and the value is the TerraformVariable. For example: { "project_id": { "input_value": { "string_value": "my-project-id" } }, "zone": { "input_value": { "string_value": "us-central1-a" } } }
updateTimestring (google-datetime)Output only. Update time stamp.
workerPoolstringOptional. The user-specified Cloud Build worker pool resource in which the Cloud Build job will execute. Format: projects/{project}/locations/{location}/workerPools/{workerPoolId}. If this field is unspecified, the default Cloud Build worker pool will be used.
workloadTypestringOptional. Workload type of the deployment. (WORKLOAD_TYPE_UNSPECIFIED, SAP_S4, SQL_SERVER, ORACLE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, deploymentsIdGets details of a single Deployment.
listselectprojectsId, locationsIdpageToken, pageSize, orderBy, filterLists Deployments in a given project and location.
createinsertprojectsId, locationsIddeploymentId, requestIdCreates a new Deployment in a given project and location.
deletedeleteprojectsId, locationsId, deploymentsIdforceDeletes a single Deployment.

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
deploymentsIdstring
locationsIdstring
projectsIdstring
deploymentIdstring
filterstring
forceboolean
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring

SELECT examples

Gets details of a single Deployment.

SELECT
name,
createTime,
description,
sapSystemS4Config,
serviceAccount,
sqlServerWorkload,
state,
terraformVariables,
updateTime,
workerPool,
workloadType
FROM google.workloadmanager.deployments
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND deploymentsId = '{{ deploymentsId }}' -- required
;

INSERT examples

Creates a new Deployment in a given project and location.

INSERT INTO google.workloadmanager.deployments (
data__sapSystemS4Config,
data__serviceAccount,
data__description,
data__sqlServerWorkload,
data__name,
data__workerPool,
data__workloadType,
data__terraformVariables,
projectsId,
locationsId,
deploymentId,
requestId
)
SELECT
'{{ sapSystemS4Config }}',
'{{ serviceAccount }}',
'{{ description }}',
'{{ sqlServerWorkload }}',
'{{ name }}',
'{{ workerPool }}',
'{{ workloadType }}',
'{{ terraformVariables }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ deploymentId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

DELETE examples

Deletes a single Deployment.

DELETE FROM google.workloadmanager.deployments
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND deploymentsId = '{{ deploymentsId }}' --required
AND force = '{{ force }}'
;