async def list_job_run_attempts(
self,
application_id: "capo_emr_serverless.types.application_id.ApplicationId",
job_run_id: "capo_emr_serverless.types.job_run_id.JobRunId",
*,
config_overrides: Optional[AsyncEMRServerlessClientConfig] = None,
next_token: Optional["capo_emr_serverless.types.next_token.NextToken"] = None,
max_results: Optional[int] = None,
) -> "capo_emr_serverless.types.list_job_run_attempts_response.ListJobRunAttemptsResponse":
"""<p>Lists all attempt of a job run.</p>
Args:
application_id: <p>The ID of the application for which to list job runs.</p>
job_run_id: <p>The ID of the job run to list.</p>
next_token: <p>The token for the next set of job run attempt results.</p>
max_results: <p>The maximum number of job run attempts to list.</p>
Raises:
capo_emr_serverless.errors.internal_server_exception.InternalServerException: <p>Request processing failed because of an error or failure with the service.</p>
capo_emr_serverless.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
capo_emr_serverless.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_emr_serverless.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_emr_serverless.types.list_job_run_attempts_request.ListJobRunAttemptsRequest]",
) -> AsyncOperationResponse[
"capo_emr_serverless.types.list_job_run_attempts_response.ListJobRunAttemptsResponse"
]:
import capo_emr_serverless._operations.aws_toledo_web_service.list_job_run_attempts
(
output,
http_response,
) = await capo_emr_serverless._operations.aws_toledo_web_service.list_job_run_attempts.async_list_job_run_attempts(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListJobRunAttempts")
)
input_: capo_emr_serverless.types.list_job_run_attempts_request.ListJobRunAttemptsRequest = {
"application_id": application_id,
"job_run_id": job_run_id,
}
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