permalink |
---|
/vertex_ai_index/ |
vertex_ai_index
represents the google_vertex_ai_index
Terraform resource.
This package contains functions and utilities for setting up the resource using Jsonnet code.
fn new()
fn newAttrs()
fn withDescription()
fn withDisplayName()
fn withIndexUpdateMethod()
fn withLabels()
fn withMetadata()
fn withMetadataMixin()
fn withProject()
fn withRegion()
fn withTimeouts()
fn withTimeoutsMixin()
obj metadata
obj timeouts
new()
google.vertex_ai_index.new
injects a new google_vertex_ai_index
Terraform resource
block into the root module document.
Additionally, this inserts a private function into the _ref
attribute that generates references to attributes of the
resource. For example, if you added a new instance to the root using:
# arguments omitted for brevity
google.vertex_ai_index.new('some_id')
You can get the reference to the id
field of the created google.vertex_ai_index
using the reference:
$._ref.google_vertex_ai_index.some_id.get('id')
This is the same as directly entering "${ google_vertex_ai_index.some_id.id }"
as the value.
NOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use super
, self
,
or $
to refer to the root object. Instead, make an explicit outer object using local
.
Args:
resourceLabel
(string
): The name label of the block.description
(string
): The description of the Index. Whennull
, thedescription
field will be omitted from the resulting object.display_name
(string
): The display name of the Index. The name can be up to 128 characters long and can consist of any UTF-8 characters.index_update_method
(string
): The update method to use with this Index. The value must be the followings. If not set, BATCH_UPDATE will be used by default.
- BATCH_UPDATE: user can call indexes.patch with files on Cloud Storage of datapoints to update.
- STREAM_UPDATE: user can call indexes.upsertDatapoints/DeleteDatapoints to update the Index and the updates will be applied in corresponding DeployedIndexes in nearly real-time. When
null
, theindex_update_method
field will be omitted from the resulting object.labels
(obj
): The labels with user-defined metadata to organize your Indexes. Whennull
, thelabels
field will be omitted from the resulting object.project
(string
): Set theproject
field on the resulting resource block. Whennull
, theproject
field will be omitted from the resulting object.region
(string
): The region of the index. eg us-central1 Whennull
, theregion
field will be omitted from the resulting object.metadata
(list[obj]
): An additional information about the Index Whennull
, themetadata
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.vertex_ai_index.metadata.new constructor.timeouts
(obj
): Set thetimeouts
field on the resulting resource block. Whennull
, thetimeouts
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.vertex_ai_index.timeouts.new constructor.
Returns:
- A mixin object that injects the new resource into the root Terraform configuration.
newAttrs()
google.vertex_ai_index.newAttrs
constructs a new object with attributes and blocks configured for the vertex_ai_index
Terraform resource.
Unlike google.vertex_ai_index.new, this function will not inject the resource
block into the root Terraform document. Instead, this must be passed in as the attrs
argument for the
tf.withResource function to build a complete block.
This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to injecting into a complete block.
Args:
description
(string
): The description of the Index. Whennull
, thedescription
field will be omitted from the resulting object.display_name
(string
): The display name of the Index. The name can be up to 128 characters long and can consist of any UTF-8 characters.index_update_method
(string
): The update method to use with this Index. The value must be the followings. If not set, BATCH_UPDATE will be used by default.
- BATCH_UPDATE: user can call indexes.patch with files on Cloud Storage of datapoints to update.
- STREAM_UPDATE: user can call indexes.upsertDatapoints/DeleteDatapoints to update the Index and the updates will be applied in corresponding DeployedIndexes in nearly real-time. When
null
, theindex_update_method
field will be omitted from the resulting object.labels
(obj
): The labels with user-defined metadata to organize your Indexes. Whennull
, thelabels
field will be omitted from the resulting object.project
(string
): Set theproject
field on the resulting object. Whennull
, theproject
field will be omitted from the resulting object.region
(string
): The region of the index. eg us-central1 Whennull
, theregion
field will be omitted from the resulting object.metadata
(list[obj]
): An additional information about the Index Whennull
, themetadata
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.vertex_ai_index.metadata.new constructor.timeouts
(obj
): Set thetimeouts
field on the resulting object. Whennull
, thetimeouts
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.vertex_ai_index.timeouts.new constructor.
Returns:
- An attribute object that can be used with tf.withResource to construct a new
vertex_ai_index
resource into the root Terraform configuration.
withDescription()
google.string.withDescription
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the description field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for thedescription
field.
withDisplayName()
google.string.withDisplayName
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the display_name field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for thedisplay_name
field.
withIndexUpdateMethod()
google.string.withIndexUpdateMethod
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the index_update_method field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for theindex_update_method
field.
withLabels()
google.obj.withLabels
constructs a mixin object that can be merged into the obj
Terraform resource block to set or update the labels field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(obj
): The value to set for thelabels
field.
withMetadata()
google.list[obj].withMetadata
constructs a mixin object that can be merged into the list[obj]
Terraform resource block to set or update the metadata field.
This function will replace the array with the passed in value
. If you wish to instead append the
passed in value to the existing array, use the google.list[obj].withMetadataMixin function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(list[obj]
): The value to set for themetadata
field.
withMetadataMixin()
google.list[obj].withMetadataMixin
constructs a mixin object that can be merged into the list[obj]
Terraform resource block to set or update the metadata field.
This function will append the passed in array or object to the existing array. If you wish
to instead replace the array with the passed in value
, use the google.list[obj].withMetadata
function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(list[obj]
): The value to set for themetadata
field.
withProject()
google.string.withProject
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the project field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for theproject
field.
withRegion()
google.string.withRegion
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the region field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for theregion
field.
withTimeouts()
google.obj.withTimeouts
constructs a mixin object that can be merged into the obj
Terraform resource block to set or update the timeouts field.
This function will replace the map with the passed in value
. If you wish to instead merge the
passed in value to the existing map, use the google.obj.withTimeoutsMixin function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(obj
): The value to set for thetimeouts
field.
withTimeoutsMixin()
google.obj.withTimeoutsMixin
constructs a mixin object that can be merged into the obj
Terraform resource block to set or update the timeouts field.
This function will merge the passed in value to the existing map. If you wish
to instead replace the entire map with the passed in value
, use the google.obj.withTimeouts
function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(obj
): The value to set for thetimeouts
field.
new()
google.vertex_ai_index.metadata.new
constructs a new object with attributes and blocks configured for the metadata
Terraform sub block.
Args:
contents_delta_uri
(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 Whennull
, thecontents_delta_uri
field will be omitted from the resulting object.is_complete_overwrite
(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. Whennull
, theis_complete_overwrite
field will be omitted from the resulting object.config
(list[obj]
): The configuration of the Matching Engine Index. Whennull
, theconfig
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.vertex_ai_index.metadata.config.new constructor.
Returns:
- An attribute object that represents the
metadata
sub block.
new()
google.vertex_ai_index.metadata.config.new
constructs a new object with attributes and blocks configured for the config
Terraform sub block.
Args:
approximate_neighbors_count
(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. Whennull
, theapproximate_neighbors_count
field will be omitted from the resulting object.dimensions
(number
): The number of dimensions of the input vectors.distance_measure_type
(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 When
null
, thedistance_measure_type
field will be omitted from the resulting object.feature_norm_type
(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. When
null
, thefeature_norm_type
field will be omitted from the resulting object.shard_size
(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) When
null
, theshard_size
field will be omitted from the resulting object.algorithm_config
(list[obj]
): The configuration with regard to the algorithms used for efficient search. Whennull
, thealgorithm_config
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.vertex_ai_index.metadata.config.algorithm_config.new constructor.
Returns:
- An attribute object that represents the
config
sub block.
new()
google.vertex_ai_index.metadata.config.algorithm_config.new
constructs a new object with attributes and blocks configured for the algorithm_config
Terraform sub block.
Args:
brute_force_config
(list[obj]
): Configuration options for using brute force search, which simply implements the standard linear search in the database for each query. Whennull
, thebrute_force_config
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.vertex_ai_index.metadata.config.algorithm_config.brute_force_config.new constructor.tree_ah_config
(list[obj]
): 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 Whennull
, thetree_ah_config
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.vertex_ai_index.metadata.config.algorithm_config.tree_ah_config.new constructor.
Returns:
- An attribute object that represents the
algorithm_config
sub block.
new()
google.vertex_ai_index.metadata.config.algorithm_config.brute_force_config.new
constructs a new object with attributes and blocks configured for the brute_force_config
Terraform sub block.
Returns:
- An attribute object that represents the
brute_force_config
sub block.
new()
google.vertex_ai_index.metadata.config.algorithm_config.tree_ah_config.new
constructs a new object with attributes and blocks configured for the tree_ah_config
Terraform sub block.
Args:
leaf_node_embedding_count
(number
): Number of embeddings on each leaf node. The default value is 1000 if not set. Whennull
, theleaf_node_embedding_count
field will be omitted from the resulting object.leaf_nodes_to_search_percent
(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. Whennull
, theleaf_nodes_to_search_percent
field will be omitted from the resulting object.
Returns:
- An attribute object that represents the
tree_ah_config
sub block.
new()
google.vertex_ai_index.timeouts.new
constructs a new object with attributes and blocks configured for the timeouts
Terraform sub block.
Args:
create
(string
): Set thecreate
field on the resulting object. Whennull
, thecreate
field will be omitted from the resulting object.delete
(string
): Set thedelete
field on the resulting object. Whennull
, thedelete
field will be omitted from the resulting object.update
(string
): Set theupdate
field on the resulting object. Whennull
, theupdate
field will be omitted from the resulting object.
Returns:
- An attribute object that represents the
timeouts
sub block.