module Network.AWS.EC2.DeleteVPCPeeringConnection
(
deleteVPCPeeringConnection
, DeleteVPCPeeringConnection
, dvpcDryRun
, dvpcVPCPeeringConnectionId
, deleteVPCPeeringConnectionResponse
, DeleteVPCPeeringConnectionResponse
, dvpcrsReturn
, dvpcrsResponseStatus
) where
import Network.AWS.EC2.Types
import Network.AWS.EC2.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteVPCPeeringConnection = DeleteVPCPeeringConnection'
{ _dvpcDryRun :: !(Maybe Bool)
, _dvpcVPCPeeringConnectionId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteVPCPeeringConnection
:: Text
-> DeleteVPCPeeringConnection
deleteVPCPeeringConnection pVPCPeeringConnectionId_ =
DeleteVPCPeeringConnection'
{ _dvpcDryRun = Nothing
, _dvpcVPCPeeringConnectionId = pVPCPeeringConnectionId_
}
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});
instance AWSRequest DeleteVPCPeeringConnection where
type Rs DeleteVPCPeeringConnection =
DeleteVPCPeeringConnectionResponse
request = postQuery eC2
response
= receiveXML
(\ s h x ->
DeleteVPCPeeringConnectionResponse' <$>
(x .@? "return") <*> (pure (fromEnum s)))
instance ToHeaders DeleteVPCPeeringConnection where
toHeaders = const mempty
instance ToPath DeleteVPCPeeringConnection where
toPath = const "/"
instance ToQuery DeleteVPCPeeringConnection where
toQuery DeleteVPCPeeringConnection'{..}
= mconcat
["Action" =:
("DeleteVpcPeeringConnection" :: ByteString),
"Version" =: ("2015-10-01" :: ByteString),
"DryRun" =: _dvpcDryRun,
"VpcPeeringConnectionId" =:
_dvpcVPCPeeringConnectionId]
data DeleteVPCPeeringConnectionResponse = DeleteVPCPeeringConnectionResponse'
{ _dvpcrsReturn :: !(Maybe Bool)
, _dvpcrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteVPCPeeringConnectionResponse
:: Int
-> DeleteVPCPeeringConnectionResponse
deleteVPCPeeringConnectionResponse pResponseStatus_ =
DeleteVPCPeeringConnectionResponse'
{ _dvpcrsReturn = Nothing
, _dvpcrsResponseStatus = pResponseStatus_
}
dvpcrsReturn :: Lens' DeleteVPCPeeringConnectionResponse (Maybe Bool)
dvpcrsReturn = lens _dvpcrsReturn (\ s a -> s{_dvpcrsReturn = a});
dvpcrsResponseStatus :: Lens' DeleteVPCPeeringConnectionResponse Int
dvpcrsResponseStatus = lens _dvpcrsResponseStatus (\ s a -> s{_dvpcrsResponseStatus = a});