updateAccountSettings method

Future<AccountSettings> updateAccountSettings({
  1. DeletionProtectionSettings? deletionProtection,
  2. VendedMetricsSettings? vendedMetrics,
})

Updates the value of the DeletionProtection parameter.

May throw BadRequestException. May throw InternalServerException.

Parameter deletionProtection : A parameter to configure deletion protection. Deletion protection prevents a user from deleting a configuration profile or an environment if AppConfig has called either GetLatestConfiguration or for the configuration profile or from the environment during the specified interval. The default interval for ProtectionPeriodInMinutes is 60.

Parameter vendedMetrics : The configuration for vended metrics in the account.

Implementation

Future<AccountSettings> updateAccountSettings({
  DeletionProtectionSettings? deletionProtection,
  VendedMetricsSettings? vendedMetrics,
}) async {
  final $payload = <String, dynamic>{
    if (deletionProtection != null) 'DeletionProtection': deletionProtection,
    if (vendedMetrics != null) 'VendedMetrics': vendedMetrics,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/settings',
    exceptionFnMap: _exceptionFns,
  );
  return AccountSettings.fromJson(response);
}