Skip to main content

revisions

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

Overview

Namerevisions
TypeResource
Idgoogle.geminicloudassist.revisions

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. name of resource
createTimestring (google-datetime)Output only. [Output only] Create time stamp
indexinteger (int32)Output only. Revision index number, in order of creation.
labelsobjectOptional. Labels as key value pairs
snapshotobjectMessage describing Investigation object Next Id: 24 (id: Investigation)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, investigationsId, revisionsIdGets details of a single revision of an Investigation.
listselectprojectsId, locationsId, investigationsIdpageSize, pageTokenLists Investigations in a given project and location.
createinsertprojectsId, locationsId, investigationsIdinvestigationRevisionId, requestIdCreates a new revision of a given Investigation.
patchupdateprojectsId, locationsId, investigationsId, revisionsIdupdateMask, requestIdUpdates the parameters of a single Investigation.
deletedeleteprojectsId, locationsId, investigationsId, revisionsIdrequestIdDeletes a single revision of an Investigation. Fails if the revision is the investigation's active revision.
runexecprojectsId, locationsId, investigationsId, revisionsIdRun an existing revision of an investigation.

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
investigationsIdstring
locationsIdstring
projectsIdstring
revisionsIdstring
investigationRevisionIdstring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets details of a single revision of an Investigation.

SELECT
name,
createTime,
index,
labels,
snapshot
FROM google.geminicloudassist.revisions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND investigationsId = '{{ investigationsId }}' -- required
AND revisionsId = '{{ revisionsId }}' -- required;

INSERT examples

Creates a new revision of a given Investigation.

INSERT INTO google.geminicloudassist.revisions (
data__name,
data__snapshot,
data__labels,
projectsId,
locationsId,
investigationsId,
investigationRevisionId,
requestId
)
SELECT
'{{ name }}',
'{{ snapshot }}',
'{{ labels }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ investigationsId }}',
'{{ investigationRevisionId }}',
'{{ requestId }}'
RETURNING
name,
createTime,
index,
labels,
snapshot
;

UPDATE examples

Updates the parameters of a single Investigation.

UPDATE google.geminicloudassist.revisions
SET
data__name = '{{ name }}',
data__snapshot = '{{ snapshot }}',
data__labels = '{{ labels }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND investigationsId = '{{ investigationsId }}' --required
AND revisionsId = '{{ revisionsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
createTime,
index,
labels,
snapshot;

DELETE examples

Deletes a single revision of an Investigation. Fails if the revision is the investigation's active revision.

DELETE FROM google.geminicloudassist.revisions
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND investigationsId = '{{ investigationsId }}' --required
AND revisionsId = '{{ revisionsId }}' --required
AND requestId = '{{ requestId }}';

Lifecycle Methods

Run an existing revision of an investigation.

EXEC google.geminicloudassist.revisions.run 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@investigationsId='{{ investigationsId }}' --required,
@revisionsId='{{ revisionsId }}' --required
@@json=
'{
"runParameters": "{{ runParameters }}",
"updatedRevision": "{{ updatedRevision }}",
"updateMask": "{{ updateMask }}"
}';