CfnDocumentClassifierProps Struct
Properties for defining a CfnDocumentClassifier.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_comprehend as comprehend } from 'aws-cdk-lib';
const cfnDocumentClassifierProps: comprehend.CfnDocumentClassifierProps = {
dataAccessRoleArn: 'dataAccessRoleArn',
documentClassifierName: 'documentClassifierName',
inputDataConfig: {
augmentedManifests: [{
attributeNames: ['attributeNames'],
s3Uri: 's3Uri',
// the properties below are optional
split: 'split',
}],
dataFormat: 'dataFormat',
documentReaderConfig: {
documentReadAction: 'documentReadAction',
// the properties below are optional
documentReadMode: 'documentReadMode',
featureTypes: ['featureTypes'],
},
documents: {
s3Uri: 's3Uri',
// the properties below are optional
testS3Uri: 'testS3Uri',
},
documentType: 'documentType',
labelDelimiter: 'labelDelimiter',
s3Uri: 's3Uri',
testS3Uri: 'testS3Uri',
},
languageCode: 'languageCode',
// the properties below are optional
mode: 'mode',
modelKmsKeyId: 'modelKmsKeyId',
modelPolicy: 'modelPolicy',
outputDataConfig: {
kmsKeyId: 'kmsKeyId',
s3Uri: 's3Uri',
},
tags: [{
key: 'key',
value: 'value',
}],
versionName: 'versionName',
volumeKmsKeyId: 'volumeKmsKeyId',
vpcConfig: {
securityGroupIds: ['securityGroupIds'],
subnets: ['subnets'],
},
};
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_comprehend as comprehend
cfn_document_classifier_props = comprehend.CfnDocumentClassifierProps(
data_access_role_arn="dataAccessRoleArn",
document_classifier_name="documentClassifierName",
input_data_config=comprehend.CfnDocumentClassifier.DocumentClassifierInputDataConfigProperty(
augmented_manifests=[comprehend.CfnDocumentClassifier.AugmentedManifestsListItemProperty(
attribute_names=["attributeNames"],
s3_uri="s3Uri",
# the properties below are optional
split="split"
)],
data_format="dataFormat",
document_reader_config=comprehend.CfnDocumentClassifier.DocumentReaderConfigProperty(
document_read_action="documentReadAction",
# the properties below are optional
document_read_mode="documentReadMode",
feature_types=["featureTypes"]
),
documents=comprehend.CfnDocumentClassifier.DocumentClassifierDocumentsProperty(
s3_uri="s3Uri",
# the properties below are optional
test_s3_uri="testS3Uri"
),
document_type="documentType",
label_delimiter="labelDelimiter",
s3_uri="s3Uri",
test_s3_uri="testS3Uri"
),
language_code="languageCode",
# the properties below are optional
mode="mode",
model_kms_key_id="modelKmsKeyId",
model_policy="modelPolicy",
output_data_config=comprehend.CfnDocumentClassifier.DocumentClassifierOutputDataConfigProperty(
kms_key_id="kmsKeyId",
s3_uri="s3Uri"
),
tags=[CfnTag(
key="key",
value="value"
)],
version_name="versionName",
volume_kms_key_id="volumeKmsKeyId",
vpc_config=comprehend.CfnDocumentClassifier.VpcConfigProperty(
security_group_ids=["securityGroupIds"],
subnets=["subnets"]
)
)
// 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.*;
CfnDocumentClassifierProps cfnDocumentClassifierProps = CfnDocumentClassifierProps.builder()
.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();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Comprehend;
var cfnDocumentClassifierProps = new CfnDocumentClassifierProps {
DataAccessRoleArn = "dataAccessRoleArn",
DocumentClassifierName = "documentClassifierName",
InputDataConfig = new DocumentClassifierInputDataConfigProperty {
AugmentedManifests = new [] { new AugmentedManifestsListItemProperty {
AttributeNames = new [] { "attributeNames" },
S3Uri = "s3Uri",
// the properties below are optional
Split = "split"
} },
DataFormat = "dataFormat",
DocumentReaderConfig = new DocumentReaderConfigProperty {
DocumentReadAction = "documentReadAction",
// the properties below are optional
DocumentReadMode = "documentReadMode",
FeatureTypes = new [] { "featureTypes" }
},
Documents = new DocumentClassifierDocumentsProperty {
S3Uri = "s3Uri",
// the properties below are optional
TestS3Uri = "testS3Uri"
},
DocumentType = "documentType",
LabelDelimiter = "labelDelimiter",
S3Uri = "s3Uri",
TestS3Uri = "testS3Uri"
},
LanguageCode = "languageCode",
// the properties below are optional
Mode = "mode",
ModelKmsKeyId = "modelKmsKeyId",
ModelPolicy = "modelPolicy",
OutputDataConfig = new DocumentClassifierOutputDataConfigProperty {
KmsKeyId = "kmsKeyId",
S3Uri = "s3Uri"
},
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
VersionName = "versionName",
VolumeKmsKeyId = "volumeKmsKeyId",
VpcConfig = new VpcConfigProperty {
SecurityGroupIds = new [] { "securityGroupIds" },
Subnets = new [] { "subnets" }
}
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnDocumentClassifierProps := &CfnDocumentClassifierProps{
DataAccessRoleArn: jsii.String("dataAccessRoleArn"),
DocumentClassifierName: jsii.String("documentClassifierName"),
InputDataConfig: &DocumentClassifierInputDataConfigProperty{
AugmentedManifests: []interface{}{
&AugmentedManifestsListItemProperty{
AttributeNames: []*string{
jsii.String("attributeNames"),
},
S3Uri: jsii.String("s3Uri"),
// the properties below are optional
Split: jsii.String("split"),
},
},
DataFormat: jsii.String("dataFormat"),
DocumentReaderConfig: &DocumentReaderConfigProperty{
DocumentReadAction: jsii.String("documentReadAction"),
// the properties below are optional
DocumentReadMode: jsii.String("documentReadMode"),
FeatureTypes: []*string{
jsii.String("featureTypes"),
},
},
Documents: &DocumentClassifierDocumentsProperty{
S3Uri: jsii.String("s3Uri"),
// the properties below are optional
TestS3Uri: jsii.String("testS3Uri"),
},
DocumentType: jsii.String("documentType"),
LabelDelimiter: jsii.String("labelDelimiter"),
S3Uri: jsii.String("s3Uri"),
TestS3Uri: jsii.String("testS3Uri"),
},
LanguageCode: jsii.String("languageCode"),
// the properties below are optional
Mode: jsii.String("mode"),
ModelKmsKeyId: jsii.String("modelKmsKeyId"),
ModelPolicy: jsii.String("modelPolicy"),
OutputDataConfig: &DocumentClassifierOutputDataConfigProperty{
KmsKeyId: jsii.String("kmsKeyId"),
S3Uri: jsii.String("s3Uri"),
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
VersionName: jsii.String("versionName"),
VolumeKmsKeyId: jsii.String("volumeKmsKeyId"),
VpcConfig: &VpcConfigProperty{
SecurityGroupIds: []*string{
jsii.String("securityGroupIds"),
},
Subnets: []*string{
jsii.String("subnets"),
},
},
}
Properties
dataAccessRoleArnstringdata_access_role_arnstrdataAccessRoleArnStringDataAccessRoleArnstringDataAccessRoleArn*string required #documentClassifierNamestringdocument_classifier_namestrdocumentClassifierNameStringDocumentClassifierNamestringDocumentClassifierName*string required #inputDataConfigIResolvable | CfnDocumentClassifier.input_data_configtyping.Union[IResolvable, DocumentClassifierInputDataConfigProperty]inputDataConfigIResolvableInputDataConfigIResolvableInputDataConfiginterface{} required #languageCodestringlanguage_codestrlanguageCodeStringLanguageCodestringLanguageCode*string required #You can specify any of the languages supported by Amazon Comprehend. All documents must be in the same language.
notes
The classifier can be trained in multi-class (single-label) mode or multi-label mode. Multi-class mode identifies a single class label for each document and multi-label mode identifies one or more class labels for each document. Multiple labels for an individual document are separated by a delimiter. The default delimiter between labels is a pipe (|).
modelKmsKeyIdoptionalstringmodel_kms_key_idoptionalstrmodelKmsKeyIdoptionalStringModelKmsKeyIdoptionalstringModelKmsKeyIdoptional*string #The ModelKmsKeyId can be either of the following formats:
- KMS Key ID:
"1234abcd-12ab-34cd-56ef-1234567890ab" - Amazon Resource Name (ARN) of a KMS Key:
"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
modelPolicyoptionalstringmodel_policyoptionalstrmodelPolicyoptionalStringModelPolicyoptionalstringModelPolicyoptional*string #notes
You can use this policy to allow another AWS account to import your custom model.
Provide your policy as a JSON body that you enter as a UTF-8 encoded string without line breaks. To provide valid JSON, enclose the attribute names and values in double quotes. If the JSON body is also enclosed in double quotes, then you must escape the double quotes that are inside the policy:
"{\"attribute\": \"value\", \"attribute\": [\"value\"]}"
To avoid escaping quotes, you can use single quotes to enclose the policy and double quotes to enclose the JSON names and values:
'{"attribute": "value", "attribute": ["value"]}'
outputDataConfigoptionalIResolvable | CfnDocumentClassifier.output_data_configoptionaltyping.Union[IResolvable, DocumentClassifierOutputDataConfigProperty]outputDataConfigoptionalIResolvableOutputDataConfigoptionalIResolvableOutputDataConfigoptionalinterface{} #tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #A tag is a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
versionNameoptionalstringversion_nameoptionalstrversionNameoptionalStringVersionNameoptionalstringVersionNameoptional*string #Version names can have a maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The version name must be unique among all models with the same classifier name in the AWS account / AWS Region .
volumeKmsKeyIdoptionalstringvolume_kms_key_idoptionalstrvolumeKmsKeyIdoptionalStringVolumeKmsKeyIdoptionalstringVolumeKmsKeyIdoptional*string #The VolumeKmsKeyId can be either of the following formats:
- KMS Key ID:
"1234abcd-12ab-34cd-56ef-1234567890ab" - Amazon Resource Name (ARN) of a KMS Key:
"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
vpcConfigoptionalIResolvable | CfnDocumentClassifier.vpc_configoptionaltyping.Union[IResolvable, VpcConfigProperty]vpcConfigoptionalIResolvableVpcConfigoptionalIResolvableVpcConfigoptionalinterface{} #For more information, see Amazon VPC .