{-# 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.DetachVPNGateway
(
detachVPNGateway
, DetachVPNGateway
, dvpngDryRun
, dvpngVPNGatewayId
, dvpngVPCId
, detachVPNGatewayResponse
, DetachVPNGatewayResponse
) 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 DetachVPNGateway = DetachVPNGateway'
{ _dvpngDryRun :: !(Maybe Bool)
, _dvpngVPNGatewayId :: !Text
, _dvpngVPCId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
detachVPNGateway
:: Text
-> Text
-> DetachVPNGateway
detachVPNGateway pVPNGatewayId_ pVPCId_ =
DetachVPNGateway'
{ _dvpngDryRun = Nothing
, _dvpngVPNGatewayId = pVPNGatewayId_
, _dvpngVPCId = pVPCId_
}
dvpngDryRun :: Lens' DetachVPNGateway (Maybe Bool)
dvpngDryRun = lens _dvpngDryRun (\ s a -> s{_dvpngDryRun = a});
dvpngVPNGatewayId :: Lens' DetachVPNGateway Text
dvpngVPNGatewayId = lens _dvpngVPNGatewayId (\ s a -> s{_dvpngVPNGatewayId = a});
dvpngVPCId :: Lens' DetachVPNGateway Text
dvpngVPCId = lens _dvpngVPCId (\ s a -> s{_dvpngVPCId = a});
instance AWSRequest DetachVPNGateway where
type Rs DetachVPNGateway = DetachVPNGatewayResponse
request = postQuery ec2
response = receiveNull DetachVPNGatewayResponse'
instance Hashable DetachVPNGateway
instance NFData DetachVPNGateway
instance ToHeaders DetachVPNGateway where
toHeaders = const mempty
instance ToPath DetachVPNGateway where
toPath = const "/"
instance ToQuery DetachVPNGateway where
toQuery DetachVPNGateway'{..}
= mconcat
["Action" =: ("DetachVpnGateway" :: ByteString),
"Version" =: ("2016-04-01" :: ByteString),
"DryRun" =: _dvpngDryRun,
"VpnGatewayId" =: _dvpngVPNGatewayId,
"VpcId" =: _dvpngVPCId]
data DetachVPNGatewayResponse =
DetachVPNGatewayResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
detachVPNGatewayResponse
:: DetachVPNGatewayResponse
detachVPNGatewayResponse = DetachVPNGatewayResponse'
instance NFData DetachVPNGatewayResponse