정의
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.
stream processing 작업 공간에 연결된 동안에만 이 명령을 호출할 수 있습니다.
이 명령에는
mongosh버전 이상 2.0 이(가) 필요합니다.
구문
The sp.listConnections() method has the following syntax:
sp.listConnections()
명령 필드
sp.listConnections() 필드를 사용하지 않습니다.
행동
sp.listConnections() 현재 stream processing 작업 공간의 연결 레지스트리에 있는 모든 연결을 설명하는 문서를 shell에 반환합니다.
액세스 제어
를 실행 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 }