updateAccountSettings method

Future<UpdateAccountSettingsResponse> updateAccountSettings({
  1. CapacityLimits? capacityLimits,
})

Update the OpenSearch Serverless settings for the current Amazon Web Services account. For more information, see Managing capacity limits for Amazon OpenSearch Serverless.

May throw InternalServerException. May throw ServiceQuotaExceededException. May throw ValidationException.

Implementation

Future<UpdateAccountSettingsResponse> updateAccountSettings({
  CapacityLimits? capacityLimits,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'OpenSearchServerless.UpdateAccountSettings'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (capacityLimits != null) 'capacityLimits': capacityLimits,
    },
  );

  return UpdateAccountSettingsResponse.fromJson(jsonResponse.body);
}