describeReservedDBInstancesOfferings method

Future<ReservedDBInstancesOfferingMessage> describeReservedDBInstancesOfferings({
  1. String? dBInstanceClass,
  2. String? duration,
  3. List<Filter>? filters,
  4. String? marker,
  5. int? maxRecords,
  6. bool? multiAZ,
  7. String? offeringType,
  8. String? productDescription,
  9. String? reservedDBInstancesOfferingId,
})

Lists available reserved DB instance offerings.

May throw ReservedDBInstancesOfferingNotFoundFault.

Parameter dBInstanceClass : The DB instance class filter value. Specify this parameter to show only the available offerings matching the specified DB instance class.

Parameter duration : Duration filter value, specified in years or seconds. Specify this parameter to show only reservations for this duration.

Valid Values: 1 | 3 | 31536000 | 94608000

Parameter filters : This parameter isn't currently supported.

Parameter marker : An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

Parameter maxRecords : The maximum number of records to include in the response. If more than the MaxRecords value is available, a pagination token called a marker is included in the response so you can retrieve the remaining results.

Default: 100

Constraints: Minimum 20, maximum 100.

Parameter multiAZ : Specifies whether to show only those reservations that support Multi-AZ.

Parameter offeringType : The offering type filter value. Specify this parameter to show only the available offerings matching the specified offering type.

Valid Values: "Partial Upfront" | "All Upfront" | "No Upfront"

Parameter productDescription : Product description filter value. Specify this parameter to show only the available offerings that contain the specified product description.

Parameter reservedDBInstancesOfferingId : The offering identifier filter value. Specify this parameter to show only the available offering that matches the specified reservation identifier.

Example: 438012d3-4052-4cc7-b2e3-8d3372e0e706

Implementation

Future<ReservedDBInstancesOfferingMessage>
    describeReservedDBInstancesOfferings({
  String? dBInstanceClass,
  String? duration,
  List<Filter>? filters,
  String? marker,
  int? maxRecords,
  bool? multiAZ,
  String? offeringType,
  String? productDescription,
  String? reservedDBInstancesOfferingId,
}) async {
  final $request = <String, String>{
    if (dBInstanceClass != null) 'DBInstanceClass': dBInstanceClass,
    if (duration != null) 'Duration': duration,
    if (filters != null)
      if (filters.isEmpty)
        'Filters': ''
      else
        for (var i1 = 0; i1 < filters.length; i1++)
          for (var e3 in filters[i1].toQueryMap().entries)
            'Filters.Filter.${i1 + 1}.${e3.key}': e3.value,
    if (marker != null) 'Marker': marker,
    if (maxRecords != null) 'MaxRecords': maxRecords.toString(),
    if (multiAZ != null) 'MultiAZ': multiAZ.toString(),
    if (offeringType != null) 'OfferingType': offeringType,
    if (productDescription != null) 'ProductDescription': productDescription,
    if (reservedDBInstancesOfferingId != null)
      'ReservedDBInstancesOfferingId': reservedDBInstancesOfferingId,
  };
  final $result = await _protocol.send(
    $request,
    action: 'DescribeReservedDBInstancesOfferings',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'DescribeReservedDBInstancesOfferingsResult',
  );
  return ReservedDBInstancesOfferingMessage.fromXml($result);
}