describeReservedInstanceOfferings method

Future<DescribeReservedInstanceOfferingsResponse> describeReservedInstanceOfferings({
  1. int? maxResults,
  2. String? nextToken,
  3. String? reservedInstanceOfferingId,
})

Describes the available Amazon OpenSearch Service Reserved Instance offerings for a given Region. For more information, see Reserved Instances in Amazon OpenSearch Service.

May throw DisabledOperationException. May throw InternalException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter maxResults : An optional parameter that specifies the maximum number of results to return. You can use nextToken to get the next page of results.

Parameter nextToken : If your initial DescribeReservedInstanceOfferings operation returns a nextToken, you can include the returned nextToken in subsequent DescribeReservedInstanceOfferings operations, which returns results in the next page.

Parameter reservedInstanceOfferingId : The Reserved Instance identifier filter value. Use this parameter to show only the available instance types that match the specified reservation identifier.

Implementation

Future<DescribeReservedInstanceOfferingsResponse>
    describeReservedInstanceOfferings({
  int? maxResults,
  String? nextToken,
  String? reservedInstanceOfferingId,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (reservedInstanceOfferingId != null)
      'offeringId': [reservedInstanceOfferingId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/2021-01-01/opensearch/reservedInstanceOfferings',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeReservedInstanceOfferingsResponse.fromJson(response);
}