deployments
Creates, updates, deletes, gets or lists a deployments
resource.
Overview
Name | deployments |
Type | Resource |
Id | google.deploymentmanager.deployments |
Fields
Name | Datatype | Description |
---|---|---|
id | string | |
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 | 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 | Represents an Operation resource. Google Compute Engine has three Operation resources: Global Regional * Zonal You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the globalOperations resource. - For regional operations, use the regionOperations resource. - For zonal operations, use the zoneOperations resource. For more information, read Global, Regional, and Zonal Resources. Note that completed Operation resources have a limited retention period. |
selfLink | string | Output only. Server defined URL for the resource. |
target | object | |
update | object | |
updateTime | string | Output only. Update timestamp in RFC3339 text format. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | deployment, project | Gets information about a specific deployment. |
list | SELECT | project | Lists all deployments for a given project. |
insert | INSERT | project | Creates a deployment and all of the resources described by the deployment manifest. |
delete | DELETE | deployment, project | Deletes a deployment and all of the resources in the deployment. |
patch | UPDATE | deployment, project | Patches a deployment and all of the resources described by the deployment manifest. |
update | REPLACE | deployment, project | Updates a deployment and all of the resources described by the deployment manifest. |
cancel_preview | EXEC | deployment, project | Cancels and removes the preview currently associated with the deployment. |
stop | EXEC | deployment, project | Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started. |
SELECT
examples
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 }}';
INSERT
example
Use the following StackQL query and manifest file to create a new deployments
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.deploymentmanager.deployments (
project,
name,
description,
operation,
fingerprint,
manifest,
update,
insertTime,
target,
labels
)
SELECT
'{{ project }}',
'{{ name }}',
'{{ description }}',
'{{ operation }}',
'{{ fingerprint }}',
'{{ manifest }}',
'{{ update }}',
'{{ insertTime }}',
'{{ target }}',
'{{ labels }}'
;
- name: your_resource_model_name
props:
- name: id
value: string
- name: name
value: string
- name: description
value: string
- name: operation
value:
- name: kind
value: string
- name: id
value: string
- name: creationTimestamp
value: string
- name: name
value: string
- name: zone
value: string
- name: clientOperationId
value: string
- name: operationType
value: string
- name: targetLink
value: string
- name: targetId
value: string
- name: status
value: string
- name: statusMessage
value: string
- name: user
value: string
- name: progress
value: integer
- name: insertTime
value: string
- name: startTime
value: string
- name: endTime
value: string
- name: error
value:
- name: errors
value:
- - name: code
value: string
- name: location
value: string
- name: message
value: string
- name: warnings
value:
- - name: code
value: string
- name: message
value: string
- name: data
value:
- - name: key
value: string
- name: value
value: string
- name: httpErrorStatusCode
value: integer
- name: httpErrorMessage
value: string
- name: selfLink
value: string
- name: region
value: string
- name: description
value: string
- name: operationGroupId
value: string
- name: setCommonInstanceMetadataOperationMetadata
value:
- name: clientOperationId
value: string
- name: perLocationOperations
value: object
- name: instancesBulkInsertOperationMetadata
value:
- name: perLocationStatus
value: object
- name: fingerprint
value: string
- name: manifest
value: string
- name: update
value:
- name: manifest
value: string
- name: labels
value:
- - name: key
value: string
- name: value
value: string
- name: description
value: string
- name: insertTime
value: string
- name: updateTime
value: string
- name: target
value:
- name: config
value:
- name: content
value: string
- name: imports
value:
- - name: name
value: string
- name: content
value: string
- name: labels
value:
- - name: key
value: string
- name: value
value: string
- name: selfLink
value: string
UPDATE
example
Updates a deployments
resource.
/*+ update */
UPDATE google.deploymentmanager.deployments
SET
name = '{{ name }}',
description = '{{ description }}',
operation = '{{ operation }}',
fingerprint = '{{ fingerprint }}',
manifest = '{{ manifest }}',
update = '{{ update }}',
insertTime = '{{ insertTime }}',
target = '{{ target }}',
labels = '{{ labels }}'
WHERE
deployment = '{{ deployment }}'
AND project = '{{ project }}';
REPLACE
example
Replaces all fields in the specified deployments
resource.
/*+ update */
REPLACE google.deploymentmanager.deployments
SET
name = '{{ name }}',
description = '{{ description }}',
operation = '{{ operation }}',
fingerprint = '{{ fingerprint }}',
manifest = '{{ manifest }}',
update = '{{ update }}',
insertTime = '{{ insertTime }}',
target = '{{ target }}',
labels = '{{ labels }}'
WHERE
deployment = '{{ deployment }}'
AND project = '{{ project }}';
DELETE
example
Deletes the specified deployments
resource.
/*+ delete */
DELETE FROM google.deploymentmanager.deployments
WHERE deployment = '{{ deployment }}'
AND project = '{{ project }}';