documents
Creates, updates, deletes, gets or lists a documents resource.
Overview
| Name | documents |
| Type | Resource |
| Id | aws.workdocs.documents |
Fields
The following fields are returned by SELECT queries:
- get_document
| Name | Datatype | Description |
|---|---|---|
custom_metadata | object | The custom metadata on the document. |
metadata | object | The metadata details of the document. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_document | select | document_id, region | Authentication, includeCustomMetadata | Retrieves details of a document. |
update_document | update | document_id, region | Authentication | Updates the specified attributes of a document. The user must have access to both the document and its parent folder, if applicable. |
delete_document | delete | document_id, region | Authentication | Permanently deletes the specified document and its associated metadata. |
abort_document_version_upload | exec | document_id, version_id, region | Authentication | Aborts the upload of the specified document version that was previously initiated by InitiateDocumentVersionUpload. The client should make this call only when it no longer intends to upload the document version, or fails to do so. |
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 |
|---|---|---|
document_id | string | The ID of the document. |
region | string | AWS region (default: us-east-1) |
version_id | string | The ID of the version. |
Authentication | string | Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API. |
includeCustomMetadata | boolean | Set this to TRUE to include custom metadata in the response. |
SELECT examples
- get_document
Retrieves details of a document.
SELECT
custom_metadata,
metadata
FROM aws.workdocs.documents
WHERE document_id = '{{ document_id }}' -- required
AND region = '{{ region }}' -- required
AND Authentication = '{{ Authentication }}'
AND includeCustomMetadata = '{{ includeCustomMetadata }}'
;
UPDATE examples
- update_document
Updates the specified attributes of a document. The user must have access to both the document and its parent folder, if applicable.
UPDATE aws.workdocs.documents
SET
Name = '{{ Name }}',
ParentFolderId = '{{ ParentFolderId }}',
ResourceState = '{{ ResourceState }}'
WHERE
document_id = '{{ document_id }}' --required
AND region = '{{ region }}' --required
AND Authentication = '{{ Authentication}}';
DELETE examples
- delete_document
Permanently deletes the specified document and its associated metadata.
DELETE FROM aws.workdocs.documents
WHERE document_id = '{{ document_id }}' --required
AND region = '{{ region }}' --required
AND Authentication = '{{ Authentication }}'
;
Lifecycle Methods
- abort_document_version_upload
Aborts the upload of the specified document version that was previously initiated by InitiateDocumentVersionUpload. The client should make this call only when it no longer intends to upload the document version, or fails to do so.
EXEC aws.workdocs.documents.abort_document_version_upload
@document_id='{{ document_id }}' --required,
@version_id='{{ version_id }}' --required,
@region='{{ region }}' --required,
@Authentication='{{ Authentication }}'
;