1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. vertex
  5. getAiIndex
Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi

gcp.vertex.getAiIndex

Explore with Pulumi AI

Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi

A representation of a collection of database items organized in a way that allows for approximate nearest neighbor (a.k.a ANN) algorithms search.

Using getAiIndex

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getAiIndex(args: GetAiIndexArgs, opts?: InvokeOptions): Promise<GetAiIndexResult>
function getAiIndexOutput(args: GetAiIndexOutputArgs, opts?: InvokeOptions): Output<GetAiIndexResult>
Copy
def get_ai_index(name: Optional[str] = None,
                 project: Optional[str] = None,
                 region: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetAiIndexResult
def get_ai_index_output(name: Optional[pulumi.Input[str]] = None,
                 project: Optional[pulumi.Input[str]] = None,
                 region: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetAiIndexResult]
Copy
func LookupAiIndex(ctx *Context, args *LookupAiIndexArgs, opts ...InvokeOption) (*LookupAiIndexResult, error)
func LookupAiIndexOutput(ctx *Context, args *LookupAiIndexOutputArgs, opts ...InvokeOption) LookupAiIndexResultOutput
Copy

> Note: This function is named LookupAiIndex in the Go SDK.

public static class GetAiIndex 
{
    public static Task<GetAiIndexResult> InvokeAsync(GetAiIndexArgs args, InvokeOptions? opts = null)
    public static Output<GetAiIndexResult> Invoke(GetAiIndexInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetAiIndexResult> getAiIndex(GetAiIndexArgs args, InvokeOptions options)
public static Output<GetAiIndexResult> getAiIndex(GetAiIndexArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gcp:vertex/getAiIndex:getAiIndex
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of the index.
Region This property is required. string
The region of the index.


Project string
The ID of the project in which the resource belongs.
Name This property is required. string
The name of the index.
Region This property is required. string
The region of the index.


Project string
The ID of the project in which the resource belongs.
name This property is required. String
The name of the index.
region This property is required. String
The region of the index.


project String
The ID of the project in which the resource belongs.
name This property is required. string
The name of the index.
region This property is required. string
The region of the index.


project string
The ID of the project in which the resource belongs.
name This property is required. str
The name of the index.
region This property is required. str
The region of the index.


project str
The ID of the project in which the resource belongs.
name This property is required. String
The name of the index.
region This property is required. String
The region of the index.


project String
The ID of the project in which the resource belongs.

getAiIndex Result

The following output properties are available:

CreateTime string
DeployedIndexes List<GetAiIndexDeployedIndex>
Description string
DisplayName string
EffectiveLabels Dictionary<string, string>
Etag string
Id string
The provider-assigned unique ID for this managed resource.
IndexStats List<GetAiIndexIndexStat>
IndexUpdateMethod string
Labels Dictionary<string, string>
MetadataSchemaUri string
Metadatas List<GetAiIndexMetadata>
Name string
PulumiLabels Dictionary<string, string>
Region string
UpdateTime string
Project string
CreateTime string
DeployedIndexes []GetAiIndexDeployedIndex
Description string
DisplayName string
EffectiveLabels map[string]string
Etag string
Id string
The provider-assigned unique ID for this managed resource.
IndexStats []GetAiIndexIndexStat
IndexUpdateMethod string
Labels map[string]string
MetadataSchemaUri string
Metadatas []GetAiIndexMetadata
Name string
PulumiLabels map[string]string
Region string
UpdateTime string
Project string
createTime String
deployedIndexes List<GetAiIndexDeployedIndex>
description String
displayName String
effectiveLabels Map<String,String>
etag String
id String
The provider-assigned unique ID for this managed resource.
indexStats List<GetAiIndexIndexStat>
indexUpdateMethod String
labels Map<String,String>
metadataSchemaUri String
metadatas List<GetAiIndexMetadata>
name String
pulumiLabels Map<String,String>
region String
updateTime String
project String
createTime string
deployedIndexes GetAiIndexDeployedIndex[]
description string
displayName string
effectiveLabels {[key: string]: string}
etag string
id string
The provider-assigned unique ID for this managed resource.
indexStats GetAiIndexIndexStat[]
indexUpdateMethod string
labels {[key: string]: string}
metadataSchemaUri string
metadatas GetAiIndexMetadata[]
name string
pulumiLabels {[key: string]: string}
region string
updateTime string
project string
createTime String
deployedIndexes List<Property Map>
description String
displayName String
effectiveLabels Map<String>
etag String
id String
The provider-assigned unique ID for this managed resource.
indexStats List<Property Map>
indexUpdateMethod String
labels Map<String>
metadataSchemaUri String
metadatas List<Property Map>
name String
pulumiLabels Map<String>
region String
updateTime String
project String

Supporting Types

GetAiIndexDeployedIndex

DeployedIndexId This property is required. string
The ID of the DeployedIndex in the above IndexEndpoint.
IndexEndpoint This property is required. string
A resource name of the IndexEndpoint.
DeployedIndexId This property is required. string
The ID of the DeployedIndex in the above IndexEndpoint.
IndexEndpoint This property is required. string
A resource name of the IndexEndpoint.
deployedIndexId This property is required. String
The ID of the DeployedIndex in the above IndexEndpoint.
indexEndpoint This property is required. String
A resource name of the IndexEndpoint.
deployedIndexId This property is required. string
The ID of the DeployedIndex in the above IndexEndpoint.
indexEndpoint This property is required. string
A resource name of the IndexEndpoint.
deployed_index_id This property is required. str
The ID of the DeployedIndex in the above IndexEndpoint.
index_endpoint This property is required. str
A resource name of the IndexEndpoint.
deployedIndexId This property is required. String
The ID of the DeployedIndex in the above IndexEndpoint.
indexEndpoint This property is required. String
A resource name of the IndexEndpoint.

GetAiIndexIndexStat

ShardsCount This property is required. int
The number of shards in the Index.
VectorsCount This property is required. string
The number of vectors in the Index.
ShardsCount This property is required. int
The number of shards in the Index.
VectorsCount This property is required. string
The number of vectors in the Index.
shardsCount This property is required. Integer
The number of shards in the Index.
vectorsCount This property is required. String
The number of vectors in the Index.
shardsCount This property is required. number
The number of shards in the Index.
vectorsCount This property is required. string
The number of vectors in the Index.
shards_count This property is required. int
The number of shards in the Index.
vectors_count This property is required. str
The number of vectors in the Index.
shardsCount This property is required. Number
The number of shards in the Index.
vectorsCount This property is required. String
The number of vectors in the Index.

GetAiIndexMetadata

Configs This property is required. List<GetAiIndexMetadataConfig>
The configuration of the Matching Engine Index.
ContentsDeltaUri This property is required. string
Allows inserting, updating or deleting the contents of the Matching Engine Index. The string must be a valid Cloud Storage directory path. If this field is set when calling IndexService.UpdateIndex, then no other Index field can be also updated as part of the same call. The expected structure and format of the files this URI points to is described at https://cloud.google.com/vertex-ai/docs/matching-engine/using-matching-engine#input-data-format
IsCompleteOverwrite This property is required. bool
If this field is set together with contentsDeltaUri when calling IndexService.UpdateIndex, then existing content of the Index will be replaced by the data from the contentsDeltaUri.
Configs This property is required. []GetAiIndexMetadataConfig
The configuration of the Matching Engine Index.
ContentsDeltaUri This property is required. string
Allows inserting, updating or deleting the contents of the Matching Engine Index. The string must be a valid Cloud Storage directory path. If this field is set when calling IndexService.UpdateIndex, then no other Index field can be also updated as part of the same call. The expected structure and format of the files this URI points to is described at https://cloud.google.com/vertex-ai/docs/matching-engine/using-matching-engine#input-data-format
IsCompleteOverwrite This property is required. bool
If this field is set together with contentsDeltaUri when calling IndexService.UpdateIndex, then existing content of the Index will be replaced by the data from the contentsDeltaUri.
configs This property is required. List<GetAiIndexMetadataConfig>
The configuration of the Matching Engine Index.
contentsDeltaUri This property is required. String
Allows inserting, updating or deleting the contents of the Matching Engine Index. The string must be a valid Cloud Storage directory path. If this field is set when calling IndexService.UpdateIndex, then no other Index field can be also updated as part of the same call. The expected structure and format of the files this URI points to is described at https://cloud.google.com/vertex-ai/docs/matching-engine/using-matching-engine#input-data-format
isCompleteOverwrite This property is required. Boolean
If this field is set together with contentsDeltaUri when calling IndexService.UpdateIndex, then existing content of the Index will be replaced by the data from the contentsDeltaUri.
configs This property is required. GetAiIndexMetadataConfig[]
The configuration of the Matching Engine Index.
contentsDeltaUri This property is required. string
Allows inserting, updating or deleting the contents of the Matching Engine Index. The string must be a valid Cloud Storage directory path. If this field is set when calling IndexService.UpdateIndex, then no other Index field can be also updated as part of the same call. The expected structure and format of the files this URI points to is described at https://cloud.google.com/vertex-ai/docs/matching-engine/using-matching-engine#input-data-format
isCompleteOverwrite This property is required. boolean
If this field is set together with contentsDeltaUri when calling IndexService.UpdateIndex, then existing content of the Index will be replaced by the data from the contentsDeltaUri.
configs This property is required. Sequence[GetAiIndexMetadataConfig]
The configuration of the Matching Engine Index.
contents_delta_uri This property is required. str
Allows inserting, updating or deleting the contents of the Matching Engine Index. The string must be a valid Cloud Storage directory path. If this field is set when calling IndexService.UpdateIndex, then no other Index field can be also updated as part of the same call. The expected structure and format of the files this URI points to is described at https://cloud.google.com/vertex-ai/docs/matching-engine/using-matching-engine#input-data-format
is_complete_overwrite This property is required. bool
If this field is set together with contentsDeltaUri when calling IndexService.UpdateIndex, then existing content of the Index will be replaced by the data from the contentsDeltaUri.
configs This property is required. List<Property Map>
The configuration of the Matching Engine Index.
contentsDeltaUri This property is required. String
Allows inserting, updating or deleting the contents of the Matching Engine Index. The string must be a valid Cloud Storage directory path. If this field is set when calling IndexService.UpdateIndex, then no other Index field can be also updated as part of the same call. The expected structure and format of the files this URI points to is described at https://cloud.google.com/vertex-ai/docs/matching-engine/using-matching-engine#input-data-format
isCompleteOverwrite This property is required. Boolean
If this field is set together with contentsDeltaUri when calling IndexService.UpdateIndex, then existing content of the Index will be replaced by the data from the contentsDeltaUri.

GetAiIndexMetadataConfig

AlgorithmConfigs This property is required. List<GetAiIndexMetadataConfigAlgorithmConfig>
The configuration with regard to the algorithms used for efficient search.
ApproximateNeighborsCount This property is required. int
The default number of neighbors to find via approximate search before exact reordering is performed. Exact reordering is a procedure where results returned by an approximate search algorithm are reordered via a more expensive distance computation. Required if tree-AH algorithm is used.
Dimensions This property is required. int
The number of dimensions of the input vectors.
DistanceMeasureType This property is required. string
The distance measure used in nearest neighbor search. The value must be one of the followings:

  • SQUARED_L2_DISTANCE: Euclidean (L_2) Distance
  • L1_DISTANCE: Manhattan (L_1) Distance
  • COSINE_DISTANCE: Cosine Distance. Defined as 1 - cosine similarity.
  • DOT_PRODUCT_DISTANCE: Dot Product Distance. Defined as a negative of the dot product
FeatureNormType This property is required. string
Type of normalization to be carried out on each vector. The value must be one of the followings:

  • UNIT_L2_NORM: Unit L2 normalization type
  • NONE: No normalization type is specified.
ShardSize This property is required. string
Index data is split into equal parts to be processed. These are called "shards". The shard size must be specified when creating an index. The value must be one of the followings:

  • SHARD_SIZE_SMALL: Small (2GB)
  • SHARD_SIZE_MEDIUM: Medium (20GB)
  • SHARD_SIZE_LARGE: Large (50GB)
AlgorithmConfigs This property is required. []GetAiIndexMetadataConfigAlgorithmConfig
The configuration with regard to the algorithms used for efficient search.
ApproximateNeighborsCount This property is required. int
The default number of neighbors to find via approximate search before exact reordering is performed. Exact reordering is a procedure where results returned by an approximate search algorithm are reordered via a more expensive distance computation. Required if tree-AH algorithm is used.
Dimensions This property is required. int
The number of dimensions of the input vectors.
DistanceMeasureType This property is required. string
The distance measure used in nearest neighbor search. The value must be one of the followings:

  • SQUARED_L2_DISTANCE: Euclidean (L_2) Distance
  • L1_DISTANCE: Manhattan (L_1) Distance
  • COSINE_DISTANCE: Cosine Distance. Defined as 1 - cosine similarity.
  • DOT_PRODUCT_DISTANCE: Dot Product Distance. Defined as a negative of the dot product
FeatureNormType This property is required. string
Type of normalization to be carried out on each vector. The value must be one of the followings:

  • UNIT_L2_NORM: Unit L2 normalization type
  • NONE: No normalization type is specified.
ShardSize This property is required. string
Index data is split into equal parts to be processed. These are called "shards". The shard size must be specified when creating an index. The value must be one of the followings:

  • SHARD_SIZE_SMALL: Small (2GB)
  • SHARD_SIZE_MEDIUM: Medium (20GB)
  • SHARD_SIZE_LARGE: Large (50GB)
algorithmConfigs This property is required. List<GetAiIndexMetadataConfigAlgorithmConfig>
The configuration with regard to the algorithms used for efficient search.
approximateNeighborsCount This property is required. Integer
The default number of neighbors to find via approximate search before exact reordering is performed. Exact reordering is a procedure where results returned by an approximate search algorithm are reordered via a more expensive distance computation. Required if tree-AH algorithm is used.
dimensions This property is required. Integer
The number of dimensions of the input vectors.
distanceMeasureType This property is required. String
The distance measure used in nearest neighbor search. The value must be one of the followings:

  • SQUARED_L2_DISTANCE: Euclidean (L_2) Distance
  • L1_DISTANCE: Manhattan (L_1) Distance
  • COSINE_DISTANCE: Cosine Distance. Defined as 1 - cosine similarity.
  • DOT_PRODUCT_DISTANCE: Dot Product Distance. Defined as a negative of the dot product
featureNormType This property is required. String
Type of normalization to be carried out on each vector. The value must be one of the followings:

  • UNIT_L2_NORM: Unit L2 normalization type
  • NONE: No normalization type is specified.
shardSize This property is required. String
Index data is split into equal parts to be processed. These are called "shards". The shard size must be specified when creating an index. The value must be one of the followings:

  • SHARD_SIZE_SMALL: Small (2GB)
  • SHARD_SIZE_MEDIUM: Medium (20GB)
  • SHARD_SIZE_LARGE: Large (50GB)
algorithmConfigs This property is required. GetAiIndexMetadataConfigAlgorithmConfig[]
The configuration with regard to the algorithms used for efficient search.
approximateNeighborsCount This property is required. number
The default number of neighbors to find via approximate search before exact reordering is performed. Exact reordering is a procedure where results returned by an approximate search algorithm are reordered via a more expensive distance computation. Required if tree-AH algorithm is used.
dimensions This property is required. number
The number of dimensions of the input vectors.
distanceMeasureType This property is required. string
The distance measure used in nearest neighbor search. The value must be one of the followings:

  • SQUARED_L2_DISTANCE: Euclidean (L_2) Distance
  • L1_DISTANCE: Manhattan (L_1) Distance
  • COSINE_DISTANCE: Cosine Distance. Defined as 1 - cosine similarity.
  • DOT_PRODUCT_DISTANCE: Dot Product Distance. Defined as a negative of the dot product
featureNormType This property is required. string
Type of normalization to be carried out on each vector. The value must be one of the followings:

  • UNIT_L2_NORM: Unit L2 normalization type
  • NONE: No normalization type is specified.
shardSize This property is required. string
Index data is split into equal parts to be processed. These are called "shards". The shard size must be specified when creating an index. The value must be one of the followings:

  • SHARD_SIZE_SMALL: Small (2GB)
  • SHARD_SIZE_MEDIUM: Medium (20GB)
  • SHARD_SIZE_LARGE: Large (50GB)
algorithm_configs This property is required. Sequence[GetAiIndexMetadataConfigAlgorithmConfig]
The configuration with regard to the algorithms used for efficient search.
approximate_neighbors_count This property is required. int
The default number of neighbors to find via approximate search before exact reordering is performed. Exact reordering is a procedure where results returned by an approximate search algorithm are reordered via a more expensive distance computation. Required if tree-AH algorithm is used.
dimensions This property is required. int
The number of dimensions of the input vectors.
distance_measure_type This property is required. str
The distance measure used in nearest neighbor search. The value must be one of the followings:

  • SQUARED_L2_DISTANCE: Euclidean (L_2) Distance
  • L1_DISTANCE: Manhattan (L_1) Distance
  • COSINE_DISTANCE: Cosine Distance. Defined as 1 - cosine similarity.
  • DOT_PRODUCT_DISTANCE: Dot Product Distance. Defined as a negative of the dot product
feature_norm_type This property is required. str
Type of normalization to be carried out on each vector. The value must be one of the followings:

  • UNIT_L2_NORM: Unit L2 normalization type
  • NONE: No normalization type is specified.
shard_size This property is required. str
Index data is split into equal parts to be processed. These are called "shards". The shard size must be specified when creating an index. The value must be one of the followings:

  • SHARD_SIZE_SMALL: Small (2GB)
  • SHARD_SIZE_MEDIUM: Medium (20GB)
  • SHARD_SIZE_LARGE: Large (50GB)
algorithmConfigs This property is required. List<Property Map>
The configuration with regard to the algorithms used for efficient search.
approximateNeighborsCount This property is required. Number
The default number of neighbors to find via approximate search before exact reordering is performed. Exact reordering is a procedure where results returned by an approximate search algorithm are reordered via a more expensive distance computation. Required if tree-AH algorithm is used.
dimensions This property is required. Number
The number of dimensions of the input vectors.
distanceMeasureType This property is required. String
The distance measure used in nearest neighbor search. The value must be one of the followings:

  • SQUARED_L2_DISTANCE: Euclidean (L_2) Distance
  • L1_DISTANCE: Manhattan (L_1) Distance
  • COSINE_DISTANCE: Cosine Distance. Defined as 1 - cosine similarity.
  • DOT_PRODUCT_DISTANCE: Dot Product Distance. Defined as a negative of the dot product
featureNormType This property is required. String
Type of normalization to be carried out on each vector. The value must be one of the followings:

  • UNIT_L2_NORM: Unit L2 normalization type
  • NONE: No normalization type is specified.
shardSize This property is required. String
Index data is split into equal parts to be processed. These are called "shards". The shard size must be specified when creating an index. The value must be one of the followings:

  • SHARD_SIZE_SMALL: Small (2GB)
  • SHARD_SIZE_MEDIUM: Medium (20GB)
  • SHARD_SIZE_LARGE: Large (50GB)

GetAiIndexMetadataConfigAlgorithmConfig

BruteForceConfigs This property is required. List<GetAiIndexMetadataConfigAlgorithmConfigBruteForceConfig>
Configuration options for using brute force search, which simply implements the standard linear search in the database for each query.
TreeAhConfigs This property is required. List<GetAiIndexMetadataConfigAlgorithmConfigTreeAhConfig>
Configuration options for using the tree-AH algorithm (Shallow tree + Asymmetric Hashing). Please refer to this paper for more details: https://arxiv.org/abs/1908.10396
BruteForceConfigs This property is required. []GetAiIndexMetadataConfigAlgorithmConfigBruteForceConfig
Configuration options for using brute force search, which simply implements the standard linear search in the database for each query.
TreeAhConfigs This property is required. []GetAiIndexMetadataConfigAlgorithmConfigTreeAhConfig
Configuration options for using the tree-AH algorithm (Shallow tree + Asymmetric Hashing). Please refer to this paper for more details: https://arxiv.org/abs/1908.10396
bruteForceConfigs This property is required. List<GetAiIndexMetadataConfigAlgorithmConfigBruteForceConfig>
Configuration options for using brute force search, which simply implements the standard linear search in the database for each query.
treeAhConfigs This property is required. List<GetAiIndexMetadataConfigAlgorithmConfigTreeAhConfig>
Configuration options for using the tree-AH algorithm (Shallow tree + Asymmetric Hashing). Please refer to this paper for more details: https://arxiv.org/abs/1908.10396
bruteForceConfigs This property is required. GetAiIndexMetadataConfigAlgorithmConfigBruteForceConfig[]
Configuration options for using brute force search, which simply implements the standard linear search in the database for each query.
treeAhConfigs This property is required. GetAiIndexMetadataConfigAlgorithmConfigTreeAhConfig[]
Configuration options for using the tree-AH algorithm (Shallow tree + Asymmetric Hashing). Please refer to this paper for more details: https://arxiv.org/abs/1908.10396
brute_force_configs This property is required. Sequence[GetAiIndexMetadataConfigAlgorithmConfigBruteForceConfig]
Configuration options for using brute force search, which simply implements the standard linear search in the database for each query.
tree_ah_configs This property is required. Sequence[GetAiIndexMetadataConfigAlgorithmConfigTreeAhConfig]
Configuration options for using the tree-AH algorithm (Shallow tree + Asymmetric Hashing). Please refer to this paper for more details: https://arxiv.org/abs/1908.10396
bruteForceConfigs This property is required. List<Property Map>
Configuration options for using brute force search, which simply implements the standard linear search in the database for each query.
treeAhConfigs This property is required. List<Property Map>
Configuration options for using the tree-AH algorithm (Shallow tree + Asymmetric Hashing). Please refer to this paper for more details: https://arxiv.org/abs/1908.10396

GetAiIndexMetadataConfigAlgorithmConfigTreeAhConfig

LeafNodeEmbeddingCount This property is required. int
Number of embeddings on each leaf node. The default value is 1000 if not set.
LeafNodesToSearchPercent This property is required. int
The default percentage of leaf nodes that any query may be searched. Must be in range 1-100, inclusive. The default value is 10 (means 10%) if not set.
LeafNodeEmbeddingCount This property is required. int
Number of embeddings on each leaf node. The default value is 1000 if not set.
LeafNodesToSearchPercent This property is required. int
The default percentage of leaf nodes that any query may be searched. Must be in range 1-100, inclusive. The default value is 10 (means 10%) if not set.
leafNodeEmbeddingCount This property is required. Integer
Number of embeddings on each leaf node. The default value is 1000 if not set.
leafNodesToSearchPercent This property is required. Integer
The default percentage of leaf nodes that any query may be searched. Must be in range 1-100, inclusive. The default value is 10 (means 10%) if not set.
leafNodeEmbeddingCount This property is required. number
Number of embeddings on each leaf node. The default value is 1000 if not set.
leafNodesToSearchPercent This property is required. number
The default percentage of leaf nodes that any query may be searched. Must be in range 1-100, inclusive. The default value is 10 (means 10%) if not set.
leaf_node_embedding_count This property is required. int
Number of embeddings on each leaf node. The default value is 1000 if not set.
leaf_nodes_to_search_percent This property is required. int
The default percentage of leaf nodes that any query may be searched. Must be in range 1-100, inclusive. The default value is 10 (means 10%) if not set.
leafNodeEmbeddingCount This property is required. Number
Number of embeddings on each leaf node. The default value is 1000 if not set.
leafNodesToSearchPercent This property is required. Number
The default percentage of leaf nodes that any query may be searched. Must be in range 1-100, inclusive. The default value is 10 (means 10%) if not set.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.
Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi