:doc:`CognitoIdentityProvider <../../cognito-idp>` / Client / delete_group

************
delete_group
************



.. py:method:: CognitoIdentityProvider.Client.delete_group(**kwargs)

  

  Deletes a group from the specified user pool. When you delete a group, that group no longer contributes to users' ``cognito:preferred_group`` or ``cognito:groups`` claims, and no longer influence access-control decision that are based on group membership. For more information about user pool groups, see `Adding groups to a user pool <https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-user-groups.html>`__.

   

  .. note::

    

    Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.

     

    **Learn more**

     

    
    * `Signing Amazon Web Services API Requests <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html>`__
     
    * `Using the Amazon Cognito user pools API and user pool endpoints <https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html>`__
    

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DeleteGroup>`_  


  **Request Syntax**
  ::

    response = client.delete_group(
        GroupName='string',
        UserPoolId='string'
    )
    
  :type GroupName: string
  :param GroupName: **[REQUIRED]** 

    The name of the group that you want to delete.

    

  
  :type UserPoolId: string
  :param UserPoolId: **[REQUIRED]** 

    The ID of the user pool where you want to delete the group.

    

  
  
  :returns: None
  **Exceptions**
  
  *   :py:class:`CognitoIdentityProvider.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`CognitoIdentityProvider.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`CognitoIdentityProvider.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`CognitoIdentityProvider.Client.exceptions.NotAuthorizedException`

  
  *   :py:class:`CognitoIdentityProvider.Client.exceptions.InternalErrorException`

  