batchUpdateBillScenarioCommitmentModification method

Future<BatchUpdateBillScenarioCommitmentModificationResponse> batchUpdateBillScenarioCommitmentModification({
  1. required String billScenarioId,
  2. required List<BatchUpdateBillScenarioCommitmentModificationEntry> commitmentModifications,
})

Update a newly added or existing commitment. You can update the commitment group based on a commitment ID and a Bill scenario ID.

May throw ConflictException. May throw DataUnavailableException. May throw ResourceNotFoundException.

Parameter billScenarioId : The ID of the Bill Scenario for which you want to modify the commitment group of a modeled commitment.

Parameter commitmentModifications : List of commitments that you want to update in a Bill Scenario.

Implementation

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

  return BatchUpdateBillScenarioCommitmentModificationResponse.fromJson(
      jsonResponse.body);
}