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'
)
[REQUIRED]
The system-generated ID of the pull request that contains the approval rule you want to delete.
[REQUIRED]
The name of the approval rule you want to delete.
dict
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
CodeCommit.Client.exceptions.PullRequestDoesNotExistException
CodeCommit.Client.exceptions.InvalidPullRequestIdException
CodeCommit.Client.exceptions.PullRequestIdRequiredException
CodeCommit.Client.exceptions.PullRequestAlreadyClosedException
CodeCommit.Client.exceptions.ApprovalRuleNameRequiredException
CodeCommit.Client.exceptions.InvalidApprovalRuleNameException
CodeCommit.Client.exceptions.CannotDeleteApprovalRuleFromTemplateException
CodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedException
CodeCommit.Client.exceptions.EncryptionKeyAccessDeniedException
CodeCommit.Client.exceptions.EncryptionKeyDisabledException
CodeCommit.Client.exceptions.EncryptionKeyNotFoundException
CodeCommit.Client.exceptions.EncryptionKeyUnavailableException