module Network.AWS.EC2.DetachInternetGateway
(
detachInternetGateway
, DetachInternetGateway
, digDryRun
, digInternetGatewayId
, digVPCId
, detachInternetGatewayResponse
, DetachInternetGatewayResponse
) where
import Network.AWS.EC2.Types
import Network.AWS.EC2.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DetachInternetGateway = DetachInternetGateway'
{ _digDryRun :: !(Maybe Bool)
, _digInternetGatewayId :: !Text
, _digVPCId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
detachInternetGateway
:: Text
-> Text
-> DetachInternetGateway
detachInternetGateway pInternetGatewayId_ pVPCId_ =
DetachInternetGateway'
{ _digDryRun = Nothing
, _digInternetGatewayId = pInternetGatewayId_
, _digVPCId = pVPCId_
}
digDryRun :: Lens' DetachInternetGateway (Maybe Bool)
digDryRun = lens _digDryRun (\ s a -> s{_digDryRun = a});
digInternetGatewayId :: Lens' DetachInternetGateway Text
digInternetGatewayId = lens _digInternetGatewayId (\ s a -> s{_digInternetGatewayId = a});
digVPCId :: Lens' DetachInternetGateway Text
digVPCId = lens _digVPCId (\ s a -> s{_digVPCId = a});
instance AWSRequest DetachInternetGateway where
type Sv DetachInternetGateway = EC2
type Rs DetachInternetGateway =
DetachInternetGatewayResponse
request = post
response = receiveNull DetachInternetGatewayResponse'
instance ToHeaders DetachInternetGateway where
toHeaders = const mempty
instance ToPath DetachInternetGateway where
toPath = const "/"
instance ToQuery DetachInternetGateway where
toQuery DetachInternetGateway'{..}
= mconcat
["Action" =: ("DetachInternetGateway" :: ByteString),
"Version" =: ("2015-04-15" :: ByteString),
"DryRun" =: _digDryRun,
"InternetGatewayId" =: _digInternetGatewayId,
"VpcId" =: _digVPCId]
data DetachInternetGatewayResponse =
DetachInternetGatewayResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
detachInternetGatewayResponse
:: DetachInternetGatewayResponse
detachInternetGatewayResponse = DetachInternetGatewayResponse'