describeReservedDBInstances method
Returns information about reserved DB instances for this account, or about a specified reserved DB instance.
May throw ReservedDBInstanceNotFoundFault.
Parameter dBInstanceClass :
The DB instance class filter value. Specify this parameter to show only
those reservations matching the specified DB instances class.
Parameter duration :
The 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 leaseId :
The lease identifier filter value. Specify this parameter to show only the
reservation that matches the specified lease ID.
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 :
The product description filter value. Specify this parameter to show only
those reservations matching the specified product description.
Parameter reservedDBInstanceId :
The reserved DB instance identifier filter value. Specify this parameter
to show only the reservation that matches the specified reservation ID.
Parameter reservedDBInstancesOfferingId :
The offering identifier filter value. Specify this parameter to show only
purchased reservations matching the specified offering identifier.
Implementation
Future<ReservedDBInstanceMessage> describeReservedDBInstances({
String? dBInstanceClass,
String? duration,
List<Filter>? filters,
String? leaseId,
String? marker,
int? maxRecords,
bool? multiAZ,
String? offeringType,
String? productDescription,
String? reservedDBInstanceId,
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 (leaseId != null) 'LeaseId': leaseId,
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 (reservedDBInstanceId != null)
'ReservedDBInstanceId': reservedDBInstanceId,
if (reservedDBInstancesOfferingId != null)
'ReservedDBInstancesOfferingId': reservedDBInstancesOfferingId,
};
final $result = await _protocol.send(
$request,
action: 'DescribeReservedDBInstances',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'DescribeReservedDBInstancesResult',
);
return ReservedDBInstanceMessage.fromXml($result);
}