module Network.AWS.DirectConnect.AllocateConnectionOnInterconnect
(
allocateConnectionOnInterconnect
, AllocateConnectionOnInterconnect
, acoiBandwidth
, acoiConnectionName
, acoiOwnerAccount
, acoiInterconnectId
, acoiVlan
, connection
, Connection
, cVlan
, cLocation
, cConnectionId
, cPartnerName
, cConnectionName
, cBandwidth
, cOwnerAccount
, cRegion
, cConnectionState
) where
import Network.AWS.DirectConnect.Types
import Network.AWS.DirectConnect.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data AllocateConnectionOnInterconnect = AllocateConnectionOnInterconnect'
{ _acoiBandwidth :: !Text
, _acoiConnectionName :: !Text
, _acoiOwnerAccount :: !Text
, _acoiInterconnectId :: !Text
, _acoiVlan :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
allocateConnectionOnInterconnect
:: Text
-> Text
-> Text
-> Text
-> Int
-> AllocateConnectionOnInterconnect
allocateConnectionOnInterconnect pBandwidth_ pConnectionName_ pOwnerAccount_ pInterconnectId_ pVlan_ =
AllocateConnectionOnInterconnect'
{ _acoiBandwidth = pBandwidth_
, _acoiConnectionName = pConnectionName_
, _acoiOwnerAccount = pOwnerAccount_
, _acoiInterconnectId = pInterconnectId_
, _acoiVlan = pVlan_
}
acoiBandwidth :: Lens' AllocateConnectionOnInterconnect Text
acoiBandwidth = lens _acoiBandwidth (\ s a -> s{_acoiBandwidth = a});
acoiConnectionName :: Lens' AllocateConnectionOnInterconnect Text
acoiConnectionName = lens _acoiConnectionName (\ s a -> s{_acoiConnectionName = a});
acoiOwnerAccount :: Lens' AllocateConnectionOnInterconnect Text
acoiOwnerAccount = lens _acoiOwnerAccount (\ s a -> s{_acoiOwnerAccount = a});
acoiInterconnectId :: Lens' AllocateConnectionOnInterconnect Text
acoiInterconnectId = lens _acoiInterconnectId (\ s a -> s{_acoiInterconnectId = a});
acoiVlan :: Lens' AllocateConnectionOnInterconnect Int
acoiVlan = lens _acoiVlan (\ s a -> s{_acoiVlan = a});
instance AWSRequest AllocateConnectionOnInterconnect
where
type Rs AllocateConnectionOnInterconnect = Connection
request = postJSON directConnect
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance ToHeaders AllocateConnectionOnInterconnect
where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("OvertureService.AllocateConnectionOnInterconnect"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON AllocateConnectionOnInterconnect
where
toJSON AllocateConnectionOnInterconnect'{..}
= object
(catMaybes
[Just ("bandwidth" .= _acoiBandwidth),
Just ("connectionName" .= _acoiConnectionName),
Just ("ownerAccount" .= _acoiOwnerAccount),
Just ("interconnectId" .= _acoiInterconnectId),
Just ("vlan" .= _acoiVlan)])
instance ToPath AllocateConnectionOnInterconnect
where
toPath = const "/"
instance ToQuery AllocateConnectionOnInterconnect
where
toQuery = const mempty