module Network.AWS.EC2.DeleteVpcPeeringConnection
(
DeleteVpcPeeringConnection
, deleteVpcPeeringConnection
, dvpcDryRun
, dvpcVpcPeeringConnectionId
, DeleteVpcPeeringConnectionResponse
, deleteVpcPeeringConnectionResponse
, dvpcrReturn
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.EC2.Types
import qualified GHC.Exts
data DeleteVpcPeeringConnection = DeleteVpcPeeringConnection
{ _dvpcDryRun :: Maybe Bool
, _dvpcVpcPeeringConnectionId :: Text
} deriving (Eq, Ord, Read, Show)
deleteVpcPeeringConnection :: Text
-> DeleteVpcPeeringConnection
deleteVpcPeeringConnection p1 = DeleteVpcPeeringConnection
{ _dvpcVpcPeeringConnectionId = p1
, _dvpcDryRun = Nothing
}
dvpcDryRun :: Lens' DeleteVpcPeeringConnection (Maybe Bool)
dvpcDryRun = lens _dvpcDryRun (\s a -> s { _dvpcDryRun = a })
dvpcVpcPeeringConnectionId :: Lens' DeleteVpcPeeringConnection Text
dvpcVpcPeeringConnectionId =
lens _dvpcVpcPeeringConnectionId
(\s a -> s { _dvpcVpcPeeringConnectionId = a })
newtype DeleteVpcPeeringConnectionResponse = DeleteVpcPeeringConnectionResponse
{ _dvpcrReturn :: Maybe Bool
} deriving (Eq, Ord, Read, Show)
deleteVpcPeeringConnectionResponse :: DeleteVpcPeeringConnectionResponse
deleteVpcPeeringConnectionResponse = DeleteVpcPeeringConnectionResponse
{ _dvpcrReturn = Nothing
}
dvpcrReturn :: Lens' DeleteVpcPeeringConnectionResponse (Maybe Bool)
dvpcrReturn = lens _dvpcrReturn (\s a -> s { _dvpcrReturn = a })
instance ToPath DeleteVpcPeeringConnection where
toPath = const "/"
instance ToQuery DeleteVpcPeeringConnection where
toQuery DeleteVpcPeeringConnection{..} = mconcat
[ "DryRun" =? _dvpcDryRun
, "VpcPeeringConnectionId" =? _dvpcVpcPeeringConnectionId
]
instance ToHeaders DeleteVpcPeeringConnection
instance AWSRequest DeleteVpcPeeringConnection where
type Sv DeleteVpcPeeringConnection = EC2
type Rs DeleteVpcPeeringConnection = DeleteVpcPeeringConnectionResponse
request = post "DeleteVpcPeeringConnection"
response = xmlResponse
instance FromXML DeleteVpcPeeringConnectionResponse where
parseXML x = DeleteVpcPeeringConnectionResponse
<$> x .@? "return"