versions
Creates, updates, deletes, gets or lists a versions resource.
Overview
| Name | versions |
| Type | Resource |
| Id | google.ces.versions |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The unique identifier of the app version. Format: projects/{project}/locations/{location}/apps/{app}/versions/{version} |
createTime | string (google-datetime) | Output only. Timestamp when the app version was created. |
creator | string | Output only. Email of the user who created the app version. |
description | string | Optional. The description of the app version. |
displayName | string | Optional. The display name of the app version. |
etag | string | Output 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. |
snapshot | object | Output only. The snapshot of the app when the version is created. (id: AppSnapshot) |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The unique identifier of the app version. Format: projects/{project}/locations/{location}/apps/{app}/versions/{version} |
createTime | string (google-datetime) | Output only. Timestamp when the app version was created. |
creator | string | Output only. Email of the user who created the app version. |
description | string | Optional. The description of the app version. |
displayName | string | Optional. The display name of the app version. |
etag | string | Output 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. |
snapshot | object | Output only. The snapshot of the app when the version is created. (id: AppSnapshot) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, appsId, versionsId | Gets details of the specified app version. | |
list | select | projectsId, locationsId, appsId | pageSize, pageToken, filter, orderBy | Lists all app versions in the given app. |
create | insert | projectsId, locationsId, appsId | appVersionId | Creates a new app version in the given app. |
delete | delete | projectsId, locationsId, appsId, versionsId | etag | Deletes the specified app version. |
restore | exec | projectsId, locationsId, appsId, versionsId | 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. |
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 |
|---|---|---|
appsId | string | |
locationsId | string | |
projectsId | string | |
versionsId | string | |
appVersionId | string | |
etag | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT examples
- get
- list
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
;
Lists all app versions in the given app.
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: versions
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the versions resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the versions resource.
- name: appsId
value: "{{ appsId }}"
description: Required parameter for the versions resource.
- name: name
value: "{{ name }}"
description: |
Identifier. The unique identifier of the app version. Format: `projects/{project}/locations/{location}/apps/{app}/versions/{version}`
- name: displayName
value: "{{ displayName }}"
description: |
Optional. The display name of the app version.
- name: description
value: "{{ description }}"
description: |
Optional. The description of the app version.
- name: appVersionId
value: "{{ appVersionId }}"
DELETE examples
- delete
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
- restore
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
;