- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DeleteCommentContentCommand
Deletes the content of a comment made on a change, file, or commit in a repository.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { CodeCommitClient, DeleteCommentContentCommand } from "@aws-sdk/client-codecommit"; // ES Modules import
// const { CodeCommitClient, DeleteCommentContentCommand } = require("@aws-sdk/client-codecommit"); // CommonJS import
const client = new CodeCommitClient(config);
const input = { // DeleteCommentContentInput
commentId: "STRING_VALUE", // required
};
const command = new DeleteCommentContentCommand(input);
const response = await client.send(command);
// { // DeleteCommentContentOutput
// comment: { // Comment
// commentId: "STRING_VALUE",
// content: "STRING_VALUE",
// inReplyTo: "STRING_VALUE",
// creationDate: new Date("TIMESTAMP"),
// lastModifiedDate: new Date("TIMESTAMP"),
// authorArn: "STRING_VALUE",
// deleted: true || false,
// clientRequestToken: "STRING_VALUE",
// callerReactions: [ // CallerReactions
// "STRING_VALUE",
// ],
// reactionCounts: { // ReactionCountsMap
// "<keys>": Number("int"),
// },
// },
// };
DeleteCommentContentCommand Input
See DeleteCommentContentCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
commentId Required | string | undefined | The unique, system-generated ID of the comment. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest. |
DeleteCommentContentCommand Output
See DeleteCommentContentCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
comment | Comment | undefined | Information about the comment you just deleted. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
CommentDeletedException | client | This comment has already been deleted. You cannot edit or delete a deleted comment. |
CommentDoesNotExistException | client | No comment exists with the provided ID. Verify that you have used the correct ID, and then try again. |
CommentIdRequiredException | client | The comment ID is missing or null. A comment ID is required. |
InvalidCommentIdException | client | The comment ID is not in a valid format. Make sure that you have provided the full comment ID. |
CodeCommitServiceException | Base exception class for all service exceptions from CodeCommit service. |