Prepare and test your skills

Prepare and test your skills

Notification Channels and Programmatic Automation are the two delivery paths for Cloud Billing budgets (opens in a new tab) alerts in Google Cloud. Email notifications support manual oversight by sending a message to people when a spend threshold is met. Pub/Sub notifications support automated responses by sending budget status to code and integrations that can act on it.
Both paths are set under Manage notifications. Alerts-only budgets only inform and never automatically cap usage or stop spending.
Role-based email alerts send budget notifications to users based on their Identity and Access Management role. Email alerts to billing admins and users is the default option and sends alerts to everyone with roles/billing.admin or roles/billing.user on the target Cloud Billing account. Email alerts to project owners is available only when the budget is scoped to a single project and sends alerts to every Project Owner on that project.
To use either option, the budget must have at least one alert threshold rule. To opt out of the default billing-account emails, you must clear the checkbox.
Custom email recipients using Cloud Monitoring notification channels let a budget notify specific people who do not hold billing roles, such as project managers or developers. Only Email type notification channels are supported for budget alerts, and up to five email notification channels can be linked to one budget. The channel must be created in Cloud Monitoring first, then linked to the budget:
Once linked, budget alert emails flow from the budget to the linked Cloud Monitoring email channels when a threshold rule is met. If a previously linked channel disappears from the list, the channel was likely deleted from its Monitoring project.
Automated responses using Pub/Sub let a budget send programmatic spend updates to a Pub/Sub topic connected to the budget. Data flows from the budget to the connected Pub/Sub topic multiple times per day with the current budget status, which is different from email alerts that are sent only when a threshold is met. A subscriber to that topic can then forward the message to another medium such as Slack or run a cost-control task such as disabling Cloud Billing on a project that exceeds its budget.
To connect automation, attach a Pub/Sub topic to the budget and allow several hours for the first notification because both usage reporting and budget evaluation have delays. If the Pub/Sub JSON object must include alertThresholdExceeded and forecastThresholdExceeded, the budget needs at least one alert threshold rule.
| Delivery method | When it sends | Use it when |
|---|---|---|
| Email alerts | Only when actual or forecasted cost exceeds a threshold rule | A person needs to review spend and take manual action |
| Pub/Sub topic | Multiple times per day with current budget status | Code or an integration needs to forward messages or automate a response |
When threshold rules exist, at least one email notification option must also stay enabled, even if the main goal is automation. To send only programmatic notifications without email, remove all threshold rules, which disables the email settings.
Exam tip: Email alerts are sent only when a threshold is met, while Pub/Sub budget messages are sent multiple times per day with current status.
Budget scope and resource filtering define which costs a Google Cloud budget tracks and reports on. A budget is attached to a Cloud Billing account (opens in a new tab) and filtered to include only selected projects, services, and other resource attributes. Narrow scope gives granular tracking for one team or workload, while broad scope gives an organization-wide view.
Budget scope in Google Cloud starts with the Cloud Billing account that pays for linked Google Cloud projects. Costs flow from resources in those projects to the linked Cloud Billing account, and the budget monitors the portion of that flow selected by its filters. A realistic budget covers all aspects of the selected scope, including infrastructure costs, software licenses, and anticipated growth for each project, workload, and deployment environment.
Filtering lets one budget track a single project, one service such as Compute Engine or BigQuery, or a combination that matches a workload or environment. Spending limits or thresholds are then set for the selected projects, services, or specific resources, and spending is monitored regularly against those limits. This structure supports separate detailed budgets for production, development, staging, and other environments instead of one budget for everything.
Granular control can be extended with quotas and limits, which work alongside budgets:
Labels in Google Cloud provide resource-level filtering for cost tracking and reporting. A label is a key-value pair attached to a resource, and costs from labeled resources can be allocated to different projects, departments, or cost centers. A formal labeling policy helps teams apply the same labels consistently so reports remain comparable.
Labeled cost and usage data can be filtered by target audience, so each team sees only its relevant spending. Automation tools such as Terraform can enforce labeling on every resource that is created. Exporting billing data to BigQuery and visualizing it supports custom, team-specific reports with fine-grained access control.
A spend cap budget (opens in a new tab) in Google Cloud is an enforcement budget that pauses selected workloads when spending reaches the cap. The spend cap budget applies to a single Google Cloud project and a single eligible Google Cloud service, which is different from an alerts-only budget that only sends notifications and can cover broader scope. Its time range is automatically set to Monthly and cannot be edited, and savings settings also cannot be edited.
For certain services, the spend amount used for enforcement is based on estimated gross costs excluding savings because directional costs can be estimated faster than actual costs can be calculated. For the remaining services, the spend amount uses actual costs inclusive of all savings. When the cap is reached for Cloud Run, for example, services fail to serve traffic, new job executions fail to start, and worker pools stop processing tasks until the cap is lifted or adjusted.
Exam tip: A spend cap budget requires one project and one service on a monthly cycle, and an existing alerts-only budget cannot be converted — delete it and create a new spend cap budget.
Alert Thresholds and Triggering Logic is the system that decides when a Cloud Billing budget (opens in a new tab) sends a notification. A budget first sets a planned spend amount, and then one or more threshold rules define a percentage of that amount. When actual spend or forecasted spend crosses a threshold percentage, the budget triggers an alert to the configured recipients.
Threshold rules in Cloud Billing budgets trigger notifications when spend exceeds a percentage of the budget amount. The spend is compared against the budget total, so a 50% rule on a $1,000 budget fires at $500 and a 100% rule fires at $1,000. When a threshold is met, a budget alert email is sent only at that moment to the recipients selected in the notification settings.
Programmatic notifications behave differently because messages are sent to the connected Pub/Sub topic multiple times per day with the current status of the budget. A threshold rule must exist for email notifications to work, and removing all threshold rules disables email settings. Threshold rules are also required for the Pub/Sub message to include the alertThresholdExceeded and forecastThresholdExceeded fields. After a budget is created, it can take several hours before the first email or Pub/Sub notification arrives, and there is also a delay between using Google Cloud resources and seeing those costs in Cloud Billing.
Actual spend and forecasted spend are the two spend bases that a threshold rule can monitor. Actual spend is the cost already incurred in the current budget period, while forecasted spend is the projected total cost by the end of the budget calendar period. For example, with a $100 budget and a 110% forecasted threshold, an alert fires when the projection shows spend will exceed $110 by the end of the period.
| Spend basis | What it measures | Key limitation |
|---|---|---|
| Actual spend | Costs incurred so far in the budget period | Subject to billing reporting delay |
| Forecasted spend | Projected total cost by end of the calendar period | Cannot be used with a custom time range |
Because of reporting delay, actual costs appear in Cloud Billing after resources are used. To account for this delay, it is recommended to set the budget amount below available funds so alerts arrive before funds run out.
Default threshold rules in Cloud Billing budgets notify at three percentages of the budget amount. By default, notifications are configured for:
These defaults can be changed to match financial limits. Additional rules are added with Add threshold, and unneeded rules are removed with Delete for that row. An alerts-only budget only informs about spending trends and does not automatically cap usage or stop billing when a threshold or budget amount is met or exceeded.
Exam tip: Budgets configured for a custom time range cannot trigger alerts on forecasted costs; use a monthly, quarterly, or yearly period for forecasted alerts.
Email alerts are sent only when actual or forecasted cost exceeds a threshold rule for manual review by a person, while Pub/Sub messages are sent multiple times per day with the current budget status for automated use by code and integrations. A subscriber to the Pub/Sub topic can forward the message to another medium such as Slack or run a cost-control task such as disabling Cloud Billing on a project that exceeds its budget.
Create an Email notification channel in Cloud Monitoring first, then link it to the budget under Manage notifications by selecting Link Monitoring email notification channels to this budget and choosing the project and channels. Up to five Email notification channels can be linked to one budget, and budget alert emails flow to the linked channels when a threshold rule is met.
A spend cap budget applies to a single Google Cloud project and a single eligible Google Cloud service on a monthly cycle that cannot be edited. It pauses selected workloads when spending reaches the cap, which is different from an alerts-only budget that only sends notifications and can cover broader scope.
Default threshold rules notify at 50% of the budget amount as an early warning, 90% as spend approaches the limit, and 100% as spend reaches the planned total. Threshold rules monitor actual spend or forecasted spend, and forecasted spend cannot be used with a custom time range.
Your organization wants to implement proactive cost management controls for its Google Cloud environment. The finance team requires that billing administrators receive email alerts whenever spending reaches specified threshold percentages. At the same time, the engineering team wants to automatically trigger a Cloud Run function that scales down non-essential resources when a budget threshold is exceeded.
Which configuration should you apply to the Cloud Billing budget to meet both requirements?
Last updated