{-# 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.ReplaceRoute
(
replaceRoute
, ReplaceRoute
, rrVPCPeeringConnectionId
, rrInstanceId
, rrEgressOnlyInternetGatewayId
, rrDestinationIPv6CidrBlock
, rrNatGatewayId
, rrNetworkInterfaceId
, rrGatewayId
, rrDryRun
, rrDestinationCidrBlock
, rrRouteTableId
, replaceRouteResponse
, ReplaceRouteResponse
) 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 ReplaceRoute = ReplaceRoute'
{ _rrVPCPeeringConnectionId :: !(Maybe Text)
, _rrInstanceId :: !(Maybe Text)
, _rrEgressOnlyInternetGatewayId :: !(Maybe Text)
, _rrDestinationIPv6CidrBlock :: !(Maybe Text)
, _rrNatGatewayId :: !(Maybe Text)
, _rrNetworkInterfaceId :: !(Maybe Text)
, _rrGatewayId :: !(Maybe Text)
, _rrDryRun :: !(Maybe Bool)
, _rrDestinationCidrBlock :: !(Maybe Text)
, _rrRouteTableId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
replaceRoute
:: Text
-> ReplaceRoute
replaceRoute pRouteTableId_ =
ReplaceRoute'
{ _rrVPCPeeringConnectionId = Nothing
, _rrInstanceId = Nothing
, _rrEgressOnlyInternetGatewayId = Nothing
, _rrDestinationIPv6CidrBlock = Nothing
, _rrNatGatewayId = Nothing
, _rrNetworkInterfaceId = Nothing
, _rrGatewayId = Nothing
, _rrDryRun = Nothing
, _rrDestinationCidrBlock = Nothing
, _rrRouteTableId = pRouteTableId_
}
rrVPCPeeringConnectionId :: Lens' ReplaceRoute (Maybe Text)
rrVPCPeeringConnectionId = lens _rrVPCPeeringConnectionId (\ s a -> s{_rrVPCPeeringConnectionId = a});
rrInstanceId :: Lens' ReplaceRoute (Maybe Text)
rrInstanceId = lens _rrInstanceId (\ s a -> s{_rrInstanceId = a});
rrEgressOnlyInternetGatewayId :: Lens' ReplaceRoute (Maybe Text)
rrEgressOnlyInternetGatewayId = lens _rrEgressOnlyInternetGatewayId (\ s a -> s{_rrEgressOnlyInternetGatewayId = a});
rrDestinationIPv6CidrBlock :: Lens' ReplaceRoute (Maybe Text)
rrDestinationIPv6CidrBlock = lens _rrDestinationIPv6CidrBlock (\ s a -> s{_rrDestinationIPv6CidrBlock = a});
rrNatGatewayId :: Lens' ReplaceRoute (Maybe Text)
rrNatGatewayId = lens _rrNatGatewayId (\ s a -> s{_rrNatGatewayId = a});
rrNetworkInterfaceId :: Lens' ReplaceRoute (Maybe Text)
rrNetworkInterfaceId = lens _rrNetworkInterfaceId (\ s a -> s{_rrNetworkInterfaceId = a});
rrGatewayId :: Lens' ReplaceRoute (Maybe Text)
rrGatewayId = lens _rrGatewayId (\ s a -> s{_rrGatewayId = a});
rrDryRun :: Lens' ReplaceRoute (Maybe Bool)
rrDryRun = lens _rrDryRun (\ s a -> s{_rrDryRun = a});
rrDestinationCidrBlock :: Lens' ReplaceRoute (Maybe Text)
rrDestinationCidrBlock = lens _rrDestinationCidrBlock (\ s a -> s{_rrDestinationCidrBlock = a});
rrRouteTableId :: Lens' ReplaceRoute Text
rrRouteTableId = lens _rrRouteTableId (\ s a -> s{_rrRouteTableId = a});
instance AWSRequest ReplaceRoute where
type Rs ReplaceRoute = ReplaceRouteResponse
request = postQuery ec2
response = receiveNull ReplaceRouteResponse'
instance Hashable ReplaceRoute
instance NFData ReplaceRoute
instance ToHeaders ReplaceRoute where
toHeaders = const mempty
instance ToPath ReplaceRoute where
toPath = const "/"
instance ToQuery ReplaceRoute where
toQuery ReplaceRoute'{..}
= mconcat
["Action" =: ("ReplaceRoute" :: ByteString),
"Version" =: ("2016-11-15" :: ByteString),
"VpcPeeringConnectionId" =:
_rrVPCPeeringConnectionId,
"InstanceId" =: _rrInstanceId,
"EgressOnlyInternetGatewayId" =:
_rrEgressOnlyInternetGatewayId,
"DestinationIpv6CidrBlock" =:
_rrDestinationIPv6CidrBlock,
"NatGatewayId" =: _rrNatGatewayId,
"NetworkInterfaceId" =: _rrNetworkInterfaceId,
"GatewayId" =: _rrGatewayId, "DryRun" =: _rrDryRun,
"DestinationCidrBlock" =: _rrDestinationCidrBlock,
"RouteTableId" =: _rrRouteTableId]
data ReplaceRouteResponse =
ReplaceRouteResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
replaceRouteResponse
:: ReplaceRouteResponse
replaceRouteResponse = ReplaceRouteResponse'
instance NFData ReplaceRouteResponse