GetCommentReactionsCommand

Returns information about reactions to a specified comment ID. Reactions from users who have been deleted will not be included in the count.

Example Syntax

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

import { CodeCommitClient, GetCommentReactionsCommand } from "@aws-sdk/client-codecommit"; // ES Modules import
// const { CodeCommitClient, GetCommentReactionsCommand } = require("@aws-sdk/client-codecommit"); // CommonJS import
const client = new CodeCommitClient(config);
const input = { // GetCommentReactionsInput
  commentId: "STRING_VALUE", // required
  reactionUserArn: "STRING_VALUE",
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
};
const command = new GetCommentReactionsCommand(input);
const response = await client.send(command);
// { // GetCommentReactionsOutput
//   reactionsForComment: [ // ReactionsForCommentList // required
//     { // ReactionForComment
//       reaction: { // ReactionValueFormats
//         emoji: "STRING_VALUE",
//         shortCode: "STRING_VALUE",
//         unicode: "STRING_VALUE",
//       },
//       reactionUsers: [ // ReactionUsersList
//         "STRING_VALUE",
//       ],
//       reactionsFromDeletedUsersCount: Number("int"),
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

GetCommentReactionsCommand Input

See GetCommentReactionsCommandInput for more details

Parameter
Type
Description
commentId
Required
string | undefined

The ID of the comment for which you want to get reactions information.

maxResults
number | undefined

A non-zero, non-negative integer used to limit the number of returned results. The default is the same as the allowed maximum, 1,000.

nextToken
string | undefined

An enumeration token that, when provided in a request, returns the next batch of the results.

reactionUserArn
string | undefined

Optional. The Amazon Resource Name (ARN) of the user or identity for which you want to get reaction information.

GetCommentReactionsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
reactionsForComment
Required
ReactionForComment[] | undefined

An array of reactions to the specified comment.

nextToken
string | undefined

An enumeration token that can be used in a request to return the next batch of the results.

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.

InvalidContinuationTokenException
client

The specified continuation token is not valid.

InvalidMaxResultsException
client

The specified number of maximum results is not valid.

InvalidReactionUserArnException
client

The Amazon Resource Name (ARN) of the user or identity is not valid.

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