listNodes method
Returns a list of nodes.
May throw ConflictException.
May throw InternalServerException.
May throw ValidationException.
Parameter category :
Search for nodes by category.
Parameter maxResults :
The maximum number of nodes to return in one page of results.
Parameter nextToken :
Specify the pagination token from a previous request to retrieve the next
page of results.
Parameter ownerAccount :
Search for nodes by the account ID of the nodes' owner.
Parameter packageName :
Search for nodes by name.
Parameter packageVersion :
Search for nodes by version.
Parameter patchVersion :
Search for nodes by patch version.
Implementation
Future<ListNodesResponse> listNodes({
NodeCategory? category,
int? maxResults,
String? nextToken,
String? ownerAccount,
String? packageName,
String? packageVersion,
String? patchVersion,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
25,
);
final $query = <String, List<String>>{
if (category != null) 'category': [category.value],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (ownerAccount != null) 'ownerAccount': [ownerAccount],
if (packageName != null) 'packageName': [packageName],
if (packageVersion != null) 'packageVersion': [packageVersion],
if (patchVersion != null) 'patchVersion': [patchVersion],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/nodes',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListNodesResponse.fromJson(response);
}