Skip to content

Commit 138b0f1

Browse files
Google APIscopybara-github
authored andcommitted
feat: Supported project-level-budgets in Public Budget API V1Beta
Added `scope` for project scope filter in `ListBudgetsRequest`. When this field is set to a project's resource name, the budgets returned are tracking the costs for the given project. feat: Added `enable_project_level_recipients` for project owner budget emails Setting this field to true will enable email notification to project owners for project-level budgets. PiperOrigin-RevId: 559151636
1 parent 4a5a6fd commit 138b0f1

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

google/cloud/billing/budgets/v1beta1/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ ruby_gapic_assembly_pkg(
284284

285285
csharp_proto_library(
286286
name = "budgets_csharp_proto",
287-
extra_opts = [],
288287
deps = [":budgets_proto"],
289288
)
290289

google/cloud/billing/budgets/v1beta1/budget_model.proto

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,16 @@ message AllUpdatesRule {
195195
// account.
196196
bool disable_default_iam_recipients = 4
197197
[(google.api.field_behavior) = OPTIONAL];
198+
199+
// Optional. When set to true, and when the budget has a single project
200+
// configured, notifications will be sent to project level recipients of that
201+
// project. This field will be ignored if the budget has multiple or no
202+
// project configured.
203+
//
204+
// Currently, project level recipients are the users with `Owner` role on a
205+
// cloud project.
206+
bool enable_project_level_recipients = 5
207+
[(google.api.field_behavior) = OPTIONAL];
198208
}
199209

200210
// A filter for a budget, limiting the scope of the cost to calculate.
@@ -231,8 +241,10 @@ message Filter {
231241
// Optional. A set of folder and organization names of the form
232242
// `folders/{folderId}` or `organizations/{organizationId}`, specifying that
233243
// usage from only this set of folders and organizations should be included in
234-
// the budget. If omitted, the report includes all usage for all
235-
// organizations, regardless of which organization the usage occurred on.
244+
// the budget. If omitted, the budget includes all usage that the billing
245+
// account pays for. If the folder or organization contains projects that are
246+
// paid for by a different Cloud Billing account, the budget *doesn't* apply
247+
// to those projects.
236248
repeated string resource_ancestors = 2
237249
[(google.api.field_behavior) = OPTIONAL];
238250

google/cloud/billing/budgets/v1beta1/budget_service.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ message ListBudgetsRequest {
144144
}
145145
];
146146

147+
// Optional. Set the scope of the budgets to be returned, in the format of the
148+
// resource name. The scope of a budget is the cost that it tracks, such as
149+
// costs for a single project, or the costs for all projects in a folder. Only
150+
// project scope (in the format of "projects/project-id" or "projects/123") is
151+
// supported in this field. When this field is set to a project's resource
152+
// name, the budgets returned are tracking the costs for that project.
153+
string scope = 4 [(google.api.field_behavior) = OPTIONAL];
154+
147155
// Optional. The maximum number of budgets to return per page.
148156
// The default and maximum value are 100.
149157
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

0 commit comments

Comments
 (0)