1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. vectorsearch
  5. Collection
Viewing docs for Google Cloud v9.15.0
published on Thursday, Mar 12, 2026 by Pulumi
gcp logo
Viewing docs for Google Cloud v9.15.0
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:

    CollectionId 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.
    DataSchema string
    JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
    Description string
    User-specified description of the collection
    DisplayName 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_labels for 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.
    VectorSchemas List<CollectionVectorSchema>
    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.
    CollectionId 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.
    DataSchema string
    JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
    Description string
    User-specified description of the collection
    DisplayName 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_labels for 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.
    VectorSchemas []CollectionVectorSchemaArgs
    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.
    collectionId 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.
    dataSchema String
    JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
    description String
    User-specified description of the collection
    displayName 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_labels for 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.
    vectorSchemas List<CollectionVectorSchema>
    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.
    collectionId 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.
    dataSchema string
    JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
    description string
    User-specified description of the collection
    displayName 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_labels for 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.
    vectorSchemas CollectionVectorSchema[]
    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_labels for 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[CollectionVectorSchemaArgs]
    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.
    collectionId 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.
    dataSchema String
    JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
    description String
    User-specified description of the collection
    displayName 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_labels for 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.
    vectorSchemas 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:

    CreateTime string
    [Output only] Create time stamp
    EffectiveLabels 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
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    UpdateTime string
    [Output only] Update time stamp
    CreateTime string
    [Output only] Create time stamp
    EffectiveLabels 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
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    UpdateTime string
    [Output only] Update time stamp
    createTime String
    [Output only] Create time stamp
    effectiveLabels 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
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    updateTime String
    [Output only] Update time stamp
    createTime string
    [Output only] Create time stamp
    effectiveLabels {[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
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    updateTime 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
    createTime String
    [Output only] Create time stamp
    effectiveLabels 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
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    updateTime 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) -> Collection
    func 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.
    The following state arguments are supported:
    CollectionId 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?.
    CreateTime string
    [Output only] Create time stamp
    DataSchema string
    JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
    Description string
    User-specified description of the collection
    DisplayName string
    User-specified display name of the collection
    EffectiveLabels 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_labels for 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.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    UpdateTime string
    [Output only] Update time stamp
    VectorSchemas List<CollectionVectorSchema>
    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.
    CollectionId 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?.
    CreateTime string
    [Output only] Create time stamp
    DataSchema string
    JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
    Description string
    User-specified description of the collection
    DisplayName string
    User-specified display name of the collection
    EffectiveLabels 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_labels for 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.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    UpdateTime string
    [Output only] Update time stamp
    VectorSchemas []CollectionVectorSchemaArgs
    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.
    collectionId 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?.
    createTime String
    [Output only] Create time stamp
    dataSchema String
    JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
    description String
    User-specified description of the collection
    displayName String
    User-specified display name of the collection
    effectiveLabels 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_labels for 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.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    updateTime String
    [Output only] Update time stamp
    vectorSchemas List<CollectionVectorSchema>
    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.
    collectionId 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?.
    createTime string
    [Output only] Create time stamp
    dataSchema string
    JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
    description string
    User-specified description of the collection
    displayName string
    User-specified display name of the collection
    effectiveLabels {[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_labels for 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.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    updateTime string
    [Output only] Update time stamp
    vectorSchemas CollectionVectorSchema[]
    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_labels for 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[CollectionVectorSchemaArgs]
    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.
    collectionId 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?.
    createTime String
    [Output only] Create time stamp
    dataSchema String
    JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
    description String
    User-specified description of the collection
    displayName String
    User-specified display name of the collection
    effectiveLabels 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_labels for 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.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    updateTime String
    [Output only] Update time stamp
    vectorSchemas 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

    FieldName string
    The identifier for this object. Format specified above.
    DenseVector CollectionVectorSchemaDenseVector
    Message describing a dense vector field. Structure is documented below.
    SparseVector CollectionVectorSchemaSparseVector
    Message describing a sparse vector field.
    FieldName string
    The identifier for this object. Format specified above.
    DenseVector CollectionVectorSchemaDenseVector
    Message describing a dense vector field. Structure is documented below.
    SparseVector CollectionVectorSchemaSparseVector
    Message describing a sparse vector field.
    fieldName String
    The identifier for this object. Format specified above.
    denseVector CollectionVectorSchemaDenseVector
    Message describing a dense vector field. Structure is documented below.
    sparseVector CollectionVectorSchemaSparseVector
    Message describing a sparse vector field.
    fieldName string
    The identifier for this object. Format specified above.
    denseVector CollectionVectorSchemaDenseVector
    Message describing a dense vector field. Structure is documented below.
    sparseVector CollectionVectorSchemaSparseVector
    Message describing a sparse vector field.
    field_name str
    The identifier for this object. Format specified above.
    dense_vector CollectionVectorSchemaDenseVector
    Message describing a dense vector field. Structure is documented below.
    sparse_vector CollectionVectorSchemaSparseVector
    Message describing a sparse vector field.
    fieldName String
    The identifier for this object. Format specified above.
    denseVector Property Map
    Message describing a dense vector field. Structure is documented below.
    sparseVector Property Map
    Message describing a sparse vector field.

    CollectionVectorSchemaDenseVector, CollectionVectorSchemaDenseVectorArgs

    Dimensions int
    Dimensionality of the vector field.
    VertexEmbeddingConfig CollectionVectorSchemaDenseVectorVertexEmbeddingConfig
    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.
    VertexEmbeddingConfig CollectionVectorSchemaDenseVectorVertexEmbeddingConfig
    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.
    vertexEmbeddingConfig CollectionVectorSchemaDenseVectorVertexEmbeddingConfig
    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.
    vertexEmbeddingConfig CollectionVectorSchemaDenseVectorVertexEmbeddingConfig
    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_config CollectionVectorSchemaDenseVectorVertexEmbeddingConfig
    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.
    vertexEmbeddingConfig Property Map
    Message describing the configuration for generating embeddings for a vector field using Vertex AI embeddings API. Structure is documented below.

    CollectionVectorSchemaDenseVectorVertexEmbeddingConfig, CollectionVectorSchemaDenseVectorVertexEmbeddingConfigArgs

    ModelId 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.
    TaskType string
    Possible values: RETRIEVAL_QUERY RETRIEVAL_DOCUMENT SEMANTIC_SIMILARITY CLASSIFICATION CLUSTERING QUESTION_ANSWERING FACT_VERIFICATION CODE_RETRIEVAL_QUERY
    TextTemplate 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}".
    ModelId 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.
    TaskType string
    Possible values: RETRIEVAL_QUERY RETRIEVAL_DOCUMENT SEMANTIC_SIMILARITY CLASSIFICATION CLUSTERING QUESTION_ANSWERING FACT_VERIFICATION CODE_RETRIEVAL_QUERY
    TextTemplate 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}".
    modelId 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.
    taskType String
    Possible values: RETRIEVAL_QUERY RETRIEVAL_DOCUMENT SEMANTIC_SIMILARITY CLASSIFICATION CLUSTERING QUESTION_ANSWERING FACT_VERIFICATION CODE_RETRIEVAL_QUERY
    textTemplate 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}".
    modelId 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.
    taskType string
    Possible values: RETRIEVAL_QUERY RETRIEVAL_DOCUMENT SEMANTIC_SIMILARITY CLASSIFICATION CLUSTERING QUESTION_ANSWERING FACT_VERIFICATION CODE_RETRIEVAL_QUERY
    textTemplate 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}".
    modelId 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.
    taskType String
    Possible values: RETRIEVAL_QUERY RETRIEVAL_DOCUMENT SEMANTIC_SIMILARITY CLASSIFICATION CLUSTERING QUESTION_ANSWERING FACT_VERIFICATION CODE_RETRIEVAL_QUERY
    textTemplate 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-beta Terraform Provider.
    gcp logo
    Viewing docs for Google Cloud v9.15.0
    published on Thursday, Mar 12, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.