update_pull_request_approval_state
¶
update_pull_request_approval_state(
pull_request_id: PullRequestId,
revision_id: RevisionId,
approval_state: ApprovalState,
*,
config_overrides: Optional[CodeCommitClientConfig] = 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/code_commit.py
5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 | |