重命名配置文件。
公共预览版:从MongoDB Atlas Admin API自动生成的 atlas api 子命令提供了对 Admin API的全面覆盖,目前处于公共预览阶段(请通过以下网址提供反馈: https:// 反馈.mongodb.com/ forum/930808 -atlas-cli )。 Admin API功能有自己的发布生命周期,您可以通过提供的API端点文档链接进行检查。
语法
命令语法
atlas config rename <oldProfileName> <newProfileName> [options]
参数
名称 | 类型 | 必需 | 说明 |
---|---|---|---|
oldProfileName | 字符串 | true | 要重命名的配置文件的名称。 |
newProfileName | 字符串 | true | 配置文件的新名称。 |
选项
名称 | 类型 | 必需 | 说明 |
---|---|---|---|
-h,--help | false | 重命名帮助 |
继承选项
名称 | 类型 | 必需 | 说明 |
---|---|---|---|
-P, --profile | 字符串 | false | 要从配置文件中使用的配置文件的名称。 要了解 Atlas CLI 的配置文件,请参阅 https://dochub.mongodb.org/core/atlas-cli-save-connection-settings。 |
示例
# Rename a profile called myProfile to testProfile: atlas config rename myProfile testProfile