
com.pulumi.aws.comprehend.DocumentClassifier Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.comprehend;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.comprehend.DocumentClassifierArgs;
import com.pulumi.aws.comprehend.inputs.DocumentClassifierState;
import com.pulumi.aws.comprehend.outputs.DocumentClassifierInputDataConfig;
import com.pulumi.aws.comprehend.outputs.DocumentClassifierOutputDataConfig;
import com.pulumi.aws.comprehend.outputs.DocumentClassifierVpcConfig;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Resource for managing an AWS Comprehend Document Classifier.
*
* ## Example Usage
*
* ### Basic Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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()
* .name("example")
* .dataAccessRoleArn(exampleAwsIamRole.arn())
* .languageCode("en")
* .inputDataConfig(DocumentClassifierInputDataConfigArgs.builder()
* .s3Uri(documents.id().applyValue(id -> String.format("s3://%s/%s", test.bucket(),id)))
* .build())
* .build(), CustomResourceOptions.builder()
* .dependsOn(exampleAwsIamRolePolicy)
* .build());
*
* var entities = new BucketObjectv2("entities");
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Using `pulumi import`, import Comprehend Document Classifier using the ARN. For example:
*
* ```sh
* $ pulumi import aws:comprehend/documentClassifier:DocumentClassifier example arn:aws:comprehend:us-west-2:123456789012:document_classifier/example
* ```
*
*/
@ResourceType(type="aws:comprehend/documentClassifier:DocumentClassifier")
public class DocumentClassifier extends com.pulumi.resources.CustomResource {
/**
* ARN of the Document Classifier version.
*
*/
@Export(name="arn", refs={String.class}, tree="[0]")
private Output arn;
/**
* @return ARN of the Document Classifier version.
*
*/
public Output arn() {
return this.arn;
}
/**
* The ARN for an IAM Role which allows Comprehend to read the training and testing data.
*
*/
@Export(name="dataAccessRoleArn", refs={String.class}, tree="[0]")
private Output dataAccessRoleArn;
/**
* @return The ARN for an IAM Role which allows Comprehend to read the training and testing data.
*
*/
public Output dataAccessRoleArn() {
return this.dataAccessRoleArn;
}
/**
* Configuration for the training and testing data.
* See the `input_data_config` Configuration Block section below.
*
*/
@Export(name="inputDataConfig", refs={DocumentClassifierInputDataConfig.class}, tree="[0]")
private Output inputDataConfig;
/**
* @return Configuration for the training and testing data.
* See the `input_data_config` Configuration Block section below.
*
*/
public Output inputDataConfig() {
return this.inputDataConfig;
}
/**
* Two-letter language code for the language.
* One of `en`, `es`, `fr`, `it`, `de`, or `pt`.
*
*/
@Export(name="languageCode", refs={String.class}, tree="[0]")
private Output languageCode;
/**
* @return Two-letter language code for the language.
* One of `en`, `es`, `fr`, `it`, `de`, or `pt`.
*
*/
public Output languageCode() {
return this.languageCode;
}
/**
* The document classification mode.
* One of `MULTI_CLASS` or `MULTI_LABEL`.
* `MULTI_CLASS` is also known as "Single Label" in the AWS Console.
*
*/
@Export(name="mode", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> mode;
/**
* @return The document classification mode.
* One of `MULTI_CLASS` or `MULTI_LABEL`.
* `MULTI_CLASS` is also known as "Single Label" in the AWS Console.
*
*/
public Output> mode() {
return Codegen.optional(this.mode);
}
/**
* KMS Key used to encrypt trained Document Classifiers.
* Can be a KMS Key ID or a KMS Key ARN.
*
*/
@Export(name="modelKmsKeyId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> modelKmsKeyId;
/**
* @return KMS Key used to encrypt trained Document Classifiers.
* Can be a KMS Key ID or a KMS Key ARN.
*
*/
public Output> modelKmsKeyId() {
return Codegen.optional(this.modelKmsKeyId);
}
/**
* 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:
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return 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:
*
*/
public Output name() {
return this.name;
}
/**
* Configuration for the output results of training.
* See the `output_data_config` Configuration Block section below.
*
*/
@Export(name="outputDataConfig", refs={DocumentClassifierOutputDataConfig.class}, tree="[0]")
private Output outputDataConfig;
/**
* @return Configuration for the output results of training.
* See the `output_data_config` Configuration Block section below.
*
*/
public Output outputDataConfig() {
return this.outputDataConfig;
}
/**
* 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.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return 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.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
@Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]")
private Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy