public sealed class ThresholdRule : IMessage<ThresholdRule>, IEquatable<ThresholdRule>, IDeepCloneable<ThresholdRule>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Billing Budget v1 API class ThresholdRule.
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.
Threshold rules also affect the fields included in the
JSON data
object
sent to a Pub/Sub topic.
Threshold rules are required if using email notifications.
Threshold rules are optional if only setting a
pubsubTopic NotificationsRule,
unless you want your JSON data object to include data about the thresholds
you set.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eThresholdRule\u003c/code\u003e API class is 2.6.0, with older versions available for reference, ranging back to version 1.1.0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eThresholdRule\u003c/code\u003e defines the conditions that trigger budget notification emails when spending exceeds certain percentages of the budget, and these rules are required when email notifications are used.\u003c/p\u003e\n"],["\u003cp\u003eThreshold rules also determine which fields are included in the JSON data object sent to a Pub/Sub topic.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eThresholdRule\u003c/code\u003e class has properties such as \u003ccode\u003eSpendBasis\u003c/code\u003e, which defines how spend is calculated, and \u003ccode\u003eThresholdPercent\u003c/code\u003e, which sets the percentage at which an alert is triggered.\u003c/p\u003e\n"],["\u003cp\u003eThe class \u003ccode\u003eThresholdRule\u003c/code\u003e inherits from Object, and implements IMessage, IEquatable, IDeepCloneable, and IBufferMessage.\u003c/p\u003e\n"]]],[],null,[]]