{-# 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.EC2.ModifyVPCPeeringConnectionOptions
(
modifyVPCPeeringConnectionOptions
, ModifyVPCPeeringConnectionOptions
, mvpcoRequesterPeeringConnectionOptions
, mvpcoAccepterPeeringConnectionOptions
, mvpcoDryRun
, mvpcoVPCPeeringConnectionId
, modifyVPCPeeringConnectionOptionsResponse
, ModifyVPCPeeringConnectionOptionsResponse
, mvpcorsRequesterPeeringConnectionOptions
, mvpcorsAccepterPeeringConnectionOptions
, mvpcorsResponseStatus
) where
import Network.AWS.EC2.Types
import Network.AWS.EC2.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data ModifyVPCPeeringConnectionOptions = ModifyVPCPeeringConnectionOptions'
{ _mvpcoRequesterPeeringConnectionOptions :: !(Maybe PeeringConnectionOptionsRequest)
, _mvpcoAccepterPeeringConnectionOptions :: !(Maybe PeeringConnectionOptionsRequest)
, _mvpcoDryRun :: !(Maybe Bool)
, _mvpcoVPCPeeringConnectionId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
modifyVPCPeeringConnectionOptions
:: Text
-> ModifyVPCPeeringConnectionOptions
modifyVPCPeeringConnectionOptions pVPCPeeringConnectionId_ =
ModifyVPCPeeringConnectionOptions'
{ _mvpcoRequesterPeeringConnectionOptions = Nothing
, _mvpcoAccepterPeeringConnectionOptions = Nothing
, _mvpcoDryRun = Nothing
, _mvpcoVPCPeeringConnectionId = pVPCPeeringConnectionId_
}
mvpcoRequesterPeeringConnectionOptions :: Lens' ModifyVPCPeeringConnectionOptions (Maybe PeeringConnectionOptionsRequest)
mvpcoRequesterPeeringConnectionOptions = lens _mvpcoRequesterPeeringConnectionOptions (\ s a -> s{_mvpcoRequesterPeeringConnectionOptions = a});
mvpcoAccepterPeeringConnectionOptions :: Lens' ModifyVPCPeeringConnectionOptions (Maybe PeeringConnectionOptionsRequest)
mvpcoAccepterPeeringConnectionOptions = lens _mvpcoAccepterPeeringConnectionOptions (\ s a -> s{_mvpcoAccepterPeeringConnectionOptions = a});
mvpcoDryRun :: Lens' ModifyVPCPeeringConnectionOptions (Maybe Bool)
mvpcoDryRun = lens _mvpcoDryRun (\ s a -> s{_mvpcoDryRun = a});
mvpcoVPCPeeringConnectionId :: Lens' ModifyVPCPeeringConnectionOptions Text
mvpcoVPCPeeringConnectionId = lens _mvpcoVPCPeeringConnectionId (\ s a -> s{_mvpcoVPCPeeringConnectionId = a});
instance AWSRequest ModifyVPCPeeringConnectionOptions
where
type Rs ModifyVPCPeeringConnectionOptions =
ModifyVPCPeeringConnectionOptionsResponse
request = postQuery ec2
response
= receiveXML
(\ s h x ->
ModifyVPCPeeringConnectionOptionsResponse' <$>
(x .@? "requesterPeeringConnectionOptions") <*>
(x .@? "accepterPeeringConnectionOptions")
<*> (pure (fromEnum s)))
instance Hashable ModifyVPCPeeringConnectionOptions
instance NFData ModifyVPCPeeringConnectionOptions
instance ToHeaders ModifyVPCPeeringConnectionOptions
where
toHeaders = const mempty
instance ToPath ModifyVPCPeeringConnectionOptions
where
toPath = const "/"
instance ToQuery ModifyVPCPeeringConnectionOptions
where
toQuery ModifyVPCPeeringConnectionOptions'{..}
= mconcat
["Action" =:
("ModifyVpcPeeringConnectionOptions" :: ByteString),
"Version" =: ("2016-04-01" :: ByteString),
"RequesterPeeringConnectionOptions" =:
_mvpcoRequesterPeeringConnectionOptions,
"AccepterPeeringConnectionOptions" =:
_mvpcoAccepterPeeringConnectionOptions,
"DryRun" =: _mvpcoDryRun,
"VpcPeeringConnectionId" =:
_mvpcoVPCPeeringConnectionId]
data ModifyVPCPeeringConnectionOptionsResponse = ModifyVPCPeeringConnectionOptionsResponse'
{ _mvpcorsRequesterPeeringConnectionOptions :: !(Maybe PeeringConnectionOptions)
, _mvpcorsAccepterPeeringConnectionOptions :: !(Maybe PeeringConnectionOptions)
, _mvpcorsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
modifyVPCPeeringConnectionOptionsResponse
:: Int
-> ModifyVPCPeeringConnectionOptionsResponse
modifyVPCPeeringConnectionOptionsResponse pResponseStatus_ =
ModifyVPCPeeringConnectionOptionsResponse'
{ _mvpcorsRequesterPeeringConnectionOptions = Nothing
, _mvpcorsAccepterPeeringConnectionOptions = Nothing
, _mvpcorsResponseStatus = pResponseStatus_
}
mvpcorsRequesterPeeringConnectionOptions :: Lens' ModifyVPCPeeringConnectionOptionsResponse (Maybe PeeringConnectionOptions)
mvpcorsRequesterPeeringConnectionOptions = lens _mvpcorsRequesterPeeringConnectionOptions (\ s a -> s{_mvpcorsRequesterPeeringConnectionOptions = a});
mvpcorsAccepterPeeringConnectionOptions :: Lens' ModifyVPCPeeringConnectionOptionsResponse (Maybe PeeringConnectionOptions)
mvpcorsAccepterPeeringConnectionOptions = lens _mvpcorsAccepterPeeringConnectionOptions (\ s a -> s{_mvpcorsAccepterPeeringConnectionOptions = a});
mvpcorsResponseStatus :: Lens' ModifyVPCPeeringConnectionOptionsResponse Int
mvpcorsResponseStatus = lens _mvpcorsResponseStatus (\ s a -> s{_mvpcorsResponseStatus = a});
instance NFData
ModifyVPCPeeringConnectionOptionsResponse