retryBuildBatch method
Future<RetryBuildBatchOutput>
retryBuildBatch({
- String? id,
- String? idempotencyToken,
- RetryBuildBatchType? retryType,
Restarts a failed batch build. Only batch builds that have failed can be retried.
May throw InvalidInputException. May throw ResourceNotFoundException.
Parameter id
:
Specifies the identifier of the batch build to restart.
Parameter idempotencyToken
:
A unique, case sensitive identifier you provide to ensure the idempotency
of the RetryBuildBatch
request. The token is included in the
RetryBuildBatch
request and is valid for five minutes. If you
repeat the RetryBuildBatch
request with the same token, but
change a parameter, AWS CodeBuild returns a parameter mismatch error.
Parameter retryType
:
Specifies the type of retry to perform.
Implementation
Future<RetryBuildBatchOutput> retryBuildBatch({
String? id,
String? idempotencyToken,
RetryBuildBatchType? retryType,
}) async {
_s.validateStringLength(
'id',
id,
1,
1152921504606846976,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeBuild_20161006.RetryBuildBatch'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (id != null) 'id': id,
if (idempotencyToken != null) 'idempotencyToken': idempotencyToken,
if (retryType != null) 'retryType': retryType.toValue(),
},
);
return RetryBuildBatchOutput.fromJson(jsonResponse.body);
}