users
Creates, updates, deletes, gets or lists a users resource.
Overview
| Name | users |
| Type | Resource |
| Id | aws.workdocs.users |
Fields
The following fields are returned by SELECT queries:
- describe_users
| Name | Datatype | Description |
|---|---|---|
created_timestamp | string (date-time) | The time when the user was created. |
email_address | string | The email address of the user. (pattern: <code>[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}</code>) |
given_name | string | The given name of the user. |
id | string | The ID of the user. (pattern: <code>[&\w+-.@]+</code>) |
locale | string | The locale of the user. (en, fr, ko, de, es, ja, ru, zh_CN, zh_TW, pt_BR, default) |
modified_timestamp | string (date-time) | The time when the user was modified. |
organization_id | string | The ID of the organization. (pattern: <code>[&\w+-.@]+</code>) |
recycle_bin_folder_id | string | The ID of the recycle bin folder. (pattern: <code>[\w+-.@]+</code>) |
root_folder_id | string | The ID of the root folder. (pattern: <code>[\w+-.@]+</code>) |
status | string | The status of the user. (ACTIVE, INACTIVE, PENDING) |
storage | object | The storage for the user. |
surname | string | The surname of the user. |
time_zone_id | string | The time zone ID of the user. |
type | string | The type of user. (USER, ADMIN, POWERUSER, MINIMALUSER, WORKSPACESUSER) |
username | string | The login name of the user. (pattern: <code>[\w-+.]+(@[a-zA-Z0-9.-]+.[a-zA-Z]+)?</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_users | select | region | Authentication, organizationId, userIds, query, include, order, sort, marker, limit, fields | Describes the specified users. You can describe all users or filter the results (for example, by status or organization). By default, Amazon WorkDocs returns the first 24 active or pending users. If there are more results, the response includes a marker that you can use to request the next set of results. |
create_user | insert | region, GivenName, Password | Authentication | Creates a user in a Simple AD or Microsoft AD directory. The status of a newly created user is "ACTIVE". New users can access Amazon WorkDocs. |
update_user | update | user_id, region | Authentication | Updates the specified attributes of the specified user, and grants or revokes administrative privileges to the Amazon WorkDocs site. |
delete_user | delete | user_id, region | Authentication | Deletes the specified user from a Simple AD or Microsoft AD directory. Deleting a user immediately and permanently deletes all content in that user's folder structure. Site retention policies do NOT apply to this type of deletion. |
activate_user | exec | user_id, region | Authentication | Activates the specified user. Only active users can access Amazon WorkDocs. |
deactivate_user | exec | user_id, region | Authentication | Deactivates the specified user, which revokes the user's access to Amazon WorkDocs. |
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) |
user_id | string | The ID of the user. |
Authentication | string | Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API. |
fields | string | A comma-separated list of values. Specify "STORAGE_METADATA" to include the user storage quota and utilization information. |
include | string | The state of the users. Specify "ALL" to include inactive users. |
limit | integer | The maximum number of items to return. |
marker | string | The marker for the next set of results. (You received this marker from a previous call.) |
order | string | The order for the results. |
organizationId | string | The ID of the organization. |
query | string | A query to filter users by user name. Remember the following about the Userids and Query parameters: If you don't use either parameter, the API returns a paginated list of all users on the site. If you use both parameters, the API ignores the Query parameter. The Userid parameter only returns user names that match a corresponding user ID. The Query parameter runs a "prefix" search for users by the GivenName, SurName, or UserName fields included in a CreateUser API call. For example, querying on Ma returns Márcia Oliveira, María García, and Mateo Jackson. If you use multiple characters, the API only returns data that matches all characters. For example, querying on Ma J only returns Mateo Jackson. |
sort | string | The sorting criteria. |
userIds | string | The IDs of the users. |
SELECT examples
- describe_users
Describes the specified users. You can describe all users or filter the results (for example, by status or organization). By default, Amazon WorkDocs returns the first 24 active or pending users. If there are more results, the response includes a marker that you can use to request the next set of results.
SELECT
created_timestamp,
email_address,
given_name,
id,
locale,
modified_timestamp,
organization_id,
recycle_bin_folder_id,
root_folder_id,
status,
storage,
surname,
time_zone_id,
type,
username
FROM aws.workdocs.users
WHERE region = '{{ region }}' -- required
AND Authentication = '{{ Authentication }}'
AND organizationId = '{{ organizationId }}'
AND userIds = '{{ userIds }}'
AND query = '{{ query }}'
AND include = '{{ include }}'
AND order = '{{ order }}'
AND sort = '{{ sort }}'
AND marker = '{{ marker }}'
AND limit = '{{ limit }}'
AND fields = '{{ fields }}'
;
INSERT examples
- create_user
- Manifest
Creates a user in a Simple AD or Microsoft AD directory. The status of a newly created user is "ACTIVE". New users can access Amazon WorkDocs.
INSERT INTO aws.workdocs.users (
OrganizationId,
Username,
EmailAddress,
GivenName,
Surname,
Password,
TimeZoneId,
StorageRule,
region,
Authentication
)
SELECT
'{{ OrganizationId }}',
'{{ Username }}',
'{{ EmailAddress }}',
'{{ GivenName }}' /* required */,
'{{ Surname }}',
'{{ Password }}' /* required */,
'{{ TimeZoneId }}',
'{{ StorageRule }}',
'{{ region }}',
'{{ Authentication }}'
RETURNING
user
;
# Description fields are for documentation purposes
- name: users
props:
- name: region
value: "{{ region }}"
description: Required parameter for the users resource.
- name: OrganizationId
value: "{{ OrganizationId }}"
- name: Username
value: "{{ Username }}"
- name: EmailAddress
value: "{{ EmailAddress }}"
- name: GivenName
value: "{{ GivenName }}"
- name: Surname
value: "{{ Surname }}"
- name: Password
value: "{{ Password }}"
- name: TimeZoneId
value: "{{ TimeZoneId }}"
- name: StorageRule
description: |
Describes the storage for a user.
value:
StorageAllocatedInBytes: {{ StorageAllocatedInBytes }}
StorageType: "{{ StorageType }}"
- 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.
UPDATE examples
- update_user
Updates the specified attributes of the specified user, and grants or revokes administrative privileges to the Amazon WorkDocs site.
UPDATE aws.workdocs.users
SET
GivenName = '{{ GivenName }}',
Surname = '{{ Surname }}',
Type = '{{ Type }}',
StorageRule = '{{ StorageRule }}',
TimeZoneId = '{{ TimeZoneId }}',
Locale = '{{ Locale }}',
GrantPoweruserPrivileges = '{{ GrantPoweruserPrivileges }}'
WHERE
user_id = '{{ user_id }}' --required
AND region = '{{ region }}' --required
AND Authentication = '{{ Authentication}}'
RETURNING
user;
DELETE examples
- delete_user
Deletes the specified user from a Simple AD or Microsoft AD directory. Deleting a user immediately and permanently deletes all content in that user's folder structure. Site retention policies do NOT apply to this type of deletion.
DELETE FROM aws.workdocs.users
WHERE user_id = '{{ user_id }}' --required
AND region = '{{ region }}' --required
AND Authentication = '{{ Authentication }}'
;
Lifecycle Methods
- activate_user
- deactivate_user
Activates the specified user. Only active users can access Amazon WorkDocs.
EXEC aws.workdocs.users.activate_user
@user_id='{{ user_id }}' --required,
@region='{{ region }}' --required,
@Authentication='{{ Authentication }}'
;
Deactivates the specified user, which revokes the user's access to Amazon WorkDocs.
EXEC aws.workdocs.users.deactivate_user
@user_id='{{ user_id }}' --required,
@region='{{ region }}' --required,
@Authentication='{{ Authentication }}'
;