From 1b101f55aa42665b71684097256d2a64ff07c670 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Thu, 21 May 2020 09:18:48 -0700 Subject: [PATCH] Cloud Billing Budget API v1beta1 Add support for subaccounts and labels filter fields. PiperOrigin-RevId: 312682133 --- google/cloud/billing/budgets/v1beta1/BUILD.bazel | 2 ++ .../billing/budgets/v1beta1/budget_model.proto | 14 ++++++++++++++ .../billing/budgets/v1beta1/budget_service.proto | 6 +++--- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/google/cloud/billing/budgets/v1beta1/BUILD.bazel b/google/cloud/billing/budgets/v1beta1/BUILD.bazel index 35970baa..a345bbff 100644 --- a/google/cloud/billing/budgets/v1beta1/BUILD.bazel +++ b/google/cloud/billing/budgets/v1beta1/BUILD.bazel @@ -23,6 +23,7 @@ proto_library( "//google/type:money_proto", "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", ], ) @@ -163,6 +164,7 @@ moved_proto_library( "//google/type:money_proto", "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", ], ) diff --git a/google/cloud/billing/budgets/v1beta1/budget_model.proto b/google/cloud/billing/budgets/v1beta1/budget_model.proto index d25cf332..fb2f1cfb 100644 --- a/google/cloud/billing/budgets/v1beta1/budget_model.proto +++ b/google/cloud/billing/budgets/v1beta1/budget_model.proto @@ -18,6 +18,7 @@ package google.cloud.billing.budgets.v1beta1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; import "google/type/money.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/billing/budgets/v1beta1;budgets"; @@ -176,4 +177,17 @@ message Filter { // The service names are available through the Catalog API: // https://cloud.google.com/billing/v1/how-tos/catalog-api. repeated string services = 3 [(google.api.field_behavior) = OPTIONAL]; + + // 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 master account, usage + // from the master account will be included. If omitted, the report will + // include usage from the master account and all subaccounts, if they exist. + repeated string subaccounts = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A single label and value pair specifying that usage from only this set of + // labeled resources should be included in the budget. Multiple entries or + // multiple values per entry are not allowed. If omitted, the report will + // include all labeled and unlabeled usage. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/google/cloud/billing/budgets/v1beta1/budget_service.proto b/google/cloud/billing/budgets/v1beta1/budget_service.proto index ab2b0714..e15ecf5c 100644 --- a/google/cloud/billing/budgets/v1beta1/budget_service.proto +++ b/google/cloud/billing/budgets/v1beta1/budget_service.proto @@ -47,7 +47,7 @@ service BudgetService { // 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 + // aren't available on this API. Budget fields that are not exposed in // this API will not be changed by this method. rpc UpdateBudget(UpdateBudgetRequest) returns (Budget) { option (google.api.http) = { @@ -59,7 +59,7 @@ service BudgetService { // 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 + // 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. rpc GetBudget(GetBudgetRequest) returns (Budget) { @@ -71,7 +71,7 @@ service BudgetService { // 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 + // 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. rpc ListBudgets(ListBudgetsRequest) returns (ListBudgetsResponse) {