定義
sp.listConnections()Returns documents for each connection in the connection registry of the current stream processing workspace. Each document provides descriptive information including the name and type of each connection.
このコマンドは、ストリーム処理ワークスペースに接続しているときにのみ呼び出せます。
このコマンドには、
mongoshバージョン `` 2.0が必要です。
構文
The sp.listConnections() method has the following syntax:
sp.listConnections()
コマンドフィールド
sp.listConnections() フィールドは含まれません。
動作
sp.listConnections() は、シェルへの現在のストリーム処理ワークスペースの接続レジストリ内のすべての接続を説明するドキュメントを返します。
アクセス制御
sp.listConnections()を実行中ユーザーには atlasAdmin ロールが必要です。
例
次の例えは、 sp.listConnections()からの予想される応答を示しています。
sp.listStreamProcessors()
1 { 2 ok: 1, 3 connections: [ 4 { name: 'vt', type: 'atlas', cluster: 'versiontest' }, 5 { name: 'testkafka', type: 'kafka' }, 6 { name: 'sample_stream_solar', type: 'inmemory' }, 7 { name: 'jsncluster0', type: 'atlas', cluster: 'jsncluster0' } 8 ] 9 }