updateUser method
Updates an Amazon Quick Sight user.
May throw AccessDeniedException.
May throw InternalFailureException.
May throw InvalidParameterValueException.
May throw PreconditionNotMetException.
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 update.
Parameter namespace :
The namespace. Currently, you should set this to default.
Parameter role :
The Amazon Quick Sight role of the user. The role can be one of the
following default security cohorts:
-
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.
Parameter userName :
The Amazon Quick Sight user name that you want to update.
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
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).
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 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. -
NONE: This clears all the previously saved external login information for a user. Use theDescribeUserAPI operation to check the external login information.
Parameter externalLoginId :
The identity ID for a user in the external login provider.
Parameter unapplyCustomPermissions :
A flag that you use to indicate that you want to remove all custom
permissions from this user. Using this parameter resets the user to the
state it was in before a custom permissions profile was applied. This
parameter defaults to NULL and it doesn't accept any other value.
Implementation
Future<UpdateUserResponse> updateUser({
required String awsAccountId,
required String email,
required String namespace,
required UserRole role,
required String userName,
String? customFederationProviderUrl,
String? customPermissionsName,
String? externalLoginFederationProviderType,
String? externalLoginId,
bool? unapplyCustomPermissions,
}) async {
final $payload = <String, dynamic>{
'Email': email,
'Role': role.value,
if (customFederationProviderUrl != null)
'CustomFederationProviderUrl': customFederationProviderUrl,
if (customPermissionsName != null)
'CustomPermissionsName': customPermissionsName,
if (externalLoginFederationProviderType != null)
'ExternalLoginFederationProviderType':
externalLoginFederationProviderType,
if (externalLoginId != null) 'ExternalLoginId': externalLoginId,
if (unapplyCustomPermissions != null)
'UnapplyCustomPermissions': unapplyCustomPermissions,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/namespaces/${Uri.encodeComponent(namespace)}/users/${Uri.encodeComponent(userName)}',
exceptionFnMap: _exceptionFns,
);
return UpdateUserResponse.fromJson(response);
}