indexes
Creates, updates, deletes, gets or lists an indexes
resource.
Overview
Name | indexes |
Type | Resource |
Id | google.aiplatform.indexes |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the Index. |
createTime | string (google-datetime) | 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. |
description | string | The description of the Index. |
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 | Immutable. Customer-managed encryption key spec for an Index. If set, this Index and all sub-resources of this Index will be secured by this key. (id: GoogleCloudAiplatformV1EncryptionSpec) |
etag | string | Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. |
indexStats | object | Output only. Stats of the index resource. (id: GoogleCloudAiplatformV1IndexStats) |
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 (google-datetime) | 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. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the Index. |
createTime | string (google-datetime) | 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. |
description | string | The description of the Index. |
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 | Immutable. Customer-managed encryption key spec for an Index. If set, this Index and all sub-resources of this Index will be secured by this key. (id: GoogleCloudAiplatformV1EncryptionSpec) |
etag | string | Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. |
indexStats | object | Output only. Stats of the index resource. (id: GoogleCloudAiplatformV1IndexStats) |
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 (google-datetime) | 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
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , indexesId | Gets an Index. | |
list | select | projectsId , locationsId | filter , pageSize , pageToken , readMask | Lists Indexes in a Location. |
create | insert | projectsId , locationsId | Creates an Index. | |
patch | update | projectsId , locationsId , indexesId | updateMask | Updates an Index. |
delete | delete | projectsId , locationsId , indexesId | Deletes an Index. An Index can only be deleted when all its DeployedIndexes had been undeployed. | |
upsert_datapoints | exec | projectsId , locationsId , indexesId | Add/update Datapoints into an Index. | |
remove_datapoints | exec | projectsId , locationsId , indexesId | Remove Datapoints from an Index. |
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 |
---|---|---|
indexesId | string | |
locationsId | string | |
projectsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
readMask | string (google-fieldmask) | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets an Index.
SELECT
name,
createTime,
deployedIndexes,
description,
displayName,
encryptionSpec,
etag,
indexStats,
indexUpdateMethod,
labels,
metadata,
metadataSchemaUri,
satisfiesPzi,
satisfiesPzs,
updateTime
FROM google.aiplatform.indexes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND indexesId = '{{ indexesId }}' -- required;
Lists Indexes in a Location.
SELECT
name,
createTime,
deployedIndexes,
description,
displayName,
encryptionSpec,
etag,
indexStats,
indexUpdateMethod,
labels,
metadata,
metadataSchemaUri,
satisfiesPzi,
satisfiesPzs,
updateTime
FROM google.aiplatform.indexes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND readMask = '{{ readMask }}';
INSERT
examples
- create
- Manifest
Creates an Index.
INSERT INTO google.aiplatform.indexes (
data__displayName,
data__description,
data__metadataSchemaUri,
data__metadata,
data__etag,
data__labels,
data__indexUpdateMethod,
data__encryptionSpec,
projectsId,
locationsId
)
SELECT
'{{ displayName }}',
'{{ description }}',
'{{ metadataSchemaUri }}',
'{{ metadata }}',
'{{ etag }}',
'{{ labels }}',
'{{ indexUpdateMethod }}',
'{{ encryptionSpec }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: indexes
props:
- name: projectsId
value: string
description: Required parameter for the indexes resource.
- name: locationsId
value: string
description: Required parameter for the indexes resource.
- name: displayName
value: string
description: >
Required. The display name of the Index. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- name: description
value: string
description: >
The description of the Index.
- name: metadataSchemaUri
value: string
description: >
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](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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.
- name: metadata
value: any
description: >
An additional information about the Index; the schema of the metadata can be found in metadata_schema.
- name: etag
value: string
description: >
Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
- name: labels
value: object
description: >
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.
- name: indexUpdateMethod
value: string
description: >
Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be used by default.
valid_values: ['INDEX_UPDATE_METHOD_UNSPECIFIED', 'BATCH_UPDATE', 'STREAM_UPDATE']
- name: encryptionSpec
value: object
description: >
Immutable. Customer-managed encryption key spec for an Index. If set, this Index and all sub-resources of this Index will be secured by this key.
UPDATE
examples
- patch
Updates an Index.
UPDATE google.aiplatform.indexes
SET
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__metadataSchemaUri = '{{ metadataSchemaUri }}',
data__metadata = '{{ metadata }}',
data__etag = '{{ etag }}',
data__labels = '{{ labels }}',
data__indexUpdateMethod = '{{ indexUpdateMethod }}',
data__encryptionSpec = '{{ encryptionSpec }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND indexesId = '{{ indexesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes an Index. An Index can only be deleted when all its DeployedIndexes had been undeployed.
DELETE FROM google.aiplatform.indexes
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND indexesId = '{{ indexesId }}' --required;
Lifecycle Methods
- upsert_datapoints
- remove_datapoints
Add/update Datapoints into an Index.
EXEC google.aiplatform.indexes.upsert_datapoints
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@indexesId='{{ indexesId }}' --required
@@json=
'{
"datapoints": "{{ datapoints }}",
"updateMask": "{{ updateMask }}"
}';
Remove Datapoints from an Index.
EXEC google.aiplatform.indexes.remove_datapoints
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@indexesId='{{ indexesId }}' --required
@@json=
'{
"datapointIds": "{{ datapointIds }}"
}';