module Network.AWS.CognitoIdentityProvider.DeleteUserPool
(
deleteUserPool
, DeleteUserPool
, dupUserPoolId
, deleteUserPoolResponse
, DeleteUserPoolResponse
) where
import Network.AWS.CognitoIdentityProvider.Types
import Network.AWS.CognitoIdentityProvider.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteUserPool = DeleteUserPool'
{ _dupUserPoolId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteUserPool
:: Text
-> DeleteUserPool
deleteUserPool pUserPoolId_ =
DeleteUserPool'
{ _dupUserPoolId = pUserPoolId_
}
dupUserPoolId :: Lens' DeleteUserPool Text
dupUserPoolId = lens _dupUserPoolId (\ s a -> s{_dupUserPoolId = a});
instance AWSRequest DeleteUserPool where
type Rs DeleteUserPool = DeleteUserPoolResponse
request = postJSON cognitoIdentityProvider
response = receiveNull DeleteUserPoolResponse'
instance Hashable DeleteUserPool
instance NFData DeleteUserPool
instance ToHeaders DeleteUserPool where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSCognitoIdentityProviderService.DeleteUserPool"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteUserPool where
toJSON DeleteUserPool'{..}
= object
(catMaybes [Just ("UserPoolId" .= _dupUserPoolId)])
instance ToPath DeleteUserPool where
toPath = const "/"
instance ToQuery DeleteUserPool where
toQuery = const mempty
data DeleteUserPoolResponse =
DeleteUserPoolResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteUserPoolResponse
:: DeleteUserPoolResponse
deleteUserPoolResponse = DeleteUserPoolResponse'
instance NFData DeleteUserPoolResponse