[Reference feedback]: budget-update how to format notifications? need example
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Type of issue
Missing information
### Reference command name
az consumption budget update
### Feedback
https://learn.microsoft.com/en-us/cli/azure/consumption/budget?view=azure-cli-latest#az-consumption-budget-update
can you please provide example how to format the `--notifications` ?
help which doesn't work for me
```
Argument
--notifications{} : Object
See https://aka.ms/cli-shorthand for more about shorthand syntax.
Object Properties
contact-emails [Required] : Email addresses to send the budget notification to when the
threshold is exceeded. Try "??" to show more.
enabled [Required] : The notification is enabled or not. Allowed values: 0, 1, f, false,
n, no, t, true, y, yes.
operator [Required] : The comparison operator. Allowed values: EqualTo, GreaterThan,
GreaterThanOrEqualTo.
threshold [Required] : Threshold value associated with a notification. Notification is sent
when the cost exceeded the threshold. It is always percent and has to
be between 0 and 1000.
contact-groups : Action groups to send the budget notification to when the threshold
is exceeded. Try "??" to show more.
contact-roles : Contact roles to send the budget notification to when the threshold
is exceeded. Try "??" to show more.
```
I tried many combination and nothing works:
even tried JSON file directly like this:
```bash
az consumption budget update --subscription $sub \
--notifications @myazjson.json \
--budget-name $budgetName
```
myazjson.json file content
```json
{
"enabled": true,
"operator": "GreaterThan",
"contact-emails": [
"tilo@example.com"
],
"threshold": 80
}
```
Get error:
`Failed to parse '--notifications' argument: Invalid 'enabled' : dict type value expected, got 'True'()`
when I try:
```bash
##now update with notifications
az consumption budget update --subscription $sub \
--notifications threshold=80 contact-emails="tilo@example.com" \
--budget-name $budgetName
```
get
`Failed to parse '--notifications' argument: dict type value expected, got '80'()`
### Page URL
https://learn.microsoft.com/en-us/cli/azure/consumption/budget?view=azure-cli-latest#az-consumption-budget-create
### Content source URL
https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/docs-ref-autogen/Latest-version/latest/consumption/budget.yml
### Author
@mikefrobbins
### Document Id
3a2ce95e-5537-7024-8671-d81c69ff4f69
Contributor guide
Assessment
This issue has not been assessed yet.