{-# 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
, dvpngVPCId
, dvpngVPNGatewayId
, 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)
, _dvpngVPCId :: !Text
, _dvpngVPNGatewayId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
detachVPNGateway
:: Text
-> Text
-> DetachVPNGateway
detachVPNGateway pVPCId_ pVPNGatewayId_ =
DetachVPNGateway'
{ _dvpngDryRun = Nothing
, _dvpngVPCId = pVPCId_
, _dvpngVPNGatewayId = pVPNGatewayId_
}
dvpngDryRun :: Lens' DetachVPNGateway (Maybe Bool)
dvpngDryRun = lens _dvpngDryRun (\ s a -> s{_dvpngDryRun = a})
dvpngVPCId :: Lens' DetachVPNGateway Text
dvpngVPCId = lens _dvpngVPCId (\ s a -> s{_dvpngVPCId = a})
dvpngVPNGatewayId :: Lens' DetachVPNGateway Text
dvpngVPNGatewayId = lens _dvpngVPNGatewayId (\ s a -> s{_dvpngVPNGatewayId = a})
instance AWSRequest DetachVPNGateway where
type Rs DetachVPNGateway = DetachVPNGatewayResponse
request = postQuery ec2
response = receiveNull DetachVPNGatewayResponse'
instance Hashable DetachVPNGateway where
instance NFData DetachVPNGateway where
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-11-15" :: ByteString),
"DryRun" =: _dvpngDryRun, "VpcId" =: _dvpngVPCId,
"VpnGatewayId" =: _dvpngVPNGatewayId]
data DetachVPNGatewayResponse =
DetachVPNGatewayResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
detachVPNGatewayResponse
:: DetachVPNGatewayResponse
detachVPNGatewayResponse = DetachVPNGatewayResponse'
instance NFData DetachVPNGatewayResponse where