DocumentClassifierArgs

data class DocumentClassifierArgs(val dataAccessRoleArn: Output<String>? = null, val inputDataConfig: Output<DocumentClassifierInputDataConfigArgs>? = null, val languageCode: Output<String>? = null, val mode: Output<String>? = null, val modelKmsKeyId: Output<String>? = null, val name: Output<String>? = null, val outputDataConfig: Output<DocumentClassifierOutputDataConfigArgs>? = null, val tags: Output<Map<String, String>>? = null, val versionName: Output<String>? = null, val versionNamePrefix: Output<String>? = null, val volumeKmsKeyId: Output<String>? = null, val vpcConfig: Output<DocumentClassifierVpcConfigArgs>? = null) : ConvertibleToJava<DocumentClassifierArgs>

Resource for managing an AWS Comprehend Document Classifier.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketObjectv2;
import com.pulumi.aws.comprehend.DocumentClassifier;
import com.pulumi.aws.comprehend.DocumentClassifierArgs;
import com.pulumi.aws.comprehend.inputs.DocumentClassifierInputDataConfigArgs;
import com.pulumi.resources.CustomResourceOptions;
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 documents = new BucketObjectv2("documents");
var example = new DocumentClassifier("example", DocumentClassifierArgs.builder()
.dataAccessRoleArn(aws_iam_role.example().arn())
.languageCode("en")
.inputDataConfig(DocumentClassifierInputDataConfigArgs.builder()
.s3Uri(documents.id().applyValue(id -> String.format("s3://%s/%s", aws_s3_bucket.test().bucket(),id)))
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(aws_iam_role_policy.example())
.build());
var entities = new BucketObjectv2("entities");
}
}

Import

Comprehend Document Classifier can be imported using the ARN, e.g.,

$ pulumi import aws:comprehend/documentClassifier:DocumentClassifier example arn:aws:comprehend:us-west-2:123456789012:document_classifier/example

Constructors

Link copied to clipboard
constructor(dataAccessRoleArn: Output<String>? = null, inputDataConfig: Output<DocumentClassifierInputDataConfigArgs>? = null, languageCode: Output<String>? = null, mode: Output<String>? = null, modelKmsKeyId: Output<String>? = null, name: Output<String>? = null, outputDataConfig: Output<DocumentClassifierOutputDataConfigArgs>? = null, tags: Output<Map<String, String>>? = null, versionName: Output<String>? = null, versionNamePrefix: Output<String>? = null, volumeKmsKeyId: Output<String>? = null, vpcConfig: Output<DocumentClassifierVpcConfigArgs>? = null)

Properties

Link copied to clipboard
val dataAccessRoleArn: Output<String>? = null

The ARN for an IAM Role which allows Comprehend to read the training and testing data.

Link copied to clipboard

Configuration for the training and testing data. See the input_data_config Configuration Block section below.

Link copied to clipboard
val languageCode: Output<String>? = null

Two-letter language code for the language. One of en, es, fr, it, de, or pt.

Link copied to clipboard
val mode: Output<String>? = null

The document classification mode. One of MULTI_CLASS or MULTI_LABEL. MULTI_CLASS is also known as "Single Label" in the AWS Console.

Link copied to clipboard
val modelKmsKeyId: Output<String>? = null

KMS Key used to encrypt trained Document Classifiers. Can be a KMS Key ID or a KMS Key ARN.

Link copied to clipboard
val name: Output<String>? = null

Name for the Document Classifier. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (-). The following arguments are optional:

Link copied to clipboard

Configuration for the output results of training. See the output_data_config Configuration Block section below.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A map of tags to assign to the resource. If configured with a provider default_tags Configuration Block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val versionName: Output<String>? = null

Name for the version of the Document Classifier. Each version must have a unique name within the Document Classifier. If omitted, the provider will assign a random, unique version name. If explicitly set to "", no version name will be set. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (-). Conflicts with version_name_prefix.

Link copied to clipboard
val versionNamePrefix: Output<String>? = null

Creates a unique version name beginning with the specified prefix. Has a maximum length of 37 characters. Can contain upper- and lower-case letters, numbers, and hypen (-). Conflicts with version_name.

Link copied to clipboard
val volumeKmsKeyId: Output<String>? = null

KMS Key used to encrypt storage volumes during job processing. Can be a KMS Key ID or a KMS Key ARN.

Link copied to clipboard

Configuration parameters for VPC to contain Document Classifier resources. See the vpc_config Configuration Block section below.

Functions

Link copied to clipboard
open override fun toJava(): DocumentClassifierArgs