Skip to main content

users

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

Overview

Nameusers
TypeResource
Idaws.wickr.users

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
first_namestringThe first name of the user. (pattern: <code>[\S\s]*</code>)
is_adminbooleanIndicates whether the user has administrator privileges in the network.
last_activityintegerThe timestamp of the user's last activity in the network, specified in epoch seconds.
last_loginintegerThe timestamp of the user's last login to the network, specified in epoch seconds.
last_namestringThe last name of the user. (pattern: <code>[\S\s]*</code>)
security_group_idsarrayA list of security group IDs to which the user belongs.
statusintegerThe current status of the user (1 for pending, 2 for active).
suspendedbooleanIndicates whether the user is currently suspended.
user_idstringThe unique identifier of the user. (pattern: <code>[0-9]+</code>)
usernamestringThe email address or username of the user. (pattern: <code>[\S\s]*</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_userselectnetwork_id, user_id, regionstartTime, endTimeRetrieves detailed information about a specific user in a Wickr network, including their profile, status, and activity history.
list_usersselectnetwork_id, regionnextToken, maxResults, sortFields, sortDirection, firstName, lastName, username, status, groupIdRetrieves a paginated list of users in a specified Wickr network. You can filter and sort the results based on various criteria such as name, status, or security group membership.
update_userupdatenetwork_id, region, userIdUpdates the properties of an existing user in a Wickr network. This operation allows you to modify the user's name, password, security group membership, and invite code settings. codeValidation, inviteCode, and inviteCodeTtl are restricted to networks under preview only.

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
network_idstringThe ID of the Wickr network containing the user to update.
regionstringAWS region (default: us-east-1)
user_idstringThe unique identifier of the user to retrieve.
endTimestring (date-time)The end time for filtering the user's last activity. Only activity before this timestamp will be considered. Time is specified in epoch seconds.
firstNamestringFilter results to only include users with first names matching this value.
groupIdstringFilter results to only include users belonging to this security group.
lastNamestringFilter results to only include users with last names matching this value.
maxResultsintegerThe maximum number of users to return in a single page. Valid range is 1-100. Default is 10.
nextTokenstringThe token for retrieving the next page of results. This is returned from a previous request when there are more results available.
sortDirectionstringThe direction to sort results. Valid values are 'ASC' (ascending) or 'DESC' (descending). Default is 'DESC'.
sortFieldsstringThe fields to sort users by. Multiple fields can be specified by separating them with '+'. Accepted values include 'username', 'firstName', 'lastName', 'status', and 'groupId'.
startTimestring (date-time)The start time for filtering the user's last activity. Only activity after this timestamp will be considered. Time is specified in epoch seconds.
statusintegerFilter results to only include users with this status (1 for pending, 2 for active).
usernamestringFilter results to only include users with usernames matching this value.

SELECT examples

Retrieves detailed information about a specific user in a Wickr network, including their profile, status, and activity history.

SELECT
first_name,
is_admin,
last_activity,
last_login,
last_name,
security_group_ids,
status,
suspended,
user_id,
username
FROM aws.wickr.users
WHERE network_id = '{{ network_id }}' -- required
AND user_id = '{{ user_id }}' -- required
AND region = '{{ region }}' -- required
AND startTime = '{{ startTime }}'
AND endTime = '{{ endTime }}'
;

UPDATE examples

Updates the properties of an existing user in a Wickr network. This operation allows you to modify the user's name, password, security group membership, and invite code settings. codeValidation, inviteCode, and inviteCodeTtl are restricted to networks under preview only.

UPDATE aws.wickr.users
SET
userId = '{{ userId }}',
userDetails = '{{ userDetails }}'
WHERE
network_id = '{{ network_id }}' --required
AND region = '{{ region }}' --required
AND userId = '{{ userId }}' --required
RETURNING
code_validation,
first_name,
invite_code,
invite_expiration,
last_name,
middle_name,
modified,
network_id,
security_group_ids,
status,
suspended,
user_id;