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:
az consumption budget update --subscription $sub \
--notifications @myazjson.json \
--budget-name $budgetName
myazjson.json file content
{
"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'(<class 'bool'>)
when I try:
##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'(<class 'int'>)
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
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
I tried many combination and nothing works:
even tried JSON file directly like this:
myazjson.json file content
{ "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'(<class 'bool'>)when I try:
get
Failed to parse '--notifications' argument: dict type value expected, got '80'(<class 'int'>)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