{-# 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.DescribeVPCEndpointServiceConfigurations
(
describeVPCEndpointServiceConfigurations
, DescribeVPCEndpointServiceConfigurations
, dvescFilters
, dvescServiceIds
, dvescNextToken
, dvescDryRun
, dvescMaxResults
, describeVPCEndpointServiceConfigurationsResponse
, DescribeVPCEndpointServiceConfigurationsResponse
, dvescrsNextToken
, dvescrsServiceConfigurations
, dvescrsResponseStatus
) 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 DescribeVPCEndpointServiceConfigurations = DescribeVPCEndpointServiceConfigurations'
{ _dvescFilters :: !(Maybe [Filter])
, _dvescServiceIds :: !(Maybe [Text])
, _dvescNextToken :: !(Maybe Text)
, _dvescDryRun :: !(Maybe Bool)
, _dvescMaxResults :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeVPCEndpointServiceConfigurations
:: DescribeVPCEndpointServiceConfigurations
describeVPCEndpointServiceConfigurations =
DescribeVPCEndpointServiceConfigurations'
{ _dvescFilters = Nothing
, _dvescServiceIds = Nothing
, _dvescNextToken = Nothing
, _dvescDryRun = Nothing
, _dvescMaxResults = Nothing
}
dvescFilters :: Lens' DescribeVPCEndpointServiceConfigurations [Filter]
dvescFilters = lens _dvescFilters (\ s a -> s{_dvescFilters = a}) . _Default . _Coerce
dvescServiceIds :: Lens' DescribeVPCEndpointServiceConfigurations [Text]
dvescServiceIds = lens _dvescServiceIds (\ s a -> s{_dvescServiceIds = a}) . _Default . _Coerce
dvescNextToken :: Lens' DescribeVPCEndpointServiceConfigurations (Maybe Text)
dvescNextToken = lens _dvescNextToken (\ s a -> s{_dvescNextToken = a})
dvescDryRun :: Lens' DescribeVPCEndpointServiceConfigurations (Maybe Bool)
dvescDryRun = lens _dvescDryRun (\ s a -> s{_dvescDryRun = a})
dvescMaxResults :: Lens' DescribeVPCEndpointServiceConfigurations (Maybe Int)
dvescMaxResults = lens _dvescMaxResults (\ s a -> s{_dvescMaxResults = a})
instance AWSRequest
DescribeVPCEndpointServiceConfigurations
where
type Rs DescribeVPCEndpointServiceConfigurations =
DescribeVPCEndpointServiceConfigurationsResponse
request = postQuery ec2
response
= receiveXML
(\ s h x ->
DescribeVPCEndpointServiceConfigurationsResponse' <$>
(x .@? "nextToken") <*>
(x .@? "serviceConfigurationSet" .!@ mempty >>=
may (parseXMLList "item"))
<*> (pure (fromEnum s)))
instance Hashable
DescribeVPCEndpointServiceConfigurations
where
instance NFData
DescribeVPCEndpointServiceConfigurations
where
instance ToHeaders
DescribeVPCEndpointServiceConfigurations
where
toHeaders = const mempty
instance ToPath
DescribeVPCEndpointServiceConfigurations
where
toPath = const "/"
instance ToQuery
DescribeVPCEndpointServiceConfigurations
where
toQuery DescribeVPCEndpointServiceConfigurations'{..}
= mconcat
["Action" =:
("DescribeVpcEndpointServiceConfigurations" ::
ByteString),
"Version" =: ("2016-11-15" :: ByteString),
toQuery (toQueryList "Filter" <$> _dvescFilters),
toQuery
(toQueryList "ServiceId" <$> _dvescServiceIds),
"NextToken" =: _dvescNextToken,
"DryRun" =: _dvescDryRun,
"MaxResults" =: _dvescMaxResults]
data DescribeVPCEndpointServiceConfigurationsResponse = DescribeVPCEndpointServiceConfigurationsResponse'
{ _dvescrsNextToken :: !(Maybe Text)
, _dvescrsServiceConfigurations :: !(Maybe [ServiceConfiguration])
, _dvescrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeVPCEndpointServiceConfigurationsResponse
:: Int
-> DescribeVPCEndpointServiceConfigurationsResponse
describeVPCEndpointServiceConfigurationsResponse pResponseStatus_ =
DescribeVPCEndpointServiceConfigurationsResponse'
{ _dvescrsNextToken = Nothing
, _dvescrsServiceConfigurations = Nothing
, _dvescrsResponseStatus = pResponseStatus_
}
dvescrsNextToken :: Lens' DescribeVPCEndpointServiceConfigurationsResponse (Maybe Text)
dvescrsNextToken = lens _dvescrsNextToken (\ s a -> s{_dvescrsNextToken = a})
dvescrsServiceConfigurations :: Lens' DescribeVPCEndpointServiceConfigurationsResponse [ServiceConfiguration]
dvescrsServiceConfigurations = lens _dvescrsServiceConfigurations (\ s a -> s{_dvescrsServiceConfigurations = a}) . _Default . _Coerce
dvescrsResponseStatus :: Lens' DescribeVPCEndpointServiceConfigurationsResponse Int
dvescrsResponseStatus = lens _dvescrsResponseStatus (\ s a -> s{_dvescrsResponseStatus = a})
instance NFData
DescribeVPCEndpointServiceConfigurationsResponse
where