listServiceNetworks method

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

Lists the service networks owned by or shared with this account. The account ID in the ARN shows which account owns the service network.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter maxResults : The maximum number of results to return.

Parameter nextToken : A pagination token for the next page of results.

Implementation

Future<ListServiceNetworksResponse> listServiceNetworks({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    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: '/servicenetworks',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListServiceNetworksResponse.fromJson(response);
}