atlas organizations create
创建组织。
使用 API 密钥进行身份验证时,API 密钥所属的组织必须启用跨组织计费。 生成的组织将链接到付款组织。
语法
atlas organizations create <name> [options]
参数
名称 | 类型 | 必需 | 说明 |
---|---|---|---|
名称 | 字符串 | true | 标识组织的标签。 |
选项
名称 | 类型 | 必需 | 说明 |
---|---|---|---|
--apiKeyDescription | 字符串 | false | API 密钥的描述。 创建使用 API 密钥进行身份验证的组织时必需。 |
--apiKeyRole | 字符串 | false | 要分配给API密钥的一个或多个角色。要分配多个角色,请为每个角色指定单独的角色标志,或使用一个角色标志将所有角色指定为以逗号分隔的列表。有关接受值的完整列表,请参阅相应Atlas API端点的枚举项:https://www.mongodb.com/zh-cn/docs/atlas/reference/api-resources-spec/v2/#标签/Programmatic- API-Keys/operation/createApiKey。要学习;了解有关组织级别用户角色的更多信息,请参阅:https://dochub.mongodb.org/core/atlas-org-roles。创建使用API密钥进行身份验证的组织时必需。 |
--federationSettingsId | 字符串 | false | 唯一的 24-十六进制数字string ,用于标识联合设置。 |
-h,--help | false | 创建帮助 | |
-o, --output | 字符串 | false | 输出格式。 有效值为 json、json-path、go-template 或 go-template-file。 要查看完整输出,请使用 -o json 选项。 |
--ownerId | 字符串 | false | 唯一的 24 位字符串,用于标识要被授予指定组织的 Org Owner 角色的 Atlas user。使用 API 密钥时必需。 |
继承选项
名称 | 类型 | 必需 | 说明 |
---|---|---|---|
-P, --profile | 字符串 | false | 要从配置文件中使用的配置文件的名称。 要了解 Atlas CLI 的配置文件,请参阅 https://dochub.mongodb.org/core/atlas-cli-save-connection-settings。 |
示例
# Create an Atlas organization with the name myOrg: atlas organizations create myOrg --output json