module Network.AWS.EC2.AttachInternetGateway
(
attachInternetGateway
, AttachInternetGateway
, aigDryRun
, aigInternetGatewayId
, aigVPCId
, attachInternetGatewayResponse
, AttachInternetGatewayResponse
) 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 AttachInternetGateway = AttachInternetGateway'
{ _aigDryRun :: !(Maybe Bool)
, _aigInternetGatewayId :: !Text
, _aigVPCId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
attachInternetGateway
:: Text
-> Text
-> AttachInternetGateway
attachInternetGateway pInternetGatewayId_ pVPCId_ =
AttachInternetGateway'
{ _aigDryRun = Nothing
, _aigInternetGatewayId = pInternetGatewayId_
, _aigVPCId = pVPCId_
}
aigDryRun :: Lens' AttachInternetGateway (Maybe Bool)
aigDryRun = lens _aigDryRun (\ s a -> s{_aigDryRun = a});
aigInternetGatewayId :: Lens' AttachInternetGateway Text
aigInternetGatewayId = lens _aigInternetGatewayId (\ s a -> s{_aigInternetGatewayId = a});
aigVPCId :: Lens' AttachInternetGateway Text
aigVPCId = lens _aigVPCId (\ s a -> s{_aigVPCId = a});
instance AWSRequest AttachInternetGateway where
type Sv AttachInternetGateway = EC2
type Rs AttachInternetGateway =
AttachInternetGatewayResponse
request = post
response = receiveNull AttachInternetGatewayResponse'
instance ToHeaders AttachInternetGateway where
toHeaders = const mempty
instance ToPath AttachInternetGateway where
toPath = const "/"
instance ToQuery AttachInternetGateway where
toQuery AttachInternetGateway'{..}
= mconcat
["Action" =: ("AttachInternetGateway" :: ByteString),
"Version" =: ("2015-04-15" :: ByteString),
"DryRun" =: _aigDryRun,
"InternetGatewayId" =: _aigInternetGatewayId,
"VpcId" =: _aigVPCId]
data AttachInternetGatewayResponse =
AttachInternetGatewayResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
attachInternetGatewayResponse
:: AttachInternetGatewayResponse
attachInternetGatewayResponse = AttachInternetGatewayResponse'