{-# 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
, cvcrDestinationCidrBlock
, cvcrVPNConnectionId
, 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'
{ _cvcrDestinationCidrBlock :: !Text
, _cvcrVPNConnectionId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
createVPNConnectionRoute
:: Text
-> Text
-> CreateVPNConnectionRoute
createVPNConnectionRoute pDestinationCidrBlock_ pVPNConnectionId_ =
CreateVPNConnectionRoute'
{ _cvcrDestinationCidrBlock = pDestinationCidrBlock_
, _cvcrVPNConnectionId = pVPNConnectionId_
}
cvcrDestinationCidrBlock :: Lens' CreateVPNConnectionRoute Text
cvcrDestinationCidrBlock = lens _cvcrDestinationCidrBlock (\ s a -> s{_cvcrDestinationCidrBlock = a})
cvcrVPNConnectionId :: Lens' CreateVPNConnectionRoute Text
cvcrVPNConnectionId = lens _cvcrVPNConnectionId (\ s a -> s{_cvcrVPNConnectionId = a})
instance AWSRequest CreateVPNConnectionRoute where
type Rs CreateVPNConnectionRoute =
CreateVPNConnectionRouteResponse
request = postQuery ec2
response
= receiveNull CreateVPNConnectionRouteResponse'
instance Hashable CreateVPNConnectionRoute where
instance NFData CreateVPNConnectionRoute where
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),
"DestinationCidrBlock" =: _cvcrDestinationCidrBlock,
"VpnConnectionId" =: _cvcrVPNConnectionId]
data CreateVPNConnectionRouteResponse =
CreateVPNConnectionRouteResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
createVPNConnectionRouteResponse
:: CreateVPNConnectionRouteResponse
createVPNConnectionRouteResponse = CreateVPNConnectionRouteResponse'
instance NFData CreateVPNConnectionRouteResponse
where