blob: 268c7af0011ed823b9ecf599e29feeb7eaf3eead [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="billingbudgets_v1beta1.html">Cloud Billing Budget API</a> . <a href="billingbudgets_v1beta1.billingAccounts.html">billingAccounts</a> . <a href="billingbudgets_v1beta1.billingAccounts.budgets.html">budgets</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Creates a new budget. See</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes a budget. Returns successfully if already deleted.</p>
83<p class="toc_element">
84 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
85<p class="firstline">Returns a budget.</p>
86<p class="toc_element">
87 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Returns a list of budgets for a billing account.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
93 <code><a href="#patch">patch(name, body=None, x__xgafv=None)</a></code></p>
94<p class="firstline">Updates a budget and returns the updated budget.</p>
95<h3>Method Details</h3>
96<div class="method">
97 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
98 <pre>Creates a new budget. See
99&lt;a href=&quot;https://cloud.google.com/billing/quotas&quot;&gt;Quotas and limits&lt;/a&gt;
100for more information on the limits of the number of budgets you can create.
101
102Args:
103 parent: string, Required. The name of the billing account to create the budget in. Values
104are of the form `billingAccounts/{billingAccountId}`. (required)
105 body: object, The request body.
106 The object takes the form of:
107
108{ # Request for CreateBudget
109 &quot;budget&quot;: { # A budget is a plan that describes what you expect to spend on Cloud # Required. Budget to create.
110 # projects, plus the rules to execute as spend is tracked against that plan,
111 # (for example, send an alert when 90% of the target spend is met).
112 # Currently all plans are monthly budgets so the usage period(s) tracked are
113 # implied (calendar months of usage back-to-back).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700114 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget.
115 # The resource name implies the scope of a budget. Values are of the form
116 # `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
117 &quot;budgetFilter&quot;: { # A filter for a budget, limiting the scope of the cost to calculate. # Optional. Filters that define which resources are used to compute
118 # the actual spend against the budget.
119 &quot;services&quot;: [ # Optional. A set of services of the form `services/{service_id}`,
120 # specifying that usage from only this set of services should be
121 # included in the budget. If omitted, the report will include usage for
122 # all the services.
123 # The service names are available through the Catalog API:
124 # https://cloud.google.com/billing/v1/how-tos/catalog-api.
125 &quot;A String&quot;,
126 ],
127 &quot;labels&quot;: { # Optional. A single label and value pair specifying that usage from only this set of
128 # labeled resources should be included in the budget. Multiple entries or
129 # multiple values per entry are not allowed. If omitted, the report will
130 # include all labeled and unlabeled usage.
131 &quot;a_key&quot;: [
132 &quot;&quot;,
133 ],
134 },
135 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`,
136 # specifying that usage from only this set of projects should be
137 # included in the budget. If omitted, the report will include all usage for
138 # the billing account, regardless of which project the usage occurred on.
139 # Only zero or one project can be specified currently.
140 &quot;A String&quot;,
141 ],
142 &quot;subaccounts&quot;: [ # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, specifying
143 # that usage from only this set of subaccounts should be included in the
144 # budget. If a subaccount is set to the name of the master account, usage
145 # from the master account will be included. If omitted, the report will
146 # include usage from the master account and all subaccounts, if they exist.
147 &quot;A String&quot;,
148 ],
149 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
150 },
151 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a
152 # read-modify-write operation.
153 # An empty etag will cause an update to overwrite other changes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700154 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
155 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to last period&#x27;s spend. # Use the last period&#x27;s actual spend as the budget for the present period.
156 # At this time, the amount is automatically 100% of last period&#x27;s spend;
157 # that is, there are no other options yet.
158 # Future configuration will be described here (for example, configuring a
159 # percentage of last period&#x27;s spend).
160 },
161 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget.
162 # `currency_code` is optional. If specified, it must match the
163 # currency of the billing account. The `currency_code` is provided on
164 # output.
Bu Sun Kim65020912020-05-20 12:08:20 -0700165 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
166 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700167 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
Bu Sun Kim65020912020-05-20 12:08:20 -0700168 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
169 # The value must be between -999,999,999 and +999,999,999 inclusive.
170 # If `units` is positive, `nanos` must be positive or zero.
171 # If `units` is zero, `nanos` can be positive, zero, or negative.
172 # If `units` is negative, `nanos` must be negative or zero.
173 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
174 },
175 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700176 &quot;allUpdatesRule&quot;: { # AllUpdatesRule defines notifications that are sent on every update to the # Optional. Rules to apply to all updates to the actual spend, regardless
177 # of the thresholds set in `threshold_rules`.
178 # billing account&#x27;s spend, regardless of the thresholds defined using
179 # threshold rules.
Bu Sun Kim65020912020-05-20 12:08:20 -0700180 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic where budget related messages will be
181 # published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
182 # are sent at regular intervals to the topic.
183 # The topic needs to be created before the budget is created; see
184 # https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
185 # for more details.
186 # Caller is expected to have
187 # `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a
188 # budget, otherwise, the API call will fail with PERMISSION_DENIED. See
189 # https://cloud.google.com/pubsub/docs/access-control for more details on
190 # Pub/Sub roles and permissions.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700191 &quot;schemaVersion&quot;: &quot;A String&quot;, # Required. The schema version of the notification.
192 # Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in
193 # https://cloud.google.com/billing/docs/how-to/budgets#notification_format
Bu Sun Kim65020912020-05-20 12:08:20 -0700194 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700195 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI.
196 # Validation: &lt;= 60 chars.
Bu Sun Kim65020912020-05-20 12:08:20 -0700197 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds
198 # being crossed) when spend exceeds the specified percentages of the budget.
199 { # ThresholdRule contains a definition of a threshold which triggers
200 # an alert (a notification of a threshold being crossed) to be sent when
201 # spend goes above the specified amount.
202 # Alerts are automatically e-mailed to users with the Billing Account
203 # Administrator role or the Billing Account User role.
204 # The thresholds here have no effect on notifications sent to anything
205 # configured under `Budget.all_updates_rule`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded.
207 # This is a 1.0-based percentage, so 0.5 = 50%.
208 # Validation: non-negative number.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700209 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the
210 # threshold. Behavior defaults to CURRENT_SPEND if not set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700211 },
212 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700213 },
214 }
215
216 x__xgafv: string, V1 error format.
217 Allowed values
218 1 - v1 error format
219 2 - v2 error format
220
221Returns:
222 An object of the form:
223
224 { # A budget is a plan that describes what you expect to spend on Cloud
225 # projects, plus the rules to execute as spend is tracked against that plan,
226 # (for example, send an alert when 90% of the target spend is met).
227 # Currently all plans are monthly budgets so the usage period(s) tracked are
228 # implied (calendar months of usage back-to-back).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700229 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget.
230 # The resource name implies the scope of a budget. Values are of the form
231 # `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
232 &quot;budgetFilter&quot;: { # A filter for a budget, limiting the scope of the cost to calculate. # Optional. Filters that define which resources are used to compute
233 # the actual spend against the budget.
234 &quot;services&quot;: [ # Optional. A set of services of the form `services/{service_id}`,
235 # specifying that usage from only this set of services should be
236 # included in the budget. If omitted, the report will include usage for
237 # all the services.
238 # The service names are available through the Catalog API:
239 # https://cloud.google.com/billing/v1/how-tos/catalog-api.
240 &quot;A String&quot;,
241 ],
242 &quot;labels&quot;: { # Optional. A single label and value pair specifying that usage from only this set of
243 # labeled resources should be included in the budget. Multiple entries or
244 # multiple values per entry are not allowed. If omitted, the report will
245 # include all labeled and unlabeled usage.
246 &quot;a_key&quot;: [
247 &quot;&quot;,
248 ],
249 },
250 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`,
251 # specifying that usage from only this set of projects should be
252 # included in the budget. If omitted, the report will include all usage for
253 # the billing account, regardless of which project the usage occurred on.
254 # Only zero or one project can be specified currently.
255 &quot;A String&quot;,
256 ],
257 &quot;subaccounts&quot;: [ # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, specifying
258 # that usage from only this set of subaccounts should be included in the
259 # budget. If a subaccount is set to the name of the master account, usage
260 # from the master account will be included. If omitted, the report will
261 # include usage from the master account and all subaccounts, if they exist.
262 &quot;A String&quot;,
263 ],
264 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
265 },
266 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a
267 # read-modify-write operation.
268 # An empty etag will cause an update to overwrite other changes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700269 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
270 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to last period&#x27;s spend. # Use the last period&#x27;s actual spend as the budget for the present period.
271 # At this time, the amount is automatically 100% of last period&#x27;s spend;
272 # that is, there are no other options yet.
273 # Future configuration will be described here (for example, configuring a
274 # percentage of last period&#x27;s spend).
275 },
276 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget.
277 # `currency_code` is optional. If specified, it must match the
278 # currency of the billing account. The `currency_code` is provided on
279 # output.
Bu Sun Kim65020912020-05-20 12:08:20 -0700280 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
281 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700282 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
Bu Sun Kim65020912020-05-20 12:08:20 -0700283 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
284 # The value must be between -999,999,999 and +999,999,999 inclusive.
285 # If `units` is positive, `nanos` must be positive or zero.
286 # If `units` is zero, `nanos` can be positive, zero, or negative.
287 # If `units` is negative, `nanos` must be negative or zero.
288 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
289 },
290 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700291 &quot;allUpdatesRule&quot;: { # AllUpdatesRule defines notifications that are sent on every update to the # Optional. Rules to apply to all updates to the actual spend, regardless
292 # of the thresholds set in `threshold_rules`.
293 # billing account&#x27;s spend, regardless of the thresholds defined using
294 # threshold rules.
Bu Sun Kim65020912020-05-20 12:08:20 -0700295 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic where budget related messages will be
296 # published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
297 # are sent at regular intervals to the topic.
298 # The topic needs to be created before the budget is created; see
299 # https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
300 # for more details.
301 # Caller is expected to have
302 # `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a
303 # budget, otherwise, the API call will fail with PERMISSION_DENIED. See
304 # https://cloud.google.com/pubsub/docs/access-control for more details on
305 # Pub/Sub roles and permissions.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700306 &quot;schemaVersion&quot;: &quot;A String&quot;, # Required. The schema version of the notification.
307 # Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in
308 # https://cloud.google.com/billing/docs/how-to/budgets#notification_format
Bu Sun Kim65020912020-05-20 12:08:20 -0700309 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700310 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI.
311 # Validation: &lt;= 60 chars.
Bu Sun Kim65020912020-05-20 12:08:20 -0700312 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds
313 # being crossed) when spend exceeds the specified percentages of the budget.
314 { # ThresholdRule contains a definition of a threshold which triggers
315 # an alert (a notification of a threshold being crossed) to be sent when
316 # spend goes above the specified amount.
317 # Alerts are automatically e-mailed to users with the Billing Account
318 # Administrator role or the Billing Account User role.
319 # The thresholds here have no effect on notifications sent to anything
320 # configured under `Budget.all_updates_rule`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700321 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded.
322 # This is a 1.0-based percentage, so 0.5 = 50%.
323 # Validation: non-negative number.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700324 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the
325 # threshold. Behavior defaults to CURRENT_SPEND if not set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700326 },
327 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700328 }</pre>
329</div>
330
331<div class="method">
332 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
333 <pre>Deletes a budget. Returns successfully if already deleted.
334
335Args:
336 name: string, Required. Name of the budget to delete. Values are of the form
337`billingAccounts/{billingAccountId}/budgets/{budgetId}`. (required)
338 x__xgafv: string, V1 error format.
339 Allowed values
340 1 - v1 error format
341 2 - v2 error format
342
343Returns:
344 An object of the form:
345
346 { # A generic empty message that you can re-use to avoid defining duplicated
347 # empty messages in your APIs. A typical example is to use it as the request
348 # or the response type of an API method. For instance:
349 #
350 # service Foo {
351 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
352 # }
353 #
354 # The JSON representation for `Empty` is empty JSON object `{}`.
355 }</pre>
356</div>
357
358<div class="method">
359 <code class="details" id="get">get(name, x__xgafv=None)</code>
360 <pre>Returns a budget.
361
362WARNING: There are some fields exposed on the Google Cloud Console that
363aren&#x27;t available on this API. When reading from the API, you will not
364see these fields in the return value, though they may have been set
365in the Cloud Console.
366
367Args:
368 name: string, Required. Name of budget to get. Values are of the form
369`billingAccounts/{billingAccountId}/budgets/{budgetId}`. (required)
370 x__xgafv: string, V1 error format.
371 Allowed values
372 1 - v1 error format
373 2 - v2 error format
374
375Returns:
376 An object of the form:
377
378 { # A budget is a plan that describes what you expect to spend on Cloud
379 # projects, plus the rules to execute as spend is tracked against that plan,
380 # (for example, send an alert when 90% of the target spend is met).
381 # Currently all plans are monthly budgets so the usage period(s) tracked are
382 # implied (calendar months of usage back-to-back).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700383 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget.
384 # The resource name implies the scope of a budget. Values are of the form
385 # `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
386 &quot;budgetFilter&quot;: { # A filter for a budget, limiting the scope of the cost to calculate. # Optional. Filters that define which resources are used to compute
387 # the actual spend against the budget.
388 &quot;services&quot;: [ # Optional. A set of services of the form `services/{service_id}`,
389 # specifying that usage from only this set of services should be
390 # included in the budget. If omitted, the report will include usage for
391 # all the services.
392 # The service names are available through the Catalog API:
393 # https://cloud.google.com/billing/v1/how-tos/catalog-api.
394 &quot;A String&quot;,
395 ],
396 &quot;labels&quot;: { # Optional. A single label and value pair specifying that usage from only this set of
397 # labeled resources should be included in the budget. Multiple entries or
398 # multiple values per entry are not allowed. If omitted, the report will
399 # include all labeled and unlabeled usage.
400 &quot;a_key&quot;: [
401 &quot;&quot;,
402 ],
403 },
404 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`,
405 # specifying that usage from only this set of projects should be
406 # included in the budget. If omitted, the report will include all usage for
407 # the billing account, regardless of which project the usage occurred on.
408 # Only zero or one project can be specified currently.
409 &quot;A String&quot;,
410 ],
411 &quot;subaccounts&quot;: [ # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, specifying
412 # that usage from only this set of subaccounts should be included in the
413 # budget. If a subaccount is set to the name of the master account, usage
414 # from the master account will be included. If omitted, the report will
415 # include usage from the master account and all subaccounts, if they exist.
416 &quot;A String&quot;,
417 ],
418 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
419 },
420 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a
421 # read-modify-write operation.
422 # An empty etag will cause an update to overwrite other changes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700423 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
424 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to last period&#x27;s spend. # Use the last period&#x27;s actual spend as the budget for the present period.
425 # At this time, the amount is automatically 100% of last period&#x27;s spend;
426 # that is, there are no other options yet.
427 # Future configuration will be described here (for example, configuring a
428 # percentage of last period&#x27;s spend).
429 },
430 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget.
431 # `currency_code` is optional. If specified, it must match the
432 # currency of the billing account. The `currency_code` is provided on
433 # output.
Bu Sun Kim65020912020-05-20 12:08:20 -0700434 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
435 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700436 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
Bu Sun Kim65020912020-05-20 12:08:20 -0700437 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
438 # The value must be between -999,999,999 and +999,999,999 inclusive.
439 # If `units` is positive, `nanos` must be positive or zero.
440 # If `units` is zero, `nanos` can be positive, zero, or negative.
441 # If `units` is negative, `nanos` must be negative or zero.
442 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
443 },
444 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700445 &quot;allUpdatesRule&quot;: { # AllUpdatesRule defines notifications that are sent on every update to the # Optional. Rules to apply to all updates to the actual spend, regardless
446 # of the thresholds set in `threshold_rules`.
447 # billing account&#x27;s spend, regardless of the thresholds defined using
448 # threshold rules.
Bu Sun Kim65020912020-05-20 12:08:20 -0700449 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic where budget related messages will be
450 # published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
451 # are sent at regular intervals to the topic.
452 # The topic needs to be created before the budget is created; see
453 # https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
454 # for more details.
455 # Caller is expected to have
456 # `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a
457 # budget, otherwise, the API call will fail with PERMISSION_DENIED. See
458 # https://cloud.google.com/pubsub/docs/access-control for more details on
459 # Pub/Sub roles and permissions.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700460 &quot;schemaVersion&quot;: &quot;A String&quot;, # Required. The schema version of the notification.
461 # Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in
462 # https://cloud.google.com/billing/docs/how-to/budgets#notification_format
Bu Sun Kim65020912020-05-20 12:08:20 -0700463 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700464 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI.
465 # Validation: &lt;= 60 chars.
Bu Sun Kim65020912020-05-20 12:08:20 -0700466 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds
467 # being crossed) when spend exceeds the specified percentages of the budget.
468 { # ThresholdRule contains a definition of a threshold which triggers
469 # an alert (a notification of a threshold being crossed) to be sent when
470 # spend goes above the specified amount.
471 # Alerts are automatically e-mailed to users with the Billing Account
472 # Administrator role or the Billing Account User role.
473 # The thresholds here have no effect on notifications sent to anything
474 # configured under `Budget.all_updates_rule`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700475 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded.
476 # This is a 1.0-based percentage, so 0.5 = 50%.
477 # Validation: non-negative number.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700478 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the
479 # threshold. Behavior defaults to CURRENT_SPEND if not set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700480 },
481 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700482 }</pre>
483</div>
484
485<div class="method">
486 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
487 <pre>Returns a list of budgets for a billing account.
488
489WARNING: There are some fields exposed on the Google Cloud Console that
490aren&#x27;t available on this API. When reading from the API, you will not
491see these fields in the return value, though they may have been set
492in the Cloud Console.
493
494Args:
495 parent: string, Required. Name of billing account to list budgets under. Values
496are of the form `billingAccounts/{billingAccountId}`. (required)
497 pageSize: integer, Optional. The maximum number of budgets to return per page.
498The default and maximum value are 100.
499 pageToken: string, Optional. The value returned by the last `ListBudgetsResponse` which
500indicates that this is a continuation of a prior `ListBudgets` call,
501and that the system should return the next page of data.
502 x__xgafv: string, V1 error format.
503 Allowed values
504 1 - v1 error format
505 2 - v2 error format
506
507Returns:
508 An object of the form:
509
510 { # Response for ListBudgets
511 &quot;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there may be more budgets that match the
512 # request; this value should be passed in a new `ListBudgetsRequest`.
513 &quot;budgets&quot;: [ # List of the budgets owned by the requested billing account.
514 { # A budget is a plan that describes what you expect to spend on Cloud
515 # projects, plus the rules to execute as spend is tracked against that plan,
516 # (for example, send an alert when 90% of the target spend is met).
517 # Currently all plans are monthly budgets so the usage period(s) tracked are
518 # implied (calendar months of usage back-to-back).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700519 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget.
520 # The resource name implies the scope of a budget. Values are of the form
521 # `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
522 &quot;budgetFilter&quot;: { # A filter for a budget, limiting the scope of the cost to calculate. # Optional. Filters that define which resources are used to compute
523 # the actual spend against the budget.
524 &quot;services&quot;: [ # Optional. A set of services of the form `services/{service_id}`,
525 # specifying that usage from only this set of services should be
526 # included in the budget. If omitted, the report will include usage for
527 # all the services.
528 # The service names are available through the Catalog API:
529 # https://cloud.google.com/billing/v1/how-tos/catalog-api.
530 &quot;A String&quot;,
531 ],
532 &quot;labels&quot;: { # Optional. A single label and value pair specifying that usage from only this set of
533 # labeled resources should be included in the budget. Multiple entries or
534 # multiple values per entry are not allowed. If omitted, the report will
535 # include all labeled and unlabeled usage.
536 &quot;a_key&quot;: [
537 &quot;&quot;,
538 ],
539 },
540 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`,
541 # specifying that usage from only this set of projects should be
542 # included in the budget. If omitted, the report will include all usage for
543 # the billing account, regardless of which project the usage occurred on.
544 # Only zero or one project can be specified currently.
545 &quot;A String&quot;,
546 ],
547 &quot;subaccounts&quot;: [ # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, specifying
548 # that usage from only this set of subaccounts should be included in the
549 # budget. If a subaccount is set to the name of the master account, usage
550 # from the master account will be included. If omitted, the report will
551 # include usage from the master account and all subaccounts, if they exist.
552 &quot;A String&quot;,
553 ],
554 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
555 },
556 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a
557 # read-modify-write operation.
558 # An empty etag will cause an update to overwrite other changes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700559 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
560 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to last period&#x27;s spend. # Use the last period&#x27;s actual spend as the budget for the present period.
561 # At this time, the amount is automatically 100% of last period&#x27;s spend;
562 # that is, there are no other options yet.
563 # Future configuration will be described here (for example, configuring a
564 # percentage of last period&#x27;s spend).
565 },
566 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget.
567 # `currency_code` is optional. If specified, it must match the
568 # currency of the billing account. The `currency_code` is provided on
569 # output.
Bu Sun Kim65020912020-05-20 12:08:20 -0700570 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
571 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700572 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
Bu Sun Kim65020912020-05-20 12:08:20 -0700573 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
574 # The value must be between -999,999,999 and +999,999,999 inclusive.
575 # If `units` is positive, `nanos` must be positive or zero.
576 # If `units` is zero, `nanos` can be positive, zero, or negative.
577 # If `units` is negative, `nanos` must be negative or zero.
578 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
579 },
580 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700581 &quot;allUpdatesRule&quot;: { # AllUpdatesRule defines notifications that are sent on every update to the # Optional. Rules to apply to all updates to the actual spend, regardless
582 # of the thresholds set in `threshold_rules`.
583 # billing account&#x27;s spend, regardless of the thresholds defined using
584 # threshold rules.
Bu Sun Kim65020912020-05-20 12:08:20 -0700585 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic where budget related messages will be
586 # published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
587 # are sent at regular intervals to the topic.
588 # The topic needs to be created before the budget is created; see
589 # https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
590 # for more details.
591 # Caller is expected to have
592 # `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a
593 # budget, otherwise, the API call will fail with PERMISSION_DENIED. See
594 # https://cloud.google.com/pubsub/docs/access-control for more details on
595 # Pub/Sub roles and permissions.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700596 &quot;schemaVersion&quot;: &quot;A String&quot;, # Required. The schema version of the notification.
597 # Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in
598 # https://cloud.google.com/billing/docs/how-to/budgets#notification_format
Bu Sun Kim65020912020-05-20 12:08:20 -0700599 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700600 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI.
601 # Validation: &lt;= 60 chars.
Bu Sun Kim65020912020-05-20 12:08:20 -0700602 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds
603 # being crossed) when spend exceeds the specified percentages of the budget.
604 { # ThresholdRule contains a definition of a threshold which triggers
605 # an alert (a notification of a threshold being crossed) to be sent when
606 # spend goes above the specified amount.
607 # Alerts are automatically e-mailed to users with the Billing Account
608 # Administrator role or the Billing Account User role.
609 # The thresholds here have no effect on notifications sent to anything
610 # configured under `Budget.all_updates_rule`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700611 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded.
612 # This is a 1.0-based percentage, so 0.5 = 50%.
613 # Validation: non-negative number.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700614 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the
615 # threshold. Behavior defaults to CURRENT_SPEND if not set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700616 },
617 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700618 },
619 ],
620 }</pre>
621</div>
622
623<div class="method">
624 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
625 <pre>Retrieves the next page of results.
626
627Args:
628 previous_request: The request for the previous page. (required)
629 previous_response: The response from the request for the previous page. (required)
630
631Returns:
632 A request object that you can call &#x27;execute()&#x27; on to request the next
633 page. Returns None if there are no more items in the collection.
634 </pre>
635</div>
636
637<div class="method">
638 <code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code>
639 <pre>Updates a budget and returns the updated budget.
640
641WARNING: There are some fields exposed on the Google Cloud Console that
642aren&#x27;t available on this API. Budget fields that are not exposed in
643this API will not be changed by this method.
644
645Args:
646 name: string, Output only. Resource name of the budget.
647The resource name implies the scope of a budget. Values are of the form
648`billingAccounts/{billingAccountId}/budgets/{budgetId}`. (required)
649 body: object, The request body.
650 The object takes the form of:
651
652{ # Request for UpdateBudget
653 &quot;budget&quot;: { # A budget is a plan that describes what you expect to spend on Cloud # Required. The updated budget object.
654 # The budget to update is specified by the budget name in the budget.
655 # projects, plus the rules to execute as spend is tracked against that plan,
656 # (for example, send an alert when 90% of the target spend is met).
657 # Currently all plans are monthly budgets so the usage period(s) tracked are
658 # implied (calendar months of usage back-to-back).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700659 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget.
660 # The resource name implies the scope of a budget. Values are of the form
661 # `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
662 &quot;budgetFilter&quot;: { # A filter for a budget, limiting the scope of the cost to calculate. # Optional. Filters that define which resources are used to compute
663 # the actual spend against the budget.
664 &quot;services&quot;: [ # Optional. A set of services of the form `services/{service_id}`,
665 # specifying that usage from only this set of services should be
666 # included in the budget. If omitted, the report will include usage for
667 # all the services.
668 # The service names are available through the Catalog API:
669 # https://cloud.google.com/billing/v1/how-tos/catalog-api.
670 &quot;A String&quot;,
671 ],
672 &quot;labels&quot;: { # Optional. A single label and value pair specifying that usage from only this set of
673 # labeled resources should be included in the budget. Multiple entries or
674 # multiple values per entry are not allowed. If omitted, the report will
675 # include all labeled and unlabeled usage.
676 &quot;a_key&quot;: [
677 &quot;&quot;,
678 ],
679 },
680 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`,
681 # specifying that usage from only this set of projects should be
682 # included in the budget. If omitted, the report will include all usage for
683 # the billing account, regardless of which project the usage occurred on.
684 # Only zero or one project can be specified currently.
685 &quot;A String&quot;,
686 ],
687 &quot;subaccounts&quot;: [ # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, specifying
688 # that usage from only this set of subaccounts should be included in the
689 # budget. If a subaccount is set to the name of the master account, usage
690 # from the master account will be included. If omitted, the report will
691 # include usage from the master account and all subaccounts, if they exist.
692 &quot;A String&quot;,
693 ],
694 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
695 },
696 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a
697 # read-modify-write operation.
698 # An empty etag will cause an update to overwrite other changes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700699 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
700 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to last period&#x27;s spend. # Use the last period&#x27;s actual spend as the budget for the present period.
701 # At this time, the amount is automatically 100% of last period&#x27;s spend;
702 # that is, there are no other options yet.
703 # Future configuration will be described here (for example, configuring a
704 # percentage of last period&#x27;s spend).
705 },
706 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget.
707 # `currency_code` is optional. If specified, it must match the
708 # currency of the billing account. The `currency_code` is provided on
709 # output.
Bu Sun Kim65020912020-05-20 12:08:20 -0700710 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
711 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700712 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
Bu Sun Kim65020912020-05-20 12:08:20 -0700713 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
714 # The value must be between -999,999,999 and +999,999,999 inclusive.
715 # If `units` is positive, `nanos` must be positive or zero.
716 # If `units` is zero, `nanos` can be positive, zero, or negative.
717 # If `units` is negative, `nanos` must be negative or zero.
718 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
719 },
720 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700721 &quot;allUpdatesRule&quot;: { # AllUpdatesRule defines notifications that are sent on every update to the # Optional. Rules to apply to all updates to the actual spend, regardless
722 # of the thresholds set in `threshold_rules`.
723 # billing account&#x27;s spend, regardless of the thresholds defined using
724 # threshold rules.
Bu Sun Kim65020912020-05-20 12:08:20 -0700725 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic where budget related messages will be
726 # published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
727 # are sent at regular intervals to the topic.
728 # The topic needs to be created before the budget is created; see
729 # https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
730 # for more details.
731 # Caller is expected to have
732 # `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a
733 # budget, otherwise, the API call will fail with PERMISSION_DENIED. See
734 # https://cloud.google.com/pubsub/docs/access-control for more details on
735 # Pub/Sub roles and permissions.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700736 &quot;schemaVersion&quot;: &quot;A String&quot;, # Required. The schema version of the notification.
737 # Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in
738 # https://cloud.google.com/billing/docs/how-to/budgets#notification_format
Bu Sun Kim65020912020-05-20 12:08:20 -0700739 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700740 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI.
741 # Validation: &lt;= 60 chars.
Bu Sun Kim65020912020-05-20 12:08:20 -0700742 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds
743 # being crossed) when spend exceeds the specified percentages of the budget.
744 { # ThresholdRule contains a definition of a threshold which triggers
745 # an alert (a notification of a threshold being crossed) to be sent when
746 # spend goes above the specified amount.
747 # Alerts are automatically e-mailed to users with the Billing Account
748 # Administrator role or the Billing Account User role.
749 # The thresholds here have no effect on notifications sent to anything
750 # configured under `Budget.all_updates_rule`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700751 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded.
752 # This is a 1.0-based percentage, so 0.5 = 50%.
753 # Validation: non-negative number.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700754 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the
755 # threshold. Behavior defaults to CURRENT_SPEND if not set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700756 },
757 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700758 },
759 &quot;updateMask&quot;: &quot;A String&quot;, # Optional. Indicates which fields in the provided budget to update.
760 # Read-only fields (such as `name`) cannot be changed. If this is not
761 # provided, then only fields with non-default values from the request are
762 # updated. See
763 # https://developers.google.com/protocol-buffers/docs/proto3#default for more
764 # details about default values.
765 }
766
767 x__xgafv: string, V1 error format.
768 Allowed values
769 1 - v1 error format
770 2 - v2 error format
771
772Returns:
773 An object of the form:
774
775 { # A budget is a plan that describes what you expect to spend on Cloud
776 # projects, plus the rules to execute as spend is tracked against that plan,
777 # (for example, send an alert when 90% of the target spend is met).
778 # Currently all plans are monthly budgets so the usage period(s) tracked are
779 # implied (calendar months of usage back-to-back).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700780 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget.
781 # The resource name implies the scope of a budget. Values are of the form
782 # `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
783 &quot;budgetFilter&quot;: { # A filter for a budget, limiting the scope of the cost to calculate. # Optional. Filters that define which resources are used to compute
784 # the actual spend against the budget.
785 &quot;services&quot;: [ # Optional. A set of services of the form `services/{service_id}`,
786 # specifying that usage from only this set of services should be
787 # included in the budget. If omitted, the report will include usage for
788 # all the services.
789 # The service names are available through the Catalog API:
790 # https://cloud.google.com/billing/v1/how-tos/catalog-api.
791 &quot;A String&quot;,
792 ],
793 &quot;labels&quot;: { # Optional. A single label and value pair specifying that usage from only this set of
794 # labeled resources should be included in the budget. Multiple entries or
795 # multiple values per entry are not allowed. If omitted, the report will
796 # include all labeled and unlabeled usage.
797 &quot;a_key&quot;: [
798 &quot;&quot;,
799 ],
800 },
801 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`,
802 # specifying that usage from only this set of projects should be
803 # included in the budget. If omitted, the report will include all usage for
804 # the billing account, regardless of which project the usage occurred on.
805 # Only zero or one project can be specified currently.
806 &quot;A String&quot;,
807 ],
808 &quot;subaccounts&quot;: [ # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, specifying
809 # that usage from only this set of subaccounts should be included in the
810 # budget. If a subaccount is set to the name of the master account, usage
811 # from the master account will be included. If omitted, the report will
812 # include usage from the master account and all subaccounts, if they exist.
813 &quot;A String&quot;,
814 ],
815 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
816 },
817 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a
818 # read-modify-write operation.
819 # An empty etag will cause an update to overwrite other changes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700820 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
821 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to last period&#x27;s spend. # Use the last period&#x27;s actual spend as the budget for the present period.
822 # At this time, the amount is automatically 100% of last period&#x27;s spend;
823 # that is, there are no other options yet.
824 # Future configuration will be described here (for example, configuring a
825 # percentage of last period&#x27;s spend).
826 },
827 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget.
828 # `currency_code` is optional. If specified, it must match the
829 # currency of the billing account. The `currency_code` is provided on
830 # output.
Bu Sun Kim65020912020-05-20 12:08:20 -0700831 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
832 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700833 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
Bu Sun Kim65020912020-05-20 12:08:20 -0700834 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
835 # The value must be between -999,999,999 and +999,999,999 inclusive.
836 # If `units` is positive, `nanos` must be positive or zero.
837 # If `units` is zero, `nanos` can be positive, zero, or negative.
838 # If `units` is negative, `nanos` must be negative or zero.
839 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
840 },
841 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700842 &quot;allUpdatesRule&quot;: { # AllUpdatesRule defines notifications that are sent on every update to the # Optional. Rules to apply to all updates to the actual spend, regardless
843 # of the thresholds set in `threshold_rules`.
844 # billing account&#x27;s spend, regardless of the thresholds defined using
845 # threshold rules.
Bu Sun Kim65020912020-05-20 12:08:20 -0700846 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic where budget related messages will be
847 # published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
848 # are sent at regular intervals to the topic.
849 # The topic needs to be created before the budget is created; see
850 # https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
851 # for more details.
852 # Caller is expected to have
853 # `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a
854 # budget, otherwise, the API call will fail with PERMISSION_DENIED. See
855 # https://cloud.google.com/pubsub/docs/access-control for more details on
856 # Pub/Sub roles and permissions.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700857 &quot;schemaVersion&quot;: &quot;A String&quot;, # Required. The schema version of the notification.
858 # Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in
859 # https://cloud.google.com/billing/docs/how-to/budgets#notification_format
Bu Sun Kim65020912020-05-20 12:08:20 -0700860 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700861 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI.
862 # Validation: &lt;= 60 chars.
Bu Sun Kim65020912020-05-20 12:08:20 -0700863 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds
864 # being crossed) when spend exceeds the specified percentages of the budget.
865 { # ThresholdRule contains a definition of a threshold which triggers
866 # an alert (a notification of a threshold being crossed) to be sent when
867 # spend goes above the specified amount.
868 # Alerts are automatically e-mailed to users with the Billing Account
869 # Administrator role or the Billing Account User role.
870 # The thresholds here have no effect on notifications sent to anything
871 # configured under `Budget.all_updates_rule`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700872 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded.
873 # This is a 1.0-based percentage, so 0.5 = 50%.
874 # Validation: non-negative number.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700875 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the
876 # threshold. Behavior defaults to CURRENT_SPEND if not set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700877 },
878 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700879 }</pre>
880</div>
881
882</body></html>