{-# 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.ModifyVPCEndpointConnectionNotification
(
modifyVPCEndpointConnectionNotification
, ModifyVPCEndpointConnectionNotification
, mvecnConnectionEvents
, mvecnConnectionNotificationARN
, mvecnDryRun
, mvecnConnectionNotificationId
, modifyVPCEndpointConnectionNotificationResponse
, ModifyVPCEndpointConnectionNotificationResponse
, mvecnrsReturnValue
, mvecnrsResponseStatus
) 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 ModifyVPCEndpointConnectionNotification = ModifyVPCEndpointConnectionNotification'
{ _mvecnConnectionEvents :: !(Maybe [Text])
, _mvecnConnectionNotificationARN :: !(Maybe Text)
, _mvecnDryRun :: !(Maybe Bool)
, _mvecnConnectionNotificationId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
modifyVPCEndpointConnectionNotification
:: Text
-> ModifyVPCEndpointConnectionNotification
modifyVPCEndpointConnectionNotification pConnectionNotificationId_ =
ModifyVPCEndpointConnectionNotification'
{ _mvecnConnectionEvents = Nothing
, _mvecnConnectionNotificationARN = Nothing
, _mvecnDryRun = Nothing
, _mvecnConnectionNotificationId = pConnectionNotificationId_
}
mvecnConnectionEvents :: Lens' ModifyVPCEndpointConnectionNotification [Text]
mvecnConnectionEvents = lens _mvecnConnectionEvents (\ s a -> s{_mvecnConnectionEvents = a}) . _Default . _Coerce
mvecnConnectionNotificationARN :: Lens' ModifyVPCEndpointConnectionNotification (Maybe Text)
mvecnConnectionNotificationARN = lens _mvecnConnectionNotificationARN (\ s a -> s{_mvecnConnectionNotificationARN = a})
mvecnDryRun :: Lens' ModifyVPCEndpointConnectionNotification (Maybe Bool)
mvecnDryRun = lens _mvecnDryRun (\ s a -> s{_mvecnDryRun = a})
mvecnConnectionNotificationId :: Lens' ModifyVPCEndpointConnectionNotification Text
mvecnConnectionNotificationId = lens _mvecnConnectionNotificationId (\ s a -> s{_mvecnConnectionNotificationId = a})
instance AWSRequest
ModifyVPCEndpointConnectionNotification
where
type Rs ModifyVPCEndpointConnectionNotification =
ModifyVPCEndpointConnectionNotificationResponse
request = postQuery ec2
response
= receiveXML
(\ s h x ->
ModifyVPCEndpointConnectionNotificationResponse' <$>
(x .@? "return") <*> (pure (fromEnum s)))
instance Hashable
ModifyVPCEndpointConnectionNotification
where
instance NFData
ModifyVPCEndpointConnectionNotification
where
instance ToHeaders
ModifyVPCEndpointConnectionNotification
where
toHeaders = const mempty
instance ToPath
ModifyVPCEndpointConnectionNotification
where
toPath = const "/"
instance ToQuery
ModifyVPCEndpointConnectionNotification
where
toQuery ModifyVPCEndpointConnectionNotification'{..}
= mconcat
["Action" =:
("ModifyVpcEndpointConnectionNotification" ::
ByteString),
"Version" =: ("2016-11-15" :: ByteString),
toQuery
(toQueryList "ConnectionEvents" <$>
_mvecnConnectionEvents),
"ConnectionNotificationArn" =:
_mvecnConnectionNotificationARN,
"DryRun" =: _mvecnDryRun,
"ConnectionNotificationId" =:
_mvecnConnectionNotificationId]
data ModifyVPCEndpointConnectionNotificationResponse = ModifyVPCEndpointConnectionNotificationResponse'
{ _mvecnrsReturnValue :: !(Maybe Bool)
, _mvecnrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
modifyVPCEndpointConnectionNotificationResponse
:: Int
-> ModifyVPCEndpointConnectionNotificationResponse
modifyVPCEndpointConnectionNotificationResponse pResponseStatus_ =
ModifyVPCEndpointConnectionNotificationResponse'
{_mvecnrsReturnValue = Nothing, _mvecnrsResponseStatus = pResponseStatus_}
mvecnrsReturnValue :: Lens' ModifyVPCEndpointConnectionNotificationResponse (Maybe Bool)
mvecnrsReturnValue = lens _mvecnrsReturnValue (\ s a -> s{_mvecnrsReturnValue = a})
mvecnrsResponseStatus :: Lens' ModifyVPCEndpointConnectionNotificationResponse Int
mvecnrsResponseStatus = lens _mvecnrsResponseStatus (\ s a -> s{_mvecnrsResponseStatus = a})
instance NFData
ModifyVPCEndpointConnectionNotificationResponse
where