Docs 菜单
Docs 主页
/ /
Atlas CLI
/

Atlas 设置

在此页面上

  • 语法
  • 选项
  • 继承选项
  • 举例

注册、身份验证、创建和访问 Atlas 集群。

此命令将引导您完成注册、登录、创建默认配置文件、创建第一个免费套餐集群并使用 MongoDB Shell 连接到该集群。

命令语法
atlas setup [options]
名称
类型
必需
说明
--accessListIp
字符串
false

用于授予对部署访问权限的 IP 地址。

与 --currentIp 互斥。

--clusterName
字符串
false
集群名称。 要了解详情,请参阅 https://dochub.mongodb.org/core/create-cluster-api。
--currentIp
false

将当前正在执行命令的主机的 IP 地址添加到访问列表的标志。

与 --accessListIp 互斥。

--enableTerminationProtection
false
为集群启用终止保护。 无法删除已启用终止保护的集群。
--force
false
指示是否跳过输入请求并使用任何未指定选项的默认设置创建集群的标志。
--gov
false
向 Atlas for Government 注册。
-h,--help
false
设置帮助
--noBrowser
false
不要尝试打开浏览器会话。
--password
字符串
false
用户的密码。
--projectId
字符串
false
标识要使用的项目的十六进制字符串。 此选项会覆盖配置文件或环境变量中的设置。
--provider
字符串
false
您的云服务提供商的名称。 有效值为 Amazon Web Services、Azure 或 GCP。
-r, --region
字符串
false
MongoDB cluster的物理位置。 有关支持的Amazon Web Services 区域的完整列表,请参阅: https ://dochub.mongodb.org/core/aws-atlas 。有关支持的 Azure 区域的完整列表,请参阅: https ://dochub.mongodb.org/core/azure-atlas 。有关支持的 GCP 区域的完整列表,请参阅: https://dochub.mongodb.org/core/gcp-atlas。
--skipMongosh
false
指示是否跳过使用 MongoDB Shell 访问部署的标志。
--skipSampleData
false
指示是否跳过将样本数据加载到 MongoDB cluster 的标志。
--tag
key=value
false
包含长度介于 1 到 255 个字符之间的键值对的列表,用于对集群进行标记和分类。
--tier
字符串
false
集群中每个数据承载服务器的层级。 要了解有关集群层的更多信息,请参阅 https://dochub.mongodb.org/core/cluster-tier-atlas 。此值默认为“M 0 ”。
--username
字符串
false
用于向 MongoDB 进行身份验证的用户名。
名称
类型
必需
说明
-P, --profile
字符串
false
要从配置文件中使用的配置文件的名称。 要了解 Atlas CLI 的配置文件,请参阅 https://dochub.mongodb.org/core/atlas-cli-save-connection-settings。
# Override default cluster settings like name, provider, or database username by using the command options
atlas setup --clusterName Test --provider GCP --username dbuserTest

后退

观看