Skip to main content

document_classifiers

Creates, updates, deletes or gets a document_classifier resource or lists document_classifiers in a region

Overview

Namedocument_classifiers
TypeResource
DescriptionDocument Classifier enables training document classifier models.
Idaws.comprehend.document_classifiers

Fields

NameDatatypeDescription
data_access_role_arnstring
input_data_configobject
output_data_configobject
language_codestring
model_kms_key_idstring
model_policystring
document_classifier_namestring
modestring
tagsarray
version_namestring
volume_kms_key_idstring
vpc_configobject
arnstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTDocumentClassifierName, DataAccessRoleArn, InputDataConfig, LanguageCode, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all document_classifiers in a region.

SELECT
region,
data_access_role_arn,
input_data_config,
output_data_config,
language_code,
model_kms_key_id,
model_policy,
document_classifier_name,
mode,
tags,
version_name,
volume_kms_key_id,
vpc_config,
arn
FROM aws.comprehend.document_classifiers
WHERE region = 'us-east-1';

Gets all properties from an individual document_classifier.

SELECT
region,
data_access_role_arn,
input_data_config,
output_data_config,
language_code,
model_kms_key_id,
model_policy,
document_classifier_name,
mode,
tags,
version_name,
volume_kms_key_id,
vpc_config,
arn
FROM aws.comprehend.document_classifiers
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

Use the following StackQL query and manifest file to create a new document_classifier resource, using stack-deploy.

/*+ create */
INSERT INTO aws.comprehend.document_classifiers (
DataAccessRoleArn,
InputDataConfig,
LanguageCode,
DocumentClassifierName,
region
)
SELECT
'{{ DataAccessRoleArn }}',
'{{ InputDataConfig }}',
'{{ LanguageCode }}',
'{{ DocumentClassifierName }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.comprehend.document_classifiers
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

To operate on the document_classifiers resource, the following permissions are required:

Create

iam:PassRole,
comprehend:CreateDocumentClassifier,
comprehend:DescribeDocumentClassifier,
comprehend:DescribeResourcePolicy,
comprehend:ListTagsForResource,
textract:DetectDocumentText

Read

comprehend:DescribeDocumentClassifier,
comprehend:DescribeResourcePolicy,
comprehend:ListTagsForResource

Update

iam:PassRole,
comprehend:PutResourcePolicy,
comprehend:DeleteResourcePolicy,
comprehend:DescribeResourcePolicy,
comprehend:DescribeDocumentClassifier,
comprehend:ListTagsForResource,
comprehend:TagResource,
comprehend:UntagResource

Delete

comprehend:DescribeDocumentClassifier,
comprehend:DeleteDocumentClassifier

List

comprehend:ListDocumentClassifiers