purchaseReservedDBInstancesOffering method

Future<PurchaseReservedDBInstancesOfferingResult> purchaseReservedDBInstancesOffering({
  1. required String reservedDBInstancesOfferingId,
  2. int? dBInstanceCount,
  3. String? reservedDBInstanceId,
})

Implementation

Future<PurchaseReservedDBInstancesOfferingResult>
    purchaseReservedDBInstancesOffering({
  required String reservedDBInstancesOfferingId,
  int? dBInstanceCount,
  String? reservedDBInstanceId,
}) async {
  ArgumentError.checkNotNull(
      reservedDBInstancesOfferingId, 'reservedDBInstancesOfferingId');
  final $request = <String, dynamic>{};
  $request['ReservedDBInstancesOfferingId'] = reservedDBInstancesOfferingId;
  dBInstanceCount?.also((arg) => $request['DBInstanceCount'] = arg);
  reservedDBInstanceId?.also((arg) => $request['ReservedDBInstanceId'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'PurchaseReservedDBInstancesOffering',
    version: '2013-02-12',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['PurchaseReservedDBInstancesOfferingMessage'],
    shapes: shapes,
    resultWrapper: 'PurchaseReservedDBInstancesOfferingResult',
  );
  return PurchaseReservedDBInstancesOfferingResult.fromXml($result);
}