users
Creates, updates, deletes, gets or lists a users resource.
Overview
| Name | users |
| Type | Resource |
| Id | aws.appstream.users |
Fields
The following fields are returned by SELECT queries:
- describe_users
| Name | Datatype | Description |
|---|---|---|
arn | string | The 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_type | string | The authentication type for the user. (API, SAML, USERPOOL, AWS_AD) |
created_time | string (date-time) | The date and time the user was created in the user pool. |
enabled | boolean | Specifies whether the user in the user pool is enabled. |
first_name | string | The first name, or given name, of the user. (pattern: <code>^[A-Za-z0-9_-\s]+$</code>) |
last_name | string | The last name, or surname, of the user. (pattern: <code>^[A-Za-z0-9_-\s]+$</code>) |
status | string | The 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_name | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_users | select | region | Retrieves a list that describes one or more specified users in the user pool. | |
create_user | insert | region, UserName, AuthenticationType | Creates a new user in the user pool. | |
delete_user | delete | region | Deletes a user from the user pool. | |
disable_user | exec | region, UserName, AuthenticationType | 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. | |
enable_user | exec | region, UserName, AuthenticationType | Enables 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_users
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
- create_user
- Manifest
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 }}'
;
# Description fields are for documentation purposes
- name: users
props:
- name: region
value: "{{ region }}"
description: Required parameter for the users resource.
- name: UserName
value: "{{ UserName }}"
description: |
The email address of the user. Users' email addresses are case-sensitive. During login, if they specify an email address that doesn't use the same capitalization as the email address specified when their user pool account was created, a "user does not exist" error message displays.
- name: MessageAction
value: "{{ MessageAction }}"
description: |
The action to take for the welcome email that is sent to a user after the user is created in the user pool. If you specify SUPPRESS, no email is sent. If you specify RESEND, do not specify the first name or last name of the user. If the value is null, the email is sent. The temporary password in the welcome email is valid for only 7 days. If users don’t set their passwords within 7 days, you must send them a new welcome email.
valid_values: ['SUPPRESS', 'RESEND']
- name: FirstName
value: "{{ FirstName }}"
description: |
The first name, or given name, of the user.
- name: LastName
value: "{{ LastName }}"
description: |
The last name, or surname, of the user.
- name: AuthenticationType
value: "{{ AuthenticationType }}"
description: |
The authentication type for the user. You must specify USERPOOL.
valid_values: ['API', 'SAML', 'USERPOOL', 'AWS_AD']
DELETE examples
- delete_user
Deletes a user from the user pool.
DELETE FROM aws.appstream.users
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- disable_user
- enable_user
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 }}"
}'
;
Enables 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.
EXEC aws.appstream.users.enable_user
@region='{{ region }}' --required
@@json=
'{
"UserName": "{{ UserName }}",
"AuthenticationType": "{{ AuthenticationType }}"
}'
;