{-# 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.DeleteVPC
(
deleteVPC
, DeleteVPC
, delDryRun
, delVPCId
, deleteVPCResponse
, DeleteVPCResponse
) 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 DeleteVPC = DeleteVPC'
{ _delDryRun :: !(Maybe Bool)
, _delVPCId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteVPC
:: Text
-> DeleteVPC
deleteVPC pVPCId_ =
DeleteVPC'
{ _delDryRun = Nothing
, _delVPCId = pVPCId_
}
delDryRun :: Lens' DeleteVPC (Maybe Bool)
delDryRun = lens _delDryRun (\ s a -> s{_delDryRun = a});
delVPCId :: Lens' DeleteVPC Text
delVPCId = lens _delVPCId (\ s a -> s{_delVPCId = a});
instance AWSRequest DeleteVPC where
type Rs DeleteVPC = DeleteVPCResponse
request = postQuery ec2
response = receiveNull DeleteVPCResponse'
instance Hashable DeleteVPC
instance NFData DeleteVPC
instance ToHeaders DeleteVPC where
toHeaders = const mempty
instance ToPath DeleteVPC where
toPath = const "/"
instance ToQuery DeleteVPC where
toQuery DeleteVPC'{..}
= mconcat
["Action" =: ("DeleteVpc" :: ByteString),
"Version" =: ("2016-04-01" :: ByteString),
"DryRun" =: _delDryRun, "VpcId" =: _delVPCId]
data DeleteVPCResponse =
DeleteVPCResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteVPCResponse
:: DeleteVPCResponse
deleteVPCResponse = DeleteVPCResponse'
instance NFData DeleteVPCResponse