templates
Creates, updates, deletes, gets or lists a templates resource.
Overview
| Name | templates |
| Type | Resource |
| Id | google.parametermanager.templates |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The resource name of the Template in the format projects/*/locations/*/templates/*. |
createTime | string (google-datetime) | Output only. Create time stamp |
format | string | Optional. Specifies the format of a Template. (TEMPLATE_FORMAT_UNSPECIFIED, TEMPLATE_FORMAT_YAML, TEMPLATE_FORMAT_JSON) |
labels | object | Optional. Labels as key value pairs |
updateTime | string (google-datetime) | Output only. Update time stamp |
| Name | Datatype | Description |
|---|
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, templatesId | Gets details of a single Template. | |
list | select | projectsId, locationsId | pageSize, filter, pageToken, orderBy | Lists Templates in a given project and location. |
create | insert | projectsId, locationsId | templateId, requestId | Creates a new Template in a given project and location. |
patch | update | projectsId, locationsId, templatesId | requestId, updateMask | Updates a single Template. |
delete | delete | projectsId, locationsId, templatesId | requestId | Deletes a single Template. |
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 |
|---|---|---|
locationsId | string | |
projectsId | string | |
templatesId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
templateId | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets details of a single Template.
SELECT
name,
createTime,
format,
labels,
updateTime
FROM google.parametermanager.templates
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND templatesId = '{{ templatesId }}' -- required
;
Lists Templates in a given project and location.
SELECT
*
FROM google.parametermanager.templates
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND filter = '{{ filter }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
;
INSERT examples
- create
- Manifest
Creates a new Template in a given project and location.
INSERT INTO google.parametermanager.templates (
data__labels,
data__name,
data__format,
projectsId,
locationsId,
templateId,
requestId
)
SELECT
'{{ labels }}',
'{{ name }}',
'{{ format }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ templateId }}',
'{{ requestId }}'
RETURNING
name,
createTime,
format,
labels,
updateTime
;
# Description fields are for documentation purposes
- name: templates
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the templates resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the templates resource.
- name: labels
value: "{{ labels }}"
description: |
Optional. Labels as key value pairs
- name: name
value: "{{ name }}"
description: |
Identifier. The resource name of the Template in the format `projects/*/locations/*/templates/*`.
- name: format
value: "{{ format }}"
description: |
Optional. Specifies the format of a Template.
valid_values: ['TEMPLATE_FORMAT_UNSPECIFIED', 'TEMPLATE_FORMAT_YAML', 'TEMPLATE_FORMAT_JSON']
- name: templateId
value: "{{ templateId }}"
- name: requestId
value: "{{ requestId }}"
UPDATE examples
- patch
Updates a single Template.
UPDATE google.parametermanager.templates
SET
data__labels = '{{ labels }}',
data__name = '{{ name }}',
data__format = '{{ format }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND templatesId = '{{ templatesId }}' --required
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
RETURNING
name,
createTime,
format,
labels,
updateTime;
DELETE examples
- delete
Deletes a single Template.
DELETE FROM google.parametermanager.templates
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND templatesId = '{{ templatesId }}' --required
AND requestId = '{{ requestId }}'
;