updatePreferences method
Updates the preferences for Pricing Calculator.
May throw DataUnavailableException.
May throw ServiceQuotaExceededException.
Parameter managementAccountRateTypeSelections :
The updated preferred rate types for the management account.
Parameter memberAccountRateTypeSelections :
The updated preferred rate types for member accounts.
Parameter standaloneAccountRateTypeSelections :
The updated preferred rate types for a standalone account.
Implementation
Future<UpdatePreferencesResponse> updatePreferences({
List<RateType>? managementAccountRateTypeSelections,
List<RateType>? memberAccountRateTypeSelections,
List<RateType>? standaloneAccountRateTypeSelections,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AWSBCMPricingCalculator.UpdatePreferences'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (managementAccountRateTypeSelections != null)
'managementAccountRateTypeSelections':
managementAccountRateTypeSelections.map((e) => e.value).toList(),
if (memberAccountRateTypeSelections != null)
'memberAccountRateTypeSelections':
memberAccountRateTypeSelections.map((e) => e.value).toList(),
if (standaloneAccountRateTypeSelections != null)
'standaloneAccountRateTypeSelections':
standaloneAccountRateTypeSelections.map((e) => e.value).toList(),
},
);
return UpdatePreferencesResponse.fromJson(jsonResponse.body);
}