batchUpdateBillScenarioUsageModification method

Future<BatchUpdateBillScenarioUsageModificationResponse> batchUpdateBillScenarioUsageModification({
  1. required String billScenarioId,
  2. required List<BatchUpdateBillScenarioUsageModificationEntry> usageModifications,
})

Update a newly added or existing usage lines. You can update the usage amounts, usage hour, and usage group based on a usage ID and a Bill scenario ID.

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 modify the usage lines.

Parameter usageModifications : List of usage lines that you want to update in a Bill Scenario identified by the usage ID.

Implementation

Future<BatchUpdateBillScenarioUsageModificationResponse>
    batchUpdateBillScenarioUsageModification({
  required String billScenarioId,
  required List<BatchUpdateBillScenarioUsageModificationEntry>
      usageModifications,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target':
        'AWSBCMPricingCalculator.BatchUpdateBillScenarioUsageModification'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'billScenarioId': billScenarioId,
      'usageModifications': usageModifications,
    },
  );

  return BatchUpdateBillScenarioUsageModificationResponse.fromJson(
      jsonResponse.body);
}