Skip to content

get_pull_request_override_state async

get_pull_request_override_state(
    pull_request_id: PullRequestId,
    revision_id: RevisionId,
    *,
    config_overrides: Optional[AsyncCodeCommitClientConfig] = None,
) -> GetPullRequestOverrideStateOutput

Returns information about whether approval rules have been set aside (overridden) for a pull request, and if so, the Amazon Resource Name (ARN) of the user or identity that overrode the rules and their requirements for the pull request.

Parameters:

  • pull_request_id (PullRequestId) –

    The ID of the pull request for which you want to get information about whether approval rules have been set aside (overridden).

  • revision_id (RevisionId) –

    The system-generated ID of the revision for the pull request. To retrieve the most recent revision ID, use GetPullRequest.

Raises:

Source code in docs_src/capo_codecommit/_services/async_code_commit.py
async def get_pull_request_override_state(
    self,
    pull_request_id: "capo_codecommit.types.pull_request_id.PullRequestId",
    revision_id: "capo_codecommit.types.revision_id.RevisionId",
    *,
    config_overrides: Optional[AsyncCodeCommitClientConfig] = None,
) -> "capo_codecommit.types.get_pull_request_override_state_output.GetPullRequestOverrideStateOutput":
    """<p>Returns information about whether approval rules have been set aside (overridden) for a pull request, and if so, the Amazon Resource Name (ARN) of the user or identity that overrode the rules and their requirements for the pull request.</p>

    Args:
        pull_request_id: <p>The ID of the pull request for which you want to get information about whether approval rules have been set aside (overridden).</p>
        revision_id: <p>The system-generated ID of the revision for the pull request. To retrieve the most recent revision ID, use <a>GetPullRequest</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.invalid_revision_id_exception.InvalidRevisionIdException: <p>The revision ID is not valid. Use GetPullRequest to determine the value.</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.revision_id_required_exception.RevisionIdRequiredException: <p>A revision ID is required, but was not provided.</p>
        capo_codecommit.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codecommit.types.get_pull_request_override_state_input.GetPullRequestOverrideStateInput]",
    ) -> AsyncOperationResponse[
        "capo_codecommit.types.get_pull_request_override_state_output.GetPullRequestOverrideStateOutput"
    ]:
        import capo_codecommit._operations.code_commit_20150413.get_pull_request_override_state

        (
            output,
            http_response,
        ) = await capo_codecommit._operations.code_commit_20150413.get_pull_request_override_state.async_get_pull_request_override_state(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetPullRequestOverrideState")
    )
    input_: capo_codecommit.types.get_pull_request_override_state_input.GetPullRequestOverrideStateInput = {
        "pull_request_id": pull_request_id,
        "revision_id": revision_id,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output