Skip to main content

indexes

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

Overview

Nameindexes
TypeResource
Idgoogle.aiplatform.indexes

Fields

NameDatatypeDescription
namestringOutput only. The resource name of the Index.
descriptionstringThe description of the Index.
createTimestringOutput only. Timestamp when this Index was created.
deployedIndexesarrayOutput only. The pointers to DeployedIndexes created from this Index. An Index can be only deleted if all its DeployedIndexes had been undeployed first.
displayNamestringRequired. The display name of the Index. The name can be up to 128 characters long and can consist of any UTF-8 characters.
encryptionSpecobjectRepresents a customer-managed encryption key spec that can be applied to a top-level resource.
etagstringUsed to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
indexStatsobjectStats of the Index.
indexUpdateMethodstringImmutable. The update method to use with this Index. If not set, BATCH_UPDATE will be used by default.
labelsobjectThe labels with user-defined metadata to organize your Indexes. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
metadataanyAn additional information about the Index; the schema of the metadata can be found in metadata_schema.
metadataSchemaUristringImmutable. Points to a YAML file stored on Google Cloud Storage describing additional information about the Index, that is specific to it. Unset if the Index does not have any additional information. The schema is defined as an OpenAPI 3.0.2 Schema Object. Note: The URI given on output will be immutable and probably different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access.
satisfiesPzibooleanOutput only. Reserved for future use.
satisfiesPzsbooleanOutput only. Reserved for future use.
updateTimestringOutput only. Timestamp when this Index was most recently updated. This also includes any update to the contents of the Index. Note that Operations working on this Index may have their Operations.metadata.generic_metadata.update_time a little after the value of this timestamp, yet that does not mean their results are not already reflected in the Index. Result of any successfully completed Operation on the Index is reflected in it.

Methods

NameAccessible byRequired ParamsDescription
getSELECTindexesId, locationsId, projectsIdGets an Index.
listSELECTlocationsId, projectsIdLists Indexes in a Location.
createINSERTlocationsId, projectsIdCreates an Index.
deleteDELETEindexesId, locationsId, projectsIdDeletes an Index. An Index can only be deleted when all its DeployedIndexes had been undeployed.
patchUPDATEindexesId, locationsId, projectsIdUpdates an Index.
upsert_datapointsEXECindexesId, locationsId, projectsIdAdd/update Datapoints into an Index.

SELECT examples

Lists Indexes in a Location.

SELECT
name,
description,
createTime,
deployedIndexes,
displayName,
encryptionSpec,
etag,
indexStats,
indexUpdateMethod,
labels,
metadata,
metadataSchemaUri,
satisfiesPzi,
satisfiesPzs,
updateTime
FROM google.aiplatform.indexes
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new indexes resource.

/*+ create */
INSERT INTO google.aiplatform.indexes (
locationsId,
projectsId,
metadataSchemaUri,
indexUpdateMethod,
labels,
etag,
encryptionSpec,
displayName,
description,
metadata
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ metadataSchemaUri }}',
'{{ indexUpdateMethod }}',
'{{ labels }}',
'{{ etag }}',
'{{ encryptionSpec }}',
'{{ displayName }}',
'{{ description }}',
'{{ metadata }}'
;

UPDATE example

Updates a indexes resource.

/*+ update */
UPDATE google.aiplatform.indexes
SET
metadataSchemaUri = '{{ metadataSchemaUri }}',
indexUpdateMethod = '{{ indexUpdateMethod }}',
labels = '{{ labels }}',
etag = '{{ etag }}',
encryptionSpec = '{{ encryptionSpec }}',
displayName = '{{ displayName }}',
description = '{{ description }}',
metadata = '{{ metadata }}'
WHERE
indexesId = '{{ indexesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified indexes resource.

/*+ delete */
DELETE FROM google.aiplatform.indexes
WHERE indexesId = '{{ indexesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';