published on Thursday, Mar 12, 2026 by Pulumi
published on Thursday, Mar 12, 2026 by Pulumi
Description
Example Usage
Vectorsearch Collection Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example_collection = new gcp.vectorsearch.Collection("example-collection", {
location: "us-central1",
collectionId: "example-collection",
displayName: "My Awesome Collection",
description: "This collection stores important data.",
labels: {
env: "dev",
team: "my-team",
},
dataSchema: `{
\\"type\\": \\"object\\",
\\"properties\\": {
\\"title\\": {
\\"type\\": \\"string\\"
},
\\"plot\\": {
\\"type\\": \\"string\\"
}
}
}
`,
vectorSchemas: [{
fieldName: "text_embedding",
denseVector: {
dimensions: 768,
vertexEmbeddingConfig: {
modelId: "textembedding-gecko@003",
taskType: "RETRIEVAL_DOCUMENT",
textTemplate: "Title: {title} ---- Plot: {plot}",
},
},
}],
});
import pulumi
import pulumi_gcp as gcp
example_collection = gcp.vectorsearch.Collection("example-collection",
location="us-central1",
collection_id="example-collection",
display_name="My Awesome Collection",
description="This collection stores important data.",
labels={
"env": "dev",
"team": "my-team",
},
data_schema="""{
\"type\": \"object\",
\"properties\": {
\"title\": {
\"type\": \"string\"
},
\"plot\": {
\"type\": \"string\"
}
}
}
""",
vector_schemas=[{
"field_name": "text_embedding",
"dense_vector": {
"dimensions": 768,
"vertex_embedding_config": {
"model_id": "textembedding-gecko@003",
"task_type": "RETRIEVAL_DOCUMENT",
"text_template": "Title: {title} ---- Plot: {plot}",
},
},
}])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/vectorsearch"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vectorsearch.NewCollection(ctx, "example-collection", &vectorsearch.CollectionArgs{
Location: pulumi.String("us-central1"),
CollectionId: pulumi.String("example-collection"),
DisplayName: pulumi.String("My Awesome Collection"),
Description: pulumi.String("This collection stores important data."),
Labels: pulumi.StringMap{
"env": pulumi.String("dev"),
"team": pulumi.String("my-team"),
},
DataSchema: pulumi.String(`{
\"type\": \"object\",
\"properties\": {
\"title\": {
\"type\": \"string\"
},
\"plot\": {
\"type\": \"string\"
}
}
}
`),
VectorSchemas: vectorsearch.CollectionVectorSchemaArray{
&vectorsearch.CollectionVectorSchemaArgs{
FieldName: pulumi.String("text_embedding"),
DenseVector: &vectorsearch.CollectionVectorSchemaDenseVectorArgs{
Dimensions: pulumi.Int(768),
VertexEmbeddingConfig: &vectorsearch.CollectionVectorSchemaDenseVectorVertexEmbeddingConfigArgs{
ModelId: pulumi.String("textembedding-gecko@003"),
TaskType: pulumi.String("RETRIEVAL_DOCUMENT"),
TextTemplate: pulumi.String("Title: {title} ---- Plot: {plot}"),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var example_collection = new Gcp.VectorSearch.Collection("example-collection", new()
{
Location = "us-central1",
CollectionId = "example-collection",
DisplayName = "My Awesome Collection",
Description = "This collection stores important data.",
Labels =
{
{ "env", "dev" },
{ "team", "my-team" },
},
DataSchema = @"{
\""type\"": \""object\"",
\""properties\"": {
\""title\"": {
\""type\"": \""string\""
},
\""plot\"": {
\""type\"": \""string\""
}
}
}
",
VectorSchemas = new[]
{
new Gcp.VectorSearch.Inputs.CollectionVectorSchemaArgs
{
FieldName = "text_embedding",
DenseVector = new Gcp.VectorSearch.Inputs.CollectionVectorSchemaDenseVectorArgs
{
Dimensions = 768,
VertexEmbeddingConfig = new Gcp.VectorSearch.Inputs.CollectionVectorSchemaDenseVectorVertexEmbeddingConfigArgs
{
ModelId = "textembedding-gecko@003",
TaskType = "RETRIEVAL_DOCUMENT",
TextTemplate = "Title: {title} ---- Plot: {plot}",
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.vectorsearch.Collection;
import com.pulumi.gcp.vectorsearch.CollectionArgs;
import com.pulumi.gcp.vectorsearch.inputs.CollectionVectorSchemaArgs;
import com.pulumi.gcp.vectorsearch.inputs.CollectionVectorSchemaDenseVectorArgs;
import com.pulumi.gcp.vectorsearch.inputs.CollectionVectorSchemaDenseVectorVertexEmbeddingConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example_collection = new Collection("example-collection", CollectionArgs.builder()
.location("us-central1")
.collectionId("example-collection")
.displayName("My Awesome Collection")
.description("This collection stores important data.")
.labels(Map.ofEntries(
Map.entry("env", "dev"),
Map.entry("team", "my-team")
))
.dataSchema("""
{
\"type\": \"object\",
\"properties\": {
\"title\": {
\"type\": \"string\"
},
\"plot\": {
\"type\": \"string\"
}
}
}
""")
.vectorSchemas(CollectionVectorSchemaArgs.builder()
.fieldName("text_embedding")
.denseVector(CollectionVectorSchemaDenseVectorArgs.builder()
.dimensions(768)
.vertexEmbeddingConfig(CollectionVectorSchemaDenseVectorVertexEmbeddingConfigArgs.builder()
.modelId("textembedding-gecko@003")
.taskType("RETRIEVAL_DOCUMENT")
.textTemplate("Title: {title} ---- Plot: {plot}")
.build())
.build())
.build())
.build());
}
}
resources:
example-collection:
type: gcp:vectorsearch:Collection
properties:
location: us-central1
collectionId: example-collection
displayName: My Awesome Collection
description: This collection stores important data.
labels:
env: dev
team: my-team
dataSchema: |
{
\"type\": \"object\",
\"properties\": {
\"title\": {
\"type\": \"string\"
},
\"plot\": {
\"type\": \"string\"
}
}
}
vectorSchemas:
- fieldName: text_embedding
denseVector:
dimensions: 768
vertexEmbeddingConfig:
modelId: textembedding-gecko@003
taskType: RETRIEVAL_DOCUMENT
textTemplate: 'Title: {title} ---- Plot: {plot}'
Create Collection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Collection(name: string, args: CollectionArgs, opts?: CustomResourceOptions);@overload
def Collection(resource_name: str,
args: CollectionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Collection(resource_name: str,
opts: Optional[ResourceOptions] = None,
collection_id: Optional[str] = None,
location: Optional[str] = None,
data_schema: Optional[str] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
project: Optional[str] = None,
vector_schemas: Optional[Sequence[CollectionVectorSchemaArgs]] = None)func NewCollection(ctx *Context, name string, args CollectionArgs, opts ...ResourceOption) (*Collection, error)public Collection(string name, CollectionArgs args, CustomResourceOptions? opts = null)
public Collection(String name, CollectionArgs args)
public Collection(String name, CollectionArgs args, CustomResourceOptions options)
type: gcp:vectorsearch:Collection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CollectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CollectionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CollectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CollectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CollectionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var collectionResource = new Gcp.VectorSearch.Collection("collectionResource", new()
{
CollectionId = "string",
Location = "string",
DataSchema = "string",
Description = "string",
DisplayName = "string",
Labels =
{
{ "string", "string" },
},
Project = "string",
VectorSchemas = new[]
{
new Gcp.VectorSearch.Inputs.CollectionVectorSchemaArgs
{
FieldName = "string",
DenseVector = new Gcp.VectorSearch.Inputs.CollectionVectorSchemaDenseVectorArgs
{
Dimensions = 0,
VertexEmbeddingConfig = new Gcp.VectorSearch.Inputs.CollectionVectorSchemaDenseVectorVertexEmbeddingConfigArgs
{
ModelId = "string",
TaskType = "string",
TextTemplate = "string",
},
},
SparseVector = null,
},
},
});
example, err := vectorsearch.NewCollection(ctx, "collectionResource", &vectorsearch.CollectionArgs{
CollectionId: pulumi.String("string"),
Location: pulumi.String("string"),
DataSchema: pulumi.String("string"),
Description: pulumi.String("string"),
DisplayName: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Project: pulumi.String("string"),
VectorSchemas: vectorsearch.CollectionVectorSchemaArray{
&vectorsearch.CollectionVectorSchemaArgs{
FieldName: pulumi.String("string"),
DenseVector: &vectorsearch.CollectionVectorSchemaDenseVectorArgs{
Dimensions: pulumi.Int(0),
VertexEmbeddingConfig: &vectorsearch.CollectionVectorSchemaDenseVectorVertexEmbeddingConfigArgs{
ModelId: pulumi.String("string"),
TaskType: pulumi.String("string"),
TextTemplate: pulumi.String("string"),
},
},
SparseVector: &vectorsearch.CollectionVectorSchemaSparseVectorArgs{},
},
},
})
var collectionResource = new Collection("collectionResource", CollectionArgs.builder()
.collectionId("string")
.location("string")
.dataSchema("string")
.description("string")
.displayName("string")
.labels(Map.of("string", "string"))
.project("string")
.vectorSchemas(CollectionVectorSchemaArgs.builder()
.fieldName("string")
.denseVector(CollectionVectorSchemaDenseVectorArgs.builder()
.dimensions(0)
.vertexEmbeddingConfig(CollectionVectorSchemaDenseVectorVertexEmbeddingConfigArgs.builder()
.modelId("string")
.taskType("string")
.textTemplate("string")
.build())
.build())
.sparseVector(CollectionVectorSchemaSparseVectorArgs.builder()
.build())
.build())
.build());
collection_resource = gcp.vectorsearch.Collection("collectionResource",
collection_id="string",
location="string",
data_schema="string",
description="string",
display_name="string",
labels={
"string": "string",
},
project="string",
vector_schemas=[{
"field_name": "string",
"dense_vector": {
"dimensions": 0,
"vertex_embedding_config": {
"model_id": "string",
"task_type": "string",
"text_template": "string",
},
},
"sparse_vector": {},
}])
const collectionResource = new gcp.vectorsearch.Collection("collectionResource", {
collectionId: "string",
location: "string",
dataSchema: "string",
description: "string",
displayName: "string",
labels: {
string: "string",
},
project: "string",
vectorSchemas: [{
fieldName: "string",
denseVector: {
dimensions: 0,
vertexEmbeddingConfig: {
modelId: "string",
taskType: "string",
textTemplate: "string",
},
},
sparseVector: {},
}],
});
type: gcp:vectorsearch:Collection
properties:
collectionId: string
dataSchema: string
description: string
displayName: string
labels:
string: string
location: string
project: string
vectorSchemas:
- denseVector:
dimensions: 0
vertexEmbeddingConfig:
modelId: string
taskType: string
textTemplate: string
fieldName: string
sparseVector: {}
Collection Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Collection resource accepts the following input properties:
- Collection
Id string - ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - Location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Data
Schema string - JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
- Description string
- User-specified description of the collection
- Display
Name string - User-specified display name of the collection
- Labels Dictionary<string, string>
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Vector
Schemas List<CollectionVector Schema> - Schema for vector fields. Only vector fields in this schema will be searchable. Field names must contain only alphanumeric characters, underscores, and hyphens. Structure is documented below.
- Collection
Id string - ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - Location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Data
Schema string - JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
- Description string
- User-specified description of the collection
- Display
Name string - User-specified display name of the collection
- Labels map[string]string
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Vector
Schemas []CollectionVector Schema Args - Schema for vector fields. Only vector fields in this schema will be searchable. Field names must contain only alphanumeric characters, underscores, and hyphens. Structure is documented below.
- collection
Id String - ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - location String
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - data
Schema String - JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
- description String
- User-specified description of the collection
- display
Name String - User-specified display name of the collection
- labels Map<String,String>
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- vector
Schemas List<CollectionVector Schema> - Schema for vector fields. Only vector fields in this schema will be searchable. Field names must contain only alphanumeric characters, underscores, and hyphens. Structure is documented below.
- collection
Id string - ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - data
Schema string - JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
- description string
- User-specified description of the collection
- display
Name string - User-specified display name of the collection
- labels {[key: string]: string}
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- vector
Schemas CollectionVector Schema[] - Schema for vector fields. Only vector fields in this schema will be searchable. Field names must contain only alphanumeric characters, underscores, and hyphens. Structure is documented below.
- collection_
id str - ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - location str
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - data_
schema str - JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
- description str
- User-specified description of the collection
- display_
name str - User-specified display name of the collection
- labels Mapping[str, str]
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- vector_
schemas Sequence[CollectionVector Schema Args] - Schema for vector fields. Only vector fields in this schema will be searchable. Field names must contain only alphanumeric characters, underscores, and hyphens. Structure is documented below.
- collection
Id String - ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - location String
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - data
Schema String - JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
- description String
- User-specified description of the collection
- display
Name String - User-specified display name of the collection
- labels Map<String>
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- vector
Schemas List<Property Map> - Schema for vector fields. Only vector fields in this schema will be searchable. Field names must contain only alphanumeric characters, underscores, and hyphens. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the Collection resource produces the following output properties:
- Create
Time string - [Output only] Create time stamp
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Identifier. name of resource
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Update
Time string - [Output only] Update time stamp
- Create
Time string - [Output only] Create time stamp
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Identifier. name of resource
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Update
Time string - [Output only] Update time stamp
- create
Time String - [Output only] Create time stamp
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Identifier. name of resource
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time String - [Output only] Update time stamp
- create
Time string - [Output only] Create time stamp
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Identifier. name of resource
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time string - [Output only] Update time stamp
- create_
time str - [Output only] Create time stamp
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Identifier. name of resource
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- update_
time str - [Output only] Update time stamp
- create
Time String - [Output only] Create time stamp
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Identifier. name of resource
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time String - [Output only] Update time stamp
Look up Existing Collection Resource
Get an existing Collection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CollectionState, opts?: CustomResourceOptions): Collection@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
collection_id: Optional[str] = None,
create_time: Optional[str] = None,
data_schema: Optional[str] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
effective_labels: Optional[Mapping[str, str]] = None,
labels: Optional[Mapping[str, str]] = None,
location: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
update_time: Optional[str] = None,
vector_schemas: Optional[Sequence[CollectionVectorSchemaArgs]] = None) -> Collectionfunc GetCollection(ctx *Context, name string, id IDInput, state *CollectionState, opts ...ResourceOption) (*Collection, error)public static Collection Get(string name, Input<string> id, CollectionState? state, CustomResourceOptions? opts = null)public static Collection get(String name, Output<String> id, CollectionState state, CustomResourceOptions options)resources: _: type: gcp:vectorsearch:Collection get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Collection
Id string - ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - Create
Time string - [Output only] Create time stamp
- Data
Schema string - JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
- Description string
- User-specified description of the collection
- Display
Name string - User-specified display name of the collection
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Labels Dictionary<string, string>
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - Location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Name string
- Identifier. name of resource
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Update
Time string - [Output only] Update time stamp
- Vector
Schemas List<CollectionVector Schema> - Schema for vector fields. Only vector fields in this schema will be searchable. Field names must contain only alphanumeric characters, underscores, and hyphens. Structure is documented below.
- Collection
Id string - ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - Create
Time string - [Output only] Create time stamp
- Data
Schema string - JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
- Description string
- User-specified description of the collection
- Display
Name string - User-specified display name of the collection
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Labels map[string]string
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - Location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Name string
- Identifier. name of resource
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Update
Time string - [Output only] Update time stamp
- Vector
Schemas []CollectionVector Schema Args - Schema for vector fields. Only vector fields in this schema will be searchable. Field names must contain only alphanumeric characters, underscores, and hyphens. Structure is documented below.
- collection
Id String - ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - create
Time String - [Output only] Create time stamp
- data
Schema String - JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
- description String
- User-specified description of the collection
- display
Name String - User-specified display name of the collection
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Map<String,String>
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - location String
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - name String
- Identifier. name of resource
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time String - [Output only] Update time stamp
- vector
Schemas List<CollectionVector Schema> - Schema for vector fields. Only vector fields in this schema will be searchable. Field names must contain only alphanumeric characters, underscores, and hyphens. Structure is documented below.
- collection
Id string - ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - create
Time string - [Output only] Create time stamp
- data
Schema string - JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
- description string
- User-specified description of the collection
- display
Name string - User-specified display name of the collection
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels {[key: string]: string}
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - name string
- Identifier. name of resource
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time string - [Output only] Update time stamp
- vector
Schemas CollectionVector Schema[] - Schema for vector fields. Only vector fields in this schema will be searchable. Field names must contain only alphanumeric characters, underscores, and hyphens. Structure is documented below.
- collection_
id str - ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - create_
time str - [Output only] Create time stamp
- data_
schema str - JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
- description str
- User-specified description of the collection
- display_
name str - User-specified display name of the collection
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Mapping[str, str]
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - location str
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - name str
- Identifier. name of resource
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- update_
time str - [Output only] Update time stamp
- vector_
schemas Sequence[CollectionVector Schema Args] - Schema for vector fields. Only vector fields in this schema will be searchable. Field names must contain only alphanumeric characters, underscores, and hyphens. Structure is documented below.
- collection
Id String - ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - create
Time String - [Output only] Create time stamp
- data
Schema String - JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
- description String
- User-specified description of the collection
- display
Name String - User-specified display name of the collection
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Map<String>
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labelsfor all of the labels present on the resource. - location String
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - name String
- Identifier. name of resource
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time String - [Output only] Update time stamp
- vector
Schemas List<Property Map> - Schema for vector fields. Only vector fields in this schema will be searchable. Field names must contain only alphanumeric characters, underscores, and hyphens. Structure is documented below.
Supporting Types
CollectionVectorSchema, CollectionVectorSchemaArgs
- Field
Name string - The identifier for this object. Format specified above.
- Dense
Vector CollectionVector Schema Dense Vector - Message describing a dense vector field. Structure is documented below.
- Sparse
Vector CollectionVector Schema Sparse Vector - Message describing a sparse vector field.
- Field
Name string - The identifier for this object. Format specified above.
- Dense
Vector CollectionVector Schema Dense Vector - Message describing a dense vector field. Structure is documented below.
- Sparse
Vector CollectionVector Schema Sparse Vector - Message describing a sparse vector field.
- field
Name String - The identifier for this object. Format specified above.
- dense
Vector CollectionVector Schema Dense Vector - Message describing a dense vector field. Structure is documented below.
- sparse
Vector CollectionVector Schema Sparse Vector - Message describing a sparse vector field.
- field
Name string - The identifier for this object. Format specified above.
- dense
Vector CollectionVector Schema Dense Vector - Message describing a dense vector field. Structure is documented below.
- sparse
Vector CollectionVector Schema Sparse Vector - Message describing a sparse vector field.
- field_
name str - The identifier for this object. Format specified above.
- dense_
vector CollectionVector Schema Dense Vector - Message describing a dense vector field. Structure is documented below.
- sparse_
vector CollectionVector Schema Sparse Vector - Message describing a sparse vector field.
- field
Name String - The identifier for this object. Format specified above.
- dense
Vector Property Map - Message describing a dense vector field. Structure is documented below.
- sparse
Vector Property Map - Message describing a sparse vector field.
CollectionVectorSchemaDenseVector, CollectionVectorSchemaDenseVectorArgs
- Dimensions int
- Dimensionality of the vector field.
- Vertex
Embedding CollectionConfig Vector Schema Dense Vector Vertex Embedding Config - Message describing the configuration for generating embeddings for a vector field using Vertex AI embeddings API. Structure is documented below.
- Dimensions int
- Dimensionality of the vector field.
- Vertex
Embedding CollectionConfig Vector Schema Dense Vector Vertex Embedding Config - Message describing the configuration for generating embeddings for a vector field using Vertex AI embeddings API. Structure is documented below.
- dimensions Integer
- Dimensionality of the vector field.
- vertex
Embedding CollectionConfig Vector Schema Dense Vector Vertex Embedding Config - Message describing the configuration for generating embeddings for a vector field using Vertex AI embeddings API. Structure is documented below.
- dimensions number
- Dimensionality of the vector field.
- vertex
Embedding CollectionConfig Vector Schema Dense Vector Vertex Embedding Config - Message describing the configuration for generating embeddings for a vector field using Vertex AI embeddings API. Structure is documented below.
- dimensions int
- Dimensionality of the vector field.
- vertex_
embedding_ Collectionconfig Vector Schema Dense Vector Vertex Embedding Config - Message describing the configuration for generating embeddings for a vector field using Vertex AI embeddings API. Structure is documented below.
- dimensions Number
- Dimensionality of the vector field.
- vertex
Embedding Property MapConfig - Message describing the configuration for generating embeddings for a vector field using Vertex AI embeddings API. Structure is documented below.
CollectionVectorSchemaDenseVectorVertexEmbeddingConfig, CollectionVectorSchemaDenseVectorVertexEmbeddingConfigArgs
- Model
Id string - Required: ID of the embedding model to use. See https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models for the list of supported models.
- Task
Type string - Possible values: RETRIEVAL_QUERY RETRIEVAL_DOCUMENT SEMANTIC_SIMILARITY CLASSIFICATION CLUSTERING QUESTION_ANSWERING FACT_VERIFICATION CODE_RETRIEVAL_QUERY
- Text
Template string - Required: Text template for the input to the model. The template must contain one or more references to fields in the DataObject, e.g.: "Movie Title: {title} ---- Movie Plot: {plot}".
- Model
Id string - Required: ID of the embedding model to use. See https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models for the list of supported models.
- Task
Type string - Possible values: RETRIEVAL_QUERY RETRIEVAL_DOCUMENT SEMANTIC_SIMILARITY CLASSIFICATION CLUSTERING QUESTION_ANSWERING FACT_VERIFICATION CODE_RETRIEVAL_QUERY
- Text
Template string - Required: Text template for the input to the model. The template must contain one or more references to fields in the DataObject, e.g.: "Movie Title: {title} ---- Movie Plot: {plot}".
- model
Id String - Required: ID of the embedding model to use. See https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models for the list of supported models.
- task
Type String - Possible values: RETRIEVAL_QUERY RETRIEVAL_DOCUMENT SEMANTIC_SIMILARITY CLASSIFICATION CLUSTERING QUESTION_ANSWERING FACT_VERIFICATION CODE_RETRIEVAL_QUERY
- text
Template String - Required: Text template for the input to the model. The template must contain one or more references to fields in the DataObject, e.g.: "Movie Title: {title} ---- Movie Plot: {plot}".
- model
Id string - Required: ID of the embedding model to use. See https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models for the list of supported models.
- task
Type string - Possible values: RETRIEVAL_QUERY RETRIEVAL_DOCUMENT SEMANTIC_SIMILARITY CLASSIFICATION CLUSTERING QUESTION_ANSWERING FACT_VERIFICATION CODE_RETRIEVAL_QUERY
- text
Template string - Required: Text template for the input to the model. The template must contain one or more references to fields in the DataObject, e.g.: "Movie Title: {title} ---- Movie Plot: {plot}".
- model_
id str - Required: ID of the embedding model to use. See https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models for the list of supported models.
- task_
type str - Possible values: RETRIEVAL_QUERY RETRIEVAL_DOCUMENT SEMANTIC_SIMILARITY CLASSIFICATION CLUSTERING QUESTION_ANSWERING FACT_VERIFICATION CODE_RETRIEVAL_QUERY
- text_
template str - Required: Text template for the input to the model. The template must contain one or more references to fields in the DataObject, e.g.: "Movie Title: {title} ---- Movie Plot: {plot}".
- model
Id String - Required: ID of the embedding model to use. See https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models for the list of supported models.
- task
Type String - Possible values: RETRIEVAL_QUERY RETRIEVAL_DOCUMENT SEMANTIC_SIMILARITY CLASSIFICATION CLUSTERING QUESTION_ANSWERING FACT_VERIFICATION CODE_RETRIEVAL_QUERY
- text
Template String - Required: Text template for the input to the model. The template must contain one or more references to fields in the DataObject, e.g.: "Movie Title: {title} ---- Movie Plot: {plot}".
Import
Collection can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/collections/{{collection_id}}{{project}}/{{location}}/{{collection_id}}{{location}}/{{collection_id}}
When using the pulumi import command, Collection can be imported using one of the formats above. For example:
$ pulumi import gcp:vectorsearch/collection:Collection default projects/{{project}}/locations/{{location}}/collections/{{collection_id}}
$ pulumi import gcp:vectorsearch/collection:Collection default {{project}}/{{location}}/{{collection_id}}
$ pulumi import gcp:vectorsearch/collection:Collection default {{location}}/{{collection_id}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
published on Thursday, Mar 12, 2026 by Pulumi
