Class DocumentClassifier


  • public class DocumentClassifier
    extends com.pulumi.resources.CustomResource
    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.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 documents = new BucketObjectv2("documents");
     
             var example = new DocumentClassifier("example", DocumentClassifierArgs.builder()
                 .inputDataConfig(DocumentClassifierInputDataConfigArgs.builder()
                     .s3Uri(documents.key().applyValue(_key -> String.format("s3://%s/%s", test.bucket(),_key)))
                     .build())
                 .name("example")
                 .dataAccessRoleArn(exampleAwsIamRole.arn())
                 .languageCode("en")
                 .build(), CustomResourceOptions.builder()
                     .dependsOn(exampleAwsIamRolePolicy)
                     .build());
     
             var entities = new BucketObjectv2("entities");
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required - `arn` (String) ARN of the Comprehend document classifier. 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 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> arn()  
      com.pulumi.core.Output<java.lang.String> dataAccessRoleArn()  
      static DocumentClassifier get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, DocumentClassifierState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<DocumentClassifierInputDataConfig> inputDataConfig()  
      com.pulumi.core.Output<java.lang.String> languageCode()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> mode()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> modelKmsKeyId()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<DocumentClassifierOutputDataConfig> outputDataConfig()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()  
      com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()  
      com.pulumi.core.Output<java.lang.String> versionName()  
      com.pulumi.core.Output<java.lang.String> versionNamePrefix()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> volumeKmsKeyId()  
      com.pulumi.core.Output<java.util.Optional<DocumentClassifierVpcConfig>> vpcConfig()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DocumentClassifier

        public DocumentClassifier​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • DocumentClassifier

        public DocumentClassifier​(java.lang.String name,
                                  DocumentClassifierArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • DocumentClassifier

        public DocumentClassifier​(java.lang.String name,
                                  DocumentClassifierArgs args,
                                  @Nullable
                                  com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        ARN of the Document Classifier version.
      • dataAccessRoleArn

        public com.pulumi.core.Output<java.lang.String> dataAccessRoleArn()
        Returns:
        The ARN for an IAM Role which allows Comprehend to read the training and testing data.
      • inputDataConfig

        public com.pulumi.core.Output<DocumentClassifierInputDataConfig> inputDataConfig()
        Returns:
        Configuration for the training and testing data. See the `inputDataConfig` Configuration Block section below.
      • languageCode

        public com.pulumi.core.Output<java.lang.String> languageCode()
        Returns:
        Two-letter language code for the language. One of `en`, `es`, `fr`, `it`, `de`, or `pt`.
      • mode

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> mode()
        Returns:
        The document classification mode. One of `MULTI_CLASS` or `MULTI_LABEL`. `MULTI_CLASS` is also known as "Single Label" in the AWS Console.
      • modelKmsKeyId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> modelKmsKeyId()
        Returns:
        KMS Key used to encrypt trained Document Classifiers. Can be a KMS Key ID or a KMS Key ARN.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Name for the Document Classifier. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hyphen (`-`). The following arguments are optional:
      • outputDataConfig

        public com.pulumi.core.Output<DocumentClassifierOutputDataConfig> outputDataConfig()
        Returns:
        Configuration for the output results of training. See the `outputDataConfig` Configuration Block section below.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        A map of tags to assign to the resource. If configured with a provider `defaultTags` Configuration Block present, tags with matching keys will overwrite those defined at the provider-level.
      • tagsAll

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()
        Returns:
        A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
      • versionName

        public com.pulumi.core.Output<java.lang.String> versionName()
        Returns:
        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 hyphen (`-`). Conflicts with `versionNamePrefix`.
      • versionNamePrefix

        public com.pulumi.core.Output<java.lang.String> versionNamePrefix()
        Returns:
        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 hyphen (`-`). Conflicts with `versionName`.
      • volumeKmsKeyId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> volumeKmsKeyId()
        Returns:
        KMS Key used to encrypt storage volumes during job processing. Can be a KMS Key ID or a KMS Key ARN.
      • vpcConfig

        public com.pulumi.core.Output<java.util.Optional<DocumentClassifierVpcConfig>> vpcConfig()
        Returns:
        Configuration parameters for VPC to contain Document Classifier resources. See the `vpcConfig` Configuration Block section below.
      • get

        public static DocumentClassifier get​(java.lang.String name,
                                             com.pulumi.core.Output<java.lang.String> id,
                                             @Nullable
                                             DocumentClassifierState state,
                                             @Nullable
                                             com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.