Class EntityRecognizer


  • public class EntityRecognizer
    extends com.pulumi.resources.CustomResource
    Resource for managing an AWS Comprehend Entity Recognizer. ## 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.EntityRecognizer;
     import com.pulumi.aws.comprehend.EntityRecognizerArgs;
     import com.pulumi.aws.comprehend.inputs.EntityRecognizerInputDataConfigArgs;
     import com.pulumi.aws.comprehend.inputs.EntityRecognizerInputDataConfigDocumentsArgs;
     import com.pulumi.aws.comprehend.inputs.EntityRecognizerInputDataConfigEntityListArgs;
     import com.pulumi.aws.comprehend.inputs.EntityRecognizerInputDataConfigEntityTypeArgs;
     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 entities = new BucketObjectv2("entities");
     
             var example = new EntityRecognizer("example", EntityRecognizerArgs.builder()
                 .inputDataConfig(EntityRecognizerInputDataConfigArgs.builder()
                     .documents(EntityRecognizerInputDataConfigDocumentsArgs.builder()
                         .s3Uri(documents.key().applyValue(_key -> String.format("s3://%s/%s", documentsAwsS3Bucket.bucket(),_key)))
                         .build())
                     .entityList(EntityRecognizerInputDataConfigEntityListArgs.builder()
                         .s3Uri(entities.key().applyValue(_key -> String.format("s3://%s/%s", entitiesAwsS3Bucket.bucket(),_key)))
                         .build())
                     .entityTypes(                
                         EntityRecognizerInputDataConfigEntityTypeArgs.builder()
                             .type("ENTITY_1")
                             .build(),
                         EntityRecognizerInputDataConfigEntityTypeArgs.builder()
                             .type("ENTITY_2")
                             .build())
                     .build())
                 .name("example")
                 .dataAccessRoleArn(exampleAwsIamRole.arn())
                 .languageCode("en")
                 .build(), CustomResourceOptions.builder()
                     .dependsOn(exampleAwsIamRolePolicy)
                     .build());
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required - `arn` (String) ARN of the Comprehend entity recognizer. Using `pulumi import`, import Comprehend Entity Recognizer using the ARN. For example: ```sh $ pulumi import aws:comprehend/entityRecognizer:EntityRecognizer example arn:aws:comprehend:us-west-2:123456789012:entity-recognizer/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 EntityRecognizer get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, EntityRecognizerState 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<EntityRecognizerInputDataConfig> inputDataConfig()  
      com.pulumi.core.Output<java.lang.String> languageCode()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> modelKmsKeyId()  
      com.pulumi.core.Output<java.lang.String> name()  
      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<EntityRecognizerVpcConfig>> 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

      • EntityRecognizer

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

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

        public EntityRecognizer​(java.lang.String name,
                                EntityRecognizerArgs 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 Entity Recognizer 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<EntityRecognizerInputDataConfig> 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`.
      • modelKmsKeyId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> modelKmsKeyId()
        Returns:
        The ID or ARN of a KMS Key used to encrypt trained Entity Recognizers.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Name for the Entity Recognizer. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hyphen (`-`). The following arguments are optional:
      • 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 Entity Recognizer. Each version must have a unique name within the Entity Recognizer. 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:
        ID or ARN of a KMS Key used to encrypt storage volumes during job processing.
      • vpcConfig

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

        public static EntityRecognizer get​(java.lang.String name,
                                           com.pulumi.core.Output<java.lang.String> id,
                                           @Nullable
                                           EntityRecognizerState 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.