module Network.AWS.EC2.ReplaceRoute
(
ReplaceRoute
, replaceRoute
, rrDestinationCidrBlock
, rrDryRun
, rrGatewayId
, rrInstanceId
, rrNetworkInterfaceId
, rrRouteTableId
, rrVpcPeeringConnectionId
, ReplaceRouteResponse
, replaceRouteResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.EC2.Types
import qualified GHC.Exts
data ReplaceRoute = ReplaceRoute
{ _rrDestinationCidrBlock :: Text
, _rrDryRun :: Maybe Bool
, _rrGatewayId :: Maybe Text
, _rrInstanceId :: Maybe Text
, _rrNetworkInterfaceId :: Maybe Text
, _rrRouteTableId :: Text
, _rrVpcPeeringConnectionId :: Maybe Text
} deriving (Eq, Ord, Show)
replaceRoute :: Text
-> Text
-> ReplaceRoute
replaceRoute p1 p2 = ReplaceRoute
{ _rrRouteTableId = p1
, _rrDestinationCidrBlock = p2
, _rrDryRun = Nothing
, _rrGatewayId = Nothing
, _rrInstanceId = Nothing
, _rrNetworkInterfaceId = Nothing
, _rrVpcPeeringConnectionId = Nothing
}
rrDestinationCidrBlock :: Lens' ReplaceRoute Text
rrDestinationCidrBlock =
lens _rrDestinationCidrBlock (\s a -> s { _rrDestinationCidrBlock = a })
rrDryRun :: Lens' ReplaceRoute (Maybe Bool)
rrDryRun = lens _rrDryRun (\s a -> s { _rrDryRun = a })
rrGatewayId :: Lens' ReplaceRoute (Maybe Text)
rrGatewayId = lens _rrGatewayId (\s a -> s { _rrGatewayId = a })
rrInstanceId :: Lens' ReplaceRoute (Maybe Text)
rrInstanceId = lens _rrInstanceId (\s a -> s { _rrInstanceId = a })
rrNetworkInterfaceId :: Lens' ReplaceRoute (Maybe Text)
rrNetworkInterfaceId =
lens _rrNetworkInterfaceId (\s a -> s { _rrNetworkInterfaceId = a })
rrRouteTableId :: Lens' ReplaceRoute Text
rrRouteTableId = lens _rrRouteTableId (\s a -> s { _rrRouteTableId = a })
rrVpcPeeringConnectionId :: Lens' ReplaceRoute (Maybe Text)
rrVpcPeeringConnectionId =
lens _rrVpcPeeringConnectionId
(\s a -> s { _rrVpcPeeringConnectionId = a })
data ReplaceRouteResponse = ReplaceRouteResponse
deriving (Eq, Ord, Show, Generic)
replaceRouteResponse :: ReplaceRouteResponse
replaceRouteResponse = ReplaceRouteResponse
instance ToPath ReplaceRoute where
toPath = const "/"
instance ToQuery ReplaceRoute where
toQuery ReplaceRoute{..} = mconcat
[ "destinationCidrBlock" =? _rrDestinationCidrBlock
, "dryRun" =? _rrDryRun
, "gatewayId" =? _rrGatewayId
, "instanceId" =? _rrInstanceId
, "networkInterfaceId" =? _rrNetworkInterfaceId
, "routeTableId" =? _rrRouteTableId
, "vpcPeeringConnectionId" =? _rrVpcPeeringConnectionId
]
instance ToHeaders ReplaceRoute
instance AWSRequest ReplaceRoute where
type Sv ReplaceRoute = EC2
type Rs ReplaceRoute = ReplaceRouteResponse
request = post "ReplaceRoute"
response = nullResponse ReplaceRouteResponse