Skip to content

aws.workdocs.search_resources

Example SQL Queries

SELECT * FROM
aws.workdocs.search_resources;

Description

Searches metadata and the content of folders, documents, document versions, and comments.

Table Definition

Column NameColumn Data Type
additional_response_fields Input Column

A list of attributes to include in the response. Used to request fields that are not normally returned in a standard response.

VARCHAR[]
Show child fields
additional_response_fields[]
authentication_token Input Column

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

VARCHAR
filters Input Column

Filters results based on entity metadata.

STRUCT(
"text_locales" VARCHAR[],
"content_categories" VARCHAR[],
"resource_types" VARCHAR[],
"labels" VARCHAR[],
"principals" STRUCT(
"id" VARCHAR,
"roles" VARCHAR[]
)[],
"ancestor_ids" VARCHAR[],
"search_collection_types" VARCHAR[],
"size_range" STRUCT(
"start_value" BIGINT,
"end_value" BIGINT
),
"created_range" STRUCT(
"start_value" TIMESTAMP_S,
"end_value" TIMESTAMP_S
),
"modified_range" STRUCT(
"start_value" TIMESTAMP_S,
"end_value" TIMESTAMP_S
)
)
Show child fields
filters.ancestor_ids[]
filters.content_categories[]
filters.created_range

Filter based on resource’s creation timestamp.

Show child fields
filters.created_range.end_value

Timestamp range end value (in epochs).

filters.created_range.start_value

Timestamp range start value (in epochs)

filters.labels[]
filters.modified_range

Filter based on resource’s modified timestamp.

Show child fields
filters.modified_range.end_value

Timestamp range end value (in epochs).

filters.modified_range.start_value

Timestamp range start value (in epochs)

filters.principals[]
Show child fields
filters.principals[].id

UserIds or GroupIds.

filters.principals[].roles[]
filters.resource_types[]
filters.search_collection_types[]
filters.size_range

Filter based on size (in bytes).

Show child fields
filters.size_range.end_value

The size end range (in bytes).

filters.size_range.start_value

The size start range (in bytes).

filters.text_locales[]
order_by Input Column

Order by results in one or more categories.

STRUCT(
"field" VARCHAR,
"order" VARCHAR
)[]
Show child fields
order_by[]
Show child fields
order_by[].field

Sort search results based on this field name.

order_by[].order

Sort direction.

organization_id Input Column

Filters based on the resource owner OrgId. This is a mandatory parameter when using Admin SigV4 credentials.

VARCHAR
query_scopes Input Column

Filter based on the text field type. A Folder has only a name and no content. A Comment has only content and no name. A Document or Document Version has a name and content

VARCHAR[]
Show child fields
query_scopes[]
query_text Input Column

The String to search for. Searches across different text fields based on request parameters. Use double quotes around the query string for exact phrase matches.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
comment_metadata

The comment that matches the query.

STRUCT(
"comment_id" VARCHAR,
"contributor" STRUCT(
"id" VARCHAR,
"username" VARCHAR,
"email_address" VARCHAR,
"given_name" VARCHAR,
"surname" VARCHAR,
"organization_id" VARCHAR,
"root_folder_id" VARCHAR,
"recycle_bin_folder_id" VARCHAR,
"status" VARCHAR,
"type" VARCHAR,
"created_timestamp" TIMESTAMP_S,
"modified_timestamp" TIMESTAMP_S,
"time_zone_id" VARCHAR,
"locale" VARCHAR,
"storage" STRUCT(
"storage_utilized_in_bytes" BIGINT,
"storage_rule" STRUCT(
"storage_allocated_in_bytes" BIGINT,
"storage_type" VARCHAR
)
)
),
"created_timestamp" TIMESTAMP_S,
"comment_status" VARCHAR,
"recipient_id" VARCHAR,
"contributor_id" VARCHAR
)
Show child fields
comment_metadata.comment_id

The ID of the comment.

comment_metadata.comment_status

The status of the comment.

comment_metadata.contributor

The user who made the comment.

Show child fields
comment_metadata.contributor.created_timestamp

The time when the user was created.

comment_metadata.contributor.email_address

The email address of the user.

comment_metadata.contributor.given_name

The given name of the user.

comment_metadata.contributor.id

The ID of the user.

comment_metadata.contributor.locale

The locale of the user.

comment_metadata.contributor.modified_timestamp

The time when the user was modified.

comment_metadata.contributor.organization_id

The ID of the organization.

comment_metadata.contributor.recycle_bin_folder_id

The ID of the recycle bin folder.

comment_metadata.contributor.root_folder_id

The ID of the root folder.

comment_metadata.contributor.status

The status of the user.

comment_metadata.contributor.storage

The storage for the user.

Show child fields
comment_metadata.contributor.storage.storage_rule

The storage for a user.

Show child fields
comment_metadata.contributor.storage.storage_rule.storage_allocated_in_bytes

The amount of storage allocated, in bytes.

comment_metadata.contributor.storage.storage_rule.storage_type

The type of storage.

comment_metadata.contributor.storage.storage_utilized_in_bytes

The amount of storage used, in bytes.

comment_metadata.contributor.surname

The surname of the user.

comment_metadata.contributor.time_zone_id

The time zone ID of the user.

comment_metadata.contributor.type

The type of user.

comment_metadata.contributor.username

The login name of the user.

comment_metadata.contributor_id

The ID of the user who made the comment.

comment_metadata.created_timestamp

The timestamp that the comment was created.

comment_metadata.recipient_id

The ID of the user being replied to.

document_metadata

The document that matches the query.

STRUCT(
"id" VARCHAR,
"creator_id" VARCHAR,
"parent_folder_id" VARCHAR,
"created_timestamp" TIMESTAMP_S,
"modified_timestamp" TIMESTAMP_S,
"latest_version_metadata" STRUCT(
"id" VARCHAR,
"name" VARCHAR,
"content_type" VARCHAR,
"size" BIGINT,
"signature" VARCHAR,
"status" VARCHAR,
"created_timestamp" TIMESTAMP_S,
"modified_timestamp" TIMESTAMP_S,
"content_created_timestamp" TIMESTAMP_S,
"content_modified_timestamp" TIMESTAMP_S,
"creator_id" VARCHAR,
"thumbnail" MAP(VARCHAR, VARCHAR),
"source" MAP(VARCHAR, VARCHAR)
),
"resource_state" VARCHAR,
"labels" VARCHAR[]
)
Show child fields
document_metadata.created_timestamp

The time when the document was created.

document_metadata.creator_id

The ID of the creator.

document_metadata.id

The ID of the document.

document_metadata.labels[]
document_metadata.latest_version_metadata

The latest version of the document.

Show child fields
document_metadata.latest_version_metadata.content_created_timestamp

The timestamp when the content of the document was originally created.

document_metadata.latest_version_metadata.content_modified_timestamp

The timestamp when the content of the document was modified.

document_metadata.latest_version_metadata.content_type

The content type of the document.

document_metadata.latest_version_metadata.created_timestamp

The timestamp when the document was first uploaded.

document_metadata.latest_version_metadata.creator_id

The ID of the creator.

document_metadata.latest_version_metadata.id

The ID of the version.

document_metadata.latest_version_metadata.modified_timestamp

The timestamp when the document was last uploaded.

document_metadata.latest_version_metadata.name

The name of the version.

document_metadata.latest_version_metadata.signature

The signature of the document.

document_metadata.latest_version_metadata.size

The size of the document, in bytes.

document_metadata.latest_version_metadata.source

The source of the document.

document_metadata.latest_version_metadata.status

The status of the document.

document_metadata.latest_version_metadata.thumbnail

The thumbnail of the document.

document_metadata.modified_timestamp

The time when the document was updated.

document_metadata.parent_folder_id

The ID of the parent folder.

document_metadata.resource_state

The resource state.

document_version_metadata

The document version that matches the metadata.

STRUCT(
"id" VARCHAR,
"name" VARCHAR,
"content_type" VARCHAR,
"size" BIGINT,
"signature" VARCHAR,
"status" VARCHAR,
"created_timestamp" TIMESTAMP_S,
"modified_timestamp" TIMESTAMP_S,
"content_created_timestamp" TIMESTAMP_S,
"content_modified_timestamp" TIMESTAMP_S,
"creator_id" VARCHAR,
"thumbnail" MAP(VARCHAR, VARCHAR),
"source" MAP(VARCHAR, VARCHAR)
)
Show child fields
document_version_metadata.content_created_timestamp

The timestamp when the content of the document was originally created.

document_version_metadata.content_modified_timestamp

The timestamp when the content of the document was modified.

document_version_metadata.content_type

The content type of the document.

document_version_metadata.created_timestamp

The timestamp when the document was first uploaded.

document_version_metadata.creator_id

The ID of the creator.

document_version_metadata.id

The ID of the version.

document_version_metadata.modified_timestamp

The timestamp when the document was last uploaded.

document_version_metadata.name

The name of the version.

document_version_metadata.signature

The signature of the document.

document_version_metadata.size

The size of the document, in bytes.

document_version_metadata.source

The source of the document.

document_version_metadata.status

The status of the document.

document_version_metadata.thumbnail

The thumbnail of the document.

folder_metadata

The folder that matches the query.

STRUCT(
"id" VARCHAR,
"name" VARCHAR,
"creator_id" VARCHAR,
"parent_folder_id" VARCHAR,
"created_timestamp" TIMESTAMP_S,
"modified_timestamp" TIMESTAMP_S,
"resource_state" VARCHAR,
"signature" VARCHAR,
"labels" VARCHAR[],
"size" BIGINT,
"latest_version_size" BIGINT
)
Show child fields
folder_metadata.created_timestamp

The time when the folder was created.

folder_metadata.creator_id

The ID of the creator.

folder_metadata.id

The ID of the folder.

folder_metadata.labels[]
folder_metadata.latest_version_size

The size of the latest version of the folder metadata.

folder_metadata.modified_timestamp

The time when the folder was updated.

folder_metadata.name

The name of the folder.

folder_metadata.parent_folder_id

The ID of the parent folder.

folder_metadata.resource_state

The resource state of the folder.

folder_metadata.signature

The unique identifier created from the subfolders and documents of the folder.

folder_metadata.size

The size of the folder metadata.

resource_type

The type of item being returned.

VARCHAR
web_url

The webUrl of the item being returned.

VARCHAR