listDomainsForPackage method
Lists all Amazon ES domains associated with the package.
May throw BaseException. May throw InternalException. May throw ResourceNotFoundException. May throw AccessDeniedException. May throw ValidationException.
Parameter packageID
:
The package for which to list domains.
Parameter maxResults
:
Limits results to a maximum number of domains.
Parameter nextToken
:
Used for pagination. Only necessary if a previous API call includes a
non-null NextToken value. If provided, returns results for the next page.
Implementation
Future<ListDomainsForPackageResponse> listDomainsForPackage({
required String packageID,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(packageID, 'packageID');
_s.validateNumRange(
'maxResults',
maxResults,
0,
100,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/2015-01-01/packages/${Uri.encodeComponent(packageID)}/domains',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListDomainsForPackageResponse.fromJson(response);
}