Skip to content

CreateDocumentClassifierRequest

Source code in docs_src/capo_comprehend/types/create_document_classifier_request.py
class CreateDocumentClassifierRequest(TypedDict, closed=True):
    document_classifier_name: (
        "capo_comprehend.types.comprehend_arn_name.ComprehendArnName"
    )
    """<p>The name of the document classifier.</p>"""
    version_name: NotRequired["capo_comprehend.types.version_name.VersionName"]
    """<p>The version name given to the newly created classifier. 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 Amazon Web Services account/Amazon Web Services Region.</p>"""
    data_access_role_arn: "capo_comprehend.types.iam_role_arn.IamRoleArn"
    """<p>The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data.</p>"""
    tags: NotRequired["capo_comprehend.types.tag_list.TagList"]
    """<p>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. </p>"""
    input_data_config: "capo_comprehend.types.document_classifier_input_data_config.DocumentClassifierInputDataConfig"
    """<p>Specifies the format and location of the input data for the job.</p>"""
    output_data_config: NotRequired[
        "capo_comprehend.types.document_classifier_output_data_config.DocumentClassifierOutputDataConfig"
    ]
    """<p>Specifies the location for the output files from a custom classifier job. This parameter is required for a request that creates a native document model.</p>"""
    client_request_token: NotRequired[
        "capo_comprehend.types.client_request_token_string.ClientRequestTokenString"
    ]
    """<p>A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.</p>"""
    language_code: "capo_comprehend.types.language_code.LanguageCode"
    """<p>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.</p>"""
    volume_kms_key_id: NotRequired["capo_comprehend.types.kms_key_id.KmsKeyId"]
    """<p>ID for the Amazon Web Services 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:</p> <ul> <li> <p>KMS Key ID: <code>"1234abcd-12ab-34cd-56ef-1234567890ab"</code> </p> </li> <li> <p>Amazon Resource Name (ARN) of a KMS Key: <code>"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"</code> </p> </li> </ul>"""
    vpc_config: NotRequired["capo_comprehend.types.vpc_config.VpcConfig"]
    """<p>Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html">Amazon VPC</a>. </p>"""
    mode: NotRequired[
        "capo_comprehend.types.document_classifier_mode.DocumentClassifierMode"
    ]
    """<p>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 (|).</p>"""
    model_kms_key_id: NotRequired["capo_comprehend.types.kms_key_id.KmsKeyId"]
    """<p>ID for the KMS key that Amazon Comprehend uses to encrypt trained custom models. The ModelKmsKeyId can be either of the following formats:</p> <ul> <li> <p>KMS Key ID: <code>"1234abcd-12ab-34cd-56ef-1234567890ab"</code> </p> </li> <li> <p>Amazon Resource Name (ARN) of a KMS Key: <code>"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"</code> </p> </li> </ul>"""
    model_policy: NotRequired["capo_comprehend.types.policy.Policy"]
    r"""<p>The resource-based policy to attach to your custom document classifier model. You can use this policy to allow another Amazon Web Services account to import your custom model.</p> <p>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:</p> <p> <code>"{\"attribute\": \"value\", \"attribute\": [\"value\"]}"</code> </p> <p>To avoid escaping quotes, you can use single quotes to enclose the policy and double quotes to enclose the JSON names and values:</p> <p> <code>'{"attribute": "value", "attribute": ["value"]}'</code> </p>"""

client_request_token instance-attribute

client_request_token: NotRequired[ClientRequestTokenString]

A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.

data_access_role_arn instance-attribute

data_access_role_arn: IamRoleArn

The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data.

document_classifier_name instance-attribute

document_classifier_name: ComprehendArnName

The name of the document classifier.

input_data_config instance-attribute

Specifies the format and location of the input data for the job.

language_code instance-attribute

language_code: LanguageCode

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.

mode instance-attribute

mode: NotRequired[DocumentClassifierMode]

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 (|).

model_kms_key_id instance-attribute

model_kms_key_id: NotRequired[KmsKeyId]

ID for the 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"

model_policy instance-attribute

model_policy: NotRequired[Policy]

The resource-based policy to attach to your custom document classifier model. You can use this policy to allow another Amazon Web Services 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"]}'

output_data_config instance-attribute

output_data_config: NotRequired[DocumentClassifierOutputDataConfig]

Specifies the location for the output files from a custom classifier job. This parameter is required for a request that creates a native document model.

tags instance-attribute

tags: NotRequired[TagList]

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.

version_name instance-attribute

version_name: NotRequired[VersionName]

The version name given to the newly created classifier. 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 Amazon Web Services account/Amazon Web Services Region.

volume_kms_key_id instance-attribute

volume_kms_key_id: NotRequired[KmsKeyId]

ID for the Amazon Web Services 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"

vpc_config instance-attribute

vpc_config: NotRequired[VpcConfig]

Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier. For more information, see Amazon VPC.