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

**********************
delete_resource_server
**********************



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

  

  Deletes a resource server. After you delete a resource server, users can no longer generate access tokens with scopes that are associate with that resource server.

   

  Resource servers are associated with custom scopes and machine-to-machine (M2M) authorization. For more information, see `Access control with resource servers <https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-define-resource-servers.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/DeleteResourceServer>`_  


  **Request Syntax**
  ::

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

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

    

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

    The identifier of the resource server that you want to delete.

    

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

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

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

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

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

  