mongocli iam organization delete
The mongocli iam organization delete
command deletes an organization
in your Ops Manager instance.
To run this command you must have the following permissions based on your API Key type:
API Key Type | Role |
---|---|
Global API Keys | Global Owner |
Personal API Keys | Organization Owner |
Syntax
mongocli iam organization|organizations|org|orgs delete|rm <organization-id> [ --force ] [ --output|-o <output-format> ] [ --profile|-P <profile-name> ]
Note
Use -h
or --help
to view the command-line help for
this command.
Options
Option | Type | Description | Required? |
---|---|---|---|
--force | Flag that indicates that the organization can be deleted without
requiring confirmation. | no | |
<organization-ID> | string | Unique identifier of the organization you want to delete. | yes |
--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. Your credentials can either be a Global API key pair or a Personal API key. 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.
Organization '<organization-id>' deleted
Examples
Delete an Organization with Confirmation
The following command deletes an organization with the ID
5e33545ef10fab20b49c0f3b
in an Ops Manager instance. The command
uses the default profile, which contains API keys that have the
Global Owner
role.
mongocli iam organization delete 5e33545ef10fab20b49c0f3b
The previous command prints the following to the terminal. For more information on these fields, see Output.
? Are you sure you want to delete: 5e33545ef10fab20b49c0f3b Yes Organization '5e33545ef10fab20b49c0f3b' deleted
Delete an Organization without Confirmation
The following command deletes an organization without requiring
confirmation. The command uses the default profile, which contains
API keys that have the Global Owner
role.
mongocli iam organization delete 9dj3545ef10fab20b49c0f3b --force
The previous command prints the following to the terminal:
Organization '9dj3545ef10fab20b49c0f3b' deleted