Skip to content

delete_comment_content async

delete_comment_content(
    comment_id: CommentId,
    *,
    config_overrides: Optional[AsyncCodeCommitClientConfig] = None,
) -> DeleteCommentContentOutput

Deletes the content of a comment made on a change, file, or commit in a repository.

Parameters:

Raises:

Source code in docs_src/capo_codecommit/_services/async_code_commit.py
async def delete_comment_content(
    self,
    comment_id: "capo_codecommit.types.comment_id.CommentId",
    *,
    config_overrides: Optional[AsyncCodeCommitClientConfig] = None,
) -> (
    "capo_codecommit.types.delete_comment_content_output.DeleteCommentContentOutput"
):
    """<p>Deletes the content of a comment made on a change, file, or commit in a repository.</p>

    Args:
        comment_id: <p>The unique, system-generated ID of the comment. To get this ID, use <a>GetCommentsForComparedCommit</a> or <a>GetCommentsForPullRequest</a>.</p>

    Raises:
        capo_codecommit.errors.comment_deleted_exception.CommentDeletedException: <p>This comment has already been deleted. You cannot edit or delete a deleted comment.</p>
        capo_codecommit.errors.comment_does_not_exist_exception.CommentDoesNotExistException: <p>No comment exists with the provided ID. Verify that you have used the correct ID, and then try again.</p>
        capo_codecommit.errors.comment_id_required_exception.CommentIdRequiredException: <p>The comment ID is missing or null. A comment ID is required.</p>
        capo_codecommit.errors.invalid_comment_id_exception.InvalidCommentIdException: <p>The comment ID is not in a valid format. Make sure that you have provided the full comment ID.</p>
        capo_codecommit.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codecommit.types.delete_comment_content_input.DeleteCommentContentInput]",
    ) -> AsyncOperationResponse[
        "capo_codecommit.types.delete_comment_content_output.DeleteCommentContentOutput"
    ]:
        import capo_codecommit._operations.code_commit_20150413.delete_comment_content

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteCommentContent")
    )
    input_: capo_codecommit.types.delete_comment_content_input.DeleteCommentContentInput = {
        "comment_id": comment_id
    }

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