1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. essentialcontacts
  5. DocumentAiProcessorDefaultVersion
Google Cloud Classic v6.67.0 published on Wednesday, Sep 27, 2023 by Pulumi

gcp.essentialcontacts.DocumentAiProcessorDefaultVersion

Explore with Pulumi AI

gcp logo
Google Cloud Classic v6.67.0 published on Wednesday, Sep 27, 2023 by Pulumi

    The default version for the processor. Deleting this resource is a no-op, and does not unset the default version.

    Example Usage

    Documentai Default Version

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var processorDocumentAiProcessor = new Gcp.EssentialContacts.DocumentAiProcessor("processorDocumentAiProcessor", new()
        {
            Location = "us",
            DisplayName = "test-processor",
            Type = "OCR_PROCESSOR",
        });
    
        var processorDocumentAiProcessorDefaultVersion = new Gcp.EssentialContacts.DocumentAiProcessorDefaultVersion("processorDocumentAiProcessorDefaultVersion", new()
        {
            Processor = processorDocumentAiProcessor.Id,
            Version = processorDocumentAiProcessor.Id.Apply(id => $"{id}/processorVersions/stable"),
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/essentialcontacts"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		processorDocumentAiProcessor, err := essentialcontacts.NewDocumentAiProcessor(ctx, "processorDocumentAiProcessor", &essentialcontacts.DocumentAiProcessorArgs{
    			Location:    pulumi.String("us"),
    			DisplayName: pulumi.String("test-processor"),
    			Type:        pulumi.String("OCR_PROCESSOR"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = essentialcontacts.NewDocumentAiProcessorDefaultVersion(ctx, "processorDocumentAiProcessorDefaultVersion", &essentialcontacts.DocumentAiProcessorDefaultVersionArgs{
    			Processor: processorDocumentAiProcessor.ID(),
    			Version: processorDocumentAiProcessor.ID().ApplyT(func(id string) (string, error) {
    				return fmt.Sprintf("%v/processorVersions/stable", id), nil
    			}).(pulumi.StringOutput),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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.essentialcontacts.DocumentAiProcessorDefaultVersion;
    import com.pulumi.gcp.essentialcontacts.DocumentAiProcessorDefaultVersionArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var processorDocumentAiProcessor = new DocumentAiProcessor("processorDocumentAiProcessor", DocumentAiProcessorArgs.builder()        
                .location("us")
                .displayName("test-processor")
                .type("OCR_PROCESSOR")
                .build());
    
            var processorDocumentAiProcessorDefaultVersion = new DocumentAiProcessorDefaultVersion("processorDocumentAiProcessorDefaultVersion", DocumentAiProcessorDefaultVersionArgs.builder()        
                .processor(processorDocumentAiProcessor.id())
                .version(processorDocumentAiProcessor.id().applyValue(id -> String.format("%s/processorVersions/stable", id)))
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    processor_document_ai_processor = gcp.essentialcontacts.DocumentAiProcessor("processorDocumentAiProcessor",
        location="us",
        display_name="test-processor",
        type="OCR_PROCESSOR")
    processor_document_ai_processor_default_version = gcp.essentialcontacts.DocumentAiProcessorDefaultVersion("processorDocumentAiProcessorDefaultVersion",
        processor=processor_document_ai_processor.id,
        version=processor_document_ai_processor.id.apply(lambda id: f"{id}/processorVersions/stable"))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const processorDocumentAiProcessor = new gcp.essentialcontacts.DocumentAiProcessor("processorDocumentAiProcessor", {
        location: "us",
        displayName: "test-processor",
        type: "OCR_PROCESSOR",
    });
    const processorDocumentAiProcessorDefaultVersion = new gcp.essentialcontacts.DocumentAiProcessorDefaultVersion("processorDocumentAiProcessorDefaultVersion", {
        processor: processorDocumentAiProcessor.id,
        version: pulumi.interpolate`${processorDocumentAiProcessor.id}/processorVersions/stable`,
    });
    
    resources:
      processorDocumentAiProcessor:
        type: gcp:essentialcontacts:DocumentAiProcessor
        properties:
          location: us
          displayName: test-processor
          type: OCR_PROCESSOR
      processorDocumentAiProcessorDefaultVersion:
        type: gcp:essentialcontacts:DocumentAiProcessorDefaultVersion
        properties:
          processor: ${processorDocumentAiProcessor.id}
          version: ${processorDocumentAiProcessor.id}/processorVersions/stable
    

    Create DocumentAiProcessorDefaultVersion Resource

    new DocumentAiProcessorDefaultVersion(name: string, args: DocumentAiProcessorDefaultVersionArgs, opts?: CustomResourceOptions);
    @overload
    def DocumentAiProcessorDefaultVersion(resource_name: str,
                                          opts: Optional[ResourceOptions] = None,
                                          processor: Optional[str] = None,
                                          version: Optional[str] = None)
    @overload
    def DocumentAiProcessorDefaultVersion(resource_name: str,
                                          args: DocumentAiProcessorDefaultVersionArgs,
                                          opts: Optional[ResourceOptions] = None)
    func NewDocumentAiProcessorDefaultVersion(ctx *Context, name string, args DocumentAiProcessorDefaultVersionArgs, opts ...ResourceOption) (*DocumentAiProcessorDefaultVersion, error)
    public DocumentAiProcessorDefaultVersion(string name, DocumentAiProcessorDefaultVersionArgs args, CustomResourceOptions? opts = null)
    public DocumentAiProcessorDefaultVersion(String name, DocumentAiProcessorDefaultVersionArgs args)
    public DocumentAiProcessorDefaultVersion(String name, DocumentAiProcessorDefaultVersionArgs args, CustomResourceOptions options)
    
    type: gcp:essentialcontacts:DocumentAiProcessorDefaultVersion
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args DocumentAiProcessorDefaultVersionArgs
    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 DocumentAiProcessorDefaultVersionArgs
    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 DocumentAiProcessorDefaultVersionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DocumentAiProcessorDefaultVersionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DocumentAiProcessorDefaultVersionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    DocumentAiProcessorDefaultVersion Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The DocumentAiProcessorDefaultVersion resource accepts the following input properties:

    Processor string

    The processor to set the version on.


    Version string

    The version to set. Using stable or rc will cause the API to return the latest version in that release channel. Apply lifecycle.ignore_changes to the version field to suppress this diff.

    Processor string

    The processor to set the version on.


    Version string

    The version to set. Using stable or rc will cause the API to return the latest version in that release channel. Apply lifecycle.ignore_changes to the version field to suppress this diff.

    processor String

    The processor to set the version on.


    version String

    The version to set. Using stable or rc will cause the API to return the latest version in that release channel. Apply lifecycle.ignore_changes to the version field to suppress this diff.

    processor string

    The processor to set the version on.


    version string

    The version to set. Using stable or rc will cause the API to return the latest version in that release channel. Apply lifecycle.ignore_changes to the version field to suppress this diff.

    processor str

    The processor to set the version on.


    version str

    The version to set. Using stable or rc will cause the API to return the latest version in that release channel. Apply lifecycle.ignore_changes to the version field to suppress this diff.

    processor String

    The processor to set the version on.


    version String

    The version to set. Using stable or rc will cause the API to return the latest version in that release channel. Apply lifecycle.ignore_changes to the version field to suppress this diff.

    Outputs

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

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing DocumentAiProcessorDefaultVersion Resource

    Get an existing DocumentAiProcessorDefaultVersion 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?: DocumentAiProcessorDefaultVersionState, opts?: CustomResourceOptions): DocumentAiProcessorDefaultVersion
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            processor: Optional[str] = None,
            version: Optional[str] = None) -> DocumentAiProcessorDefaultVersion
    func GetDocumentAiProcessorDefaultVersion(ctx *Context, name string, id IDInput, state *DocumentAiProcessorDefaultVersionState, opts ...ResourceOption) (*DocumentAiProcessorDefaultVersion, error)
    public static DocumentAiProcessorDefaultVersion Get(string name, Input<string> id, DocumentAiProcessorDefaultVersionState? state, CustomResourceOptions? opts = null)
    public static DocumentAiProcessorDefaultVersion get(String name, Output<String> id, DocumentAiProcessorDefaultVersionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Processor string

    The processor to set the version on.


    Version string

    The version to set. Using stable or rc will cause the API to return the latest version in that release channel. Apply lifecycle.ignore_changes to the version field to suppress this diff.

    Processor string

    The processor to set the version on.


    Version string

    The version to set. Using stable or rc will cause the API to return the latest version in that release channel. Apply lifecycle.ignore_changes to the version field to suppress this diff.

    processor String

    The processor to set the version on.


    version String

    The version to set. Using stable or rc will cause the API to return the latest version in that release channel. Apply lifecycle.ignore_changes to the version field to suppress this diff.

    processor string

    The processor to set the version on.


    version string

    The version to set. Using stable or rc will cause the API to return the latest version in that release channel. Apply lifecycle.ignore_changes to the version field to suppress this diff.

    processor str

    The processor to set the version on.


    version str

    The version to set. Using stable or rc will cause the API to return the latest version in that release channel. Apply lifecycle.ignore_changes to the version field to suppress this diff.

    processor String

    The processor to set the version on.


    version String

    The version to set. Using stable or rc will cause the API to return the latest version in that release channel. Apply lifecycle.ignore_changes to the version field to suppress this diff.

    Import

    ProcessorDefaultVersion can be imported using any of these accepted formats:

     $ pulumi import gcp:essentialcontacts/documentAiProcessorDefaultVersion:DocumentAiProcessorDefaultVersion default {{processor}}
    

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the google-beta Terraform Provider.

    gcp logo
    Google Cloud Classic v6.67.0 published on Wednesday, Sep 27, 2023 by Pulumi