{-# 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.DeleteVPNConnection
(
deleteVPNConnection
, DeleteVPNConnection
, dvcDryRun
, dvcVPNConnectionId
, deleteVPNConnectionResponse
, DeleteVPNConnectionResponse
) 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 DeleteVPNConnection = DeleteVPNConnection'
{ _dvcDryRun :: !(Maybe Bool)
, _dvcVPNConnectionId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteVPNConnection
:: Text
-> DeleteVPNConnection
deleteVPNConnection pVPNConnectionId_ =
DeleteVPNConnection'
{ _dvcDryRun = Nothing
, _dvcVPNConnectionId = pVPNConnectionId_
}
dvcDryRun :: Lens' DeleteVPNConnection (Maybe Bool)
dvcDryRun = lens _dvcDryRun (\ s a -> s{_dvcDryRun = a});
dvcVPNConnectionId :: Lens' DeleteVPNConnection Text
dvcVPNConnectionId = lens _dvcVPNConnectionId (\ s a -> s{_dvcVPNConnectionId = a});
instance AWSRequest DeleteVPNConnection where
type Rs DeleteVPNConnection =
DeleteVPNConnectionResponse
request = postQuery ec2
response = receiveNull DeleteVPNConnectionResponse'
instance Hashable DeleteVPNConnection
instance NFData DeleteVPNConnection
instance ToHeaders DeleteVPNConnection where
toHeaders = const mempty
instance ToPath DeleteVPNConnection where
toPath = const "/"
instance ToQuery DeleteVPNConnection where
toQuery DeleteVPNConnection'{..}
= mconcat
["Action" =: ("DeleteVpnConnection" :: ByteString),
"Version" =: ("2016-04-01" :: ByteString),
"DryRun" =: _dvcDryRun,
"VpnConnectionId" =: _dvcVPNConnectionId]
data DeleteVPNConnectionResponse =
DeleteVPNConnectionResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteVPNConnectionResponse
:: DeleteVPNConnectionResponse
deleteVPNConnectionResponse = DeleteVPNConnectionResponse'
instance NFData DeleteVPNConnectionResponse