gcp.essentialcontacts.DocumentAiProcessor
Explore with Pulumi AI
The first-class citizen for Document AI. Each processor defines how to extract structural information from a document.
To get more information about Processor, see:
- API documentation
- How-to Guides
Example Usage
Documentai Processor
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const processor = new gcp.essentialcontacts.DocumentAiProcessor("processor", {
location: "us",
displayName: "test-processor",
type: "OCR_PROCESSOR",
});
import pulumi
import pulumi_gcp as gcp
processor = gcp.essentialcontacts.DocumentAiProcessor("processor",
location="us",
display_name="test-processor",
type="OCR_PROCESSOR")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/essentialcontacts"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := essentialcontacts.NewDocumentAiProcessor(ctx, "processor", &essentialcontacts.DocumentAiProcessorArgs{
Location: pulumi.String("us"),
DisplayName: pulumi.String("test-processor"),
Type: pulumi.String("OCR_PROCESSOR"),
})
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 processor = new Gcp.EssentialContacts.DocumentAiProcessor("processor", new()
{
Location = "us",
DisplayName = "test-processor",
Type = "OCR_PROCESSOR",
});
});
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 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 processor = new DocumentAiProcessor("processor", DocumentAiProcessorArgs.builder()
.location("us")
.displayName("test-processor")
.type("OCR_PROCESSOR")
.build());
}
}
resources:
processor:
type: gcp:essentialcontacts:DocumentAiProcessor
properties:
location: us
displayName: test-processor
type: OCR_PROCESSOR
Create DocumentAiProcessor Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DocumentAiProcessor(name: string, args: DocumentAiProcessorArgs, opts?: CustomResourceOptions);
@overload
def DocumentAiProcessor(resource_name: str,
args: DocumentAiProcessorArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DocumentAiProcessor(resource_name: str,
opts: Optional[ResourceOptions] = None,
display_name: Optional[str] = None,
location: Optional[str] = None,
type: Optional[str] = None,
kms_key_name: Optional[str] = None,
project: Optional[str] = None)
func NewDocumentAiProcessor(ctx *Context, name string, args DocumentAiProcessorArgs, opts ...ResourceOption) (*DocumentAiProcessor, error)
public DocumentAiProcessor(string name, DocumentAiProcessorArgs args, CustomResourceOptions? opts = null)
public DocumentAiProcessor(String name, DocumentAiProcessorArgs args)
public DocumentAiProcessor(String name, DocumentAiProcessorArgs args, CustomResourceOptions options)
type: gcp:essentialcontacts:DocumentAiProcessor
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DocumentAiProcessorArgs
- 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 DocumentAiProcessorArgs
- 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 DocumentAiProcessorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DocumentAiProcessorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DocumentAiProcessorArgs
- 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 documentAiProcessorResource = new Gcp.EssentialContacts.DocumentAiProcessor("documentAiProcessorResource", new()
{
DisplayName = "string",
Location = "string",
Type = "string",
KmsKeyName = "string",
Project = "string",
});
example, err := essentialcontacts.NewDocumentAiProcessor(ctx, "documentAiProcessorResource", &essentialcontacts.DocumentAiProcessorArgs{
DisplayName: pulumi.String("string"),
Location: pulumi.String("string"),
Type: pulumi.String("string"),
KmsKeyName: pulumi.String("string"),
Project: pulumi.String("string"),
})
var documentAiProcessorResource = new DocumentAiProcessor("documentAiProcessorResource", DocumentAiProcessorArgs.builder()
.displayName("string")
.location("string")
.type("string")
.kmsKeyName("string")
.project("string")
.build());
document_ai_processor_resource = gcp.essentialcontacts.DocumentAiProcessor("documentAiProcessorResource",
display_name="string",
location="string",
type="string",
kms_key_name="string",
project="string")
const documentAiProcessorResource = new gcp.essentialcontacts.DocumentAiProcessor("documentAiProcessorResource", {
displayName: "string",
location: "string",
type: "string",
kmsKeyName: "string",
project: "string",
});
type: gcp:essentialcontacts:DocumentAiProcessor
properties:
displayName: string
kmsKeyName: string
location: string
project: string
type: string
DocumentAiProcessor 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 DocumentAiProcessor resource accepts the following input properties:
- Display
Name string - The display name. Must be unique.
- Location string
- The location of the resource.
- Type string
- The type of processor. For possible types see the official list
- Kms
Key stringName - The KMS key used for encryption/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Display
Name string - The display name. Must be unique.
- Location string
- The location of the resource.
- Type string
- The type of processor. For possible types see the official list
- Kms
Key stringName - The KMS key used for encryption/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- display
Name String - The display name. Must be unique.
- location String
- The location of the resource.
- type String
- The type of processor. For possible types see the official list
- kms
Key StringName - The KMS key used for encryption/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- display
Name string - The display name. Must be unique.
- location string
- The location of the resource.
- type string
- The type of processor. For possible types see the official list
- kms
Key stringName - The KMS key used for encryption/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- display_
name str - The display name. Must be unique.
- location str
- The location of the resource.
- type str
- The type of processor. For possible types see the official list
- kms_
key_ strname - The KMS key used for encryption/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- display
Name String - The display name. Must be unique.
- location String
- The location of the resource.
- type String
- The type of processor. For possible types see the official list
- kms
Key StringName - The KMS key used for encryption/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the DocumentAiProcessor resource produces the following output properties:
Look up Existing DocumentAiProcessor Resource
Get an existing DocumentAiProcessor 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?: DocumentAiProcessorState, opts?: CustomResourceOptions): DocumentAiProcessor
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
display_name: Optional[str] = None,
kms_key_name: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
type: Optional[str] = None) -> DocumentAiProcessor
func GetDocumentAiProcessor(ctx *Context, name string, id IDInput, state *DocumentAiProcessorState, opts ...ResourceOption) (*DocumentAiProcessor, error)
public static DocumentAiProcessor Get(string name, Input<string> id, DocumentAiProcessorState? state, CustomResourceOptions? opts = null)
public static DocumentAiProcessor get(String name, Output<String> id, DocumentAiProcessorState 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.
- Display
Name string - The display name. Must be unique.
- Kms
Key stringName - The KMS key used for encryption/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.
- Location string
- The location of the resource.
- Name string
- The resource name of the processor.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Type string
- The type of processor. For possible types see the official list
- Display
Name string - The display name. Must be unique.
- Kms
Key stringName - The KMS key used for encryption/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.
- Location string
- The location of the resource.
- Name string
- The resource name of the processor.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Type string
- The type of processor. For possible types see the official list
- display
Name String - The display name. Must be unique.
- kms
Key StringName - The KMS key used for encryption/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.
- location String
- The location of the resource.
- name String
- The resource name of the processor.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- type String
- The type of processor. For possible types see the official list
- display
Name string - The display name. Must be unique.
- kms
Key stringName - The KMS key used for encryption/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.
- location string
- The location of the resource.
- name string
- The resource name of the processor.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- type string
- The type of processor. For possible types see the official list
- display_
name str - The display name. Must be unique.
- kms_
key_ strname - The KMS key used for encryption/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.
- location str
- The location of the resource.
- name str
- The resource name of the processor.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- type str
- The type of processor. For possible types see the official list
- display
Name String - The display name. Must be unique.
- kms
Key StringName - The KMS key used for encryption/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.
- location String
- The location of the resource.
- name String
- The resource name of the processor.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- type String
- The type of processor. For possible types see the official list
Import
Processor can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/processors/{{name}}
{{project}}/{{location}}/{{name}}
{{location}}/{{name}}
When using the pulumi import
command, Processor can be imported using one of the formats above. For example:
$ pulumi import gcp:essentialcontacts/documentAiProcessor:DocumentAiProcessor default projects/{{project}}/locations/{{location}}/processors/{{name}}
$ pulumi import gcp:essentialcontacts/documentAiProcessor:DocumentAiProcessor default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:essentialcontacts/documentAiProcessor:DocumentAiProcessor default {{location}}/{{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.