如何通过 api 或 shell 命令在 mongodb atlas 集群中配置 IP 访问?

How to configure IP access in mongodb atlas cluster though api or shell command?

如何通过 api 或 shell 命令在 mongodb atlas 集群中配置 IP 访问?

每次通过mongodb GUI web平台配置IP访问mongodb atlas集群非常耗时。

如果我们有一些选项可以通过一些api或一些mongo shell命令添加IP来访问mongodb atlas集群,这将非常容易,那么如何实现呢?

mongodb atlas network access section

API 文档 - 用于管理访问列表:https://docs.atlas.mongodb.com/reference/api/access-lists/