Skip to main content

comments

Creates, updates, deletes, gets or lists a comments resource.

Overview

Namecomments
TypeResource
Idaws.codecommit.comments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
author_arnstringThe Amazon Resource Name (ARN) of the person who posted the comment.
caller_reactionsarrayThe emoji reactions to a comment, if any, submitted by the user whose credentials are associated with the call to the API.
client_request_tokenstringA unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token.
comment_idstringThe system-generated comment ID.
contentstringThe content of the comment.
creation_datestring (date-time)The date and time the comment was created, in timestamp format.
deletedbooleanA Boolean value indicating whether the comment has been deleted.
in_reply_tostringThe ID of the comment for which this comment is a reply, if any.
last_modified_datestring (date-time)The date and time the comment was most recently modified, in timestamp format.
reaction_countsobjectA string to integer map that represents the number of individual users who have responded to a comment with the specified reactions.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_commentselectregionReturns the content of a comment made on a change, file, or commit in a repository. Reaction counts might include numbers from user identities who were deleted after the reaction was made. For a count of reactions from active identities, use GetCommentReactions.
update_commentupdateregion, commentId, contentReplaces the contents of a comment.
delete_comment_contentdeleteregionDeletes the content of a comment made on a change, file, or commit in a repository.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns the content of a comment made on a change, file, or commit in a repository. Reaction counts might include numbers from user identities who were deleted after the reaction was made. For a count of reactions from active identities, use GetCommentReactions.

SELECT
author_arn,
caller_reactions,
client_request_token,
comment_id,
content,
creation_date,
deleted,
in_reply_to,
last_modified_date,
reaction_counts
FROM aws.codecommit.comments
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Replaces the contents of a comment.

UPDATE aws.codecommit.comments
SET
commentId = '{{ commentId }}',
content = '{{ content }}'
WHERE
region = '{{ region }}' --required
AND commentId = '{{ commentId }}' --required
AND content = '{{ content }}' --required
RETURNING
comment;

DELETE examples

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

DELETE FROM aws.codecommit.comments
WHERE region = '{{ region }}' --required
;