describeReservedInstanceOfferings method

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

Lists available reserved OpenSearch instance offerings.

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

Parameter maxResults : Set this value to limit the number of results returned. If not specified, defaults to 100.

Parameter nextToken : Provides an identifier to allow retrieval of paginated results.

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

Implementation

Future<DescribeReservedInstanceOfferingsResponse>
    describeReservedInstanceOfferings({
  int? maxResults,
  String? nextToken,
  String? reservedInstanceOfferingId,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    100,
  );
  _s.validateStringLength(
    'reservedInstanceOfferingId',
    reservedInstanceOfferingId,
    36,
    36,
  );
  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);
}