describeConnections method

Future<Connections> describeConnections({
  1. String? connectionId,
})

Displays the specified connection or all connections in this Region.

May throw DirectConnectServerException. May throw DirectConnectClientException.

Parameter connectionId : The ID of the connection.

Implementation

Future<Connections> describeConnections({
  String? connectionId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'OvertureService.DescribeConnections'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (connectionId != null) 'connectionId': connectionId,
    },
  );

  return Connections.fromJson(jsonResponse.body);
}