listHypervisors method

Future<ListHypervisorsOutput> listHypervisors({
  1. int? maxResults,
  2. String? nextToken,
})

Lists your hypervisors.

Parameter maxResults : The maximum number of hypervisors to list.

Parameter nextToken : The next item following a partial list of returned resources. For example, if a request is made to return maxResults number of resources, NextToken allows you to return more items in your list starting at the location pointed to by the next token.

Implementation

Future<ListHypervisorsOutput> listHypervisors({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1152921504606846976,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'BackupOnPremises_v20210101.ListHypervisors'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListHypervisorsOutput.fromJson(jsonResponse.body);
}