

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::Comprehend::DocumentClassifier
<a name="aws-resource-comprehend-documentclassifier"></a>

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](https://docs.aws.amazon.com/comprehend/latest/dg/how-document-classification.html) in the Comprehend Developer Guide.

## Syntax
<a name="aws-resource-comprehend-documentclassifier-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-comprehend-documentclassifier-syntax.json"></a>

```
{
  "Type" : "AWS::Comprehend::DocumentClassifier",
  "Properties" : {
      "[DataAccessRoleArn](#cfn-comprehend-documentclassifier-dataaccessrolearn)" : String,
      "[DocumentClassifierName](#cfn-comprehend-documentclassifier-documentclassifiername)" : String,
      "[InputDataConfig](#cfn-comprehend-documentclassifier-inputdataconfig)" : DocumentClassifierInputDataConfig,
      "[LanguageCode](#cfn-comprehend-documentclassifier-languagecode)" : String,
      "[Mode](#cfn-comprehend-documentclassifier-mode)" : String,
      "[ModelKmsKeyId](#cfn-comprehend-documentclassifier-modelkmskeyid)" : String,
      "[ModelPolicy](#cfn-comprehend-documentclassifier-modelpolicy)" : String,
      "[OutputDataConfig](#cfn-comprehend-documentclassifier-outputdataconfig)" : DocumentClassifierOutputDataConfig,
      "[Tags](#cfn-comprehend-documentclassifier-tags)" : [ Tag, ... ],
      "[VersionName](#cfn-comprehend-documentclassifier-versionname)" : String,
      "[VolumeKmsKeyId](#cfn-comprehend-documentclassifier-volumekmskeyid)" : String,
      "[VpcConfig](#cfn-comprehend-documentclassifier-vpcconfig)" : VpcConfig
    }
}
```

### YAML
<a name="aws-resource-comprehend-documentclassifier-syntax.yaml"></a>

```
Type: AWS::Comprehend::DocumentClassifier
Properties:
  [DataAccessRoleArn](#cfn-comprehend-documentclassifier-dataaccessrolearn): String
  [DocumentClassifierName](#cfn-comprehend-documentclassifier-documentclassifiername): String
  [InputDataConfig](#cfn-comprehend-documentclassifier-inputdataconfig): 
    DocumentClassifierInputDataConfig
  [LanguageCode](#cfn-comprehend-documentclassifier-languagecode): String
  [Mode](#cfn-comprehend-documentclassifier-mode): String
  [ModelKmsKeyId](#cfn-comprehend-documentclassifier-modelkmskeyid): String
  [ModelPolicy](#cfn-comprehend-documentclassifier-modelpolicy): String
  [OutputDataConfig](#cfn-comprehend-documentclassifier-outputdataconfig): 
    DocumentClassifierOutputDataConfig
  [Tags](#cfn-comprehend-documentclassifier-tags): 
    - Tag
  [VersionName](#cfn-comprehend-documentclassifier-versionname): String
  [VolumeKmsKeyId](#cfn-comprehend-documentclassifier-volumekmskeyid): String
  [VpcConfig](#cfn-comprehend-documentclassifier-vpcconfig): 
    VpcConfig
```

## Properties
<a name="aws-resource-comprehend-documentclassifier-properties"></a>

`DataAccessRoleArn`  <a name="cfn-comprehend-documentclassifier-dataaccessrolearn"></a>
The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data.  
*Required*: Yes  
*Type*: String  
*Pattern*: `arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DocumentClassifierName`  <a name="cfn-comprehend-documentclassifier-documentclassifiername"></a>
The name of the document classifier.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[a-zA-Z0-9](-*[a-zA-Z0-9])*$`  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`InputDataConfig`  <a name="cfn-comprehend-documentclassifier-inputdataconfig"></a>
Specifies the format and location of the input data for the job.  
*Required*: Yes  
*Type*: [DocumentClassifierInputDataConfig](aws-properties-comprehend-documentclassifier-documentclassifierinputdataconfig.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LanguageCode`  <a name="cfn-comprehend-documentclassifier-languagecode"></a>
The language of the input documents. You can specify any of the languages supported by Amazon Comprehend. All documents must be in the same language.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `en | es | fr | it | de | pt`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Mode`  <a name="cfn-comprehend-documentclassifier-mode"></a>
Indicates the mode in which the classifier will be trained. 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 (\$1).  
*Required*: No  
*Type*: String  
*Allowed values*: `MULTI_CLASS | MULTI_LABEL`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ModelKmsKeyId`  <a name="cfn-comprehend-documentclassifier-modelkmskeyid"></a>
ID for the AWS KMS key that Amazon Comprehend uses to encrypt trained custom models. 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"`
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ModelPolicy`  <a name="cfn-comprehend-documentclassifier-modelpolicy"></a>
The resource-based policy to attach to your custom document classifier model. 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"]}'`   
*Required*: No  
*Type*: String  
*Pattern*: `[\u0009\u000A\u000D\u0020-\u00FF]+`  
*Minimum*: `1`  
*Maximum*: `20000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OutputDataConfig`  <a name="cfn-comprehend-documentclassifier-outputdataconfig"></a>
 Provides output results configuration parameters for custom classifier jobs.  
*Required*: No  
*Type*: [DocumentClassifierOutputDataConfig](aws-properties-comprehend-documentclassifier-documentclassifieroutputdataconfig.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-comprehend-documentclassifier-tags"></a>
Tags to associate with the document classifier. 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.   
*Required*: No  
*Type*: Array of [Tag](aws-properties-comprehend-documentclassifier-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VersionName`  <a name="cfn-comprehend-documentclassifier-versionname"></a>
The version name given to the newly created classifier. Version names can have a maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores (\$1) are allowed. The version name must be unique among all models with the same classifier name in the AWS account/AWS Region.  
*Required*: No  
*Type*: String  
*Pattern*: `^[a-zA-Z0-9](-*[a-zA-Z0-9])*$`  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`VolumeKmsKeyId`  <a name="cfn-comprehend-documentclassifier-volumekmskeyid"></a>
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. 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"`
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`VpcConfig`  <a name="cfn-comprehend-documentclassifier-vpcconfig"></a>
 Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier. For more information, see [Amazon VPC](https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html).   
*Required*: No  
*Type*: [VpcConfig](aws-properties-comprehend-documentclassifier-vpcconfig.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-comprehend-documentclassifier-return-values"></a>

### Ref
<a name="aws-resource-comprehend-documentclassifier-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the Amazon Resource Name (ARN) of the document classifier.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-comprehend-documentclassifier-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-comprehend-documentclassifier-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the document classifier.

# AWS::Comprehend::DocumentClassifier AugmentedManifestsListItem
<a name="aws-properties-comprehend-documentclassifier-augmentedmanifestslistitem"></a>

An augmented manifest file that provides training data for your custom model. An augmented manifest file is a labeled dataset that is produced by Amazon SageMaker Ground Truth.

## Syntax
<a name="aws-properties-comprehend-documentclassifier-augmentedmanifestslistitem-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-comprehend-documentclassifier-augmentedmanifestslistitem-syntax.json"></a>

```
{
  "[AttributeNames](#cfn-comprehend-documentclassifier-augmentedmanifestslistitem-attributenames)" : [ String, ... ],
  "[S3Uri](#cfn-comprehend-documentclassifier-augmentedmanifestslistitem-s3uri)" : String,
  "[Split](#cfn-comprehend-documentclassifier-augmentedmanifestslistitem-split)" : String
}
```

### YAML
<a name="aws-properties-comprehend-documentclassifier-augmentedmanifestslistitem-syntax.yaml"></a>

```
  [AttributeNames](#cfn-comprehend-documentclassifier-augmentedmanifestslistitem-attributenames): 
    - String
  [S3Uri](#cfn-comprehend-documentclassifier-augmentedmanifestslistitem-s3uri): String
  [Split](#cfn-comprehend-documentclassifier-augmentedmanifestslistitem-split): String
```

## Properties
<a name="aws-properties-comprehend-documentclassifier-augmentedmanifestslistitem-properties"></a>

`AttributeNames`  <a name="cfn-comprehend-documentclassifier-augmentedmanifestslistitem-attributenames"></a>
The JSON attribute that contains the annotations for your training documents. The number of attribute names that you specify depends on whether your augmented manifest file is the output of a single labeling job or a chained labeling job.  
If your file is the output of a single labeling job, specify the LabelAttributeName key that was used when the job was created in Ground Truth.  
If your file is the output of a chained labeling job, specify the LabelAttributeName key for one or more jobs in the chain. Each LabelAttributeName key provides the annotations from an individual job.  
*Required*: Yes  
*Type*: Array of String  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`S3Uri`  <a name="cfn-comprehend-documentclassifier-augmentedmanifestslistitem-s3uri"></a>
The Amazon S3 location of the augmented manifest file.  
*Required*: Yes  
*Type*: String  
*Pattern*: `s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?`  
*Maximum*: `1024`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Split`  <a name="cfn-comprehend-documentclassifier-augmentedmanifestslistitem-split"></a>
The purpose of the data you've provided in the augmented manifest. You can either train or test this data. If you don't specify, the default is train.  
TRAIN - all of the documents in the manifest will be used for training. If no test documents are provided, Amazon Comprehend will automatically reserve a portion of the training documents for testing.  
 TEST - all of the documents in the manifest will be used for testing.  
*Required*: No  
*Type*: String  
*Allowed values*: `TRAIN | TEST`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::Comprehend::DocumentClassifier DocumentClassifierDocuments
<a name="aws-properties-comprehend-documentclassifier-documentclassifierdocuments"></a>

The location of the training documents. This parameter is required in a request to create a semi-structured document classification model.

## Syntax
<a name="aws-properties-comprehend-documentclassifier-documentclassifierdocuments-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-comprehend-documentclassifier-documentclassifierdocuments-syntax.json"></a>

```
{
  "[S3Uri](#cfn-comprehend-documentclassifier-documentclassifierdocuments-s3uri)" : String,
  "[TestS3Uri](#cfn-comprehend-documentclassifier-documentclassifierdocuments-tests3uri)" : String
}
```

### YAML
<a name="aws-properties-comprehend-documentclassifier-documentclassifierdocuments-syntax.yaml"></a>

```
  [S3Uri](#cfn-comprehend-documentclassifier-documentclassifierdocuments-s3uri): String
  [TestS3Uri](#cfn-comprehend-documentclassifier-documentclassifierdocuments-tests3uri): String
```

## Properties
<a name="aws-properties-comprehend-documentclassifier-documentclassifierdocuments-properties"></a>

`S3Uri`  <a name="cfn-comprehend-documentclassifier-documentclassifierdocuments-s3uri"></a>
The S3 URI location of the training documents specified in the S3Uri CSV file.  
*Required*: Yes  
*Type*: String  
*Pattern*: `s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?`  
*Maximum*: `1024`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`TestS3Uri`  <a name="cfn-comprehend-documentclassifier-documentclassifierdocuments-tests3uri"></a>
The S3 URI location of the test documents included in the TestS3Uri CSV file. This field is not required if you do not specify a test CSV file.  
*Required*: No  
*Type*: String  
*Pattern*: `s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?`  
*Maximum*: `1024`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::Comprehend::DocumentClassifier DocumentClassifierInputDataConfig
<a name="aws-properties-comprehend-documentclassifier-documentclassifierinputdataconfig"></a>

The input properties for training a document classifier. 

For more information on how the input file is formatted, see [Preparing training data](https://docs.aws.amazon.com/comprehend/latest/dg/prep-classifier-data.html) in the Comprehend Developer Guide. 

## Syntax
<a name="aws-properties-comprehend-documentclassifier-documentclassifierinputdataconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-comprehend-documentclassifier-documentclassifierinputdataconfig-syntax.json"></a>

```
{
  "[AugmentedManifests](#cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-augmentedmanifests)" : [ AugmentedManifestsListItem, ... ],
  "[DataFormat](#cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-dataformat)" : String,
  "[DocumentReaderConfig](#cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-documentreaderconfig)" : DocumentReaderConfig,
  "[Documents](#cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-documents)" : DocumentClassifierDocuments,
  "[DocumentType](#cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-documenttype)" : String,
  "[LabelDelimiter](#cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-labeldelimiter)" : String,
  "[S3Uri](#cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-s3uri)" : String,
  "[TestS3Uri](#cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-tests3uri)" : String
}
```

### YAML
<a name="aws-properties-comprehend-documentclassifier-documentclassifierinputdataconfig-syntax.yaml"></a>

```
  [AugmentedManifests](#cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-augmentedmanifests): 
    - AugmentedManifestsListItem
  [DataFormat](#cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-dataformat): String
  [DocumentReaderConfig](#cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-documentreaderconfig): 
    DocumentReaderConfig
  [Documents](#cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-documents): 
    DocumentClassifierDocuments
  [DocumentType](#cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-documenttype): String
  [LabelDelimiter](#cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-labeldelimiter): String
  [S3Uri](#cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-s3uri): String
  [TestS3Uri](#cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-tests3uri): String
```

## Properties
<a name="aws-properties-comprehend-documentclassifier-documentclassifierinputdataconfig-properties"></a>

`AugmentedManifests`  <a name="cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-augmentedmanifests"></a>
A list of augmented manifest files that provide training data for your custom model. An augmented manifest file is a labeled dataset that is produced by Amazon SageMaker Ground Truth.  
This parameter is required if you set `DataFormat` to `AUGMENTED_MANIFEST`.  
*Required*: No  
*Type*: Array of [AugmentedManifestsListItem](aws-properties-comprehend-documentclassifier-augmentedmanifestslistitem.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DataFormat`  <a name="cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-dataformat"></a>
The format of your training data:  
+ `COMPREHEND_CSV`: A two-column CSV file, where labels are provided in the first column, and documents are provided in the second. If you use this value, you must provide the `S3Uri` parameter in your request.
+ `AUGMENTED_MANIFEST`: A labeled dataset that is produced by Amazon SageMaker Ground Truth. This file is in JSON lines format. Each line is a complete JSON object that contains a training document and its associated labels. 

  If you use this value, you must provide the `AugmentedManifests` parameter in your request.
If you don't specify a value, Amazon Comprehend uses `COMPREHEND_CSV` as the default.  
*Required*: No  
*Type*: String  
*Allowed values*: `COMPREHEND_CSV | AUGMENTED_MANIFEST`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DocumentReaderConfig`  <a name="cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-documentreaderconfig"></a>
Property description not available.  
*Required*: No  
*Type*: [DocumentReaderConfig](aws-properties-comprehend-documentclassifier-documentreaderconfig.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Documents`  <a name="cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-documents"></a>
The S3 location of the training documents. This parameter is required in a request to create a native document model.  
*Required*: No  
*Type*: [DocumentClassifierDocuments](aws-properties-comprehend-documentclassifier-documentclassifierdocuments.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DocumentType`  <a name="cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-documenttype"></a>
The type of input documents for training the model. Provide plain-text documents to create a plain-text model, and provide semi-structured documents to create a native document model.  
*Required*: No  
*Type*: String  
*Allowed values*: `PLAIN_TEXT_DOCUMENT | SEMI_STRUCTURED_DOCUMENT`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LabelDelimiter`  <a name="cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-labeldelimiter"></a>
Indicates the delimiter used to separate each label for training a multi-label classifier. The default delimiter between labels is a pipe (\$1). You can use a different character as a delimiter (if it's an allowed character) by specifying it under Delimiter for labels. If the training documents use a delimiter other than the default or the delimiter you specify, the labels on that line will be combined to make a single unique label, such as LABELLABELLABEL.  
*Required*: No  
*Type*: String  
*Pattern*: `^[ ~!@#$%^*\-_+=|\\:;\t>?/]$`  
*Minimum*: `1`  
*Maximum*: `1`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`S3Uri`  <a name="cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-s3uri"></a>
The Amazon S3 URI for the input data. The S3 bucket must be in the same Region as the API endpoint that you are calling. The URI can point to a single input file or it can provide the prefix for a collection of input files.  
For example, if you use the URI `S3://bucketName/prefix`, if the prefix is a single file, Amazon Comprehend uses that file as input. If more than one file begins with the prefix, Amazon Comprehend uses all of them as input.  
This parameter is required if you set `DataFormat` to `COMPREHEND_CSV`.  
*Required*: No  
*Type*: String  
*Pattern*: `s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?`  
*Maximum*: `1024`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`TestS3Uri`  <a name="cfn-comprehend-documentclassifier-documentclassifierinputdataconfig-tests3uri"></a>
This specifies the Amazon S3 location that contains the test annotations for the document classifier. The URI must be in the same AWS Region as the API endpoint that you are calling.   
*Required*: No  
*Type*: String  
*Pattern*: `s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?`  
*Maximum*: `1024`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::Comprehend::DocumentClassifier DocumentClassifierOutputDataConfig
<a name="aws-properties-comprehend-documentclassifier-documentclassifieroutputdataconfig"></a>

Provide the location for output data from a custom classifier job. This field is mandatory if you are training a native document model.

## Syntax
<a name="aws-properties-comprehend-documentclassifier-documentclassifieroutputdataconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-comprehend-documentclassifier-documentclassifieroutputdataconfig-syntax.json"></a>

```
{
  "[KmsKeyId](#cfn-comprehend-documentclassifier-documentclassifieroutputdataconfig-kmskeyid)" : String,
  "[S3Uri](#cfn-comprehend-documentclassifier-documentclassifieroutputdataconfig-s3uri)" : String
}
```

### YAML
<a name="aws-properties-comprehend-documentclassifier-documentclassifieroutputdataconfig-syntax.yaml"></a>

```
  [KmsKeyId](#cfn-comprehend-documentclassifier-documentclassifieroutputdataconfig-kmskeyid): String
  [S3Uri](#cfn-comprehend-documentclassifier-documentclassifieroutputdataconfig-s3uri): String
```

## Properties
<a name="aws-properties-comprehend-documentclassifier-documentclassifieroutputdataconfig-properties"></a>

`KmsKeyId`  <a name="cfn-comprehend-documentclassifier-documentclassifieroutputdataconfig-kmskeyid"></a>
ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt the output results from an analysis job. The KmsKeyId can be one 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"`
+ KMS Key Alias: `"alias/ExampleAlias"`
+ ARN of a KMS Key Alias: `"arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias"`
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`S3Uri`  <a name="cfn-comprehend-documentclassifier-documentclassifieroutputdataconfig-s3uri"></a>
When you use the `OutputDataConfig` object while creating a custom classifier, you specify the Amazon S3 location where you want to write the confusion matrix and other output files. The URI must be in the same Region as the API endpoint that you are calling. The location is used as the prefix for the actual location of this output file.  
When the custom classifier job is finished, the service creates the output file in a directory specific to the job. The `S3Uri` field contains the location of the output file, called `output.tar.gz`. It is a compressed archive that contains the confusion matrix.  
*Required*: No  
*Type*: String  
*Pattern*: `s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?`  
*Maximum*: `1024`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::Comprehend::DocumentClassifier DocumentReaderConfig
<a name="aws-properties-comprehend-documentclassifier-documentreaderconfig"></a>

Provides configuration parameters to override the default actions for extracting text from PDF documents and image files. 

 By default, Amazon Comprehend performs the following actions to extract text from files, based on the input file type: 
+ **Word files** - Amazon Comprehend parser extracts the text. 
+ **Digital PDF files** - Amazon Comprehend parser extracts the text. 
+ **Image files and scanned PDF files** - Amazon Comprehend uses the Amazon Textract `DetectDocumentText` API to extract the text. 

`DocumentReaderConfig` does not apply to plain text files or Word files.

 For image files and PDF documents, you can override these default actions using the fields listed below. For more information, see [ Setting text extraction options](https://docs.aws.amazon.com/comprehend/latest/dg/idp-set-textract-options.html) in the Comprehend Developer Guide. 

## Syntax
<a name="aws-properties-comprehend-documentclassifier-documentreaderconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-comprehend-documentclassifier-documentreaderconfig-syntax.json"></a>

```
{
  "[DocumentReadAction](#cfn-comprehend-documentclassifier-documentreaderconfig-documentreadaction)" : String,
  "[DocumentReadMode](#cfn-comprehend-documentclassifier-documentreaderconfig-documentreadmode)" : String,
  "[FeatureTypes](#cfn-comprehend-documentclassifier-documentreaderconfig-featuretypes)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-comprehend-documentclassifier-documentreaderconfig-syntax.yaml"></a>

```
  [DocumentReadAction](#cfn-comprehend-documentclassifier-documentreaderconfig-documentreadaction): String
  [DocumentReadMode](#cfn-comprehend-documentclassifier-documentreaderconfig-documentreadmode): String
  [FeatureTypes](#cfn-comprehend-documentclassifier-documentreaderconfig-featuretypes): 
    - String
```

## Properties
<a name="aws-properties-comprehend-documentclassifier-documentreaderconfig-properties"></a>

`DocumentReadAction`  <a name="cfn-comprehend-documentclassifier-documentreaderconfig-documentreadaction"></a>
This field defines the Amazon Textract API operation that Amazon Comprehend uses to extract text from PDF files and image files. Enter one of the following values:  
+ `TEXTRACT_DETECT_DOCUMENT_TEXT` - The Amazon Comprehend service uses the `DetectDocumentText` API operation. 
+ `TEXTRACT_ANALYZE_DOCUMENT` - The Amazon Comprehend service uses the `AnalyzeDocument` API operation. 
*Required*: Yes  
*Type*: String  
*Allowed values*: `TEXTRACT_DETECT_DOCUMENT_TEXT | TEXTRACT_ANALYZE_DOCUMENT`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DocumentReadMode`  <a name="cfn-comprehend-documentclassifier-documentreaderconfig-documentreadmode"></a>
Determines the text extraction actions for PDF files. Enter one of the following values:  
+ `SERVICE_DEFAULT` - use the Amazon Comprehend service defaults for PDF files.
+ `FORCE_DOCUMENT_READ_ACTION` - Amazon Comprehend uses the Textract API specified by DocumentReadAction for all PDF files, including digital PDF files. 
*Required*: No  
*Type*: String  
*Allowed values*: `SERVICE_DEFAULT | FORCE_DOCUMENT_READ_ACTION`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FeatureTypes`  <a name="cfn-comprehend-documentclassifier-documentreaderconfig-featuretypes"></a>
Specifies the type of Amazon Textract features to apply. If you chose `TEXTRACT_ANALYZE_DOCUMENT` as the read action, you must specify one or both of the following values:  
+ `TABLES` - Returns additional information about any tables that are detected in the input document. 
+ `FORMS` - Returns additional information about any forms that are detected in the input document. 
*Required*: No  
*Type*: Array of String  
*Allowed values*: `TABLES | FORMS`  
*Minimum*: `1`  
*Maximum*: `2`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::Comprehend::DocumentClassifier Tag
<a name="aws-properties-comprehend-documentclassifier-tag"></a>

A key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with the key-value pair ‘Department’:’Sales’ might be added to a resource to indicate its use by a particular department. 

## Syntax
<a name="aws-properties-comprehend-documentclassifier-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-comprehend-documentclassifier-tag-syntax.json"></a>

```
{
  "[Key](#cfn-comprehend-documentclassifier-tag-key)" : String,
  "[Value](#cfn-comprehend-documentclassifier-tag-value)" : String
}
```

### YAML
<a name="aws-properties-comprehend-documentclassifier-tag-syntax.yaml"></a>

```
  [Key](#cfn-comprehend-documentclassifier-tag-key): String
  [Value](#cfn-comprehend-documentclassifier-tag-value): String
```

## Properties
<a name="aws-properties-comprehend-documentclassifier-tag-properties"></a>

`Key`  <a name="cfn-comprehend-documentclassifier-tag-key"></a>
The initial part of a key-value pair that forms a tag associated with a given resource. For instance, if you want to show which resources are used by which departments, you might use “Department” as the key portion of the pair, with multiple possible values such as “sales,” “legal,” and “administration.”   
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-comprehend-documentclassifier-tag-value"></a>
 The second part of a key-value pair that forms a tag associated with a given resource. For instance, if you want to show which resources are used by which departments, you might use “Department” as the initial (key) portion of the pair, with a value of “sales” to indicate the sales department.   
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Comprehend::DocumentClassifier VpcConfig
<a name="aws-properties-comprehend-documentclassifier-vpcconfig"></a>

 Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for the job. For more information, see [Amazon VPC](https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 

## Syntax
<a name="aws-properties-comprehend-documentclassifier-vpcconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-comprehend-documentclassifier-vpcconfig-syntax.json"></a>

```
{
  "[SecurityGroupIds](#cfn-comprehend-documentclassifier-vpcconfig-securitygroupids)" : [ String, ... ],
  "[Subnets](#cfn-comprehend-documentclassifier-vpcconfig-subnets)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-comprehend-documentclassifier-vpcconfig-syntax.yaml"></a>

```
  [SecurityGroupIds](#cfn-comprehend-documentclassifier-vpcconfig-securitygroupids): 
    - String
  [Subnets](#cfn-comprehend-documentclassifier-vpcconfig-subnets): 
    - String
```

## Properties
<a name="aws-properties-comprehend-documentclassifier-vpcconfig-properties"></a>

`SecurityGroupIds`  <a name="cfn-comprehend-documentclassifier-vpcconfig-securitygroupids"></a>
The ID number for a security group on an instance of your private VPC. Security groups on your VPC function serve as a virtual firewall to control inbound and outbound traffic and provides security for the resources that you’ll be accessing on the VPC. This ID number is preceded by "sg-", for instance: "sg-03b388029b0a285ea". For more information, see [Security Groups for your VPC](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html).   
*Required*: Yes  
*Type*: Array of String  
*Minimum*: `1 | 1`  
*Maximum*: `32 | 5`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Subnets`  <a name="cfn-comprehend-documentclassifier-vpcconfig-subnets"></a>
The ID for each subnet being used in your private VPC. This subnet is a subset of the a range of IPv4 addresses used by the VPC and is specific to a given availability zone in the VPC’s Region. This ID number is preceded by "subnet-", for instance: "subnet-04ccf456919e69055". For more information, see [VPCs and Subnets](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html).   
*Required*: Yes  
*Type*: Array of String  
*Minimum*: `1 | 1`  
*Maximum*: `32 | 16`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)