comments
Creates, updates, deletes, gets or lists a comments resource.
Overview
| Name | comments |
| Type | Resource |
| Id | aws.security_ir.comments |
Fields
The following fields are returned by SELECT queries:
- list_comments
| Name | Datatype | Description |
|---|---|---|
body | string | |
comment_id | string | (pattern: <code>\d{6}</code>) |
created_date | string (date-time) | |
creator | string | (pattern: <code>.((^AWS Responder)|(^\d{12}$)|(^arn:([^:]aws[^:]):(?:(?:iam)::\d{12}:(?:user|role|group|root)(?:(?:/[^/]+)+)?|(?:sts)::\d{12}:assumed-role/[^/]+/[^/]+)$)|(^security-ir.amazonaws.com)).</code>) |
last_updated_by | string | (pattern: <code>.((^AWS Responder)|(^\d{12}$)|(^arn:([^:]aws[^:]):(?:(?:iam)::\d{12}:(?:user|role|group|root)(?:(?:/[^/]+)+)?|(?:sts)::\d{12}:assumed-role/[^/]+/[^/]+)$)|(^security-ir.amazonaws.com)).</code>) |
last_updated_date | string (date-time) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_comments | select | case_id, region | Returns comments for a designated case. | |
create_case_comment | insert | case_id, region, body | Adds a comment to an existing case. | |
update_case_comment | update | case_id, comment_id, region, body | Updates an existing case comment. |
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 |
|---|---|---|
case_id | string | Required element for UpdateCaseComment to identify the case ID containing the comment to be updated. |
comment_id | string | Required element for UpdateCaseComment to identify the case ID to be updated. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_comments
Returns comments for a designated case.
SELECT
body,
comment_id,
created_date,
creator,
last_updated_by,
last_updated_date
FROM aws.security_ir.comments
WHERE case_id = '{{ case_id }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_case_comment
- Manifest
Adds a comment to an existing case.
INSERT INTO aws.security_ir.comments (
clientToken,
body,
case_id,
region
)
SELECT
'{{ clientToken }}',
'{{ body }}' /* required */,
'{{ case_id }}',
'{{ region }}'
RETURNING
comment_id
;
# Description fields are for documentation purposes
- name: comments
props:
- name: case_id
value: "{{ case_id }}"
description: Required parameter for the comments resource.
- name: region
value: "{{ region }}"
description: Required parameter for the comments resource.
- name: clientToken
value: "{{ clientToken }}"
- name: body
value: "{{ body }}"
UPDATE examples
- update_case_comment
Updates an existing case comment.
UPDATE aws.security_ir.comments
SET
body = '{{ body }}'
WHERE
case_id = '{{ case_id }}' --required
AND comment_id = '{{ comment_id }}' --required
AND region = '{{ region }}' --required
AND body = '{{ body }}' --required
RETURNING
body,
comment_id;