{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.EC2.DeleteFpgaImage
(
deleteFpgaImage
, DeleteFpgaImage
, dfiDryRun
, dfiFpgaImageId
, deleteFpgaImageResponse
, DeleteFpgaImageResponse
, delrsReturn
, delrsResponseStatus
) where
import Network.AWS.EC2.Types
import Network.AWS.EC2.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteFpgaImage = DeleteFpgaImage'
{ _dfiDryRun :: !(Maybe Bool)
, _dfiFpgaImageId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteFpgaImage
:: Text
-> DeleteFpgaImage
deleteFpgaImage pFpgaImageId_ =
DeleteFpgaImage' {_dfiDryRun = Nothing, _dfiFpgaImageId = pFpgaImageId_}
dfiDryRun :: Lens' DeleteFpgaImage (Maybe Bool)
dfiDryRun = lens _dfiDryRun (\ s a -> s{_dfiDryRun = a})
dfiFpgaImageId :: Lens' DeleteFpgaImage Text
dfiFpgaImageId = lens _dfiFpgaImageId (\ s a -> s{_dfiFpgaImageId = a})
instance AWSRequest DeleteFpgaImage where
type Rs DeleteFpgaImage = DeleteFpgaImageResponse
request = postQuery ec2
response
= receiveXML
(\ s h x ->
DeleteFpgaImageResponse' <$>
(x .@? "return") <*> (pure (fromEnum s)))
instance Hashable DeleteFpgaImage where
instance NFData DeleteFpgaImage where
instance ToHeaders DeleteFpgaImage where
toHeaders = const mempty
instance ToPath DeleteFpgaImage where
toPath = const "/"
instance ToQuery DeleteFpgaImage where
toQuery DeleteFpgaImage'{..}
= mconcat
["Action" =: ("DeleteFpgaImage" :: ByteString),
"Version" =: ("2016-11-15" :: ByteString),
"DryRun" =: _dfiDryRun,
"FpgaImageId" =: _dfiFpgaImageId]
data DeleteFpgaImageResponse = DeleteFpgaImageResponse'
{ _delrsReturn :: !(Maybe Bool)
, _delrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteFpgaImageResponse
:: Int
-> DeleteFpgaImageResponse
deleteFpgaImageResponse pResponseStatus_ =
DeleteFpgaImageResponse'
{_delrsReturn = Nothing, _delrsResponseStatus = pResponseStatus_}
delrsReturn :: Lens' DeleteFpgaImageResponse (Maybe Bool)
delrsReturn = lens _delrsReturn (\ s a -> s{_delrsReturn = a})
delrsResponseStatus :: Lens' DeleteFpgaImageResponse Int
delrsResponseStatus = lens _delrsResponseStatus (\ s a -> s{_delrsResponseStatus = a})
instance NFData DeleteFpgaImageResponse where