{-# 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.DescribeVPCEndpointConnectionNotifications
(
describeVPCEndpointConnectionNotifications
, DescribeVPCEndpointConnectionNotifications
, dvpcecnFilters
, dvpcecnNextToken
, dvpcecnConnectionNotificationId
, dvpcecnDryRun
, dvpcecnMaxResults
, describeVPCEndpointConnectionNotificationsResponse
, DescribeVPCEndpointConnectionNotificationsResponse
, dvpcecnrsConnectionNotificationSet
, dvpcecnrsNextToken
, dvpcecnrsResponseStatus
) 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 DescribeVPCEndpointConnectionNotifications = DescribeVPCEndpointConnectionNotifications'
{ _dvpcecnFilters :: !(Maybe [Filter])
, _dvpcecnNextToken :: !(Maybe Text)
, _dvpcecnConnectionNotificationId :: !(Maybe Text)
, _dvpcecnDryRun :: !(Maybe Bool)
, _dvpcecnMaxResults :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeVPCEndpointConnectionNotifications
:: DescribeVPCEndpointConnectionNotifications
describeVPCEndpointConnectionNotifications =
DescribeVPCEndpointConnectionNotifications'
{ _dvpcecnFilters = Nothing
, _dvpcecnNextToken = Nothing
, _dvpcecnConnectionNotificationId = Nothing
, _dvpcecnDryRun = Nothing
, _dvpcecnMaxResults = Nothing
}
dvpcecnFilters :: Lens' DescribeVPCEndpointConnectionNotifications [Filter]
dvpcecnFilters = lens _dvpcecnFilters (\ s a -> s{_dvpcecnFilters = a}) . _Default . _Coerce
dvpcecnNextToken :: Lens' DescribeVPCEndpointConnectionNotifications (Maybe Text)
dvpcecnNextToken = lens _dvpcecnNextToken (\ s a -> s{_dvpcecnNextToken = a})
dvpcecnConnectionNotificationId :: Lens' DescribeVPCEndpointConnectionNotifications (Maybe Text)
dvpcecnConnectionNotificationId = lens _dvpcecnConnectionNotificationId (\ s a -> s{_dvpcecnConnectionNotificationId = a})
dvpcecnDryRun :: Lens' DescribeVPCEndpointConnectionNotifications (Maybe Bool)
dvpcecnDryRun = lens _dvpcecnDryRun (\ s a -> s{_dvpcecnDryRun = a})
dvpcecnMaxResults :: Lens' DescribeVPCEndpointConnectionNotifications (Maybe Int)
dvpcecnMaxResults = lens _dvpcecnMaxResults (\ s a -> s{_dvpcecnMaxResults = a})
instance AWSRequest
DescribeVPCEndpointConnectionNotifications
where
type Rs DescribeVPCEndpointConnectionNotifications =
DescribeVPCEndpointConnectionNotificationsResponse
request = postQuery ec2
response
= receiveXML
(\ s h x ->
DescribeVPCEndpointConnectionNotificationsResponse'
<$>
(x .@? "connectionNotificationSet" .!@ mempty >>=
may (parseXMLList "item"))
<*> (x .@? "nextToken")
<*> (pure (fromEnum s)))
instance Hashable
DescribeVPCEndpointConnectionNotifications
where
instance NFData
DescribeVPCEndpointConnectionNotifications
where
instance ToHeaders
DescribeVPCEndpointConnectionNotifications
where
toHeaders = const mempty
instance ToPath
DescribeVPCEndpointConnectionNotifications
where
toPath = const "/"
instance ToQuery
DescribeVPCEndpointConnectionNotifications
where
toQuery
DescribeVPCEndpointConnectionNotifications'{..}
= mconcat
["Action" =:
("DescribeVpcEndpointConnectionNotifications" ::
ByteString),
"Version" =: ("2016-11-15" :: ByteString),
toQuery (toQueryList "Filter" <$> _dvpcecnFilters),
"NextToken" =: _dvpcecnNextToken,
"ConnectionNotificationId" =:
_dvpcecnConnectionNotificationId,
"DryRun" =: _dvpcecnDryRun,
"MaxResults" =: _dvpcecnMaxResults]
data DescribeVPCEndpointConnectionNotificationsResponse = DescribeVPCEndpointConnectionNotificationsResponse'
{ _dvpcecnrsConnectionNotificationSet :: !(Maybe [ConnectionNotification])
, _dvpcecnrsNextToken :: !(Maybe Text)
, _dvpcecnrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeVPCEndpointConnectionNotificationsResponse
:: Int
-> DescribeVPCEndpointConnectionNotificationsResponse
describeVPCEndpointConnectionNotificationsResponse pResponseStatus_ =
DescribeVPCEndpointConnectionNotificationsResponse'
{ _dvpcecnrsConnectionNotificationSet = Nothing
, _dvpcecnrsNextToken = Nothing
, _dvpcecnrsResponseStatus = pResponseStatus_
}
dvpcecnrsConnectionNotificationSet :: Lens' DescribeVPCEndpointConnectionNotificationsResponse [ConnectionNotification]
dvpcecnrsConnectionNotificationSet = lens _dvpcecnrsConnectionNotificationSet (\ s a -> s{_dvpcecnrsConnectionNotificationSet = a}) . _Default . _Coerce
dvpcecnrsNextToken :: Lens' DescribeVPCEndpointConnectionNotificationsResponse (Maybe Text)
dvpcecnrsNextToken = lens _dvpcecnrsNextToken (\ s a -> s{_dvpcecnrsNextToken = a})
dvpcecnrsResponseStatus :: Lens' DescribeVPCEndpointConnectionNotificationsResponse Int
dvpcecnrsResponseStatus = lens _dvpcecnrsResponseStatus (\ s a -> s{_dvpcecnrsResponseStatus = a})
instance NFData
DescribeVPCEndpointConnectionNotificationsResponse
where