describeReservedNodesOfferings method

Future<DescribeReservedNodesOfferingsResponse> describeReservedNodesOfferings({
  1. String? duration,
  2. int? maxResults,
  3. String? nextToken,
  4. String? nodeType,
  5. String? offeringType,
  6. String? reservedNodesOfferingId,
})

Lists available reserved node offerings.

May throw InvalidParameterCombinationException. May throw InvalidParameterValueException. May throw ReservedNodesOfferingNotFoundFault. May throw ServiceLinkedRoleNotFoundFault.

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

Parameter maxResults : The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.

Parameter nextToken : An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

Parameter nodeType : The node type for the reserved nodes. For more information, see Supported node types.

Parameter offeringType : The offering type filter value. Use this parameter to show only the available offerings matching the specified offering type. Valid values: "All Upfront"|"Partial Upfront"| "No Upfront"

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

Implementation

Future<DescribeReservedNodesOfferingsResponse>
    describeReservedNodesOfferings({
  String? duration,
  int? maxResults,
  String? nextToken,
  String? nodeType,
  String? offeringType,
  String? reservedNodesOfferingId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonMemoryDB.DescribeReservedNodesOfferings'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (duration != null) 'Duration': duration,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (nodeType != null) 'NodeType': nodeType,
      if (offeringType != null) 'OfferingType': offeringType,
      if (reservedNodesOfferingId != null)
        'ReservedNodesOfferingId': reservedNodesOfferingId,
    },
  );

  return DescribeReservedNodesOfferingsResponse.fromJson(jsonResponse.body);
}