Lists all attempt of a job run.
Parameters:
-
application_id
(ApplicationId)
–
The ID of the application for which to list job runs.
-
job_run_id
(JobRunId)
–
The ID of the job run to list.
-
next_token
(Optional[NextToken], default:
None
)
–
The token for the next set of job run attempt results.
-
max_results
(Optional[int], default:
None
)
–
The maximum number of job run attempts to list.
Raises:
Source code in docs_src/capo_emr_serverless/_services/emr_serverless.py
| 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[EMRServerlessClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_emr_serverless.types.list_job_run_attempts_request.ListJobRunAttemptsRequest]",
) -> OperationResponse[
"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 = (
capo_emr_serverless._operations.aws_toledo_web_service.list_job_run_attempts.list_job_run_attempts(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|