Docs Menu
Docs Home
/ /
MongoDB CLI
/ / /

mongocli iam projects create

On this page

  • Syntax
  • Arguments
  • Options
  • Inherited Options
  • Output
  • Examples

Create a project in your organization.

Projects group clusters into logical collections that support an application environment, workload, or both. Each project can have its own users, teams, security, and alert settings.

To use this command, you must authenticate with a user account or an API key with the Project Data Access Read/Write role.

Command Syntax
mongocli iam projects create <projectName> [options]
Name
Type
Required
Description
projectName
string
true
Label that identifies the project.
Name
Type
Required
Description
-h, --help
false
help for create
--orgId
string
false
Organization ID to use. This option overrides the settings in the configuration file or environment variable.
-o, --output
string
false
Output format. Valid values are json, json-path, go-template, or go-template-file. To see the full output, use the -o json option.
--ownerId
string
false
Unique 24-digit string that identifies the Atlas user to be granted the Project Owner role on the specified project. If unspecified, this value defaults to the user ID of the oldest Organization Owner.
--withoutDefaultAlertSettings
false
Flag that creates the new project without the default alert settings enabled. This flag defaults to false. This option is useful if you create projects programmatically and want to create your own alerts instead of using the default alert settings.
Name
Type
Required
Description
-P, --profile
string
false
Name of the profile to use from your configuration file. To learn about profiles for MongoCLI, see https://dochub.mongodb.org/core/atlas-cli-configuration-file.

If the command succeeds, the CLI returns output similar to the following sample. Values in brackets represent your values.

Project '<ID>' created.
# Create a project in the organization with the ID 5e2211c17a3e5a48f5497de3 using default alert settings:
mongocli iam projects create --orgId 5e2211c17a3e5a48f5497de3 --output json

Back

list