listOdbPeeringConnections method

Future<ListOdbPeeringConnectionsOutput> listOdbPeeringConnections({
  1. int? maxResults,
  2. String? nextToken,
  3. String? odbNetworkId,
})

Lists all ODB peering connections or those associated with a specific ODB network.

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

Parameter maxResults : The maximum number of ODB peering connections to return in the response.

Default: 20

Constraints:

  • Must be between 1 and 100.

Parameter nextToken : The pagination token for the next page of ODB peering connections.

Parameter odbNetworkId : The identifier of the ODB network to list peering connections for.

If not specified, lists all ODB peering connections in the account.

Implementation

Future<ListOdbPeeringConnectionsOutput> listOdbPeeringConnections({
  int? maxResults,
  String? nextToken,
  String? odbNetworkId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'Odb.ListOdbPeeringConnections'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
      if (odbNetworkId != null) 'odbNetworkId': odbNetworkId,
    },
  );

  return ListOdbPeeringConnectionsOutput.fromJson(jsonResponse.body);
}