Skip to main content

users

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

Overview

Nameusers
TypeResource
Idaws.workdocs.users

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_timestampstring (date-time)The time when the user was created.
email_addressstringThe email address of the user. (pattern: <code>[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}</code>)
given_namestringThe given name of the user.
idstringThe ID of the user. (pattern: <code>[&\w+-.@]+</code>)
localestringThe locale of the user. (en, fr, ko, de, es, ja, ru, zh_CN, zh_TW, pt_BR, default)
modified_timestampstring (date-time)The time when the user was modified.
organization_idstringThe ID of the organization. (pattern: <code>[&\w+-.@]+</code>)
recycle_bin_folder_idstringThe ID of the recycle bin folder. (pattern: <code>[\w+-.@]+</code>)
root_folder_idstringThe ID of the root folder. (pattern: <code>[\w+-.@]+</code>)
statusstringThe status of the user. (ACTIVE, INACTIVE, PENDING)
storageobjectThe storage for the user.
surnamestringThe surname of the user.
time_zone_idstringThe time zone ID of the user.
typestringThe type of user. (USER, ADMIN, POWERUSER, MINIMALUSER, WORKSPACESUSER)
usernamestringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_usersselectregionAuthentication, organizationId, userIds, query, include, order, sort, marker, limit, fieldsDescribes 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_userinsertregion, GivenName, PasswordAuthenticationCreates 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_userupdateuser_id, regionAuthenticationUpdates the specified attributes of the specified user, and grants or revokes administrative privileges to the Amazon WorkDocs site.
delete_userdeleteuser_id, regionAuthenticationDeletes 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_userexecuser_id, regionAuthenticationActivates the specified user. Only active users can access Amazon WorkDocs.
deactivate_userexecuser_id, regionAuthenticationDeactivates 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
user_idstringThe ID of the user.
AuthenticationstringAmazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.
fieldsstringA comma-separated list of values. Specify "STORAGE_METADATA" to include the user storage quota and utilization information.
includestringThe state of the users. Specify "ALL" to include inactive users.
limitintegerThe maximum number of items to return.
markerstringThe marker for the next set of results. (You received this marker from a previous call.)
orderstringThe order for the results.
organizationIdstringThe ID of the organization.
querystringA 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.
sortstringThe sorting criteria.
userIdsstringThe IDs of the users.

SELECT examples

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

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
;

UPDATE examples

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

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

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 }}'
;