folders
Creates, updates, deletes, gets or lists a folders resource.
Overview
| Name | folders |
| Type | Resource |
| Id | aws.workdocs.folders |
Fields
The following fields are returned by SELECT queries:
- get_folder
| Name | Datatype | Description |
|---|---|---|
custom_metadata | object | The custom metadata on the folder. |
metadata | object | The metadata of the folder. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_folder | select | folder_id, region | Authentication, includeCustomMetadata | Retrieves the metadata of the specified folder. |
create_folder | insert | region, ParentFolderId | Authentication | Creates a folder with the specified name and parent folder. |
update_folder | update | folder_id, region | Authentication | Updates the specified attributes of the specified folder. The user must have access to both the folder and its parent folder, if applicable. |
delete_folder | delete | folder_id, region | Authentication | Permanently deletes the specified folder and its contents. |
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 |
|---|---|---|
folder_id | string | The ID of the folder. |
region | string | AWS region (default: us-east-1) |
Authentication | string | Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API. |
includeCustomMetadata | boolean | Set to TRUE to include custom metadata in the response. |
SELECT examples
- get_folder
Retrieves the metadata of the specified folder.
SELECT
custom_metadata,
metadata
FROM aws.workdocs.folders
WHERE folder_id = '{{ folder_id }}' -- required
AND region = '{{ region }}' -- required
AND Authentication = '{{ Authentication }}'
AND includeCustomMetadata = '{{ includeCustomMetadata }}'
;
INSERT examples
- create_folder
- Manifest
Creates a folder with the specified name and parent folder.
INSERT INTO aws.workdocs.folders (
Name,
ParentFolderId,
region,
Authentication
)
SELECT
'{{ Name }}',
'{{ ParentFolderId }}' /* required */,
'{{ region }}',
'{{ Authentication }}'
RETURNING
metadata
;
# Description fields are for documentation purposes
- name: folders
props:
- name: region
value: "{{ region }}"
description: Required parameter for the folders resource.
- name: Name
value: "{{ Name }}"
- name: ParentFolderId
value: "{{ ParentFolderId }}"
- 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.
UPDATE examples
- update_folder
Updates the specified attributes of the specified folder. The user must have access to both the folder and its parent folder, if applicable.
UPDATE aws.workdocs.folders
SET
Name = '{{ Name }}',
ParentFolderId = '{{ ParentFolderId }}',
ResourceState = '{{ ResourceState }}'
WHERE
folder_id = '{{ folder_id }}' --required
AND region = '{{ region }}' --required
AND Authentication = '{{ Authentication}}';
DELETE examples
- delete_folder
Permanently deletes the specified folder and its contents.
DELETE FROM aws.workdocs.folders
WHERE folder_id = '{{ folder_id }}' --required
AND region = '{{ region }}' --required
AND Authentication = '{{ Authentication }}'
;