{-# 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.DeleteVPCEndpointConnectionNotifications
(
deleteVPCEndpointConnectionNotifications
, DeleteVPCEndpointConnectionNotifications
, dvecnDryRun
, dvecnConnectionNotificationIds
, deleteVPCEndpointConnectionNotificationsResponse
, DeleteVPCEndpointConnectionNotificationsResponse
, dvecnrsUnsuccessful
, dvecnrsResponseStatus
) 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 DeleteVPCEndpointConnectionNotifications = DeleteVPCEndpointConnectionNotifications'
{ _dvecnDryRun :: !(Maybe Bool)
, _dvecnConnectionNotificationIds :: ![Text]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteVPCEndpointConnectionNotifications
:: DeleteVPCEndpointConnectionNotifications
deleteVPCEndpointConnectionNotifications =
DeleteVPCEndpointConnectionNotifications'
{_dvecnDryRun = Nothing, _dvecnConnectionNotificationIds = mempty}
dvecnDryRun :: Lens' DeleteVPCEndpointConnectionNotifications (Maybe Bool)
dvecnDryRun = lens _dvecnDryRun (\ s a -> s{_dvecnDryRun = a})
dvecnConnectionNotificationIds :: Lens' DeleteVPCEndpointConnectionNotifications [Text]
dvecnConnectionNotificationIds = lens _dvecnConnectionNotificationIds (\ s a -> s{_dvecnConnectionNotificationIds = a}) . _Coerce
instance AWSRequest
DeleteVPCEndpointConnectionNotifications
where
type Rs DeleteVPCEndpointConnectionNotifications =
DeleteVPCEndpointConnectionNotificationsResponse
request = postQuery ec2
response
= receiveXML
(\ s h x ->
DeleteVPCEndpointConnectionNotificationsResponse' <$>
(x .@? "unsuccessful" .!@ mempty >>=
may (parseXMLList "item"))
<*> (pure (fromEnum s)))
instance Hashable
DeleteVPCEndpointConnectionNotifications
where
instance NFData
DeleteVPCEndpointConnectionNotifications
where
instance ToHeaders
DeleteVPCEndpointConnectionNotifications
where
toHeaders = const mempty
instance ToPath
DeleteVPCEndpointConnectionNotifications
where
toPath = const "/"
instance ToQuery
DeleteVPCEndpointConnectionNotifications
where
toQuery DeleteVPCEndpointConnectionNotifications'{..}
= mconcat
["Action" =:
("DeleteVpcEndpointConnectionNotifications" ::
ByteString),
"Version" =: ("2016-11-15" :: ByteString),
"DryRun" =: _dvecnDryRun,
toQueryList "ConnectionNotificationId"
_dvecnConnectionNotificationIds]
data DeleteVPCEndpointConnectionNotificationsResponse = DeleteVPCEndpointConnectionNotificationsResponse'
{ _dvecnrsUnsuccessful :: !(Maybe [UnsuccessfulItem])
, _dvecnrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteVPCEndpointConnectionNotificationsResponse
:: Int
-> DeleteVPCEndpointConnectionNotificationsResponse
deleteVPCEndpointConnectionNotificationsResponse pResponseStatus_ =
DeleteVPCEndpointConnectionNotificationsResponse'
{_dvecnrsUnsuccessful = Nothing, _dvecnrsResponseStatus = pResponseStatus_}
dvecnrsUnsuccessful :: Lens' DeleteVPCEndpointConnectionNotificationsResponse [UnsuccessfulItem]
dvecnrsUnsuccessful = lens _dvecnrsUnsuccessful (\ s a -> s{_dvecnrsUnsuccessful = a}) . _Default . _Coerce
dvecnrsResponseStatus :: Lens' DeleteVPCEndpointConnectionNotificationsResponse Int
dvecnrsResponseStatus = lens _dvecnrsResponseStatus (\ s a -> s{_dvecnrsResponseStatus = a})
instance NFData
DeleteVPCEndpointConnectionNotificationsResponse
where