Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud Functions
  • Comparison with other Yandex Cloud services
    • Overview
    • Function
    • Invoking a function
    • Asynchronous function invocation
    • Long-lived functions
    • Function termination notifications
    • Networking
    • Mounting external resources to a function file system
    • Builder
      • Overview
      • Timer
      • Trigger for Message Queue
      • Trigger for Object Storage
      • Trigger for Container Registry
      • Trigger for Cloud Logging
      • Trigger for Yandex IoT Core
      • Trigger for budgets
      • Trigger for Data Streams
      • Email trigger
    • Dead Letter Queue
    • Function logs
    • Backups
    • Quotas and limits
  • Tools
  • Pricing policy
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • FAQ

In this article:

  • Roles required for the proper operation of a trigger for budgets
  • Format of the message from the trigger for budgets
  • Use cases
  • See also
  1. Concepts
  2. Trigger
  3. Trigger for budgets

Trigger for budgets that invokes a Cloud Functions function

Written by
Yandex Cloud
Updated at April 18, 2025
  • Roles required for the proper operation of a trigger for budgets
  • Format of the message from the trigger for budgets
  • Use cases
  • See also

Trigger for budgets calls a Cloud Functions function when threshold values are exceeded.

A trigger for budgets needs a service account to call the function.

For more information about creating a trigger for budgets, see Creating a trigger for budgets that invokes a Cloud Functions function.

Roles required for the proper operation of a trigger for budgetsRoles required for the proper operation of a trigger for budgets

  • To create a trigger, you need a permission for the service account under which the trigger runs the operation. This permission comes with the iam.serviceAccounts.user and editor roles or higher.
  • For the trigger to fire, the service account requires the functions.functionInvoker role for the function invoked by the trigger.

Format of the message from the trigger for budgetsFormat of the message from the trigger for budgets

After the trigger is activated, it sends the following message to the function:

{
   "messages":[
      {
         "billing_account_id":"a6q6***",
         "budget_id":"a626***",
         "budget_display_name":"name",
         "amount":90012.00,
         "currency":"RUB",
         "period":"2021",
         "budgeted_amount":100000.00,
         "threshold_amount":90000.00,
         "threshold_type":"amount"
      }
   ]
}

Where:

  • billing_account_id: Billing account ID.
  • budget_id: Budget ID.
  • budget_display_name: Budget name.
  • amount: Cost of resources or personal account balance when notifications were sent.
  • currency: Payment currency.
  • period: Budget calculation period.
  • budgeted_amount: Budget amount.
  • threshold_amount: Consumption threshold that triggered notifications.
  • threshold_type: Threshold type:
    • amount: Currency.
    • percent: Percentage.

Use casesUse cases

  • Creating a budget trigger that invokes a Cloud Functions function to stop VM instances

See alsoSee also

  • Trigger for budgets that invokes a Serverless Containers container
  • Trigger for budgets that sends messages to WebSocket connections

Was the article helpful?

Previous
Trigger for Yandex IoT Core
Next
Trigger for Data Streams
© 2025 Direct Cursus Technology L.L.C.