Navigation

Alpha Release of MongoDB CLI

This is a pre-release early version of MongoDB CLI. Do not use MongoDB CLI to manage production environments.

mongocli cloud-manager alerts configs delete

On this page

The alerts configs delete command deletes the specified alert configuration in a Cloud Manager project. You must confirm the operation when you run this command without the --force option.

You can also delete a alert configuration using the Cloud Manager UI or API.

Syntax

mongocli cloud-manager|cm alerts configs delete|rm|Delete|Remove <alert-id>
     [ --force ]
     [ --profile|-p <profile-name> ]
     [ --projectId <project-ID> ]

Options

Option Type Description Required?
<alert-id> string ID of the alert configuration to delete. yes
--force   Flag that indicates that the alert configuration can be deleted without requiring confirmation. no
--profile, -p string Name of the profile where the public and private keys for the project are saved. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI. no
--projectId string Unique identifier of the project containing the alert configuration to delete. If omitted, uses the project ID in the profile or environment variable. no

Output

The command prints a confirmation message similar to the following to the terminal if it succeeds. If the command prints an error, see Troubleshooting for recommended solutions.

Alert config '<alert-id>' deleted

If you choose not to delete the alert configuration, the command prints a message similar to the following:

Alert config not deleted

Examples

Basic Example

The following alerts configs delete command deletes an alert configuration with the ID 5ec4518ce4a7ba70e03dbf13 after prompting for a confirmation. The command uses the default profile.

mongocli cm alerts configs delete 5ec4518ce4a7ba70e03dbf13

The command prints the following to the terminal:

? Are you sure you want to delete: 5ec4518ce4a7ba70e03dbf13 Yes
Alert config '5ec4518ce4a7ba70e03dbf13' deleted

Force Example

The following alerts configs delete command deletes an alert configuration with the ID 5ec4518ce4a7ba70e03dbf13 without requiring confirmation. The command uses the default profile.

mongocli cm alerts configs delete 5ec4518ce4a7ba70e03dbf13 --force

The command prints the following to the terminal:

Alert config '5ec4518ce4a7ba70e03dbf13' deleted