async def acknowledge_job(
self,
job_id: "capo_codepipeline.types.job_id.JobId",
nonce: "capo_codepipeline.types.nonce.Nonce",
*,
config_overrides: Optional[AsyncCodePipelineClientConfig] = None,
) -> "capo_codepipeline.types.acknowledge_job_output.AcknowledgeJobOutput":
"""<p>Returns information about a specified job and whether that job has been received by the job worker. Used for custom actions only.</p>
Args:
job_id: <p>The unique system-generated ID of the job for which you want to confirm receipt.</p>
nonce: <p>A system-generated random number that CodePipeline uses to ensure that the job is being worked on by only one job worker. Get this number from the response of the <a>PollForJobs</a> request that returned this job.</p>
Raises:
capo_codepipeline.errors.invalid_nonce_exception.InvalidNonceException: <p>The nonce was specified in an invalid format.</p>
capo_codepipeline.errors.job_not_found_exception.JobNotFoundException: <p>The job was specified in an invalid format or cannot be found.</p>
capo_codepipeline.errors.validation_exception.ValidationException: <p>The validation was specified in an invalid format.</p>
capo_codepipeline.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_codepipeline.types.acknowledge_job_input.AcknowledgeJobInput]",
) -> AsyncOperationResponse[
"capo_codepipeline.types.acknowledge_job_output.AcknowledgeJobOutput"
]:
if req.options.protocol == "awsJson1_1":
import capo_codepipeline._operations.code_pipeline_20150709.aws_json1_1.acknowledge_job
(
output,
http_response,
) = await capo_codepipeline._operations.code_pipeline_20150709.aws_json1_1.acknowledge_job.async_acknowledge_job(
req.options, req.input
)
elif req.options.protocol == "rpcv2Cbor":
import capo_codepipeline._operations.code_pipeline_20150709.rpcv2_cbor.acknowledge_job
(
output,
http_response,
) = await capo_codepipeline._operations.code_pipeline_20150709.rpcv2_cbor.acknowledge_job.async_acknowledge_job(
req.options, req.input
)
else:
raise ValueError(f"unknown protocol {req.options.protocol!r}")
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AcknowledgeJob")
)
input_: capo_codepipeline.types.acknowledge_job_input.AcknowledgeJobInput = {
"job_id": job_id,
"nonce": nonce,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output