{-# 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.CreateVPCEndpointServiceConfiguration
(
createVPCEndpointServiceConfiguration
, CreateVPCEndpointServiceConfiguration
, cvescClientToken
, cvescAcceptanceRequired
, cvescDryRun
, cvescNetworkLoadBalancerARNs
, createVPCEndpointServiceConfigurationResponse
, CreateVPCEndpointServiceConfigurationResponse
, cvescrsClientToken
, cvescrsServiceConfiguration
, cvescrsResponseStatus
) 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 CreateVPCEndpointServiceConfiguration = CreateVPCEndpointServiceConfiguration'
{ _cvescClientToken :: !(Maybe Text)
, _cvescAcceptanceRequired :: !(Maybe Bool)
, _cvescDryRun :: !(Maybe Bool)
, _cvescNetworkLoadBalancerARNs :: ![Text]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
createVPCEndpointServiceConfiguration
:: CreateVPCEndpointServiceConfiguration
createVPCEndpointServiceConfiguration =
CreateVPCEndpointServiceConfiguration'
{ _cvescClientToken = Nothing
, _cvescAcceptanceRequired = Nothing
, _cvescDryRun = Nothing
, _cvescNetworkLoadBalancerARNs = mempty
}
cvescClientToken :: Lens' CreateVPCEndpointServiceConfiguration (Maybe Text)
cvescClientToken = lens _cvescClientToken (\ s a -> s{_cvescClientToken = a})
cvescAcceptanceRequired :: Lens' CreateVPCEndpointServiceConfiguration (Maybe Bool)
cvescAcceptanceRequired = lens _cvescAcceptanceRequired (\ s a -> s{_cvescAcceptanceRequired = a})
cvescDryRun :: Lens' CreateVPCEndpointServiceConfiguration (Maybe Bool)
cvescDryRun = lens _cvescDryRun (\ s a -> s{_cvescDryRun = a})
cvescNetworkLoadBalancerARNs :: Lens' CreateVPCEndpointServiceConfiguration [Text]
cvescNetworkLoadBalancerARNs = lens _cvescNetworkLoadBalancerARNs (\ s a -> s{_cvescNetworkLoadBalancerARNs = a}) . _Coerce
instance AWSRequest
CreateVPCEndpointServiceConfiguration
where
type Rs CreateVPCEndpointServiceConfiguration =
CreateVPCEndpointServiceConfigurationResponse
request = postQuery ec2
response
= receiveXML
(\ s h x ->
CreateVPCEndpointServiceConfigurationResponse' <$>
(x .@? "clientToken") <*>
(x .@? "serviceConfiguration")
<*> (pure (fromEnum s)))
instance Hashable
CreateVPCEndpointServiceConfiguration
where
instance NFData CreateVPCEndpointServiceConfiguration
where
instance ToHeaders
CreateVPCEndpointServiceConfiguration
where
toHeaders = const mempty
instance ToPath CreateVPCEndpointServiceConfiguration
where
toPath = const "/"
instance ToQuery
CreateVPCEndpointServiceConfiguration
where
toQuery CreateVPCEndpointServiceConfiguration'{..}
= mconcat
["Action" =:
("CreateVpcEndpointServiceConfiguration" ::
ByteString),
"Version" =: ("2016-11-15" :: ByteString),
"ClientToken" =: _cvescClientToken,
"AcceptanceRequired" =: _cvescAcceptanceRequired,
"DryRun" =: _cvescDryRun,
toQueryList "NetworkLoadBalancerArn"
_cvescNetworkLoadBalancerARNs]
data CreateVPCEndpointServiceConfigurationResponse = CreateVPCEndpointServiceConfigurationResponse'
{ _cvescrsClientToken :: !(Maybe Text)
, _cvescrsServiceConfiguration :: !(Maybe ServiceConfiguration)
, _cvescrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
createVPCEndpointServiceConfigurationResponse
:: Int
-> CreateVPCEndpointServiceConfigurationResponse
createVPCEndpointServiceConfigurationResponse pResponseStatus_ =
CreateVPCEndpointServiceConfigurationResponse'
{ _cvescrsClientToken = Nothing
, _cvescrsServiceConfiguration = Nothing
, _cvescrsResponseStatus = pResponseStatus_
}
cvescrsClientToken :: Lens' CreateVPCEndpointServiceConfigurationResponse (Maybe Text)
cvescrsClientToken = lens _cvescrsClientToken (\ s a -> s{_cvescrsClientToken = a})
cvescrsServiceConfiguration :: Lens' CreateVPCEndpointServiceConfigurationResponse (Maybe ServiceConfiguration)
cvescrsServiceConfiguration = lens _cvescrsServiceConfiguration (\ s a -> s{_cvescrsServiceConfiguration = a})
cvescrsResponseStatus :: Lens' CreateVPCEndpointServiceConfigurationResponse Int
cvescrsResponseStatus = lens _cvescrsResponseStatus (\ s a -> s{_cvescrsResponseStatus = a})
instance NFData
CreateVPCEndpointServiceConfigurationResponse
where