-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[Reference feedback]: budget-update how to format notifications? need example #31435
Copy link
Copy link
Open
Labels
Service AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.act-codegen-extensibility-squadconsumptioncustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-triageThis is a new issue that needs to be triaged to the appropriate team.This is a new issue that needs to be triaged to the appropriate team.
Description
Type of issue
Missing information
Reference command name
az consumption budget update
Feedback
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 $budgetNameget
Failed to parse '--notifications' argument: dict type value expected, got '80'(<class 'int'>)
Page URL
Content source URL
Author
Document Id
3a2ce95e-5537-7024-8671-d81c69ff4f69
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Service AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.act-codegen-extensibility-squadconsumptioncustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-triageThis is a new issue that needs to be triaged to the appropriate team.This is a new issue that needs to be triaged to the appropriate team.