blob: c6faf22ae98e05a81556caad9d4f5a61d017e196 [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).
114 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
115 &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.
116 # At this time, the amount is automatically 100% of last period&#x27;s spend;
117 # that is, there are no other options yet.
118 # Future configuration will be described here (for example, configuring a
119 # percentage of last period&#x27;s spend).
120 },
121 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget.
122 # `currency_code` is optional. If specified, it must match the
123 # currency of the billing account. The `currency_code` is provided on
124 # output.
125 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
126 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
127 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
128 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
129 # The value must be between -999,999,999 and +999,999,999 inclusive.
130 # If `units` is positive, `nanos` must be positive or zero.
131 # If `units` is zero, `nanos` can be positive, zero, or negative.
132 # If `units` is negative, `nanos` must be negative or zero.
133 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
134 },
135 },
136 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a
137 # read-modify-write operation.
138 # An empty etag will cause an update to overwrite other changes.
139 &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
140 # of the thresholds set in `threshold_rules`.
141 # billing account&#x27;s spend, regardless of the thresholds defined using
142 # threshold rules.
143 &quot;schemaVersion&quot;: &quot;A String&quot;, # Required. The schema version of the notification.
144 # Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in
145 # https://cloud.google.com/billing/docs/how-to/budgets#notification_format
146 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic where budget related messages will be
147 # published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
148 # are sent at regular intervals to the topic.
149 # The topic needs to be created before the budget is created; see
150 # https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
151 # for more details.
152 # Caller is expected to have
153 # `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a
154 # budget, otherwise, the API call will fail with PERMISSION_DENIED. See
155 # https://cloud.google.com/pubsub/docs/access-control for more details on
156 # Pub/Sub roles and permissions.
157 },
158 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget.
159 # The resource name implies the scope of a budget. Values are of the form
160 # `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
161 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds
162 # being crossed) when spend exceeds the specified percentages of the budget.
163 { # ThresholdRule contains a definition of a threshold which triggers
164 # an alert (a notification of a threshold being crossed) to be sent when
165 # spend goes above the specified amount.
166 # Alerts are automatically e-mailed to users with the Billing Account
167 # Administrator role or the Billing Account User role.
168 # The thresholds here have no effect on notifications sent to anything
169 # configured under `Budget.all_updates_rule`.
170 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the
171 # threshold. Behavior defaults to CURRENT_SPEND if not set.
172 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded.
173 # This is a 1.0-based percentage, so 0.5 = 50%.
174 # Validation: non-negative number.
175 },
176 ],
177 &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
178 # the actual spend against the budget.
179 &quot;services&quot;: [ # Optional. A set of services of the form `services/{service_id}`,
180 # specifying that usage from only this set of services should be
181 # included in the budget. If omitted, the report will include usage for
182 # all the services.
183 # The service names are available through the Catalog API:
184 # https://cloud.google.com/billing/v1/how-tos/catalog-api.
185 &quot;A String&quot;,
186 ],
187 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
188 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`,
189 # specifying that usage from only this set of projects should be
190 # included in the budget. If omitted, the report will include all usage for
191 # the billing account, regardless of which project the usage occurred on.
192 # Only zero or one project can be specified currently.
193 &quot;A String&quot;,
194 ],
195 },
196 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI.
197 # Validation: &lt;= 60 chars.
198 },
199 }
200
201 x__xgafv: string, V1 error format.
202 Allowed values
203 1 - v1 error format
204 2 - v2 error format
205
206Returns:
207 An object of the form:
208
209 { # A budget is a plan that describes what you expect to spend on Cloud
210 # projects, plus the rules to execute as spend is tracked against that plan,
211 # (for example, send an alert when 90% of the target spend is met).
212 # Currently all plans are monthly budgets so the usage period(s) tracked are
213 # implied (calendar months of usage back-to-back).
214 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
215 &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.
216 # At this time, the amount is automatically 100% of last period&#x27;s spend;
217 # that is, there are no other options yet.
218 # Future configuration will be described here (for example, configuring a
219 # percentage of last period&#x27;s spend).
220 },
221 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget.
222 # `currency_code` is optional. If specified, it must match the
223 # currency of the billing account. The `currency_code` is provided on
224 # output.
225 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
226 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
227 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
228 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
229 # The value must be between -999,999,999 and +999,999,999 inclusive.
230 # If `units` is positive, `nanos` must be positive or zero.
231 # If `units` is zero, `nanos` can be positive, zero, or negative.
232 # If `units` is negative, `nanos` must be negative or zero.
233 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
234 },
235 },
236 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a
237 # read-modify-write operation.
238 # An empty etag will cause an update to overwrite other changes.
239 &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
240 # of the thresholds set in `threshold_rules`.
241 # billing account&#x27;s spend, regardless of the thresholds defined using
242 # threshold rules.
243 &quot;schemaVersion&quot;: &quot;A String&quot;, # Required. The schema version of the notification.
244 # Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in
245 # https://cloud.google.com/billing/docs/how-to/budgets#notification_format
246 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic where budget related messages will be
247 # published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
248 # are sent at regular intervals to the topic.
249 # The topic needs to be created before the budget is created; see
250 # https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
251 # for more details.
252 # Caller is expected to have
253 # `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a
254 # budget, otherwise, the API call will fail with PERMISSION_DENIED. See
255 # https://cloud.google.com/pubsub/docs/access-control for more details on
256 # Pub/Sub roles and permissions.
257 },
258 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget.
259 # The resource name implies the scope of a budget. Values are of the form
260 # `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
261 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds
262 # being crossed) when spend exceeds the specified percentages of the budget.
263 { # ThresholdRule contains a definition of a threshold which triggers
264 # an alert (a notification of a threshold being crossed) to be sent when
265 # spend goes above the specified amount.
266 # Alerts are automatically e-mailed to users with the Billing Account
267 # Administrator role or the Billing Account User role.
268 # The thresholds here have no effect on notifications sent to anything
269 # configured under `Budget.all_updates_rule`.
270 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the
271 # threshold. Behavior defaults to CURRENT_SPEND if not set.
272 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded.
273 # This is a 1.0-based percentage, so 0.5 = 50%.
274 # Validation: non-negative number.
275 },
276 ],
277 &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
278 # the actual spend against the budget.
279 &quot;services&quot;: [ # Optional. A set of services of the form `services/{service_id}`,
280 # specifying that usage from only this set of services should be
281 # included in the budget. If omitted, the report will include usage for
282 # all the services.
283 # The service names are available through the Catalog API:
284 # https://cloud.google.com/billing/v1/how-tos/catalog-api.
285 &quot;A String&quot;,
286 ],
287 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
288 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`,
289 # specifying that usage from only this set of projects should be
290 # included in the budget. If omitted, the report will include all usage for
291 # the billing account, regardless of which project the usage occurred on.
292 # Only zero or one project can be specified currently.
293 &quot;A String&quot;,
294 ],
295 },
296 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI.
297 # Validation: &lt;= 60 chars.
298 }</pre>
299</div>
300
301<div class="method">
302 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
303 <pre>Deletes a budget. Returns successfully if already deleted.
304
305Args:
306 name: string, Required. Name of the budget to delete. Values are of the form
307`billingAccounts/{billingAccountId}/budgets/{budgetId}`. (required)
308 x__xgafv: string, V1 error format.
309 Allowed values
310 1 - v1 error format
311 2 - v2 error format
312
313Returns:
314 An object of the form:
315
316 { # A generic empty message that you can re-use to avoid defining duplicated
317 # empty messages in your APIs. A typical example is to use it as the request
318 # or the response type of an API method. For instance:
319 #
320 # service Foo {
321 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
322 # }
323 #
324 # The JSON representation for `Empty` is empty JSON object `{}`.
325 }</pre>
326</div>
327
328<div class="method">
329 <code class="details" id="get">get(name, x__xgafv=None)</code>
330 <pre>Returns a budget.
331
332WARNING: There are some fields exposed on the Google Cloud Console that
333aren&#x27;t available on this API. When reading from the API, you will not
334see these fields in the return value, though they may have been set
335in the Cloud Console.
336
337Args:
338 name: string, Required. Name of budget to get. Values are of the form
339`billingAccounts/{billingAccountId}/budgets/{budgetId}`. (required)
340 x__xgafv: string, V1 error format.
341 Allowed values
342 1 - v1 error format
343 2 - v2 error format
344
345Returns:
346 An object of the form:
347
348 { # A budget is a plan that describes what you expect to spend on Cloud
349 # projects, plus the rules to execute as spend is tracked against that plan,
350 # (for example, send an alert when 90% of the target spend is met).
351 # Currently all plans are monthly budgets so the usage period(s) tracked are
352 # implied (calendar months of usage back-to-back).
353 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
354 &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.
355 # At this time, the amount is automatically 100% of last period&#x27;s spend;
356 # that is, there are no other options yet.
357 # Future configuration will be described here (for example, configuring a
358 # percentage of last period&#x27;s spend).
359 },
360 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget.
361 # `currency_code` is optional. If specified, it must match the
362 # currency of the billing account. The `currency_code` is provided on
363 # output.
364 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
365 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
366 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
367 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
368 # The value must be between -999,999,999 and +999,999,999 inclusive.
369 # If `units` is positive, `nanos` must be positive or zero.
370 # If `units` is zero, `nanos` can be positive, zero, or negative.
371 # If `units` is negative, `nanos` must be negative or zero.
372 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
373 },
374 },
375 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a
376 # read-modify-write operation.
377 # An empty etag will cause an update to overwrite other changes.
378 &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
379 # of the thresholds set in `threshold_rules`.
380 # billing account&#x27;s spend, regardless of the thresholds defined using
381 # threshold rules.
382 &quot;schemaVersion&quot;: &quot;A String&quot;, # Required. The schema version of the notification.
383 # Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in
384 # https://cloud.google.com/billing/docs/how-to/budgets#notification_format
385 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic where budget related messages will be
386 # published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
387 # are sent at regular intervals to the topic.
388 # The topic needs to be created before the budget is created; see
389 # https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
390 # for more details.
391 # Caller is expected to have
392 # `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a
393 # budget, otherwise, the API call will fail with PERMISSION_DENIED. See
394 # https://cloud.google.com/pubsub/docs/access-control for more details on
395 # Pub/Sub roles and permissions.
396 },
397 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget.
398 # The resource name implies the scope of a budget. Values are of the form
399 # `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
400 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds
401 # being crossed) when spend exceeds the specified percentages of the budget.
402 { # ThresholdRule contains a definition of a threshold which triggers
403 # an alert (a notification of a threshold being crossed) to be sent when
404 # spend goes above the specified amount.
405 # Alerts are automatically e-mailed to users with the Billing Account
406 # Administrator role or the Billing Account User role.
407 # The thresholds here have no effect on notifications sent to anything
408 # configured under `Budget.all_updates_rule`.
409 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the
410 # threshold. Behavior defaults to CURRENT_SPEND if not set.
411 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded.
412 # This is a 1.0-based percentage, so 0.5 = 50%.
413 # Validation: non-negative number.
414 },
415 ],
416 &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
417 # the actual spend against the budget.
418 &quot;services&quot;: [ # Optional. A set of services of the form `services/{service_id}`,
419 # specifying that usage from only this set of services should be
420 # included in the budget. If omitted, the report will include usage for
421 # all the services.
422 # The service names are available through the Catalog API:
423 # https://cloud.google.com/billing/v1/how-tos/catalog-api.
424 &quot;A String&quot;,
425 ],
426 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
427 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`,
428 # specifying that usage from only this set of projects should be
429 # included in the budget. If omitted, the report will include all usage for
430 # the billing account, regardless of which project the usage occurred on.
431 # Only zero or one project can be specified currently.
432 &quot;A String&quot;,
433 ],
434 },
435 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI.
436 # Validation: &lt;= 60 chars.
437 }</pre>
438</div>
439
440<div class="method">
441 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
442 <pre>Returns a list of budgets for a billing account.
443
444WARNING: There are some fields exposed on the Google Cloud Console that
445aren&#x27;t available on this API. When reading from the API, you will not
446see these fields in the return value, though they may have been set
447in the Cloud Console.
448
449Args:
450 parent: string, Required. Name of billing account to list budgets under. Values
451are of the form `billingAccounts/{billingAccountId}`. (required)
452 pageSize: integer, Optional. The maximum number of budgets to return per page.
453The default and maximum value are 100.
454 pageToken: string, Optional. The value returned by the last `ListBudgetsResponse` which
455indicates that this is a continuation of a prior `ListBudgets` call,
456and that the system should return the next page of data.
457 x__xgafv: string, V1 error format.
458 Allowed values
459 1 - v1 error format
460 2 - v2 error format
461
462Returns:
463 An object of the form:
464
465 { # Response for ListBudgets
466 &quot;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there may be more budgets that match the
467 # request; this value should be passed in a new `ListBudgetsRequest`.
468 &quot;budgets&quot;: [ # List of the budgets owned by the requested billing account.
469 { # A budget is a plan that describes what you expect to spend on Cloud
470 # projects, plus the rules to execute as spend is tracked against that plan,
471 # (for example, send an alert when 90% of the target spend is met).
472 # Currently all plans are monthly budgets so the usage period(s) tracked are
473 # implied (calendar months of usage back-to-back).
474 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
475 &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.
476 # At this time, the amount is automatically 100% of last period&#x27;s spend;
477 # that is, there are no other options yet.
478 # Future configuration will be described here (for example, configuring a
479 # percentage of last period&#x27;s spend).
480 },
481 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget.
482 # `currency_code` is optional. If specified, it must match the
483 # currency of the billing account. The `currency_code` is provided on
484 # output.
485 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
486 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
487 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
488 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
489 # The value must be between -999,999,999 and +999,999,999 inclusive.
490 # If `units` is positive, `nanos` must be positive or zero.
491 # If `units` is zero, `nanos` can be positive, zero, or negative.
492 # If `units` is negative, `nanos` must be negative or zero.
493 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
494 },
495 },
496 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a
497 # read-modify-write operation.
498 # An empty etag will cause an update to overwrite other changes.
499 &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
500 # of the thresholds set in `threshold_rules`.
501 # billing account&#x27;s spend, regardless of the thresholds defined using
502 # threshold rules.
503 &quot;schemaVersion&quot;: &quot;A String&quot;, # Required. The schema version of the notification.
504 # Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in
505 # https://cloud.google.com/billing/docs/how-to/budgets#notification_format
506 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic where budget related messages will be
507 # published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
508 # are sent at regular intervals to the topic.
509 # The topic needs to be created before the budget is created; see
510 # https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
511 # for more details.
512 # Caller is expected to have
513 # `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a
514 # budget, otherwise, the API call will fail with PERMISSION_DENIED. See
515 # https://cloud.google.com/pubsub/docs/access-control for more details on
516 # Pub/Sub roles and permissions.
517 },
518 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget.
519 # The resource name implies the scope of a budget. Values are of the form
520 # `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
521 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds
522 # being crossed) when spend exceeds the specified percentages of the budget.
523 { # ThresholdRule contains a definition of a threshold which triggers
524 # an alert (a notification of a threshold being crossed) to be sent when
525 # spend goes above the specified amount.
526 # Alerts are automatically e-mailed to users with the Billing Account
527 # Administrator role or the Billing Account User role.
528 # The thresholds here have no effect on notifications sent to anything
529 # configured under `Budget.all_updates_rule`.
530 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the
531 # threshold. Behavior defaults to CURRENT_SPEND if not set.
532 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded.
533 # This is a 1.0-based percentage, so 0.5 = 50%.
534 # Validation: non-negative number.
535 },
536 ],
537 &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
538 # the actual spend against the budget.
539 &quot;services&quot;: [ # Optional. A set of services of the form `services/{service_id}`,
540 # specifying that usage from only this set of services should be
541 # included in the budget. If omitted, the report will include usage for
542 # all the services.
543 # The service names are available through the Catalog API:
544 # https://cloud.google.com/billing/v1/how-tos/catalog-api.
545 &quot;A String&quot;,
546 ],
547 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
548 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`,
549 # specifying that usage from only this set of projects should be
550 # included in the budget. If omitted, the report will include all usage for
551 # the billing account, regardless of which project the usage occurred on.
552 # Only zero or one project can be specified currently.
553 &quot;A String&quot;,
554 ],
555 },
556 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI.
557 # Validation: &lt;= 60 chars.
558 },
559 ],
560 }</pre>
561</div>
562
563<div class="method">
564 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
565 <pre>Retrieves the next page of results.
566
567Args:
568 previous_request: The request for the previous page. (required)
569 previous_response: The response from the request for the previous page. (required)
570
571Returns:
572 A request object that you can call &#x27;execute()&#x27; on to request the next
573 page. Returns None if there are no more items in the collection.
574 </pre>
575</div>
576
577<div class="method">
578 <code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code>
579 <pre>Updates a budget and returns the updated budget.
580
581WARNING: There are some fields exposed on the Google Cloud Console that
582aren&#x27;t available on this API. Budget fields that are not exposed in
583this API will not be changed by this method.
584
585Args:
586 name: string, Output only. Resource name of the budget.
587The resource name implies the scope of a budget. Values are of the form
588`billingAccounts/{billingAccountId}/budgets/{budgetId}`. (required)
589 body: object, The request body.
590 The object takes the form of:
591
592{ # Request for UpdateBudget
593 &quot;budget&quot;: { # A budget is a plan that describes what you expect to spend on Cloud # Required. The updated budget object.
594 # The budget to update is specified by the budget name in the budget.
595 # projects, plus the rules to execute as spend is tracked against that plan,
596 # (for example, send an alert when 90% of the target spend is met).
597 # Currently all plans are monthly budgets so the usage period(s) tracked are
598 # implied (calendar months of usage back-to-back).
599 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
600 &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.
601 # At this time, the amount is automatically 100% of last period&#x27;s spend;
602 # that is, there are no other options yet.
603 # Future configuration will be described here (for example, configuring a
604 # percentage of last period&#x27;s spend).
605 },
606 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget.
607 # `currency_code` is optional. If specified, it must match the
608 # currency of the billing account. The `currency_code` is provided on
609 # output.
610 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
611 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
612 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
613 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
614 # The value must be between -999,999,999 and +999,999,999 inclusive.
615 # If `units` is positive, `nanos` must be positive or zero.
616 # If `units` is zero, `nanos` can be positive, zero, or negative.
617 # If `units` is negative, `nanos` must be negative or zero.
618 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
619 },
620 },
621 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a
622 # read-modify-write operation.
623 # An empty etag will cause an update to overwrite other changes.
624 &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
625 # of the thresholds set in `threshold_rules`.
626 # billing account&#x27;s spend, regardless of the thresholds defined using
627 # threshold rules.
628 &quot;schemaVersion&quot;: &quot;A String&quot;, # Required. The schema version of the notification.
629 # Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in
630 # https://cloud.google.com/billing/docs/how-to/budgets#notification_format
631 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic where budget related messages will be
632 # published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
633 # are sent at regular intervals to the topic.
634 # The topic needs to be created before the budget is created; see
635 # https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
636 # for more details.
637 # Caller is expected to have
638 # `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a
639 # budget, otherwise, the API call will fail with PERMISSION_DENIED. See
640 # https://cloud.google.com/pubsub/docs/access-control for more details on
641 # Pub/Sub roles and permissions.
642 },
643 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget.
644 # The resource name implies the scope of a budget. Values are of the form
645 # `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
646 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds
647 # being crossed) when spend exceeds the specified percentages of the budget.
648 { # ThresholdRule contains a definition of a threshold which triggers
649 # an alert (a notification of a threshold being crossed) to be sent when
650 # spend goes above the specified amount.
651 # Alerts are automatically e-mailed to users with the Billing Account
652 # Administrator role or the Billing Account User role.
653 # The thresholds here have no effect on notifications sent to anything
654 # configured under `Budget.all_updates_rule`.
655 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the
656 # threshold. Behavior defaults to CURRENT_SPEND if not set.
657 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded.
658 # This is a 1.0-based percentage, so 0.5 = 50%.
659 # Validation: non-negative number.
660 },
661 ],
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;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
673 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`,
674 # specifying that usage from only this set of projects should be
675 # included in the budget. If omitted, the report will include all usage for
676 # the billing account, regardless of which project the usage occurred on.
677 # Only zero or one project can be specified currently.
678 &quot;A String&quot;,
679 ],
680 },
681 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI.
682 # Validation: &lt;= 60 chars.
683 },
684 &quot;updateMask&quot;: &quot;A String&quot;, # Optional. Indicates which fields in the provided budget to update.
685 # Read-only fields (such as `name`) cannot be changed. If this is not
686 # provided, then only fields with non-default values from the request are
687 # updated. See
688 # https://developers.google.com/protocol-buffers/docs/proto3#default for more
689 # details about default values.
690 }
691
692 x__xgafv: string, V1 error format.
693 Allowed values
694 1 - v1 error format
695 2 - v2 error format
696
697Returns:
698 An object of the form:
699
700 { # A budget is a plan that describes what you expect to spend on Cloud
701 # projects, plus the rules to execute as spend is tracked against that plan,
702 # (for example, send an alert when 90% of the target spend is met).
703 # Currently all plans are monthly budgets so the usage period(s) tracked are
704 # implied (calendar months of usage back-to-back).
705 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
706 &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.
707 # At this time, the amount is automatically 100% of last period&#x27;s spend;
708 # that is, there are no other options yet.
709 # Future configuration will be described here (for example, configuring a
710 # percentage of last period&#x27;s spend).
711 },
712 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget.
713 # `currency_code` is optional. If specified, it must match the
714 # currency of the billing account. The `currency_code` is provided on
715 # output.
716 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
717 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
718 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
719 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
720 # The value must be between -999,999,999 and +999,999,999 inclusive.
721 # If `units` is positive, `nanos` must be positive or zero.
722 # If `units` is zero, `nanos` can be positive, zero, or negative.
723 # If `units` is negative, `nanos` must be negative or zero.
724 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
725 },
726 },
727 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a
728 # read-modify-write operation.
729 # An empty etag will cause an update to overwrite other changes.
730 &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
731 # of the thresholds set in `threshold_rules`.
732 # billing account&#x27;s spend, regardless of the thresholds defined using
733 # threshold rules.
734 &quot;schemaVersion&quot;: &quot;A String&quot;, # Required. The schema version of the notification.
735 # Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in
736 # https://cloud.google.com/billing/docs/how-to/budgets#notification_format
737 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic where budget related messages will be
738 # published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
739 # are sent at regular intervals to the topic.
740 # The topic needs to be created before the budget is created; see
741 # https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
742 # for more details.
743 # Caller is expected to have
744 # `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a
745 # budget, otherwise, the API call will fail with PERMISSION_DENIED. See
746 # https://cloud.google.com/pubsub/docs/access-control for more details on
747 # Pub/Sub roles and permissions.
748 },
749 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget.
750 # The resource name implies the scope of a budget. Values are of the form
751 # `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
752 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds
753 # being crossed) when spend exceeds the specified percentages of the budget.
754 { # ThresholdRule contains a definition of a threshold which triggers
755 # an alert (a notification of a threshold being crossed) to be sent when
756 # spend goes above the specified amount.
757 # Alerts are automatically e-mailed to users with the Billing Account
758 # Administrator role or the Billing Account User role.
759 # The thresholds here have no effect on notifications sent to anything
760 # configured under `Budget.all_updates_rule`.
761 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the
762 # threshold. Behavior defaults to CURRENT_SPEND if not set.
763 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded.
764 # This is a 1.0-based percentage, so 0.5 = 50%.
765 # Validation: non-negative number.
766 },
767 ],
768 &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
769 # the actual spend against the budget.
770 &quot;services&quot;: [ # Optional. A set of services of the form `services/{service_id}`,
771 # specifying that usage from only this set of services should be
772 # included in the budget. If omitted, the report will include usage for
773 # all the services.
774 # The service names are available through the Catalog API:
775 # https://cloud.google.com/billing/v1/how-tos/catalog-api.
776 &quot;A String&quot;,
777 ],
778 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
779 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`,
780 # specifying that usage from only this set of projects should be
781 # included in the budget. If omitted, the report will include all usage for
782 # the billing account, regardless of which project the usage occurred on.
783 # Only zero or one project can be specified currently.
784 &quot;A String&quot;,
785 ],
786 },
787 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI.
788 # Validation: &lt;= 60 chars.
789 }</pre>
790</div>
791
792</body></html>