Gets information about a pull request in a specified repository.
Parameters:
Raises:
Source code in docs_src/capo_codecommit/_services/code_commit.py
| def get_pull_request(
self,
pull_request_id: "capo_codecommit.types.pull_request_id.PullRequestId",
*,
config_overrides: Optional[CodeCommitClientConfig] = None,
) -> "capo_codecommit.types.get_pull_request_output.GetPullRequestOutput":
"""<p>Gets information about a pull request in a specified repository.</p>
Args:
pull_request_id: <p>The system-generated ID of the pull request. To get this ID, use <a>ListPullRequests</a>.</p>
Raises:
capo_codecommit.errors.encryption_integrity_checks_failed_exception.EncryptionIntegrityChecksFailedException: <p>An encryption integrity check failed.</p>
capo_codecommit.errors.encryption_key_access_denied_exception.EncryptionKeyAccessDeniedException: <p>An encryption key could not be accessed.</p>
capo_codecommit.errors.encryption_key_disabled_exception.EncryptionKeyDisabledException: <p>The encryption key is disabled.</p>
capo_codecommit.errors.encryption_key_not_found_exception.EncryptionKeyNotFoundException: <p>No encryption key was found.</p>
capo_codecommit.errors.encryption_key_unavailable_exception.EncryptionKeyUnavailableException: <p>The encryption key is not available.</p>
capo_codecommit.errors.invalid_pull_request_id_exception.InvalidPullRequestIdException: <p>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.</p>
capo_codecommit.errors.pull_request_does_not_exist_exception.PullRequestDoesNotExistException: <p>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.</p>
capo_codecommit.errors.pull_request_id_required_exception.PullRequestIdRequiredException: <p>A pull request ID is required, but none was provided.</p>
capo_codecommit.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_codecommit.types.get_pull_request_input.GetPullRequestInput]",
) -> OperationResponse[
"capo_codecommit.types.get_pull_request_output.GetPullRequestOutput"
]:
import capo_codecommit._operations.code_commit_20150413.get_pull_request
output, http_response = (
capo_codecommit._operations.code_commit_20150413.get_pull_request.get_pull_request(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetPullRequest")
)
input_: capo_codecommit.types.get_pull_request_input.GetPullRequestInput = {
"pull_request_id": pull_request_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|