comments
Creates, updates, deletes, gets or lists a comments resource.
Overview
| Name | comments |
| Type | Resource |
| Id | aws.workdocs.comments |
Fields
The following fields are returned by SELECT queries:
- describe_comments
| Name | Datatype | Description |
|---|---|---|
comment_id | string | The ID of the comment. (pattern: <code>[\w+-.@]+</code>) |
contributor | object | The details of the user who made the comment. |
created_timestamp | string (date-time) | The time that the comment was created. |
parent_id | string | The ID of the parent comment. (pattern: <code>[\w+-.@]+</code>) |
recipient_id | string | If the comment is a reply to another user's comment, this field contains the user ID of the user being replied to. (pattern: <code>[&\w+-.@]+</code>) |
status | string | The status of the comment. (DRAFT, PUBLISHED, DELETED) |
text | string | The text of the comment. |
thread_id | string | The ID of the root comment in the thread. (pattern: <code>[\w+-.@]+</code>) |
visibility | string | The visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors. (PUBLIC, PRIVATE) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_comments | select | document_id, version_id, region | Authentication, limit, marker | List all the comments for the specified document version. |
create_comment | insert | document_id, version_id, region | Authentication | Adds a new comment to the specified document version. |
delete_comment | delete | document_id, version_id, comment_id, region | Authentication | Deletes the specified comment from the document version. |
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 |
|---|---|---|
comment_id | string | The ID of the comment. |
document_id | string | The ID of the document. |
region | string | AWS region (default: us-east-1) |
version_id | string | The ID of the document version. |
Authentication | string | Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API. |
limit | integer | The maximum number of items to return. |
marker | string | The marker for the next set of results. This marker was received from a previous call. |
SELECT examples
- describe_comments
List all the comments for the specified document version.
SELECT
comment_id,
contributor,
created_timestamp,
parent_id,
recipient_id,
status,
text,
thread_id,
visibility
FROM aws.workdocs.comments
WHERE document_id = '{{ document_id }}' -- required
AND version_id = '{{ version_id }}' -- required
AND region = '{{ region }}' -- required
AND Authentication = '{{ Authentication }}'
AND limit = '{{ limit }}'
AND marker = '{{ marker }}'
;
INSERT examples
- create_comment
- Manifest
Adds a new comment to the specified document version.
INSERT INTO aws.workdocs.comments (
ParentId,
ThreadId,
Text,
Visibility,
NotifyCollaborators,
document_id,
version_id,
region,
Authentication
)
SELECT
'{{ ParentId }}',
'{{ ThreadId }}',
'{{ Text }}',
'{{ Visibility }}',
{{ NotifyCollaborators }},
'{{ document_id }}',
'{{ version_id }}',
'{{ region }}',
'{{ Authentication }}'
RETURNING
comment
;
# Description fields are for documentation purposes
- name: comments
props:
- name: document_id
value: "{{ document_id }}"
description: Required parameter for the comments resource.
- name: version_id
value: "{{ version_id }}"
description: Required parameter for the comments resource.
- name: region
value: "{{ region }}"
description: Required parameter for the comments resource.
- name: ParentId
value: "{{ ParentId }}"
- name: ThreadId
value: "{{ ThreadId }}"
- name: Text
value: "{{ Text }}"
- name: Visibility
value: "{{ Visibility }}"
valid_values: ['PUBLIC', 'PRIVATE']
- name: NotifyCollaborators
value: {{ NotifyCollaborators }}
- name: Authentication
value: "{{ Authentication }}"
description: Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.
description: Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.
DELETE examples
- delete_comment
Deletes the specified comment from the document version.
DELETE FROM aws.workdocs.comments
WHERE document_id = '{{ document_id }}' --required
AND version_id = '{{ version_id }}' --required
AND comment_id = '{{ comment_id }}' --required
AND region = '{{ region }}' --required
AND Authentication = '{{ Authentication }}'
;