:doc:`CodeCommit <../../codecommit>` / Client / delete_pull_request_approval_rule

*********************************
delete_pull_request_approval_rule
*********************************



.. py:method:: CodeCommit.Client.delete_pull_request_approval_rule(**kwargs)

  

  Deletes an approval rule from a specified pull request. Approval rules can be deleted from a pull request only if the pull request is open, and if the approval rule was created specifically for a pull request and not generated from an approval rule template associated with the repository where the pull request was created. You cannot delete an approval rule from a merged or closed pull request.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeletePullRequestApprovalRule>`_  


  **Request Syntax**
  ::

    response = client.delete_pull_request_approval_rule(
        pullRequestId='string',
        approvalRuleName='string'
    )
    
  :type pullRequestId: string
  :param pullRequestId: **[REQUIRED]** 

    The system-generated ID of the pull request that contains the approval rule you want to delete.

    

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

    The name of the approval rule you want to delete.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'approvalRuleId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **approvalRuleId** *(string) --* 

        The ID of the deleted approval rule.

         

        .. note::

          

          If the approval rule was deleted in an earlier API call, the response is 200 OK without content.

          

        
  
  **Exceptions**
  
  *   :py:class:`CodeCommit.Client.exceptions.PullRequestDoesNotExistException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidPullRequestIdException`

  
  *   :py:class:`CodeCommit.Client.exceptions.PullRequestIdRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.PullRequestAlreadyClosedException`

  
  *   :py:class:`CodeCommit.Client.exceptions.ApprovalRuleNameRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidApprovalRuleNameException`

  
  *   :py:class:`CodeCommit.Client.exceptions.CannotDeleteApprovalRuleFromTemplateException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyAccessDeniedException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyDisabledException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyNotFoundException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyUnavailableException`

  