registerUser method
- required String awsAccountId,
- required String email,
- required IdentityType identityType,
- required String namespace,
- required UserRole userRole,
- String? customFederationProviderUrl,
- String? customPermissionsName,
- String? externalLoginFederationProviderType,
- String? externalLoginId,
- String? iamArn,
- String? sessionName,
- List<
Tag> ? tags, - String? userName,
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.
May throw AccessDeniedException.
May throw InternalFailureException.
May throw InvalidParameterValueException.
May throw LimitExceededException.
May throw PreconditionNotMetException.
May throw ResourceExistsException.
May throw ResourceNotFoundException.
May throw ResourceUnavailableException.
May throw ThrottlingException.
Parameter awsAccountId :
The ID for the Amazon Web Services account that the user is in. Currently,
you use the ID for the Amazon Web Services account that contains your
Amazon Quick Sight account.
Parameter email :
The email address of the user that you want to register.
Parameter identityType :
The identity type that your Quick Sight account uses to manage the
identity of users.
Parameter namespace :
The namespace. Currently, you should set this to default.
Parameter userRole :
The Amazon Quick Sight role for the user. The user role can be one of the
following:
-
READER: A user who has read-only access to dashboards. -
AUTHOR: A user who can create data sources, datasets, analyses, and dashboards. -
ADMIN: A user who is an author, who can also manage Amazon Quick Sight settings. -
READER_PRO: Reader Pro adds Generative BI capabilities to the Reader role. Reader Pros have access to Amazon Q in Quick Sight, can build stories with Amazon Q, and can generate executive summaries from dashboards. -
AUTHOR_PRO: Author Pro adds Generative BI capabilities to the Author role. Author Pros can author dashboards with natural language with Amazon Q, build stories with Amazon Q, create Topics for Q&A, and generate executive summaries from dashboards. -
ADMIN_PRO: Admin Pros are Author Pros who can also manage Amazon Quick Sight administrative settings. Admin Pro users are billed at Author Pro pricing. -
RESTRICTED_READER: This role isn't currently available for use. -
RESTRICTED_AUTHOR: This role isn't currently available for use.
Parameter customFederationProviderUrl :
The URL of the custom OpenID Connect (OIDC) provider that provides
identity to let a user federate into Quick Sight with an associated
Identity and Access Management(IAM) role. This parameter should only be
used when ExternalLoginFederationProviderType parameter is
set to CUSTOM_OIDC.
Parameter customPermissionsName :
(Enterprise edition only) The name of the custom permissions profile that
you want to assign to this user. Customized permissions allows you to
control a user's access by restricting access the following operations:
- Create and update data sources
- Create and update datasets
- Create and update email reports
- Subscribe to email reports
UpdateUser
instead.
A set of custom permissions includes any combination of these
restrictions. Currently, you need to create the profile names for custom
permission sets by using the Quick Sight console. Then, you use the
RegisterUser API operation to assign the named set of
permissions to a Quick Sight user.
Quick Sight custom permissions are applied through IAM policies. Therefore, they override the permissions typically granted by assigning Quick Sight users to one of the default security cohorts in Quick Sight (admin, author, reader, admin pro, author pro, reader pro).
This feature is available only to Quick Sight Enterprise edition subscriptions.
Parameter externalLoginFederationProviderType :
The type of supported external login provider that provides identity to
let a user federate into Amazon Quick Sight with an associated Identity
and Access Management(IAM) role. The type of supported external login
provider can be one of the following.
-
COGNITO: Amazon Cognito. The provider URL is cognito-identity.amazonaws.com. When choosing theCOGNITOprovider type, don’t use the "CustomFederationProviderUrl" parameter which is only needed when the external provider is custom. -
CUSTOM_OIDC: Custom OpenID Connect (OIDC) provider. When choosingCUSTOM_OIDCtype, use theCustomFederationProviderUrlparameter to provide the custom OIDC provider URL.
Parameter externalLoginId :
The identity ID for a user in the external login provider.
Parameter iamArn :
The ARN of the IAM user or role that you are registering with Amazon Quick
Sight.
Parameter sessionName :
You need to use this parameter only when you register one or more users
using an assumed IAM role. You don't need to provide the session name for
other scenarios, for example when you are registering an IAM user or an
Amazon Quick Sight user. You can register multiple users using the same
IAM role if each user has a different session name. For more information
on assuming IAM roles, see
assume-role in the CLI Reference.
Parameter tags :
The tags to associate with the user.
Parameter userName :
The Amazon Quick Sight user name that you want to create for the user you
are registering.
Implementation
Future<RegisterUserResponse> registerUser({
required String awsAccountId,
required String email,
required IdentityType identityType,
required String namespace,
required UserRole userRole,
String? customFederationProviderUrl,
String? customPermissionsName,
String? externalLoginFederationProviderType,
String? externalLoginId,
String? iamArn,
String? sessionName,
List<Tag>? tags,
String? userName,
}) async {
final $payload = <String, dynamic>{
'Email': email,
'IdentityType': identityType.value,
'UserRole': userRole.value,
if (customFederationProviderUrl != null)
'CustomFederationProviderUrl': customFederationProviderUrl,
if (customPermissionsName != null)
'CustomPermissionsName': customPermissionsName,
if (externalLoginFederationProviderType != null)
'ExternalLoginFederationProviderType':
externalLoginFederationProviderType,
if (externalLoginId != null) 'ExternalLoginId': externalLoginId,
if (iamArn != null) 'IamArn': iamArn,
if (sessionName != null) 'SessionName': sessionName,
if (tags != null) 'Tags': tags,
if (userName != null) 'UserName': userName,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/namespaces/${Uri.encodeComponent(namespace)}/users',
exceptionFnMap: _exceptionFns,
);
return RegisterUserResponse.fromJson(response);
}