{-# 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.DeleteVPCEndpointServiceConfigurations
(
deleteVPCEndpointServiceConfigurations
, DeleteVPCEndpointServiceConfigurations
, dvpcescDryRun
, dvpcescServiceIds
, deleteVPCEndpointServiceConfigurationsResponse
, DeleteVPCEndpointServiceConfigurationsResponse
, dvpcescrsUnsuccessful
, dvpcescrsResponseStatus
) 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 DeleteVPCEndpointServiceConfigurations = DeleteVPCEndpointServiceConfigurations'
{ _dvpcescDryRun :: !(Maybe Bool)
, _dvpcescServiceIds :: ![Text]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteVPCEndpointServiceConfigurations
:: DeleteVPCEndpointServiceConfigurations
deleteVPCEndpointServiceConfigurations =
DeleteVPCEndpointServiceConfigurations'
{_dvpcescDryRun = Nothing, _dvpcescServiceIds = mempty}
dvpcescDryRun :: Lens' DeleteVPCEndpointServiceConfigurations (Maybe Bool)
dvpcescDryRun = lens _dvpcescDryRun (\ s a -> s{_dvpcescDryRun = a})
dvpcescServiceIds :: Lens' DeleteVPCEndpointServiceConfigurations [Text]
dvpcescServiceIds = lens _dvpcescServiceIds (\ s a -> s{_dvpcescServiceIds = a}) . _Coerce
instance AWSRequest
DeleteVPCEndpointServiceConfigurations
where
type Rs DeleteVPCEndpointServiceConfigurations =
DeleteVPCEndpointServiceConfigurationsResponse
request = postQuery ec2
response
= receiveXML
(\ s h x ->
DeleteVPCEndpointServiceConfigurationsResponse' <$>
(x .@? "unsuccessful" .!@ mempty >>=
may (parseXMLList "item"))
<*> (pure (fromEnum s)))
instance Hashable
DeleteVPCEndpointServiceConfigurations
where
instance NFData
DeleteVPCEndpointServiceConfigurations
where
instance ToHeaders
DeleteVPCEndpointServiceConfigurations
where
toHeaders = const mempty
instance ToPath
DeleteVPCEndpointServiceConfigurations
where
toPath = const "/"
instance ToQuery
DeleteVPCEndpointServiceConfigurations
where
toQuery DeleteVPCEndpointServiceConfigurations'{..}
= mconcat
["Action" =:
("DeleteVpcEndpointServiceConfigurations" ::
ByteString),
"Version" =: ("2016-11-15" :: ByteString),
"DryRun" =: _dvpcescDryRun,
toQueryList "ServiceId" _dvpcescServiceIds]
data DeleteVPCEndpointServiceConfigurationsResponse = DeleteVPCEndpointServiceConfigurationsResponse'
{ _dvpcescrsUnsuccessful :: !(Maybe [UnsuccessfulItem])
, _dvpcescrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteVPCEndpointServiceConfigurationsResponse
:: Int
-> DeleteVPCEndpointServiceConfigurationsResponse
deleteVPCEndpointServiceConfigurationsResponse pResponseStatus_ =
DeleteVPCEndpointServiceConfigurationsResponse'
{ _dvpcescrsUnsuccessful = Nothing
, _dvpcescrsResponseStatus = pResponseStatus_
}
dvpcescrsUnsuccessful :: Lens' DeleteVPCEndpointServiceConfigurationsResponse [UnsuccessfulItem]
dvpcescrsUnsuccessful = lens _dvpcescrsUnsuccessful (\ s a -> s{_dvpcescrsUnsuccessful = a}) . _Default . _Coerce
dvpcescrsResponseStatus :: Lens' DeleteVPCEndpointServiceConfigurationsResponse Int
dvpcescrsResponseStatus = lens _dvpcescrsResponseStatus (\ s a -> s{_dvpcescrsResponseStatus = a})
instance NFData
DeleteVPCEndpointServiceConfigurationsResponse
where