purchaseReservedDBInstancesOffering method
May throw ReservedDBInstancesOfferingNotFoundFault. May throw ReservedDBInstanceAlreadyExistsFault. May throw ReservedDBInstanceQuotaExceededFault.
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-01-10',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['PurchaseReservedDBInstancesOfferingMessage'],
shapes: shapes,
resultWrapper: 'PurchaseReservedDBInstancesOfferingResult',
);
return PurchaseReservedDBInstancesOfferingResult.fromXml($result);
}