Skip to main content

folders

Creates, updates, deletes, gets or lists a folders resource.

Overview​

Namefolders
TypeResource
Idaws.workdocs.folders

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
custom_metadataobjectThe custom metadata on the folder.
metadataobjectThe metadata of the folder.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_folderselectfolder_id, regionAuthentication, includeCustomMetadataRetrieves the metadata of the specified folder.
create_folderinsertregion, ParentFolderIdAuthenticationCreates a folder with the specified name and parent folder.
update_folderupdatefolder_id, regionAuthenticationUpdates the specified attributes of the specified folder. The user must have access to both the folder and its parent folder, if applicable.
delete_folderdeletefolder_id, regionAuthenticationPermanently 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.

NameDatatypeDescription
folder_idstringThe ID of the folder.
regionstringAWS region (default: us-east-1)
AuthenticationstringAmazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.
includeCustomMetadatabooleanSet to TRUE to include custom metadata in the response.

SELECT examples​

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​

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
;

UPDATE examples​

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​

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 }}'
;