blob: 0e8a4ccd6c7608826ea0e2db3c41c029355196d3 [file] [log] [blame]
Bu Sun Kim673ec5c2020-11-16 11:05:03 -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_v1.html">Cloud Billing Budget API</a> . <a href="billingbudgets_v1.billingAccounts.html">billingAccounts</a> . <a href="billingbudgets_v1.billingAccounts.budgets.html">budgets</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
81 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Creates a new budget. See [Quotas and limits](https://cloud.google.com/billing/quotas) for more information on the limits of the number of budgets you can create.</p>
83<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>
88<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>
89<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -080090 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -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>
92<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, updateMask=None, x__xgafv=None)</a></code></p>
97<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>
98<h3>Method Details</h3>
99<div class="method">
100 <code class="details" id="close">close()</code>
101 <pre>Close httplib2 connections.</pre>
102</div>
103
104<div class="method">
105 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
106 <pre>Creates a new budget. See [Quotas and limits](https://cloud.google.com/billing/quotas) for more information on the limits of the number of budgets you can create.
107
108Args:
109 parent: string, Required. The name of the billing account to create the budget in. Values are of the form `billingAccounts/{billingAccountId}`. (required)
110 body: object, The request body.
111 The object takes the form of:
112
113{ # 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).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800114 &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. 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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800116 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800117 &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.
118 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
119 &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.
120 &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.
121 },
122 },
123 &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.
124 &quot;creditTypes&quot;: [ # Optional. If Filter.credit_types_treatment is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be subtracted from gross cost to determine the spend for threshold calculations. If Filter.credit_types_treatment is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. See [a list of acceptable credit type values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type).
125 &quot;A String&quot;,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800126 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800127 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
128 &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.
129 &quot;a_key&quot;: [
130 &quot;&quot;,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800131 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700132 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800133 &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.
134 &quot;A String&quot;,
135 ],
136 &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.
137 &quot;A String&quot;,
138 ],
139 &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 the field is omitted, the report will include usage from the parent account and all subaccounts, if they exist.
140 &quot;A String&quot;,
141 ],
142 },
143 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. The name must be less than or equal to 60 characters.
144 &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.
145 &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}`.
146 &quot;notificationsRule&quot;: { # NotificationsRule defines notifications that are sent based on budget spend and thresholds. # Optional. Rules to apply to notifications sent based on budget spend and thresholds.
147 &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.
148 &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.
149 &quot;A String&quot;,
150 ],
151 &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.
152 &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
153 },
154 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget.
155 { # 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`.
156 &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.
157 &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.
158 },
159 ],
160}
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700161
162 x__xgafv: string, V1 error format.
163 Allowed values
164 1 - v1 error format
165 2 - v2 error format
166
167Returns:
168 An object of the form:
169
170 { # 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).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800171 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
172 &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.
173 },
174 &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.
175 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
176 &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.
177 &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.
178 },
179 },
180 &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.
181 &quot;creditTypes&quot;: [ # Optional. If Filter.credit_types_treatment is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be subtracted from gross cost to determine the spend for threshold calculations. If Filter.credit_types_treatment is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. See [a list of acceptable credit type values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type).
182 &quot;A String&quot;,
183 ],
184 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
185 &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.
186 &quot;a_key&quot;: [
187 &quot;&quot;,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800188 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800189 },
190 &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.
191 &quot;A String&quot;,
192 ],
193 &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.
194 &quot;A String&quot;,
195 ],
196 &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 the field is omitted, the report will include usage from the parent account and all subaccounts, if they exist.
197 &quot;A String&quot;,
198 ],
199 },
200 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. The name must be less than or equal to 60 characters.
201 &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.
202 &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}`.
203 &quot;notificationsRule&quot;: { # NotificationsRule defines notifications that are sent based on budget spend and thresholds. # Optional. Rules to apply to notifications sent based on budget spend and thresholds.
204 &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.
205 &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.
206 &quot;A String&quot;,
207 ],
208 &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.
209 &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
210 },
211 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget.
212 { # 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`.
213 &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.
214 &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.
215 },
216 ],
217}</pre>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700218</div>
219
220<div class="method">
221 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
222 <pre>Deletes a budget. Returns successfully if already deleted.
223
224Args:
225 name: string, Required. Name of the budget to delete. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. (required)
226 x__xgafv: string, V1 error format.
227 Allowed values
228 1 - v1 error format
229 2 - v2 error format
230
231Returns:
232 An object of the form:
233
234 { # 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 `{}`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800235}</pre>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700236</div>
237
238<div class="method">
239 <code class="details" id="get">get(name, x__xgafv=None)</code>
240 <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.
241
242Args:
243 name: string, Required. Name of budget to get. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. (required)
244 x__xgafv: string, V1 error format.
245 Allowed values
246 1 - v1 error format
247 2 - v2 error format
248
249Returns:
250 An object of the form:
251
252 { # 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).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800253 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
254 &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.
255 },
256 &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.
257 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
258 &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.
259 &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.
260 },
261 },
262 &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.
263 &quot;creditTypes&quot;: [ # Optional. If Filter.credit_types_treatment is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be subtracted from gross cost to determine the spend for threshold calculations. If Filter.credit_types_treatment is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. See [a list of acceptable credit type values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type).
264 &quot;A String&quot;,
265 ],
266 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
267 &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.
268 &quot;a_key&quot;: [
269 &quot;&quot;,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800270 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800271 },
272 &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.
273 &quot;A String&quot;,
274 ],
275 &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.
276 &quot;A String&quot;,
277 ],
278 &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 the field is omitted, the report will include usage from the parent account and all subaccounts, if they exist.
279 &quot;A String&quot;,
280 ],
281 },
282 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. The name must be less than or equal to 60 characters.
283 &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.
284 &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}`.
285 &quot;notificationsRule&quot;: { # NotificationsRule defines notifications that are sent based on budget spend and thresholds. # Optional. Rules to apply to notifications sent based on budget spend and thresholds.
286 &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.
287 &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.
288 &quot;A String&quot;,
289 ],
290 &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.
291 &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
292 },
293 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget.
294 { # 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`.
295 &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.
296 &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.
297 },
298 ],
299}</pre>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700300</div>
301
302<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800303 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700304 <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.
305
306Args:
307 parent: string, Required. Name of billing account to list budgets under. Values are of the form `billingAccounts/{billingAccountId}`. (required)
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800308 pageSize: integer, Optional. The maximum number of budgets to return per page. The default and maximum value are 100.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800309 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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700310 x__xgafv: string, V1 error format.
311 Allowed values
312 1 - v1 error format
313 2 - v2 error format
314
315Returns:
316 An object of the form:
317
318 { # Response for ListBudgets
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800319 &quot;budgets&quot;: [ # List of the budgets owned by the requested billing account.
320 { # 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).
321 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
322 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700323 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800324 &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.
325 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
326 &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.
327 &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.
328 },
329 },
330 &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.
331 &quot;creditTypes&quot;: [ # Optional. If Filter.credit_types_treatment is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be subtracted from gross cost to determine the spend for threshold calculations. If Filter.credit_types_treatment is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. See [a list of acceptable credit type values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type).
332 &quot;A String&quot;,
333 ],
334 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
335 &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.
336 &quot;a_key&quot;: [
337 &quot;&quot;,
338 ],
339 },
340 &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.
341 &quot;A String&quot;,
342 ],
343 &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.
344 &quot;A String&quot;,
345 ],
346 &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 the field is omitted, the report will include usage from the parent account and all subaccounts, if they exist.
347 &quot;A String&quot;,
348 ],
349 },
350 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. The name must be less than or equal to 60 characters.
351 &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.
352 &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}`.
353 &quot;notificationsRule&quot;: { # NotificationsRule defines notifications that are sent based on budget spend and thresholds. # Optional. Rules to apply to notifications sent based on budget spend and thresholds.
354 &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.
355 &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.
356 &quot;A String&quot;,
357 ],
358 &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.
359 &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
360 },
361 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget.
362 { # 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`.
363 &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.
364 &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.
365 },
366 ],
367 },
368 ],
369 &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`.
370}</pre>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700371</div>
372
373<div class="method">
374 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
375 <pre>Retrieves the next page of results.
376
377Args:
378 previous_request: The request for the previous page. (required)
379 previous_response: The response from the request for the previous page. (required)
380
381Returns:
382 A request object that you can call &#x27;execute()&#x27; on to request the next
383 page. Returns None if there are no more items in the collection.
384 </pre>
385</div>
386
387<div class="method">
388 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
389 <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.
390
391Args:
392 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)
393 body: object, The request body.
394 The object takes the form of:
395
396{ # 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).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800397 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
398 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800399 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800400 &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.
401 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
402 &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.
403 &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.
404 },
405 },
406 &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.
407 &quot;creditTypes&quot;: [ # Optional. If Filter.credit_types_treatment is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be subtracted from gross cost to determine the spend for threshold calculations. If Filter.credit_types_treatment is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. See [a list of acceptable credit type values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type).
408 &quot;A String&quot;,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800409 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800410 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
411 &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.
412 &quot;a_key&quot;: [
413 &quot;&quot;,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800414 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700415 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800416 &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.
417 &quot;A String&quot;,
418 ],
419 &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.
420 &quot;A String&quot;,
421 ],
422 &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 the field is omitted, the report will include usage from the parent account and all subaccounts, if they exist.
423 &quot;A String&quot;,
424 ],
425 },
426 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. The name must be less than or equal to 60 characters.
427 &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.
428 &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}`.
429 &quot;notificationsRule&quot;: { # NotificationsRule defines notifications that are sent based on budget spend and thresholds. # Optional. Rules to apply to notifications sent based on budget spend and thresholds.
430 &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.
431 &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.
432 &quot;A String&quot;,
433 ],
434 &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.
435 &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
436 },
437 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget.
438 { # 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`.
439 &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.
440 &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.
441 },
442 ],
443}
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700444
445 updateMask: string, 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.
446 x__xgafv: string, V1 error format.
447 Allowed values
448 1 - v1 error format
449 2 - v2 error format
450
451Returns:
452 An object of the form:
453
454 { # 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).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800455 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
456 &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.
457 },
458 &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.
459 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
460 &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.
461 &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.
462 },
463 },
464 &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.
465 &quot;creditTypes&quot;: [ # Optional. If Filter.credit_types_treatment is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be subtracted from gross cost to determine the spend for threshold calculations. If Filter.credit_types_treatment is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. See [a list of acceptable credit type values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type).
466 &quot;A String&quot;,
467 ],
468 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
469 &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.
470 &quot;a_key&quot;: [
471 &quot;&quot;,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800472 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800473 },
474 &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.
475 &quot;A String&quot;,
476 ],
477 &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.
478 &quot;A String&quot;,
479 ],
480 &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 the field is omitted, the report will include usage from the parent account and all subaccounts, if they exist.
481 &quot;A String&quot;,
482 ],
483 },
484 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. The name must be less than or equal to 60 characters.
485 &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.
486 &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}`.
487 &quot;notificationsRule&quot;: { # NotificationsRule defines notifications that are sent based on budget spend and thresholds. # Optional. Rules to apply to notifications sent based on budget spend and thresholds.
488 &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.
489 &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.
490 &quot;A String&quot;,
491 ],
492 &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.
493 &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
494 },
495 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget.
496 { # 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`.
497 &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.
498 &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.
499 },
500 ],
501}</pre>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700502</div>
503
504</body></html>