Skip to content

Commit a56cbf3

Browse files
Google APIscopybara-github
authored andcommitted
feat: expand QuotaFailure with quota error details
PiperOrigin-RevId: 745629297
1 parent 9e4b973 commit a56cbf3

1 file changed

Lines changed: 65 additions & 0 deletions

File tree

google/rpc/error_details.proto

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,71 @@ message QuotaFailure {
131131
// For example: "Service disabled" or "Daily Limit for read operations
132132
// exceeded".
133133
string description = 2;
134+
135+
// The API Service from which the `QuotaFailure.Violation` orginates. In
136+
// some cases, Quota issues originate from an API Service other than the one
137+
// that was called. In other words, a dependency of the called API Service
138+
// could be the cause of the `QuotaFailure`, and this field would have the
139+
// dependency API service name.
140+
//
141+
// For example, if the called API is Kubernetes Engine API
142+
// (container.googleapis.com), and a quota violation occurs in the
143+
// Kubernetes Engine API itself, this field would be
144+
// "container.googleapis.com". On the other hand, if the quota violation
145+
// occurs when the Kubernetes Engine API creates VMs in the Compute Engine
146+
// API (compute.googleapis.com), this field would be
147+
// "compute.googleapis.com".
148+
string api_service = 3;
149+
150+
// The metric of the violated quota. A quota metric is a named counter to
151+
// measure usage, such as API requests or CPUs. When an activity occurs in a
152+
// service, such as Virtual Machine allocation, one or more quota metrics
153+
// may be affected.
154+
//
155+
// For example, "compute.googleapis.com/cpus_per_vm_family",
156+
// "storage.googleapis.com/internet_egress_bandwidth".
157+
string quota_metric = 4;
158+
159+
// The id of the violated quota. Also know as "limit name", this is the
160+
// unique identifier of a quota in the context of an API service.
161+
//
162+
// For example, "CPUS-PER-VM-FAMILY-per-project-region".
163+
string quota_id = 5;
164+
165+
// The dimensions of the violated quota. Every non-global quota is enforced
166+
// on a set of dimensions. While quota metric defines what to count, the
167+
// dimensions specify for what aspects the counter should be increased.
168+
//
169+
// For example, the quota "CPUs per region per VM family" enforces a limit
170+
// on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions
171+
// "region" and "vm_family". And if the violation occurred in region
172+
// "us-central1" and for VM family "n1", the quota_dimensions would be,
173+
//
174+
// {
175+
// "region": "us-central1",
176+
// "vm_family": "n1",
177+
// }
178+
//
179+
// When a quota is enforced globally, the quota_dimensions would always be
180+
// empty.
181+
map<string, string> quota_dimensions = 6;
182+
183+
// The enforced quota value at the time of the `QuotaFailure`.
184+
//
185+
// For example, if the enforced quota value at the time of the
186+
// `QuotaFailure` on the number of CPUs is "10", then the value of this
187+
// field would reflect this quantity.
188+
int64 quota_value = 7;
189+
190+
// The new quota value being rolled out at the time of the violation. At the
191+
// completion of the rollout, this value will be enforced in place of
192+
// quota_value. If no rollout is in progress at the time of the violation,
193+
// this field is not set.
194+
//
195+
// For example, if at the time of the violation a rollout is in progress
196+
// changing the number of CPUs quota from 10 to 20, 20 would be the value of
197+
// this field.
198+
optional int64 future_quota_value = 8;
134199
}
135200

136201
// Describes all quota violations.

0 commit comments

Comments
 (0)