Skip to main content

users

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

Overview

Nameusers
TypeResource
Idaws.quicksight.users

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
request_idstringThe Amazon Web Services request ID for this operation.
statusintegerThe HTTP status of the request.
userobjectThe user name.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_userselectuser_name, aws_account_id, namespace, regionReturns information about a user, given the user name.
list_usersselectaws_account_id, namespace, regionnext-token, max-resultsReturns a list of all of the Amazon Quick Sight users belonging to this account.
register_userinsertaws_account_id, namespace, region, IdentityType, UserRoleCreates an Amazon Quick Sight user whose identity is associated with the Identity and Access Management (IAM) identity or role specified in the request. When you register a new user from the Quick Sight API, Quick Sight generates a registration URL. The user accesses this registration URL to create their account. Quick Sight doesn't send a registration email to users who are registered from the Quick Sight API. If you want new users to receive a registration email, then add those users in the Quick Sight console. For more information on registering a new user in the Quick Sight console, see Inviting users to access Quick Sight.
update_userupdateuser_name, aws_account_id, namespace, regionUpdates an Amazon Quick Sight user.
delete_userdeleteuser_name, aws_account_id, namespace, regionDeletes the Amazon Quick Sight user that is associated with the identity of the IAM user or role that's making the call. The IAM user isn't deleted as a result of this call.
delete_user_by_principal_iddeleteprincipal_id, aws_account_id, namespace, regionDeletes a user identified by its principal ID.
generate_embed_url_for_registered_userexecaws_account_id, region, UserArn, ExperienceConfigurationGenerates an embed URL that you can use to embed an Amazon Quick experience in your website. This action can be used for any type of user registered in an Amazon Quick account. Before you use this action, make sure that you have configured the relevant Amazon Quick resource and permissions. The following rules apply to the generated URL: It contains a temporary bearer token. It is valid for 5 minutes after it is generated. Once redeemed within this period, it cannot be re-used again. The URL validity period should not be confused with the actual session lifetime that can be customized using the SessionLifetimeInMinutes parameter. The resulting user session is valid for 15 minutes (minimum) to 10 hours (maximum). The default session duration is 10 hours. You are charged only when the URL is used or there is interaction with Amazon Quick. For more information, see Embedded Analytics in the Amazon Quick User Guide. For more information about the high-level steps for embedding and for an interactive demo of the ways you can customize embedding, visit the Amazon Quick Developer Portal.

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
aws_account_idstringThe ID for the Amazon Web Services account that contains the dashboard that you're embedding.
namespacestringThe namespace. Currently, you should set this to default.
principal_idstringThe principal ID of the user.
regionstringAWS region (default: us-east-1)
user_namestringThe name of the user that you want to delete.
max-resultsintegerThe maximum number of results to return from this request.
next-tokenstringA pagination token that can be used in a subsequent request.

SELECT examples

Returns information about a user, given the user name.

SELECT
request_id,
status,
user
FROM aws.quicksight.users
WHERE user_name = '{{ user_name }}' -- required
AND aws_account_id = '{{ aws_account_id }}' -- required
AND namespace = '{{ namespace }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates an Amazon Quick Sight user whose identity is associated with the Identity and Access Management (IAM) identity or role specified in the request. When you register a new user from the Quick Sight API, Quick Sight generates a registration URL. The user accesses this registration URL to create their account. Quick Sight doesn't send a registration email to users who are registered from the Quick Sight API. If you want new users to receive a registration email, then add those users in the Quick Sight console. For more information on registering a new user in the Quick Sight console, see Inviting users to access Quick Sight.

INSERT INTO aws.quicksight.users (
IdentityType,
Email,
UserRole,
IamArn,
SessionName,
UserName,
CustomPermissionsName,
ExternalLoginFederationProviderType,
CustomFederationProviderUrl,
ExternalLoginId,
Tags,
aws_account_id,
namespace,
region
)
SELECT
'{{ IdentityType }}' /* required */,
'{{ Email }}',
'{{ UserRole }}' /* required */,
'{{ IamArn }}',
'{{ SessionName }}',
'{{ UserName }}',
'{{ CustomPermissionsName }}',
'{{ ExternalLoginFederationProviderType }}',
'{{ CustomFederationProviderUrl }}',
'{{ ExternalLoginId }}',
'{{ Tags }}',
'{{ aws_account_id }}',
'{{ namespace }}',
'{{ region }}'
RETURNING
request_id,
status,
user,
user_invitation_url
;

UPDATE examples

Updates an Amazon Quick Sight user.

UPDATE aws.quicksight.users
SET
Email = '{{ Email }}',
Role = '{{ Role }}',
CustomPermissionsName = '{{ CustomPermissionsName }}',
UnapplyCustomPermissions = {{ UnapplyCustomPermissions }},
ExternalLoginFederationProviderType = '{{ ExternalLoginFederationProviderType }}',
CustomFederationProviderUrl = '{{ CustomFederationProviderUrl }}',
ExternalLoginId = '{{ ExternalLoginId }}'
WHERE
user_name = '{{ user_name }}' --required
AND aws_account_id = '{{ aws_account_id }}' --required
AND namespace = '{{ namespace }}' --required
AND region = '{{ region }}' --required
RETURNING
request_id,
status,
user;

DELETE examples

Deletes the Amazon Quick Sight user that is associated with the identity of the IAM user or role that's making the call. The IAM user isn't deleted as a result of this call.

DELETE FROM aws.quicksight.users
WHERE user_name = '{{ user_name }}' --required
AND aws_account_id = '{{ aws_account_id }}' --required
AND namespace = '{{ namespace }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Generates an embed URL that you can use to embed an Amazon Quick experience in your website. This action can be used for any type of user registered in an Amazon Quick account. Before you use this action, make sure that you have configured the relevant Amazon Quick resource and permissions. The following rules apply to the generated URL: It contains a temporary bearer token. It is valid for 5 minutes after it is generated. Once redeemed within this period, it cannot be re-used again. The URL validity period should not be confused with the actual session lifetime that can be customized using the SessionLifetimeInMinutes parameter. The resulting user session is valid for 15 minutes (minimum) to 10 hours (maximum). The default session duration is 10 hours. You are charged only when the URL is used or there is interaction with Amazon Quick. For more information, see Embedded Analytics in the Amazon Quick User Guide. For more information about the high-level steps for embedding and for an interactive demo of the ways you can customize embedding, visit the Amazon Quick Developer Portal.

EXEC aws.quicksight.users.generate_embed_url_for_registered_user
@aws_account_id='{{ aws_account_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"SessionLifetimeInMinutes": {{ SessionLifetimeInMinutes }},
"UserArn": "{{ UserArn }}",
"ExperienceConfiguration": "{{ ExperienceConfiguration }}",
"AllowedDomains": "{{ AllowedDomains }}"
}'
;