comments
Creates, updates, deletes, gets or lists a comments resource.
Overview
| Name | comments |
| Type | Resource |
| Id | aws.codecommit.comments |
Fields
The following fields are returned by SELECT queries:
- get_comment
| Name | Datatype | Description |
|---|---|---|
author_arn | string | The Amazon Resource Name (ARN) of the person who posted the comment. |
caller_reactions | array | The emoji reactions to a comment, if any, submitted by the user whose credentials are associated with the call to the API. |
client_request_token | string | A 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_id | string | The system-generated comment ID. |
content | string | The content of the comment. |
creation_date | string (date-time) | The date and time the comment was created, in timestamp format. |
deleted | boolean | A Boolean value indicating whether the comment has been deleted. |
in_reply_to | string | The ID of the comment for which this comment is a reply, if any. |
last_modified_date | string (date-time) | The date and time the comment was most recently modified, in timestamp format. |
reaction_counts | object | A 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_comment | select | region | 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. | |
update_comment | update | region, commentId, content | Replaces the contents of a comment. | |
delete_comment_content | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_comment
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
- update_comment
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
- delete_comment_content
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
;