Describes a job.
Requires permission to access the DescribeJob action.
Parameters:
-
job_id
(JobId)
–
The unique identifier you assigned to this job when it was created.
-
before_substitution
(Optional[BeforeSubstitutionFlag], default:
None
)
–
Provides a view of the job document before and after the substitution parameters have been resolved with their exact values.
Raises:
Source code in docs_src/capo_iot/_services/io_t.py
| def describe_job(
self,
job_id: "capo_iot.types.job_id.JobId",
*,
config_overrides: Optional[IoTClientConfig] = None,
before_substitution: Optional[
"capo_iot.types.before_substitution_flag.BeforeSubstitutionFlag"
] = None,
) -> "capo_iot.types.describe_job_response.DescribeJobResponse":
"""<p>Describes a job.</p> <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">DescribeJob</a> action.</p>
Args:
job_id: <p>The unique identifier you assigned to this job when it was created.</p>
before_substitution: <p>Provides a view of the job document before and after the substitution parameters have been resolved with their exact values.</p>
Raises:
capo_iot.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
capo_iot.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
capo_iot.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is temporarily unavailable.</p>
capo_iot.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
capo_iot.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_iot.types.describe_job_request.DescribeJobRequest]",
) -> OperationResponse[
"capo_iot.types.describe_job_response.DescribeJobResponse"
]:
import capo_iot._operations.aws_iot_service.describe_job
output, http_response = (
capo_iot._operations.aws_iot_service.describe_job.describe_job(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeJob")
)
input_: capo_iot.types.describe_job_request.DescribeJobRequest = {
"job_id": job_id
}
if before_substitution is not None:
input_["before_substitution"] = before_substitution
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|