CodeCommit / Client / delete_pull_request_approval_rule

delete_pull_request_approval_rule#

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

Request Syntax

response = client.delete_pull_request_approval_rule(
    pullRequestId='string',
    approvalRuleName='string'
)
Parameters:
  • pullRequestId (string) –

    [REQUIRED]

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

  • approvalRuleName (string) –

    [REQUIRED]

    The name of the approval rule you want to delete.

Return type:

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