module Network.AWS.EC2.DetachInternetGateway
(
DetachInternetGateway
, detachInternetGateway
, digDryRun
, digInternetGatewayId
, digVpcId
, DetachInternetGatewayResponse
, detachInternetGatewayResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.EC2.Types
import qualified GHC.Exts
data DetachInternetGateway = DetachInternetGateway
{ _digDryRun :: Maybe Bool
, _digInternetGatewayId :: Text
, _digVpcId :: Text
} deriving (Eq, Ord, Read, Show)
detachInternetGateway :: Text
-> Text
-> DetachInternetGateway
detachInternetGateway p1 p2 = DetachInternetGateway
{ _digInternetGatewayId = p1
, _digVpcId = p2
, _digDryRun = Nothing
}
digDryRun :: Lens' DetachInternetGateway (Maybe Bool)
digDryRun = lens _digDryRun (\s a -> s { _digDryRun = a })
digInternetGatewayId :: Lens' DetachInternetGateway Text
digInternetGatewayId =
lens _digInternetGatewayId (\s a -> s { _digInternetGatewayId = a })
digVpcId :: Lens' DetachInternetGateway Text
digVpcId = lens _digVpcId (\s a -> s { _digVpcId = a })
data DetachInternetGatewayResponse = DetachInternetGatewayResponse
deriving (Eq, Ord, Read, Show, Generic)
detachInternetGatewayResponse :: DetachInternetGatewayResponse
detachInternetGatewayResponse = DetachInternetGatewayResponse
instance ToPath DetachInternetGateway where
toPath = const "/"
instance ToQuery DetachInternetGateway where
toQuery DetachInternetGateway{..} = mconcat
[ "DryRun" =? _digDryRun
, "InternetGatewayId" =? _digInternetGatewayId
, "VpcId" =? _digVpcId
]
instance ToHeaders DetachInternetGateway
instance AWSRequest DetachInternetGateway where
type Sv DetachInternetGateway = EC2
type Rs DetachInternetGateway = DetachInternetGatewayResponse
request = post "DetachInternetGateway"
response = nullResponse DetachInternetGatewayResponse