createAccountCustomization method
- required AccountCustomization accountCustomization,
- required String awsAccountId,
- String? namespace,
- List<
Tag> ? tags,
Creates Amazon QuickSight customizations the current AWS Region.
Currently, you can add a custom default theme by using the
CreateAccountCustomization
or
UpdateAccountCustomization
API operation. To further
customize QuickSight by removing QuickSight sample assets and videos for
all new users, see Customizing
QuickSight in the Amazon QuickSight User Guide.
You can create customizations for your AWS account or, if you specify a
namespace, for a QuickSight namespace instead. Customizations that apply
to a namespace always override customizations that apply to an AWS
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 InvalidParameterValueException. May throw ResourceExistsException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw InternalFailureException. May throw ResourceUnavailableException.
Parameter accountCustomization
:
The QuickSight customizations you're adding in the current AWS Region. You
can add these to an AWS 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 AWS account that you want to customize QuickSight for.
Parameter namespace
:
The QuickSight 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 {
ArgumentError.checkNotNull(accountCustomization, 'accountCustomization');
ArgumentError.checkNotNull(awsAccountId, 'awsAccountId');
_s.validateStringLength(
'awsAccountId',
awsAccountId,
12,
12,
isRequired: true,
);
_s.validateStringLength(
'namespace',
namespace,
0,
64,
);
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);
}