ThresholdRule contains the definition of a threshold. Threshold
rules define the triggering events used to generate a budget
notification email. When a threshold is crossed (spend exceeds the
specified percentages of the budget), budget alert emails are sent
to the email recipients you specify in the
NotificationsRule <#notificationsrule>__.
Threshold rules also affect the fields included in the JSON data
object <https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format>__
sent to a Pub/Sub topic.
Threshold rules are required if using email notifications.
Threshold rules are optional if only setting a `pubsubTopic
NotificationsRule <#NotificationsRule>`__, unless you want your JSON
data object to include data about the thresholds you set.
For more information, see set budget threshold rules and
actions <https://cloud.google.com/billing/docs/how-to/budgets#budget-actions>__.
Attributes
Name
Description
threshold_percent
float
Required. Send an alert when this threshold
is exceeded. This is a 1.0-based percentage, so
0.5 = 50%. Validation: non-negative number.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Class ThresholdRule (1.17.2)\n\nVersion latestkeyboard_arrow_down\n\n- [1.17.2 (latest)](/python/docs/reference/billingbudgets/latest/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.17.1](/python/docs/reference/billingbudgets/1.17.1/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.16.0](/python/docs/reference/billingbudgets/1.16.0/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.15.1](/python/docs/reference/billingbudgets/1.15.1/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.14.5](/python/docs/reference/billingbudgets/1.14.5/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.13.0](/python/docs/reference/billingbudgets/1.13.0/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.12.0](/python/docs/reference/billingbudgets/1.12.0/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.11.1](/python/docs/reference/billingbudgets/1.11.1/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.10.0](/python/docs/reference/billingbudgets/1.10.0/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.9.1](/python/docs/reference/billingbudgets/1.9.1/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.8.0](/python/docs/reference/billingbudgets/1.8.0/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.7.3](/python/docs/reference/billingbudgets/1.7.3/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.6.2](/python/docs/reference/billingbudgets/1.6.2/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.5.1](/python/docs/reference/billingbudgets/1.5.1/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.4.4](/python/docs/reference/billingbudgets/1.4.4/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.3.0](/python/docs/reference/billingbudgets/1.3.0/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.2.0](/python/docs/reference/billingbudgets/1.2.0/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.1.1](/python/docs/reference/billingbudgets/1.1.1/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [1.0.1](/python/docs/reference/billingbudgets/1.0.1/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [0.4.2](/python/docs/reference/billingbudgets/0.4.2/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [0.3.0](/python/docs/reference/billingbudgets/0.3.0/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [0.2.0](/python/docs/reference/billingbudgets/0.2.0/google.cloud.billing.budgets_v1.types.ThresholdRule)\n- [0.1.0](/python/docs/reference/billingbudgets/0.1.0/google.cloud.billing.budgets_v1.types.ThresholdRule) \n\n ThresholdRule(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nThresholdRule contains the definition of a threshold. Threshold\nrules define the triggering events used to generate a budget\nnotification email. When a threshold is crossed (spend exceeds the\nspecified percentages of the budget), budget alert emails are sent\nto the email recipients you specify in the\n`NotificationsRule \u003c#notificationsrule\u003e`__.\n\nThreshold rules also affect the fields included in the `JSON data\nobject \u003chttps://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format\u003e`__\nsent to a Pub/Sub topic.\n\nThreshold rules are *required* if using email notifications.\n\nThreshold rules are *optional* if only setting a ```pubsubTopic``\nNotificationsRule \\\u003c#NotificationsRule\\\u003e\\`__, unless you want your JSON\ndata object to include data about the thresholds you set.\n\nFor more information, see `set budget threshold rules and\nactions \u003chttps://cloud.google.com/billing/docs/how-to/budgets#budget-actions\u003e`__.\n\nClasses\n-------\n\n### Basis\n\n Basis(value)\n\nThe type of basis used to determine if spend has passed the\nthreshold."]]