module Network.AWS.EC2.AttachInternetGateway
(
AttachInternetGateway
, attachInternetGateway
, aigDryRun
, aigInternetGatewayId
, aigVpcId
, AttachInternetGatewayResponse
, attachInternetGatewayResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.EC2.Types
import qualified GHC.Exts
data AttachInternetGateway = AttachInternetGateway
{ _aigDryRun :: Maybe Bool
, _aigInternetGatewayId :: Text
, _aigVpcId :: Text
} deriving (Eq, Ord, Show)
attachInternetGateway :: Text
-> Text
-> AttachInternetGateway
attachInternetGateway p1 p2 = AttachInternetGateway
{ _aigInternetGatewayId = p1
, _aigVpcId = p2
, _aigDryRun = Nothing
}
aigDryRun :: Lens' AttachInternetGateway (Maybe Bool)
aigDryRun = lens _aigDryRun (\s a -> s { _aigDryRun = a })
aigInternetGatewayId :: Lens' AttachInternetGateway Text
aigInternetGatewayId =
lens _aigInternetGatewayId (\s a -> s { _aigInternetGatewayId = a })
aigVpcId :: Lens' AttachInternetGateway Text
aigVpcId = lens _aigVpcId (\s a -> s { _aigVpcId = a })
data AttachInternetGatewayResponse = AttachInternetGatewayResponse
deriving (Eq, Ord, Show, Generic)
attachInternetGatewayResponse :: AttachInternetGatewayResponse
attachInternetGatewayResponse = AttachInternetGatewayResponse
instance ToPath AttachInternetGateway where
toPath = const "/"
instance ToQuery AttachInternetGateway where
toQuery AttachInternetGateway{..} = mconcat
[ "dryRun" =? _aigDryRun
, "internetGatewayId" =? _aigInternetGatewayId
, "vpcId" =? _aigVpcId
]
instance ToHeaders AttachInternetGateway
instance AWSRequest AttachInternetGateway where
type Sv AttachInternetGateway = EC2
type Rs AttachInternetGateway = AttachInternetGatewayResponse
request = post "AttachInternetGateway"
response = nullResponse AttachInternetGatewayResponse