createAccountCustomization method
Creates Amazon Quick Sight customizations. Currently, you can add a custom
default theme by using the CreateAccountCustomization or
UpdateAccountCustomization API operation. To further
customize Amazon Quick Sight by removing Amazon Quick Sight sample assets
and videos for all new users, see Customizing
Quick Sight in the Amazon Quick Sight User Guide.
You can create customizations for your Amazon Web Services account or, if
you specify a namespace, for a Quick Sight namespace instead.
Customizations that apply to a namespace always override customizations
that apply to an Amazon Web Services account. To find out which
customizations apply, use the DescribeAccountCustomization
API operation.
Before you use the CreateAccountCustomization API operation
to add a theme as the namespace default, make sure that you first share
the theme with the namespace. If you don't share it with the namespace,
the theme isn't visible to your users even if you make it the default
theme. To check if the theme is shared, view the current permissions by
using the DescribeThemePermissions
API operation. To share the theme, grant permissions by using the
UpdateThemePermissions
API operation.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalFailureException.
May throw InvalidParameterValueException.
May throw ResourceExistsException.
May throw ResourceNotFoundException.
May throw ResourceUnavailableException.
May throw ThrottlingException.
Parameter accountCustomization :
The Quick Sight customizations you're adding. You can add these to an
Amazon Web Services account and a QuickSight namespace.
For example, you can add a default theme by setting
AccountCustomization to the midnight theme:
"AccountCustomization": { "DefaultTheme":
"arn:aws:quicksight::aws:theme/MIDNIGHT" }. Or, you can add a
custom theme by specifying "AccountCustomization": { "DefaultTheme":
"arn:aws:quicksight:us-west-2:111122223333:theme/bdb844d0-0fe9-4d9d-b520-0fe602d93639"
}.
Parameter awsAccountId :
The ID for the Amazon Web Services account that you want to customize
Quick Sight for.
Parameter namespace :
The Quick Sight namespace that you want to add customizations to.
Parameter tags :
A list of the tags that you want to attach to this resource.
Implementation
Future<CreateAccountCustomizationResponse> createAccountCustomization({
required AccountCustomization accountCustomization,
required String awsAccountId,
String? namespace,
List<Tag>? tags,
}) async {
final $query = <String, List<String>>{
if (namespace != null) 'namespace': [namespace],
};
final $payload = <String, dynamic>{
'AccountCustomization': accountCustomization,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/customizations',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return CreateAccountCustomizationResponse.fromJson(response);
}