1. Registry
  2. Packages
  3. Google Cloud (GCP) Classic
  4. API Docs
  5. vectorsearch
  6. DataObject
Viewing docs for Google Cloud v9.35.0
published on Friday, Aug 21, 2026 by Pulumi
gcp logo
Viewing docs for Google Cloud v9.35.0
published on Friday, Aug 21, 2026 by Pulumi

    A DataObject is a single item of data (with optional vectors) stored in a Vector Search Collection. Each DataObject conforms to the parent Collection’s dataSchema and vectorSchema.

    This resource always issues one CreateDataObject request per Terraform resource block. It does NOT use the batchCreate REST endpoint – Terraform’s resource lifecycle is inherently per-object, so batching across resources is not modeled. When you use forEach or count, Terraform will still issue individual requests, up to -parallelism in parallel.

    For ingesting more than a few hundred items, prefer one of the following out-of-band paths instead of Terraform:

    • importDataObjects (bulk ingest from Cloud Storage) – highest throughput, but only available before any Index is created on the Collection.
    • batchCreate (up to ~1000 items per call) – available at any time, but must be driven from your own client code, not Terraform.

    Once an Index exists on the Collection, importDataObjects is no longer available and DataObjects must be created via CreateDataObject (as this resource does) or via batchCreate.

    Example Usage

    Vectorsearch Data Object Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    // NOTE: This resource issues one CreateDataObject request per block.
    // It does NOT batch across resources. Terraform will parallelize a
    // 'for_each' up to '-parallelism', but each item is still a separate
    // HTTP call.
    //
    // For bulk ingestion of many items, prefer one of these out-of-band
    // paths instead of Terraform:
    //   * 'importDataObjects' (from Cloud Storage) -- highest throughput,
    //     but only available *before* any Index is created on the Collection.
    //   * 'batchCreate' (up to ~1000 items per call) -- available at any
    //     time, but must be driven from client code, not Terraform.
    const parent = new gcp.vectorsearch.Collection("parent", {
        location: "us-central1",
        collectionId: "example-collection",
        displayName: "My Awesome Collection",
        description: "This collection stores important data.",
        dataSchema: `{
      \\"type\\": \\"object\\",
      \\"properties\\": {
        \\"title\\": {
          \\"type\\": \\"string\\"
        },
        \\"plot\\": {
          \\"type\\": \\"string\\"
        }
      }
    }
    `,
        vectorSchemas: [{
            fieldName: "text_embedding",
            denseVector: {
                dimensions: 768,
                vertexEmbeddingConfig: {
                    modelId: "text-embedding-005",
                    taskType: "RETRIEVAL_DOCUMENT",
                    textTemplate: "Title: {title} ---- Plot: {plot}",
                },
            },
        }],
    });
    // Because the parent Collection's 'text_embedding' field is configured
    // with a 'vertex_embedding_config', the server will populate the vector
    // automatically from 'data.title' and 'data.plot' -- no explicit
    // 'vectors' block is required.
    const example_data_object = new gcp.vectorsearch.DataObject("example-data-object", {
        location: "us-central1",
        collectionId: parent.collectionId,
        dataObjectId: "example-data-object",
        data: JSON.stringify({
            title: "The Matrix",
            plot: "A computer hacker learns about the true nature of reality.",
        }),
    });
    
    import pulumi
    import json
    import pulumi_gcp as gcp
    
    # NOTE: This resource issues one CreateDataObject request per block.
    # It does NOT batch across resources. Terraform will parallelize a
    # 'for_each' up to '-parallelism', but each item is still a separate
    # HTTP call.
    #
    # For bulk ingestion of many items, prefer one of these out-of-band
    # paths instead of Terraform:
    #   * 'importDataObjects' (from Cloud Storage) -- highest throughput,
    #     but only available *before* any Index is created on the Collection.
    #   * 'batchCreate' (up to ~1000 items per call) -- available at any
    #     time, but must be driven from client code, not Terraform.
    parent = gcp.vectorsearch.Collection("parent",
        location="us-central1",
        collection_id="example-collection",
        display_name="My Awesome Collection",
        description="This collection stores important data.",
        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": "text-embedding-005",
                    "task_type": "RETRIEVAL_DOCUMENT",
                    "text_template": "Title: {title} ---- Plot: {plot}",
                },
            },
        }])
    # Because the parent Collection's 'text_embedding' field is configured
    # with a 'vertex_embedding_config', the server will populate the vector
    # automatically from 'data.title' and 'data.plot' -- no explicit
    # 'vectors' block is required.
    example_data_object = gcp.vectorsearch.DataObject("example-data-object",
        location="us-central1",
        collection_id=parent.collection_id,
        data_object_id="example-data-object",
        data=json.dumps({
            "title": "The Matrix",
            "plot": "A computer hacker learns about the true nature of reality.",
        }))
    
    package main
    
    import (
    	"encoding/json"
    
    	"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 {
    		// NOTE: This resource issues one CreateDataObject request per block.
    		// It does NOT batch across resources. Terraform will parallelize a
    		// 'for_each' up to '-parallelism', but each item is still a separate
    		// HTTP call.
    		//
    		// For bulk ingestion of many items, prefer one of these out-of-band
    		// paths instead of Terraform:
    		//   - 'importDataObjects' (from Cloud Storage) -- highest throughput,
    		//     but only available *before* any Index is created on the Collection.
    		//   - 'batchCreate' (up to ~1000 items per call) -- available at any
    		//     time, but must be driven from client code, not Terraform.
    		parent, err := vectorsearch.NewCollection(ctx, "parent", &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."),
    			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("text-embedding-005"),
    							TaskType:     pulumi.String("RETRIEVAL_DOCUMENT"),
    							TextTemplate: pulumi.String("Title: {title} ---- Plot: {plot}"),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		tmpJSON0, err := json.Marshal(map[string]string{
    			"title": "The Matrix",
    			"plot":  "A computer hacker learns about the true nature of reality.",
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		// Because the parent Collection's 'text_embedding' field is configured
    		// with a 'vertex_embedding_config', the server will populate the vector
    		// automatically from 'data.title' and 'data.plot' -- no explicit
    		// 'vectors' block is required.
    		_, err = vectorsearch.NewDataObject(ctx, "example-data-object", &vectorsearch.DataObjectArgs{
    			Location:     pulumi.String("us-central1"),
    			CollectionId: parent.CollectionId,
    			DataObjectId: pulumi.String("example-data-object"),
    			Data:         pulumi.String(json0),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        // NOTE: This resource issues one CreateDataObject request per block.
        // It does NOT batch across resources. Terraform will parallelize a
        // 'for_each' up to '-parallelism', but each item is still a separate
        // HTTP call.
        //
        // For bulk ingestion of many items, prefer one of these out-of-band
        // paths instead of Terraform:
        //   * 'importDataObjects' (from Cloud Storage) -- highest throughput,
        //     but only available *before* any Index is created on the Collection.
        //   * 'batchCreate' (up to ~1000 items per call) -- available at any
        //     time, but must be driven from client code, not Terraform.
        var parent = new Gcp.VectorSearch.Collection("parent", new()
        {
            Location = "us-central1",
            CollectionId = "example-collection",
            DisplayName = "My Awesome Collection",
            Description = "This collection stores important data.",
            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 = "text-embedding-005",
                            TaskType = "RETRIEVAL_DOCUMENT",
                            TextTemplate = "Title: {title} ---- Plot: {plot}",
                        },
                    },
                },
            },
        });
    
        // Because the parent Collection's 'text_embedding' field is configured
        // with a 'vertex_embedding_config', the server will populate the vector
        // automatically from 'data.title' and 'data.plot' -- no explicit
        // 'vectors' block is required.
        var example_data_object = new Gcp.VectorSearch.DataObject("example-data-object", new()
        {
            Location = "us-central1",
            CollectionId = parent.CollectionId,
            DataObjectId = "example-data-object",
            Data = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["title"] = "The Matrix",
                ["plot"] = "A computer hacker learns about the true nature of reality.",
            }),
        });
    
    });
    
    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 com.pulumi.gcp.vectorsearch.DataObject;
    import com.pulumi.gcp.vectorsearch.DataObjectArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // NOTE: This resource issues one CreateDataObject request per block.
            // It does NOT batch across resources. Terraform will parallelize a
            // 'for_each' up to '-parallelism', but each item is still a separate
            // HTTP call.
            //
            // For bulk ingestion of many items, prefer one of these out-of-band
            // paths instead of Terraform:
            //   * 'importDataObjects' (from Cloud Storage) -- highest throughput,
            //     but only available *before* any Index is created on the Collection.
            //   * 'batchCreate' (up to ~1000 items per call) -- available at any
            //     time, but must be driven from client code, not Terraform.
            var parent = new Collection("parent", CollectionArgs.builder()
                .location("us-central1")
                .collectionId("example-collection")
                .displayName("My Awesome Collection")
                .description("This collection stores important data.")
                .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("text-embedding-005")
                            .taskType("RETRIEVAL_DOCUMENT")
                            .textTemplate("Title: {title} ---- Plot: {plot}")
                            .build())
                        .build())
                    .build())
                .build());
    
            // Because the parent Collection's 'text_embedding' field is configured
            // with a 'vertex_embedding_config', the server will populate the vector
            // automatically from 'data.title' and 'data.plot' -- no explicit
            // 'vectors' block is required.
            var example_data_object = new DataObject("example-data-object", DataObjectArgs.builder()
                .location("us-central1")
                .collectionId(parent.collectionId())
                .dataObjectId("example-data-object")
                .data(serializeJson(
                    jsonObject(
                        jsonProperty("title", "The Matrix"),
                        jsonProperty("plot", "A computer hacker learns about the true nature of reality.")
                    )))
                .build());
    
        }
    }
    
    resources:
      # NOTE: This resource issues one CreateDataObject request per block.
      # It does NOT batch across resources. Terraform will parallelize a
      # 'for_each' up to '-parallelism', but each item is still a separate
      # HTTP call.
      #
      # For bulk ingestion of many items, prefer one of these out-of-band
      # paths instead of Terraform:
      #   * 'importDataObjects' (from Cloud Storage) -- highest throughput,
      #     but only available *before* any Index is created on the Collection.
      #   * 'batchCreate' (up to ~1000 items per call) -- available at any
      #     time, but must be driven from client code, not Terraform.
      parent:
        type: gcp:vectorsearch:Collection
        properties:
          location: us-central1
          collectionId: example-collection
          displayName: My Awesome Collection
          description: This collection stores important data.
          dataSchema: |
            {
              \"type\": \"object\",
              \"properties\": {
                \"title\": {
                  \"type\": \"string\"
                },
                \"plot\": {
                  \"type\": \"string\"
                }
              }
            }
          vectorSchemas:
            - fieldName: text_embedding
              denseVector:
                dimensions: 768
                vertexEmbeddingConfig:
                  modelId: text-embedding-005
                  taskType: RETRIEVAL_DOCUMENT
                  textTemplate: 'Title: {title} ---- Plot: {plot}'
      # Because the parent Collection's 'text_embedding' field is configured
      # with a 'vertex_embedding_config', the server will populate the vector
      # automatically from 'data.title' and 'data.plot' -- no explicit
      # 'vectors' block is required.
      example-data-object:
        type: gcp:vectorsearch:DataObject
        properties:
          location: us-central1
          collectionId: ${parent.collectionId}
          dataObjectId: example-data-object
          data:
            fn::toJSON:
              title: The Matrix
              plot: A computer hacker learns about the true nature of reality.
    
    pulumi {
      required_providers {
        gcp = {
          source = "pulumi/gcp"
        }
      }
    }
    
    # NOTE: This resource issues one CreateDataObject request per block.
    # It does NOT batch across resources. Terraform will parallelize a
    # 'for_each' up to '-parallelism', but each item is still a separate
    # HTTP call.
    #
    # For bulk ingestion of many items, prefer one of these out-of-band
    # paths instead of Terraform:
    #   * 'importDataObjects' (from Cloud Storage) -- highest throughput,
    #     but only available *before* any Index is created on the Collection.
    #   * 'batchCreate' (up to ~1000 items per call) -- available at any
    #     time, but must be driven from client code, not Terraform.
    resource "gcp_vectorsearch_collection" "parent" {
      location      = "us-central1"
      collection_id = "example-collection"
      display_name  = "My Awesome Collection"
      description   = "This collection stores important data."
      data_schema   = "{\n  \\\"type\\\": \\\"object\\\",\n  \\\"properties\\\": {\n    \\\"title\\\": {\n      \\\"type\\\": \\\"string\\\"\n    },\n    \\\"plot\\\": {\n      \\\"type\\\": \\\"string\\\"\n    }\n  }\n}\n"
      vector_schemas {
        field_name = "text_embedding"
        dense_vector = {
          dimensions = 768
          vertex_embedding_config = {
            model_id      = "text-embedding-005"
            task_type     = "RETRIEVAL_DOCUMENT"
            text_template = "Title: {title} ---- Plot: {plot}"
          }
        }
      }
    }
    # Because the parent Collection's 'text_embedding' field is configured
    # with a 'vertex_embedding_config', the server will populate the vector
    # automatically from 'data.title' and 'data.plot' -- no explicit
    # 'vectors' block is required.
    resource "gcp_vectorsearch_dataobject" "example-data-object" {
      location       = "us-central1"
      collection_id  = gcp_vectorsearch_collection.parent.collection_id
      data_object_id = "example-data-object"
      data = jsonencode({
        "title" = "The Matrix"
        "plot"  = "A computer hacker learns about the true nature of reality."
      })
    }
    

    Vectorsearch Data Object With Vectors

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    // NOTE: This resource issues one CreateDataObject request per block.
    // It does NOT batch across resources. Terraform will parallelize a
    // 'for_each' up to '-parallelism', but each item is still a separate
    // HTTP call.
    //
    // For bulk ingestion of many items, prefer one of these out-of-band
    // paths instead of Terraform:
    //   * 'importDataObjects' (from Cloud Storage) -- highest throughput,
    //     but only available *before* any Index is created on the Collection.
    //   * 'batchCreate' (up to ~1000 items per call) -- available at any
    //     time, but must be driven from client code, not Terraform.
    const parent = new gcp.vectorsearch.Collection("parent", {
        location: "us-central1",
        collectionId: "example-vectors-collection",
        displayName: "My BYO-Embedding Collection",
        description: "Collection whose vectors are supplied by the client.",
        dataSchema: `{
      \\"type\\": \\"object\\",
      \\"properties\\": {
        \\"title\\": {
          \\"type\\": \\"string\\"
        },
        \\"category\\": {
          \\"type\\": \\"string\\"
        }
      }
    }
    `,
        vectorSchemas: [
            {
                fieldName: "dense_embedding",
                denseVector: {
                    dimensions: 4,
                },
            },
            {
                fieldName: "sparse_embedding",
                sparseVector: {},
            },
        ],
    });
    const example_vectors_data_object = new gcp.vectorsearch.DataObject("example-vectors-data-object", {
        location: "us-central1",
        collectionId: parent.collectionId,
        dataObjectId: "example-vectors-data-object",
        data: JSON.stringify({
            title: "The Matrix",
            category: "movie",
        }),
        vectors: [
            {
                fieldName: "dense_embedding",
                dense: {
                    values: [
                        0.11,
                        0.22,
                        0.33,
                        0.44,
                    ],
                },
            },
            {
                fieldName: "sparse_embedding",
                sparse: {
                    values: [
                        0.9,
                        0.5,
                        0.1,
                    ],
                    indices: [
                        3,
                        17,
                        42,
                    ],
                },
            },
        ],
    });
    
    import pulumi
    import json
    import pulumi_gcp as gcp
    
    # NOTE: This resource issues one CreateDataObject request per block.
    # It does NOT batch across resources. Terraform will parallelize a
    # 'for_each' up to '-parallelism', but each item is still a separate
    # HTTP call.
    #
    # For bulk ingestion of many items, prefer one of these out-of-band
    # paths instead of Terraform:
    #   * 'importDataObjects' (from Cloud Storage) -- highest throughput,
    #     but only available *before* any Index is created on the Collection.
    #   * 'batchCreate' (up to ~1000 items per call) -- available at any
    #     time, but must be driven from client code, not Terraform.
    parent = gcp.vectorsearch.Collection("parent",
        location="us-central1",
        collection_id="example-vectors-collection",
        display_name="My BYO-Embedding Collection",
        description="Collection whose vectors are supplied by the client.",
        data_schema="""{
      \"type\": \"object\",
      \"properties\": {
        \"title\": {
          \"type\": \"string\"
        },
        \"category\": {
          \"type\": \"string\"
        }
      }
    }
    """,
        vector_schemas=[
            {
                "field_name": "dense_embedding",
                "dense_vector": {
                    "dimensions": 4,
                },
            },
            {
                "field_name": "sparse_embedding",
                "sparse_vector": {},
            },
        ])
    example_vectors_data_object = gcp.vectorsearch.DataObject("example-vectors-data-object",
        location="us-central1",
        collection_id=parent.collection_id,
        data_object_id="example-vectors-data-object",
        data=json.dumps({
            "title": "The Matrix",
            "category": "movie",
        }),
        vectors=[
            {
                "field_name": "dense_embedding",
                "dense": {
                    "values": [
                        0.11,
                        0.22,
                        0.33,
                        0.44,
                    ],
                },
            },
            {
                "field_name": "sparse_embedding",
                "sparse": {
                    "values": [
                        0.9,
                        0.5,
                        0.1,
                    ],
                    "indices": [
                        3,
                        17,
                        42,
                    ],
                },
            },
        ])
    
    package main
    
    import (
    	"encoding/json"
    
    	"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 {
    		// NOTE: This resource issues one CreateDataObject request per block.
    		// It does NOT batch across resources. Terraform will parallelize a
    		// 'for_each' up to '-parallelism', but each item is still a separate
    		// HTTP call.
    		//
    		// For bulk ingestion of many items, prefer one of these out-of-band
    		// paths instead of Terraform:
    		//   - 'importDataObjects' (from Cloud Storage) -- highest throughput,
    		//     but only available *before* any Index is created on the Collection.
    		//   - 'batchCreate' (up to ~1000 items per call) -- available at any
    		//     time, but must be driven from client code, not Terraform.
    		parent, err := vectorsearch.NewCollection(ctx, "parent", &vectorsearch.CollectionArgs{
    			Location:     pulumi.String("us-central1"),
    			CollectionId: pulumi.String("example-vectors-collection"),
    			DisplayName:  pulumi.String("My BYO-Embedding Collection"),
    			Description:  pulumi.String("Collection whose vectors are supplied by the client."),
    			DataSchema: pulumi.String(`{
      \"type\": \"object\",
      \"properties\": {
        \"title\": {
          \"type\": \"string\"
        },
        \"category\": {
          \"type\": \"string\"
        }
      }
    }
    `),
    			VectorSchemas: vectorsearch.CollectionVectorSchemaArray{
    				&vectorsearch.CollectionVectorSchemaArgs{
    					FieldName: pulumi.String("dense_embedding"),
    					DenseVector: &vectorsearch.CollectionVectorSchemaDenseVectorArgs{
    						Dimensions: pulumi.Int(4),
    					},
    				},
    				&vectorsearch.CollectionVectorSchemaArgs{
    					FieldName:    pulumi.String("sparse_embedding"),
    					SparseVector: &vectorsearch.CollectionVectorSchemaSparseVectorArgs{},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		tmpJSON0, err := json.Marshal(map[string]string{
    			"title":    "The Matrix",
    			"category": "movie",
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = vectorsearch.NewDataObject(ctx, "example-vectors-data-object", &vectorsearch.DataObjectArgs{
    			Location:     pulumi.String("us-central1"),
    			CollectionId: parent.CollectionId,
    			DataObjectId: pulumi.String("example-vectors-data-object"),
    			Data:         pulumi.String(json0),
    			Vectors: vectorsearch.DataObjectVectorArray{
    				&vectorsearch.DataObjectVectorArgs{
    					FieldName: pulumi.String("dense_embedding"),
    					Dense: &vectorsearch.DataObjectVectorDenseArgs{
    						Values: pulumi.Float64Array{
    							pulumi.Float64(0.11),
    							pulumi.Float64(0.22),
    							pulumi.Float64(0.33),
    							pulumi.Float64(0.44),
    						},
    					},
    				},
    				&vectorsearch.DataObjectVectorArgs{
    					FieldName: pulumi.String("sparse_embedding"),
    					Sparse: &vectorsearch.DataObjectVectorSparseArgs{
    						Values: pulumi.Float64Array{
    							pulumi.Float64(0.9),
    							pulumi.Float64(0.5),
    							pulumi.Float64(0.1),
    						},
    						Indices: pulumi.IntArray{
    							pulumi.Int(3),
    							pulumi.Int(17),
    							pulumi.Int(42),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        // NOTE: This resource issues one CreateDataObject request per block.
        // It does NOT batch across resources. Terraform will parallelize a
        // 'for_each' up to '-parallelism', but each item is still a separate
        // HTTP call.
        //
        // For bulk ingestion of many items, prefer one of these out-of-band
        // paths instead of Terraform:
        //   * 'importDataObjects' (from Cloud Storage) -- highest throughput,
        //     but only available *before* any Index is created on the Collection.
        //   * 'batchCreate' (up to ~1000 items per call) -- available at any
        //     time, but must be driven from client code, not Terraform.
        var parent = new Gcp.VectorSearch.Collection("parent", new()
        {
            Location = "us-central1",
            CollectionId = "example-vectors-collection",
            DisplayName = "My BYO-Embedding Collection",
            Description = "Collection whose vectors are supplied by the client.",
            DataSchema = @"{
      \""type\"": \""object\"",
      \""properties\"": {
        \""title\"": {
          \""type\"": \""string\""
        },
        \""category\"": {
          \""type\"": \""string\""
        }
      }
    }
    ",
            VectorSchemas = new[]
            {
                new Gcp.VectorSearch.Inputs.CollectionVectorSchemaArgs
                {
                    FieldName = "dense_embedding",
                    DenseVector = new Gcp.VectorSearch.Inputs.CollectionVectorSchemaDenseVectorArgs
                    {
                        Dimensions = 4,
                    },
                },
                new Gcp.VectorSearch.Inputs.CollectionVectorSchemaArgs
                {
                    FieldName = "sparse_embedding",
                    SparseVector = null,
                },
            },
        });
    
        var example_vectors_data_object = new Gcp.VectorSearch.DataObject("example-vectors-data-object", new()
        {
            Location = "us-central1",
            CollectionId = parent.CollectionId,
            DataObjectId = "example-vectors-data-object",
            Data = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["title"] = "The Matrix",
                ["category"] = "movie",
            }),
            Vectors = new[]
            {
                new Gcp.VectorSearch.Inputs.DataObjectVectorArgs
                {
                    FieldName = "dense_embedding",
                    Dense = new Gcp.VectorSearch.Inputs.DataObjectVectorDenseArgs
                    {
                        Values = new[]
                        {
                            0.11,
                            0.22,
                            0.33,
                            0.44,
                        },
                    },
                },
                new Gcp.VectorSearch.Inputs.DataObjectVectorArgs
                {
                    FieldName = "sparse_embedding",
                    Sparse = new Gcp.VectorSearch.Inputs.DataObjectVectorSparseArgs
                    {
                        Values = new[]
                        {
                            0.9,
                            0.5,
                            0.1,
                        },
                        Indices = new[]
                        {
                            3,
                            17,
                            42,
                        },
                    },
                },
            },
        });
    
    });
    
    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.CollectionVectorSchemaSparseVectorArgs;
    import com.pulumi.gcp.vectorsearch.DataObject;
    import com.pulumi.gcp.vectorsearch.DataObjectArgs;
    import com.pulumi.gcp.vectorsearch.inputs.DataObjectVectorArgs;
    import com.pulumi.gcp.vectorsearch.inputs.DataObjectVectorDenseArgs;
    import com.pulumi.gcp.vectorsearch.inputs.DataObjectVectorSparseArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // NOTE: This resource issues one CreateDataObject request per block.
            // It does NOT batch across resources. Terraform will parallelize a
            // 'for_each' up to '-parallelism', but each item is still a separate
            // HTTP call.
            //
            // For bulk ingestion of many items, prefer one of these out-of-band
            // paths instead of Terraform:
            //   * 'importDataObjects' (from Cloud Storage) -- highest throughput,
            //     but only available *before* any Index is created on the Collection.
            //   * 'batchCreate' (up to ~1000 items per call) -- available at any
            //     time, but must be driven from client code, not Terraform.
            var parent = new Collection("parent", CollectionArgs.builder()
                .location("us-central1")
                .collectionId("example-vectors-collection")
                .displayName("My BYO-Embedding Collection")
                .description("Collection whose vectors are supplied by the client.")
                .dataSchema("""
    {
      \"type\": \"object\",
      \"properties\": {
        \"title\": {
          \"type\": \"string\"
        },
        \"category\": {
          \"type\": \"string\"
        }
      }
    }
                """)
                .vectorSchemas(            
                    CollectionVectorSchemaArgs.builder()
                        .fieldName("dense_embedding")
                        .denseVector(CollectionVectorSchemaDenseVectorArgs.builder()
                            .dimensions(4)
                            .build())
                        .build(),
                    CollectionVectorSchemaArgs.builder()
                        .fieldName("sparse_embedding")
                        .sparseVector(CollectionVectorSchemaSparseVectorArgs.builder()
                            .build())
                        .build())
                .build());
    
            var example_vectors_data_object = new DataObject("example-vectors-data-object", DataObjectArgs.builder()
                .location("us-central1")
                .collectionId(parent.collectionId())
                .dataObjectId("example-vectors-data-object")
                .data(serializeJson(
                    jsonObject(
                        jsonProperty("title", "The Matrix"),
                        jsonProperty("category", "movie")
                    )))
                .vectors(            
                    DataObjectVectorArgs.builder()
                        .fieldName("dense_embedding")
                        .dense(DataObjectVectorDenseArgs.builder()
                            .values(                        
                                0.11,
                                0.22,
                                0.33,
                                0.44)
                            .build())
                        .build(),
                    DataObjectVectorArgs.builder()
                        .fieldName("sparse_embedding")
                        .sparse(DataObjectVectorSparseArgs.builder()
                            .values(                        
                                0.9,
                                0.5,
                                0.1)
                            .indices(                        
                                3,
                                17,
                                42)
                            .build())
                        .build())
                .build());
    
        }
    }
    
    resources:
      # NOTE: This resource issues one CreateDataObject request per block.
      # It does NOT batch across resources. Terraform will parallelize a
      # 'for_each' up to '-parallelism', but each item is still a separate
      # HTTP call.
      #
      # For bulk ingestion of many items, prefer one of these out-of-band
      # paths instead of Terraform:
      #   * 'importDataObjects' (from Cloud Storage) -- highest throughput,
      #     but only available *before* any Index is created on the Collection.
      #   * 'batchCreate' (up to ~1000 items per call) -- available at any
      #     time, but must be driven from client code, not Terraform.
      parent:
        type: gcp:vectorsearch:Collection
        properties:
          location: us-central1
          collectionId: example-vectors-collection
          displayName: My BYO-Embedding Collection
          description: Collection whose vectors are supplied by the client.
          dataSchema: |
            {
              \"type\": \"object\",
              \"properties\": {
                \"title\": {
                  \"type\": \"string\"
                },
                \"category\": {
                  \"type\": \"string\"
                }
              }
            }
          vectorSchemas:
            - fieldName: dense_embedding
              denseVector:
                dimensions: 4
            - fieldName: sparse_embedding
              sparseVector: {}
      example-vectors-data-object:
        type: gcp:vectorsearch:DataObject
        properties:
          location: us-central1
          collectionId: ${parent.collectionId}
          dataObjectId: example-vectors-data-object
          data:
            fn::toJSON:
              title: The Matrix
              category: movie
          vectors:
            - fieldName: dense_embedding
              dense:
                values:
                  - 0.11
                  - 0.22
                  - 0.33
                  - 0.44
            - fieldName: sparse_embedding
              sparse:
                values:
                  - 0.9
                  - 0.5
                  - 0.1
                indices:
                  - 3
                  - 17
                  - 42
    
    pulumi {
      required_providers {
        gcp = {
          source = "pulumi/gcp"
        }
      }
    }
    
    # NOTE: This resource issues one CreateDataObject request per block.
    # It does NOT batch across resources. Terraform will parallelize a
    # 'for_each' up to '-parallelism', but each item is still a separate
    # HTTP call.
    #
    # For bulk ingestion of many items, prefer one of these out-of-band
    # paths instead of Terraform:
    #   * 'importDataObjects' (from Cloud Storage) -- highest throughput,
    #     but only available *before* any Index is created on the Collection.
    #   * 'batchCreate' (up to ~1000 items per call) -- available at any
    #     time, but must be driven from client code, not Terraform.
    resource "gcp_vectorsearch_collection" "parent" {
      location      = "us-central1"
      collection_id = "example-vectors-collection"
      display_name  = "My BYO-Embedding Collection"
      description   = "Collection whose vectors are supplied by the client."
      data_schema   = "{\n  \\\"type\\\": \\\"object\\\",\n  \\\"properties\\\": {\n    \\\"title\\\": {\n      \\\"type\\\": \\\"string\\\"\n    },\n    \\\"category\\\": {\n      \\\"type\\\": \\\"string\\\"\n    }\n  }\n}\n"
      vector_schemas {
        field_name = "dense_embedding"
        dense_vector = {
          dimensions = 4
        }
      }
      vector_schemas {
        field_name    = "sparse_embedding"
        sparse_vector = {}
      }
    }
    resource "gcp_vectorsearch_dataobject" "example-vectors-data-object" {
      location       = "us-central1"
      collection_id  = gcp_vectorsearch_collection.parent.collection_id
      data_object_id = "example-vectors-data-object"
      data = jsonencode({
        "title"    = "The Matrix"
        "category" = "movie"
      })
      vectors {
        field_name = "dense_embedding"
        dense = {
          values = [0.11, 0.22, 0.33, 0.44]
        }
      }
      vectors {
        field_name = "sparse_embedding"
        sparse = {
          values  = [0.9, 0.5, 0.1]
          indices = [3, 17, 42]
        }
      }
    }
    

    Create DataObject Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DataObject(name: string, args: DataObjectArgs, opts?: CustomResourceOptions);
    @overload
    def DataObject(resource_name: str,
                   args: DataObjectArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def DataObject(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   collection_id: Optional[str] = None,
                   data_object_id: Optional[str] = None,
                   location: Optional[str] = None,
                   data: Optional[str] = None,
                   deletion_policy: Optional[str] = None,
                   etag: Optional[str] = None,
                   project: Optional[str] = None,
                   vectors: Optional[Sequence[DataObjectVectorArgs]] = None)
    func NewDataObject(ctx *Context, name string, args DataObjectArgs, opts ...ResourceOption) (*DataObject, error)
    public DataObject(string name, DataObjectArgs args, CustomResourceOptions? opts = null)
    public DataObject(String name, DataObjectArgs args)
    public DataObject(String name, DataObjectArgs args, CustomResourceOptions options)
    
    type: gcp:vectorsearch:DataObject
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "gcp_vectorsearch_data_object" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args DataObjectArgs
    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 DataObjectArgs
    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 DataObjectArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DataObjectArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DataObjectArgs
    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 dataObjectResource = new Gcp.VectorSearch.DataObject("dataObjectResource", new()
    {
        CollectionId = "string",
        DataObjectId = "string",
        Location = "string",
        Data = "string",
        DeletionPolicy = "string",
        Etag = "string",
        Project = "string",
        Vectors = new[]
        {
            new Gcp.VectorSearch.Inputs.DataObjectVectorArgs
            {
                FieldName = "string",
                Dense = new Gcp.VectorSearch.Inputs.DataObjectVectorDenseArgs
                {
                    Values = new[]
                    {
                        0,
                    },
                },
                Sparse = new Gcp.VectorSearch.Inputs.DataObjectVectorSparseArgs
                {
                    Indices = new[]
                    {
                        0,
                    },
                    Values = new[]
                    {
                        0,
                    },
                },
            },
        },
    });
    
    example, err := vectorsearch.NewDataObject(ctx, "dataObjectResource", &vectorsearch.DataObjectArgs{
    	CollectionId:   pulumi.String("string"),
    	DataObjectId:   pulumi.String("string"),
    	Location:       pulumi.String("string"),
    	Data:           pulumi.String("string"),
    	DeletionPolicy: pulumi.String("string"),
    	Etag:           pulumi.String("string"),
    	Project:        pulumi.String("string"),
    	Vectors: vectorsearch.DataObjectVectorArray{
    		&vectorsearch.DataObjectVectorArgs{
    			FieldName: pulumi.String("string"),
    			Dense: &vectorsearch.DataObjectVectorDenseArgs{
    				Values: pulumi.Float64Array{
    					pulumi.Float64(0),
    				},
    			},
    			Sparse: &vectorsearch.DataObjectVectorSparseArgs{
    				Indices: pulumi.IntArray{
    					pulumi.Int(0),
    				},
    				Values: pulumi.Float64Array{
    					pulumi.Float64(0),
    				},
    			},
    		},
    	},
    })
    
    resource "gcp_vectorsearch_data_object" "dataObjectResource" {
      lifecycle {
        create_before_destroy = true
      }
      collection_id   = "string"
      data_object_id  = "string"
      location        = "string"
      data            = "string"
      deletion_policy = "string"
      etag            = "string"
      project         = "string"
      vectors {
        field_name = "string"
        dense = {
          values = [0]
        }
        sparse = {
          indices = [0]
          values  = [0]
        }
      }
    }
    
    var dataObjectResource = new DataObject("dataObjectResource", DataObjectArgs.builder()
        .collectionId("string")
        .dataObjectId("string")
        .location("string")
        .data("string")
        .deletionPolicy("string")
        .etag("string")
        .project("string")
        .vectors(DataObjectVectorArgs.builder()
            .fieldName("string")
            .dense(DataObjectVectorDenseArgs.builder()
                .values(0.0)
                .build())
            .sparse(DataObjectVectorSparseArgs.builder()
                .indices(0)
                .values(0.0)
                .build())
            .build())
        .build());
    
    data_object_resource = gcp.vectorsearch.DataObject("dataObjectResource",
        collection_id="string",
        data_object_id="string",
        location="string",
        data="string",
        deletion_policy="string",
        etag="string",
        project="string",
        vectors=[{
            "field_name": "string",
            "dense": {
                "values": [float(0)],
            },
            "sparse": {
                "indices": [0],
                "values": [float(0)],
            },
        }])
    
    const dataObjectResource = new gcp.vectorsearch.DataObject("dataObjectResource", {
        collectionId: "string",
        dataObjectId: "string",
        location: "string",
        data: "string",
        deletionPolicy: "string",
        etag: "string",
        project: "string",
        vectors: [{
            fieldName: "string",
            dense: {
                values: [0],
            },
            sparse: {
                indices: [0],
                values: [0],
            },
        }],
    });
    
    type: gcp:vectorsearch:DataObject
    properties:
        collectionId: string
        data: string
        dataObjectId: string
        deletionPolicy: string
        etag: string
        location: string
        project: string
        vectors:
            - dense:
                values:
                    - 0
              fieldName: string
              sparse:
                indices:
                    - 0
                values:
                    - 0
    

    DataObject 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 DataObject resource accepts the following input properties:

    CollectionId string
    The ID of the parent Collection.
    DataObjectId string
    ID of the DataObject 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 string
    The JSON data of the DataObject. Must be a JSON object whose field names match the fields defined in the parent Collection's dataSchema.
    DeletionPolicy string
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    Etag string
    The etag of the DataObject, used for optimistic concurrency control on updates and deletes.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Vectors List<DataObjectVector>
    The vectors of the DataObject, keyed by the vector field name as defined in the parent Collection's vectorSchema. If a vector field is configured with a vertexEmbeddingConfig on the Collection, the server will populate the vector automatically from the corresponding text in data and the field should be omitted here. Structure is documented below.
    CollectionId string
    The ID of the parent Collection.
    DataObjectId string
    ID of the DataObject 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 string
    The JSON data of the DataObject. Must be a JSON object whose field names match the fields defined in the parent Collection's dataSchema.
    DeletionPolicy string
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    Etag string
    The etag of the DataObject, used for optimistic concurrency control on updates and deletes.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Vectors []DataObjectVectorArgs
    The vectors of the DataObject, keyed by the vector field name as defined in the parent Collection's vectorSchema. If a vector field is configured with a vertexEmbeddingConfig on the Collection, the server will populate the vector automatically from the corresponding text in data and the field should be omitted here. Structure is documented below.
    collection_id string
    The ID of the parent Collection.
    data_object_id string
    ID of the DataObject 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 string
    The JSON data of the DataObject. Must be a JSON object whose field names match the fields defined in the parent Collection's dataSchema.
    deletion_policy string
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    etag string
    The etag of the DataObject, used for optimistic concurrency control on updates and deletes.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    vectors list(object)
    The vectors of the DataObject, keyed by the vector field name as defined in the parent Collection's vectorSchema. If a vector field is configured with a vertexEmbeddingConfig on the Collection, the server will populate the vector automatically from the corresponding text in data and the field should be omitted here. Structure is documented below.
    collectionId String
    The ID of the parent Collection.
    dataObjectId String
    ID of the DataObject 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 String
    The JSON data of the DataObject. Must be a JSON object whose field names match the fields defined in the parent Collection's dataSchema.
    deletionPolicy String
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    etag String
    The etag of the DataObject, used for optimistic concurrency control on updates and deletes.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    vectors List<DataObjectVector>
    The vectors of the DataObject, keyed by the vector field name as defined in the parent Collection's vectorSchema. If a vector field is configured with a vertexEmbeddingConfig on the Collection, the server will populate the vector automatically from the corresponding text in data and the field should be omitted here. Structure is documented below.
    collectionId string
    The ID of the parent Collection.
    dataObjectId string
    ID of the DataObject 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 string
    The JSON data of the DataObject. Must be a JSON object whose field names match the fields defined in the parent Collection's dataSchema.
    deletionPolicy string
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    etag string
    The etag of the DataObject, used for optimistic concurrency control on updates and deletes.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    vectors DataObjectVector[]
    The vectors of the DataObject, keyed by the vector field name as defined in the parent Collection's vectorSchema. If a vector field is configured with a vertexEmbeddingConfig on the Collection, the server will populate the vector automatically from the corresponding text in data and the field should be omitted here. Structure is documented below.
    collection_id str
    The ID of the parent Collection.
    data_object_id str
    ID of the DataObject 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 str
    The JSON data of the DataObject. Must be a JSON object whose field names match the fields defined in the parent Collection's dataSchema.
    deletion_policy str
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    etag str
    The etag of the DataObject, used for optimistic concurrency control on updates and deletes.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    vectors Sequence[DataObjectVectorArgs]
    The vectors of the DataObject, keyed by the vector field name as defined in the parent Collection's vectorSchema. If a vector field is configured with a vertexEmbeddingConfig on the Collection, the server will populate the vector automatically from the corresponding text in data and the field should be omitted here. Structure is documented below.
    collectionId String
    The ID of the parent Collection.
    dataObjectId String
    ID of the DataObject 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 String
    The JSON data of the DataObject. Must be a JSON object whose field names match the fields defined in the parent Collection's dataSchema.
    deletionPolicy String
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    etag String
    The etag of the DataObject, used for optimistic concurrency control on updates and deletes.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    vectors List<Property Map>
    The vectors of the DataObject, keyed by the vector field name as defined in the parent Collection's vectorSchema. If a vector field is configured with a vertexEmbeddingConfig on the Collection, the server will populate the vector automatically from the corresponding text in data and the field should be omitted here. Structure is documented below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DataObject resource produces the following output properties:

    CreateTime string
    [Output only] Create time stamp
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Identifier. name of resource
    UpdateTime string
    [Output only] Update time stamp
    CreateTime string
    [Output only] Create time stamp
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Identifier. name of resource
    UpdateTime string
    [Output only] Update time stamp
    create_time string
    [Output only] Create time stamp
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Identifier. name of resource
    update_time string
    [Output only] Update time stamp
    createTime String
    [Output only] Create time stamp
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Identifier. name of resource
    updateTime String
    [Output only] Update time stamp
    createTime string
    [Output only] Create time stamp
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Identifier. name of resource
    updateTime string
    [Output only] Update time stamp
    create_time str
    [Output only] Create time stamp
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Identifier. name of resource
    update_time str
    [Output only] Update time stamp
    createTime String
    [Output only] Create time stamp
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Identifier. name of resource
    updateTime String
    [Output only] Update time stamp

    Look up Existing DataObject Resource

    Get an existing DataObject 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?: DataObjectState, opts?: CustomResourceOptions): DataObject
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            collection_id: Optional[str] = None,
            create_time: Optional[str] = None,
            data: Optional[str] = None,
            data_object_id: Optional[str] = None,
            deletion_policy: Optional[str] = None,
            etag: Optional[str] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            update_time: Optional[str] = None,
            vectors: Optional[Sequence[DataObjectVectorArgs]] = None) -> DataObject
    func GetDataObject(ctx *Context, name string, id IDInput, state *DataObjectState, opts ...ResourceOption) (*DataObject, error)
    public static DataObject Get(string name, Input<string> id, DataObjectState? state, CustomResourceOptions? opts = null)
    public static DataObject get(String name, Output<String> id, DataObjectState state, CustomResourceOptions options)
    resources:  _:    type: gcp:vectorsearch:DataObject    get:      id: ${id}
    import {
      to = gcp_vectorsearch_data_object.example
      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
    The ID of the parent Collection.
    CreateTime string
    [Output only] Create time stamp
    Data string
    The JSON data of the DataObject. Must be a JSON object whose field names match the fields defined in the parent Collection's dataSchema.
    DataObjectId string
    ID of the DataObject 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?.
    DeletionPolicy string
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    Etag string
    The etag of the DataObject, used for optimistic concurrency control on updates and deletes.
    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.
    UpdateTime string
    [Output only] Update time stamp
    Vectors List<DataObjectVector>
    The vectors of the DataObject, keyed by the vector field name as defined in the parent Collection's vectorSchema. If a vector field is configured with a vertexEmbeddingConfig on the Collection, the server will populate the vector automatically from the corresponding text in data and the field should be omitted here. Structure is documented below.
    CollectionId string
    The ID of the parent Collection.
    CreateTime string
    [Output only] Create time stamp
    Data string
    The JSON data of the DataObject. Must be a JSON object whose field names match the fields defined in the parent Collection's dataSchema.
    DataObjectId string
    ID of the DataObject 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?.
    DeletionPolicy string
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    Etag string
    The etag of the DataObject, used for optimistic concurrency control on updates and deletes.
    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.
    UpdateTime string
    [Output only] Update time stamp
    Vectors []DataObjectVectorArgs
    The vectors of the DataObject, keyed by the vector field name as defined in the parent Collection's vectorSchema. If a vector field is configured with a vertexEmbeddingConfig on the Collection, the server will populate the vector automatically from the corresponding text in data and the field should be omitted here. Structure is documented below.
    collection_id string
    The ID of the parent Collection.
    create_time string
    [Output only] Create time stamp
    data string
    The JSON data of the DataObject. Must be a JSON object whose field names match the fields defined in the parent Collection's dataSchema.
    data_object_id string
    ID of the DataObject 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?.
    deletion_policy string
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    etag string
    The etag of the DataObject, used for optimistic concurrency control on updates and deletes.
    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.
    update_time string
    [Output only] Update time stamp
    vectors list(object)
    The vectors of the DataObject, keyed by the vector field name as defined in the parent Collection's vectorSchema. If a vector field is configured with a vertexEmbeddingConfig on the Collection, the server will populate the vector automatically from the corresponding text in data and the field should be omitted here. Structure is documented below.
    collectionId String
    The ID of the parent Collection.
    createTime String
    [Output only] Create time stamp
    data String
    The JSON data of the DataObject. Must be a JSON object whose field names match the fields defined in the parent Collection's dataSchema.
    dataObjectId String
    ID of the DataObject 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?.
    deletionPolicy String
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    etag String
    The etag of the DataObject, used for optimistic concurrency control on updates and deletes.
    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.
    updateTime String
    [Output only] Update time stamp
    vectors List<DataObjectVector>
    The vectors of the DataObject, keyed by the vector field name as defined in the parent Collection's vectorSchema. If a vector field is configured with a vertexEmbeddingConfig on the Collection, the server will populate the vector automatically from the corresponding text in data and the field should be omitted here. Structure is documented below.
    collectionId string
    The ID of the parent Collection.
    createTime string
    [Output only] Create time stamp
    data string
    The JSON data of the DataObject. Must be a JSON object whose field names match the fields defined in the parent Collection's dataSchema.
    dataObjectId string
    ID of the DataObject 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?.
    deletionPolicy string
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    etag string
    The etag of the DataObject, used for optimistic concurrency control on updates and deletes.
    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.
    updateTime string
    [Output only] Update time stamp
    vectors DataObjectVector[]
    The vectors of the DataObject, keyed by the vector field name as defined in the parent Collection's vectorSchema. If a vector field is configured with a vertexEmbeddingConfig on the Collection, the server will populate the vector automatically from the corresponding text in data and the field should be omitted here. Structure is documented below.
    collection_id str
    The ID of the parent Collection.
    create_time str
    [Output only] Create time stamp
    data str
    The JSON data of the DataObject. Must be a JSON object whose field names match the fields defined in the parent Collection's dataSchema.
    data_object_id str
    ID of the DataObject 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?.
    deletion_policy str
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    etag str
    The etag of the DataObject, used for optimistic concurrency control on updates and deletes.
    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.
    update_time str
    [Output only] Update time stamp
    vectors Sequence[DataObjectVectorArgs]
    The vectors of the DataObject, keyed by the vector field name as defined in the parent Collection's vectorSchema. If a vector field is configured with a vertexEmbeddingConfig on the Collection, the server will populate the vector automatically from the corresponding text in data and the field should be omitted here. Structure is documented below.
    collectionId String
    The ID of the parent Collection.
    createTime String
    [Output only] Create time stamp
    data String
    The JSON data of the DataObject. Must be a JSON object whose field names match the fields defined in the parent Collection's dataSchema.
    dataObjectId String
    ID of the DataObject 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?.
    deletionPolicy String
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    etag String
    The etag of the DataObject, used for optimistic concurrency control on updates and deletes.
    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.
    updateTime String
    [Output only] Update time stamp
    vectors List<Property Map>
    The vectors of the DataObject, keyed by the vector field name as defined in the parent Collection's vectorSchema. If a vector field is configured with a vertexEmbeddingConfig on the Collection, the server will populate the vector automatically from the corresponding text in data and the field should be omitted here. Structure is documented below.

    Supporting Types

    DataObjectVector, DataObjectVectorArgs

    FieldName string
    The identifier for this object. Format specified above.
    Dense DataObjectVectorDense
    A dense vector. Structure is documented below.
    Sparse DataObjectVectorSparse
    A sparse vector. Structure is documented below.
    FieldName string
    The identifier for this object. Format specified above.
    Dense DataObjectVectorDense
    A dense vector. Structure is documented below.
    Sparse DataObjectVectorSparse
    A sparse vector. Structure is documented below.
    field_name string
    The identifier for this object. Format specified above.
    dense object
    A dense vector. Structure is documented below.
    sparse object
    A sparse vector. Structure is documented below.
    fieldName String
    The identifier for this object. Format specified above.
    dense DataObjectVectorDense
    A dense vector. Structure is documented below.
    sparse DataObjectVectorSparse
    A sparse vector. Structure is documented below.
    fieldName string
    The identifier for this object. Format specified above.
    dense DataObjectVectorDense
    A dense vector. Structure is documented below.
    sparse DataObjectVectorSparse
    A sparse vector. Structure is documented below.
    field_name str
    The identifier for this object. Format specified above.
    dense DataObjectVectorDense
    A dense vector. Structure is documented below.
    sparse DataObjectVectorSparse
    A sparse vector. Structure is documented below.
    fieldName String
    The identifier for this object. Format specified above.
    dense Property Map
    A dense vector. Structure is documented below.
    sparse Property Map
    A sparse vector. Structure is documented below.

    DataObjectVectorDense, DataObjectVectorDenseArgs

    Values List<double>
    The float values of the dense vector.
    Values []float64
    The float values of the dense vector.
    values list(number)
    The float values of the dense vector.
    values List<Double>
    The float values of the dense vector.
    values number[]
    The float values of the dense vector.
    values Sequence[float]
    The float values of the dense vector.
    values List<Number>
    The float values of the dense vector.

    DataObjectVectorSparse, DataObjectVectorSparseArgs

    Indices List<int>
    The indices corresponding to the entries in values. Must have the same length as values.
    Values List<double>
    The non-zero float values of the sparse vector.
    Indices []int
    The indices corresponding to the entries in values. Must have the same length as values.
    Values []float64
    The non-zero float values of the sparse vector.
    indices list(number)
    The indices corresponding to the entries in values. Must have the same length as values.
    values list(number)
    The non-zero float values of the sparse vector.
    indices List<Integer>
    The indices corresponding to the entries in values. Must have the same length as values.
    values List<Double>
    The non-zero float values of the sparse vector.
    indices number[]
    The indices corresponding to the entries in values. Must have the same length as values.
    values number[]
    The non-zero float values of the sparse vector.
    indices Sequence[int]
    The indices corresponding to the entries in values. Must have the same length as values.
    values Sequence[float]
    The non-zero float values of the sparse vector.
    indices List<Number>
    The indices corresponding to the entries in values. Must have the same length as values.
    values List<Number>
    The non-zero float values of the sparse vector.

    Import

    DataObject can be imported using any of these accepted formats:

    • projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/dataObjects/{{data_object_id}}
    • {{project}}/{{location}}/{{collection_id}}/{{data_object_id}}
    • {{location}}/{{collection_id}}/{{data_object_id}}

    When using the pulumi import command, DataObject can be imported using one of the formats above. For example:

    $ pulumi import gcp:vectorsearch/dataObject:DataObject default projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/dataObjects/{{data_object_id}}
    $ pulumi import gcp:vectorsearch/dataObject:DataObject default {{project}}/{{location}}/{{collection_id}}/{{data_object_id}}
    $ pulumi import gcp:vectorsearch/dataObject:DataObject default {{location}}/{{collection_id}}/{{data_object_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.35.0
    published on Friday, Aug 21, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial