listElasticsearchInstanceTypes method
List all Elasticsearch instance types that are supported for given ElasticsearchVersion
May throw BaseException. May throw InternalException. May throw ResourceNotFoundException. May throw ValidationException.
Parameter elasticsearchVersion
:
Version of Elasticsearch for which list of supported elasticsearch
instance types are needed.
Parameter domainName
:
DomainName represents the name of the Domain that we are trying to modify.
This should be present only if we are querying for list of available
Elasticsearch instance types when modifying existing domain.
Parameter maxResults
:
Set this value to limit the number of results returned. Value provided
must be greater than 30 else it wont be honored.
Parameter nextToken
:
NextToken should be sent in case if earlier API call produced result
containing NextToken. It is used for pagination.
Implementation
Future<ListElasticsearchInstanceTypesResponse>
listElasticsearchInstanceTypes({
required String elasticsearchVersion,
String? domainName,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(elasticsearchVersion, 'elasticsearchVersion');
_s.validateStringLength(
'domainName',
domainName,
3,
28,
);
_s.validateNumRange(
'maxResults',
maxResults,
0,
100,
);
final $query = <String, List<String>>{
if (domainName != null) 'domainName': [domainName],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/2015-01-01/es/instanceTypes/${Uri.encodeComponent(elasticsearchVersion)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListElasticsearchInstanceTypesResponse.fromJson(response);
}