EntityRecognizer

class EntityRecognizer : KotlinCustomResource

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.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 entities = new BucketObjectv2("entities");
var example = new EntityRecognizer("example", EntityRecognizerArgs.builder()
.dataAccessRoleArn(aws_iam_role.example().arn())
.languageCode("en")
.inputDataConfig(EntityRecognizerInputDataConfigArgs.builder()
.entityTypes(
EntityRecognizerInputDataConfigEntityTypeArgs.builder()
.type("ENTITY_1")
.build(),
EntityRecognizerInputDataConfigEntityTypeArgs.builder()
.type("ENTITY_2")
.build())
.documents(EntityRecognizerInputDataConfigDocumentsArgs.builder()
.s3Uri(documents.id().applyValue(id -> String.format("s3://%s/%s", aws_s3_bucket.documents().bucket(),id)))
.build())
.entityList(EntityRecognizerInputDataConfigEntityListArgs.builder()
.s3Uri(entities.id().applyValue(id -> String.format("s3://%s/%s", aws_s3_bucket.entities().bucket(),id)))
.build())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(aws_iam_role_policy.example())
.build());
}
}

Import

Comprehend Entity Recognizer can be imported using the ARN, e.g.,

$ pulumi import aws:comprehend/entityRecognizer:EntityRecognizer example arn:aws:comprehend:us-west-2:123456789012:entity-recognizer/example

Properties

Link copied to clipboard
val arn: Output<String>

ARN of the Entity Recognizer version.

Link copied to clipboard

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

Link copied to clipboard
val id: Output<String>
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>

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

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

The ID or ARN of a KMS Key used to encrypt trained Entity Recognizers.

Link copied to clipboard
val name: Output<String>

Name for the Entity Recognizer. 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
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val tags: Output<Map<String, String>>?

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 tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val versionName: Output<String>

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 hypen (-). Conflicts with version_name_prefix.

Link copied to clipboard

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>?

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

Link copied to clipboard

Configuration parameters for VPC to contain Entity Recognizer resources. See the vpc_config Configuration Block section below.