{-# 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.AssociateConnectionWithLag
(
associateConnectionWithLag
, AssociateConnectionWithLag
, acwlConnectionId
, acwlLagId
, 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 AssociateConnectionWithLag = AssociateConnectionWithLag'
{ _acwlConnectionId :: !Text
, _acwlLagId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
associateConnectionWithLag
:: Text
-> Text
-> AssociateConnectionWithLag
associateConnectionWithLag pConnectionId_ pLagId_ =
AssociateConnectionWithLag'
{_acwlConnectionId = pConnectionId_, _acwlLagId = pLagId_}
acwlConnectionId :: Lens' AssociateConnectionWithLag Text
acwlConnectionId = lens _acwlConnectionId (\ s a -> s{_acwlConnectionId = a})
acwlLagId :: Lens' AssociateConnectionWithLag Text
acwlLagId = lens _acwlLagId (\ s a -> s{_acwlLagId = a})
instance AWSRequest AssociateConnectionWithLag where
type Rs AssociateConnectionWithLag = Connection
request = postJSON directConnect
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable AssociateConnectionWithLag where
instance NFData AssociateConnectionWithLag where
instance ToHeaders AssociateConnectionWithLag where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("OvertureService.AssociateConnectionWithLag" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON AssociateConnectionWithLag where
toJSON AssociateConnectionWithLag'{..}
= object
(catMaybes
[Just ("connectionId" .= _acwlConnectionId),
Just ("lagId" .= _acwlLagId)])
instance ToPath AssociateConnectionWithLag where
toPath = const "/"
instance ToQuery AssociateConnectionWithLag where
toQuery = const mempty