PutCommentReactionCommand

Adds or updates a reaction to a specified comment for the user whose identity is used to make the request. You can only add or update a reaction for yourself. You cannot add, modify, or delete a reaction for another user.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { CodeCommitClient, PutCommentReactionCommand } from "@aws-sdk/client-codecommit"; // ES Modules import
// const { CodeCommitClient, PutCommentReactionCommand } = require("@aws-sdk/client-codecommit"); // CommonJS import
const client = new CodeCommitClient(config);
const input = { // PutCommentReactionInput
  commentId: "STRING_VALUE", // required
  reactionValue: "STRING_VALUE", // required
};
const command = new PutCommentReactionCommand(input);
const response = await client.send(command);
// {};

PutCommentReactionCommand Input

See PutCommentReactionCommandInput for more details

Parameter
Type
Description
commentId
Required
string | undefined

The ID of the comment to which you want to add or update a reaction.

reactionValue
Required
string | undefined

The emoji reaction you want to add or update. To remove a reaction, provide a value of blank or null. You can also provide the value of none. For information about emoji reaction values supported in CodeCommit, see the CodeCommit User Guide .

PutCommentReactionCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

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.

InvalidReactionValueException
client

The value of the reaction is not valid. For more information, see the CodeCommit User Guide .

ReactionLimitExceededException
client

The number of reactions has been exceeded. Reactions are limited to one reaction per user for each individual comment ID.

ReactionValueRequiredException
client

A reaction value is required.

CodeCommitServiceException
Base exception class for all service exceptions from CodeCommit service.