{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.GameLift.DeleteVPCPeeringConnection
(
deleteVPCPeeringConnection
, DeleteVPCPeeringConnection
, dvpcFleetId
, dvpcVPCPeeringConnectionId
, deleteVPCPeeringConnectionResponse
, DeleteVPCPeeringConnectionResponse
, dvpcrsResponseStatus
) where
import Network.AWS.GameLift.Types
import Network.AWS.GameLift.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteVPCPeeringConnection = DeleteVPCPeeringConnection'
{ _dvpcFleetId :: !Text
, _dvpcVPCPeeringConnectionId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteVPCPeeringConnection
:: Text
-> Text
-> DeleteVPCPeeringConnection
deleteVPCPeeringConnection pFleetId_ pVPCPeeringConnectionId_ =
DeleteVPCPeeringConnection'
{ _dvpcFleetId = pFleetId_
, _dvpcVPCPeeringConnectionId = pVPCPeeringConnectionId_
}
dvpcFleetId :: Lens' DeleteVPCPeeringConnection Text
dvpcFleetId = lens _dvpcFleetId (\ s a -> s{_dvpcFleetId = a})
dvpcVPCPeeringConnectionId :: Lens' DeleteVPCPeeringConnection Text
dvpcVPCPeeringConnectionId = lens _dvpcVPCPeeringConnectionId (\ s a -> s{_dvpcVPCPeeringConnectionId = a})
instance AWSRequest DeleteVPCPeeringConnection where
type Rs DeleteVPCPeeringConnection =
DeleteVPCPeeringConnectionResponse
request = postJSON gameLift
response
= receiveEmpty
(\ s h x ->
DeleteVPCPeeringConnectionResponse' <$>
(pure (fromEnum s)))
instance Hashable DeleteVPCPeeringConnection where
instance NFData DeleteVPCPeeringConnection where
instance ToHeaders DeleteVPCPeeringConnection where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("GameLift.DeleteVpcPeeringConnection" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteVPCPeeringConnection where
toJSON DeleteVPCPeeringConnection'{..}
= object
(catMaybes
[Just ("FleetId" .= _dvpcFleetId),
Just
("VpcPeeringConnectionId" .=
_dvpcVPCPeeringConnectionId)])
instance ToPath DeleteVPCPeeringConnection where
toPath = const "/"
instance ToQuery DeleteVPCPeeringConnection where
toQuery = const mempty
newtype DeleteVPCPeeringConnectionResponse = DeleteVPCPeeringConnectionResponse'
{ _dvpcrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteVPCPeeringConnectionResponse
:: Int
-> DeleteVPCPeeringConnectionResponse
deleteVPCPeeringConnectionResponse pResponseStatus_ =
DeleteVPCPeeringConnectionResponse' {_dvpcrsResponseStatus = pResponseStatus_}
dvpcrsResponseStatus :: Lens' DeleteVPCPeeringConnectionResponse Int
dvpcrsResponseStatus = lens _dvpcrsResponseStatus (\ s a -> s{_dvpcrsResponseStatus = a})
instance NFData DeleteVPCPeeringConnectionResponse
where