Debian Codegraph @

docs/dyn/billingbudgets_v1beta1.billingAccounts.budgets.html

raw
1 <html><body>
2 <style>
3
4 body, 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
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="billingbudgets_v1beta1.html">Cloud Billing Budget API</a> . <a href="billingbudgets_v1beta1.billingAccounts.html">billingAccounts</a> . <a href="billingbudgets_v1beta1.billingAccounts.budgets.html">budgets</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#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, 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">
90 <code><a href="#list">list(parent, pageSize=None, pageToken=None, scope=None, x__xgafv=None)</a></code></p>
91 <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()</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, 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, 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
108 Args:
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 { # Request for CreateBudget
114 &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). The budget time period is configurable, with options such as month (default), quarter, year, or custom time period. # Required. Budget to create.
115 &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.
116 &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.
117 &quot;enableProjectLevelRecipients&quot;: True or False, # Optional. When set to true, and when the budget has a single project configured, notifications will be sent to project level recipients of that project. This field will be ignored if the budget has multiple or no project configured. Currently, project level recipients are the users with `Owner` role on a cloud project.
118 &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.
119 &quot;A String&quot;,
120 ],
121 &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-programmatic-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#permissions_required_for_this_task for more details on Pub/Sub roles and permissions.
122 &quot;schemaVersion&quot;: &quot;A String&quot;, # Optional. Required when AllUpdatesRule.pubsub_topic is set. The schema version of the notification sent to AllUpdatesRule.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.
123 },
124 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
125 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to the last Filter.calendar_period spend. At this time, the amount is automatically 100% of the last calendar period&#x27;s spend; that is, there are no other options yet. Future configuration options will be described here (for example, configuring a percentage of last period&#x27;s spend). LastPeriodAmount cannot be set for a budget configured with a Filter.custom_period. # Use the last period&#x27;s actual spend as the budget for the present period. LastPeriodAmount can only be set when the budget&#x27;s time period is a Filter.calendar_period. It cannot be set in combination with Filter.custom_period.
126 },
127 &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 when creating a budget, it must match the currency of the billing account. If specified when updating a budget, it must match the currency_code of the existing budget. The `currency_code` is provided on output.
128 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
129 &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.
130 &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.
131 },
132 },
133 &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 amount, such as projects, services, and the budget&#x27;s time period, as well as other filters.
134 &quot;calendarPeriod&quot;: &quot;A String&quot;, # Optional. Specifies to track usage for recurring calendar period. For example, assume that CalendarPeriod.QUARTER is set. The budget will track usage from April 1 to June 30, when the current calendar month is April, May, June. After that, it will track usage from July 1 to September 30 when the current calendar month is July, August, September, so on.
135 &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. See [a list of acceptable credit type values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). If Filter.credit_types_treatment is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty.
136 &quot;A String&quot;,
137 ],
138 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
139 &quot;customPeriod&quot;: { # All date times begin at 12 AM US and Canadian Pacific Time (UTC-8). # Optional. Specifies to track usage from any start date (required) to any end date (optional). This time period is static, it does not recur.
140 &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Optional. The end date of the time period. Budgets with elapsed end date won&#x27;t be processed. If unset, specifies to track all usage incurred since the start_date.
141 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
142 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
143 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
144 },
145 &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The start date must be after January 1, 2017.
146 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
147 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
148 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
149 },
150 },
151 &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. If omitted, the report will include all labeled and unlabeled usage. An object containing a single `&quot;key&quot;: value` pair. Example: `{ &quot;name&quot;: &quot;wrench&quot; }`. _Currently, multiple entries or multiple values per entry are not allowed._
152 &quot;a_key&quot;: [
153 &quot;&quot;,
154 ],
155 },
156 &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.
157 &quot;A String&quot;,
158 ],
159 &quot;resourceAncestors&quot;: [ # Optional. A set of folder and organization names of the form `folders/{folderId}` or `organizations/{organizationId}`, specifying that usage from only this set of folders and organizations should be included in the budget. If omitted, the budget includes all usage that the billing account pays for. If the folder or organization contains projects that are paid for by a different Cloud Billing account, the budget *doesn&#x27;t* apply to those projects.
160 &quot;A String&quot;,
161 ],
162 &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.
163 &quot;A String&quot;,
164 ],
165 &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.
166 &quot;A String&quot;,
167 ],
168 },
169 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. Validation: &lt;= 60 chars.
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;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}`.
172 &quot;ownershipScope&quot;: &quot;A String&quot;,
173 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget. Optional for `pubsubTopic` notifications. Required if using email notifications.
174 { # ThresholdRule contains the definition of a threshold. Threshold rules define the triggering events used to generate a budget notification email. When a threshold is crossed (spend exceeds the specified percentages of the budget), budget alert emails are sent to the email recipients you specify in the [NotificationsRule](#notificationsrule). Threshold rules also affect the fields included in the [JSON data object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) sent to a Pub/Sub topic. Threshold rules are _required_ if using email notifications. Threshold rules are _optional_ if only setting a [`pubsubTopic` NotificationsRule](#NotificationsRule), unless you want your JSON data object to include data about the thresholds you set. For more information, see [set budget threshold rules and actions](https://cloud.google.com/billing/docs/how-to/budgets#budget-actions).
175 &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.
176 &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.
177 },
178 ],
179 },
180 }
181
182 x__xgafv: string, V1 error format.
183 Allowed values
184 1 - v1 error format
185 2 - v2 error format
186
187 Returns:
188 An object of the form:
189
190 { # 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). The budget time period is configurable, with options such as month (default), quarter, year, or custom time period.
191 &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.
192 &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.
193 &quot;enableProjectLevelRecipients&quot;: True or False, # Optional. When set to true, and when the budget has a single project configured, notifications will be sent to project level recipients of that project. This field will be ignored if the budget has multiple or no project configured. Currently, project level recipients are the users with `Owner` role on a cloud project.
194 &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.
195 &quot;A String&quot;,
196 ],
197 &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-programmatic-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#permissions_required_for_this_task for more details on Pub/Sub roles and permissions.
198 &quot;schemaVersion&quot;: &quot;A String&quot;, # Optional. Required when AllUpdatesRule.pubsub_topic is set. The schema version of the notification sent to AllUpdatesRule.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.
199 },
200 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
201 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to the last Filter.calendar_period spend. At this time, the amount is automatically 100% of the last calendar period&#x27;s spend; that is, there are no other options yet. Future configuration options will be described here (for example, configuring a percentage of last period&#x27;s spend). LastPeriodAmount cannot be set for a budget configured with a Filter.custom_period. # Use the last period&#x27;s actual spend as the budget for the present period. LastPeriodAmount can only be set when the budget&#x27;s time period is a Filter.calendar_period. It cannot be set in combination with Filter.custom_period.
202 },
203 &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 when creating a budget, it must match the currency of the billing account. If specified when updating a budget, it must match the currency_code of the existing budget. The `currency_code` is provided on output.
204 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
205 &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.
206 &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.
207 },
208 },
209 &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 amount, such as projects, services, and the budget&#x27;s time period, as well as other filters.
210 &quot;calendarPeriod&quot;: &quot;A String&quot;, # Optional. Specifies to track usage for recurring calendar period. For example, assume that CalendarPeriod.QUARTER is set. The budget will track usage from April 1 to June 30, when the current calendar month is April, May, June. After that, it will track usage from July 1 to September 30 when the current calendar month is July, August, September, so on.
211 &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. See [a list of acceptable credit type values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). If Filter.credit_types_treatment is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty.
212 &quot;A String&quot;,
213 ],
214 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
215 &quot;customPeriod&quot;: { # All date times begin at 12 AM US and Canadian Pacific Time (UTC-8). # Optional. Specifies to track usage from any start date (required) to any end date (optional). This time period is static, it does not recur.
216 &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Optional. The end date of the time period. Budgets with elapsed end date won&#x27;t be processed. If unset, specifies to track all usage incurred since the start_date.
217 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
218 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
219 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
220 },
221 &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The start date must be after January 1, 2017.
222 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
223 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
224 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
225 },
226 },
227 &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. If omitted, the report will include all labeled and unlabeled usage. An object containing a single `&quot;key&quot;: value` pair. Example: `{ &quot;name&quot;: &quot;wrench&quot; }`. _Currently, multiple entries or multiple values per entry are not allowed._
228 &quot;a_key&quot;: [
229 &quot;&quot;,
230 ],
231 },
232 &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.
233 &quot;A String&quot;,
234 ],
235 &quot;resourceAncestors&quot;: [ # Optional. A set of folder and organization names of the form `folders/{folderId}` or `organizations/{organizationId}`, specifying that usage from only this set of folders and organizations should be included in the budget. If omitted, the budget includes all usage that the billing account pays for. If the folder or organization contains projects that are paid for by a different Cloud Billing account, the budget *doesn&#x27;t* apply to those projects.
236 &quot;A String&quot;,
237 ],
238 &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.
239 &quot;A String&quot;,
240 ],
241 &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.
242 &quot;A String&quot;,
243 ],
244 },
245 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. Validation: &lt;= 60 chars.
246 &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.
247 &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}`.
248 &quot;ownershipScope&quot;: &quot;A String&quot;,
249 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget. Optional for `pubsubTopic` notifications. Required if using email notifications.
250 { # ThresholdRule contains the definition of a threshold. Threshold rules define the triggering events used to generate a budget notification email. When a threshold is crossed (spend exceeds the specified percentages of the budget), budget alert emails are sent to the email recipients you specify in the [NotificationsRule](#notificationsrule). Threshold rules also affect the fields included in the [JSON data object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) sent to a Pub/Sub topic. Threshold rules are _required_ if using email notifications. Threshold rules are _optional_ if only setting a [`pubsubTopic` NotificationsRule](#NotificationsRule), unless you want your JSON data object to include data about the thresholds you set. For more information, see [set budget threshold rules and actions](https://cloud.google.com/billing/docs/how-to/budgets#budget-actions).
251 &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.
252 &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.
253 },
254 ],
255 }</pre>
256 </div>
257
258 <div class="method">
259 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
260 <pre>Deletes a budget. Returns successfully if already deleted.
261
262 Args:
263 name: string, Required. Name of the budget to delete. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. (required)
264 x__xgafv: string, V1 error format.
265 Allowed values
266 1 - v1 error format
267 2 - v2 error format
268
269 Returns:
270 An object of the form:
271
272 { # 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); }
273 }</pre>
274 </div>
275
276 <div class="method">
277 <code class="details" id="get">get(name, x__xgafv=None)</code>
278 <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.
279
280 Args:
281 name: string, Required. Name of budget to get. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. (required)
282 x__xgafv: string, V1 error format.
283 Allowed values
284 1 - v1 error format
285 2 - v2 error format
286
287 Returns:
288 An object of the form:
289
290 { # 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). The budget time period is configurable, with options such as month (default), quarter, year, or custom time period.
291 &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.
292 &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.
293 &quot;enableProjectLevelRecipients&quot;: True or False, # Optional. When set to true, and when the budget has a single project configured, notifications will be sent to project level recipients of that project. This field will be ignored if the budget has multiple or no project configured. Currently, project level recipients are the users with `Owner` role on a cloud project.
294 &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.
295 &quot;A String&quot;,
296 ],
297 &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-programmatic-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#permissions_required_for_this_task for more details on Pub/Sub roles and permissions.
298 &quot;schemaVersion&quot;: &quot;A String&quot;, # Optional. Required when AllUpdatesRule.pubsub_topic is set. The schema version of the notification sent to AllUpdatesRule.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.
299 },
300 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
301 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to the last Filter.calendar_period spend. At this time, the amount is automatically 100% of the last calendar period&#x27;s spend; that is, there are no other options yet. Future configuration options will be described here (for example, configuring a percentage of last period&#x27;s spend). LastPeriodAmount cannot be set for a budget configured with a Filter.custom_period. # Use the last period&#x27;s actual spend as the budget for the present period. LastPeriodAmount can only be set when the budget&#x27;s time period is a Filter.calendar_period. It cannot be set in combination with Filter.custom_period.
302 },
303 &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 when creating a budget, it must match the currency of the billing account. If specified when updating a budget, it must match the currency_code of the existing budget. The `currency_code` is provided on output.
304 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
305 &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.
306 &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.
307 },
308 },
309 &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 amount, such as projects, services, and the budget&#x27;s time period, as well as other filters.
310 &quot;calendarPeriod&quot;: &quot;A String&quot;, # Optional. Specifies to track usage for recurring calendar period. For example, assume that CalendarPeriod.QUARTER is set. The budget will track usage from April 1 to June 30, when the current calendar month is April, May, June. After that, it will track usage from July 1 to September 30 when the current calendar month is July, August, September, so on.
311 &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. See [a list of acceptable credit type values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). If Filter.credit_types_treatment is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty.
312 &quot;A String&quot;,
313 ],
314 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
315 &quot;customPeriod&quot;: { # All date times begin at 12 AM US and Canadian Pacific Time (UTC-8). # Optional. Specifies to track usage from any start date (required) to any end date (optional). This time period is static, it does not recur.
316 &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Optional. The end date of the time period. Budgets with elapsed end date won&#x27;t be processed. If unset, specifies to track all usage incurred since the start_date.
317 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
318 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
319 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
320 },
321 &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The start date must be after January 1, 2017.
322 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
323 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
324 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
325 },
326 },
327 &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. If omitted, the report will include all labeled and unlabeled usage. An object containing a single `&quot;key&quot;: value` pair. Example: `{ &quot;name&quot;: &quot;wrench&quot; }`. _Currently, multiple entries or multiple values per entry are not allowed._
328 &quot;a_key&quot;: [
329 &quot;&quot;,
330 ],
331 },
332 &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.
333 &quot;A String&quot;,
334 ],
335 &quot;resourceAncestors&quot;: [ # Optional. A set of folder and organization names of the form `folders/{folderId}` or `organizations/{organizationId}`, specifying that usage from only this set of folders and organizations should be included in the budget. If omitted, the budget includes all usage that the billing account pays for. If the folder or organization contains projects that are paid for by a different Cloud Billing account, the budget *doesn&#x27;t* apply to those projects.
336 &quot;A String&quot;,
337 ],
338 &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.
339 &quot;A String&quot;,
340 ],
341 &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.
342 &quot;A String&quot;,
343 ],
344 },
345 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. Validation: &lt;= 60 chars.
346 &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.
347 &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}`.
348 &quot;ownershipScope&quot;: &quot;A String&quot;,
349 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget. Optional for `pubsubTopic` notifications. Required if using email notifications.
350 { # ThresholdRule contains the definition of a threshold. Threshold rules define the triggering events used to generate a budget notification email. When a threshold is crossed (spend exceeds the specified percentages of the budget), budget alert emails are sent to the email recipients you specify in the [NotificationsRule](#notificationsrule). Threshold rules also affect the fields included in the [JSON data object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) sent to a Pub/Sub topic. Threshold rules are _required_ if using email notifications. Threshold rules are _optional_ if only setting a [`pubsubTopic` NotificationsRule](#NotificationsRule), unless you want your JSON data object to include data about the thresholds you set. For more information, see [set budget threshold rules and actions](https://cloud.google.com/billing/docs/how-to/budgets#budget-actions).
351 &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.
352 &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.
353 },
354 ],
355 }</pre>
356 </div>
357
358 <div class="method">
359 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, scope=None, x__xgafv=None)</code>
360 <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.
361
362 Args:
363 parent: string, Required. Name of billing account to list budgets under. Values are of the form `billingAccounts/{billingAccountId}`. (required)
364 pageSize: integer, Optional. The maximum number of budgets to return per page. The default and maximum value are 100.
365 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.
366 scope: string, Optional. Set the scope of the budgets to be returned, in the format of the resource name. The scope of a budget is the cost that it tracks, such as costs for a single project, or the costs for all projects in a folder. Only project scope (in the format of &quot;projects/project-id&quot; or &quot;projects/123&quot;) is supported in this field. When this field is set to a project&#x27;s resource name, the budgets returned are tracking the costs for that project.
367 x__xgafv: string, V1 error format.
368 Allowed values
369 1 - v1 error format
370 2 - v2 error format
371
372 Returns:
373 An object of the form:
374
375 { # Response for ListBudgets
376 &quot;budgets&quot;: [ # List of the budgets owned by the requested billing account.
377 { # 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). The budget time period is configurable, with options such as month (default), quarter, year, or custom time period.
378 &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.
379 &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.
380 &quot;enableProjectLevelRecipients&quot;: True or False, # Optional. When set to true, and when the budget has a single project configured, notifications will be sent to project level recipients of that project. This field will be ignored if the budget has multiple or no project configured. Currently, project level recipients are the users with `Owner` role on a cloud project.
381 &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.
382 &quot;A String&quot;,
383 ],
384 &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-programmatic-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#permissions_required_for_this_task for more details on Pub/Sub roles and permissions.
385 &quot;schemaVersion&quot;: &quot;A String&quot;, # Optional. Required when AllUpdatesRule.pubsub_topic is set. The schema version of the notification sent to AllUpdatesRule.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.
386 },
387 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
388 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to the last Filter.calendar_period spend. At this time, the amount is automatically 100% of the last calendar period&#x27;s spend; that is, there are no other options yet. Future configuration options will be described here (for example, configuring a percentage of last period&#x27;s spend). LastPeriodAmount cannot be set for a budget configured with a Filter.custom_period. # Use the last period&#x27;s actual spend as the budget for the present period. LastPeriodAmount can only be set when the budget&#x27;s time period is a Filter.calendar_period. It cannot be set in combination with Filter.custom_period.
389 },
390 &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 when creating a budget, it must match the currency of the billing account. If specified when updating a budget, it must match the currency_code of the existing budget. The `currency_code` is provided on output.
391 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
392 &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.
393 &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.
394 },
395 },
396 &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 amount, such as projects, services, and the budget&#x27;s time period, as well as other filters.
397 &quot;calendarPeriod&quot;: &quot;A String&quot;, # Optional. Specifies to track usage for recurring calendar period. For example, assume that CalendarPeriod.QUARTER is set. The budget will track usage from April 1 to June 30, when the current calendar month is April, May, June. After that, it will track usage from July 1 to September 30 when the current calendar month is July, August, September, so on.
398 &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. See [a list of acceptable credit type values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). If Filter.credit_types_treatment is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty.
399 &quot;A String&quot;,
400 ],
401 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
402 &quot;customPeriod&quot;: { # All date times begin at 12 AM US and Canadian Pacific Time (UTC-8). # Optional. Specifies to track usage from any start date (required) to any end date (optional). This time period is static, it does not recur.
403 &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Optional. The end date of the time period. Budgets with elapsed end date won&#x27;t be processed. If unset, specifies to track all usage incurred since the start_date.
404 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
405 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
406 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
407 },
408 &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The start date must be after January 1, 2017.
409 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
410 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
411 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
412 },
413 },
414 &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. If omitted, the report will include all labeled and unlabeled usage. An object containing a single `&quot;key&quot;: value` pair. Example: `{ &quot;name&quot;: &quot;wrench&quot; }`. _Currently, multiple entries or multiple values per entry are not allowed._
415 &quot;a_key&quot;: [
416 &quot;&quot;,
417 ],
418 },
419 &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.
420 &quot;A String&quot;,
421 ],
422 &quot;resourceAncestors&quot;: [ # Optional. A set of folder and organization names of the form `folders/{folderId}` or `organizations/{organizationId}`, specifying that usage from only this set of folders and organizations should be included in the budget. If omitted, the budget includes all usage that the billing account pays for. If the folder or organization contains projects that are paid for by a different Cloud Billing account, the budget *doesn&#x27;t* apply to those projects.
423 &quot;A String&quot;,
424 ],
425 &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.
426 &quot;A String&quot;,
427 ],
428 &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.
429 &quot;A String&quot;,
430 ],
431 },
432 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. Validation: &lt;= 60 chars.
433 &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.
434 &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}`.
435 &quot;ownershipScope&quot;: &quot;A String&quot;,
436 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget. Optional for `pubsubTopic` notifications. Required if using email notifications.
437 { # ThresholdRule contains the definition of a threshold. Threshold rules define the triggering events used to generate a budget notification email. When a threshold is crossed (spend exceeds the specified percentages of the budget), budget alert emails are sent to the email recipients you specify in the [NotificationsRule](#notificationsrule). Threshold rules also affect the fields included in the [JSON data object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) sent to a Pub/Sub topic. Threshold rules are _required_ if using email notifications. Threshold rules are _optional_ if only setting a [`pubsubTopic` NotificationsRule](#NotificationsRule), unless you want your JSON data object to include data about the thresholds you set. For more information, see [set budget threshold rules and actions](https://cloud.google.com/billing/docs/how-to/budgets#budget-actions).
438 &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.
439 &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.
440 },
441 ],
442 },
443 ],
444 &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`.
445 }</pre>
446 </div>
447
448 <div class="method">
449 <code class="details" id="list_next">list_next()</code>
450 <pre>Retrieves the next page of results.
451
452 Args:
453 previous_request: The request for the previous page. (required)
454 previous_response: The response from the request for the previous page. (required)
455
456 Returns:
457 A request object that you can call &#x27;execute()&#x27; on to request the next
458 page. Returns None if there are no more items in the collection.
459 </pre>
460 </div>
461
462 <div class="method">
463 <code class="details" id="patch">patch(name, body, x__xgafv=None)</code>
464 <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.
465
466 Args:
467 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)
468 body: object, The request body.
469 The object takes the form of:
470
471 { # Request for UpdateBudget
472 &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). The budget time period is configurable, with options such as month (default), quarter, year, or custom time period. # Required. The updated budget object. The budget to update is specified by the budget name in the budget.
473 &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.
474 &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.
475 &quot;enableProjectLevelRecipients&quot;: True or False, # Optional. When set to true, and when the budget has a single project configured, notifications will be sent to project level recipients of that project. This field will be ignored if the budget has multiple or no project configured. Currently, project level recipients are the users with `Owner` role on a cloud project.
476 &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.
477 &quot;A String&quot;,
478 ],
479 &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-programmatic-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#permissions_required_for_this_task for more details on Pub/Sub roles and permissions.
480 &quot;schemaVersion&quot;: &quot;A String&quot;, # Optional. Required when AllUpdatesRule.pubsub_topic is set. The schema version of the notification sent to AllUpdatesRule.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.
481 },
482 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
483 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to the last Filter.calendar_period spend. At this time, the amount is automatically 100% of the last calendar period&#x27;s spend; that is, there are no other options yet. Future configuration options will be described here (for example, configuring a percentage of last period&#x27;s spend). LastPeriodAmount cannot be set for a budget configured with a Filter.custom_period. # Use the last period&#x27;s actual spend as the budget for the present period. LastPeriodAmount can only be set when the budget&#x27;s time period is a Filter.calendar_period. It cannot be set in combination with Filter.custom_period.
484 },
485 &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 when creating a budget, it must match the currency of the billing account. If specified when updating a budget, it must match the currency_code of the existing budget. The `currency_code` is provided on output.
486 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
487 &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.
488 &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.
489 },
490 },
491 &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 amount, such as projects, services, and the budget&#x27;s time period, as well as other filters.
492 &quot;calendarPeriod&quot;: &quot;A String&quot;, # Optional. Specifies to track usage for recurring calendar period. For example, assume that CalendarPeriod.QUARTER is set. The budget will track usage from April 1 to June 30, when the current calendar month is April, May, June. After that, it will track usage from July 1 to September 30 when the current calendar month is July, August, September, so on.
493 &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. See [a list of acceptable credit type values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). If Filter.credit_types_treatment is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty.
494 &quot;A String&quot;,
495 ],
496 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
497 &quot;customPeriod&quot;: { # All date times begin at 12 AM US and Canadian Pacific Time (UTC-8). # Optional. Specifies to track usage from any start date (required) to any end date (optional). This time period is static, it does not recur.
498 &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Optional. The end date of the time period. Budgets with elapsed end date won&#x27;t be processed. If unset, specifies to track all usage incurred since the start_date.
499 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
500 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
501 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
502 },
503 &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The start date must be after January 1, 2017.
504 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
505 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
506 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
507 },
508 },
509 &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. If omitted, the report will include all labeled and unlabeled usage. An object containing a single `&quot;key&quot;: value` pair. Example: `{ &quot;name&quot;: &quot;wrench&quot; }`. _Currently, multiple entries or multiple values per entry are not allowed._
510 &quot;a_key&quot;: [
511 &quot;&quot;,
512 ],
513 },
514 &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.
515 &quot;A String&quot;,
516 ],
517 &quot;resourceAncestors&quot;: [ # Optional. A set of folder and organization names of the form `folders/{folderId}` or `organizations/{organizationId}`, specifying that usage from only this set of folders and organizations should be included in the budget. If omitted, the budget includes all usage that the billing account pays for. If the folder or organization contains projects that are paid for by a different Cloud Billing account, the budget *doesn&#x27;t* apply to those projects.
518 &quot;A String&quot;,
519 ],
520 &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.
521 &quot;A String&quot;,
522 ],
523 &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.
524 &quot;A String&quot;,
525 ],
526 },
527 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. Validation: &lt;= 60 chars.
528 &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.
529 &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}`.
530 &quot;ownershipScope&quot;: &quot;A String&quot;,
531 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget. Optional for `pubsubTopic` notifications. Required if using email notifications.
532 { # ThresholdRule contains the definition of a threshold. Threshold rules define the triggering events used to generate a budget notification email. When a threshold is crossed (spend exceeds the specified percentages of the budget), budget alert emails are sent to the email recipients you specify in the [NotificationsRule](#notificationsrule). Threshold rules also affect the fields included in the [JSON data object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) sent to a Pub/Sub topic. Threshold rules are _required_ if using email notifications. Threshold rules are _optional_ if only setting a [`pubsubTopic` NotificationsRule](#NotificationsRule), unless you want your JSON data object to include data about the thresholds you set. For more information, see [set budget threshold rules and actions](https://cloud.google.com/billing/docs/how-to/budgets#budget-actions).
533 &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.
534 &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.
535 },
536 ],
537 },
538 &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.
539 }
540
541 x__xgafv: string, V1 error format.
542 Allowed values
543 1 - v1 error format
544 2 - v2 error format
545
546 Returns:
547 An object of the form:
548
549 { # 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). The budget time period is configurable, with options such as month (default), quarter, year, or custom time period.
550 &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.
551 &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.
552 &quot;enableProjectLevelRecipients&quot;: True or False, # Optional. When set to true, and when the budget has a single project configured, notifications will be sent to project level recipients of that project. This field will be ignored if the budget has multiple or no project configured. Currently, project level recipients are the users with `Owner` role on a cloud project.
553 &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.
554 &quot;A String&quot;,
555 ],
556 &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-programmatic-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#permissions_required_for_this_task for more details on Pub/Sub roles and permissions.
557 &quot;schemaVersion&quot;: &quot;A String&quot;, # Optional. Required when AllUpdatesRule.pubsub_topic is set. The schema version of the notification sent to AllUpdatesRule.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.
558 },
559 &quot;amount&quot;: { # The budgeted amount for each usage period. # Required. Budgeted amount.
560 &quot;lastPeriodAmount&quot;: { # Describes a budget amount targeted to the last Filter.calendar_period spend. At this time, the amount is automatically 100% of the last calendar period&#x27;s spend; that is, there are no other options yet. Future configuration options will be described here (for example, configuring a percentage of last period&#x27;s spend). LastPeriodAmount cannot be set for a budget configured with a Filter.custom_period. # Use the last period&#x27;s actual spend as the budget for the present period. LastPeriodAmount can only be set when the budget&#x27;s time period is a Filter.calendar_period. It cannot be set in combination with Filter.custom_period.
561 },
562 &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 when creating a budget, it must match the currency of the billing account. If specified when updating a budget, it must match the currency_code of the existing budget. The `currency_code` is provided on output.
563 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
564 &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.
565 &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.
566 },
567 },
568 &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 amount, such as projects, services, and the budget&#x27;s time period, as well as other filters.
569 &quot;calendarPeriod&quot;: &quot;A String&quot;, # Optional. Specifies to track usage for recurring calendar period. For example, assume that CalendarPeriod.QUARTER is set. The budget will track usage from April 1 to June 30, when the current calendar month is April, May, June. After that, it will track usage from July 1 to September 30 when the current calendar month is July, August, September, so on.
570 &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. See [a list of acceptable credit type values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). If Filter.credit_types_treatment is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty.
571 &quot;A String&quot;,
572 ],
573 &quot;creditTypesTreatment&quot;: &quot;A String&quot;, # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
574 &quot;customPeriod&quot;: { # All date times begin at 12 AM US and Canadian Pacific Time (UTC-8). # Optional. Specifies to track usage from any start date (required) to any end date (optional). This time period is static, it does not recur.
575 &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Optional. The end date of the time period. Budgets with elapsed end date won&#x27;t be processed. If unset, specifies to track all usage incurred since the start_date.
576 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
577 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
578 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
579 },
580 &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The start date must be after January 1, 2017.
581 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
582 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
583 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
584 },
585 },
586 &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. If omitted, the report will include all labeled and unlabeled usage. An object containing a single `&quot;key&quot;: value` pair. Example: `{ &quot;name&quot;: &quot;wrench&quot; }`. _Currently, multiple entries or multiple values per entry are not allowed._
587 &quot;a_key&quot;: [
588 &quot;&quot;,
589 ],
590 },
591 &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.
592 &quot;A String&quot;,
593 ],
594 &quot;resourceAncestors&quot;: [ # Optional. A set of folder and organization names of the form `folders/{folderId}` or `organizations/{organizationId}`, specifying that usage from only this set of folders and organizations should be included in the budget. If omitted, the budget includes all usage that the billing account pays for. If the folder or organization contains projects that are paid for by a different Cloud Billing account, the budget *doesn&#x27;t* apply to those projects.
595 &quot;A String&quot;,
596 ],
597 &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.
598 &quot;A String&quot;,
599 ],
600 &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.
601 &quot;A String&quot;,
602 ],
603 },
604 &quot;displayName&quot;: &quot;A String&quot;, # User data for display name in UI. Validation: &lt;= 60 chars.
605 &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.
606 &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}`.
607 &quot;ownershipScope&quot;: &quot;A String&quot;,
608 &quot;thresholdRules&quot;: [ # Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget. Optional for `pubsubTopic` notifications. Required if using email notifications.
609 { # ThresholdRule contains the definition of a threshold. Threshold rules define the triggering events used to generate a budget notification email. When a threshold is crossed (spend exceeds the specified percentages of the budget), budget alert emails are sent to the email recipients you specify in the [NotificationsRule](#notificationsrule). Threshold rules also affect the fields included in the [JSON data object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) sent to a Pub/Sub topic. Threshold rules are _required_ if using email notifications. Threshold rules are _optional_ if only setting a [`pubsubTopic` NotificationsRule](#NotificationsRule), unless you want your JSON data object to include data about the thresholds you set. For more information, see [set budget threshold rules and actions](https://cloud.google.com/billing/docs/how-to/budgets#budget-actions).
610 &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.
611 &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.
612 },
613 ],
614 }</pre>
615 </div>
616
617 </body></html>