Skip to content

list_phi_detection_jobs

list_phi_detection_jobs(
    *,
    config_overrides: Optional[ComprehendMedicalClientConfig] = None,
    filter: Optional[ComprehendMedicalAsyncJobFilter] = None,
    next_token: Optional[String] = None,
    max_results: Optional[MaxResultsInteger] = None,
) -> ListPHIDetectionJobsResponse

Gets a list of protected health information (PHI) detection jobs you have submitted.

Parameters:

  • filter (Optional[ComprehendMedicalAsyncJobFilter], default: None ) –

    Filters the jobs that are returned. You can filter jobs based on their names, status, or the date and time that they were submitted. You can only set one filter at a time.

  • next_token (Optional[String], default: None ) –

    Identifies the next page of results to return.

  • max_results (Optional[MaxResultsInteger], default: None ) –

    The maximum number of results to return in each page. The default is 100.

Raises:

  • InternalServerException –

    An internal server error occurred. Retry your request.

  • InvalidRequestException –

    The request that you made is invalid. Check your request to determine why it's invalid and then retry the request.

  • TooManyRequestsException –

    You have made too many requests within a short period of time. Wait for a short time and then try your request again. Contact customer support for more information about a service limit increase.

  • ValidationException –

    The filter that you specified for the operation is invalid. Check the filter values that you entered and try your request again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_comprehendmedical/_services/comprehend_medical.py
def list_phi_detection_jobs(
    self,
    *,
    config_overrides: Optional[ComprehendMedicalClientConfig] = None,
    filter: Optional[
        "capo_comprehendmedical.types.comprehend_medical_async_job_filter.ComprehendMedicalAsyncJobFilter"
    ] = None,
    next_token: Optional["capo_comprehendmedical.types.string.String"] = None,
    max_results: Optional[
        "capo_comprehendmedical.types.max_results_integer.MaxResultsInteger"
    ] = None,
) -> "capo_comprehendmedical.types.list_phi_detection_jobs_response.ListPHIDetectionJobsResponse":
    """<p>Gets a list of protected health information (PHI) detection jobs you have submitted.</p>

    Args:
        filter: <p>Filters the jobs that are returned. You can filter jobs based on their names, status, or the date and time that they were submitted. You can only set one filter at a time.</p>
        next_token: <p>Identifies the next page of results to return.</p>
        max_results: <p>The maximum number of results to return in each page. The default is 100.</p>

    Raises:
        capo_comprehendmedical.errors.internal_server_exception.InternalServerException: <p> An internal server error occurred. Retry your request. </p>
        capo_comprehendmedical.errors.invalid_request_exception.InvalidRequestException: <p> The request that you made is invalid. Check your request to determine why it's invalid and then retry the request.</p>
        capo_comprehendmedical.errors.too_many_requests_exception.TooManyRequestsException: <p> You have made too many requests within a short period of time. Wait for a short time and then try your request again. Contact customer support for more information about a service limit increase. </p>
        capo_comprehendmedical.errors.validation_exception.ValidationException: <p>The filter that you specified for the operation is invalid. Check the filter values that you entered and try your request again.</p>
        capo_comprehendmedical.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_comprehendmedical.types.list_phi_detection_jobs_request.ListPHIDetectionJobsRequest]",
    ) -> OperationResponse[
        "capo_comprehendmedical.types.list_phi_detection_jobs_response.ListPHIDetectionJobsResponse"
    ]:
        import capo_comprehendmedical._operations.comprehend_medical_20181030.list_phi_detection_jobs

        output, http_response = (
            capo_comprehendmedical._operations.comprehend_medical_20181030.list_phi_detection_jobs.list_phi_detection_jobs(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListPHIDetectionJobs")
    )
    input_: capo_comprehendmedical.types.list_phi_detection_jobs_request.ListPHIDetectionJobsRequest = {}
    if filter is not None:
        input_["filter"] = filter
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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