users
Creates, updates, deletes, gets or lists a users resource.
Overview
| Name | users |
| Type | Resource |
| Id | aws.chime.users |
Fields
The following fields are returned by SELECT queries:
- get_user
- list_users
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Amazon Chime account ID. |
alexa_for_business_metadata | object | The Alexa for Business metadata. |
display_name | string | The display name of the user. |
invited_on | string (date-time) | Date and time when the user is invited to the Amazon Chime account, in ISO 8601 format. |
license_type | string | The license type for the user. (Basic, Plus, Pro, ProTrial) |
personal_pin | string | The user's personal meeting PIN. |
primary_email | string | The primary email address of the user. (pattern: <code>.+@.+..+</code>) |
primary_provisioned_number | string | The primary phone number associated with the user. |
registered_on | string (date-time) | Date and time when the user is registered, in ISO 8601 format. |
user_id | string | The user ID. |
user_invitation_status | string | The user invite status. (Pending, Accepted, Failed) |
user_registration_status | string | The user registration status. (Unregistered, Registered, Suspended) |
user_type | string | The user type. (PrivateUser, SharedDevice) |
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Amazon Chime account ID. |
alexa_for_business_metadata | object | The Alexa for Business metadata. |
display_name | string | The display name of the user. |
invited_on | string (date-time) | Date and time when the user is invited to the Amazon Chime account, in ISO 8601 format. |
license_type | string | The license type for the user. (Basic, Plus, Pro, ProTrial) |
personal_pin | string | The user's personal meeting PIN. |
primary_email | string | The primary email address of the user. (pattern: <code>.+@.+..+</code>) |
primary_provisioned_number | string | The primary phone number associated with the user. |
registered_on | string (date-time) | Date and time when the user is registered, in ISO 8601 format. |
user_id | string | The user ID. |
user_invitation_status | string | The user invite status. (Pending, Accepted, Failed) |
user_registration_status | string | The user registration status. (Unregistered, Registered, Suspended) |
user_type | string | The user type. (PrivateUser, SharedDevice) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_user | select | account_id, user_id, region | Retrieves details for the specified user ID, such as primary email address, license type,and personal meeting PIN. To retrieve user details with an email address instead of a user ID, use the ListUsers action, and then filter by email address. | |
list_users | select | account_id, region | user-email, user-type, max-results, next-token | Lists the users that belong to the specified Amazon Chime account. You can specify an email address to list only the user that the email address belongs to. |
create_user | insert | account_id, region | Creates a user under the specified Amazon Chime account. | |
associate_phone_number_with_user | update | account_id, user_id, region, E164PhoneNumber | Associates a phone number with the specified Amazon Chime user. | |
update_user | update | account_id, user_id, region | Updates user details for a specified user ID. Currently, only LicenseType updates are supported for this action. | |
disassociate_phone_number_from_user | exec | account_id, user_id, region | Disassociates the primary provisioned phone number from the specified Amazon Chime user. | |
invite_users | exec | account_id, region, UserEmailList | Sends email to a maximum of 50 users, inviting them to the specified Amazon Chime Team account. Only Team account types are currently supported for this action. |
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 |
|---|---|---|
account_id | string | The Amazon Chime account ID. |
region | string | AWS region (default: us-east-1) |
user_id | string | The user ID. |
max-results | integer | The maximum number of results to return in a single call. Defaults to 100. |
next-token | string | The token to use to retrieve the next page of results. |
user-email | string | Optional. The user email address used to filter results. Maximum 1. |
user-type | string | The user type. |
SELECT examples
- get_user
- list_users
Retrieves details for the specified user ID, such as primary email address, license type,and personal meeting PIN. To retrieve user details with an email address instead of a user ID, use the ListUsers action, and then filter by email address.
SELECT
account_id,
alexa_for_business_metadata,
display_name,
invited_on,
license_type,
personal_pin,
primary_email,
primary_provisioned_number,
registered_on,
user_id,
user_invitation_status,
user_registration_status,
user_type
FROM aws.chime.users
WHERE account_id = '{{ account_id }}' -- required
AND user_id = '{{ user_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists the users that belong to the specified Amazon Chime account. You can specify an email address to list only the user that the email address belongs to.
SELECT
account_id,
alexa_for_business_metadata,
display_name,
invited_on,
license_type,
personal_pin,
primary_email,
primary_provisioned_number,
registered_on,
user_id,
user_invitation_status,
user_registration_status,
user_type
FROM aws.chime.users
WHERE account_id = '{{ account_id }}' -- required
AND region = '{{ region }}' -- required
AND `user-email` = '{{ user-email }}'
AND `user-type` = '{{ user-type }}'
AND `max-results` = '{{ max-results }}'
AND `next-token` = '{{ next-token }}'
;
INSERT examples
- create_user
- Manifest
Creates a user under the specified Amazon Chime account.
INSERT INTO aws.chime.users (
Username,
Email,
UserType,
account_id,
region
)
SELECT
'{{ Username }}',
'{{ Email }}',
'{{ UserType }}',
'{{ account_id }}',
'{{ region }}'
RETURNING
user
;
# Description fields are for documentation purposes
- name: users
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the users resource.
- name: region
value: "{{ region }}"
description: Required parameter for the users resource.
- name: Username
value: "{{ Username }}"
- name: Email
value: "{{ Email }}"
- name: UserType
value: "{{ UserType }}"
valid_values: ['PrivateUser', 'SharedDevice']
UPDATE examples
- associate_phone_number_with_user
- update_user
Associates a phone number with the specified Amazon Chime user.
UPDATE aws.chime.users
SET
E164PhoneNumber = '{{ E164PhoneNumber }}'
WHERE
account_id = '{{ account_id }}' --required
AND user_id = '{{ user_id }}' --required
AND region = '{{ region }}' --required
AND E164PhoneNumber = '{{ E164PhoneNumber }}' --required;
Updates user details for a specified user ID. Currently, only LicenseType updates are supported for this action.
UPDATE aws.chime.users
SET
LicenseType = '{{ LicenseType }}',
UserType = '{{ UserType }}',
AlexaForBusinessMetadata = '{{ AlexaForBusinessMetadata }}'
WHERE
account_id = '{{ account_id }}' --required
AND user_id = '{{ user_id }}' --required
AND region = '{{ region }}' --required
RETURNING
user;
Lifecycle Methods
- disassociate_phone_number_from_user
- invite_users
Disassociates the primary provisioned phone number from the specified Amazon Chime user.
EXEC aws.chime.users.disassociate_phone_number_from_user
@account_id='{{ account_id }}' --required,
@user_id='{{ user_id }}' --required,
@region='{{ region }}' --required
;
Sends email to a maximum of 50 users, inviting them to the specified Amazon Chime Team account. Only Team account types are currently supported for this action.
EXEC aws.chime.users.invite_users
@account_id='{{ account_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"UserEmailList": "{{ UserEmailList }}",
"UserType": "{{ UserType }}"
}'
;