{-# 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.ModifyVPCEndpointServiceConfiguration
(
modifyVPCEndpointServiceConfiguration
, ModifyVPCEndpointServiceConfiguration
, mvescRemoveNetworkLoadBalancerARNs
, mvescAcceptanceRequired
, mvescAddNetworkLoadBalancerARNs
, mvescDryRun
, mvescServiceId
, modifyVPCEndpointServiceConfigurationResponse
, ModifyVPCEndpointServiceConfigurationResponse
, mvescrsReturn
, mvescrsResponseStatus
) 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 ModifyVPCEndpointServiceConfiguration = ModifyVPCEndpointServiceConfiguration'
{ _mvescRemoveNetworkLoadBalancerARNs :: !(Maybe [Text])
, _mvescAcceptanceRequired :: !(Maybe Bool)
, _mvescAddNetworkLoadBalancerARNs :: !(Maybe [Text])
, _mvescDryRun :: !(Maybe Bool)
, _mvescServiceId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
modifyVPCEndpointServiceConfiguration
:: Text
-> ModifyVPCEndpointServiceConfiguration
modifyVPCEndpointServiceConfiguration pServiceId_ =
ModifyVPCEndpointServiceConfiguration'
{ _mvescRemoveNetworkLoadBalancerARNs = Nothing
, _mvescAcceptanceRequired = Nothing
, _mvescAddNetworkLoadBalancerARNs = Nothing
, _mvescDryRun = Nothing
, _mvescServiceId = pServiceId_
}
mvescRemoveNetworkLoadBalancerARNs :: Lens' ModifyVPCEndpointServiceConfiguration [Text]
mvescRemoveNetworkLoadBalancerARNs = lens _mvescRemoveNetworkLoadBalancerARNs (\ s a -> s{_mvescRemoveNetworkLoadBalancerARNs = a}) . _Default . _Coerce
mvescAcceptanceRequired :: Lens' ModifyVPCEndpointServiceConfiguration (Maybe Bool)
mvescAcceptanceRequired = lens _mvescAcceptanceRequired (\ s a -> s{_mvescAcceptanceRequired = a})
mvescAddNetworkLoadBalancerARNs :: Lens' ModifyVPCEndpointServiceConfiguration [Text]
mvescAddNetworkLoadBalancerARNs = lens _mvescAddNetworkLoadBalancerARNs (\ s a -> s{_mvescAddNetworkLoadBalancerARNs = a}) . _Default . _Coerce
mvescDryRun :: Lens' ModifyVPCEndpointServiceConfiguration (Maybe Bool)
mvescDryRun = lens _mvescDryRun (\ s a -> s{_mvescDryRun = a})
mvescServiceId :: Lens' ModifyVPCEndpointServiceConfiguration Text
mvescServiceId = lens _mvescServiceId (\ s a -> s{_mvescServiceId = a})
instance AWSRequest
ModifyVPCEndpointServiceConfiguration
where
type Rs ModifyVPCEndpointServiceConfiguration =
ModifyVPCEndpointServiceConfigurationResponse
request = postQuery ec2
response
= receiveXML
(\ s h x ->
ModifyVPCEndpointServiceConfigurationResponse' <$>
(x .@? "return") <*> (pure (fromEnum s)))
instance Hashable
ModifyVPCEndpointServiceConfiguration
where
instance NFData ModifyVPCEndpointServiceConfiguration
where
instance ToHeaders
ModifyVPCEndpointServiceConfiguration
where
toHeaders = const mempty
instance ToPath ModifyVPCEndpointServiceConfiguration
where
toPath = const "/"
instance ToQuery
ModifyVPCEndpointServiceConfiguration
where
toQuery ModifyVPCEndpointServiceConfiguration'{..}
= mconcat
["Action" =:
("ModifyVpcEndpointServiceConfiguration" ::
ByteString),
"Version" =: ("2016-11-15" :: ByteString),
toQuery
(toQueryList "RemoveNetworkLoadBalancerArn" <$>
_mvescRemoveNetworkLoadBalancerARNs),
"AcceptanceRequired" =: _mvescAcceptanceRequired,
toQuery
(toQueryList "AddNetworkLoadBalancerArn" <$>
_mvescAddNetworkLoadBalancerARNs),
"DryRun" =: _mvescDryRun,
"ServiceId" =: _mvescServiceId]
data ModifyVPCEndpointServiceConfigurationResponse = ModifyVPCEndpointServiceConfigurationResponse'
{ _mvescrsReturn :: !(Maybe Bool)
, _mvescrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
modifyVPCEndpointServiceConfigurationResponse
:: Int
-> ModifyVPCEndpointServiceConfigurationResponse
modifyVPCEndpointServiceConfigurationResponse pResponseStatus_ =
ModifyVPCEndpointServiceConfigurationResponse'
{_mvescrsReturn = Nothing, _mvescrsResponseStatus = pResponseStatus_}
mvescrsReturn :: Lens' ModifyVPCEndpointServiceConfigurationResponse (Maybe Bool)
mvescrsReturn = lens _mvescrsReturn (\ s a -> s{_mvescrsReturn = a})
mvescrsResponseStatus :: Lens' ModifyVPCEndpointServiceConfigurationResponse Int
mvescrsResponseStatus = lens _mvescrsResponseStatus (\ s a -> s{_mvescrsResponseStatus = a})
instance NFData
ModifyVPCEndpointServiceConfigurationResponse
where