Skip to content

list_backend_jobs

list_backend_jobs(
    app_id: __string,
    backend_environment_name: __string,
    *,
    config_overrides: Optional[AmplifyBackendClientConfig] = None,
    job_id: Optional[__string] = None,
    max_results: Optional[__integerMin1Max25] = None,
    next_token: Optional[__string] = None,
    operation: Optional[__string] = None,
    status: Optional[__string] = None,
) -> ListBackendJobsResponse

Lists the jobs for the backend of an Amplify app.

Parameters:

  • app_id (__string) –

    The app ID.

  • backend_environment_name (__string) –

    The name of the backend environment.

  • job_id (Optional[__string], default: None ) –

    The ID for the job.

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

    The maximum number of results that you want in the response.

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

    The token for the next set of results.

  • operation (Optional[__string], default: None ) –

    Filters the list of response objects to include only those with the specified operation name.

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

    Filters the list of response objects to include only those with the specified status.

Raises:

Source code in docs_src/capo_amplifybackend/_services/amplify_backend.py
def list_backend_jobs(
    self,
    app_id: "capo_amplifybackend.types.__string.__string",
    backend_environment_name: "capo_amplifybackend.types.__string.__string",
    *,
    config_overrides: Optional[AmplifyBackendClientConfig] = None,
    job_id: Optional["capo_amplifybackend.types.__string.__string"] = None,
    max_results: Optional[
        "capo_amplifybackend.types.__integer_min1_max25.__integerMin1Max25"
    ] = None,
    next_token: Optional["capo_amplifybackend.types.__string.__string"] = None,
    operation: Optional["capo_amplifybackend.types.__string.__string"] = None,
    status: Optional["capo_amplifybackend.types.__string.__string"] = None,
) -> "capo_amplifybackend.types.list_backend_jobs_response.ListBackendJobsResponse":
    """<p>Lists the jobs for the backend of an Amplify app.</p>

    Args:
        app_id: <p>The app ID.</p>
        backend_environment_name: <p>The name of the backend environment.</p>
        job_id: <p>The ID for the job.</p>
        max_results: <p>The maximum number of results that you want in the response.</p>
        next_token: <p>The token for the next set of results.</p>
        operation: <p>Filters the list of response objects to include only those with the specified operation name.</p>
        status: <p>Filters the list of response objects to include only those with the specified status.</p>

    Raises:
        capo_amplifybackend.errors.bad_request_exception.BadRequestException: <p>An error returned if a request is not formed properly.</p>
        capo_amplifybackend.errors.gateway_timeout_exception.GatewayTimeoutException: <p>An error returned if there's a temporary issue with the service.</p>
        capo_amplifybackend.errors.not_found_exception.NotFoundException: <p>An error returned when a specific resource type is not found.</p>
        capo_amplifybackend.errors.too_many_requests_exception.TooManyRequestsException: <p>An error that is returned when a limit of a specific type has been exceeded.</p>
        capo_amplifybackend.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_amplifybackend.types.list_backend_jobs_request.ListBackendJobsRequest]",
    ) -> OperationResponse[
        "capo_amplifybackend.types.list_backend_jobs_response.ListBackendJobsResponse"
    ]:
        import capo_amplifybackend._operations.amplify_backend.list_backend_jobs

        output, http_response = (
            capo_amplifybackend._operations.amplify_backend.list_backend_jobs.list_backend_jobs(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListBackendJobs")
    )
    input_: capo_amplifybackend.types.list_backend_jobs_request.ListBackendJobsRequest = {
        "app_id": app_id,
        "backend_environment_name": backend_environment_name,
    }
    if job_id is not None:
        input_["job_id"] = job_id
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if operation is not None:
        input_["operation"] = operation
    if status is not None:
        input_["status"] = status

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