Skip to main content

users

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

Overview

Nameusers
TypeResource
Idaws.identitystore.users

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
addressesarrayThe physical address of the user.
birthdatestringThe user's birthdate in YYYY-MM-DD format. This field returns the stored birthdate information for the user. (pattern: <code>[\p{L}\p{M}\p{S}\p{N}\p{P}\t\n\r   ]+</code>)
created_atstring (date-time)The date and time the user was created.
created_bystringThe identifier of the user or system that created the user.
display_namestringThe display name of the user. (pattern: <code>[\p{L}\p{M}\p{S}\p{N}\p{P}\t\n\r   ]+</code>)
emailsarrayThe email address of the user.
extensionsobjectA map of explicitly requested attribute extensions associated with the user. Not populated if the user has no requested extensions.
external_idsarrayA list of ExternalId objects that contains the identifiers issued to this resource by an external identity provider.
identity_store_idstringThe globally unique identifier for the identity store. (pattern: <code>d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>)
localestringA string containing the geographical region or location of the user. (pattern: <code>[\p{L}\p{M}\p{S}\p{N}\p{P}\t\n\r   ]+</code>)
nameobjectThe name of the user.
nick_namestringAn alternative descriptive name for the user. (pattern: <code>[\p{L}\p{M}\p{S}\p{N}\p{P}\t\n\r   ]+</code>)
phone_numbersarrayA list of PhoneNumber objects associated with a user.
photosarrayA list of photos associated with the user. Returns up to 3 photos with their associated metadata including type, display name, and primary designation.
preferred_languagestringThe preferred language of the user. (pattern: <code>[\p{L}\p{M}\p{S}\p{N}\p{P}\t\n\r   ]+</code>)
profile_urlstringA URL link for the user's profile. (pattern: <code>[\p{L}\p{M}\p{S}\p{N}\p{P}\t\n\r   ]+</code>)
rolesarrayThe roles of the user.
timezonestringThe time zone for a user. (pattern: <code>[\p{L}\p{M}\p{S}\p{N}\p{P}\t\n\r   ]+</code>)
titlestringA string containing the title of the user. (pattern: <code>[\p{L}\p{M}\p{S}\p{N}\p{P}\t\n\r   ]+</code>)
updated_atstring (date-time)The date and time the user was last updated.
updated_bystringThe identifier of the user or system that last updated the user.
user_idstringThe identifier for a user in the identity store. (pattern: <code>([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}</code>)
user_namestringA unique string used to identify the user. The length limit is 128 characters. This value can consist of letters, accented characters, symbols, numbers, and punctuation. This value is specified at the time the user is created and stored as an attribute of the user object in the identity store. (pattern: <code>[\p{L}\p{M}\p{S}\p{N}\p{P}]+</code>)
user_statusstringThe current status of the user account. (ENABLED, DISABLED)
user_typestringA string indicating the type of user. (pattern: <code>[\p{L}\p{M}\p{S}\p{N}\p{P}\t\n\r   ]+</code>)
websitestringThe user's personal website or blog URL. Returns the stored website information for the user. (pattern: <code>[\p{L}\p{M}\p{S}\p{N}\p{P}\t\n\r   ]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_userselectregionRetrieves the user metadata and attributes from the UserId in an identity store. If you have access to a member account, you can use this API operation from the member account. For more information, see Limiting access to the identity store from member accounts in the IAM Identity Center User Guide.
list_usersselectregionLists all users in the identity store. Returns a paginated list of complete User objects. Filtering for a User by the UserName attribute is deprecated. Instead, use the GetUserId API action. If you have access to a member account, you can use this API operation from the member account. For more information, see Limiting access to the identity store from member accounts in the IAM Identity Center User Guide.
create_userinsertregion, IdentityStoreIdCreates a user within the specified identity store.
update_userupdateregion, IdentityStoreId, UserId, OperationsUpdates the specified user metadata and attributes in the specified identity store.
delete_userdeleteregionDeletes a user within an identity store given UserId.

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 the user metadata and attributes from the UserId in an identity store. If you have access to a member account, you can use this API operation from the member account. For more information, see Limiting access to the identity store from member accounts in the IAM Identity Center User Guide.

SELECT
addresses,
birthdate,
created_at,
created_by,
display_name,
emails,
extensions,
external_ids,
identity_store_id,
locale,
name,
nick_name,
phone_numbers,
photos,
preferred_language,
profile_url,
roles,
timezone,
title,
updated_at,
updated_by,
user_id,
user_name,
user_status,
user_type,
website
FROM aws.identitystore.users
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a user within the specified identity store.

INSERT INTO aws.identitystore.users (
IdentityStoreId,
UserName,
Name,
DisplayName,
NickName,
ProfileUrl,
Emails,
Addresses,
PhoneNumbers,
UserType,
Title,
PreferredLanguage,
Locale,
Timezone,
Photos,
Website,
Birthdate,
Roles,
Extensions,
region
)
SELECT
'{{ IdentityStoreId }}' /* required */,
'{{ UserName }}',
'{{ Name }}',
'{{ DisplayName }}',
'{{ NickName }}',
'{{ ProfileUrl }}',
'{{ Emails }}',
'{{ Addresses }}',
'{{ PhoneNumbers }}',
'{{ UserType }}',
'{{ Title }}',
'{{ PreferredLanguage }}',
'{{ Locale }}',
'{{ Timezone }}',
'{{ Photos }}',
'{{ Website }}',
'{{ Birthdate }}',
'{{ Roles }}',
'{{ Extensions }}',
'{{ region }}'
RETURNING
identity_store_id,
user_id
;

UPDATE examples

Updates the specified user metadata and attributes in the specified identity store.

UPDATE aws.identitystore.users
SET
IdentityStoreId = '{{ IdentityStoreId }}',
UserId = '{{ UserId }}',
Operations = '{{ Operations }}'
WHERE
region = '{{ region }}' --required
AND IdentityStoreId = '{{ IdentityStoreId }}' --required
AND UserId = '{{ UserId }}' --required
AND Operations = '{{ Operations }}' --required;

DELETE examples

Deletes a user within an identity store given UserId.

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