Class CfnEntityRecognizer

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IEntityRecognizerRef, IEnvironmentAware, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.140.0 (build 79fd58c)", date="2026-09-30T11:04:48.433Z") @Stability(Stable) public class CfnEntityRecognizer extends CfnResource implements IInspectable, IEntityRecognizerRef, ITaggableV2
An Amazon Comprehend custom entity recognizer: a trained model that identifies custom entity types in text, created via an asynchronous training job.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.comprehend.*;
 CfnEntityRecognizer cfnEntityRecognizer = CfnEntityRecognizer.Builder.create(this, "MyCfnEntityRecognizer")
         .dataAccessRoleArn("dataAccessRoleArn")
         .inputDataConfig(EntityRecognizerInputDataConfigProperty.builder()
                 .entityTypes(List.of(EntityTypesListItemProperty.builder()
                         .type("type")
                         .build()))
                 // the properties below are optional
                 .annotations(EntityRecognizerAnnotationsProperty.builder()
                         .s3Uri("s3Uri")
                         // the properties below are optional
                         .testS3Uri("testS3Uri")
                         .build())
                 .augmentedManifests(List.of(AugmentedManifestsListItemProperty.builder()
                         .attributeNames(List.of("attributeNames"))
                         .s3Uri("s3Uri")
                         // the properties below are optional
                         .annotationDataS3Uri("annotationDataS3Uri")
                         .documentType("documentType")
                         .sourceDocumentsS3Uri("sourceDocumentsS3Uri")
                         .split("split")
                         .build()))
                 .dataFormat("dataFormat")
                 .documents(EntityRecognizerDocumentsProperty.builder()
                         .s3Uri("s3Uri")
                         // the properties below are optional
                         .inputFormat("inputFormat")
                         .testS3Uri("testS3Uri")
                         .build())
                 .entityList(EntityRecognizerEntityListProperty.builder()
                         .s3Uri("s3Uri")
                         .build())
                 .build())
         .languageCode("languageCode")
         .recognizerName("recognizerName")
         // the properties below are optional
         .modelKmsKeyId("modelKmsKeyId")
         .modelPolicy("modelPolicy")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .versionName("versionName")
         .volumeKmsKeyId("volumeKmsKeyId")
         .vpcConfig(VpcConfigProperty.builder()
                 .securityGroupIds(List.of("securityGroupIds"))
                 .subnets(List.of("subnets"))
                 .build())
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnEntityRecognizer

      protected CfnEntityRecognizer(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnEntityRecognizer

      protected CfnEntityRecognizer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnEntityRecognizer

      @Stability(Stable) public CfnEntityRecognizer(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnEntityRecognizerProps props)
      Create a new AWS::Comprehend::EntityRecognizer.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • arnForEntityRecognizer

      @Stability(Stable) @NotNull public static String arnForEntityRecognizer(@NotNull IEntityRecognizerRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnEntityRecognizer

      @Stability(Stable) @NotNull public static Boolean isCfnEntityRecognizer(@NotNull Object x)
      Checks whether the given object is a CfnEntityRecognizer.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) that identifies the entity recognizer.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getEntityRecognizerRef

      @Stability(Stable) @NotNull public EntityRecognizerReference getEntityRecognizerRef()
      A reference to a EntityRecognizer resource.
      Specified by:
      getEntityRecognizerRef in interface IEntityRecognizerRef
    • getDataAccessRoleArn

      @Stability(Stable) @NotNull public String getDataAccessRoleArn()
      The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data.
    • setDataAccessRoleArn

      @Stability(Stable) public void setDataAccessRoleArn(@NotNull String value)
      The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data.
    • getInputDataConfig

      @Stability(Stable) @NotNull public Object getInputDataConfig()
      Specifies the format and location of the input data for an entity recognizer.

      Returns union: either IResolvable or CfnEntityRecognizer.EntityRecognizerInputDataConfigProperty

    • setInputDataConfig

      @Stability(Stable) public void setInputDataConfig(@NotNull IResolvable value)
      Specifies the format and location of the input data for an entity recognizer.
    • setInputDataConfig

      @Stability(Stable) public void setInputDataConfig(@NotNull CfnEntityRecognizer.EntityRecognizerInputDataConfigProperty value)
      Specifies the format and location of the input data for an entity recognizer.
    • getLanguageCode

      @Stability(Stable) @NotNull public String getLanguageCode()
      The language of the input documents.
    • setLanguageCode

      @Stability(Stable) public void setLanguageCode(@NotNull String value)
      The language of the input documents.
    • getRecognizerName

      @Stability(Stable) @NotNull public String getRecognizerName()
      The name given to the entity recognizer.
    • setRecognizerName

      @Stability(Stable) public void setRecognizerName(@NotNull String value)
      The name given to the entity recognizer.
    • getModelKmsKeyId

      @Stability(Stable) @Nullable public String getModelKmsKeyId()
      ID for the AWS KMS key that Amazon Comprehend uses to encrypt trained custom models.
    • setModelKmsKeyId

      @Stability(Stable) public void setModelKmsKeyId(@Nullable String value)
      ID for the AWS KMS key that Amazon Comprehend uses to encrypt trained custom models.
    • getModelPolicy

      @Stability(Stable) @Nullable public String getModelPolicy()
      The JSON resource-based policy to attach to your custom entity recognizer model.
    • setModelPolicy

      @Stability(Stable) public void setModelPolicy(@Nullable String value)
      The JSON resource-based policy to attach to your custom entity recognizer model.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      Tags to associate with the entity recognizer.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      Tags to associate with the entity recognizer.
    • getVersionName

      @Stability(Stable) @Nullable public String getVersionName()
      The version name given to the entity recognizer.
    • setVersionName

      @Stability(Stable) public void setVersionName(@Nullable String value)
      The version name given to the entity recognizer.
    • getVolumeKmsKeyId

      @Stability(Stable) @Nullable public String getVolumeKmsKeyId()
      ID for the AWS KMS key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s).
    • setVolumeKmsKeyId

      @Stability(Stable) public void setVolumeKmsKeyId(@Nullable String value)
      ID for the AWS KMS key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s).
    • getVpcConfig

      @Stability(Stable) @Nullable public Object getVpcConfig()
      Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for the job.

      Returns union: either IResolvable or CfnEntityRecognizer.VpcConfigProperty

    • setVpcConfig

      @Stability(Stable) public void setVpcConfig(@Nullable IResolvable value)
      Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for the job.
    • setVpcConfig

      @Stability(Stable) public void setVpcConfig(@Nullable CfnEntityRecognizer.VpcConfigProperty value)
      Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for the job.