Skip to main content

versions

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

Overview

Nameversions
TypeResource
Idgoogle.ces.versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. The unique identifier of the app version. Format: projects/{project}/locations/{location}/apps/{app}/versions/{version}
createTimestring (google-datetime)Output only. Timestamp when the app version was created.
creatorstringOutput only. Email of the user who created the app version.
descriptionstringOptional. The description of the app version.
displayNamestringOptional. The display name of the app version.
etagstringOutput only. Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
snapshotobjectOutput only. The snapshot of the app when the version is created. (id: AppSnapshot)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, appsId, versionsIdGets details of the specified app version.
listselectprojectsId, locationsId, appsIdpageSize, pageToken, filter, orderByLists all app versions in the given app.
createinsertprojectsId, locationsId, appsIdappVersionIdCreates a new app version in the given app.
deletedeleteprojectsId, locationsId, appsId, versionsIdetagDeletes the specified app version.
restoreexecprojectsId, locationsId, appsId, versionsIdRestores the specified app version. This will create a new app version from the current draft app and overwrite the current draft with the specified app version.

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
appsIdstring
locationsIdstring
projectsIdstring
versionsIdstring
appVersionIdstring
etagstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets details of the specified app version.

SELECT
name,
createTime,
creator,
description,
displayName,
etag,
snapshot
FROM google.ces.versions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND appsId = '{{ appsId }}' -- required
AND versionsId = '{{ versionsId }}' -- required
;

INSERT examples

Creates a new app version in the given app.

INSERT INTO google.ces.versions (
data__name,
data__displayName,
data__description,
projectsId,
locationsId,
appsId,
appVersionId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ appsId }}',
'{{ appVersionId }}'
RETURNING
name,
createTime,
creator,
description,
displayName,
etag,
snapshot
;

DELETE examples

Deletes the specified app version.

DELETE FROM google.ces.versions
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND appsId = '{{ appsId }}' --required
AND versionsId = '{{ versionsId }}' --required
AND etag = '{{ etag }}'
;

Lifecycle Methods

Restores the specified app version. This will create a new app version from the current draft app and overwrite the current draft with the specified app version.

EXEC google.ces.versions.restore
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@appsId='{{ appsId }}' --required,
@versionsId='{{ versionsId }}' --required
;