indexes
Creates, updates, deletes, gets or lists a indexes
resource.
Overview
Name | indexes |
Type | Resource |
Id | google.aiplatform.indexes |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the Index. |
description | string | The description of the Index. |
createTime | string | Output only. Timestamp when this Index was created. |
deployedIndexes | array | Output only. The pointers to DeployedIndexes created from this Index. An Index can be only deleted if all its DeployedIndexes had been undeployed first. |
displayName | string | Required. The display name of the Index. The name can be up to 128 characters long and can consist of any UTF-8 characters. |
encryptionSpec | object | Represents a customer-managed encryption key spec that can be applied to a top-level resource. |
etag | string | Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. |
indexStats | object | Stats of the Index. |
indexUpdateMethod | string | Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be used by default. |
labels | object | The 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. |
metadata | any | An additional information about the Index; the schema of the metadata can be found in metadata_schema. |
metadataSchemaUri | string | Immutable. 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. |
satisfiesPzi | boolean | Output only. Reserved for future use. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
updateTime | string | Output 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
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | indexesId, locationsId, projectsId | Gets an Index. |
list | SELECT | locationsId, projectsId | Lists Indexes in a Location. |
create | INSERT | locationsId, projectsId | Creates an Index. |
delete | DELETE | indexesId, locationsId, projectsId | Deletes an Index. An Index can only be deleted when all its DeployedIndexes had been undeployed. |
patch | UPDATE | indexesId, locationsId, projectsId | Updates an Index. |
upsert_datapoints | EXEC | indexesId, locationsId, projectsId | Add/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.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: metadataSchemaUri
value: string
- name: indexStats
value:
- name: sparseVectorsCount
value: string
- name: shardsCount
value: integer
- name: vectorsCount
value: string
- name: indexUpdateMethod
value: string
- name: labels
value: object
- name: createTime
value: string
- name: satisfiesPzi
value: boolean
- name: etag
value: string
- name: encryptionSpec
value:
- name: kmsKeyName
value: string
- name: updateTime
value: string
- name: deployedIndexes
value:
- - name: deployedIndexId
value: string
- name: displayName
value: string
- name: indexEndpoint
value: string
- name: displayName
value: string
- name: satisfiesPzs
value: boolean
- name: description
value: string
- name: metadata
value: any
- name: name
value: string
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 }}';