Skip to main content

users

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

Overview

Nameusers
TypeResource
Idaws.appstream.users

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe ARN of the user. (pattern: <code>^arn:aws(?:-cn|-iso-b|-iso|-us-gov)?:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.\-]{0,1023}$</code>)
authentication_typestringThe authentication type for the user. (API, SAML, USERPOOL, AWS_AD)
created_timestring (date-time)The date and time the user was created in the user pool.
enabledbooleanSpecifies whether the user in the user pool is enabled.
first_namestringThe first name, or given name, of the user. (pattern: <code>^[A-Za-z0-9_-\s]+$</code>)
last_namestringThe last name, or surname, of the user. (pattern: <code>^[A-Za-z0-9_-\s]+$</code>)
statusstringThe status of the user in the user pool. The status can be one of the following: UNCONFIRMED – The user is created but not confirmed. CONFIRMED – The user is confirmed. ARCHIVED – The user is no longer active. COMPROMISED – The user is disabled because of a potential security threat. UNKNOWN – The user status is not known.
user_namestringThe email address of the user. Users' email addresses are case-sensitive. (pattern: <code>[\p{L}\p{M}\p{S}\p{N}\p{P}]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_usersselectregionRetrieves a list that describes one or more specified users in the user pool.
create_userinsertregion, UserName, AuthenticationTypeCreates a new user in the user pool.
delete_userdeleteregionDeletes a user from the user pool.
disable_userexecregion, UserName, AuthenticationTypeDisables the specified user in the user pool. Users can't sign in to WorkSpaces Applications until they are re-enabled. This action does not delete the user.
enable_userexecregion, UserName, AuthenticationTypeEnables a user in the user pool. After being enabled, users can sign in to WorkSpaces Applications and open applications from the stacks to which they are assigned.

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)

SELECT examples

Retrieves a list that describes one or more specified users in the user pool.

SELECT
arn,
authentication_type,
created_time,
enabled,
first_name,
last_name,
status,
user_name
FROM aws.appstream.users
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new user in the user pool.

INSERT INTO aws.appstream.users (
UserName,
MessageAction,
FirstName,
LastName,
AuthenticationType,
region
)
SELECT
'{{ UserName }}' /* required */,
'{{ MessageAction }}',
'{{ FirstName }}',
'{{ LastName }}',
'{{ AuthenticationType }}' /* required */,
'{{ region }}'
;

DELETE examples

Deletes a user from the user pool.

DELETE FROM aws.appstream.users
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Disables the specified user in the user pool. Users can't sign in to WorkSpaces Applications until they are re-enabled. This action does not delete the user.

EXEC aws.appstream.users.disable_user
@region='{{ region }}' --required
@@json=
'{
"UserName": "{{ UserName }}",
"AuthenticationType": "{{ AuthenticationType }}"
}'
;