deployments
Creates, updates, deletes, gets or lists a deployments
resource.
Overview
Name | deployments |
Type | Resource |
Id | google.deploymentmanager.deployments |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
id | string (uint64) | |
name | string | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
description | string | An optional user-provided description of the deployment. |
fingerprint | string (byte) | Provides a fingerprint to use in requests to modify a deployment, such as update() , stop() , and cancelPreview() requests. A fingerprint is a randomly generated value that must be provided with update() , stop() , and cancelPreview() requests to perform optimistic locking. This ensures optimistic concurrency so that only one request happens at a time. The fingerprint is initially generated by Deployment Manager and changes after every request to modify data. To get the latest fingerprint value, perform a get() request to a deployment. |
insertTime | string | Output only. Creation timestamp in RFC3339 text format. |
labels | array | Map of One Platform labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63 characters long and must conform to the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)? . |
manifest | string | Output only. URL of the manifest representing the last manifest that was successfully deployed. If no manifest has been successfully deployed, this field will be absent. |
operation | object | Output only. The Operation that most recently ran, or is currently running, on this deployment. (id: Operation) |
selfLink | string | Output only. Server defined URL for the resource. |
target | object | [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates. (id: TargetConfiguration) |
update | object | Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here. (id: DeploymentUpdate) |
updateTime | string | Output only. Update timestamp in RFC3339 text format. |
Successful response
Name | Datatype | Description |
---|---|---|
id | string (uint64) | |
name | string | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
description | string | An optional user-provided description of the deployment. |
fingerprint | string (byte) | Provides a fingerprint to use in requests to modify a deployment, such as update() , stop() , and cancelPreview() requests. A fingerprint is a randomly generated value that must be provided with update() , stop() , and cancelPreview() requests to perform optimistic locking. This ensures optimistic concurrency so that only one request happens at a time. The fingerprint is initially generated by Deployment Manager and changes after every request to modify data. To get the latest fingerprint value, perform a get() request to a deployment. |
insertTime | string | Output only. Creation timestamp in RFC3339 text format. |
labels | array | Map of One Platform labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63 characters long and must conform to the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)? . |
manifest | string | Output only. URL of the manifest representing the last manifest that was successfully deployed. If no manifest has been successfully deployed, this field will be absent. |
operation | object | Output only. The Operation that most recently ran, or is currently running, on this deployment. (id: Operation) |
selfLink | string | Output only. Server defined URL for the resource. |
target | object | [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates. (id: TargetConfiguration) |
update | object | Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here. (id: DeploymentUpdate) |
updateTime | string | Output only. Update timestamp in RFC3339 text format. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | project , deployment | header.bypassBillingFilter | Gets information about a specific deployment. |
list | select | project | maxResults , pageToken , filter , orderBy | Lists all deployments for a given project. |
insert | insert | project | preview , createPolicy , header.bypassBillingFilter | Creates a deployment and all of the resources described by the deployment manifest. |
patch | update | project , deployment | createPolicy , deletePolicy , preview , header.bypassBillingFilter | Patches a deployment and all of the resources described by the deployment manifest. |
update | replace | project , deployment | createPolicy , deletePolicy , preview , header.bypassBillingFilter | Updates a deployment and all of the resources described by the deployment manifest. |
delete | delete | project , deployment | deletePolicy , header.bypassBillingFilter | Deletes a deployment and all of the resources in the deployment. |
cancel_preview | exec | project , deployment | Cancels and removes the preview currently associated with the deployment. | |
stop | exec | project , deployment | Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started. |
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 |
---|---|---|
deployment | string | |
project | string | |
createPolicy | string | |
deletePolicy | string | |
filter | string | |
header.bypassBillingFilter | boolean | |
maxResults | integer (uint32) | |
orderBy | string | |
pageToken | string | |
preview | boolean |
SELECT
examples
- get
- list
Gets information about a specific deployment.
SELECT
id,
name,
description,
fingerprint,
insertTime,
labels,
manifest,
operation,
selfLink,
target,
update,
updateTime
FROM google.deploymentmanager.deployments
WHERE project = '{{ project }}' -- required
AND deployment = '{{ deployment }}' -- required
AND header.bypassBillingFilter = '{{ header.bypassBillingFilter }}';
Lists all deployments for a given project.
SELECT
id,
name,
description,
fingerprint,
insertTime,
labels,
manifest,
operation,
selfLink,
target,
update,
updateTime
FROM google.deploymentmanager.deployments
WHERE project = '{{ project }}' -- required
AND maxResults = '{{ maxResults }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- insert
- Manifest
Creates a deployment and all of the resources described by the deployment manifest.
INSERT INTO google.deploymentmanager.deployments (
data__id,
data__name,
data__description,
data__operation,
data__fingerprint,
data__manifest,
data__update,
data__insertTime,
data__updateTime,
data__target,
data__labels,
data__selfLink,
project,
preview,
createPolicy,
header.bypassBillingFilter
)
SELECT
'{{ id }}',
'{{ name }}',
'{{ description }}',
'{{ operation }}',
'{{ fingerprint }}',
'{{ manifest }}',
'{{ update }}',
'{{ insertTime }}',
'{{ updateTime }}',
'{{ target }}',
'{{ labels }}',
'{{ selfLink }}',
'{{ project }}',
'{{ preview }}',
'{{ createPolicy }}',
'{{ header.bypassBillingFilter }}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
selfLinkWithId,
setAutoscalerLinkOperationMetadata,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone
;
# Description fields are for documentation purposes
- name: deployments
props:
- name: project
value: string
description: Required parameter for the deployments resource.
- name: id
value: string
- name: name
value: string
description: >
Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- name: description
value: string
description: >
An optional user-provided description of the deployment.
- name: operation
value: object
description: >
Output only. The Operation that most recently ran, or is currently running, on this deployment.
- name: fingerprint
value: string
description: >
Provides a fingerprint to use in requests to modify a deployment, such as `update()`, `stop()`, and `cancelPreview()` requests. A fingerprint is a randomly generated value that must be provided with `update()`, `stop()`, and `cancelPreview()` requests to perform optimistic locking. This ensures optimistic concurrency so that only one request happens at a time. The fingerprint is initially generated by Deployment Manager and changes after every request to modify data. To get the latest fingerprint value, perform a `get()` request to a deployment.
- name: manifest
value: string
description: >
Output only. URL of the manifest representing the last manifest that was successfully deployed. If no manifest has been successfully deployed, this field will be absent.
- name: update
value: object
description: >
Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
- name: insertTime
value: string
description: >
Output only. Creation timestamp in RFC3339 text format.
- name: updateTime
value: string
description: >
Output only. Update timestamp in RFC3339 text format.
- name: target
value: object
description: >
[Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
- name: labels
value: array
description: >
Map of One Platform labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
- name: selfLink
value: string
description: >
Output only. Server defined URL for the resource.
- name: preview
value: boolean
- name: createPolicy
value: string
- name: header.bypassBillingFilter
value: boolean
UPDATE
examples
- patch
Patches a deployment and all of the resources described by the deployment manifest.
UPDATE google.deploymentmanager.deployments
SET
data__id = '{{ id }}',
data__name = '{{ name }}',
data__description = '{{ description }}',
data__operation = '{{ operation }}',
data__fingerprint = '{{ fingerprint }}',
data__manifest = '{{ manifest }}',
data__update = '{{ update }}',
data__insertTime = '{{ insertTime }}',
data__updateTime = '{{ updateTime }}',
data__target = '{{ target }}',
data__labels = '{{ labels }}',
data__selfLink = '{{ selfLink }}'
WHERE
project = '{{ project }}' --required
AND deployment = '{{ deployment }}' --required
AND createPolicy = '{{ createPolicy}}'
AND deletePolicy = '{{ deletePolicy}}'
AND preview = {{ preview}}
AND header.bypassBillingFilter = {{ header.bypassBillingFilter}}
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
selfLinkWithId,
setAutoscalerLinkOperationMetadata,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone;
REPLACE
examples
- update
Updates a deployment and all of the resources described by the deployment manifest.
REPLACE google.deploymentmanager.deployments
SET
data__id = '{{ id }}',
data__name = '{{ name }}',
data__description = '{{ description }}',
data__operation = '{{ operation }}',
data__fingerprint = '{{ fingerprint }}',
data__manifest = '{{ manifest }}',
data__update = '{{ update }}',
data__insertTime = '{{ insertTime }}',
data__updateTime = '{{ updateTime }}',
data__target = '{{ target }}',
data__labels = '{{ labels }}',
data__selfLink = '{{ selfLink }}'
WHERE
project = '{{ project }}' --required
AND deployment = '{{ deployment }}' --required
AND createPolicy = '{{ createPolicy}}'
AND deletePolicy = '{{ deletePolicy}}'
AND preview = {{ preview}}
AND header.bypassBillingFilter = {{ header.bypassBillingFilter}}
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
selfLinkWithId,
setAutoscalerLinkOperationMetadata,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone;
DELETE
examples
- delete
Deletes a deployment and all of the resources in the deployment.
DELETE FROM google.deploymentmanager.deployments
WHERE project = '{{ project }}' --required
AND deployment = '{{ deployment }}' --required
AND deletePolicy = '{{ deletePolicy }}'
AND header.bypassBillingFilter = '{{ header.bypassBillingFilter }}';
Lifecycle Methods
- cancel_preview
- stop
Cancels and removes the preview currently associated with the deployment.
EXEC google.deploymentmanager.deployments.cancel_preview
@project='{{ project }}' --required,
@deployment='{{ deployment }}' --required
@@json=
'{
"fingerprint": "{{ fingerprint }}"
}';
Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started.
EXEC google.deploymentmanager.deployments.stop
@project='{{ project }}' --required,
@deployment='{{ deployment }}' --required
@@json=
'{
"fingerprint": "{{ fingerprint }}"
}';