blob: 93c1ab2dc7aaf4a659b06612ca8e2e0409b38719 [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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070081 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070082<p class="firstline">Creates a new budget. See Quotas and limits for more information on the limits of the number of budgets you can create.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070083<p class="toc_element">
84 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
85<p class="firstline">Deletes a budget. Returns successfully if already deleted.</p>
86<p class="toc_element">
87 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070088<p class="firstline">Returns a budget. WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070089<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070090 <code><a href="#list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070091<p class="firstline">Returns a list of budgets for a billing account. WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070092<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
96 <code><a href="#patch">patch(name, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097<p class="firstline">Updates a budget and returns the updated budget. WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. Budget fields that are not exposed in this API will not be changed by this method.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070098<h3>Method Details</h3>
99<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700100 <code class="details" id="close">close()</code>
101 <pre>Close httplib2 connections.</pre>
102</div>
103
104<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700105 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700106 <pre>Creates a new budget. See Quotas and limits for more information on the limits of the number of budgets you can create.
Bu Sun Kim65020912020-05-20 12:08:20 -0700107
108Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700109 parent: string, Required. The name of the billing account to create the budget in. Values are of the form `billingAccounts/{billingAccountId}`. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700110 body: object, The request body.
111 The object takes the form of:
112
113{ # Request for CreateBudget
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700114 &quot;budget&quot;: { # A budget is a plan that describes what you expect to spend on Cloud projects, plus the rules to execute as spend is tracked against that plan, (for example, send an alert when 90% of the target spend is met). Currently all plans are monthly budgets so the usage period(s) tracked are implied (calendar months of usage back-to-back). # Required. Budget to create.
115 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a read-modify-write operation. An empty etag will cause an update to overwrite other changes.
116 &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 the actual spend against the budget.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700117 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700118 &quot;labels&quot;: { # Optional. A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. Currently, multiple entries or multiple values per entry are not allowed. If omitted, the report will include all labeled and unlabeled usage.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700119 &quot;a_key&quot;: [
120 &quot;&quot;,
121 ],
122 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700123 &quot;services&quot;: [ # Optional. A set of services of the form `services/{service_id}`, specifying that usage from only this set of services should be included in the budget. If omitted, the report will include usage for all the services. The service names are available through the Catalog API: https://cloud.google.com/billing/v1/how-tos/catalog-api.
124 &quot;A String&quot;,
125 ],
126 &quot;subaccounts&quot;: [ # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, specifying that usage from only this set of subaccounts should be included in the budget. If a subaccount is set to the name of the parent account, usage from the parent account will be included. If omitted, the report will include usage from the parent account and all subaccounts, if they exist.
127 &quot;A String&quot;,
128 ],
129 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`, specifying that usage from only this set of projects should be included in the budget. If omitted, the report will include all usage for the billing account, regardless of which project the usage occurred on. Only zero or one project can be specified currently.
130 &quot;A String&quot;,
131 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700132 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700133 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget.
134 { # ThresholdRule contains a definition of a threshold which triggers an alert (a notification of a threshold being crossed) to be sent when spend goes above the specified amount. Alerts are automatically e-mailed to users with the Billing Account Administrator role or the Billing Account User role. The thresholds here have no effect on notifications sent to anything configured under `Budget.all_updates_rule`.
135 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded. This is a 1.0-based percentage, so 0.5 = 50%. Validation: non-negative number.
136 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the threshold. Behavior defaults to CURRENT_SPEND if not set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700137 },
138 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700139 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. Validation: &lt;= 60 chars.
140 &quot;allUpdatesRule&quot;: { # AllUpdatesRule defines notifications that are sent based on budget spend and thresholds. # Optional. Rules to apply to notifications sent based on budget spend and thresholds.
141 &quot;disableDefaultIamRecipients&quot;: True or False, # Optional. When set to true, disables default notifications sent when a threshold is exceeded. Default notifications are sent to those with Billing Account Administrator and Billing Account User IAM roles for the target account.
142 &quot;schemaVersion&quot;: &quot;A String&quot;, # Optional. The schema version of the notification sent to `pubsub_topic`. Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
143 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Optional. The name of the Pub/Sub topic where budget related messages will be published, in the form `projects/{project_id}/topics/{topic_id}`. Updates are sent at regular intervals to the topic. The topic needs to be created before the budget is created; see https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications for more details. Caller is expected to have `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a budget, otherwise, the API call will fail with PERMISSION_DENIED. See https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications for more details on Pub/Sub roles and permissions.
144 &quot;monitoringNotificationChannels&quot;: [ # Optional. Targets to send notifications to when a threshold is exceeded. This is in addition to default recipients who have billing account IAM roles. The value is the full REST resource name of a monitoring notification channel with the form `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5 channels are allowed. See https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients for more details.
145 &quot;A String&quot;,
146 ],
147 },
148 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget. The resource name implies the scope of a budget. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
149 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
150 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget. `currency_code` is optional. If specified, it must match the currency of the billing account. The `currency_code` is provided on output.
151 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
152 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
153 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
154 },
155 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to last period&#x27;s spend. At this time, the amount is automatically 100% of last period&#x27;s spend; that is, there are no other options yet. Future configuration will be described here (for example, configuring a percentage of last period&#x27;s spend). # Use the last period&#x27;s actual spend as the budget for the present period.
156 },
157 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700158 },
159 }
160
161 x__xgafv: string, V1 error format.
162 Allowed values
163 1 - v1 error format
164 2 - v2 error format
165
166Returns:
167 An object of the form:
168
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700169 { # A budget is a plan that describes what you expect to spend on Cloud projects, plus the rules to execute as spend is tracked against that plan, (for example, send an alert when 90% of the target spend is met). Currently all plans are monthly budgets so the usage period(s) tracked are implied (calendar months of usage back-to-back).
170 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a read-modify-write operation. An empty etag will cause an update to overwrite other changes.
171 &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 the actual spend against the budget.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700172 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700173 &quot;labels&quot;: { # Optional. A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. Currently, multiple entries or multiple values per entry are not allowed. If omitted, the report will include all labeled and unlabeled usage.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700174 &quot;a_key&quot;: [
175 &quot;&quot;,
176 ],
177 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700178 &quot;services&quot;: [ # Optional. A set of services of the form `services/{service_id}`, specifying that usage from only this set of services should be included in the budget. If omitted, the report will include usage for all the services. The service names are available through the Catalog API: https://cloud.google.com/billing/v1/how-tos/catalog-api.
179 &quot;A String&quot;,
180 ],
181 &quot;subaccounts&quot;: [ # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, specifying that usage from only this set of subaccounts should be included in the budget. If a subaccount is set to the name of the parent account, usage from the parent account will be included. If omitted, the report will include usage from the parent account and all subaccounts, if they exist.
182 &quot;A String&quot;,
183 ],
184 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`, specifying that usage from only this set of projects should be included in the budget. If omitted, the report will include all usage for the billing account, regardless of which project the usage occurred on. Only zero or one project can be specified currently.
185 &quot;A String&quot;,
186 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700187 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700188 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget.
189 { # ThresholdRule contains a definition of a threshold which triggers an alert (a notification of a threshold being crossed) to be sent when spend goes above the specified amount. Alerts are automatically e-mailed to users with the Billing Account Administrator role or the Billing Account User role. The thresholds here have no effect on notifications sent to anything configured under `Budget.all_updates_rule`.
190 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded. This is a 1.0-based percentage, so 0.5 = 50%. Validation: non-negative number.
191 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the threshold. Behavior defaults to CURRENT_SPEND if not set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700192 },
193 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700194 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. Validation: &lt;= 60 chars.
195 &quot;allUpdatesRule&quot;: { # AllUpdatesRule defines notifications that are sent based on budget spend and thresholds. # Optional. Rules to apply to notifications sent based on budget spend and thresholds.
196 &quot;disableDefaultIamRecipients&quot;: True or False, # Optional. When set to true, disables default notifications sent when a threshold is exceeded. Default notifications are sent to those with Billing Account Administrator and Billing Account User IAM roles for the target account.
197 &quot;schemaVersion&quot;: &quot;A String&quot;, # Optional. The schema version of the notification sent to `pubsub_topic`. Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
198 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Optional. The name of the Pub/Sub topic where budget related messages will be published, in the form `projects/{project_id}/topics/{topic_id}`. Updates are sent at regular intervals to the topic. The topic needs to be created before the budget is created; see https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications for more details. Caller is expected to have `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a budget, otherwise, the API call will fail with PERMISSION_DENIED. See https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications for more details on Pub/Sub roles and permissions.
199 &quot;monitoringNotificationChannels&quot;: [ # Optional. Targets to send notifications to when a threshold is exceeded. This is in addition to default recipients who have billing account IAM roles. The value is the full REST resource name of a monitoring notification channel with the form `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5 channels are allowed. See https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients for more details.
200 &quot;A String&quot;,
201 ],
202 },
203 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget. The resource name implies the scope of a budget. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
204 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
205 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget. `currency_code` is optional. If specified, it must match the currency of the billing account. The `currency_code` is provided on output.
206 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
207 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
208 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
209 },
210 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to last period&#x27;s spend. At this time, the amount is automatically 100% of last period&#x27;s spend; that is, there are no other options yet. Future configuration will be described here (for example, configuring a percentage of last period&#x27;s spend). # Use the last period&#x27;s actual spend as the budget for the present period.
211 },
212 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700213 }</pre>
214</div>
215
216<div class="method">
217 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
218 <pre>Deletes a budget. Returns successfully if already deleted.
219
220Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700221 name: string, Required. Name of the budget to delete. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700222 x__xgafv: string, V1 error format.
223 Allowed values
224 1 - v1 error format
225 2 - v2 error format
226
227Returns:
228 An object of the form:
229
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700230 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700231 }</pre>
232</div>
233
234<div class="method">
235 <code class="details" id="get">get(name, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700236 <pre>Returns a budget. WARNING: There are some fields exposed on the Google Cloud Console that aren&#x27;t available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.
Bu Sun Kim65020912020-05-20 12:08:20 -0700237
238Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700239 name: string, Required. Name of budget to get. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700240 x__xgafv: string, V1 error format.
241 Allowed values
242 1 - v1 error format
243 2 - v2 error format
244
245Returns:
246 An object of the form:
247
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700248 { # A budget is a plan that describes what you expect to spend on Cloud projects, plus the rules to execute as spend is tracked against that plan, (for example, send an alert when 90% of the target spend is met). Currently all plans are monthly budgets so the usage period(s) tracked are implied (calendar months of usage back-to-back).
249 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a read-modify-write operation. An empty etag will cause an update to overwrite other changes.
250 &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 the actual spend against the budget.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700251 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700252 &quot;labels&quot;: { # Optional. A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. Currently, multiple entries or multiple values per entry are not allowed. If omitted, the report will include all labeled and unlabeled usage.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700253 &quot;a_key&quot;: [
254 &quot;&quot;,
255 ],
256 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700257 &quot;services&quot;: [ # Optional. A set of services of the form `services/{service_id}`, specifying that usage from only this set of services should be included in the budget. If omitted, the report will include usage for all the services. The service names are available through the Catalog API: https://cloud.google.com/billing/v1/how-tos/catalog-api.
258 &quot;A String&quot;,
259 ],
260 &quot;subaccounts&quot;: [ # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, specifying that usage from only this set of subaccounts should be included in the budget. If a subaccount is set to the name of the parent account, usage from the parent account will be included. If omitted, the report will include usage from the parent account and all subaccounts, if they exist.
261 &quot;A String&quot;,
262 ],
263 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`, specifying that usage from only this set of projects should be included in the budget. If omitted, the report will include all usage for the billing account, regardless of which project the usage occurred on. Only zero or one project can be specified currently.
264 &quot;A String&quot;,
265 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700266 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700267 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget.
268 { # ThresholdRule contains a definition of a threshold which triggers an alert (a notification of a threshold being crossed) to be sent when spend goes above the specified amount. Alerts are automatically e-mailed to users with the Billing Account Administrator role or the Billing Account User role. The thresholds here have no effect on notifications sent to anything configured under `Budget.all_updates_rule`.
269 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded. This is a 1.0-based percentage, so 0.5 = 50%. Validation: non-negative number.
270 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the threshold. Behavior defaults to CURRENT_SPEND if not set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700271 },
272 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700273 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. Validation: &lt;= 60 chars.
274 &quot;allUpdatesRule&quot;: { # AllUpdatesRule defines notifications that are sent based on budget spend and thresholds. # Optional. Rules to apply to notifications sent based on budget spend and thresholds.
275 &quot;disableDefaultIamRecipients&quot;: True or False, # Optional. When set to true, disables default notifications sent when a threshold is exceeded. Default notifications are sent to those with Billing Account Administrator and Billing Account User IAM roles for the target account.
276 &quot;schemaVersion&quot;: &quot;A String&quot;, # Optional. The schema version of the notification sent to `pubsub_topic`. Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
277 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Optional. The name of the Pub/Sub topic where budget related messages will be published, in the form `projects/{project_id}/topics/{topic_id}`. Updates are sent at regular intervals to the topic. The topic needs to be created before the budget is created; see https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications for more details. Caller is expected to have `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a budget, otherwise, the API call will fail with PERMISSION_DENIED. See https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications for more details on Pub/Sub roles and permissions.
278 &quot;monitoringNotificationChannels&quot;: [ # Optional. Targets to send notifications to when a threshold is exceeded. This is in addition to default recipients who have billing account IAM roles. The value is the full REST resource name of a monitoring notification channel with the form `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5 channels are allowed. See https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients for more details.
279 &quot;A String&quot;,
280 ],
281 },
282 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget. The resource name implies the scope of a budget. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
283 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
284 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget. `currency_code` is optional. If specified, it must match the currency of the billing account. The `currency_code` is provided on output.
285 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
286 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
287 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
288 },
289 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to last period&#x27;s spend. At this time, the amount is automatically 100% of last period&#x27;s spend; that is, there are no other options yet. Future configuration will be described here (for example, configuring a percentage of last period&#x27;s spend). # Use the last period&#x27;s actual spend as the budget for the present period.
290 },
291 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700292 }</pre>
293</div>
294
295<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700296 <code class="details" id="list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700297 <pre>Returns a list of budgets for a billing account. WARNING: There are some fields exposed on the Google Cloud Console that aren&#x27;t available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.
Bu Sun Kim65020912020-05-20 12:08:20 -0700298
299Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700300 parent: string, Required. Name of billing account to list budgets under. Values are of the form `billingAccounts/{billingAccountId}`. (required)
301 pageToken: string, Optional. The value returned by the last `ListBudgetsResponse` which indicates that this is a continuation of a prior `ListBudgets` call, and that the system should return the next page of data.
302 pageSize: integer, Optional. The maximum number of budgets to return per page. The default and maximum value are 100.
Bu Sun Kim65020912020-05-20 12:08:20 -0700303 x__xgafv: string, V1 error format.
304 Allowed values
305 1 - v1 error format
306 2 - v2 error format
307
308Returns:
309 An object of the form:
310
311 { # Response for ListBudgets
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700312 &quot;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there may be more budgets that match the request; this value should be passed in a new `ListBudgetsRequest`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700313 &quot;budgets&quot;: [ # List of the budgets owned by the requested billing account.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700314 { # A budget is a plan that describes what you expect to spend on Cloud projects, plus the rules to execute as spend is tracked against that plan, (for example, send an alert when 90% of the target spend is met). Currently all plans are monthly budgets so the usage period(s) tracked are implied (calendar months of usage back-to-back).
315 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a read-modify-write operation. An empty etag will cause an update to overwrite other changes.
316 &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 the actual spend against the budget.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700317 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700318 &quot;labels&quot;: { # Optional. A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. Currently, multiple entries or multiple values per entry are not allowed. If omitted, the report will include all labeled and unlabeled usage.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700319 &quot;a_key&quot;: [
320 &quot;&quot;,
321 ],
322 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700323 &quot;services&quot;: [ # Optional. A set of services of the form `services/{service_id}`, specifying that usage from only this set of services should be included in the budget. If omitted, the report will include usage for all the services. The service names are available through the Catalog API: https://cloud.google.com/billing/v1/how-tos/catalog-api.
324 &quot;A String&quot;,
325 ],
326 &quot;subaccounts&quot;: [ # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, specifying that usage from only this set of subaccounts should be included in the budget. If a subaccount is set to the name of the parent account, usage from the parent account will be included. If omitted, the report will include usage from the parent account and all subaccounts, if they exist.
327 &quot;A String&quot;,
328 ],
329 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`, specifying that usage from only this set of projects should be included in the budget. If omitted, the report will include all usage for the billing account, regardless of which project the usage occurred on. Only zero or one project can be specified currently.
330 &quot;A String&quot;,
331 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700332 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700333 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget.
334 { # ThresholdRule contains a definition of a threshold which triggers an alert (a notification of a threshold being crossed) to be sent when spend goes above the specified amount. Alerts are automatically e-mailed to users with the Billing Account Administrator role or the Billing Account User role. The thresholds here have no effect on notifications sent to anything configured under `Budget.all_updates_rule`.
335 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded. This is a 1.0-based percentage, so 0.5 = 50%. Validation: non-negative number.
336 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the threshold. Behavior defaults to CURRENT_SPEND if not set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700337 },
338 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700339 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. Validation: &lt;= 60 chars.
340 &quot;allUpdatesRule&quot;: { # AllUpdatesRule defines notifications that are sent based on budget spend and thresholds. # Optional. Rules to apply to notifications sent based on budget spend and thresholds.
341 &quot;disableDefaultIamRecipients&quot;: True or False, # Optional. When set to true, disables default notifications sent when a threshold is exceeded. Default notifications are sent to those with Billing Account Administrator and Billing Account User IAM roles for the target account.
342 &quot;schemaVersion&quot;: &quot;A String&quot;, # Optional. The schema version of the notification sent to `pubsub_topic`. Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
343 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Optional. The name of the Pub/Sub topic where budget related messages will be published, in the form `projects/{project_id}/topics/{topic_id}`. Updates are sent at regular intervals to the topic. The topic needs to be created before the budget is created; see https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications for more details. Caller is expected to have `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a budget, otherwise, the API call will fail with PERMISSION_DENIED. See https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications for more details on Pub/Sub roles and permissions.
344 &quot;monitoringNotificationChannels&quot;: [ # Optional. Targets to send notifications to when a threshold is exceeded. This is in addition to default recipients who have billing account IAM roles. The value is the full REST resource name of a monitoring notification channel with the form `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5 channels are allowed. See https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients for more details.
345 &quot;A String&quot;,
346 ],
347 },
348 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget. The resource name implies the scope of a budget. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
349 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
350 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget. `currency_code` is optional. If specified, it must match the currency of the billing account. The `currency_code` is provided on output.
351 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
352 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
353 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
354 },
355 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to last period&#x27;s spend. At this time, the amount is automatically 100% of last period&#x27;s spend; that is, there are no other options yet. Future configuration will be described here (for example, configuring a percentage of last period&#x27;s spend). # Use the last period&#x27;s actual spend as the budget for the present period.
356 },
357 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700358 },
359 ],
360 }</pre>
361</div>
362
363<div class="method">
364 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
365 <pre>Retrieves the next page of results.
366
367Args:
368 previous_request: The request for the previous page. (required)
369 previous_response: The response from the request for the previous page. (required)
370
371Returns:
372 A request object that you can call &#x27;execute()&#x27; on to request the next
373 page. Returns None if there are no more items in the collection.
374 </pre>
375</div>
376
377<div class="method">
378 <code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700379 <pre>Updates a budget and returns the updated budget. WARNING: There are some fields exposed on the Google Cloud Console that aren&#x27;t available on this API. Budget fields that are not exposed in this API will not be changed by this method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700380
381Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700382 name: string, Output only. Resource name of the budget. The resource name implies the scope of a budget. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700383 body: object, The request body.
384 The object takes the form of:
385
386{ # Request for UpdateBudget
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700387 &quot;budget&quot;: { # A budget is a plan that describes what you expect to spend on Cloud projects, plus the rules to execute as spend is tracked against that plan, (for example, send an alert when 90% of the target spend is met). Currently all plans are monthly budgets so the usage period(s) tracked are implied (calendar months of usage back-to-back). # Required. The updated budget object. The budget to update is specified by the budget name in the budget.
388 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a read-modify-write operation. An empty etag will cause an update to overwrite other changes.
389 &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 the actual spend against the budget.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700390 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700391 &quot;labels&quot;: { # Optional. A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. Currently, multiple entries or multiple values per entry are not allowed. If omitted, the report will include all labeled and unlabeled usage.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700392 &quot;a_key&quot;: [
393 &quot;&quot;,
394 ],
395 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700396 &quot;services&quot;: [ # Optional. A set of services of the form `services/{service_id}`, specifying that usage from only this set of services should be included in the budget. If omitted, the report will include usage for all the services. The service names are available through the Catalog API: https://cloud.google.com/billing/v1/how-tos/catalog-api.
397 &quot;A String&quot;,
398 ],
399 &quot;subaccounts&quot;: [ # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, specifying that usage from only this set of subaccounts should be included in the budget. If a subaccount is set to the name of the parent account, usage from the parent account will be included. If omitted, the report will include usage from the parent account and all subaccounts, if they exist.
400 &quot;A String&quot;,
401 ],
402 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`, specifying that usage from only this set of projects should be included in the budget. If omitted, the report will include all usage for the billing account, regardless of which project the usage occurred on. Only zero or one project can be specified currently.
403 &quot;A String&quot;,
404 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700405 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700406 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget.
407 { # ThresholdRule contains a definition of a threshold which triggers an alert (a notification of a threshold being crossed) to be sent when spend goes above the specified amount. Alerts are automatically e-mailed to users with the Billing Account Administrator role or the Billing Account User role. The thresholds here have no effect on notifications sent to anything configured under `Budget.all_updates_rule`.
408 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded. This is a 1.0-based percentage, so 0.5 = 50%. Validation: non-negative number.
409 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the threshold. Behavior defaults to CURRENT_SPEND if not set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700410 },
411 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700412 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. Validation: &lt;= 60 chars.
413 &quot;allUpdatesRule&quot;: { # AllUpdatesRule defines notifications that are sent based on budget spend and thresholds. # Optional. Rules to apply to notifications sent based on budget spend and thresholds.
414 &quot;disableDefaultIamRecipients&quot;: True or False, # Optional. When set to true, disables default notifications sent when a threshold is exceeded. Default notifications are sent to those with Billing Account Administrator and Billing Account User IAM roles for the target account.
415 &quot;schemaVersion&quot;: &quot;A String&quot;, # Optional. The schema version of the notification sent to `pubsub_topic`. Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
416 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Optional. The name of the Pub/Sub topic where budget related messages will be published, in the form `projects/{project_id}/topics/{topic_id}`. Updates are sent at regular intervals to the topic. The topic needs to be created before the budget is created; see https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications for more details. Caller is expected to have `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a budget, otherwise, the API call will fail with PERMISSION_DENIED. See https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications for more details on Pub/Sub roles and permissions.
417 &quot;monitoringNotificationChannels&quot;: [ # Optional. Targets to send notifications to when a threshold is exceeded. This is in addition to default recipients who have billing account IAM roles. The value is the full REST resource name of a monitoring notification channel with the form `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5 channels are allowed. See https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients for more details.
418 &quot;A String&quot;,
419 ],
420 },
421 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget. The resource name implies the scope of a budget. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
422 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
423 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget. `currency_code` is optional. If specified, it must match the currency of the billing account. The `currency_code` is provided on output.
424 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
425 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
426 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
427 },
428 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to last period&#x27;s spend. At this time, the amount is automatically 100% of last period&#x27;s spend; that is, there are no other options yet. Future configuration will be described here (for example, configuring a percentage of last period&#x27;s spend). # Use the last period&#x27;s actual spend as the budget for the present period.
429 },
430 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700431 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700432 &quot;updateMask&quot;: &quot;A String&quot;, # Optional. Indicates which fields in the provided budget to update. Read-only fields (such as `name`) cannot be changed. If this is not provided, then only fields with non-default values from the request are updated. See https://developers.google.com/protocol-buffers/docs/proto3#default for more details about default values.
Bu Sun Kim65020912020-05-20 12:08:20 -0700433 }
434
435 x__xgafv: string, V1 error format.
436 Allowed values
437 1 - v1 error format
438 2 - v2 error format
439
440Returns:
441 An object of the form:
442
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700443 { # A budget is a plan that describes what you expect to spend on Cloud projects, plus the rules to execute as spend is tracked against that plan, (for example, send an alert when 90% of the target spend is met). Currently all plans are monthly budgets so the usage period(s) tracked are implied (calendar months of usage back-to-back).
444 &quot;etag&quot;: &quot;A String&quot;, # Optional. Etag to validate that the object is unchanged for a read-modify-write operation. An empty etag will cause an update to overwrite other changes.
445 &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 the actual spend against the budget.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700446 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700447 &quot;labels&quot;: { # Optional. A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. Currently, multiple entries or multiple values per entry are not allowed. If omitted, the report will include all labeled and unlabeled usage.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700448 &quot;a_key&quot;: [
449 &quot;&quot;,
450 ],
451 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700452 &quot;services&quot;: [ # Optional. A set of services of the form `services/{service_id}`, specifying that usage from only this set of services should be included in the budget. If omitted, the report will include usage for all the services. The service names are available through the Catalog API: https://cloud.google.com/billing/v1/how-tos/catalog-api.
453 &quot;A String&quot;,
454 ],
455 &quot;subaccounts&quot;: [ # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, specifying that usage from only this set of subaccounts should be included in the budget. If a subaccount is set to the name of the parent account, usage from the parent account will be included. If omitted, the report will include usage from the parent account and all subaccounts, if they exist.
456 &quot;A String&quot;,
457 ],
458 &quot;projects&quot;: [ # Optional. A set of projects of the form `projects/{project}`, specifying that usage from only this set of projects should be included in the budget. If omitted, the report will include all usage for the billing account, regardless of which project the usage occurred on. Only zero or one project can be specified currently.
459 &quot;A String&quot;,
460 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700461 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700462 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget.
463 { # ThresholdRule contains a definition of a threshold which triggers an alert (a notification of a threshold being crossed) to be sent when spend goes above the specified amount. Alerts are automatically e-mailed to users with the Billing Account Administrator role or the Billing Account User role. The thresholds here have no effect on notifications sent to anything configured under `Budget.all_updates_rule`.
464 &quot;thresholdPercent&quot;: 3.14, # Required. Send an alert when this threshold is exceeded. This is a 1.0-based percentage, so 0.5 = 50%. Validation: non-negative number.
465 &quot;spendBasis&quot;: &quot;A String&quot;, # Optional. The type of basis used to determine if spend has passed the threshold. Behavior defaults to CURRENT_SPEND if not set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700466 },
467 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700468 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. Validation: &lt;= 60 chars.
469 &quot;allUpdatesRule&quot;: { # AllUpdatesRule defines notifications that are sent based on budget spend and thresholds. # Optional. Rules to apply to notifications sent based on budget spend and thresholds.
470 &quot;disableDefaultIamRecipients&quot;: True or False, # Optional. When set to true, disables default notifications sent when a threshold is exceeded. Default notifications are sent to those with Billing Account Administrator and Billing Account User IAM roles for the target account.
471 &quot;schemaVersion&quot;: &quot;A String&quot;, # Optional. The schema version of the notification sent to `pubsub_topic`. Only &quot;1.0&quot; is accepted. It represents the JSON schema as defined in https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
472 &quot;pubsubTopic&quot;: &quot;A String&quot;, # Optional. The name of the Pub/Sub topic where budget related messages will be published, in the form `projects/{project_id}/topics/{topic_id}`. Updates are sent at regular intervals to the topic. The topic needs to be created before the budget is created; see https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications for more details. Caller is expected to have `pubsub.topics.setIamPolicy` permission on the topic when it&#x27;s set for a budget, otherwise, the API call will fail with PERMISSION_DENIED. See https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications for more details on Pub/Sub roles and permissions.
473 &quot;monitoringNotificationChannels&quot;: [ # Optional. Targets to send notifications to when a threshold is exceeded. This is in addition to default recipients who have billing account IAM roles. The value is the full REST resource name of a monitoring notification channel with the form `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5 channels are allowed. See https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients for more details.
474 &quot;A String&quot;,
475 ],
476 },
477 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the budget. The resource name implies the scope of a budget. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
478 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
479 &quot;specifiedAmount&quot;: { # Represents an amount of money with its currency type. # A specified amount to use as the budget. `currency_code` is optional. If specified, it must match the currency of the billing account. The `currency_code` is provided on output.
480 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
481 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
482 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
483 },
484 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to last period&#x27;s spend. At this time, the amount is automatically 100% of last period&#x27;s spend; that is, there are no other options yet. Future configuration will be described here (for example, configuring a percentage of last period&#x27;s spend). # Use the last period&#x27;s actual spend as the budget for the present period.
485 },
486 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700487 }</pre>
488</div>
489
490</body></html>