Skip to main content

users

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

Overview​

Nameusers
TypeResource
Idaws.chime.users

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringThe Amazon Chime account ID.
alexa_for_business_metadataobjectThe Alexa for Business metadata.
display_namestringThe display name of the user.
invited_onstring (date-time)Date and time when the user is invited to the Amazon Chime account, in ISO 8601 format.
license_typestringThe license type for the user. (Basic, Plus, Pro, ProTrial)
personal_pinstringThe user's personal meeting PIN.
primary_emailstringThe primary email address of the user. (pattern: <code>.+@.+..+</code>)
primary_provisioned_numberstringThe primary phone number associated with the user.
registered_onstring (date-time)Date and time when the user is registered, in ISO 8601 format.
user_idstringThe user ID.
user_invitation_statusstringThe user invite status. (Pending, Accepted, Failed)
user_registration_statusstringThe user registration status. (Unregistered, Registered, Suspended)
user_typestringThe user type. (PrivateUser, SharedDevice)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_userselectaccount_id, user_id, regionRetrieves 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_usersselectaccount_id, regionuser-email, user-type, max-results, next-tokenLists 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_userinsertaccount_id, regionCreates a user under the specified Amazon Chime account.
associate_phone_number_with_userupdateaccount_id, user_id, region, E164PhoneNumberAssociates a phone number with the specified Amazon Chime user.
update_userupdateaccount_id, user_id, regionUpdates user details for a specified user ID. Currently, only LicenseType updates are supported for this action.
disassociate_phone_number_from_userexecaccount_id, user_id, regionDisassociates the primary provisioned phone number from the specified Amazon Chime user.
invite_usersexecaccount_id, region, UserEmailListSends 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.

NameDatatypeDescription
account_idstringThe Amazon Chime account ID.
regionstringAWS region (default: us-east-1)
user_idstringThe user ID.
max-resultsintegerThe maximum number of results to return in a single call. Defaults to 100.
next-tokenstringThe token to use to retrieve the next page of results.
user-emailstringOptional. The user email address used to filter results. Maximum 1.
user-typestringThe user type.

SELECT examples​

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
;

INSERT examples​

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
;

UPDATE examples​

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;

Lifecycle Methods​

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
;