Class CfnDocumentClassifier
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.comprehend.CfnDocumentClassifier
- All Implemented Interfaces:
IInspectable,IDocumentClassifierRef,IEnvironmentAware,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:33.423Z")
@Stability(Stable)
public class CfnDocumentClassifier
extends CfnResource
implements IInspectable, IDocumentClassifierRef, 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAn augmented manifest file that provides training data for your custom model.static final classA fluent builder forCfnDocumentClassifier.static interfaceThe location of the training documents.static interfaceThe input properties for training a document classifier.static interfaceProvide the location for output data from a custom classifier job.static interfaceProvides configuration parameters to override the default actions for extracting text from PDF documents and image files.static interfaceConfiguration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for the job.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.comprehend.IDocumentClassifierRef
IDocumentClassifierRef.Jsii$Default, IDocumentClassifierRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnDocumentClassifier(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDocumentClassifier(software.amazon.jsii.JsiiObjectRef objRef) CfnDocumentClassifier(software.constructs.Construct scope, String id, CfnDocumentClassifierProps props) Create a newAWS::Comprehend::DocumentClassifier. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringThe Amazon Resource Name (ARN) of the document classifier.Tag Manager which manages the tags for this resource.The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data.The name of the document classifier.A reference to a DocumentClassifier resource.Specifies the format and location of the input data for the job.The language of the input documents.getMode()Indicates the mode in which the classifier will be trained.ID for the AWS key that Amazon Comprehend uses to encrypt trained custom models.The resource-based policy to attach to your custom document classifier model.Provides output results configuration parameters for custom classifier jobs.getTags()Tags to associate with the document classifier.The version name given to the newly created classifier.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.Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnDocumentClassifier.renderProperties(Map<String, Object> props) voidsetDataAccessRoleArn(String value) The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data.voidsetDocumentClassifierName(String value) The name of the document classifier.voidsetInputDataConfig(IResolvable value) Specifies the format and location of the input data for the job.voidSpecifies the format and location of the input data for the job.voidsetLanguageCode(String value) The language of the input documents.voidIndicates the mode in which the classifier will be trained.voidsetModelKmsKeyId(String value) ID for the AWS key that Amazon Comprehend uses to encrypt trained custom models.voidsetModelPolicy(String value) The resource-based policy to attach to your custom document classifier model.voidsetOutputDataConfig(IResolvable value) Provides output results configuration parameters for custom classifier jobs.voidProvides output results configuration parameters for custom classifier jobs.voidTags to associate with the document classifier.voidsetVersionName(String value) The version name given to the newly created classifier.voidsetVolumeKmsKeyId(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.voidsetVpcConfig(IResolvable value) Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier.voidConfiguration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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) Create a newAWS::Comprehend::DocumentClassifier.- 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
-
arnForDocumentClassifier
@Stability(Stable) @NotNull public static String arnForDocumentClassifier(@NotNull IDocumentClassifierRef resource) - Parameters:
resource- This parameter is required.
-
isCfnDocumentClassifier
Checks whether the given object is a CfnDocumentClassifier.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the document classifier. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getDocumentClassifierRef
A reference to a DocumentClassifier resource.- Specified by:
getDocumentClassifierRefin interfaceIDocumentClassifierRef
-
getDataAccessRoleArn
The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data. -
setDataAccessRoleArn
The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data. -
getDocumentClassifierName
The name of the document classifier. -
setDocumentClassifierName
The name of the document classifier. -
getInputDataConfig
Specifies the format and location of the input data for the job.Returns union: either
IResolvableorCfnDocumentClassifier.DocumentClassifierInputDataConfigProperty -
setInputDataConfig
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
The language of the input documents. -
setLanguageCode
The language of the input documents. -
getMode
Indicates the mode in which the classifier will be trained. -
setMode
Indicates the mode in which the classifier will be trained. -
getModelKmsKeyId
ID for the AWS key that Amazon Comprehend uses to encrypt trained custom models. -
setModelKmsKeyId
ID for the AWS key that Amazon Comprehend uses to encrypt trained custom models. -
getModelPolicy
The resource-based policy to attach to your custom document classifier model. -
setModelPolicy
The resource-based policy to attach to your custom document classifier model. -
getOutputDataConfig
Provides output results configuration parameters for custom classifier jobs.Returns union: either
IResolvableorCfnDocumentClassifier.DocumentClassifierOutputDataConfigProperty -
setOutputDataConfig
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
Tags to associate with the document classifier. -
setTags
Tags to associate with the document classifier. -
getVersionName
The version name given to the newly created classifier. -
setVersionName
The version name given to the newly created classifier. -
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
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
Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier.Returns union: either
IResolvableorCfnDocumentClassifier.VpcConfigProperty -
setVpcConfig
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.
-