updateAccountSettings method

Future<UpdateAccountSettingsResponse> updateAccountSettings({
  1. required String awsAccountId,
  2. required String defaultNamespace,
  3. String? notificationEmail,
})

Updates the Amazon QuickSight settings in your AWS account.

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

Parameter awsAccountId : The ID for the AWS account that contains the QuickSight settings that you want to list.

Parameter defaultNamespace : The default namespace for this AWS account. Currently, the default is default. AWS Identity and Access Management (IAM) users that register for the first time with QuickSight provide an email that becomes associated with the default namespace.

Parameter notificationEmail : The email address that you want QuickSight to send notifications to regarding your AWS account or QuickSight subscription.

Implementation

Future<UpdateAccountSettingsResponse> updateAccountSettings({
  required String awsAccountId,
  required String defaultNamespace,
  String? notificationEmail,
}) async {
  ArgumentError.checkNotNull(awsAccountId, 'awsAccountId');
  _s.validateStringLength(
    'awsAccountId',
    awsAccountId,
    12,
    12,
    isRequired: true,
  );
  ArgumentError.checkNotNull(defaultNamespace, 'defaultNamespace');
  _s.validateStringLength(
    'defaultNamespace',
    defaultNamespace,
    0,
    64,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'DefaultNamespace': defaultNamespace,
    if (notificationEmail != null) 'NotificationEmail': notificationEmail,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/accounts/${Uri.encodeComponent(awsAccountId)}/settings',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateAccountSettingsResponse.fromJson(response);
}