Skip to content

list_jobs

list_jobs(
    *,
    config_overrides: Optional[LocationClientConfig] = None,
    filter: Optional[JobsFilter] = None,
    max_results: Optional[int] = None,
    next_token: Optional[LargeToken] = None,
) -> ListJobsResponse

ListJobs retrieves a list of jobs with optional filtering and pagination support.

For more information, see Job concepts in the Amazon Location Service Developer Guide.

Parameters:

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

    An optional structure containing criteria by which to filter job results.

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

    Maximum number of jobs to return.

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

    The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

Raises:

  • AccessDeniedException –

    The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions.

  • InternalServerException –

    The request has failed to process because of an unknown server error, exception, or failure.

  • ThrottlingException –

    The request was denied because of request throttling.

  • ValidationException –

    The input failed to meet the constraints specified by the AWS service.

  • UnknownServiceError –

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

Source code in docs_src/capo_location/_services/location.py
def list_jobs(
    self,
    *,
    config_overrides: Optional[LocationClientConfig] = None,
    filter: Optional["capo_location.types.jobs_filter.JobsFilter"] = None,
    max_results: Optional[int] = None,
    next_token: Optional["capo_location.types.large_token.LargeToken"] = None,
) -> "capo_location.types.list_jobs_response.ListJobsResponse":
    """<p> <code>ListJobs</code> retrieves a list of jobs with optional filtering and pagination support.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/location/latest/developerguide/jobs-concepts.html">Job concepts</a> in the <i>Amazon Location Service Developer Guide</i>.</p>

    Args:
        filter: <p>An optional structure containing criteria by which to filter job results.</p>
        max_results: <p>Maximum number of jobs to return.</p>
        next_token: <p>The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.</p>

    Raises:
        capo_location.errors.access_denied_exception.AccessDeniedException: <p>The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions.</p>
        capo_location.errors.internal_server_exception.InternalServerException: <p>The request has failed to process because of an unknown server error, exception, or failure.</p>
        capo_location.errors.throttling_exception.ThrottlingException: <p>The request was denied because of request throttling.</p>
        capo_location.errors.validation_exception.ValidationException: <p>The input failed to meet the constraints specified by the AWS service. </p>
        capo_location.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_location.types.list_jobs_request.ListJobsRequest]",
    ) -> OperationResponse[
        "capo_location.types.list_jobs_response.ListJobsResponse"
    ]:
        import capo_location._operations.location_service.list_jobs

        output, http_response = (
            capo_location._operations.location_service.list_jobs.list_jobs(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_location.types.list_jobs_response.ListJobsResponse",
    ) -> dict[str, Any]:
        import capo_location.types.list_jobs_response

        return capo_location.types.list_jobs_response.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListJobs", redact_output=_redact_output)
    )
    input_: capo_location.types.list_jobs_request.ListJobsRequest = {}
    if filter is not None:
        input_["filter"] = filter
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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