updateBillScenario method
Updates an existing bill scenario.
May throw ConflictException.
May throw DataUnavailableException.
May throw ResourceNotFoundException.
Parameter identifier :
The unique identifier of the bill scenario to update.
Parameter costCategoryGroupSharingPreferenceArn :
The arn of the cost category used in the reserved and prioritized group
sharing.
Parameter expiresAt :
The new expiration date for the bill scenario.
Parameter groupSharingPreference :
The setting for the reserved instance and savings plan group sharing used
in this estimate.
Parameter name :
The new name for the bill scenario.
Implementation
Future<UpdateBillScenarioResponse> updateBillScenario({
required String identifier,
String? costCategoryGroupSharingPreferenceArn,
DateTime? expiresAt,
GroupSharingPreferenceEnum? groupSharingPreference,
String? name,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AWSBCMPricingCalculator.UpdateBillScenario'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'identifier': identifier,
if (costCategoryGroupSharingPreferenceArn != null)
'costCategoryGroupSharingPreferenceArn':
costCategoryGroupSharingPreferenceArn,
if (expiresAt != null) 'expiresAt': unixTimestampToJson(expiresAt),
if (groupSharingPreference != null)
'groupSharingPreference': groupSharingPreference.value,
if (name != null) 'name': name,
},
);
return UpdateBillScenarioResponse.fromJson(jsonResponse.body);
}