Skip to content

update_pull_request_description async

update_pull_request_description(
    pull_request_id: PullRequestId,
    description: Description,
    *,
    config_overrides: Optional[AsyncCodeCommitClientConfig] = None,
) -> UpdatePullRequestDescriptionOutput

Replaces the contents of the description of a pull request.

Parameters:

  • pull_request_id (PullRequestId) –

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • description (Description) –

    The updated content of the description for the pull request. This content replaces the existing description.

Raises:

Source code in docs_src/capo_codecommit/_services/async_code_commit.py
async def update_pull_request_description(
    self,
    pull_request_id: "capo_codecommit.types.pull_request_id.PullRequestId",
    description: "capo_codecommit.types.description.Description",
    *,
    config_overrides: Optional[AsyncCodeCommitClientConfig] = None,
) -> "capo_codecommit.types.update_pull_request_description_output.UpdatePullRequestDescriptionOutput":
    """<p>Replaces the contents of the description of a pull request.</p>

    Args:
        pull_request_id: <p>The system-generated ID of the pull request. To get this ID, use <a>ListPullRequests</a>.</p>
        description: <p>The updated content of the description for the pull request. This content replaces the existing description.</p>

    Raises:
        capo_codecommit.errors.invalid_description_exception.InvalidDescriptionException: <p>The pull request description is not valid. Descriptions cannot be more than 1,000 characters.</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_already_closed_exception.PullRequestAlreadyClosedException: <p>The pull request status cannot be updated because it is already closed.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codecommit.types.update_pull_request_description_input.UpdatePullRequestDescriptionInput]",
    ) -> AsyncOperationResponse[
        "capo_codecommit.types.update_pull_request_description_output.UpdatePullRequestDescriptionOutput"
    ]:
        import capo_codecommit._operations.code_commit_20150413.update_pull_request_description

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdatePullRequestDescription")
    )
    input_: capo_codecommit.types.update_pull_request_description_input.UpdatePullRequestDescriptionInput = {
        "pull_request_id": pull_request_id,
        "description": description,
    }

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