Class QuotaFailure.Types.Violation (2.17.0)

public sealed class QuotaFailure.Types.Violation : IMessage<QuotaFailure.Types.Violation>, IEquatable<QuotaFailure.Types.Violation>, IDeepCloneable<QuotaFailure.Types.Violation>, IBufferMessage, IMessage

A message type used to describe a single quota violation. For example, a daily quota or a custom quota that was exceeded.

Inheritance

object > QuotaFailure.Types.Violation

Namespace

Google.Rpc

Assembly

Google.Api.CommonProtos.dll

Constructors

Violation()

public Violation()

Violation(Violation)

public Violation(QuotaFailure.Types.Violation other)
Parameter
Name Description
other QuotaFailureTypesViolation

Fields

ApiServiceFieldNumber

public const int ApiServiceFieldNumber = 3

Field number for the "api_service" field.

Field Value
Type Description
int

DescriptionFieldNumber

public const int DescriptionFieldNumber = 2

Field number for the "description" field.

Field Value
Type Description
int

FutureQuotaValueFieldNumber

public const int FutureQuotaValueFieldNumber = 8

Field number for the "future_quota_value" field.

Field Value
Type Description
int

QuotaDimensionsFieldNumber

public const int QuotaDimensionsFieldNumber = 6

Field number for the "quota_dimensions" field.

Field Value
Type Description
int

QuotaIdFieldNumber

public const int QuotaIdFieldNumber = 5

Field number for the "quota_id" field.

Field Value
Type Description
int

QuotaMetricFieldNumber

public const int QuotaMetricFieldNumber = 4

Field number for the "quota_metric" field.

Field Value
Type Description
int

QuotaValueFieldNumber

public const int QuotaValueFieldNumber = 7

Field number for the "quota_value" field.

Field Value
Type Description
int

SubjectFieldNumber

public const int SubjectFieldNumber = 1

Field number for the "subject" field.

Field Value
Type Description
int

Properties

ApiService

public string ApiService { get; set; }

The API Service from which the QuotaFailure.Violation orginates. In some cases, Quota issues originate from an API Service other than the one that was called. In other words, a dependency of the called API Service could be the cause of the QuotaFailure, and this field would have the dependency API service name.

For example, if the called API is Kubernetes Engine API (container.googleapis.com), and a quota violation occurs in the Kubernetes Engine API itself, this field would be "container.googleapis.com". On the other hand, if the quota violation occurs when the Kubernetes Engine API creates VMs in the Compute Engine API (compute.googleapis.com), this field would be "compute.googleapis.com".

Property Value
Type Description
string

Description

public string Description { get; set; }

A description of how the quota check failed. Clients can use this description to find more about the quota configuration in the service's public documentation, or find the relevant quota limit to adjust through developer console.

For example: "Service disabled" or "Daily Limit for read operations exceeded".

Property Value
Type Description
string

Descriptor

public static MessageDescriptor Descriptor { get; }
Property Value
Type Description
MessageDescriptor

FutureQuotaValue

public long FutureQuotaValue { get; set; }

The new quota value being rolled out at the time of the violation. At the completion of the rollout, this value will be enforced in place of quota_value. If no rollout is in progress at the time of the violation, this field is not set.

For example, if at the time of the violation a rollout is in progress changing the number of CPUs quota from 10 to 20, 20 would be the value of this field.

Property Value
Type Description
long

HasFutureQuotaValue

public bool HasFutureQuotaValue { get; }

Gets whether the "future_quota_value" field is set

Property Value
Type Description
bool

Parser

public static MessageParser<QuotaFailure.Types.Violation> Parser { get; }
Property Value
Type Description
MessageParserQuotaFailureTypesViolation

QuotaDimensions

public MapField<string, string> QuotaDimensions { get; }

The dimensions of the violated quota. Every non-global quota is enforced on a set of dimensions. While quota metric defines what to count, the dimensions specify for what aspects the counter should be increased.

For example, the quota "CPUs per region per VM family" enforces a limit on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions "region" and "vm_family". And if the violation occurred in region "us-central1" and for VM family "n1", the quota_dimensions would be,

{ "region": "us-central1", "vm_family": "n1", }

When a quota is enforced globally, the quota_dimensions would always be empty.

Property Value
Type Description
MapFieldstringstring

QuotaId

public string QuotaId { get; set; }

The id of the violated quota. Also know as "limit name", this is the unique identifier of a quota in the context of an API service.

For example, "CPUS-PER-VM-FAMILY-per-project-region".

Property Value
Type Description
string

QuotaMetric

public string QuotaMetric { get; set; }

The metric of the violated quota. A quota metric is a named counter to measure usage, such as API requests or CPUs. When an activity occurs in a service, such as Virtual Machine allocation, one or more quota metrics may be affected.

For example, "compute.googleapis.com/cpus_per_vm_family", "storage.googleapis.com/internet_egress_bandwidth".

Property Value
Type Description
string

QuotaValue

public long QuotaValue { get; set; }

The enforced quota value at the time of the QuotaFailure.

For example, if the enforced quota value at the time of the QuotaFailure on the number of CPUs is "10", then the value of this field would reflect this quantity.

Property Value
Type Description
long

Subject

public string Subject { get; set; }

The subject on which the quota check failed. For example, "clientip:<ip address of client>" or "project:<Google developer project id>".

Property Value
Type Description
string

Methods

CalculateSize()

public int CalculateSize()
Returns
Type Description
int

ClearFutureQuotaValue()

public void ClearFutureQuotaValue()

Clears the value of the "future_quota_value" field

Clone()

public QuotaFailure.Types.Violation Clone()
Returns
Type Description
QuotaFailureTypesViolation

Equals(Violation)

public bool Equals(QuotaFailure.Types.Violation other)
Parameter
Name Description
other QuotaFailureTypesViolation
Returns
Type Description
bool

Equals(object)

public override bool Equals(object other)
Parameter
Name Description
other object
Returns
Type Description
bool
Overrides

GetHashCode()

public override int GetHashCode()
Returns
Type Description
int
Overrides

MergeFrom(CodedInputStream)

public void MergeFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream

MergeFrom(Violation)

public void MergeFrom(QuotaFailure.Types.Violation other)
Parameter
Name Description
other QuotaFailureTypesViolation

ToString()

public override string ToString()
Returns
Type Description
string
Overrides

WriteTo(CodedOutputStream)

public void WriteTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream