updateAccountCustomization method

Future<UpdateAccountCustomizationResponse> updateAccountCustomization({
  1. required AccountCustomization accountCustomization,
  2. required String awsAccountId,
  3. String? namespace,
})

Updates Amazon QuickSight customizations the current AWS Region. Currently, the only customization you can use is a theme.

You can use customizations for your AWS account or, if you specify a namespace, for a QuickSight namespace instead. Customizations that apply to a namespace override customizations that apply to an AWS account. To find out which customizations apply, use the DescribeAccountCustomization API operation.

May throw AccessDeniedException. May throw InvalidParameterValueException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw InternalFailureException. May throw ResourceUnavailableException.

Parameter accountCustomization : The QuickSight customizations you're updating in the current AWS Region.

Parameter awsAccountId : The ID for the AWS account that you want to update QuickSight customizations for.

Parameter namespace : The namespace that you want to update QuickSight customizations for.

Implementation

Future<UpdateAccountCustomizationResponse> updateAccountCustomization({
  required AccountCustomization accountCustomization,
  required String awsAccountId,
  String? namespace,
}) 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,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/customizations',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return UpdateAccountCustomizationResponse.fromJson(response);
}