{-# 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.DirectConnect.DeleteDirectConnectGatewayAssociation
(
deleteDirectConnectGatewayAssociation
, DeleteDirectConnectGatewayAssociation
, delDirectConnectGatewayId
, delVirtualGatewayId
, deleteDirectConnectGatewayAssociationResponse
, DeleteDirectConnectGatewayAssociationResponse
, delrsDirectConnectGatewayAssociation
, delrsResponseStatus
) where
import Network.AWS.DirectConnect.Types
import Network.AWS.DirectConnect.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteDirectConnectGatewayAssociation = DeleteDirectConnectGatewayAssociation'
{ _delDirectConnectGatewayId :: !Text
, _delVirtualGatewayId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteDirectConnectGatewayAssociation
:: Text
-> Text
-> DeleteDirectConnectGatewayAssociation
deleteDirectConnectGatewayAssociation pDirectConnectGatewayId_ pVirtualGatewayId_ =
DeleteDirectConnectGatewayAssociation'
{ _delDirectConnectGatewayId = pDirectConnectGatewayId_
, _delVirtualGatewayId = pVirtualGatewayId_
}
delDirectConnectGatewayId :: Lens' DeleteDirectConnectGatewayAssociation Text
delDirectConnectGatewayId = lens _delDirectConnectGatewayId (\ s a -> s{_delDirectConnectGatewayId = a})
delVirtualGatewayId :: Lens' DeleteDirectConnectGatewayAssociation Text
delVirtualGatewayId = lens _delVirtualGatewayId (\ s a -> s{_delVirtualGatewayId = a})
instance AWSRequest
DeleteDirectConnectGatewayAssociation
where
type Rs DeleteDirectConnectGatewayAssociation =
DeleteDirectConnectGatewayAssociationResponse
request = postJSON directConnect
response
= receiveJSON
(\ s h x ->
DeleteDirectConnectGatewayAssociationResponse' <$>
(x .?> "directConnectGatewayAssociation") <*>
(pure (fromEnum s)))
instance Hashable
DeleteDirectConnectGatewayAssociation
where
instance NFData DeleteDirectConnectGatewayAssociation
where
instance ToHeaders
DeleteDirectConnectGatewayAssociation
where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("OvertureService.DeleteDirectConnectGatewayAssociation"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteDirectConnectGatewayAssociation
where
toJSON DeleteDirectConnectGatewayAssociation'{..}
= object
(catMaybes
[Just
("directConnectGatewayId" .=
_delDirectConnectGatewayId),
Just ("virtualGatewayId" .= _delVirtualGatewayId)])
instance ToPath DeleteDirectConnectGatewayAssociation
where
toPath = const "/"
instance ToQuery
DeleteDirectConnectGatewayAssociation
where
toQuery = const mempty
data DeleteDirectConnectGatewayAssociationResponse = DeleteDirectConnectGatewayAssociationResponse'
{ _delrsDirectConnectGatewayAssociation :: !(Maybe DirectConnectGatewayAssociation)
, _delrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteDirectConnectGatewayAssociationResponse
:: Int
-> DeleteDirectConnectGatewayAssociationResponse
deleteDirectConnectGatewayAssociationResponse pResponseStatus_ =
DeleteDirectConnectGatewayAssociationResponse'
{ _delrsDirectConnectGatewayAssociation = Nothing
, _delrsResponseStatus = pResponseStatus_
}
delrsDirectConnectGatewayAssociation :: Lens' DeleteDirectConnectGatewayAssociationResponse (Maybe DirectConnectGatewayAssociation)
delrsDirectConnectGatewayAssociation = lens _delrsDirectConnectGatewayAssociation (\ s a -> s{_delrsDirectConnectGatewayAssociation = a})
delrsResponseStatus :: Lens' DeleteDirectConnectGatewayAssociationResponse Int
delrsResponseStatus = lens _delrsResponseStatus (\ s a -> s{_delrsResponseStatus = a})
instance NFData
DeleteDirectConnectGatewayAssociationResponse
where