{-# 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.CreateVPNConnectionRoute
(
createVPNConnectionRoute
, CreateVPNConnectionRoute
, cvcrVPNConnectionId
, cvcrDestinationCIdRBlock
, createVPNConnectionRouteResponse
, CreateVPNConnectionRouteResponse
) 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 CreateVPNConnectionRoute = CreateVPNConnectionRoute'
{ _cvcrVPNConnectionId :: !Text
, _cvcrDestinationCIdRBlock :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
createVPNConnectionRoute
:: Text
-> Text
-> CreateVPNConnectionRoute
createVPNConnectionRoute pVPNConnectionId_ pDestinationCIdRBlock_ =
CreateVPNConnectionRoute'
{ _cvcrVPNConnectionId = pVPNConnectionId_
, _cvcrDestinationCIdRBlock = pDestinationCIdRBlock_
}
cvcrVPNConnectionId :: Lens' CreateVPNConnectionRoute Text
cvcrVPNConnectionId = lens _cvcrVPNConnectionId (\ s a -> s{_cvcrVPNConnectionId = a});
cvcrDestinationCIdRBlock :: Lens' CreateVPNConnectionRoute Text
cvcrDestinationCIdRBlock = lens _cvcrDestinationCIdRBlock (\ s a -> s{_cvcrDestinationCIdRBlock = a});
instance AWSRequest CreateVPNConnectionRoute where
type Rs CreateVPNConnectionRoute =
CreateVPNConnectionRouteResponse
request = postQuery ec2
response
= receiveNull CreateVPNConnectionRouteResponse'
instance Hashable CreateVPNConnectionRoute
instance NFData CreateVPNConnectionRoute
instance ToHeaders CreateVPNConnectionRoute where
toHeaders = const mempty
instance ToPath CreateVPNConnectionRoute where
toPath = const "/"
instance ToQuery CreateVPNConnectionRoute where
toQuery CreateVPNConnectionRoute'{..}
= mconcat
["Action" =:
("CreateVpnConnectionRoute" :: ByteString),
"Version" =: ("2016-04-01" :: ByteString),
"VpnConnectionId" =: _cvcrVPNConnectionId,
"DestinationCidrBlock" =: _cvcrDestinationCIdRBlock]
data CreateVPNConnectionRouteResponse =
CreateVPNConnectionRouteResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
createVPNConnectionRouteResponse
:: CreateVPNConnectionRouteResponse
createVPNConnectionRouteResponse = CreateVPNConnectionRouteResponse'
instance NFData CreateVPNConnectionRouteResponse