Skip to content

describe_key_phrases_detection_job

describe_key_phrases_detection_job(
    job_id: JobId, *, config_overrides: Optional[ComprehendClientConfig] = None
) -> DescribeKeyPhrasesDetectionJobResponse

Gets the properties associated with a key phrases detection job. Use this operation to get the status of a detection job.

Parameters:

  • job_id (JobId) –

    The identifier that Amazon Comprehend generated for the job. The StartKeyPhrasesDetectionJob operation returns this identifier in its response.

Raises:

Source code in docs_src/capo_comprehend/_services/comprehend.py
def describe_key_phrases_detection_job(
    self,
    job_id: "capo_comprehend.types.job_id.JobId",
    *,
    config_overrides: Optional[ComprehendClientConfig] = None,
) -> "capo_comprehend.types.describe_key_phrases_detection_job_response.DescribeKeyPhrasesDetectionJobResponse":
    """<p>Gets the properties associated with a key phrases detection job. Use this operation to get the status of a detection job.</p>

    Args:
        job_id: <p>The identifier that Amazon Comprehend generated for the job. The <code>StartKeyPhrasesDetectionJob</code> operation returns this identifier in its response.</p>

    Raises:
        capo_comprehend.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_comprehend.errors.invalid_request_exception.InvalidRequestException: <p>The request is invalid.</p>
        capo_comprehend.errors.job_not_found_exception.JobNotFoundException: <p>The specified job was not found. Check the job ID and try again.</p>
        capo_comprehend.errors.too_many_requests_exception.TooManyRequestsException: <p>The number of requests exceeds the limit. Resubmit your request later.</p>
        capo_comprehend.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_comprehend.types.describe_key_phrases_detection_job_request.DescribeKeyPhrasesDetectionJobRequest]",
    ) -> OperationResponse[
        "capo_comprehend.types.describe_key_phrases_detection_job_response.DescribeKeyPhrasesDetectionJobResponse"
    ]:
        import capo_comprehend._operations.comprehend_20171127.describe_key_phrases_detection_job

        output, http_response = (
            capo_comprehend._operations.comprehend_20171127.describe_key_phrases_detection_job.describe_key_phrases_detection_job(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeKeyPhrasesDetectionJob")
    )
    input_: capo_comprehend.types.describe_key_phrases_detection_job_request.DescribeKeyPhrasesDetectionJobRequest = {
        "job_id": job_id
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output