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:

NameDatatypeDescription
namestringIdentifier. The name of the revision resource, of the form: projects/{project_number}/locations/{location_id}/investigations/{investigation_id}/revisions/{revision_id}
createTimestring (google-datetime)Output only. The time when the revision was created.
indexinteger (int32)Output only. Revision index number, in order of creation.
labelsobjectOptional. User-defined labels for the revision.
snapshotobjectHolds the contents of a Gemini Cloud Assist Troubleshooting investigation. (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.
createinsertprojectsId, locationsId, investigationsIdrequestId, investigationRevisionIdCreates a new revision of a given Investigation.
deletedeleteprojectsId, locationsId, investigationsId, revisionsIdrequestIdDeletes a single revision of an Investigation. Fails if the revision is the investigation's most recent 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

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,
requestId,
investigationRevisionId
)
SELECT
'{{ name }}',
'{{ snapshot }}',
'{{ labels }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ investigationsId }}',
'{{ requestId }}',
'{{ investigationRevisionId }}'
RETURNING
name,
createTime,
index,
labels,
snapshot
;

DELETE examples

Deletes a single revision of an Investigation. Fails if the revision is the investigation's most recent 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 }}"
}'
;