update_pull_request_approval_state
async
¶
update_pull_request_approval_state(
pull_request_id: PullRequestId,
revision_id: RevisionId,
approval_state: ApprovalState,
*,
config_overrides: Optional[AsyncCodeCommitClientConfig] = None,
) -> None
Updates the state of a user's approval on a pull request. The user is derived from the signed-in account when the request is made.
Parameters:
-
pull_request_id(PullRequestId) –The system-generated ID of the pull request.
-
revision_id(RevisionId) –The system-generated ID of the revision.
-
approval_state(ApprovalState) –The approval state to associate with the user on the pull request.
Raises:
-
ApprovalStateRequiredException–An approval state is required, but was not specified.
-
EncryptionIntegrityChecksFailedException–An encryption integrity check failed.
-
EncryptionKeyAccessDeniedException–An encryption key could not be accessed.
-
EncryptionKeyDisabledException–The encryption key is disabled.
-
EncryptionKeyNotFoundException–No encryption key was found.
-
EncryptionKeyUnavailableException–The encryption key is not available.
-
InvalidApprovalStateException–The state for the approval is not valid. Valid values include APPROVE and REVOKE.
-
InvalidPullRequestIdException–The pull request ID is not valid. Make sure that you have provided the full ID and that the pull request is in the specified repository, and then try again.
-
InvalidRevisionIdException–The revision ID is not valid. Use GetPullRequest to determine the value.
-
MaximumNumberOfApprovalsExceededException–The number of approvals required for the approval rule exceeds the maximum number allowed.
-
PullRequestAlreadyClosedException–The pull request status cannot be updated because it is already closed.
-
PullRequestCannotBeApprovedByAuthorException–The approval cannot be applied because the user approving the pull request matches the user who created the pull request. You cannot approve a pull request that you created.
-
PullRequestDoesNotExistException–The pull request ID could not be found. Make sure that you have specified the correct repository name and pull request ID, and then try again.
-
PullRequestIdRequiredException–A pull request ID is required, but none was provided.
-
RevisionIdRequiredException–A revision ID is required, but was not provided.
-
RevisionNotCurrentException–The revision ID provided in the request does not match the current revision ID. Use GetPullRequest to retrieve the current revision ID.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_codecommit/_services/async_code_commit.py
5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 | |