{-# 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.IAM.DeleteUserPolicy
(
deleteUserPolicy
, DeleteUserPolicy
, dupUserName
, dupPolicyName
, deleteUserPolicyResponse
, DeleteUserPolicyResponse
) where
import Network.AWS.IAM.Types
import Network.AWS.IAM.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteUserPolicy = DeleteUserPolicy'
{ _dupUserName :: !Text
, _dupPolicyName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteUserPolicy
:: Text
-> Text
-> DeleteUserPolicy
deleteUserPolicy pUserName_ pPolicyName_ =
DeleteUserPolicy'
{ _dupUserName = pUserName_
, _dupPolicyName = pPolicyName_
}
dupUserName :: Lens' DeleteUserPolicy Text
dupUserName = lens _dupUserName (\ s a -> s{_dupUserName = a});
dupPolicyName :: Lens' DeleteUserPolicy Text
dupPolicyName = lens _dupPolicyName (\ s a -> s{_dupPolicyName = a});
instance AWSRequest DeleteUserPolicy where
type Rs DeleteUserPolicy = DeleteUserPolicyResponse
request = postQuery iam
response = receiveNull DeleteUserPolicyResponse'
instance Hashable DeleteUserPolicy
instance NFData DeleteUserPolicy
instance ToHeaders DeleteUserPolicy where
toHeaders = const mempty
instance ToPath DeleteUserPolicy where
toPath = const "/"
instance ToQuery DeleteUserPolicy where
toQuery DeleteUserPolicy'{..}
= mconcat
["Action" =: ("DeleteUserPolicy" :: ByteString),
"Version" =: ("2010-05-08" :: ByteString),
"UserName" =: _dupUserName,
"PolicyName" =: _dupPolicyName]
data DeleteUserPolicyResponse =
DeleteUserPolicyResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteUserPolicyResponse
:: DeleteUserPolicyResponse
deleteUserPolicyResponse = DeleteUserPolicyResponse'
instance NFData DeleteUserPolicyResponse