getLinkAssociations method
Gets the link associations for a device or a link. Either the device ID or the link ID must be specified.
May throw ValidationException. May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw InternalServerException.
Parameter globalNetworkId :
The ID of the global network.
Parameter deviceId :
The ID of the device.
Parameter linkId :
The ID of the link.
Parameter maxResults :
The maximum number of results to return.
Parameter nextToken :
The token for the next page of results.
Implementation
Future<GetLinkAssociationsResponse> getLinkAssociations({
  required String globalNetworkId,
  String? deviceId,
  String? linkId,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(globalNetworkId, 'globalNetworkId');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    500,
  );
  final $query = <String, List<String>>{
    if (deviceId != null) 'deviceId': [deviceId],
    if (linkId != null) 'linkId': [linkId],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/global-networks/${Uri.encodeComponent(globalNetworkId)}/link-associations',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetLinkAssociationsResponse.fromJson(response);
}