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/code_commit.py
| def delete_comment_content(
self,
comment_id: "capo_codecommit.types.comment_id.CommentId",
*,
config_overrides: Optional[CodeCommitClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_codecommit.types.delete_comment_content_input.DeleteCommentContentInput]",
) -> OperationResponse[
"capo_codecommit.types.delete_comment_content_output.DeleteCommentContentOutput"
]:
import capo_codecommit._operations.code_commit_20150413.delete_comment_content
output, http_response = (
capo_codecommit._operations.code_commit_20150413.delete_comment_content.delete_comment_content(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|