acknowledgeThirdPartyJob method
Confirms a job worker has received the specified job. Used for partner actions only.
May throw ValidationException. May throw InvalidNonceException. May throw JobNotFoundException. May throw InvalidClientTokenException.
Parameter clientToken
:
The clientToken portion of the clientId and clientToken pair used to
verify that the calling entity is allowed access to the job and its
details.
Parameter jobId
:
The unique system-generated ID of the job.
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 to a GetThirdPartyJobDetails request.
Implementation
Future<AcknowledgeThirdPartyJobOutput> acknowledgeThirdPartyJob({
required String clientToken,
required String jobId,
required String nonce,
}) async {
ArgumentError.checkNotNull(clientToken, 'clientToken');
_s.validateStringLength(
'clientToken',
clientToken,
1,
256,
isRequired: true,
);
ArgumentError.checkNotNull(jobId, 'jobId');
_s.validateStringLength(
'jobId',
jobId,
1,
512,
isRequired: true,
);
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.AcknowledgeThirdPartyJob'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'clientToken': clientToken,
'jobId': jobId,
'nonce': nonce,
},
);
return AcknowledgeThirdPartyJobOutput.fromJson(jsonResponse.body);
}