Skip to main content

versions

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

Overview​

Nameversions
TypeResource
Idgoogle.parametermanager.versions

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. The resource name of the TemplateVersion in the format projects/*/locations/*/templates/*/versions/*.
createTimestring (google-datetime)Output only. Create time stamp
disabledbooleanOptional. Disabled boolean to determine if a TemplateVersion acts as a metadata only resource (payload is never returned if disabled is true).
payloadobjectRequired. Immutable. Payload content of a TemplateVersion resource. (id: TemplateVersionPayload)
updateTimestring (google-datetime)Output only. Update time stamp

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, templatesId, versionsIdviewGets details of a single TemplateVersion.
listselectprojectsId, locationsId, templatesIdfilter, orderBy, pageSize, pageTokenLists TemplateVersions in a given project, location, and template.
createinsertprojectsId, locationsId, templatesIdrequestId, templateVersionIdCreates a new TemplateVersion in a given project, location, and template.
patchupdateprojectsId, locationsId, templatesId, versionsIdrequestId, updateMaskUpdates a single TemplateVersion.
deletedeleteprojectsId, locationsId, templatesId, versionsIdrequestIdDeletes a single TemplateVersion.
renderexecprojectsId, locationsId, templatesId, versionsIdparameterVersionGets rendered version of a TemplateVersion.

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
locationsIdstring
projectsIdstring
templatesIdstring
versionsIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
parameterVersionstring
requestIdstring
templateVersionIdstring
updateMaskstring (google-fieldmask)
viewstring

SELECT examples​

Gets details of a single TemplateVersion.

SELECT
name,
createTime,
disabled,
payload,
updateTime
FROM google.parametermanager.versions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND templatesId = '{{ templatesId }}' -- required
AND versionsId = '{{ versionsId }}' -- required
AND view = '{{ view }}'
;

INSERT examples​

Creates a new TemplateVersion in a given project, location, and template.

INSERT INTO google.parametermanager.versions (
data__disabled,
data__name,
data__payload,
projectsId,
locationsId,
templatesId,
requestId,
templateVersionId
)
SELECT
{{ disabled }},
'{{ name }}',
'{{ payload }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ templatesId }}',
'{{ requestId }}',
'{{ templateVersionId }}'
RETURNING
name,
createTime,
disabled,
payload,
updateTime
;

UPDATE examples​

Updates a single TemplateVersion.

UPDATE google.parametermanager.versions
SET
data__disabled = {{ disabled }},
data__name = '{{ name }}',
data__payload = '{{ payload }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND templatesId = '{{ templatesId }}' --required
AND versionsId = '{{ versionsId }}' --required
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
RETURNING
name,
createTime,
disabled,
payload,
updateTime;

DELETE examples​

Deletes a single TemplateVersion.

DELETE FROM google.parametermanager.versions
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND templatesId = '{{ templatesId }}' --required
AND versionsId = '{{ versionsId }}' --required
AND requestId = '{{ requestId }}'
;

Lifecycle Methods​

Gets rendered version of a TemplateVersion.

EXEC google.parametermanager.versions.render
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@templatesId='{{ templatesId }}' --required,
@versionsId='{{ versionsId }}' --required,
@parameterVersion='{{ parameterVersion }}'
;