@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
170 lines (169 loc) • 7.94 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* > This resource can only be used on a Unity Catalog-enabled workspace!
*
* This resource allows you to create [Mosaic AI Vector Search Index](https://docs.databricks.com/en/generative-ai/create-query-vector-search.html) in Databricks. Mosaic AI Vector Search is a serverless similarity search engine that allows you to store a vector representation of your data, including metadata, in a vector database. The Mosaic AI Vector Search Index provides the ability to search data in the linked Delta Table.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const sync = new databricks.VectorSearchIndex("sync", {
* name: "main.default.vector_search_index",
* endpointName: thisDatabricksVectorSearchEndpoint.name,
* primaryKey: "id",
* indexType: "DELTA_SYNC",
* deltaSyncIndexSpec: {
* sourceTable: "main.default.source_table",
* pipelineType: "TRIGGERED",
* embeddingSourceColumns: [{
* name: "text",
* embeddingModelEndpointName: _this.name,
* }],
* },
* });
* ```
*
* ## Import
*
* The resource can be imported using the name of the Mosaic AI Vector Search Index
*
* bash
*
* ```sh
* $ pulumi import databricks:index/vectorSearchIndex:VectorSearchIndex this <index-name>
* ```
*/
export declare class VectorSearchIndex extends pulumi.CustomResource {
/**
* Get an existing VectorSearchIndex resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: VectorSearchIndexState, opts?: pulumi.CustomResourceOptions): VectorSearchIndex;
/**
* Returns true if the given object is an instance of VectorSearchIndex. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is VectorSearchIndex;
/**
* Creator of the endpoint.
*/
readonly creator: pulumi.Output<string>;
/**
* Specification for Delta Sync Index. Required if `indexType` is `DELTA_SYNC`. This field is a block and is documented below.
*/
readonly deltaSyncIndexSpec: pulumi.Output<outputs.VectorSearchIndexDeltaSyncIndexSpec | undefined>;
/**
* Specification for Direct Vector Access Index. Required if `indexType` is `DIRECT_ACCESS`. This field is a block and is documented below.
*/
readonly directAccessIndexSpec: pulumi.Output<outputs.VectorSearchIndexDirectAccessIndexSpec | undefined>;
/**
* The name of the Mosaic AI Vector Search Endpoint that will be used for indexing the data.
*/
readonly endpointName: pulumi.Output<string>;
/**
* Mosaic AI Vector Search index type. Currently supported values are:
* * `DELTA_SYNC`: An index that automatically syncs with a source Delta Table, automatically and incrementally updating the index as the underlying data in the Delta Table changes.
* * `DIRECT_ACCESS`: An index that supports the direct read and write of vectors and metadata through our REST and SDK APIs. With this model, the user manages index updates.
*/
readonly indexType: pulumi.Output<string>;
/**
* Three-level name of the Mosaic AI Vector Search Index to create (`catalog.schema.index_name`).
*/
readonly name: pulumi.Output<string>;
/**
* The column name that will be used as a primary key.
*/
readonly primaryKey: pulumi.Output<string>;
/**
* Object describing the current status of the index consisting of the following fields:
*/
readonly statuses: pulumi.Output<outputs.VectorSearchIndexStatus[]>;
/**
* Create a VectorSearchIndex resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: VectorSearchIndexArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering VectorSearchIndex resources.
*/
export interface VectorSearchIndexState {
/**
* Creator of the endpoint.
*/
creator?: pulumi.Input<string>;
/**
* Specification for Delta Sync Index. Required if `indexType` is `DELTA_SYNC`. This field is a block and is documented below.
*/
deltaSyncIndexSpec?: pulumi.Input<inputs.VectorSearchIndexDeltaSyncIndexSpec>;
/**
* Specification for Direct Vector Access Index. Required if `indexType` is `DIRECT_ACCESS`. This field is a block and is documented below.
*/
directAccessIndexSpec?: pulumi.Input<inputs.VectorSearchIndexDirectAccessIndexSpec>;
/**
* The name of the Mosaic AI Vector Search Endpoint that will be used for indexing the data.
*/
endpointName?: pulumi.Input<string>;
/**
* Mosaic AI Vector Search index type. Currently supported values are:
* * `DELTA_SYNC`: An index that automatically syncs with a source Delta Table, automatically and incrementally updating the index as the underlying data in the Delta Table changes.
* * `DIRECT_ACCESS`: An index that supports the direct read and write of vectors and metadata through our REST and SDK APIs. With this model, the user manages index updates.
*/
indexType?: pulumi.Input<string>;
/**
* Three-level name of the Mosaic AI Vector Search Index to create (`catalog.schema.index_name`).
*/
name?: pulumi.Input<string>;
/**
* The column name that will be used as a primary key.
*/
primaryKey?: pulumi.Input<string>;
/**
* Object describing the current status of the index consisting of the following fields:
*/
statuses?: pulumi.Input<pulumi.Input<inputs.VectorSearchIndexStatus>[]>;
}
/**
* The set of arguments for constructing a VectorSearchIndex resource.
*/
export interface VectorSearchIndexArgs {
/**
* Specification for Delta Sync Index. Required if `indexType` is `DELTA_SYNC`. This field is a block and is documented below.
*/
deltaSyncIndexSpec?: pulumi.Input<inputs.VectorSearchIndexDeltaSyncIndexSpec>;
/**
* Specification for Direct Vector Access Index. Required if `indexType` is `DIRECT_ACCESS`. This field is a block and is documented below.
*/
directAccessIndexSpec?: pulumi.Input<inputs.VectorSearchIndexDirectAccessIndexSpec>;
/**
* The name of the Mosaic AI Vector Search Endpoint that will be used for indexing the data.
*/
endpointName: pulumi.Input<string>;
/**
* Mosaic AI Vector Search index type. Currently supported values are:
* * `DELTA_SYNC`: An index that automatically syncs with a source Delta Table, automatically and incrementally updating the index as the underlying data in the Delta Table changes.
* * `DIRECT_ACCESS`: An index that supports the direct read and write of vectors and metadata through our REST and SDK APIs. With this model, the user manages index updates.
*/
indexType: pulumi.Input<string>;
/**
* Three-level name of the Mosaic AI Vector Search Index to create (`catalog.schema.index_name`).
*/
name?: pulumi.Input<string>;
/**
* The column name that will be used as a primary key.
*/
primaryKey: pulumi.Input<string>;
}