mongocli iam organization create
The mongocli iam organization create
command creates a new
Cloud Manager or Ops Manager organization.
You must have the Global Owner
role to create an organization.
Syntax
mongocli iam organization|organizations|org|orgs create <organization-name> [ --output|-o <output-format> ] [ --profile|-P <profile-name> ]
Important
The service for which the organization is created is determined by your profile.
Note
Use -h
or --help
to view the command-line help for
this command.
Options
Option | Type | Description | Required? | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no | |||||||||
--profile , -P | string | Name of the profile where your credentials are saved. You must have credentials with the
The profile must include a
If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI. | no |
Output
The command prints following fields in the specified format to the terminal if the command succeeds. If the command returns errors, see Troubleshooting for recommended solutions.
Field | Description |
---|---|
id | Unique identifier of the organization. |
links | One or more links to sub-resources and/or related resources.
The relations between URLs are explained in the Web Linking
Specification. |
name | Name of the organization. |
Examples
The following command creates an Ops Manager organization called
myOrg
using the default profile, which contains the
Global Owner
credentials and specifies the Ops Manager service:
mongocli iam organization create myOrg --output json
The previous command creates the Ops Manager organization myOrg
and
prints the following in the specified format to the terminal. For more
information on these fields, see
Output.
{ "id": "abcdefghi123456789", "isDeleted": false, "links": [ { "rel": "self", "href": "www.example.com:8080/api/public/v1.0/orgs/abcdefghi123456789" }, { "rel": "http://mms.mongodb.com/groups", "href": "www.example.com:8080/api/public/v1.0/orgs/abcdefghi123456789/groups" }, { "rel": "http://mms.mongodb.com/teams", "href": "www.example.com:8080/api/public/v1.0/orgs/abcdefghi123456789/teams" }, { "rel": "http://mms.mongodb.com/users", "href": "www.example.com:8080/api/public/v1.0/orgs/abcdefghi123456789/users" } ], "name": "myOrg" }