acknowledgeJob method
Returns information about a specified job and whether that job has been received by the job worker. Used for custom actions only.
May throw ValidationException. May throw InvalidNonceException. May throw JobNotFoundException.
Parameter jobId
:
The unique system-generated ID of the job for which you want to confirm
receipt.
Parameter nonce
:
A system-generated random number that AWS 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.
Implementation
Future<AcknowledgeJobOutput> acknowledgeJob({
required String jobId,
required String nonce,
}) async {
ArgumentError.checkNotNull(jobId, 'jobId');
ArgumentError.checkNotNull(nonce, 'nonce');
_s.validateStringLength(
'nonce',
nonce,
1,
50,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodePipeline_20150709.AcknowledgeJob'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'jobId': jobId,
'nonce': nonce,
},
);
return AcknowledgeJobOutput.fromJson(jsonResponse.body);
}