1. Registry
  2. Packages
  3. Google Cloud (GCP)
  4. API Docs
  5. vertex
  6. AiRagFile
Viewing docs for Google Cloud v10.5.0
published on Wednesday, Nov 18, 2026 by Pulumi
gcp logo
Viewing docs for Google Cloud v10.5.0
published on Wednesday, Nov 18, 2026 by Pulumi

    A RagFile is a single file that has been imported into a Vertex AI RAG Engine RagCorpus, where it is parsed, chunked, embedded, and indexed.

    Each gcp.vertex.AiRagFile imports exactly one file from either Cloud Storage or Google Drive using the ragFiles:import method.

    Note: The RAG Engine service agent (service-PROJECT_NUMBER@gcp-sa-vertex-rag.iam.gserviceaccount.com) must be able to read the source file. If the source file content already exists in the RagCorpus, the import is skipped by the API and resource creation fails.

    To get more information about RagFile, see:

    Example Usage

    Vertex Ai Rag File Gcs

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const project = gcp.organizations.getProject({});
    const ragCorpus = new gcp.vertex.AiRagCorpus("rag_corpus", {
        displayName: "rag-corpus-file",
        region: "europe-west4",
        vectorDbConfig: {
            ragManagedDb: {
                knn: {},
            },
            ragEmbeddingModelConfig: {
                vertexPredictionEndpoint: {
                    endpoint: project.then(project => `projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005`),
                },
            },
        },
    });
    const bucket = new gcp.storage.Bucket("bucket", {
        name: "tf-test-rag-file",
        location: "EUROPE-WEST4",
        uniformBucketLevelAccess: true,
        forceDestroy: true,
    });
    const file = new gcp.storage.BucketObject("file", {
        name: "example.txt",
        bucket: bucket.name,
        content: "Vertex AI RAG Engine lets large language models retrieve information from your own documents.",
    });
    // The RAG Engine service agent is created on first use of RAG Engine, so grant it
    // access after the RagCorpus exists.
    const ragServiceAgent = new gcp.storage.BucketIAMMember("rag_service_agent", {
        bucket: bucket.name,
        role: "roles/storage.objectViewer",
        member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com`),
    }, {
        dependsOn: [ragCorpus],
    });
    const example = new gcp.vertex.AiRagFile("example", {
        region: "europe-west4",
        ragCorpus: ragCorpus.name,
        gcsSource: {
            uris: pulumi.interpolate`gs://${bucket.name}/${file.name}`,
        },
    }, {
        dependsOn: [ragServiceAgent],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    project = gcp.organizations.get_project()
    rag_corpus = gcp.vertex.AiRagCorpus("rag_corpus",
        display_name="rag-corpus-file",
        region="europe-west4",
        vector_db_config={
            "rag_managed_db": {
                "knn": {},
            },
            "rag_embedding_model_config": {
                "vertex_prediction_endpoint": {
                    "endpoint": f"projects/{project.number}/locations/europe-west4/publishers/google/models/text-embedding-005",
                },
            },
        })
    bucket = gcp.storage.Bucket("bucket",
        name="tf-test-rag-file",
        location="EUROPE-WEST4",
        uniform_bucket_level_access=True,
        force_destroy=True)
    file = gcp.storage.BucketObject("file",
        name="example.txt",
        bucket=bucket.name,
        content="Vertex AI RAG Engine lets large language models retrieve information from your own documents.")
    # The RAG Engine service agent is created on first use of RAG Engine, so grant it
    # access after the RagCorpus exists.
    rag_service_agent = gcp.storage.BucketIAMMember("rag_service_agent",
        bucket=bucket.name,
        role="roles/storage.objectViewer",
        member=f"serviceAccount:service-{project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com",
        opts = pulumi.ResourceOptions(depends_on=[rag_corpus]))
    example = gcp.vertex.AiRagFile("example",
        region="europe-west4",
        rag_corpus=rag_corpus.name,
        gcs_source={
            "uris": pulumi.Output.all(
                bucketName=bucket.name,
                fileName=file.name
    ).apply(lambda resolved_outputs: f"gs://{resolved_outputs['bucketName']}/{resolved_outputs['fileName']}")
    ,
        },
        opts = pulumi.ResourceOptions(depends_on=[rag_service_agent]))
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/organizations"
    	"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/storage"
    	"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/vertex"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		ragCorpus, err := vertex.NewAiRagCorpus(ctx, "rag_corpus", &vertex.AiRagCorpusArgs{
    			DisplayName: pulumi.String("rag-corpus-file"),
    			Region:      pulumi.String("europe-west4"),
    			VectorDbConfig: &vertex.AiRagCorpusVectorDbConfigArgs{
    				RagManagedDb: &vertex.AiRagCorpusVectorDbConfigRagManagedDbArgs{
    					Knn: &vertex.AiRagCorpusVectorDbConfigRagManagedDbKnnArgs{},
    				},
    				RagEmbeddingModelConfig: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs{
    					VertexPredictionEndpoint: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs{
    						Endpoint: pulumi.Sprintf("projects/%v/locations/europe-west4/publishers/google/models/text-embedding-005", project.Number),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
    			Name:                     pulumi.String("tf-test-rag-file"),
    			Location:                 pulumi.String("EUROPE-WEST4"),
    			UniformBucketLevelAccess: pulumi.Bool(true),
    			ForceDestroy:             pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		file, err := storage.NewBucketObject(ctx, "file", &storage.BucketObjectArgs{
    			Name:    pulumi.String("example.txt"),
    			Bucket:  bucket.Name,
    			Content: pulumi.String("Vertex AI RAG Engine lets large language models retrieve information from your own documents."),
    		})
    		if err != nil {
    			return err
    		}
    		// The RAG Engine service agent is created on first use of RAG Engine, so grant it
    		// access after the RagCorpus exists.
    		ragServiceAgent, err := storage.NewBucketIAMMember(ctx, "rag_service_agent", &storage.BucketIAMMemberArgs{
    			Bucket: bucket.Name,
    			Role:   pulumi.String("roles/storage.objectViewer"),
    			Member: pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.Number),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			ragCorpus,
    		}))
    		if err != nil {
    			return err
    		}
    		_, err = vertex.NewAiRagFile(ctx, "example", &vertex.AiRagFileArgs{
    			Region:    pulumi.String("europe-west4"),
    			RagCorpus: ragCorpus.Name,
    			GcsSource: &vertex.AiRagFileGcsSourceArgs{
    				Uris: pulumi.All(bucket.Name, file.Name).ApplyT(func(_args []interface{}) (string, error) {
    					bucketName := _args[0].(string)
    					fileName := _args[1].(string)
    					return fmt.Sprintf("gs://%v/%v", bucketName, fileName), nil
    				}).(pulumi.StringOutput),
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			ragServiceAgent,
    		}))
    		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 project = Gcp.Organizations.GetProject.Invoke();
    
        var ragCorpus = new Gcp.Vertex.AiRagCorpus("rag_corpus", new()
        {
            DisplayName = "rag-corpus-file",
            Region = "europe-west4",
            VectorDbConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigArgs
            {
                RagManagedDb = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagManagedDbArgs
                {
                    Knn = null,
                },
                RagEmbeddingModelConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs
                {
                    VertexPredictionEndpoint = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs
                    {
                        Endpoint = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}/locations/europe-west4/publishers/google/models/text-embedding-005",
                    },
                },
            },
        });
    
        var bucket = new Gcp.Storage.Bucket("bucket", new()
        {
            Name = "tf-test-rag-file",
            Location = "EUROPE-WEST4",
            UniformBucketLevelAccess = true,
            ForceDestroy = true,
        });
    
        var file = new Gcp.Storage.BucketObject("file", new()
        {
            Name = "example.txt",
            Bucket = bucket.Name,
            Content = "Vertex AI RAG Engine lets large language models retrieve information from your own documents.",
        });
    
        // The RAG Engine service agent is created on first use of RAG Engine, so grant it
        // access after the RagCorpus exists.
        var ragServiceAgent = new Gcp.Storage.BucketIAMMember("rag_service_agent", new()
        {
            Bucket = bucket.Name,
            Role = "roles/storage.objectViewer",
            Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-vertex-rag.iam.gserviceaccount.com",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                ragCorpus,
            },
        });
    
        var example = new Gcp.Vertex.AiRagFile("example", new()
        {
            Region = "europe-west4",
            RagCorpus = ragCorpus.Name,
            GcsSource = new Gcp.Vertex.Inputs.AiRagFileGcsSourceArgs
            {
                Uris = Output.Tuple(bucket.Name, file.Name).Apply(values =>
                {
                    var bucketName = values.Item1;
                    var fileName = values.Item2;
                    return $"gs://{bucketName}/{fileName}";
                }),
            },
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                ragServiceAgent,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.organizations.OrganizationsFunctions;
    import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
    import com.pulumi.gcp.vertex.AiRagCorpus;
    import com.pulumi.gcp.vertex.AiRagCorpusArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagManagedDbArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagManagedDbKnnArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs;
    import com.pulumi.gcp.storage.Bucket;
    import com.pulumi.gcp.storage.BucketArgs;
    import com.pulumi.gcp.storage.BucketObject;
    import com.pulumi.gcp.storage.BucketObjectArgs;
    import com.pulumi.gcp.storage.BucketIAMMember;
    import com.pulumi.gcp.storage.BucketIAMMemberArgs;
    import com.pulumi.gcp.vertex.AiRagFile;
    import com.pulumi.gcp.vertex.AiRagFileArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagFileGcsSourceArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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) {
            final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
                .build());
    
            var ragCorpus = new AiRagCorpus("ragCorpus", AiRagCorpusArgs.builder()
                .displayName("rag-corpus-file")
                .region("europe-west4")
                .vectorDbConfig(AiRagCorpusVectorDbConfigArgs.builder()
                    .ragManagedDb(AiRagCorpusVectorDbConfigRagManagedDbArgs.builder()
                        .knn(AiRagCorpusVectorDbConfigRagManagedDbKnnArgs.builder()
                            .build())
                        .build())
                    .ragEmbeddingModelConfig(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs.builder()
                        .vertexPredictionEndpoint(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs.builder()
                            .endpoint(String.format("projects/%s/locations/europe-west4/publishers/google/models/text-embedding-005", project.number()))
                            .build())
                        .build())
                    .build())
                .build());
    
            var bucket = new Bucket("bucket", BucketArgs.builder()
                .name("tf-test-rag-file")
                .location("EUROPE-WEST4")
                .uniformBucketLevelAccess(true)
                .forceDestroy(true)
                .build());
    
            var file = new BucketObject("file", BucketObjectArgs.builder()
                .name("example.txt")
                .bucket(bucket.name())
                .content("Vertex AI RAG Engine lets large language models retrieve information from your own documents.")
                .build());
    
            // The RAG Engine service agent is created on first use of RAG Engine, so grant it
            // access after the RagCorpus exists.
            var ragServiceAgent = new BucketIAMMember("ragServiceAgent", BucketIAMMemberArgs.builder()
                .bucket(bucket.name())
                .role("roles/storage.objectViewer")
                .member(String.format("serviceAccount:service-%s@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.number()))
                .build(), CustomResourceOptions.builder()
                    .dependsOn(ragCorpus)
                    .build());
    
            var example = new AiRagFile("example", AiRagFileArgs.builder()
                .region("europe-west4")
                .ragCorpus(ragCorpus.name())
                .gcsSource(AiRagFileGcsSourceArgs.builder()
                    .uris(Output.tuple(bucket.name(), file.name()).applyValue(values -> {
                        var bucketName = values.t1;
                        var fileName = values.t2;
                        return String.format("gs://%s/%s", bucketName,fileName);
                    }))
                    .build())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(ragServiceAgent)
                    .build());
    
        }
    }
    
    resources:
      example:
        type: gcp:vertex:AiRagFile
        properties:
          region: europe-west4
          ragCorpus: ${ragCorpus.name}
          gcsSource:
            uris: gs://${bucket.name}/${file.name}
        options:
          dependsOn:
            - ${ragServiceAgent}
      ragCorpus:
        type: gcp:vertex:AiRagCorpus
        name: rag_corpus
        properties:
          displayName: rag-corpus-file
          region: europe-west4
          vectorDbConfig:
            ragManagedDb:
              knn: {}
            ragEmbeddingModelConfig:
              vertexPredictionEndpoint:
                endpoint: projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005
      bucket:
        type: gcp:storage:Bucket
        properties:
          name: tf-test-rag-file
          location: EUROPE-WEST4
          uniformBucketLevelAccess: true
          forceDestroy: true
      file:
        type: gcp:storage:BucketObject
        properties:
          name: example.txt
          bucket: ${bucket.name}
          content: Vertex AI RAG Engine lets large language models retrieve information from your own documents.
      # The RAG Engine service agent is created on first use of RAG Engine, so grant it
      # access after the RagCorpus exists.
      ragServiceAgent:
        type: gcp:storage:BucketIAMMember
        name: rag_service_agent
        properties:
          bucket: ${bucket.name}
          role: roles/storage.objectViewer
          member: serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com
        options:
          dependsOn:
            - ${ragCorpus}
    variables:
      project:
        fn::invoke:
          function: gcp:organizations:getProject
          arguments: {}
    
    terraform {
      required_providers {
        gcp = {
          source = "pulumi/gcp"
        }
      }
    }
    
    data "gcp_organizations_project" "project" {
    }
    
    resource "gcp_vertex_ai_rag_file" "example" {
      depends_on = [gcp_storage_bucket_i_a_m_member.rag_service_agent]
      lifecycle {
        create_before_destroy = true
      }
      region     = "europe-west4"
      rag_corpus = gcp_vertex_ai_rag_corpus.rag_corpus.name
      gcs_source = {
        uris ="gs://${gcp_storage_bucket.bucket.name}/${gcp_storage_bucket_object.file.name}"
      }
    }
    resource "gcp_vertex_ai_rag_corpus" "rag_corpus" {
      lifecycle {
        create_before_destroy = true
      }
      display_name = "rag-corpus-file"
      region       = "europe-west4"
      vector_db_config = {
        rag_managed_db = {
          knn = {}
        }
        rag_embedding_model_config = {
          vertex_prediction_endpoint = {
            endpoint ="projects/${data.gcp_organizations_project.project.number}/locations/europe-west4/publishers/google/models/text-embedding-005"
          }
        }
      }
    }
    resource "gcp_storage_bucket" "bucket" {
      lifecycle {
        create_before_destroy = true
      }
      name                        = "tf-test-rag-file"
      location                    = "EUROPE-WEST4"
      uniform_bucket_level_access = true
      force_destroy               = true
    }
    resource "gcp_storage_bucket_object" "file" {
      lifecycle {
        create_before_destroy = true
      }
      name    = "example.txt"
      bucket  = gcp_storage_bucket.bucket.name
      content = "Vertex AI RAG Engine lets large language models retrieve information from your own documents."
    }
    # The RAG Engine service agent is created on first use of RAG Engine, so grant it
    # access after the RagCorpus exists.
    resource "gcp_storage_bucket_i_a_m_member" "rag_service_agent" {
      depends_on = [gcp_vertex_ai_rag_corpus.rag_corpus]
      lifecycle {
        create_before_destroy = true
      }
      bucket = gcp_storage_bucket.bucket.name
      role   = "roles/storage.objectViewer"
      member ="serviceAccount:service-${data.gcp_organizations_project.project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com"
    }
    

    Vertex Ai Rag File Full

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const project = gcp.organizations.getProject({});
    const ragCorpus = new gcp.vertex.AiRagCorpus("rag_corpus", {
        displayName: "rag-corpus-file-full",
        region: "europe-west4",
        vectorDbConfig: {
            ragManagedDb: {
                knn: {},
            },
            ragEmbeddingModelConfig: {
                vertexPredictionEndpoint: {
                    endpoint: project.then(project => `projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005`),
                },
            },
        },
    });
    const bucket = new gcp.storage.Bucket("bucket", {
        name: "tf-test-rag-file-full",
        location: "EUROPE-WEST4",
        uniformBucketLevelAccess: true,
        forceDestroy: true,
    });
    const file = new gcp.storage.BucketObject("file", {
        name: "example.txt",
        bucket: bucket.name,
        content: "Vertex AI RAG Engine lets large language models retrieve information from your own documents.",
    });
    // The RAG Engine service agent is created on first use of RAG Engine, so grant it
    // access after the RagCorpus exists.
    const ragServiceAgent = new gcp.storage.BucketIAMMember("rag_service_agent", {
        bucket: bucket.name,
        role: "roles/storage.objectViewer",
        member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com`),
    }, {
        dependsOn: [ragCorpus],
    });
    const example = new gcp.vertex.AiRagFile("example", {
        region: "europe-west4",
        ragCorpus: ragCorpus.name,
        gcsSource: {
            uris: pulumi.interpolate`gs://${bucket.name}/${file.name}`,
        },
        ragFileParsingConfig: {
            llmParser: {
                modelName: project.then(project => `projects/${project.projectId}/locations/europe-west4/publishers/google/models/gemini-2.5-flash`),
                maxParsingRequestsPerMin: 100,
                customParsingPrompt: "Extract the text content of the document.",
            },
        },
        ragFileTransformationConfig: {
            ragFileChunkingConfig: {
                fixedLengthChunking: {
                    chunkSize: 512,
                    chunkOverlap: 100,
                },
            },
        },
        maxEmbeddingRequestsPerMin: 500,
    }, {
        dependsOn: [ragServiceAgent],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    project = gcp.organizations.get_project()
    rag_corpus = gcp.vertex.AiRagCorpus("rag_corpus",
        display_name="rag-corpus-file-full",
        region="europe-west4",
        vector_db_config={
            "rag_managed_db": {
                "knn": {},
            },
            "rag_embedding_model_config": {
                "vertex_prediction_endpoint": {
                    "endpoint": f"projects/{project.number}/locations/europe-west4/publishers/google/models/text-embedding-005",
                },
            },
        })
    bucket = gcp.storage.Bucket("bucket",
        name="tf-test-rag-file-full",
        location="EUROPE-WEST4",
        uniform_bucket_level_access=True,
        force_destroy=True)
    file = gcp.storage.BucketObject("file",
        name="example.txt",
        bucket=bucket.name,
        content="Vertex AI RAG Engine lets large language models retrieve information from your own documents.")
    # The RAG Engine service agent is created on first use of RAG Engine, so grant it
    # access after the RagCorpus exists.
    rag_service_agent = gcp.storage.BucketIAMMember("rag_service_agent",
        bucket=bucket.name,
        role="roles/storage.objectViewer",
        member=f"serviceAccount:service-{project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com",
        opts = pulumi.ResourceOptions(depends_on=[rag_corpus]))
    example = gcp.vertex.AiRagFile("example",
        region="europe-west4",
        rag_corpus=rag_corpus.name,
        gcs_source={
            "uris": pulumi.Output.all(
                bucketName=bucket.name,
                fileName=file.name
    ).apply(lambda resolved_outputs: f"gs://{resolved_outputs['bucketName']}/{resolved_outputs['fileName']}")
    ,
        },
        rag_file_parsing_config={
            "llm_parser": {
                "model_name": f"projects/{project.project_id}/locations/europe-west4/publishers/google/models/gemini-2.5-flash",
                "max_parsing_requests_per_min": 100,
                "custom_parsing_prompt": "Extract the text content of the document.",
            },
        },
        rag_file_transformation_config={
            "rag_file_chunking_config": {
                "fixed_length_chunking": {
                    "chunk_size": 512,
                    "chunk_overlap": 100,
                },
            },
        },
        max_embedding_requests_per_min=500,
        opts = pulumi.ResourceOptions(depends_on=[rag_service_agent]))
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/organizations"
    	"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/storage"
    	"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/vertex"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		ragCorpus, err := vertex.NewAiRagCorpus(ctx, "rag_corpus", &vertex.AiRagCorpusArgs{
    			DisplayName: pulumi.String("rag-corpus-file-full"),
    			Region:      pulumi.String("europe-west4"),
    			VectorDbConfig: &vertex.AiRagCorpusVectorDbConfigArgs{
    				RagManagedDb: &vertex.AiRagCorpusVectorDbConfigRagManagedDbArgs{
    					Knn: &vertex.AiRagCorpusVectorDbConfigRagManagedDbKnnArgs{},
    				},
    				RagEmbeddingModelConfig: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs{
    					VertexPredictionEndpoint: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs{
    						Endpoint: pulumi.Sprintf("projects/%v/locations/europe-west4/publishers/google/models/text-embedding-005", project.Number),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
    			Name:                     pulumi.String("tf-test-rag-file-full"),
    			Location:                 pulumi.String("EUROPE-WEST4"),
    			UniformBucketLevelAccess: pulumi.Bool(true),
    			ForceDestroy:             pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		file, err := storage.NewBucketObject(ctx, "file", &storage.BucketObjectArgs{
    			Name:    pulumi.String("example.txt"),
    			Bucket:  bucket.Name,
    			Content: pulumi.String("Vertex AI RAG Engine lets large language models retrieve information from your own documents."),
    		})
    		if err != nil {
    			return err
    		}
    		// The RAG Engine service agent is created on first use of RAG Engine, so grant it
    		// access after the RagCorpus exists.
    		ragServiceAgent, err := storage.NewBucketIAMMember(ctx, "rag_service_agent", &storage.BucketIAMMemberArgs{
    			Bucket: bucket.Name,
    			Role:   pulumi.String("roles/storage.objectViewer"),
    			Member: pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.Number),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			ragCorpus,
    		}))
    		if err != nil {
    			return err
    		}
    		_, err = vertex.NewAiRagFile(ctx, "example", &vertex.AiRagFileArgs{
    			Region:    pulumi.String("europe-west4"),
    			RagCorpus: ragCorpus.Name,
    			GcsSource: &vertex.AiRagFileGcsSourceArgs{
    				Uris: pulumi.All(bucket.Name, file.Name).ApplyT(func(_args []interface{}) (string, error) {
    					bucketName := _args[0].(string)
    					fileName := _args[1].(string)
    					return fmt.Sprintf("gs://%v/%v", bucketName, fileName), nil
    				}).(pulumi.StringOutput),
    			},
    			RagFileParsingConfig: &vertex.AiRagFileRagFileParsingConfigArgs{
    				LlmParser: &vertex.AiRagFileRagFileParsingConfigLlmParserArgs{
    					ModelName:                pulumi.Sprintf("projects/%v/locations/europe-west4/publishers/google/models/gemini-2.5-flash", project.ProjectId),
    					MaxParsingRequestsPerMin: pulumi.Int(100),
    					CustomParsingPrompt:      pulumi.String("Extract the text content of the document."),
    				},
    			},
    			RagFileTransformationConfig: &vertex.AiRagFileRagFileTransformationConfigArgs{
    				RagFileChunkingConfig: &vertex.AiRagFileRagFileTransformationConfigRagFileChunkingConfigArgs{
    					FixedLengthChunking: &vertex.AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunkingArgs{
    						ChunkSize:    pulumi.Int(512),
    						ChunkOverlap: pulumi.Int(100),
    					},
    				},
    			},
    			MaxEmbeddingRequestsPerMin: pulumi.Int(500),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			ragServiceAgent,
    		}))
    		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 project = Gcp.Organizations.GetProject.Invoke();
    
        var ragCorpus = new Gcp.Vertex.AiRagCorpus("rag_corpus", new()
        {
            DisplayName = "rag-corpus-file-full",
            Region = "europe-west4",
            VectorDbConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigArgs
            {
                RagManagedDb = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagManagedDbArgs
                {
                    Knn = null,
                },
                RagEmbeddingModelConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs
                {
                    VertexPredictionEndpoint = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs
                    {
                        Endpoint = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}/locations/europe-west4/publishers/google/models/text-embedding-005",
                    },
                },
            },
        });
    
        var bucket = new Gcp.Storage.Bucket("bucket", new()
        {
            Name = "tf-test-rag-file-full",
            Location = "EUROPE-WEST4",
            UniformBucketLevelAccess = true,
            ForceDestroy = true,
        });
    
        var file = new Gcp.Storage.BucketObject("file", new()
        {
            Name = "example.txt",
            Bucket = bucket.Name,
            Content = "Vertex AI RAG Engine lets large language models retrieve information from your own documents.",
        });
    
        // The RAG Engine service agent is created on first use of RAG Engine, so grant it
        // access after the RagCorpus exists.
        var ragServiceAgent = new Gcp.Storage.BucketIAMMember("rag_service_agent", new()
        {
            Bucket = bucket.Name,
            Role = "roles/storage.objectViewer",
            Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-vertex-rag.iam.gserviceaccount.com",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                ragCorpus,
            },
        });
    
        var example = new Gcp.Vertex.AiRagFile("example", new()
        {
            Region = "europe-west4",
            RagCorpus = ragCorpus.Name,
            GcsSource = new Gcp.Vertex.Inputs.AiRagFileGcsSourceArgs
            {
                Uris = Output.Tuple(bucket.Name, file.Name).Apply(values =>
                {
                    var bucketName = values.Item1;
                    var fileName = values.Item2;
                    return $"gs://{bucketName}/{fileName}";
                }),
            },
            RagFileParsingConfig = new Gcp.Vertex.Inputs.AiRagFileRagFileParsingConfigArgs
            {
                LlmParser = new Gcp.Vertex.Inputs.AiRagFileRagFileParsingConfigLlmParserArgs
                {
                    ModelName = $"projects/{project.Apply(getProjectResult => getProjectResult.ProjectId)}/locations/europe-west4/publishers/google/models/gemini-2.5-flash",
                    MaxParsingRequestsPerMin = 100,
                    CustomParsingPrompt = "Extract the text content of the document.",
                },
            },
            RagFileTransformationConfig = new Gcp.Vertex.Inputs.AiRagFileRagFileTransformationConfigArgs
            {
                RagFileChunkingConfig = new Gcp.Vertex.Inputs.AiRagFileRagFileTransformationConfigRagFileChunkingConfigArgs
                {
                    FixedLengthChunking = new Gcp.Vertex.Inputs.AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunkingArgs
                    {
                        ChunkSize = 512,
                        ChunkOverlap = 100,
                    },
                },
            },
            MaxEmbeddingRequestsPerMin = 500,
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                ragServiceAgent,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.organizations.OrganizationsFunctions;
    import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
    import com.pulumi.gcp.vertex.AiRagCorpus;
    import com.pulumi.gcp.vertex.AiRagCorpusArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagManagedDbArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagManagedDbKnnArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs;
    import com.pulumi.gcp.storage.Bucket;
    import com.pulumi.gcp.storage.BucketArgs;
    import com.pulumi.gcp.storage.BucketObject;
    import com.pulumi.gcp.storage.BucketObjectArgs;
    import com.pulumi.gcp.storage.BucketIAMMember;
    import com.pulumi.gcp.storage.BucketIAMMemberArgs;
    import com.pulumi.gcp.vertex.AiRagFile;
    import com.pulumi.gcp.vertex.AiRagFileArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagFileGcsSourceArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagFileRagFileParsingConfigArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagFileRagFileParsingConfigLlmParserArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagFileRagFileTransformationConfigArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagFileRagFileTransformationConfigRagFileChunkingConfigArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunkingArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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) {
            final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
                .build());
    
            var ragCorpus = new AiRagCorpus("ragCorpus", AiRagCorpusArgs.builder()
                .displayName("rag-corpus-file-full")
                .region("europe-west4")
                .vectorDbConfig(AiRagCorpusVectorDbConfigArgs.builder()
                    .ragManagedDb(AiRagCorpusVectorDbConfigRagManagedDbArgs.builder()
                        .knn(AiRagCorpusVectorDbConfigRagManagedDbKnnArgs.builder()
                            .build())
                        .build())
                    .ragEmbeddingModelConfig(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs.builder()
                        .vertexPredictionEndpoint(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs.builder()
                            .endpoint(String.format("projects/%s/locations/europe-west4/publishers/google/models/text-embedding-005", project.number()))
                            .build())
                        .build())
                    .build())
                .build());
    
            var bucket = new Bucket("bucket", BucketArgs.builder()
                .name("tf-test-rag-file-full")
                .location("EUROPE-WEST4")
                .uniformBucketLevelAccess(true)
                .forceDestroy(true)
                .build());
    
            var file = new BucketObject("file", BucketObjectArgs.builder()
                .name("example.txt")
                .bucket(bucket.name())
                .content("Vertex AI RAG Engine lets large language models retrieve information from your own documents.")
                .build());
    
            // The RAG Engine service agent is created on first use of RAG Engine, so grant it
            // access after the RagCorpus exists.
            var ragServiceAgent = new BucketIAMMember("ragServiceAgent", BucketIAMMemberArgs.builder()
                .bucket(bucket.name())
                .role("roles/storage.objectViewer")
                .member(String.format("serviceAccount:service-%s@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.number()))
                .build(), CustomResourceOptions.builder()
                    .dependsOn(ragCorpus)
                    .build());
    
            var example = new AiRagFile("example", AiRagFileArgs.builder()
                .region("europe-west4")
                .ragCorpus(ragCorpus.name())
                .gcsSource(AiRagFileGcsSourceArgs.builder()
                    .uris(Output.tuple(bucket.name(), file.name()).applyValue(values -> {
                        var bucketName = values.t1;
                        var fileName = values.t2;
                        return String.format("gs://%s/%s", bucketName,fileName);
                    }))
                    .build())
                .ragFileParsingConfig(AiRagFileRagFileParsingConfigArgs.builder()
                    .llmParser(AiRagFileRagFileParsingConfigLlmParserArgs.builder()
                        .modelName(String.format("projects/%s/locations/europe-west4/publishers/google/models/gemini-2.5-flash", project.projectId()))
                        .maxParsingRequestsPerMin(100)
                        .customParsingPrompt("Extract the text content of the document.")
                        .build())
                    .build())
                .ragFileTransformationConfig(AiRagFileRagFileTransformationConfigArgs.builder()
                    .ragFileChunkingConfig(AiRagFileRagFileTransformationConfigRagFileChunkingConfigArgs.builder()
                        .fixedLengthChunking(AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunkingArgs.builder()
                            .chunkSize(512)
                            .chunkOverlap(100)
                            .build())
                        .build())
                    .build())
                .maxEmbeddingRequestsPerMin(500)
                .build(), CustomResourceOptions.builder()
                    .dependsOn(ragServiceAgent)
                    .build());
    
        }
    }
    
    resources:
      example:
        type: gcp:vertex:AiRagFile
        properties:
          region: europe-west4
          ragCorpus: ${ragCorpus.name}
          gcsSource:
            uris: gs://${bucket.name}/${file.name}
          ragFileParsingConfig:
            llmParser:
              modelName: projects/${project.projectId}/locations/europe-west4/publishers/google/models/gemini-2.5-flash
              maxParsingRequestsPerMin: 100
              customParsingPrompt: Extract the text content of the document.
          ragFileTransformationConfig:
            ragFileChunkingConfig:
              fixedLengthChunking:
                chunkSize: 512
                chunkOverlap: 100
          maxEmbeddingRequestsPerMin: 500
        options:
          dependsOn:
            - ${ragServiceAgent}
      ragCorpus:
        type: gcp:vertex:AiRagCorpus
        name: rag_corpus
        properties:
          displayName: rag-corpus-file-full
          region: europe-west4
          vectorDbConfig:
            ragManagedDb:
              knn: {}
            ragEmbeddingModelConfig:
              vertexPredictionEndpoint:
                endpoint: projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005
      bucket:
        type: gcp:storage:Bucket
        properties:
          name: tf-test-rag-file-full
          location: EUROPE-WEST4
          uniformBucketLevelAccess: true
          forceDestroy: true
      file:
        type: gcp:storage:BucketObject
        properties:
          name: example.txt
          bucket: ${bucket.name}
          content: Vertex AI RAG Engine lets large language models retrieve information from your own documents.
      # The RAG Engine service agent is created on first use of RAG Engine, so grant it
      # access after the RagCorpus exists.
      ragServiceAgent:
        type: gcp:storage:BucketIAMMember
        name: rag_service_agent
        properties:
          bucket: ${bucket.name}
          role: roles/storage.objectViewer
          member: serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com
        options:
          dependsOn:
            - ${ragCorpus}
    variables:
      project:
        fn::invoke:
          function: gcp:organizations:getProject
          arguments: {}
    
    terraform {
      required_providers {
        gcp = {
          source = "pulumi/gcp"
        }
      }
    }
    
    data "gcp_organizations_project" "project" {
    }
    
    resource "gcp_vertex_ai_rag_file" "example" {
      depends_on = [gcp_storage_bucket_i_a_m_member.rag_service_agent]
      lifecycle {
        create_before_destroy = true
      }
      region     = "europe-west4"
      rag_corpus = gcp_vertex_ai_rag_corpus.rag_corpus.name
      gcs_source = {
        uris ="gs://${gcp_storage_bucket.bucket.name}/${gcp_storage_bucket_object.file.name}"
      }
      rag_file_parsing_config = {
        llm_parser = {
          model_name                   ="projects/${data.gcp_organizations_project.project.project_id}/locations/europe-west4/publishers/google/models/gemini-2.5-flash"
          max_parsing_requests_per_min = 100
          custom_parsing_prompt        = "Extract the text content of the document."
        }
      }
      rag_file_transformation_config = {
        rag_file_chunking_config = {
          fixed_length_chunking = {
            chunk_size    = 512
            chunk_overlap = 100
          }
        }
      }
      max_embedding_requests_per_min = 500
    }
    resource "gcp_vertex_ai_rag_corpus" "rag_corpus" {
      lifecycle {
        create_before_destroy = true
      }
      display_name = "rag-corpus-file-full"
      region       = "europe-west4"
      vector_db_config = {
        rag_managed_db = {
          knn = {}
        }
        rag_embedding_model_config = {
          vertex_prediction_endpoint = {
            endpoint ="projects/${data.gcp_organizations_project.project.number}/locations/europe-west4/publishers/google/models/text-embedding-005"
          }
        }
      }
    }
    resource "gcp_storage_bucket" "bucket" {
      lifecycle {
        create_before_destroy = true
      }
      name                        = "tf-test-rag-file-full"
      location                    = "EUROPE-WEST4"
      uniform_bucket_level_access = true
      force_destroy               = true
    }
    resource "gcp_storage_bucket_object" "file" {
      lifecycle {
        create_before_destroy = true
      }
      name    = "example.txt"
      bucket  = gcp_storage_bucket.bucket.name
      content = "Vertex AI RAG Engine lets large language models retrieve information from your own documents."
    }
    # The RAG Engine service agent is created on first use of RAG Engine, so grant it
    # access after the RagCorpus exists.
    resource "gcp_storage_bucket_i_a_m_member" "rag_service_agent" {
      depends_on = [gcp_vertex_ai_rag_corpus.rag_corpus]
      lifecycle {
        create_before_destroy = true
      }
      bucket = gcp_storage_bucket.bucket.name
      role   = "roles/storage.objectViewer"
      member ="serviceAccount:service-${data.gcp_organizations_project.project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com"
    }
    

    Vertex Ai Rag File Layout Parser

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const layoutParser = new gcp.essentialcontacts.DocumentAiProcessor("layout_parser", {
        location: "eu",
        displayName: "rag-layout-parser",
        type: "LAYOUT_PARSER_PROCESSOR",
    });
    const project = gcp.organizations.getProject({});
    const ragCorpus = new gcp.vertex.AiRagCorpus("rag_corpus", {
        displayName: "rag-corpus-file-layout",
        region: "europe-west4",
        vectorDbConfig: {
            ragManagedDb: {
                knn: {},
            },
            ragEmbeddingModelConfig: {
                vertexPredictionEndpoint: {
                    endpoint: project.then(project => `projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005`),
                },
            },
        },
    });
    const bucket = new gcp.storage.Bucket("bucket", {
        name: "tf-test-rag-file-layout",
        location: "EUROPE-WEST4",
        uniformBucketLevelAccess: true,
        forceDestroy: true,
    });
    const file = new gcp.storage.BucketObject("file", {
        name: "example.html",
        bucket: bucket.name,
        contentType: "text/html",
        content: "<html><body><h1>Vertex AI RAG Engine</h1><p>RAG Engine lets large language models retrieve information from your own documents.</p></body></html>",
    });
    // The RAG Engine service agent is created on first use of RAG Engine, so grant it
    // access after the RagCorpus exists.
    const ragServiceAgent = new gcp.storage.BucketIAMMember("rag_service_agent", {
        bucket: bucket.name,
        role: "roles/storage.objectViewer",
        member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com`),
    }, {
        dependsOn: [ragCorpus],
    });
    const ragServiceAgentDocumentAi = new gcp.projects.IAMMember("rag_service_agent_document_ai", {
        project: project.then(project => project.projectId),
        role: "roles/documentai.apiUser",
        member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com`),
    }, {
        dependsOn: [ragCorpus],
    });
    const example = new gcp.vertex.AiRagFile("example", {
        region: "europe-west4",
        ragCorpus: ragCorpus.name,
        gcsSource: {
            uris: pulumi.interpolate`gs://${bucket.name}/${file.name}`,
        },
        ragFileParsingConfig: {
            layoutParser: {
                processorName: layoutParser.id,
                maxParsingRequestsPerMin: 100,
            },
        },
    }, {
        dependsOn: [
            ragServiceAgent,
            ragServiceAgentDocumentAi,
        ],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    layout_parser = gcp.essentialcontacts.DocumentAiProcessor("layout_parser",
        location="eu",
        display_name="rag-layout-parser",
        type="LAYOUT_PARSER_PROCESSOR")
    project = gcp.organizations.get_project()
    rag_corpus = gcp.vertex.AiRagCorpus("rag_corpus",
        display_name="rag-corpus-file-layout",
        region="europe-west4",
        vector_db_config={
            "rag_managed_db": {
                "knn": {},
            },
            "rag_embedding_model_config": {
                "vertex_prediction_endpoint": {
                    "endpoint": f"projects/{project.number}/locations/europe-west4/publishers/google/models/text-embedding-005",
                },
            },
        })
    bucket = gcp.storage.Bucket("bucket",
        name="tf-test-rag-file-layout",
        location="EUROPE-WEST4",
        uniform_bucket_level_access=True,
        force_destroy=True)
    file = gcp.storage.BucketObject("file",
        name="example.html",
        bucket=bucket.name,
        content_type="text/html",
        content="<html><body><h1>Vertex AI RAG Engine</h1><p>RAG Engine lets large language models retrieve information from your own documents.</p></body></html>")
    # The RAG Engine service agent is created on first use of RAG Engine, so grant it
    # access after the RagCorpus exists.
    rag_service_agent = gcp.storage.BucketIAMMember("rag_service_agent",
        bucket=bucket.name,
        role="roles/storage.objectViewer",
        member=f"serviceAccount:service-{project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com",
        opts = pulumi.ResourceOptions(depends_on=[rag_corpus]))
    rag_service_agent_document_ai = gcp.projects.IAMMember("rag_service_agent_document_ai",
        project=project.project_id,
        role="roles/documentai.apiUser",
        member=f"serviceAccount:service-{project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com",
        opts = pulumi.ResourceOptions(depends_on=[rag_corpus]))
    example = gcp.vertex.AiRagFile("example",
        region="europe-west4",
        rag_corpus=rag_corpus.name,
        gcs_source={
            "uris": pulumi.Output.all(
                bucketName=bucket.name,
                fileName=file.name
    ).apply(lambda resolved_outputs: f"gs://{resolved_outputs['bucketName']}/{resolved_outputs['fileName']}")
    ,
        },
        rag_file_parsing_config={
            "layout_parser": {
                "processor_name": layout_parser.id,
                "max_parsing_requests_per_min": 100,
            },
        },
        opts = pulumi.ResourceOptions(depends_on=[
                rag_service_agent,
                rag_service_agent_document_ai,
            ]))
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/essentialcontacts"
    	"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/organizations"
    	"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/projects"
    	"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/storage"
    	"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/vertex"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		layoutParser, err := essentialcontacts.NewDocumentAiProcessor(ctx, "layout_parser", &essentialcontacts.DocumentAiProcessorArgs{
    			Location:    pulumi.String("eu"),
    			DisplayName: pulumi.String("rag-layout-parser"),
    			Type:        pulumi.String("LAYOUT_PARSER_PROCESSOR"),
    		})
    		if err != nil {
    			return err
    		}
    		project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		ragCorpus, err := vertex.NewAiRagCorpus(ctx, "rag_corpus", &vertex.AiRagCorpusArgs{
    			DisplayName: pulumi.String("rag-corpus-file-layout"),
    			Region:      pulumi.String("europe-west4"),
    			VectorDbConfig: &vertex.AiRagCorpusVectorDbConfigArgs{
    				RagManagedDb: &vertex.AiRagCorpusVectorDbConfigRagManagedDbArgs{
    					Knn: &vertex.AiRagCorpusVectorDbConfigRagManagedDbKnnArgs{},
    				},
    				RagEmbeddingModelConfig: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs{
    					VertexPredictionEndpoint: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs{
    						Endpoint: pulumi.Sprintf("projects/%v/locations/europe-west4/publishers/google/models/text-embedding-005", project.Number),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
    			Name:                     pulumi.String("tf-test-rag-file-layout"),
    			Location:                 pulumi.String("EUROPE-WEST4"),
    			UniformBucketLevelAccess: pulumi.Bool(true),
    			ForceDestroy:             pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		file, err := storage.NewBucketObject(ctx, "file", &storage.BucketObjectArgs{
    			Name:        pulumi.String("example.html"),
    			Bucket:      bucket.Name,
    			ContentType: pulumi.String("text/html"),
    			Content:     pulumi.String("<html><body><h1>Vertex AI RAG Engine</h1><p>RAG Engine lets large language models retrieve information from your own documents.</p></body></html>"),
    		})
    		if err != nil {
    			return err
    		}
    		// The RAG Engine service agent is created on first use of RAG Engine, so grant it
    		// access after the RagCorpus exists.
    		ragServiceAgent, err := storage.NewBucketIAMMember(ctx, "rag_service_agent", &storage.BucketIAMMemberArgs{
    			Bucket: bucket.Name,
    			Role:   pulumi.String("roles/storage.objectViewer"),
    			Member: pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.Number),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			ragCorpus,
    		}))
    		if err != nil {
    			return err
    		}
    		ragServiceAgentDocumentAi, err := projects.NewIAMMember(ctx, "rag_service_agent_document_ai", &projects.IAMMemberArgs{
    			Project: pulumi.String(project.ProjectId),
    			Role:    pulumi.String("roles/documentai.apiUser"),
    			Member:  pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.Number),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			ragCorpus,
    		}))
    		if err != nil {
    			return err
    		}
    		_, err = vertex.NewAiRagFile(ctx, "example", &vertex.AiRagFileArgs{
    			Region:    pulumi.String("europe-west4"),
    			RagCorpus: ragCorpus.Name,
    			GcsSource: &vertex.AiRagFileGcsSourceArgs{
    				Uris: pulumi.All(bucket.Name, file.Name).ApplyT(func(_args []interface{}) (string, error) {
    					bucketName := _args[0].(string)
    					fileName := _args[1].(string)
    					return fmt.Sprintf("gs://%v/%v", bucketName, fileName), nil
    				}).(pulumi.StringOutput),
    			},
    			RagFileParsingConfig: &vertex.AiRagFileRagFileParsingConfigArgs{
    				LayoutParser: &vertex.AiRagFileRagFileParsingConfigLayoutParserArgs{
    					ProcessorName:            layoutParser.ID(),
    					MaxParsingRequestsPerMin: pulumi.Int(100),
    				},
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			ragServiceAgent,
    			ragServiceAgentDocumentAi,
    		}))
    		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 layoutParser = new Gcp.EssentialContacts.DocumentAiProcessor("layout_parser", new()
        {
            Location = "eu",
            DisplayName = "rag-layout-parser",
            Type = "LAYOUT_PARSER_PROCESSOR",
        });
    
        var project = Gcp.Organizations.GetProject.Invoke();
    
        var ragCorpus = new Gcp.Vertex.AiRagCorpus("rag_corpus", new()
        {
            DisplayName = "rag-corpus-file-layout",
            Region = "europe-west4",
            VectorDbConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigArgs
            {
                RagManagedDb = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagManagedDbArgs
                {
                    Knn = null,
                },
                RagEmbeddingModelConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs
                {
                    VertexPredictionEndpoint = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs
                    {
                        Endpoint = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}/locations/europe-west4/publishers/google/models/text-embedding-005",
                    },
                },
            },
        });
    
        var bucket = new Gcp.Storage.Bucket("bucket", new()
        {
            Name = "tf-test-rag-file-layout",
            Location = "EUROPE-WEST4",
            UniformBucketLevelAccess = true,
            ForceDestroy = true,
        });
    
        var file = new Gcp.Storage.BucketObject("file", new()
        {
            Name = "example.html",
            Bucket = bucket.Name,
            ContentType = "text/html",
            Content = "<html><body><h1>Vertex AI RAG Engine</h1><p>RAG Engine lets large language models retrieve information from your own documents.</p></body></html>",
        });
    
        // The RAG Engine service agent is created on first use of RAG Engine, so grant it
        // access after the RagCorpus exists.
        var ragServiceAgent = new Gcp.Storage.BucketIAMMember("rag_service_agent", new()
        {
            Bucket = bucket.Name,
            Role = "roles/storage.objectViewer",
            Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-vertex-rag.iam.gserviceaccount.com",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                ragCorpus,
            },
        });
    
        var ragServiceAgentDocumentAi = new Gcp.Projects.IAMMember("rag_service_agent_document_ai", new()
        {
            Project = project.Apply(getProjectResult => getProjectResult.ProjectId),
            Role = "roles/documentai.apiUser",
            Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-vertex-rag.iam.gserviceaccount.com",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                ragCorpus,
            },
        });
    
        var example = new Gcp.Vertex.AiRagFile("example", new()
        {
            Region = "europe-west4",
            RagCorpus = ragCorpus.Name,
            GcsSource = new Gcp.Vertex.Inputs.AiRagFileGcsSourceArgs
            {
                Uris = Output.Tuple(bucket.Name, file.Name).Apply(values =>
                {
                    var bucketName = values.Item1;
                    var fileName = values.Item2;
                    return $"gs://{bucketName}/{fileName}";
                }),
            },
            RagFileParsingConfig = new Gcp.Vertex.Inputs.AiRagFileRagFileParsingConfigArgs
            {
                LayoutParser = new Gcp.Vertex.Inputs.AiRagFileRagFileParsingConfigLayoutParserArgs
                {
                    ProcessorName = layoutParser.Id,
                    MaxParsingRequestsPerMin = 100,
                },
            },
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                ragServiceAgent,
                ragServiceAgentDocumentAi,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.essentialcontacts.DocumentAiProcessor;
    import com.pulumi.gcp.essentialcontacts.DocumentAiProcessorArgs;
    import com.pulumi.gcp.organizations.OrganizationsFunctions;
    import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
    import com.pulumi.gcp.vertex.AiRagCorpus;
    import com.pulumi.gcp.vertex.AiRagCorpusArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagManagedDbArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagManagedDbKnnArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs;
    import com.pulumi.gcp.storage.Bucket;
    import com.pulumi.gcp.storage.BucketArgs;
    import com.pulumi.gcp.storage.BucketObject;
    import com.pulumi.gcp.storage.BucketObjectArgs;
    import com.pulumi.gcp.storage.BucketIAMMember;
    import com.pulumi.gcp.storage.BucketIAMMemberArgs;
    import com.pulumi.gcp.projects.IAMMember;
    import com.pulumi.gcp.projects.IAMMemberArgs;
    import com.pulumi.gcp.vertex.AiRagFile;
    import com.pulumi.gcp.vertex.AiRagFileArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagFileGcsSourceArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagFileRagFileParsingConfigArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagFileRagFileParsingConfigLayoutParserArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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) {
            var layoutParser = new DocumentAiProcessor("layoutParser", DocumentAiProcessorArgs.builder()
                .location("eu")
                .displayName("rag-layout-parser")
                .type("LAYOUT_PARSER_PROCESSOR")
                .build());
    
            final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
                .build());
    
            var ragCorpus = new AiRagCorpus("ragCorpus", AiRagCorpusArgs.builder()
                .displayName("rag-corpus-file-layout")
                .region("europe-west4")
                .vectorDbConfig(AiRagCorpusVectorDbConfigArgs.builder()
                    .ragManagedDb(AiRagCorpusVectorDbConfigRagManagedDbArgs.builder()
                        .knn(AiRagCorpusVectorDbConfigRagManagedDbKnnArgs.builder()
                            .build())
                        .build())
                    .ragEmbeddingModelConfig(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs.builder()
                        .vertexPredictionEndpoint(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs.builder()
                            .endpoint(String.format("projects/%s/locations/europe-west4/publishers/google/models/text-embedding-005", project.number()))
                            .build())
                        .build())
                    .build())
                .build());
    
            var bucket = new Bucket("bucket", BucketArgs.builder()
                .name("tf-test-rag-file-layout")
                .location("EUROPE-WEST4")
                .uniformBucketLevelAccess(true)
                .forceDestroy(true)
                .build());
    
            var file = new BucketObject("file", BucketObjectArgs.builder()
                .name("example.html")
                .bucket(bucket.name())
                .contentType("text/html")
                .content("<html><body><h1>Vertex AI RAG Engine</h1><p>RAG Engine lets large language models retrieve information from your own documents.</p></body></html>")
                .build());
    
            // The RAG Engine service agent is created on first use of RAG Engine, so grant it
            // access after the RagCorpus exists.
            var ragServiceAgent = new BucketIAMMember("ragServiceAgent", BucketIAMMemberArgs.builder()
                .bucket(bucket.name())
                .role("roles/storage.objectViewer")
                .member(String.format("serviceAccount:service-%s@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.number()))
                .build(), CustomResourceOptions.builder()
                    .dependsOn(ragCorpus)
                    .build());
    
            var ragServiceAgentDocumentAi = new IAMMember("ragServiceAgentDocumentAi", IAMMemberArgs.builder()
                .project(project.projectId())
                .role("roles/documentai.apiUser")
                .member(String.format("serviceAccount:service-%s@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.number()))
                .build(), CustomResourceOptions.builder()
                    .dependsOn(ragCorpus)
                    .build());
    
            var example = new AiRagFile("example", AiRagFileArgs.builder()
                .region("europe-west4")
                .ragCorpus(ragCorpus.name())
                .gcsSource(AiRagFileGcsSourceArgs.builder()
                    .uris(Output.tuple(bucket.name(), file.name()).applyValue(values -> {
                        var bucketName = values.t1;
                        var fileName = values.t2;
                        return String.format("gs://%s/%s", bucketName,fileName);
                    }))
                    .build())
                .ragFileParsingConfig(AiRagFileRagFileParsingConfigArgs.builder()
                    .layoutParser(AiRagFileRagFileParsingConfigLayoutParserArgs.builder()
                        .processorName(layoutParser.id())
                        .maxParsingRequestsPerMin(100)
                        .build())
                    .build())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(                
                        ragServiceAgent,
                        ragServiceAgentDocumentAi)
                    .build());
    
        }
    }
    
    resources:
      example:
        type: gcp:vertex:AiRagFile
        properties:
          region: europe-west4
          ragCorpus: ${ragCorpus.name}
          gcsSource:
            uris: gs://${bucket.name}/${file.name}
          ragFileParsingConfig:
            layoutParser:
              processorName: ${layoutParser.id}
              maxParsingRequestsPerMin: 100
        options:
          dependsOn:
            - ${ragServiceAgent}
            - ${ragServiceAgentDocumentAi}
      layoutParser:
        type: gcp:essentialcontacts:DocumentAiProcessor
        name: layout_parser
        properties:
          location: eu
          displayName: rag-layout-parser
          type: LAYOUT_PARSER_PROCESSOR
      ragCorpus:
        type: gcp:vertex:AiRagCorpus
        name: rag_corpus
        properties:
          displayName: rag-corpus-file-layout
          region: europe-west4
          vectorDbConfig:
            ragManagedDb:
              knn: {}
            ragEmbeddingModelConfig:
              vertexPredictionEndpoint:
                endpoint: projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005
      bucket:
        type: gcp:storage:Bucket
        properties:
          name: tf-test-rag-file-layout
          location: EUROPE-WEST4
          uniformBucketLevelAccess: true
          forceDestroy: true
      file:
        type: gcp:storage:BucketObject
        properties:
          name: example.html
          bucket: ${bucket.name}
          contentType: text/html
          content: <html><body><h1>Vertex AI RAG Engine</h1><p>RAG Engine lets large language models retrieve information from your own documents.</p></body></html>
      # The RAG Engine service agent is created on first use of RAG Engine, so grant it
      # access after the RagCorpus exists.
      ragServiceAgent:
        type: gcp:storage:BucketIAMMember
        name: rag_service_agent
        properties:
          bucket: ${bucket.name}
          role: roles/storage.objectViewer
          member: serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com
        options:
          dependsOn:
            - ${ragCorpus}
      ragServiceAgentDocumentAi:
        type: gcp:projects:IAMMember
        name: rag_service_agent_document_ai
        properties:
          project: ${project.projectId}
          role: roles/documentai.apiUser
          member: serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com
        options:
          dependsOn:
            - ${ragCorpus}
    variables:
      project:
        fn::invoke:
          function: gcp:organizations:getProject
          arguments: {}
    
    terraform {
      required_providers {
        gcp = {
          source = "pulumi/gcp"
        }
      }
    }
    
    data "gcp_organizations_project" "project" {
    }
    
    resource "gcp_vertex_ai_rag_file" "example" {
      depends_on = [gcp_storage_bucket_i_a_m_member.rag_service_agent, gcp_projects_i_a_m_member.rag_service_agent_document_ai]
      lifecycle {
        create_before_destroy = true
      }
      region     = "europe-west4"
      rag_corpus = gcp_vertex_ai_rag_corpus.rag_corpus.name
      gcs_source = {
        uris ="gs://${gcp_storage_bucket.bucket.name}/${gcp_storage_bucket_object.file.name}"
      }
      rag_file_parsing_config = {
        layout_parser = {
          processor_name               = gcp_essentialcontacts_document_ai_processor.layout_parser.id
          max_parsing_requests_per_min = 100
        }
      }
    }
    resource "gcp_essentialcontacts_document_ai_processor" "layout_parser" {
      lifecycle {
        create_before_destroy = true
      }
      location     = "eu"
      display_name = "rag-layout-parser"
      type         = "LAYOUT_PARSER_PROCESSOR"
    }
    resource "gcp_vertex_ai_rag_corpus" "rag_corpus" {
      lifecycle {
        create_before_destroy = true
      }
      display_name = "rag-corpus-file-layout"
      region       = "europe-west4"
      vector_db_config = {
        rag_managed_db = {
          knn = {}
        }
        rag_embedding_model_config = {
          vertex_prediction_endpoint = {
            endpoint ="projects/${data.gcp_organizations_project.project.number}/locations/europe-west4/publishers/google/models/text-embedding-005"
          }
        }
      }
    }
    resource "gcp_storage_bucket" "bucket" {
      lifecycle {
        create_before_destroy = true
      }
      name                        = "tf-test-rag-file-layout"
      location                    = "EUROPE-WEST4"
      uniform_bucket_level_access = true
      force_destroy               = true
    }
    resource "gcp_storage_bucket_object" "file" {
      lifecycle {
        create_before_destroy = true
      }
      name         = "example.html"
      bucket       = gcp_storage_bucket.bucket.name
      content_type = "text/html"
      content      = "<html><body><h1>Vertex AI RAG Engine</h1><p>RAG Engine lets large language models retrieve information from your own documents.</p></body></html>"
    }
    # The RAG Engine service agent is created on first use of RAG Engine, so grant it
    # access after the RagCorpus exists.
    resource "gcp_storage_bucket_i_a_m_member" "rag_service_agent" {
      depends_on = [gcp_vertex_ai_rag_corpus.rag_corpus]
      lifecycle {
        create_before_destroy = true
      }
      bucket = gcp_storage_bucket.bucket.name
      role   = "roles/storage.objectViewer"
      member ="serviceAccount:service-${data.gcp_organizations_project.project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com"
    }
    resource "gcp_projects_i_a_m_member" "rag_service_agent_document_ai" {
      depends_on = [gcp_vertex_ai_rag_corpus.rag_corpus]
      lifecycle {
        create_before_destroy = true
      }
      project = data.gcp_organizations_project.project.project_id
      role    = "roles/documentai.apiUser"
      member  ="serviceAccount:service-${data.gcp_organizations_project.project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com"
    }
    

    Vertex Ai Rag File Google Drive

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const ragCorpus = new gcp.vertex.AiRagCorpus("rag_corpus", {
        displayName: "rag-corpus-drive",
        region: "europe-west4",
    });
    const example = new gcp.vertex.AiRagFile("example", {
        region: "europe-west4",
        ragCorpus: ragCorpus.name,
        googleDriveSource: {
            resourceIds: {
                resourceId: "GOOGLE_DRIVE_FILE_ID",
                resourceType: "RESOURCE_TYPE_FILE",
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    rag_corpus = gcp.vertex.AiRagCorpus("rag_corpus",
        display_name="rag-corpus-drive",
        region="europe-west4")
    example = gcp.vertex.AiRagFile("example",
        region="europe-west4",
        rag_corpus=rag_corpus.name,
        google_drive_source={
            "resource_ids": {
                "resource_id": "GOOGLE_DRIVE_FILE_ID",
                "resource_type": "RESOURCE_TYPE_FILE",
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/vertex"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ragCorpus, err := vertex.NewAiRagCorpus(ctx, "rag_corpus", &vertex.AiRagCorpusArgs{
    			DisplayName: pulumi.String("rag-corpus-drive"),
    			Region:      pulumi.String("europe-west4"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vertex.NewAiRagFile(ctx, "example", &vertex.AiRagFileArgs{
    			Region:    pulumi.String("europe-west4"),
    			RagCorpus: ragCorpus.Name,
    			GoogleDriveSource: &vertex.AiRagFileGoogleDriveSourceArgs{
    				ResourceIds: &vertex.AiRagFileGoogleDriveSourceResourceIdsArgs{
    					ResourceId:   pulumi.String("GOOGLE_DRIVE_FILE_ID"),
    					ResourceType: pulumi.String("RESOURCE_TYPE_FILE"),
    				},
    			},
    		})
    		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 ragCorpus = new Gcp.Vertex.AiRagCorpus("rag_corpus", new()
        {
            DisplayName = "rag-corpus-drive",
            Region = "europe-west4",
        });
    
        var example = new Gcp.Vertex.AiRagFile("example", new()
        {
            Region = "europe-west4",
            RagCorpus = ragCorpus.Name,
            GoogleDriveSource = new Gcp.Vertex.Inputs.AiRagFileGoogleDriveSourceArgs
            {
                ResourceIds = new Gcp.Vertex.Inputs.AiRagFileGoogleDriveSourceResourceIdsArgs
                {
                    ResourceId = "GOOGLE_DRIVE_FILE_ID",
                    ResourceType = "RESOURCE_TYPE_FILE",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.vertex.AiRagCorpus;
    import com.pulumi.gcp.vertex.AiRagCorpusArgs;
    import com.pulumi.gcp.vertex.AiRagFile;
    import com.pulumi.gcp.vertex.AiRagFileArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagFileGoogleDriveSourceArgs;
    import com.pulumi.gcp.vertex.inputs.AiRagFileGoogleDriveSourceResourceIdsArgs;
    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) {
            var ragCorpus = new AiRagCorpus("ragCorpus", AiRagCorpusArgs.builder()
                .displayName("rag-corpus-drive")
                .region("europe-west4")
                .build());
    
            var example = new AiRagFile("example", AiRagFileArgs.builder()
                .region("europe-west4")
                .ragCorpus(ragCorpus.name())
                .googleDriveSource(AiRagFileGoogleDriveSourceArgs.builder()
                    .resourceIds(AiRagFileGoogleDriveSourceResourceIdsArgs.builder()
                        .resourceId("GOOGLE_DRIVE_FILE_ID")
                        .resourceType("RESOURCE_TYPE_FILE")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: gcp:vertex:AiRagFile
        properties:
          region: europe-west4
          ragCorpus: ${ragCorpus.name}
          googleDriveSource:
            resourceIds:
              resourceId: GOOGLE_DRIVE_FILE_ID
              resourceType: RESOURCE_TYPE_FILE
      ragCorpus:
        type: gcp:vertex:AiRagCorpus
        name: rag_corpus
        properties:
          displayName: rag-corpus-drive
          region: europe-west4
    
    terraform {
      required_providers {
        gcp = {
          source = "pulumi/gcp"
        }
      }
    }
    
    resource "gcp_vertex_ai_rag_file" "example" {
      lifecycle {
        create_before_destroy = true
      }
      region     = "europe-west4"
      rag_corpus = gcp_vertex_ai_rag_corpus.rag_corpus.name
      google_drive_source = {
        resource_ids = {
          resource_id   = "GOOGLE_DRIVE_FILE_ID"
          resource_type = "RESOURCE_TYPE_FILE"
        }
      }
    }
    resource "gcp_vertex_ai_rag_corpus" "rag_corpus" {
      lifecycle {
        create_before_destroy = true
      }
      display_name = "rag-corpus-drive"
      region       = "europe-west4"
    }
    

    Create AiRagFile Resource

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

    Constructor syntax

    new AiRagFile(name: string, args: AiRagFileArgs, opts?: CustomResourceOptions);
    @overload
    def AiRagFile(resource_name: str,
                  args: AiRagFileArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def AiRagFile(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  rag_corpus: Optional[str] = None,
                  region: Optional[str] = None,
                  deletion_policy: Optional[str] = None,
                  gcs_source: Optional[AiRagFileGcsSourceArgs] = None,
                  google_drive_source: Optional[AiRagFileGoogleDriveSourceArgs] = None,
                  max_embedding_requests_per_min: Optional[int] = None,
                  project: Optional[str] = None,
                  rag_file_parsing_config: Optional[AiRagFileRagFileParsingConfigArgs] = None,
                  rag_file_transformation_config: Optional[AiRagFileRagFileTransformationConfigArgs] = None)
    func NewAiRagFile(ctx *Context, name string, args AiRagFileArgs, opts ...ResourceOption) (*AiRagFile, error)
    public AiRagFile(string name, AiRagFileArgs args, CustomResourceOptions? opts = null)
    public AiRagFile(String name, AiRagFileArgs args)
    public AiRagFile(String name, AiRagFileArgs args, CustomResourceOptions options)
    
    type: gcp:vertex:AiRagFile
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "gcp_vertex_ai_rag_file" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args AiRagFileArgs
    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 AiRagFileArgs
    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 AiRagFileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AiRagFileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AiRagFileArgs
    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 aiRagFileResource = new Gcp.Vertex.AiRagFile("aiRagFileResource", new()
    {
        RagCorpus = "string",
        Region = "string",
        DeletionPolicy = "string",
        GcsSource = new Gcp.Vertex.Inputs.AiRagFileGcsSourceArgs
        {
            Uris = "string",
        },
        GoogleDriveSource = new Gcp.Vertex.Inputs.AiRagFileGoogleDriveSourceArgs
        {
            ResourceIds = new Gcp.Vertex.Inputs.AiRagFileGoogleDriveSourceResourceIdsArgs
            {
                ResourceId = "string",
                ResourceType = "string",
            },
        },
        MaxEmbeddingRequestsPerMin = 0,
        Project = "string",
        RagFileParsingConfig = new Gcp.Vertex.Inputs.AiRagFileRagFileParsingConfigArgs
        {
            LayoutParser = new Gcp.Vertex.Inputs.AiRagFileRagFileParsingConfigLayoutParserArgs
            {
                MaxParsingRequestsPerMin = 0,
                ProcessorName = "string",
            },
            LlmParser = new Gcp.Vertex.Inputs.AiRagFileRagFileParsingConfigLlmParserArgs
            {
                CustomParsingPrompt = "string",
                MaxParsingRequestsPerMin = 0,
                ModelName = "string",
            },
        },
        RagFileTransformationConfig = new Gcp.Vertex.Inputs.AiRagFileRagFileTransformationConfigArgs
        {
            RagFileChunkingConfig = new Gcp.Vertex.Inputs.AiRagFileRagFileTransformationConfigRagFileChunkingConfigArgs
            {
                FixedLengthChunking = new Gcp.Vertex.Inputs.AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunkingArgs
                {
                    ChunkOverlap = 0,
                    ChunkSize = 0,
                },
            },
        },
    });
    
    example, err := vertex.NewAiRagFile(ctx, "aiRagFileResource", &vertex.AiRagFileArgs{
    	RagCorpus:      pulumi.String("string"),
    	Region:         pulumi.String("string"),
    	DeletionPolicy: pulumi.String("string"),
    	GcsSource: &vertex.AiRagFileGcsSourceArgs{
    		Uris: pulumi.String("string"),
    	},
    	GoogleDriveSource: &vertex.AiRagFileGoogleDriveSourceArgs{
    		ResourceIds: &vertex.AiRagFileGoogleDriveSourceResourceIdsArgs{
    			ResourceId:   pulumi.String("string"),
    			ResourceType: pulumi.String("string"),
    		},
    	},
    	MaxEmbeddingRequestsPerMin: pulumi.Int(0),
    	Project:                    pulumi.String("string"),
    	RagFileParsingConfig: &vertex.AiRagFileRagFileParsingConfigArgs{
    		LayoutParser: &vertex.AiRagFileRagFileParsingConfigLayoutParserArgs{
    			MaxParsingRequestsPerMin: pulumi.Int(0),
    			ProcessorName:            pulumi.String("string"),
    		},
    		LlmParser: &vertex.AiRagFileRagFileParsingConfigLlmParserArgs{
    			CustomParsingPrompt:      pulumi.String("string"),
    			MaxParsingRequestsPerMin: pulumi.Int(0),
    			ModelName:                pulumi.String("string"),
    		},
    	},
    	RagFileTransformationConfig: &vertex.AiRagFileRagFileTransformationConfigArgs{
    		RagFileChunkingConfig: &vertex.AiRagFileRagFileTransformationConfigRagFileChunkingConfigArgs{
    			FixedLengthChunking: &vertex.AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunkingArgs{
    				ChunkOverlap: pulumi.Int(0),
    				ChunkSize:    pulumi.Int(0),
    			},
    		},
    	},
    })
    
    resource "gcp_vertex_ai_rag_file" "aiRagFileResource" {
      lifecycle {
        create_before_destroy = true
      }
      rag_corpus      = "string"
      region          = "string"
      deletion_policy = "string"
      gcs_source = {
        uris = "string"
      }
      google_drive_source = {
        resource_ids = {
          resource_id   = "string"
          resource_type = "string"
        }
      }
      max_embedding_requests_per_min = 0
      project                        = "string"
      rag_file_parsing_config = {
        layout_parser = {
          max_parsing_requests_per_min = 0
          processor_name               = "string"
        }
        llm_parser = {
          custom_parsing_prompt        = "string"
          max_parsing_requests_per_min = 0
          model_name                   = "string"
        }
      }
      rag_file_transformation_config = {
        rag_file_chunking_config = {
          fixed_length_chunking = {
            chunk_overlap = 0
            chunk_size    = 0
          }
        }
      }
    }
    
    var aiRagFileResource = new AiRagFile("aiRagFileResource", AiRagFileArgs.builder()
        .ragCorpus("string")
        .region("string")
        .deletionPolicy("string")
        .gcsSource(AiRagFileGcsSourceArgs.builder()
            .uris("string")
            .build())
        .googleDriveSource(AiRagFileGoogleDriveSourceArgs.builder()
            .resourceIds(AiRagFileGoogleDriveSourceResourceIdsArgs.builder()
                .resourceId("string")
                .resourceType("string")
                .build())
            .build())
        .maxEmbeddingRequestsPerMin(0)
        .project("string")
        .ragFileParsingConfig(AiRagFileRagFileParsingConfigArgs.builder()
            .layoutParser(AiRagFileRagFileParsingConfigLayoutParserArgs.builder()
                .maxParsingRequestsPerMin(0)
                .processorName("string")
                .build())
            .llmParser(AiRagFileRagFileParsingConfigLlmParserArgs.builder()
                .customParsingPrompt("string")
                .maxParsingRequestsPerMin(0)
                .modelName("string")
                .build())
            .build())
        .ragFileTransformationConfig(AiRagFileRagFileTransformationConfigArgs.builder()
            .ragFileChunkingConfig(AiRagFileRagFileTransformationConfigRagFileChunkingConfigArgs.builder()
                .fixedLengthChunking(AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunkingArgs.builder()
                    .chunkOverlap(0)
                    .chunkSize(0)
                    .build())
                .build())
            .build())
        .build());
    
    ai_rag_file_resource = gcp.vertex.AiRagFile("aiRagFileResource",
        rag_corpus="string",
        region="string",
        deletion_policy="string",
        gcs_source={
            "uris": "string",
        },
        google_drive_source={
            "resource_ids": {
                "resource_id": "string",
                "resource_type": "string",
            },
        },
        max_embedding_requests_per_min=0,
        project="string",
        rag_file_parsing_config={
            "layout_parser": {
                "max_parsing_requests_per_min": 0,
                "processor_name": "string",
            },
            "llm_parser": {
                "custom_parsing_prompt": "string",
                "max_parsing_requests_per_min": 0,
                "model_name": "string",
            },
        },
        rag_file_transformation_config={
            "rag_file_chunking_config": {
                "fixed_length_chunking": {
                    "chunk_overlap": 0,
                    "chunk_size": 0,
                },
            },
        })
    
    const aiRagFileResource = new gcp.vertex.AiRagFile("aiRagFileResource", {
        ragCorpus: "string",
        region: "string",
        deletionPolicy: "string",
        gcsSource: {
            uris: "string",
        },
        googleDriveSource: {
            resourceIds: {
                resourceId: "string",
                resourceType: "string",
            },
        },
        maxEmbeddingRequestsPerMin: 0,
        project: "string",
        ragFileParsingConfig: {
            layoutParser: {
                maxParsingRequestsPerMin: 0,
                processorName: "string",
            },
            llmParser: {
                customParsingPrompt: "string",
                maxParsingRequestsPerMin: 0,
                modelName: "string",
            },
        },
        ragFileTransformationConfig: {
            ragFileChunkingConfig: {
                fixedLengthChunking: {
                    chunkOverlap: 0,
                    chunkSize: 0,
                },
            },
        },
    });
    
    type: gcp:vertex:AiRagFile
    properties:
        deletionPolicy: string
        gcsSource:
            uris: string
        googleDriveSource:
            resourceIds:
                resourceId: string
                resourceType: string
        maxEmbeddingRequestsPerMin: 0
        project: string
        ragCorpus: string
        ragFileParsingConfig:
            layoutParser:
                maxParsingRequestsPerMin: 0
                processorName: string
            llmParser:
                customParsingPrompt: string
                maxParsingRequestsPerMin: 0
                modelName: string
        ragFileTransformationConfig:
            ragFileChunkingConfig:
                fixedLengthChunking:
                    chunkOverlap: 0
                    chunkSize: 0
        region: string
    

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

    RagCorpus string
    The ID of the RagCorpus to import the file into, for example the name attribute of a gcp.vertex.AiRagCorpus resource.
    Region string
    The region of the RagCorpus. eg europe-west4
    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.
    GcsSource AiRagFileGcsSource
    The Cloud Storage location of the file to import. Structure is documented below.
    GoogleDriveSource AiRagFileGoogleDriveSource
    The Google Drive location of the file to import. Structure is documented below.
    MaxEmbeddingRequestsPerMin int
    The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RagFileParsingConfig AiRagFileRagFileParsingConfig
    The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
    RagFileTransformationConfig AiRagFileRagFileTransformationConfig
    The transformation config used when importing the file. Structure is documented below.
    RagCorpus string
    The ID of the RagCorpus to import the file into, for example the name attribute of a gcp.vertex.AiRagCorpus resource.
    Region string
    The region of the RagCorpus. eg europe-west4
    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.
    GcsSource AiRagFileGcsSourceArgs
    The Cloud Storage location of the file to import. Structure is documented below.
    GoogleDriveSource AiRagFileGoogleDriveSourceArgs
    The Google Drive location of the file to import. Structure is documented below.
    MaxEmbeddingRequestsPerMin int
    The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RagFileParsingConfig AiRagFileRagFileParsingConfigArgs
    The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
    RagFileTransformationConfig AiRagFileRagFileTransformationConfigArgs
    The transformation config used when importing the file. Structure is documented below.
    rag_corpus string
    The ID of the RagCorpus to import the file into, for example the name attribute of a gcp.vertex.AiRagCorpus resource.
    region string
    The region of the RagCorpus. eg europe-west4
    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.
    gcs_source object
    The Cloud Storage location of the file to import. Structure is documented below.
    google_drive_source object
    The Google Drive location of the file to import. Structure is documented below.
    max_embedding_requests_per_min number
    The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rag_file_parsing_config object
    The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
    rag_file_transformation_config object
    The transformation config used when importing the file. Structure is documented below.
    ragCorpus String
    The ID of the RagCorpus to import the file into, for example the name attribute of a gcp.vertex.AiRagCorpus resource.
    region String
    The region of the RagCorpus. eg europe-west4
    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.
    gcsSource AiRagFileGcsSource
    The Cloud Storage location of the file to import. Structure is documented below.
    googleDriveSource AiRagFileGoogleDriveSource
    The Google Drive location of the file to import. Structure is documented below.
    maxEmbeddingRequestsPerMin Integer
    The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    ragFileParsingConfig AiRagFileRagFileParsingConfig
    The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
    ragFileTransformationConfig AiRagFileRagFileTransformationConfig
    The transformation config used when importing the file. Structure is documented below.
    ragCorpus string
    The ID of the RagCorpus to import the file into, for example the name attribute of a gcp.vertex.AiRagCorpus resource.
    region string
    The region of the RagCorpus. eg europe-west4
    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.
    gcsSource AiRagFileGcsSource
    The Cloud Storage location of the file to import. Structure is documented below.
    googleDriveSource AiRagFileGoogleDriveSource
    The Google Drive location of the file to import. Structure is documented below.
    maxEmbeddingRequestsPerMin number
    The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    ragFileParsingConfig AiRagFileRagFileParsingConfig
    The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
    ragFileTransformationConfig AiRagFileRagFileTransformationConfig
    The transformation config used when importing the file. Structure is documented below.
    rag_corpus str
    The ID of the RagCorpus to import the file into, for example the name attribute of a gcp.vertex.AiRagCorpus resource.
    region str
    The region of the RagCorpus. eg europe-west4
    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.
    gcs_source AiRagFileGcsSourceArgs
    The Cloud Storage location of the file to import. Structure is documented below.
    google_drive_source AiRagFileGoogleDriveSourceArgs
    The Google Drive location of the file to import. Structure is documented below.
    max_embedding_requests_per_min int
    The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rag_file_parsing_config AiRagFileRagFileParsingConfigArgs
    The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
    rag_file_transformation_config AiRagFileRagFileTransformationConfigArgs
    The transformation config used when importing the file. Structure is documented below.
    ragCorpus String
    The ID of the RagCorpus to import the file into, for example the name attribute of a gcp.vertex.AiRagCorpus resource.
    region String
    The region of the RagCorpus. eg europe-west4
    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.
    gcsSource Property Map
    The Cloud Storage location of the file to import. Structure is documented below.
    googleDriveSource Property Map
    The Google Drive location of the file to import. Structure is documented below.
    maxEmbeddingRequestsPerMin Number
    The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    ragFileParsingConfig Property Map
    The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
    ragFileTransformationConfig Property Map
    The transformation config used when importing the file. Structure is documented below.

    Outputs

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

    CreateTime string
    Timestamp when this RagFile was created.
    Description string
    The description of the RagFile.
    DisplayName string
    The display name of the RagFile, derived by the API from the source file.
    FileStatuses List<AiRagFileFileStatus>
    State of the RagFile. Structure is documented below.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The generated ID of the RagFile.
    UpdateTime string
    Timestamp when this RagFile was last updated.
    UserMetadata string
    The metadata for metadata search, in JSON format.
    CreateTime string
    Timestamp when this RagFile was created.
    Description string
    The description of the RagFile.
    DisplayName string
    The display name of the RagFile, derived by the API from the source file.
    FileStatuses []AiRagFileFileStatus
    State of the RagFile. Structure is documented below.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The generated ID of the RagFile.
    UpdateTime string
    Timestamp when this RagFile was last updated.
    UserMetadata string
    The metadata for metadata search, in JSON format.
    create_time string
    Timestamp when this RagFile was created.
    description string
    The description of the RagFile.
    display_name string
    The display name of the RagFile, derived by the API from the source file.
    file_statuses list(object)
    State of the RagFile. Structure is documented below.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The generated ID of the RagFile.
    update_time string
    Timestamp when this RagFile was last updated.
    user_metadata string
    The metadata for metadata search, in JSON format.
    createTime String
    Timestamp when this RagFile was created.
    description String
    The description of the RagFile.
    displayName String
    The display name of the RagFile, derived by the API from the source file.
    fileStatuses List<AiRagFileFileStatus>
    State of the RagFile. Structure is documented below.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The generated ID of the RagFile.
    updateTime String
    Timestamp when this RagFile was last updated.
    userMetadata String
    The metadata for metadata search, in JSON format.
    createTime string
    Timestamp when this RagFile was created.
    description string
    The description of the RagFile.
    displayName string
    The display name of the RagFile, derived by the API from the source file.
    fileStatuses AiRagFileFileStatus[]
    State of the RagFile. Structure is documented below.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The generated ID of the RagFile.
    updateTime string
    Timestamp when this RagFile was last updated.
    userMetadata string
    The metadata for metadata search, in JSON format.
    create_time str
    Timestamp when this RagFile was created.
    description str
    The description of the RagFile.
    display_name str
    The display name of the RagFile, derived by the API from the source file.
    file_statuses Sequence[AiRagFileFileStatus]
    State of the RagFile. Structure is documented below.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The generated ID of the RagFile.
    update_time str
    Timestamp when this RagFile was last updated.
    user_metadata str
    The metadata for metadata search, in JSON format.
    createTime String
    Timestamp when this RagFile was created.
    description String
    The description of the RagFile.
    displayName String
    The display name of the RagFile, derived by the API from the source file.
    fileStatuses List<Property Map>
    State of the RagFile. Structure is documented below.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The generated ID of the RagFile.
    updateTime String
    Timestamp when this RagFile was last updated.
    userMetadata String
    The metadata for metadata search, in JSON format.

    Look up Existing AiRagFile Resource

    Get an existing AiRagFile 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?: AiRagFileState, opts?: CustomResourceOptions): AiRagFile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            deletion_policy: Optional[str] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            file_statuses: Optional[Sequence[AiRagFileFileStatusArgs]] = None,
            gcs_source: Optional[AiRagFileGcsSourceArgs] = None,
            google_drive_source: Optional[AiRagFileGoogleDriveSourceArgs] = None,
            max_embedding_requests_per_min: Optional[int] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            rag_corpus: Optional[str] = None,
            rag_file_parsing_config: Optional[AiRagFileRagFileParsingConfigArgs] = None,
            rag_file_transformation_config: Optional[AiRagFileRagFileTransformationConfigArgs] = None,
            region: Optional[str] = None,
            update_time: Optional[str] = None,
            user_metadata: Optional[str] = None) -> AiRagFile
    func GetAiRagFile(ctx *Context, name string, id IDInput, state *AiRagFileState, opts ...ResourceOption) (*AiRagFile, error)
    public static AiRagFile Get(string name, Input<string> id, AiRagFileState? state, CustomResourceOptions? opts = null)
    public static AiRagFile get(String name, Output<String> id, AiRagFileState state, CustomResourceOptions options)
    resources:  existingAiRagFile:    type: gcp:vertex:AiRagFile    get:      id: ${id}
    import {
      to = gcp_vertex_ai_rag_file.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    state AiRagFileState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    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 resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state AiRagFileState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    state AiRagFileState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    state AiRagFileState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    options CustomResourceOptions
    Bag of options to control resource's behavior.
    The following state arguments are supported:
    CreateTime string
    Timestamp when this RagFile was created.
    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.
    Description string
    The description of the RagFile.
    DisplayName string
    The display name of the RagFile, derived by the API from the source file.
    FileStatuses List<AiRagFileFileStatus>
    State of the RagFile. Structure is documented below.
    GcsSource AiRagFileGcsSource
    The Cloud Storage location of the file to import. Structure is documented below.
    GoogleDriveSource AiRagFileGoogleDriveSource
    The Google Drive location of the file to import. Structure is documented below.
    MaxEmbeddingRequestsPerMin int
    The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
    Name string
    The generated ID of the RagFile.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RagCorpus string
    The ID of the RagCorpus to import the file into, for example the name attribute of a gcp.vertex.AiRagCorpus resource.
    RagFileParsingConfig AiRagFileRagFileParsingConfig
    The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
    RagFileTransformationConfig AiRagFileRagFileTransformationConfig
    The transformation config used when importing the file. Structure is documented below.
    Region string
    The region of the RagCorpus. eg europe-west4
    UpdateTime string
    Timestamp when this RagFile was last updated.
    UserMetadata string
    The metadata for metadata search, in JSON format.
    CreateTime string
    Timestamp when this RagFile was created.
    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.
    Description string
    The description of the RagFile.
    DisplayName string
    The display name of the RagFile, derived by the API from the source file.
    FileStatuses []AiRagFileFileStatusArgs
    State of the RagFile. Structure is documented below.
    GcsSource AiRagFileGcsSourceArgs
    The Cloud Storage location of the file to import. Structure is documented below.
    GoogleDriveSource AiRagFileGoogleDriveSourceArgs
    The Google Drive location of the file to import. Structure is documented below.
    MaxEmbeddingRequestsPerMin int
    The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
    Name string
    The generated ID of the RagFile.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RagCorpus string
    The ID of the RagCorpus to import the file into, for example the name attribute of a gcp.vertex.AiRagCorpus resource.
    RagFileParsingConfig AiRagFileRagFileParsingConfigArgs
    The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
    RagFileTransformationConfig AiRagFileRagFileTransformationConfigArgs
    The transformation config used when importing the file. Structure is documented below.
    Region string
    The region of the RagCorpus. eg europe-west4
    UpdateTime string
    Timestamp when this RagFile was last updated.
    UserMetadata string
    The metadata for metadata search, in JSON format.
    create_time string
    Timestamp when this RagFile was created.
    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.
    description string
    The description of the RagFile.
    display_name string
    The display name of the RagFile, derived by the API from the source file.
    file_statuses list(object)
    State of the RagFile. Structure is documented below.
    gcs_source object
    The Cloud Storage location of the file to import. Structure is documented below.
    google_drive_source object
    The Google Drive location of the file to import. Structure is documented below.
    max_embedding_requests_per_min number
    The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
    name string
    The generated ID of the RagFile.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rag_corpus string
    The ID of the RagCorpus to import the file into, for example the name attribute of a gcp.vertex.AiRagCorpus resource.
    rag_file_parsing_config object
    The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
    rag_file_transformation_config object
    The transformation config used when importing the file. Structure is documented below.
    region string
    The region of the RagCorpus. eg europe-west4
    update_time string
    Timestamp when this RagFile was last updated.
    user_metadata string
    The metadata for metadata search, in JSON format.
    createTime String
    Timestamp when this RagFile was created.
    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.
    description String
    The description of the RagFile.
    displayName String
    The display name of the RagFile, derived by the API from the source file.
    fileStatuses List<AiRagFileFileStatus>
    State of the RagFile. Structure is documented below.
    gcsSource AiRagFileGcsSource
    The Cloud Storage location of the file to import. Structure is documented below.
    googleDriveSource AiRagFileGoogleDriveSource
    The Google Drive location of the file to import. Structure is documented below.
    maxEmbeddingRequestsPerMin Integer
    The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
    name String
    The generated ID of the RagFile.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    ragCorpus String
    The ID of the RagCorpus to import the file into, for example the name attribute of a gcp.vertex.AiRagCorpus resource.
    ragFileParsingConfig AiRagFileRagFileParsingConfig
    The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
    ragFileTransformationConfig AiRagFileRagFileTransformationConfig
    The transformation config used when importing the file. Structure is documented below.
    region String
    The region of the RagCorpus. eg europe-west4
    updateTime String
    Timestamp when this RagFile was last updated.
    userMetadata String
    The metadata for metadata search, in JSON format.
    createTime string
    Timestamp when this RagFile was created.
    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.
    description string
    The description of the RagFile.
    displayName string
    The display name of the RagFile, derived by the API from the source file.
    fileStatuses AiRagFileFileStatus[]
    State of the RagFile. Structure is documented below.
    gcsSource AiRagFileGcsSource
    The Cloud Storage location of the file to import. Structure is documented below.
    googleDriveSource AiRagFileGoogleDriveSource
    The Google Drive location of the file to import. Structure is documented below.
    maxEmbeddingRequestsPerMin number
    The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
    name string
    The generated ID of the RagFile.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    ragCorpus string
    The ID of the RagCorpus to import the file into, for example the name attribute of a gcp.vertex.AiRagCorpus resource.
    ragFileParsingConfig AiRagFileRagFileParsingConfig
    The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
    ragFileTransformationConfig AiRagFileRagFileTransformationConfig
    The transformation config used when importing the file. Structure is documented below.
    region string
    The region of the RagCorpus. eg europe-west4
    updateTime string
    Timestamp when this RagFile was last updated.
    userMetadata string
    The metadata for metadata search, in JSON format.
    create_time str
    Timestamp when this RagFile was created.
    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.
    description str
    The description of the RagFile.
    display_name str
    The display name of the RagFile, derived by the API from the source file.
    file_statuses Sequence[AiRagFileFileStatusArgs]
    State of the RagFile. Structure is documented below.
    gcs_source AiRagFileGcsSourceArgs
    The Cloud Storage location of the file to import. Structure is documented below.
    google_drive_source AiRagFileGoogleDriveSourceArgs
    The Google Drive location of the file to import. Structure is documented below.
    max_embedding_requests_per_min int
    The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
    name str
    The generated ID of the RagFile.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rag_corpus str
    The ID of the RagCorpus to import the file into, for example the name attribute of a gcp.vertex.AiRagCorpus resource.
    rag_file_parsing_config AiRagFileRagFileParsingConfigArgs
    The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
    rag_file_transformation_config AiRagFileRagFileTransformationConfigArgs
    The transformation config used when importing the file. Structure is documented below.
    region str
    The region of the RagCorpus. eg europe-west4
    update_time str
    Timestamp when this RagFile was last updated.
    user_metadata str
    The metadata for metadata search, in JSON format.
    createTime String
    Timestamp when this RagFile was created.
    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.
    description String
    The description of the RagFile.
    displayName String
    The display name of the RagFile, derived by the API from the source file.
    fileStatuses List<Property Map>
    State of the RagFile. Structure is documented below.
    gcsSource Property Map
    The Cloud Storage location of the file to import. Structure is documented below.
    googleDriveSource Property Map
    The Google Drive location of the file to import. Structure is documented below.
    maxEmbeddingRequestsPerMin Number
    The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
    name String
    The generated ID of the RagFile.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    ragCorpus String
    The ID of the RagCorpus to import the file into, for example the name attribute of a gcp.vertex.AiRagCorpus resource.
    ragFileParsingConfig Property Map
    The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
    ragFileTransformationConfig Property Map
    The transformation config used when importing the file. Structure is documented below.
    region String
    The region of the RagCorpus. eg europe-west4
    updateTime String
    Timestamp when this RagFile was last updated.
    userMetadata String
    The metadata for metadata search, in JSON format.

    Supporting Types

    AiRagFileFileStatus, AiRagFileFileStatusArgs

    ErrorStatus string
    (Output) Only populated when the state is ERROR.
    State string
    (Output) RagFile state.
    ErrorStatus string
    (Output) Only populated when the state is ERROR.
    State string
    (Output) RagFile state.
    error_status string
    (Output) Only populated when the state is ERROR.
    state string
    (Output) RagFile state.
    errorStatus String
    (Output) Only populated when the state is ERROR.
    state String
    (Output) RagFile state.
    errorStatus string
    (Output) Only populated when the state is ERROR.
    state string
    (Output) RagFile state.
    error_status str
    (Output) Only populated when the state is ERROR.
    state str
    (Output) RagFile state.
    errorStatus String
    (Output) Only populated when the state is ERROR.
    state String
    (Output) RagFile state.

    AiRagFileGcsSource, AiRagFileGcsSourceArgs

    Uris string
    The Cloud Storage URI of the file to import, for example gs://my-bucket/my-file.pdf. Must reference a single file; directories and wildcards are not supported because each resource manages one RagFile.
    Uris string
    The Cloud Storage URI of the file to import, for example gs://my-bucket/my-file.pdf. Must reference a single file; directories and wildcards are not supported because each resource manages one RagFile.
    uris string
    The Cloud Storage URI of the file to import, for example gs://my-bucket/my-file.pdf. Must reference a single file; directories and wildcards are not supported because each resource manages one RagFile.
    uris String
    The Cloud Storage URI of the file to import, for example gs://my-bucket/my-file.pdf. Must reference a single file; directories and wildcards are not supported because each resource manages one RagFile.
    uris string
    The Cloud Storage URI of the file to import, for example gs://my-bucket/my-file.pdf. Must reference a single file; directories and wildcards are not supported because each resource manages one RagFile.
    uris str
    The Cloud Storage URI of the file to import, for example gs://my-bucket/my-file.pdf. Must reference a single file; directories and wildcards are not supported because each resource manages one RagFile.
    uris String
    The Cloud Storage URI of the file to import, for example gs://my-bucket/my-file.pdf. Must reference a single file; directories and wildcards are not supported because each resource manages one RagFile.

    AiRagFileGoogleDriveSource, AiRagFileGoogleDriveSourceArgs

    ResourceIds AiRagFileGoogleDriveSourceResourceIds
    The Google Drive file to import. Structure is documented below.
    ResourceIds AiRagFileGoogleDriveSourceResourceIds
    The Google Drive file to import. Structure is documented below.
    resource_ids object
    The Google Drive file to import. Structure is documented below.
    resourceIds AiRagFileGoogleDriveSourceResourceIds
    The Google Drive file to import. Structure is documented below.
    resourceIds AiRagFileGoogleDriveSourceResourceIds
    The Google Drive file to import. Structure is documented below.
    resource_ids AiRagFileGoogleDriveSourceResourceIds
    The Google Drive file to import. Structure is documented below.
    resourceIds Property Map
    The Google Drive file to import. Structure is documented below.

    AiRagFileGoogleDriveSourceResourceIds, AiRagFileGoogleDriveSourceResourceIdsArgs

    ResourceId string
    The ID of the Google Drive file.
    ResourceType string
    The type of the Google Drive resource. Only individual files are supported because each resource manages one RagFile. Default value is RESOURCE_TYPE_FILE. Possible values are: RESOURCE_TYPE_FILE.
    ResourceId string
    The ID of the Google Drive file.
    ResourceType string
    The type of the Google Drive resource. Only individual files are supported because each resource manages one RagFile. Default value is RESOURCE_TYPE_FILE. Possible values are: RESOURCE_TYPE_FILE.
    resource_id string
    The ID of the Google Drive file.
    resource_type string
    The type of the Google Drive resource. Only individual files are supported because each resource manages one RagFile. Default value is RESOURCE_TYPE_FILE. Possible values are: RESOURCE_TYPE_FILE.
    resourceId String
    The ID of the Google Drive file.
    resourceType String
    The type of the Google Drive resource. Only individual files are supported because each resource manages one RagFile. Default value is RESOURCE_TYPE_FILE. Possible values are: RESOURCE_TYPE_FILE.
    resourceId string
    The ID of the Google Drive file.
    resourceType string
    The type of the Google Drive resource. Only individual files are supported because each resource manages one RagFile. Default value is RESOURCE_TYPE_FILE. Possible values are: RESOURCE_TYPE_FILE.
    resource_id str
    The ID of the Google Drive file.
    resource_type str
    The type of the Google Drive resource. Only individual files are supported because each resource manages one RagFile. Default value is RESOURCE_TYPE_FILE. Possible values are: RESOURCE_TYPE_FILE.
    resourceId String
    The ID of the Google Drive file.
    resourceType String
    The type of the Google Drive resource. Only individual files are supported because each resource manages one RagFile. Default value is RESOURCE_TYPE_FILE. Possible values are: RESOURCE_TYPE_FILE.

    AiRagFileRagFileParsingConfig, AiRagFileRagFileParsingConfigArgs

    LayoutParser AiRagFileRagFileParsingConfigLayoutParser
    The Document AI Layout Parser to use for the file. Structure is documented below.
    LlmParser AiRagFileRagFileParsingConfigLlmParser
    The LLM parser to use for the file. Structure is documented below.
    LayoutParser AiRagFileRagFileParsingConfigLayoutParser
    The Document AI Layout Parser to use for the file. Structure is documented below.
    LlmParser AiRagFileRagFileParsingConfigLlmParser
    The LLM parser to use for the file. Structure is documented below.
    layout_parser object
    The Document AI Layout Parser to use for the file. Structure is documented below.
    llm_parser object
    The LLM parser to use for the file. Structure is documented below.
    layoutParser AiRagFileRagFileParsingConfigLayoutParser
    The Document AI Layout Parser to use for the file. Structure is documented below.
    llmParser AiRagFileRagFileParsingConfigLlmParser
    The LLM parser to use for the file. Structure is documented below.
    layoutParser AiRagFileRagFileParsingConfigLayoutParser
    The Document AI Layout Parser to use for the file. Structure is documented below.
    llmParser AiRagFileRagFileParsingConfigLlmParser
    The LLM parser to use for the file. Structure is documented below.
    layout_parser AiRagFileRagFileParsingConfigLayoutParser
    The Document AI Layout Parser to use for the file. Structure is documented below.
    llm_parser AiRagFileRagFileParsingConfigLlmParser
    The LLM parser to use for the file. Structure is documented below.
    layoutParser Property Map
    The Document AI Layout Parser to use for the file. Structure is documented below.
    llmParser Property Map
    The LLM parser to use for the file. Structure is documented below.

    AiRagFileRagFileParsingConfigLayoutParser, AiRagFileRagFileParsingConfigLayoutParserArgs

    MaxParsingRequestsPerMin int
    The maximum number of requests the job is allowed to make to the Document AI processor per minute.
    ProcessorName string
    The full resource name of a Document AI processor or processor version of type LAYOUT_PARSER_PROCESSOR. Format: projects/{project_id}/locations/{location}/processors/{processor_id} or projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}.
    MaxParsingRequestsPerMin int
    The maximum number of requests the job is allowed to make to the Document AI processor per minute.
    ProcessorName string
    The full resource name of a Document AI processor or processor version of type LAYOUT_PARSER_PROCESSOR. Format: projects/{project_id}/locations/{location}/processors/{processor_id} or projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}.
    max_parsing_requests_per_min number
    The maximum number of requests the job is allowed to make to the Document AI processor per minute.
    processor_name string
    The full resource name of a Document AI processor or processor version of type LAYOUT_PARSER_PROCESSOR. Format: projects/{project_id}/locations/{location}/processors/{processor_id} or projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}.
    maxParsingRequestsPerMin Integer
    The maximum number of requests the job is allowed to make to the Document AI processor per minute.
    processorName String
    The full resource name of a Document AI processor or processor version of type LAYOUT_PARSER_PROCESSOR. Format: projects/{project_id}/locations/{location}/processors/{processor_id} or projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}.
    maxParsingRequestsPerMin number
    The maximum number of requests the job is allowed to make to the Document AI processor per minute.
    processorName string
    The full resource name of a Document AI processor or processor version of type LAYOUT_PARSER_PROCESSOR. Format: projects/{project_id}/locations/{location}/processors/{processor_id} or projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}.
    max_parsing_requests_per_min int
    The maximum number of requests the job is allowed to make to the Document AI processor per minute.
    processor_name str
    The full resource name of a Document AI processor or processor version of type LAYOUT_PARSER_PROCESSOR. Format: projects/{project_id}/locations/{location}/processors/{processor_id} or projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}.
    maxParsingRequestsPerMin Number
    The maximum number of requests the job is allowed to make to the Document AI processor per minute.
    processorName String
    The full resource name of a Document AI processor or processor version of type LAYOUT_PARSER_PROCESSOR. Format: projects/{project_id}/locations/{location}/processors/{processor_id} or projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}.

    AiRagFileRagFileParsingConfigLlmParser, AiRagFileRagFileParsingConfigLlmParserArgs

    CustomParsingPrompt string
    The prompt to use for parsing. If not specified, a default prompt is used.
    MaxParsingRequestsPerMin int
    The maximum number of requests the job is allowed to make to the LLM model per minute.
    ModelName string
    The name of a LLM model used for parsing. Format: projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}.
    CustomParsingPrompt string
    The prompt to use for parsing. If not specified, a default prompt is used.
    MaxParsingRequestsPerMin int
    The maximum number of requests the job is allowed to make to the LLM model per minute.
    ModelName string
    The name of a LLM model used for parsing. Format: projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}.
    custom_parsing_prompt string
    The prompt to use for parsing. If not specified, a default prompt is used.
    max_parsing_requests_per_min number
    The maximum number of requests the job is allowed to make to the LLM model per minute.
    model_name string
    The name of a LLM model used for parsing. Format: projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}.
    customParsingPrompt String
    The prompt to use for parsing. If not specified, a default prompt is used.
    maxParsingRequestsPerMin Integer
    The maximum number of requests the job is allowed to make to the LLM model per minute.
    modelName String
    The name of a LLM model used for parsing. Format: projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}.
    customParsingPrompt string
    The prompt to use for parsing. If not specified, a default prompt is used.
    maxParsingRequestsPerMin number
    The maximum number of requests the job is allowed to make to the LLM model per minute.
    modelName string
    The name of a LLM model used for parsing. Format: projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}.
    custom_parsing_prompt str
    The prompt to use for parsing. If not specified, a default prompt is used.
    max_parsing_requests_per_min int
    The maximum number of requests the job is allowed to make to the LLM model per minute.
    model_name str
    The name of a LLM model used for parsing. Format: projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}.
    customParsingPrompt String
    The prompt to use for parsing. If not specified, a default prompt is used.
    maxParsingRequestsPerMin Number
    The maximum number of requests the job is allowed to make to the LLM model per minute.
    modelName String
    The name of a LLM model used for parsing. Format: projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}.

    AiRagFileRagFileTransformationConfig, AiRagFileRagFileTransformationConfigArgs

    RagFileChunkingConfig AiRagFileRagFileTransformationConfigRagFileChunkingConfig
    The chunking config for the file. Structure is documented below.
    RagFileChunkingConfig AiRagFileRagFileTransformationConfigRagFileChunkingConfig
    The chunking config for the file. Structure is documented below.
    rag_file_chunking_config object
    The chunking config for the file. Structure is documented below.
    ragFileChunkingConfig AiRagFileRagFileTransformationConfigRagFileChunkingConfig
    The chunking config for the file. Structure is documented below.
    ragFileChunkingConfig AiRagFileRagFileTransformationConfigRagFileChunkingConfig
    The chunking config for the file. Structure is documented below.
    rag_file_chunking_config AiRagFileRagFileTransformationConfigRagFileChunkingConfig
    The chunking config for the file. Structure is documented below.
    ragFileChunkingConfig Property Map
    The chunking config for the file. Structure is documented below.

    AiRagFileRagFileTransformationConfigRagFileChunkingConfig, AiRagFileRagFileTransformationConfigRagFileChunkingConfigArgs

    FixedLengthChunking AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunking
    The fixed length chunking config. Structure is documented below.
    FixedLengthChunking AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunking
    The fixed length chunking config. Structure is documented below.
    fixed_length_chunking object
    The fixed length chunking config. Structure is documented below.
    fixedLengthChunking AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunking
    The fixed length chunking config. Structure is documented below.
    fixedLengthChunking AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunking
    The fixed length chunking config. Structure is documented below.
    fixed_length_chunking AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunking
    The fixed length chunking config. Structure is documented below.
    fixedLengthChunking Property Map
    The fixed length chunking config. Structure is documented below.

    AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunking, AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunkingArgs

    ChunkOverlap int
    The overlap between chunks.
    ChunkSize int
    The size of the chunks.
    ChunkOverlap int
    The overlap between chunks.
    ChunkSize int
    The size of the chunks.
    chunk_overlap number
    The overlap between chunks.
    chunk_size number
    The size of the chunks.
    chunkOverlap Integer
    The overlap between chunks.
    chunkSize Integer
    The size of the chunks.
    chunkOverlap number
    The overlap between chunks.
    chunkSize number
    The size of the chunks.
    chunk_overlap int
    The overlap between chunks.
    chunk_size int
    The size of the chunks.
    chunkOverlap Number
    The overlap between chunks.
    chunkSize Number
    The size of the chunks.

    Import

    RagFile can be imported using any of these accepted formats:

    • projects/{{project}}/locations/{{region}}/ragCorpora/{{rag_corpus}}/ragFiles/{{name}}
    • {{project}}/{{region}}/{{rag_corpus}}/{{name}}
    • {{region}}/{{rag_corpus}}/{{name}}
    • {{rag_corpus}}/{{name}}

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

    $ pulumi import gcp:vertex/aiRagFile:AiRagFile default projects/{{project}}/locations/{{region}}/ragCorpora/{{rag_corpus}}/ragFiles/{{name}}
    $ pulumi import gcp:vertex/aiRagFile:AiRagFile default {{project}}/{{region}}/{{rag_corpus}}/{{name}}
    $ pulumi import gcp:vertex/aiRagFile:AiRagFile default {{region}}/{{rag_corpus}}/{{name}}
    $ pulumi import gcp:vertex/aiRagFile:AiRagFile default {{rag_corpus}}/{{name}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Google Cloud (GCP) 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 v10.5.0
    published on Wednesday, Nov 18, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial