start_entities_detection_job
¶
start_entities_detection_job(
input_data_config: InputDataConfig,
output_data_config: OutputDataConfig,
data_access_role_arn: IamRoleArn,
language_code: LanguageCode,
*,
config_overrides: Optional[ComprehendClientConfig] = None,
job_name: Optional[JobName] = None,
entity_recognizer_arn: Optional[EntityRecognizerArn] = 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,
) -> StartEntitiesDetectionJobResponse
Starts an asynchronous entity detection job for a collection of documents. Use the operation to track the status of a job.
This API can be used for either standard entity detection or custom entity recognition. In order to be used for custom entity recognition, the optional EntityRecognizerArn must be used in order to provide access to the recognizer being used to detect the custom entity.
Parameters:
-
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. For more information, see Role-based permissions.
-
job_name(Optional[JobName], default:None) –The identifier of the job.
-
entity_recognizer_arn(Optional[EntityRecognizerArn], default:None) –The Amazon Resource Name (ARN) that identifies the specific entity recognizer to be used by the
StartEntitiesDetectionJob. This ARN is optional and is only used for a custom entity recognition job. -
language_code(LanguageCode) –The language of the input documents. All documents must be in the same language. You can specify any of the languages supported by Amazon Comprehend. If custom entities recognition is used, this parameter is ignored and the language used for training the model is used instead.
-
client_request_token(Optional[ClientRequestTokenString], default:None) –A unique identifier for the request. If you don't 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 entity detection job. For more information, see Amazon VPC.
-
tags(Optional[TagList], default:None) –Tags to associate with the entities detection 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/comprehend.py
4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 | |