describeReservedElasticsearchInstanceOfferings method

Future<DescribeReservedElasticsearchInstanceOfferingsResponse> describeReservedElasticsearchInstanceOfferings({
  1. int? maxResults,
  2. String? nextToken,
  3. String? reservedElasticsearchInstanceOfferingId,
})

Lists available reserved Elasticsearch 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 : NextToken should be sent in case if earlier API call produced result containing NextToken. It is used for pagination.

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

Implementation

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