Describes a list of Batch jobs.
Parameters:
Raises:
-
ClientException
–
These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid.
-
ServerException
–
These errors are usually caused by a server issue.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
To describe a specific job
This example describes a job with the specified job ID.
>>> client.describe_jobs(jobs=['24fa2d7a-64c4-49d2-8b47-f8da4fbde8e9'])
Source code in docs_src/capo_batch/_services/batch.py
| def describe_jobs(
self,
*,
config_overrides: Optional[BatchClientConfig] = None,
jobs: Optional["capo_batch.types.string_list.StringList"] = None,
) -> "capo_batch.types.describe_jobs_response.DescribeJobsResponse":
"""<p>Describes a list of Batch jobs.</p>
Args:
jobs: <p>A list of up to 100 job IDs.</p>
Raises:
capo_batch.errors.client_exception.ClientException: <p>These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid.</p>
capo_batch.errors.server_exception.ServerException: <p>These errors are usually caused by a server issue.</p>
capo_batch.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To describe a specific job
This example describes a job with the specified job ID.
>>> client.describe_jobs(jobs=['24fa2d7a-64c4-49d2-8b47-f8da4fbde8e9'])
"""
def _handler(
req: "OperationRequest[capo_batch.types.describe_jobs_request.DescribeJobsRequest]",
) -> OperationResponse[
"capo_batch.types.describe_jobs_response.DescribeJobsResponse"
]:
import capo_batch._operations.aws_batch_v20160810.describe_jobs
output, http_response = (
capo_batch._operations.aws_batch_v20160810.describe_jobs.describe_jobs(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeJobs")
)
input_: capo_batch.types.describe_jobs_request.DescribeJobsRequest = {}
if jobs is not None:
input_["jobs"] = jobs
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|