module Network.AWS.CognitoIdentityProvider.DeleteGroup
(
deleteGroup
, DeleteGroup
, dgGroupName
, dgUserPoolId
, deleteGroupResponse
, DeleteGroupResponse
) 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
data DeleteGroup = DeleteGroup'
{ _dgGroupName :: !Text
, _dgUserPoolId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteGroup
:: Text
-> Text
-> DeleteGroup
deleteGroup pGroupName_ pUserPoolId_ =
DeleteGroup' {_dgGroupName = pGroupName_, _dgUserPoolId = pUserPoolId_}
dgGroupName :: Lens' DeleteGroup Text
dgGroupName = lens _dgGroupName (\ s a -> s{_dgGroupName = a});
dgUserPoolId :: Lens' DeleteGroup Text
dgUserPoolId = lens _dgUserPoolId (\ s a -> s{_dgUserPoolId = a});
instance AWSRequest DeleteGroup where
type Rs DeleteGroup = DeleteGroupResponse
request = postJSON cognitoIdentityProvider
response = receiveNull DeleteGroupResponse'
instance Hashable DeleteGroup where
instance NFData DeleteGroup where
instance ToHeaders DeleteGroup where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSCognitoIdentityProviderService.DeleteGroup" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteGroup where
toJSON DeleteGroup'{..}
= object
(catMaybes
[Just ("GroupName" .= _dgGroupName),
Just ("UserPoolId" .= _dgUserPoolId)])
instance ToPath DeleteGroup where
toPath = const "/"
instance ToQuery DeleteGroup where
toQuery = const mempty
data DeleteGroupResponse =
DeleteGroupResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteGroupResponse
:: DeleteGroupResponse
deleteGroupResponse = DeleteGroupResponse'
instance NFData DeleteGroupResponse where