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 ToHeaders CreateVPNConnectionRoute where
toHeaders = const mempty
instance ToPath CreateVPNConnectionRoute where
toPath = const "/"
instance ToQuery CreateVPNConnectionRoute where
toQuery CreateVPNConnectionRoute'{..}
= mconcat
["Action" =:
("CreateVpnConnectionRoute" :: ByteString),
"Version" =: ("2015-10-01" :: ByteString),
"VpnConnectionId" =: _cvcrVPNConnectionId,
"DestinationCidrBlock" =: _cvcrDestinationCIdRBlock]
data CreateVPNConnectionRouteResponse =
CreateVPNConnectionRouteResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
createVPNConnectionRouteResponse
:: CreateVPNConnectionRouteResponse
createVPNConnectionRouteResponse = CreateVPNConnectionRouteResponse'