Skip to content

list_job_runs async

list_job_runs(
    domain_identifier: DomainId,
    job_identifier: str,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    status: Optional[JobRunStatus] = None,
    sort_order: Optional[SortOrder] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListJobRunsOutput

Lists job runs.

Parameters:

  • domain_identifier (DomainId) –

    The ID of the domain where you want to list job runs.

  • job_identifier (str) –

    The ID of the job run.

  • status (Optional[JobRunStatus], default: None ) –

    The status of a job run.

  • sort_order (Optional[SortOrder], default: None ) –

    Specifies the order in which job runs are to be sorted.

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

    When the number of job runs is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of job runs, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListJobRuns to list the next set of job runs.

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

    The maximum number of job runs to return in a single call to ListJobRuns. When the number of job runs to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListJobRuns to list the next set of job runs.

Raises:

Source code in docs_src/capo_datazone/_services/async_data_zone.py
async def list_job_runs(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    job_identifier: str,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    status: Optional["capo_datazone.types.job_run_status.JobRunStatus"] = None,
    sort_order: Optional["capo_datazone.types.sort_order.SortOrder"] = None,
    next_token: Optional[
        "capo_datazone.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional["capo_datazone.types.max_results.MaxResults"] = None,
) -> "capo_datazone.types.list_job_runs_output.ListJobRunsOutput":
    """<p>Lists job runs.</p>

    Args:
        domain_identifier: <p>The ID of the domain where you want to list job runs.</p>
        job_identifier: <p>The ID of the job run.</p>
        status: <p>The status of a job run.</p>
        sort_order: <p>Specifies the order in which job runs are to be sorted.</p>
        next_token: <p>When the number of job runs is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of job runs, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListJobRuns to list the next set of job runs.</p>
        max_results: <p>The maximum number of job runs to return in a single call to ListJobRuns. When the number of job runs to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListJobRuns to list the next set of job runs.</p>

    Raises:
        capo_datazone.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_datazone.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_datazone.errors.unauthorized_exception.UnauthorizedException: <p>You do not have permission to perform this action.</p>
        capo_datazone.errors.internal_server_exception.InternalServerException: <p>The request has failed because of an unknown error, exception or failure.</p>
        capo_datazone.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</p>
        capo_datazone.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the Amazon Web Services service.</p>
        capo_datazone.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_datazone.types.list_job_runs_input.ListJobRunsInput]",
    ) -> AsyncOperationResponse[
        "capo_datazone.types.list_job_runs_output.ListJobRunsOutput"
    ]:
        import capo_datazone._operations.data_zone.list_job_runs

        (
            output,
            http_response,
        ) = await capo_datazone._operations.data_zone.list_job_runs.async_list_job_runs(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListJobRuns")
    )
    input_: capo_datazone.types.list_job_runs_input.ListJobRunsInput = {
        "domain_identifier": domain_identifier,
        "job_identifier": job_identifier,
    }
    if status is not None:
        input_["status"] = status
    if sort_order is not None:
        input_["sort_order"] = sort_order
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output