Cloud Billing Budget API v1alpha1
Modified api documentation to include warnings about the new filter field. PiperOrigin-RevId: 301630018
This commit is contained in:
parent
ff2ea00f69
commit
0cc6c146b6
|
|
@ -0,0 +1,176 @@
|
|||
# This file was automatically generated by BuildFileGenerator
|
||||
|
||||
# This is an API workspace, having public visibility by default makes perfect sense.
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
##############################################################################
|
||||
# Common
|
||||
##############################################################################
|
||||
load("@rules_proto//proto:defs.bzl", "proto_library")
|
||||
|
||||
proto_library(
|
||||
name = "budgets_proto",
|
||||
srcs = [
|
||||
"budget_model.proto",
|
||||
"budget_service.proto",
|
||||
],
|
||||
deps = [
|
||||
"//google/api:annotations_proto",
|
||||
"//google/api:client_proto",
|
||||
"//google/api:field_behavior_proto",
|
||||
"//google/api:resource_proto",
|
||||
"//google/type:money_proto",
|
||||
"@com_google_protobuf//:empty_proto",
|
||||
"@com_google_protobuf//:field_mask_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Java
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"java_grpc_library",
|
||||
"java_proto_library",
|
||||
)
|
||||
|
||||
java_proto_library(
|
||||
name = "budgets_java_proto",
|
||||
deps = [":budgets_proto"],
|
||||
)
|
||||
|
||||
java_grpc_library(
|
||||
name = "budgets_java_grpc",
|
||||
srcs = [":budgets_proto"],
|
||||
deps = [":budgets_java_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Go
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"go_proto_library",
|
||||
)
|
||||
|
||||
go_proto_library(
|
||||
name = "budgets_go_proto",
|
||||
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
|
||||
importpath = "google.golang.org/genproto/googleapis/cloud/billing/budgets/v1alpha1",
|
||||
protos = [":budgets_proto"],
|
||||
deps = [
|
||||
"//google/api:annotations_go_proto",
|
||||
"//google/type:money_go_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Python
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"moved_proto_library",
|
||||
"py_grpc_library",
|
||||
"py_proto_library",
|
||||
)
|
||||
|
||||
moved_proto_library(
|
||||
name = "budgets_moved_proto",
|
||||
srcs = [":budgets_proto"],
|
||||
deps = [
|
||||
"//google/api:annotations_proto",
|
||||
"//google/api:client_proto",
|
||||
"//google/api:field_behavior_proto",
|
||||
"//google/api:resource_proto",
|
||||
"//google/type:money_proto",
|
||||
"@com_google_protobuf//:empty_proto",
|
||||
"@com_google_protobuf//:field_mask_proto",
|
||||
],
|
||||
)
|
||||
|
||||
py_proto_library(
|
||||
name = "budgets_py_proto",
|
||||
plugin = "@protoc_docs_plugin//:docs_plugin",
|
||||
deps = [":budgets_moved_proto"],
|
||||
)
|
||||
|
||||
py_grpc_library(
|
||||
name = "budgets_py_grpc",
|
||||
srcs = [":budgets_moved_proto"],
|
||||
deps = [":budgets_py_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# PHP
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"php_grpc_library",
|
||||
"php_proto_library",
|
||||
)
|
||||
|
||||
php_proto_library(
|
||||
name = "budgets_php_proto",
|
||||
deps = [":budgets_proto"],
|
||||
)
|
||||
|
||||
php_grpc_library(
|
||||
name = "budgets_php_grpc",
|
||||
srcs = [":budgets_proto"],
|
||||
deps = [":budgets_php_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Node.js
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"nodejs_gapic_assembly_pkg",
|
||||
"nodejs_gapic_library",
|
||||
)
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Ruby
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"ruby_grpc_library",
|
||||
"ruby_proto_library",
|
||||
)
|
||||
|
||||
ruby_proto_library(
|
||||
name = "budgets_ruby_proto",
|
||||
deps = [":budgets_proto"],
|
||||
)
|
||||
|
||||
ruby_grpc_library(
|
||||
name = "budgets_ruby_grpc",
|
||||
srcs = [":budgets_proto"],
|
||||
deps = [":budgets_ruby_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# C#
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"csharp_grpc_library",
|
||||
"csharp_proto_library",
|
||||
)
|
||||
|
||||
csharp_proto_library(
|
||||
name = "budgets_csharp_proto",
|
||||
deps = [":budgets_proto"],
|
||||
)
|
||||
|
||||
csharp_grpc_library(
|
||||
name = "budgets_csharp_grpc",
|
||||
srcs = [":budgets_proto"],
|
||||
deps = [":budgets_csharp_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# C++
|
||||
##############################################################################
|
||||
# Put your C++ code here
|
||||
|
|
@ -6,6 +6,12 @@ title: Cloud Billing Budget API
|
|||
apis:
|
||||
- name: google.cloud.billing.budgets.v1alpha1.BudgetService
|
||||
|
||||
documentation:
|
||||
summary: |-
|
||||
The Cloud Billing Budget API stores Cloud Billing budgets, which define a
|
||||
budget plan and the rules to execute as spend is tracked against that
|
||||
plan.
|
||||
|
||||
authentication:
|
||||
rules:
|
||||
- selector: 'google.cloud.billing.budgets.v1alpha1.BudgetService.*'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2019 Google LLC.
|
||||
// Copyright 2020 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
@ -11,7 +11,6 @@
|
|||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
|
|
@ -52,9 +51,9 @@ message Budget {
|
|||
// Required. Budgeted amount.
|
||||
BudgetAmount amount = 4 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Required. Rules that trigger alerts (notifications of thresholds
|
||||
// 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) = REQUIRED];
|
||||
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`.
|
||||
|
|
@ -93,9 +92,10 @@ message LastPeriodAmount {
|
|||
// ThresholdRule contains a definition of a threshold which triggers
|
||||
// an alert (a notification of a threshold being crossed) to be sent when
|
||||
// spend goes above the specified amount.
|
||||
// Alerts are automatically e-mailed to the billing users who have
|
||||
// access to the billing account. The thresholds here have no effect on
|
||||
// notifications sent to anything configured under `Budget.all_updates_rule`.
|
||||
// Alerts are automatically e-mailed to users with the Billing Account
|
||||
// Administrator role or the Billing Account User role.
|
||||
// The thresholds here have no effect on notifications sent to anything
|
||||
// configured under `Budget.all_updates_rule`.
|
||||
message ThresholdRule {
|
||||
// The type of basis used to determine if spend has passed the threshold.
|
||||
enum Basis {
|
||||
|
|
@ -159,7 +159,7 @@ message Filter {
|
|||
EXCLUDE_ALL_CREDITS = 2;
|
||||
}
|
||||
|
||||
// Optional. A set of projects of the form `projects/{project_id}`,
|
||||
// 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.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2019 Google LLC.
|
||||
// Copyright 2020 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
@ -11,7 +11,6 @@
|
|||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
|
|
@ -37,7 +36,7 @@ service BudgetService {
|
|||
|
||||
// Creates a new budget. See
|
||||
// <a href="https://cloud.google.com/billing/quotas">Quotas and limits</a>
|
||||
// for more information.
|
||||
// for more information on the limits of the number of budgets you can create.
|
||||
rpc CreateBudget(CreateBudgetRequest) returns (Budget) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1alpha1/{parent=billingAccounts/*}/budgets"
|
||||
|
|
@ -46,6 +45,10 @@ 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
|
||||
// this API will not be changed by this method.
|
||||
rpc UpdateBudget(UpdateBudgetRequest) returns (Budget) {
|
||||
option (google.api.http) = {
|
||||
patch: "/v1alpha1/{budget.name=billingAccounts/*/budgets/*}"
|
||||
|
|
@ -54,6 +57,11 @@ 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
|
||||
// see these fields in the return value, though they may have been set
|
||||
// in the Cloud Console.
|
||||
rpc GetBudget(GetBudgetRequest) returns (Budget) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1alpha1/{name=billingAccounts/*/budgets/*}"
|
||||
|
|
@ -61,6 +69,11 @@ 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
|
||||
// see these fields in the return value, though they may have been set
|
||||
// in the Cloud Console.
|
||||
rpc ListBudgets(ListBudgetsRequest) returns (ListBudgetsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1alpha1/{parent=billingAccounts/*}/budgets"
|
||||
|
|
|
|||
Loading…
Reference in New Issue