Enabling notifications
To manage costs in Yandex Cloud, you can configure notifications using budgets.
Available budget types:
- Cost: Notification is sent when the cost of resources, without discounts applied, exceeds a specified usage limit.
- Due and payable: Notification is sent when the cost of resources, with discounts and active promo codes applied, exceeds a specified usage limit.
- Balance: Notification is sent when the personal account balance falls below a specified threshold.
Note
You can create a trigger that will invoke a function in Cloud Functions or run a container in Serverless Containers when threshold values are exceeded. Read more about triggers for budgets.
Creating a budget
To create a budget, you need the editor
role. The viewer
role is enough for the specified recipients to get budget notifications. For more information on access control, see Roles.
To create a budget:
-
Go to Yandex Cloud Billing
. -
Select an account on the Billing accounts page.
-
Go to the Budgets page and click Create budget.
-
Enter the budget name.
-
Select Budget type.
-
Set the Budget amount:
- For the Cost or Due and payable type, specify the total usage cost.
- For the Balance type, specify the account balance.
-
For the Cost and Due and payable types, select a budget tracking period:
- If you selected the Custom period, set the budget start date. The start date is the first day of the month.
- Set the budget end date. The end date defines when the budget stops tracking usage or the account balance and sending notifications. The end date is the last day of the month. It must be within five years of the current date.
-
Under Notify, select the users to notify.
-
For the Cost and Due and payable types, define the budget Scope. You can select individual clouds, folders, and services to include in a set budget. By default, data is collected from all the clouds, folders, and services that the selected billing account has access to.
-
Set at least one utilization threshold to trigger notifications. You can specify a threshold as a percentage or a cash value and select the users to receive notifications. A budget can have multiple thresholds.
Note
Users listed in the General information section will receive notifications when each specified threshold is exceeded. Users listed when setting a threshold will only receive a notification when that specific threshold is reached.
If several budget thresholds are reached at the same time, users will receive a single notification.
-
-
After filling in all the fields, click Create. This will create a budget.
To create a budget, use the create REST API method for the Budget resource or the BudgetService/Create gRPC API call.