Class CfnDocumentClassifier

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

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:33:59.547Z") @Stability(Stable) public class CfnDocumentClassifier extends CfnResource implements IInspectable, ITaggableV2
This resource creates and trains a document classifier to categorize documents.

You provide a set of training documents that are labeled with the categories that you want to identify. After the classifier is trained you can use it to categorize a set of labeled documents into the categories. For more information, see Document Classification in the Comprehend Developer Guide.

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.*;
 CfnDocumentClassifier cfnDocumentClassifier = CfnDocumentClassifier.Builder.create(this, "MyCfnDocumentClassifier")
         .dataAccessRoleArn("dataAccessRoleArn")
         .documentClassifierName("documentClassifierName")
         .inputDataConfig(DocumentClassifierInputDataConfigProperty.builder()
                 .augmentedManifests(List.of(AugmentedManifestsListItemProperty.builder()
                         .attributeNames(List.of("attributeNames"))
                         .s3Uri("s3Uri")
                         // the properties below are optional
                         .split("split")
                         .build()))
                 .dataFormat("dataFormat")
                 .documentReaderConfig(DocumentReaderConfigProperty.builder()
                         .documentReadAction("documentReadAction")
                         // the properties below are optional
                         .documentReadMode("documentReadMode")
                         .featureTypes(List.of("featureTypes"))
                         .build())
                 .documents(DocumentClassifierDocumentsProperty.builder()
                         .s3Uri("s3Uri")
                         // the properties below are optional
                         .testS3Uri("testS3Uri")
                         .build())
                 .documentType("documentType")
                 .labelDelimiter("labelDelimiter")
                 .s3Uri("s3Uri")
                 .testS3Uri("testS3Uri")
                 .build())
         .languageCode("languageCode")
         // the properties below are optional
         .mode("mode")
         .modelKmsKeyId("modelKmsKeyId")
         .modelPolicy("modelPolicy")
         .outputDataConfig(DocumentClassifierOutputDataConfigProperty.builder()
                 .kmsKeyId("kmsKeyId")
                 .s3Uri("s3Uri")
                 .build())
         .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

    • CfnDocumentClassifier

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

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

      @Stability(Stable) public CfnDocumentClassifier(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDocumentClassifierProps props)
      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

    • 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) of the document classifier.
    • 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
    • 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.
    • getDocumentClassifierName

      @Stability(Stable) @NotNull public String getDocumentClassifierName()
      The name of the document classifier.
    • setDocumentClassifierName

      @Stability(Stable) public void setDocumentClassifierName(@NotNull String value)
      The name of the document classifier.
    • getInputDataConfig

      @Stability(Stable) @NotNull public Object getInputDataConfig()
      Specifies the format and location of the input data for the job.
    • setInputDataConfig

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

      @Stability(Stable) public void setInputDataConfig(@NotNull CfnDocumentClassifier.DocumentClassifierInputDataConfigProperty value)
      Specifies the format and location of the input data for the job.
    • 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.
    • getMode

      @Stability(Stable) @Nullable public String getMode()
      Indicates the mode in which the classifier will be trained.
    • setMode

      @Stability(Stable) public void setMode(@Nullable String value)
      Indicates the mode in which the classifier will be trained.
    • 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 resource-based policy to attach to your custom document classifier model.
    • setModelPolicy

      @Stability(Stable) public void setModelPolicy(@Nullable String value)
      The resource-based policy to attach to your custom document classifier model.
    • getOutputDataConfig

      @Stability(Stable) @Nullable public Object getOutputDataConfig()
      Provides output results configuration parameters for custom classifier jobs.
    • setOutputDataConfig

      @Stability(Stable) public void setOutputDataConfig(@Nullable IResolvable value)
      Provides output results configuration parameters for custom classifier jobs.
    • setOutputDataConfig

      @Stability(Stable) public void setOutputDataConfig(@Nullable CfnDocumentClassifier.DocumentClassifierOutputDataConfigProperty value)
      Provides output results configuration parameters for custom classifier jobs.
    • getTags

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

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

      @Stability(Stable) @Nullable public String getVersionName()
      The version name given to the newly created classifier.
    • setVersionName

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

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

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

      @Stability(Stable) @Nullable public Object getVpcConfig()
      Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier.
    • setVpcConfig

      @Stability(Stable) public void setVpcConfig(@Nullable IResolvable value)
      Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier.
    • setVpcConfig

      @Stability(Stable) public void setVpcConfig(@Nullable CfnDocumentClassifier.VpcConfigProperty value)
      Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier.