listNetworks method
Returns information about the networks in which the current Amazon Web Services account participates.
Applies to Hyperledger Fabric and Ethereum.
May throw AccessDeniedException.
May throw InternalServiceErrorException.
May throw InvalidRequestException.
May throw ThrottlingException.
Parameter framework :
An optional framework specifier. If provided, only networks of this
framework type are listed.
Parameter maxResults :
The maximum number of networks to list.
Parameter name :
The name of the network.
Parameter nextToken :
The pagination token that indicates the next set of results to retrieve.
Parameter status :
An optional status specifier. If provided, only networks currently in this
status are listed.
Applies only to Hyperledger Fabric.
Implementation
Future<ListNetworksOutput> listNetworks({
Framework? framework,
int? maxResults,
String? name,
String? nextToken,
NetworkStatus? status,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
10,
);
final $query = <String, List<String>>{
if (framework != null) 'framework': [framework.value],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (name != null) 'name': [name],
if (nextToken != null) 'nextToken': [nextToken],
if (status != null) 'status': [status.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/networks',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListNetworksOutput.fromJson(response);
}