Returns information about a specified job and whether that job has been received by the job worker. Used for custom actions only.
Parameters:
-
job_id
(JobId)
–
The unique system-generated ID of the job for which you want to confirm receipt.
-
nonce
(Nonce)
–
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 PollForJobs request that returned this job.
Raises:
Source code in docs_src/capo_codepipeline/_services/code_pipeline.py
| def acknowledge_job(
self,
job_id: "capo_codepipeline.types.job_id.JobId",
nonce: "capo_codepipeline.types.nonce.Nonce",
*,
config_overrides: Optional[CodePipelineClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_codepipeline.types.acknowledge_job_input.AcknowledgeJobInput]",
) -> OperationResponse[
"capo_codepipeline.types.acknowledge_job_output.AcknowledgeJobOutput"
]:
import capo_codepipeline._operations.code_pipeline_20150709.acknowledge_job
output, http_response = (
capo_codepipeline._operations.code_pipeline_20150709.acknowledge_job.acknowledge_job(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|