Class: Google::Apis::ServicecontrolV1::QuotaInfo

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/servicecontrol_v1/classes.rb,
generated/google/apis/servicecontrol_v1/representations.rb,
generated/google/apis/servicecontrol_v1/representations.rb

Overview

Contains the quota information for a quota check response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ QuotaInfo

Returns a new instance of QuotaInfo



453
454
455
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 453

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#limit_exceededArray<String>

Quota Metrics that have exceeded quota limits. For QuotaGroup-based quota, this is QuotaGroup.name For QuotaLimit-based quota, this is QuotaLimit.name See: google.api.Quota Deprecated: Use quota_metrics to get per quota group limit exceeded status. Corresponds to the JSON property limitExceeded

Returns:

  • (Array<String>)


451
452
453
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 451

def limit_exceeded
  @limit_exceeded
end

#quota_consumedHash<String,Fixnum>

Map of quota group name to the actual number of tokens consumed. If the quota check was not successful, then this will not be populated due to no quota consumption. Deprecated: Use quota_metrics to get per quota group usage. Corresponds to the JSON property quotaConsumed

Returns:

  • (Hash<String,Fixnum>)


427
428
429
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 427

def quota_consumed
  @quota_consumed
end

#quota_metricsArray<Google::Apis::ServicecontrolV1::MetricValueSet>

Quota metrics to indicate the usage. Depending on the check request, one or more of the following metrics will be included:

  1. For rate quota, per quota group or per quota metric incremental usage will be specified using the following delta metric: "serviceruntime.googleapis.com/api/consumer/quota_used_count"
  2. For allocation quota, per quota metric total usage will be specified using the following gauge metric: "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
  3. For both rate quota and allocation quota, the quota limit reached condition will be specified using the following boolean metric: "serviceruntime.googleapis.com/quota/exceeded" Corresponds to the JSON property quotaMetrics


442
443
444
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 442

def quota_metrics
  @quota_metrics
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



458
459
460
461
462
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 458

def update!(**args)
  @quota_consumed = args[:quota_consumed] if args.key?(:quota_consumed)
  @quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics)
  @limit_exceeded = args[:limit_exceeded] if args.key?(:limit_exceeded)
end