deleteImage method

Future<DeleteImageResult> deleteImage({
  1. required String name,
})

Deletes the specified image. You cannot delete an image when it is in use. After you delete an image, you cannot provision new capacity using the image.

May throw ResourceInUseException. May throw ResourceNotFoundException. May throw OperationNotPermittedException. May throw ConcurrentModificationException.

Parameter name : The name of the image.

Implementation

Future<DeleteImageResult> deleteImage({
  required String name,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'PhotonAdminProxyService.DeleteImage'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Name': name,
    },
  );

  return DeleteImageResult.fromJson(jsonResponse.body);
}