mongocli atlas alerts settings delete
The alerts settings delete
command deletes the specified alert
configuration in a Atlas project. You must confirm the operation
when you run this command without the --force
option.
You can also delete a alert configuration using the Atlas API or UI.
Syntax
mongocli atlas alerts settings|configs delete|rm|Delete|Remove <alert-id> [ --force ] [ --output|-o <output-format> ] [ --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 | |
--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 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. If omitted, uses the project ID in the profile or environment variable. | no |
Note
Use -h
or --help
to view the command-line help for
this command.
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 settings delete
command deletes
an alert configuration with the ID 5ec4518ce4a7ba70e03dbf13
after
prompting for a confirmation. The command uses the default profile.
mongocli atlas alerts settings 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 settings delete
command deletes
an alert configuration with the ID 5ec4518ce4a7ba70e03dbf13
without
requiring confirmation. The command uses the default profile.
mongocli atlas alerts settings delete 5ec4518ce4a7ba70e03dbf13 --force
The command prints the following to the terminal:
Alert config '5ec4518ce4a7ba70e03dbf13' deleted