Docs 菜单
Docs 主页
/ /

atlas clusters connect

连接到Atlas 集群。如果集群暂停,请先运行atlas 集群 start。

命令语法
atlas clusters connect [clusterName] [options]
名称
类型
必需
说明

集群名称

字符串

false

要连接到的集群的名称。

名称
类型
必需
说明

--autoScalingMode

字符串

false

集群扩展的模式。有效值为 clusterWideScaling 或 IndependentShardScaling。

--connectWith

字符串

false

连接到部署的方法。有效值为Compass、 connectionString 、 mongosh和 vscode 。

--connectionStringType

字符串

false

连接string的类型。 如果指定“private”,此选项将检索网络对等互连端点的连接string 。 如果指定“privateEndpoint”,此选项将检索私有端点的分片优化连接字符串。 该值默认为“标准”。

-h,--help

false

连接帮助

-o, --output

字符串

false

输出格式。 有效值为 json、json-path、go-template 或 go-template-file。 要查看完整输出,请使用 -o json 选项。

--password

字符串

false

用户的密码。

--projectId

字符串

false

标识要使用的项目的十六进制字符串。 此选项会覆盖配置文件或环境变量中的设置。

--username

字符串

false

用于向 MongoDB 进行身份验证的用户名。

名称
类型
必需
说明

-P, --profile

字符串

false

要从您的配置文件中使用的配置文件的名称。要学习;了解Atlas CLI配置文件,请参阅 https://dochub.mongodb.org/core/atlas-cli-save-connection-settings。

后退

名单

在此页面上