{-# 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.DisassociateConnectionFromLag
(
disassociateConnectionFromLag
, DisassociateConnectionFromLag
, dcflConnectionId
, dcflLagId
, connection
, Connection
, cLagId
, cVlan
, cLocation
, cAwsDevice
, cConnectionId
, cLoaIssueTime
, cPartnerName
, cConnectionName
, cBandwidth
, cOwnerAccount
, cRegion
, cConnectionState
) 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 DisassociateConnectionFromLag = DisassociateConnectionFromLag'
{ _dcflConnectionId :: !Text
, _dcflLagId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
disassociateConnectionFromLag
:: Text
-> Text
-> DisassociateConnectionFromLag
disassociateConnectionFromLag pConnectionId_ pLagId_ =
DisassociateConnectionFromLag'
{_dcflConnectionId = pConnectionId_, _dcflLagId = pLagId_}
dcflConnectionId :: Lens' DisassociateConnectionFromLag Text
dcflConnectionId = lens _dcflConnectionId (\ s a -> s{_dcflConnectionId = a})
dcflLagId :: Lens' DisassociateConnectionFromLag Text
dcflLagId = lens _dcflLagId (\ s a -> s{_dcflLagId = a})
instance AWSRequest DisassociateConnectionFromLag
where
type Rs DisassociateConnectionFromLag = Connection
request = postJSON directConnect
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable DisassociateConnectionFromLag where
instance NFData DisassociateConnectionFromLag where
instance ToHeaders DisassociateConnectionFromLag
where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("OvertureService.DisassociateConnectionFromLag" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DisassociateConnectionFromLag where
toJSON DisassociateConnectionFromLag'{..}
= object
(catMaybes
[Just ("connectionId" .= _dcflConnectionId),
Just ("lagId" .= _dcflLagId)])
instance ToPath DisassociateConnectionFromLag where
toPath = const "/"
instance ToQuery DisassociateConnectionFromLag where
toQuery = const mempty