batchCreateBillScenarioUsageModification method
Future<BatchCreateBillScenarioUsageModificationResponse>
batchCreateBillScenarioUsageModification({})
Create Amazon Web Services service usage that you want to model in a Bill Scenario.
May throw ConflictException.
May throw DataUnavailableException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
Parameter billScenarioId :
The ID of the Bill Scenario for which you want to create the modeled
usage.
Parameter usageModifications :
List of usage that you want to model in the Bill Scenario.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
Implementation
Future<BatchCreateBillScenarioUsageModificationResponse>
batchCreateBillScenarioUsageModification({
required String billScenarioId,
required List<BatchCreateBillScenarioUsageModificationEntry>
usageModifications,
String? clientToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target':
'AWSBCMPricingCalculator.BatchCreateBillScenarioUsageModification'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'billScenarioId': billScenarioId,
'usageModifications': usageModifications,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
},
);
return BatchCreateBillScenarioUsageModificationResponse.fromJson(
jsonResponse.body);
}