{-# 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.DeleteNetworkInterfacePermission
(
deleteNetworkInterfacePermission
, DeleteNetworkInterfacePermission
, dnipForce
, dnipDryRun
, dnipNetworkInterfacePermissionId
, deleteNetworkInterfacePermissionResponse
, DeleteNetworkInterfacePermissionResponse
, dniprsReturn
, dniprsResponseStatus
) 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 DeleteNetworkInterfacePermission = DeleteNetworkInterfacePermission'
{ _dnipForce :: !(Maybe Bool)
, _dnipDryRun :: !(Maybe Bool)
, _dnipNetworkInterfacePermissionId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteNetworkInterfacePermission
:: Text
-> DeleteNetworkInterfacePermission
deleteNetworkInterfacePermission pNetworkInterfacePermissionId_ =
DeleteNetworkInterfacePermission'
{ _dnipForce = Nothing
, _dnipDryRun = Nothing
, _dnipNetworkInterfacePermissionId = pNetworkInterfacePermissionId_
}
dnipForce :: Lens' DeleteNetworkInterfacePermission (Maybe Bool)
dnipForce = lens _dnipForce (\ s a -> s{_dnipForce = a})
dnipDryRun :: Lens' DeleteNetworkInterfacePermission (Maybe Bool)
dnipDryRun = lens _dnipDryRun (\ s a -> s{_dnipDryRun = a})
dnipNetworkInterfacePermissionId :: Lens' DeleteNetworkInterfacePermission Text
dnipNetworkInterfacePermissionId = lens _dnipNetworkInterfacePermissionId (\ s a -> s{_dnipNetworkInterfacePermissionId = a})
instance AWSRequest DeleteNetworkInterfacePermission
where
type Rs DeleteNetworkInterfacePermission =
DeleteNetworkInterfacePermissionResponse
request = postQuery ec2
response
= receiveXML
(\ s h x ->
DeleteNetworkInterfacePermissionResponse' <$>
(x .@? "return") <*> (pure (fromEnum s)))
instance Hashable DeleteNetworkInterfacePermission
where
instance NFData DeleteNetworkInterfacePermission
where
instance ToHeaders DeleteNetworkInterfacePermission
where
toHeaders = const mempty
instance ToPath DeleteNetworkInterfacePermission
where
toPath = const "/"
instance ToQuery DeleteNetworkInterfacePermission
where
toQuery DeleteNetworkInterfacePermission'{..}
= mconcat
["Action" =:
("DeleteNetworkInterfacePermission" :: ByteString),
"Version" =: ("2016-11-15" :: ByteString),
"Force" =: _dnipForce, "DryRun" =: _dnipDryRun,
"NetworkInterfacePermissionId" =:
_dnipNetworkInterfacePermissionId]
data DeleteNetworkInterfacePermissionResponse = DeleteNetworkInterfacePermissionResponse'
{ _dniprsReturn :: !(Maybe Bool)
, _dniprsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteNetworkInterfacePermissionResponse
:: Int
-> DeleteNetworkInterfacePermissionResponse
deleteNetworkInterfacePermissionResponse pResponseStatus_ =
DeleteNetworkInterfacePermissionResponse'
{_dniprsReturn = Nothing, _dniprsResponseStatus = pResponseStatus_}
dniprsReturn :: Lens' DeleteNetworkInterfacePermissionResponse (Maybe Bool)
dniprsReturn = lens _dniprsReturn (\ s a -> s{_dniprsReturn = a})
dniprsResponseStatus :: Lens' DeleteNetworkInterfacePermissionResponse Int
dniprsResponseStatus = lens _dniprsResponseStatus (\ s a -> s{_dniprsResponseStatus = a})
instance NFData
DeleteNetworkInterfacePermissionResponse
where