CLI

l4 alerts delete

Delete a cost alert and the history of everything it said. Pause it instead to keep that history.

l4 alerts delete deletes a cost alert, along with every firing and recovery it recorded. Nothing brings either back. To stop an alert's notifications and keep its history, pause it instead.

l4 alerts delete <id> [--yes]

Flags

FlagDescription
-y, --yesSkip the confirmation prompt

Confirmation

At a terminal, the command asks Delete cost alert <id> and its history? [y/N]. Anything other than y or yes aborts, prints Aborted., and exits 0 without calling the API.

Outside a terminal there is nobody to answer the prompt, so a piped or scheduled run without --yes exits 1 with deleting <id> outside a terminal needs --yes, before the CLI sends anything.

Requires a read-write key

A read-only key fails with exit 1 and permission denied. See CLI authentication.

Output

A success line naming the alert. With --json, {"id": "<id>", "deleted": true}.

Errors

ExitSymptomCause
1... is not a cost alert idThe id is not a UUID
1deleting ... outside a terminal needs --yesNo terminal to confirm on, and no --yes
1403 permission deniedThe key is read-only
1404No alert has that id, or it was already deleted

On this page

Ask the FinOps Agent about your cloud spend