describeInstanceTypeLimits method

Future<DescribeInstanceTypeLimitsResponse> describeInstanceTypeLimits({
  1. required String engineVersion,
  2. required OpenSearchPartitionInstanceType instanceType,
  3. String? domainName,
})

Describes the instance count, storage, and master node limits for a given OpenSearch or Elasticsearch version and instance type.

May throw BaseException. May throw InternalException. May throw InvalidTypeException. May throw LimitExceededException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter engineVersion : Version of OpenSearch or Elasticsearch, in the format Elasticsearch_X.Y or OpenSearch_X.Y. Defaults to the latest version of OpenSearch.

Parameter instanceType : The OpenSearch Service instance type for which you need limit information.

Parameter domainName : The name of the domain. Only specify if you need the limits for an existing domain.

Implementation

Future<DescribeInstanceTypeLimitsResponse> describeInstanceTypeLimits({
  required String engineVersion,
  required OpenSearchPartitionInstanceType instanceType,
  String? domainName,
}) async {
  final $query = <String, List<String>>{
    if (domainName != null) 'domainName': [domainName],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/2021-01-01/opensearch/instanceTypeLimits/${Uri.encodeComponent(engineVersion)}/${Uri.encodeComponent(instanceType.value)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeInstanceTypeLimitsResponse.fromJson(response);
}