updateAccountSettings method

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

Updates the Amazon Quick Sight settings in your Amazon Web Services account.

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

Parameter awsAccountId : The ID for the Amazon Web Services account that contains the Quick Sight settings that you want to list.

Parameter defaultNamespace : The default namespace for this Amazon Web Services account. Currently, the default is default. IAM users that register for the first time with Amazon Quick Sight provide an email address that becomes associated with the default namespace.

Parameter notificationEmail : The email address that you want Quick Sight to send notifications to regarding your Amazon Web Services account or Quick Sight subscription.

Parameter terminationProtectionEnabled : A boolean value that determines whether or not an Quick Sight account can be deleted. A True value doesn't allow the account to be deleted and results in an error message if a user tries to make a DeleteAccountSubscription request. A False value will allow the account to be deleted.

Implementation

Future<UpdateAccountSettingsResponse> updateAccountSettings({
  required String awsAccountId,
  required String defaultNamespace,
  String? notificationEmail,
  bool? terminationProtectionEnabled,
}) async {
  final $payload = <String, dynamic>{
    'DefaultNamespace': defaultNamespace,
    if (notificationEmail != null) 'NotificationEmail': notificationEmail,
    if (terminationProtectionEnabled != null)
      'TerminationProtectionEnabled': terminationProtectionEnabled,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/accounts/${Uri.encodeComponent(awsAccountId)}/settings',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateAccountSettingsResponse.fromJson(response);
}