users
Creates, updates, deletes, gets or lists a users resource.
Overview
| Name | users |
| Type | Resource |
| Id | aws.wickr.users |
Fields
The following fields are returned by SELECT queries:
- get_user
- list_users
| Name | Datatype | Description |
|---|---|---|
first_name | string | The first name of the user. (pattern: <code>[\S\s]*</code>) |
is_admin | boolean | Indicates whether the user has administrator privileges in the network. |
last_activity | integer | The timestamp of the user's last activity in the network, specified in epoch seconds. |
last_login | integer | The timestamp of the user's last login to the network, specified in epoch seconds. |
last_name | string | The last name of the user. (pattern: <code>[\S\s]*</code>) |
security_group_ids | array | A list of security group IDs to which the user belongs. |
status | integer | The current status of the user (1 for pending, 2 for active). |
suspended | boolean | Indicates whether the user is currently suspended. |
user_id | string | The unique identifier of the user. (pattern: <code>[0-9]+</code>) |
username | string | The email address or username of the user. (pattern: <code>[\S\s]*</code>) |
| Name | Datatype | Description |
|---|---|---|
cell | string | The phone number minus country code, used for cloud deployments. (pattern: <code>[\S\s]*</code>) |
challenge_failures | integer | The number of failed password attempts for enterprise deployments, used for account lockout policies. |
code_validation | boolean | Indicates whether the user can be verified through a custom invite code. |
country_code | string | The country code for the user's phone number, used for cloud deployments. (pattern: <code>[\S\s]*</code>) |
first_name | string | The first name of the user. (pattern: <code>[\S\s]*</code>) |
invite_code | string | The invitation code for this user, used during registration to join the network. (pattern: <code>[\S\s]*</code>) |
is_admin | boolean | Indicates whether the user has administrator privileges in the network. |
is_invite_expired | boolean | Indicates whether the user's email invitation code has expired, applicable to cloud deployments. |
is_user | boolean | Indicates whether this account is a user (as opposed to a bot or other account type). |
last_name | string | The last name of the user. (pattern: <code>[\S\s]*</code>) |
otp_enabled | boolean | Indicates whether one-time password (OTP) authentication is enabled for the user. |
scim_id | string | The SCIM (System for Cross-domain Identity Management) identifier for the user, used for identity synchronization. Currently not used. (pattern: <code>[\S\s]*</code>) |
security_groups | array | A list of security group IDs to which the user is assigned, determining their permissions and feature access. |
status | integer | The current status of the user (1 for pending invitation, 2 for active). |
suspended | boolean | Indicates whether the user is currently suspended and unable to access the network. |
type_ | string | The descriptive type of the user account (e.g., 'user'). (pattern: <code>[\S\s]*</code>) |
uname | string | The unique identifier for the user. (pattern: <code>[\S\s]*</code>) |
user_id | string | The unique identifier for the user within the network. (pattern: <code>[0-9]+</code>) |
username | string | The email address or username of the user. For bots, this must end in 'bot'. (pattern: <code>[\S\s]*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_user | select | network_id, user_id, region | startTime, endTime | Retrieves detailed information about a specific user in a Wickr network, including their profile, status, and activity history. |
list_users | select | network_id, region | nextToken, maxResults, sortFields, sortDirection, firstName, lastName, username, status, groupId | Retrieves 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_user | update | network_id, region, userId | 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. |
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 |
|---|---|---|
network_id | string | The ID of the Wickr network containing the user to update. |
region | string | AWS region (default: us-east-1) |
user_id | string | The unique identifier of the user to retrieve. |
endTime | string (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. |
firstName | string | Filter results to only include users with first names matching this value. |
groupId | string | Filter results to only include users belonging to this security group. |
lastName | string | Filter results to only include users with last names matching this value. |
maxResults | integer | The maximum number of users to return in a single page. Valid range is 1-100. Default is 10. |
nextToken | string | The token for retrieving the next page of results. This is returned from a previous request when there are more results available. |
sortDirection | string | The direction to sort results. Valid values are 'ASC' (ascending) or 'DESC' (descending). Default is 'DESC'. |
sortFields | string | The fields to sort users by. Multiple fields can be specified by separating them with '+'. Accepted values include 'username', 'firstName', 'lastName', 'status', and 'groupId'. |
startTime | string (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. |
status | integer | Filter results to only include users with this status (1 for pending, 2 for active). |
username | string | Filter results to only include users with usernames matching this value. |
SELECT examples
- get_user
- list_users
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 }}'
;
Retrieves 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.
SELECT
cell,
challenge_failures,
code_validation,
country_code,
first_name,
invite_code,
is_admin,
is_invite_expired,
is_user,
last_name,
otp_enabled,
scim_id,
security_groups,
status,
suspended,
type_,
uname,
user_id,
username
FROM aws.wickr.users
WHERE network_id = '{{ network_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
AND sortFields = '{{ sortFields }}'
AND sortDirection = '{{ sortDirection }}'
AND firstName = '{{ firstName }}'
AND lastName = '{{ lastName }}'
AND username = '{{ username }}'
AND status = '{{ status }}'
AND groupId = '{{ groupId }}'
;
UPDATE examples
- update_user
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;