purchaseReservedDBInstancesOffering method

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

Implementation

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