describeVirtualInterfaces method

Future<VirtualInterfaces> describeVirtualInterfaces({
  1. String? connectionId,
  2. int? maxResults,
  3. String? nextToken,
  4. String? virtualInterfaceId,
})

Displays all virtual interfaces for an Amazon Web Services account. Virtual interfaces deleted fewer than 15 minutes before you make the request are also returned. If you specify a connection ID, only the virtual interfaces associated with the connection are returned. If you specify a virtual interface ID, then only a single virtual interface is returned.

A virtual interface (VLAN) transmits the traffic between the Direct Connect location and the customer network.

  • If you're using an asn, the response includes ASN value in both the asn and asnLong fields.
  • If you're using asnLong, the response returns a value of 0 (zero) for the asn attribute because it exceeds the highest ASN value of 2,147,483,647 that it can support

May throw DirectConnectClientException. May throw DirectConnectServerException.

Parameter connectionId : The ID of the connection.

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<VirtualInterfaces> describeVirtualInterfaces({
  String? connectionId,
  int? maxResults,
  String? nextToken,
  String? virtualInterfaceId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'OvertureService.DescribeVirtualInterfaces'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (connectionId != null) 'connectionId': connectionId,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
      if (virtualInterfaceId != null)
        'virtualInterfaceId': virtualInterfaceId,
    },
  );

  return VirtualInterfaces.fromJson(jsonResponse.body);
}