start_document_classification_job
async
¶
start_document_classification_job(
input_data_config: InputDataConfig,
output_data_config: OutputDataConfig,
data_access_role_arn: IamRoleArn,
*,
config_overrides: Optional[AsyncComprehendClientConfig] = None,
job_name: Optional[JobName] = None,
document_classifier_arn: Optional[DocumentClassifierArn] = None,
client_request_token: Optional[ClientRequestTokenString] = None,
volume_kms_key_id: Optional[KmsKeyId] = None,
vpc_config: Optional[VpcConfig] = None,
tags: Optional[TagList] = None,
flywheel_arn: Optional[ComprehendFlywheelArn] = None,
) -> StartDocumentClassificationJobResponse
Starts an asynchronous document classification job using a custom classification model. Use the DescribeDocumentClassificationJob operation to track the progress of the job.
Parameters:
-
job_name(Optional[JobName], default:None) –The identifier of the job.
-
document_classifier_arn(Optional[DocumentClassifierArn], default:None) –The Amazon Resource Name (ARN) of the document classifier to use to process the job.
-
input_data_config(InputDataConfig) –Specifies the format and location of the input data for the job.
-
output_data_config(OutputDataConfig) –Specifies where to send the output files.
-
data_access_role_arn(IamRoleArn) –The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data.
-
client_request_token(Optional[ClientRequestTokenString], default:None) –A unique identifier for the request. If you do not set the client request token, Amazon Comprehend generates one.
-
volume_kms_key_id(Optional[KmsKeyId], default:None) –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(Optional[VpcConfig], default:None) –Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your document classification job. For more information, see Amazon VPC.
-
tags(Optional[TagList], default:None) –Tags to associate with the document classification job. A tag is a key-value pair that adds 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.
-
flywheel_arn(Optional[ComprehendFlywheelArn], default:None) –The Amazon Resource Number (ARN) of the flywheel associated with the model to use.
Raises:
-
InternalServerException–An internal server error occurred. Retry your request.
-
InvalidRequestException–The request is invalid.
-
KmsKeyValidationException–The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it.
-
ResourceInUseException–The specified resource name is already in use. Use a different name and try your request again.
-
ResourceNotFoundException–The specified resource ARN was not found. Check the ARN and try your request again.
-
ResourceUnavailableException–The specified resource is not available. Check the resource and try your request again.
-
TooManyRequestsException–The number of requests exceeds the limit. Resubmit your request later.
-
TooManyTagsException–The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_comprehend/_services/async_comprehend.py
4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 | |