{-# 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.DeleteVPCPeeringAuthorization
(
deleteVPCPeeringAuthorization
, DeleteVPCPeeringAuthorization
, dvpaGameLiftAWSAccountId
, dvpaPeerVPCId
, deleteVPCPeeringAuthorizationResponse
, DeleteVPCPeeringAuthorizationResponse
, dvparsResponseStatus
) 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 DeleteVPCPeeringAuthorization = DeleteVPCPeeringAuthorization'
{ _dvpaGameLiftAWSAccountId :: !Text
, _dvpaPeerVPCId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteVPCPeeringAuthorization
:: Text
-> Text
-> DeleteVPCPeeringAuthorization
deleteVPCPeeringAuthorization pGameLiftAWSAccountId_ pPeerVPCId_ =
DeleteVPCPeeringAuthorization'
{ _dvpaGameLiftAWSAccountId = pGameLiftAWSAccountId_
, _dvpaPeerVPCId = pPeerVPCId_
}
dvpaGameLiftAWSAccountId :: Lens' DeleteVPCPeeringAuthorization Text
dvpaGameLiftAWSAccountId = lens _dvpaGameLiftAWSAccountId (\ s a -> s{_dvpaGameLiftAWSAccountId = a})
dvpaPeerVPCId :: Lens' DeleteVPCPeeringAuthorization Text
dvpaPeerVPCId = lens _dvpaPeerVPCId (\ s a -> s{_dvpaPeerVPCId = a})
instance AWSRequest DeleteVPCPeeringAuthorization
where
type Rs DeleteVPCPeeringAuthorization =
DeleteVPCPeeringAuthorizationResponse
request = postJSON gameLift
response
= receiveEmpty
(\ s h x ->
DeleteVPCPeeringAuthorizationResponse' <$>
(pure (fromEnum s)))
instance Hashable DeleteVPCPeeringAuthorization where
instance NFData DeleteVPCPeeringAuthorization where
instance ToHeaders DeleteVPCPeeringAuthorization
where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("GameLift.DeleteVpcPeeringAuthorization" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteVPCPeeringAuthorization where
toJSON DeleteVPCPeeringAuthorization'{..}
= object
(catMaybes
[Just
("GameLiftAwsAccountId" .=
_dvpaGameLiftAWSAccountId),
Just ("PeerVpcId" .= _dvpaPeerVPCId)])
instance ToPath DeleteVPCPeeringAuthorization where
toPath = const "/"
instance ToQuery DeleteVPCPeeringAuthorization where
toQuery = const mempty
newtype DeleteVPCPeeringAuthorizationResponse = DeleteVPCPeeringAuthorizationResponse'
{ _dvparsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteVPCPeeringAuthorizationResponse
:: Int
-> DeleteVPCPeeringAuthorizationResponse
deleteVPCPeeringAuthorizationResponse pResponseStatus_ =
DeleteVPCPeeringAuthorizationResponse'
{_dvparsResponseStatus = pResponseStatus_}
dvparsResponseStatus :: Lens' DeleteVPCPeeringAuthorizationResponse Int
dvparsResponseStatus = lens _dvparsResponseStatus (\ s a -> s{_dvparsResponseStatus = a})
instance NFData DeleteVPCPeeringAuthorizationResponse
where