resources
Creates, updates, deletes, gets or lists a resources resource.
Overview
| Name | resources |
| Type | Resource |
| Id | aws.workdocs.resources |
Fields
The following fields are returned by SELECT queries:
- get_resources
| Name | Datatype | Description |
|---|---|---|
documents | array | The documents in the specified collection. |
folders | array | The folders in the specified folder. |
marker | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_resources | select | region | Authentication, userId, collectionType, limit, marker | Retrieves a collection of resources, including folders and documents. The only CollectionType supported is SHARED_WITH_ME. |
create_custom_metadata | insert | resource_id, region, CustomMetadata | Authentication, versionid | Adds one or more custom properties to the specified resource (a folder, document, or version). |
create_labels | insert | resource_id, region, Labels | Authentication | Adds the specified list of labels to the given resource (a document or folder) |
delete_custom_metadata | delete | resource_id, region | Authentication, versionId, keys, deleteAll | Deletes custom metadata from the specified resource. |
delete_labels | exec | resource_id, region | Authentication, labels, deleteAll | Deletes the specified list of labels from a resource. |
search_resources | exec | region | Authentication | Searches 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
resource_id | string | The ID of the resource. |
Authentication | string | WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API. |
collectionType | string | The collection type. |
deleteAll | boolean | Flag to request removal of all labels from the specified resource. |
keys | array | List of properties to remove. |
labels | array | List of labels to delete from the resource. |
limit | integer | The maximum number of resources to return. |
marker | string | The marker for the next set of results. This marker was received from a previous call. |
userId | string | The user ID for the resource collection. This is a required field for accessing the API operation using IAM credentials. |
versionId | string | The ID of the version, if the custom metadata is being deleted from a document version. |
versionid | string | The ID of the version, if the custom metadata is being added to a document version. |
SELECT examples
- get_resources
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
- create_custom_metadata
- create_labels
- Manifest
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 }}'
;
Adds the specified list of labels to the given resource (a document or folder)
INSERT INTO aws.workdocs.resources (
Labels,
resource_id,
region,
Authentication
)
SELECT
'{{ Labels }}' /* required */,
'{{ resource_id }}',
'{{ region }}',
'{{ Authentication }}'
;
# Description fields are for documentation purposes
- name: resources
props:
- name: resource_id
value: "{{ resource_id }}"
description: Required parameter for the resources resource.
- name: region
value: "{{ region }}"
description: Required parameter for the resources resource.
- name: CustomMetadata
value: "{{ CustomMetadata }}"
- name: Labels
value:
- "{{ Labels }}"
- 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.
- name: versionid
value: "{{ versionid }}"
description: The ID of the version, if the custom metadata is being added to a document version.
description: The ID of the version, if the custom metadata is being added to a document version.
DELETE examples
- delete_custom_metadata
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
- delete_labels
- search_resources
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 }}
;
Searches metadata and the content of folders, documents, document versions, and comments.
EXEC aws.workdocs.resources.search_resources
@region='{{ region }}' --required,
@Authentication='{{ Authentication }}'
@@json=
'{
"QueryText": "{{ QueryText }}",
"QueryScopes": "{{ QueryScopes }}",
"OrganizationId": "{{ OrganizationId }}",
"AdditionalResponseFields": "{{ AdditionalResponseFields }}",
"Filters": "{{ Filters }}",
"OrderBy": "{{ OrderBy }}",
"Limit": {{ Limit }},
"Marker": "{{ Marker }}"
}'
;