Your company wants to make sure its development project never exceeds its USD 1,000 monthly spend. At 75 % of that amount, a Cloud Function must run that labels and shuts down all non-production VM instances. Which Google Cloud feature should you configure so that a Pub/Sub message is automatically published when the 75 % spend threshold is reached and can be used to trigger the function?
Schedule a daily BigQuery billing export query with Cloud Scheduler and publish a Pub/Sub message when spend exceeds 75 %.
Create a Cloud Billing budget that includes a 75 % alert and enable Pub/Sub notifications on that budget.
Configure a Cloud Audit Logs sink that exports billing log entries to a Pub/Sub topic.
Set up a Cloud Monitoring alerting policy on the billing/cost metric with a Pub/Sub notification channel.
Cloud Billing budgets include an option to publish a message to a Cloud Pub/Sub topic whenever a specified percentage of the budget is reached. When you set a budget and add a 75 % alert threshold, the Billing Budget service publishes a JSON-formatted message to the chosen topic. A Cloud Function subscribed to that topic can then execute any automated response, such as labeling or stopping VMs. Cloud Monitoring alert policies, Audit Logs sinks, or Cloud Scheduler queries all require additional data processing and do not natively emit spend-threshold events; therefore they are not the most direct or supported way to trigger programmatic actions from a budget limit.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
How does a Cloud Billing budget work in Google Cloud?
Open an interactive chat with Bash
What is a Cloud Pub/Sub topic and how does it integrate with Cloud Billing budgets?
Open an interactive chat with Bash
Why is using Cloud Billing budgets better than other approaches like Cloud Monitoring or Audit Logs for cost thresholds?
Open an interactive chat with Bash
What is a Google Cloud Billing Budget?
Open an interactive chat with Bash
How does Cloud Pub/Sub work in the context of a Cloud Billing Budget?
Open an interactive chat with Bash
Why is Cloud Billing Budget preferred over other solutions for monitoring spend thresholds?
Open an interactive chat with Bash
GCP Associate Cloud Engineer
Setting up a cloud solution environment
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .