Skip to main content

resources

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

Overview

Nameresources
TypeResource
Idaws.workdocs.resources

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
documentsarrayThe documents in the specified collection.
foldersarrayThe folders in the specified folder.
markerstringThe marker to use when requesting the next set of results. If there are no additional results, the string is empty.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_resourcesselectregionAuthentication, userId, collectionType, limit, markerRetrieves a collection of resources, including folders and documents. The only CollectionType supported is SHARED_WITH_ME.
create_custom_metadatainsertresource_id, region, CustomMetadataAuthentication, versionidAdds one or more custom properties to the specified resource (a folder, document, or version).
create_labelsinsertresource_id, region, LabelsAuthenticationAdds the specified list of labels to the given resource (a document or folder)
delete_custom_metadatadeleteresource_id, regionAuthentication, versionId, keys, deleteAllDeletes custom metadata from the specified resource.
delete_labelsexecresource_id, regionAuthentication, labels, deleteAllDeletes the specified list of labels from a resource.
search_resourcesexecregionAuthenticationSearches metadata and the content of folders, documents, document versions, and comments.

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
regionstringAWS region (default: us-east-1)
resource_idstringThe ID of the resource.
AuthenticationstringWorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.
collectionTypestringThe collection type.
deleteAllbooleanFlag to request removal of all labels from the specified resource.
keysarrayList of properties to remove.
labelsarrayList of labels to delete from the resource.
limitintegerThe maximum number of resources to return.
markerstringThe marker for the next set of results. This marker was received from a previous call.
userIdstringThe user ID for the resource collection. This is a required field for accessing the API operation using IAM credentials.
versionIdstringThe ID of the version, if the custom metadata is being deleted from a document version.
versionidstringThe ID of the version, if the custom metadata is being added to a document version.

SELECT examples

Retrieves a collection of resources, including folders and documents. The only CollectionType supported is SHARED_WITH_ME.

SELECT
documents,
folders,
marker
FROM aws.workdocs.resources
WHERE region = '{{ region }}' -- required
AND Authentication = '{{ Authentication }}'
AND userId = '{{ userId }}'
AND collectionType = '{{ collectionType }}'
AND limit = '{{ limit }}'
AND marker = '{{ marker }}'
;

INSERT examples

Adds one or more custom properties to the specified resource (a folder, document, or version).

INSERT INTO aws.workdocs.resources (
CustomMetadata,
resource_id,
region,
Authentication,
versionid
)
SELECT
'{{ CustomMetadata }}' /* required */,
'{{ resource_id }}',
'{{ region }}',
'{{ Authentication }}',
'{{ versionid }}'
;

DELETE examples

Deletes custom metadata from the specified resource.

DELETE FROM aws.workdocs.resources
WHERE resource_id = '{{ resource_id }}' --required
AND region = '{{ region }}' --required
AND Authentication = '{{ Authentication }}'
AND versionId = '{{ versionId }}'
AND keys = '{{ keys }}'
AND deleteAll = '{{ deleteAll }}'
;

Lifecycle Methods

Deletes the specified list of labels from a resource.

EXEC aws.workdocs.resources.delete_labels
@resource_id='{{ resource_id }}' --required,
@region='{{ region }}' --required,
@Authentication='{{ Authentication }}',
@labels='{{ labels }}',
@deleteAll={{ deleteAll }}
;