Cloud Billing Budget API v1beta1

Added monitoring_notification_channels field to allow configuration of additional budget alert recipients.

PiperOrigin-RevId: 320484049
This commit is contained in:
Google APIs 2020-07-09 15:13:41 -07:00 committed by Copybara-Service
parent b26f6585d6
commit 50ae1c72fd
2 changed files with 46 additions and 25 deletions

View File

@ -1,4 +1,13 @@
# This file was automatically generated by BuildFileGenerator
# https://github.com/googleapis/gapic-generator/tree/master/rules_gapic/bazel
# Most of the manual changes to this file will be overwritten.
# It's **only** allowed to change the following rule attribute values:
# - names of *_gapic_assembly_* rules
# - certain parameters of *_gapic_library rules, including but not limited to:
# * extra_protoc_parameters
# * extra_protoc_file_parameters
# The complete list of preserved parameters can be found in the source code.
# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])
@ -302,6 +311,7 @@ ruby_gapic_library(
name = "budgets_ruby_gapic",
src = ":budgets_proto_with_info",
gapic_yaml = "billingbudgets_gapic.yaml",
grpc_service_config = "billingbudgets_grpc_service_config.json",
package = "google.cloud.billing.budgets.v1beta1",
service_yaml = "billingbudgets.yaml",
deps = [
@ -346,6 +356,7 @@ csharp_gapic_library(
name = "budgets_csharp_gapic",
src = ":budgets_proto_with_info",
gapic_yaml = "billingbudgets_gapic.yaml",
grpc_service_config = "billingbudgets_grpc_service_config.json",
package = "google.cloud.billing.budgets.v1beta1",
service_yaml = "billingbudgets.yaml",
deps = [

View File

@ -54,10 +54,11 @@ message Budget {
// Optional. Rules that trigger alerts (notifications of thresholds
// being crossed) when spend exceeds the specified percentages of the budget.
repeated ThresholdRule threshold_rules = 5 [(google.api.field_behavior) = OPTIONAL];
repeated ThresholdRule threshold_rules = 5
[(google.api.field_behavior) = OPTIONAL];
// Optional. Rules to apply to all updates to the actual spend, regardless
// of the thresholds set in `threshold_rules`.
// Optional. Rules to apply to notifications sent based on budget spend and
// thresholds.
AllUpdatesRule all_updates_rule = 6 [(google.api.field_behavior) = OPTIONAL];
// Optional. Etag to validate that the object is unchanged for a
@ -86,9 +87,7 @@ message BudgetAmount {
// that is, there are no other options yet.
// Future configuration will be described here (for example, configuring a
// percentage of last period's spend).
message LastPeriodAmount {
}
message LastPeriodAmount {}
// ThresholdRule contains a definition of a threshold which triggers
// an alert (a notification of a threshold being crossed) to be sent when
@ -121,14 +120,13 @@ message ThresholdRule {
Basis spend_basis = 2 [(google.api.field_behavior) = OPTIONAL];
}
// AllUpdatesRule defines notifications that are sent on every update to the
// billing account's spend, regardless of the thresholds defined using
// threshold rules.
// AllUpdatesRule defines notifications that are sent based on budget spend
// and thresholds.
message AllUpdatesRule {
// Required. The name of the Cloud 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
// Required. The name of the Cloud Pub/Sub topic where budget related messages
// will be published, in the form `projects/{project_id}/topics/{topic_id}`.
// Updates are sent at regular intervals to the topic. The topic needs to be
// created before the budget is created; see
// https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
// for more details.
// Caller is expected to have
@ -138,10 +136,19 @@ message AllUpdatesRule {
// Pub/Sub roles and permissions.
string pubsub_topic = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The schema version of the notification.
// Required. The schema version of the notification sent to `pubsub_topic`.
// Only "1.0" is accepted. It represents the JSON schema as defined in
// https://cloud.google.com/billing/docs/how-to/budgets#notification_format
string schema_version = 2 [(google.api.field_behavior) = REQUIRED];
// Optional. Targets to send notifications to when a threshold is exceeded.
// This is in addition to default recipients who have billing account 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.
repeated string monitoring_notification_channels = 3
[(google.api.field_behavior) = OPTIONAL];
}
// A filter for a budget, limiting the scope of the cost to calculate.
@ -168,7 +175,8 @@ message Filter {
repeated string projects = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
CreditTypesTreatment credit_types_treatment = 4 [(google.api.field_behavior) = OPTIONAL];
CreditTypesTreatment credit_types_treatment = 4
[(google.api.field_behavior) = OPTIONAL];
// Optional. A set of services of the form `services/{service_id}`,
// specifying that usage from only this set of services should be
@ -178,16 +186,18 @@ message Filter {
// 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.
// 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 reseller account,
// usage from the reseller account will be included. If omitted, the report
// will include usage from the reseller 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<string, google.protobuf.ListValue> labels = 6 [(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. Currently,
// multiple entries or multiple values per entry are not allowed. If omitted,
// the report will include all labeled and unlabeled usage.
map<string, google.protobuf.ListValue> labels = 6
[(google.api.field_behavior) = OPTIONAL];
}