deleteImage method
Deletes an Image Builder image resource. This does not delete any EC2 AMIs or ECR container images that are created during the image build process. You must clean those up separately, using the appropriate Amazon EC2 or Amazon ECR console actions, or API or CLI commands.
- To deregister an EC2 Linux AMI, see Deregister your Linux AMI in the Amazon EC2 User Guide .
- To deregister an EC2 Windows AMI, see Deregister your Windows AMI in the Amazon EC2 Windows Guide .
- To delete a container image from Amazon ECR, see Deleting an image in the Amazon ECR User Guide.
May throw CallRateLimitExceededException.
May throw ClientException.
May throw ForbiddenException.
May throw InvalidRequestException.
May throw ResourceDependencyException.
May throw ServiceException.
May throw ServiceUnavailableException.
Parameter imageBuildVersionArn :
The Amazon Resource Name (ARN) of the Image Builder image resource to
delete.
Implementation
Future<DeleteImageResponse> deleteImage({
required String imageBuildVersionArn,
}) async {
final $query = <String, List<String>>{
'imageBuildVersionArn': [imageBuildVersionArn],
};
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri: '/DeleteImage',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return DeleteImageResponse.fromJson(response);
}