@@ -72,10 +72,13 @@ class Budget(proto.Message):
72
72
amount (google.cloud.billing.budgets_v1beta1.types.BudgetAmount):
73
73
Required. Budgeted amount.
74
74
threshold_rules (Sequence[google.cloud.billing.budgets_v1beta1.types.ThresholdRule]):
75
- Optional. Rules that trigger alerts
76
- (notifications of thresholds being crossed) when
77
- spend exceeds the specified percentages of the
78
- budget.
75
+ Optional. Rules that trigger alerts (notifications of
76
+ thresholds being crossed) when spend exceeds the specified
77
+ percentages of the budget.
78
+
79
+ Optional for ``pubsubTopic`` notifications.
80
+
81
+ Required if using email notifications.
79
82
all_updates_rule (google.cloud.billing.budgets_v1beta1.types.AllUpdatesRule):
80
83
Optional. Rules to apply to notifications
81
84
sent based on budget spend and thresholds.
@@ -150,13 +153,25 @@ class LastPeriodAmount(proto.Message):
150
153
151
154
152
155
class ThresholdRule (proto .Message ):
153
- r"""ThresholdRule contains a definition of a threshold which triggers an
154
- alert (a notification of a threshold being crossed) to be sent when
155
- spend goes above the specified amount. Alerts are automatically
156
- e-mailed to users with the Billing Account Administrator role or the
157
- Billing Account User role. The thresholds here have no effect on
158
- notifications sent to anything configured under
159
- ``Budget.all_updates_rule``.
156
+ r"""ThresholdRule contains the definition of a threshold. Threshold
157
+ rules define the triggering events used to generate a budget
158
+ notification email. When a threshold is crossed (spend exceeds the
159
+ specified percentages of the budget), budget alert emails are sent
160
+ to the email recipients you specify in the
161
+ `NotificationsRule <#notificationsrule>`__.
162
+
163
+ Threshold rules also affect the fields included in the `JSON data
164
+ object <https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format>`__
165
+ sent to a Pub/Sub topic.
166
+
167
+ Threshold rules are *required* if using email notifications.
168
+
169
+ Threshold rules are *optional* if only setting a ```pubsubTopic``
170
+ NotificationsRule <#NotificationsRule>`__, unless you want your JSON
171
+ data object to include data about the thresholds you set.
172
+
173
+ For more information, see `set budget threshold rules and
174
+ actions <https://cloud.google.com/billing/docs/how-to/budgets#budget-actions>`__.
160
175
161
176
Attributes:
162
177
threshold_percent (float):
@@ -282,13 +297,16 @@ class Filter(proto.Message):
282
297
omitted, the report will include usage from the parent
283
298
account and all subaccounts, if they exist.
284
299
labels (Sequence[google.cloud.billing.budgets_v1beta1.types.Filter.LabelsEntry]):
285
- Optional. A single label and value pair
286
- specifying that usage from only this set of
287
- labeled resources should be included in the
288
- budget. Currently, multiple entries or multiple
289
- values per entry are not allowed. If omitted,
290
- the report will include all labeled and
291
- unlabeled usage.
300
+ Optional. A single label and value pair specifying that
301
+ usage from only this set of labeled resources should be
302
+ included in the budget. If omitted, the report will include
303
+ all labeled and unlabeled usage.
304
+
305
+ An object containing a single ``"key": value`` pair.
306
+ Example: ``{ "name": "wrench" }``.
307
+
308
+ *Currently, multiple entries or multiple values per entry
309
+ are not allowed.*
292
310
calendar_period (google.cloud.billing.budgets_v1beta1.types.CalendarPeriod):
293
311
Optional. Specifies to track usage for
294
312
recurring calendar period. For example, assume
0 commit comments