updateCapacityReservation method

Future<void> updateCapacityReservation({
  1. required String name,
  2. required int targetDpus,
})

Updates the number of requested data processing units for the capacity reservation with the specified name.

May throw InternalServerException. May throw InvalidRequestException.

Parameter name : The name of the capacity reservation.

Parameter targetDpus : The new number of requested data processing units.

Implementation

Future<void> updateCapacityReservation({
  required String name,
  required int targetDpus,
}) async {
  _s.validateNumRange(
    'targetDpus',
    targetDpus,
    4,
    1152921504606846976,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonAthena.UpdateCapacityReservation'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Name': name,
      'TargetDpus': targetDpus,
    },
  );
}