Skip to main content

resource_permissions

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

Overview

Nameresource_permissions
TypeResource
Idaws.workdocs.resource_permissions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the resource. (pattern: <code>[&\w+-.@]+</code>)
rolesarrayThe permission information for the resource.
typestringThe type of resource. (USER, GROUP, INVITE, ANONYMOUS, ORGANIZATION)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_resource_permissionsselectresource_id, regionAuthentication, principalId, limit, markerDescribes the permissions of a specified resource.
add_resource_permissionsupdateresource_id, region, PrincipalsAuthenticationCreates a set of permissions for the specified folder or document. The resource permissions are overwritten if the principals already have different permissions.
remove_resource_permissionupdateresource_id, principal_id, regionAuthentication, typeRemoves the permission for the specified principal from the specified resource.
remove_all_resource_permissionsupdateresource_id, regionAuthenticationRemoves all the permissions from the specified resource.

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
principal_idstringThe principal ID of the resource.
regionstringAWS region (default: us-east-1)
resource_idstringThe ID of the resource.
AuthenticationstringAmazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.
limitintegerThe maximum number of items to return with this call.
markerstringThe marker for the next set of results. (You received this marker from a previous call)
principalIdstringThe ID of the principal to filter permissions by.
typestringThe principal type of the resource.

SELECT examples

Describes the permissions of a specified resource.

SELECT
id,
roles,
type
FROM aws.workdocs.resource_permissions
WHERE resource_id = '{{ resource_id }}' -- required
AND region = '{{ region }}' -- required
AND Authentication = '{{ Authentication }}'
AND principalId = '{{ principalId }}'
AND limit = '{{ limit }}'
AND marker = '{{ marker }}'
;

UPDATE examples

Creates a set of permissions for the specified folder or document. The resource permissions are overwritten if the principals already have different permissions.

UPDATE aws.workdocs.resource_permissions
SET
Principals = '{{ Principals }}',
NotificationOptions = '{{ NotificationOptions }}'
WHERE
resource_id = '{{ resource_id }}' --required
AND region = '{{ region }}' --required
AND Principals = '{{ Principals }}' --required
AND Authentication = '{{ Authentication}}'
RETURNING
share_results;