listConnectPeers method

Future<ListConnectPeersResponse> listConnectPeers({
  1. String? connectAttachmentId,
  2. String? coreNetworkId,
  3. int? maxResults,
  4. String? nextToken,
})

Returns a list of core network Connect peers.

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

Parameter connectAttachmentId : The ID of the attachment.

Parameter coreNetworkId : The ID of a core network.

Parameter maxResults : The maximum number of results to return.

Parameter nextToken : The token for the next page of results.

Implementation

Future<ListConnectPeersResponse> listConnectPeers({
  String? connectAttachmentId,
  String? coreNetworkId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    500,
  );
  final $query = <String, List<String>>{
    if (connectAttachmentId != null)
      'connectAttachmentId': [connectAttachmentId],
    if (coreNetworkId != null) 'coreNetworkId': [coreNetworkId],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/connect-peers',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListConnectPeersResponse.fromJson(response);
}