{-# 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-11-15" :: ByteString),
"VpnConnectionId" =: _cvcrVPNConnectionId,
"DestinationCidrBlock" =: _cvcrDestinationCidrBlock]
data CreateVPNConnectionRouteResponse =
CreateVPNConnectionRouteResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
createVPNConnectionRouteResponse
:: CreateVPNConnectionRouteResponse
createVPNConnectionRouteResponse = CreateVPNConnectionRouteResponse'
instance NFData CreateVPNConnectionRouteResponse