listVirtualInterfaceRoutes method

Future<ListVirtualInterfaceRoutesResponse> listVirtualInterfaceRoutes({
  1. RouteFilters? filters,
  2. int? maxResults,
  3. String? nextToken,
  4. String? virtualInterfaceId,
})

Lists the routes for the specified virtual interface.

Use the routeDirection filter to control which routes are returned:

  • accepted: routes received from the customer network over the virtual interface.
  • advertised: routes advertised to the customer network over the virtual interface.

May throw DirectConnectClientException. May throw DirectConnectServerException.

Parameter filters : The filters to apply to the routes returned.

Parameter maxResults : The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

If MaxResults is given a value larger than 100, only 100 results are returned.

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

Parameter virtualInterfaceId : The ID of the virtual interface.

Implementation

Future<ListVirtualInterfaceRoutesResponse> listVirtualInterfaceRoutes({
  RouteFilters? filters,
  int? maxResults,
  String? nextToken,
  String? virtualInterfaceId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'OvertureService.ListVirtualInterfaceRoutes'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (filters != null) 'filters': filters,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
      if (virtualInterfaceId != null)
        'virtualInterfaceId': virtualInterfaceId,
    },
  );

  return ListVirtualInterfaceRoutesResponse.fromJson(jsonResponse.body);
}