resource_permissions
Creates, updates, deletes, gets or lists a resource_permissions resource.
Overview
| Name | resource_permissions |
| Type | Resource |
| Id | aws.workdocs.resource_permissions |
Fields
The following fields are returned by SELECT queries:
- describe_resource_permissions
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the resource. (pattern: <code>[&\w+-.@]+</code>) |
roles | array | The permission information for the resource. |
type | string | The type of resource. (USER, GROUP, INVITE, ANONYMOUS, ORGANIZATION) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_resource_permissions | select | resource_id, region | Authentication, principalId, limit, marker | Describes the permissions of a specified resource. |
add_resource_permissions | update | resource_id, region, Principals | Authentication | Creates a set of permissions for the specified folder or document. The resource permissions are overwritten if the principals already have different permissions. |
remove_resource_permission | update | resource_id, principal_id, region | Authentication, type | Removes the permission for the specified principal from the specified resource. |
remove_all_resource_permissions | update | resource_id, region | Authentication | Removes 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.
| Name | Datatype | Description |
|---|---|---|
principal_id | string | The principal ID of the resource. |
region | string | AWS region (default: us-east-1) |
resource_id | string | The ID of the resource. |
Authentication | string | Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API. |
limit | integer | The maximum number of items to return with this call. |
marker | string | The marker for the next set of results. (You received this marker from a previous call) |
principalId | string | The ID of the principal to filter permissions by. |
type | string | The principal type of the resource. |
SELECT examples
- describe_resource_permissions
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
- add_resource_permissions
- remove_resource_permission
- remove_all_resource_permissions
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;
Removes the permission for the specified principal from the specified resource.
UPDATE aws.workdocs.resource_permissions
SET
-- No updatable properties
WHERE
resource_id = '{{ resource_id }}' --required
AND principal_id = '{{ principal_id }}' --required
AND region = '{{ region }}' --required
AND Authentication = '{{ Authentication}}'
AND type = '{{ type}}';
Removes all the permissions from the specified resource.
UPDATE aws.workdocs.resource_permissions
SET
-- No updatable properties
WHERE
resource_id = '{{ resource_id }}' --required
AND region = '{{ region }}' --required
AND Authentication = '{{ Authentication}}';