cancelImageCreation method
CancelImageCreation cancels the creation of Image. This operation can only be used on images in a non-terminal state.
May throw CallRateLimitExceededException.
May throw ClientException.
May throw ForbiddenException.
May throw IdempotentParameterMismatchException.
May throw InvalidRequestException.
May throw ResourceInUseException.
May throw ServiceException.
May throw ServiceUnavailableException.
Parameter imageBuildVersionArn :
The Amazon Resource Name (ARN) of the image that you want to cancel
creation for.
Parameter clientToken :
Unique, case-sensitive identifier you provide to ensure idempotency of the
request. For more information, see Ensuring
idempotency in the Amazon EC2 API Reference.
Implementation
Future<CancelImageCreationResponse> cancelImageCreation({
required String imageBuildVersionArn,
String? clientToken,
}) async {
final $payload = <String, dynamic>{
'imageBuildVersionArn': imageBuildVersionArn,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/CancelImageCreation',
exceptionFnMap: _exceptionFns,
);
return CancelImageCreationResponse.fromJson(response);
}