Class: Google::Apis::ServicecontrolV1::QuotaInfo
- Inherits:
-
Object
- Object
- Google::Apis::ServicecontrolV1::QuotaInfo
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/servicecontrol_v1/classes.rb,
lib/google/apis/servicecontrol_v1/representations.rb,
lib/google/apis/servicecontrol_v1/representations.rb
Overview
Contains the quota information for a quota check response.
Instance Attribute Summary collapse
-
#limit_exceeded ⇒ Array<String>
Quota Metrics that have exceeded quota limits.
-
#quota_consumed ⇒ Hash<String,Fixnum>
Map of quota group name to the actual number of tokens consumed.
-
#quota_extraction_state ⇒ String
Output only.
-
#quota_metrics ⇒ Array<Google::Apis::ServicecontrolV1::MetricValueSet>
Quota metrics to indicate the usage.
Instance Method Summary collapse
-
#initialize(**args) ⇒ QuotaInfo
constructor
A new instance of QuotaInfo.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ QuotaInfo
Returns a new instance of QuotaInfo.
1800 1801 1802 |
# File 'lib/google/apis/servicecontrol_v1/classes.rb', line 1800 def initialize(**args) update!(**args) end |
Instance Attribute Details
#limit_exceeded ⇒ Array<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
1770 1771 1772 |
# File 'lib/google/apis/servicecontrol_v1/classes.rb', line 1770 def limit_exceeded @limit_exceeded end |
#quota_consumed ⇒ Hash<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. We are not merging this field with 'quota_metrics' field because
of the complexity of scaling in Chemist client code base. For simplicity, we
will keep this field for Castor (that scales quota usage) and 'quota_metrics'
for SuperQuota (that doesn't scale quota usage).
Corresponds to the JSON property quotaConsumed
1780 1781 1782 |
# File 'lib/google/apis/servicecontrol_v1/classes.rb', line 1780 def quota_consumed @quota_consumed end |
#quota_extraction_state ⇒ String
Output only. Indicates the state of the quota extraction.
Corresponds to the JSON property quotaExtractionState
1785 1786 1787 |
# File 'lib/google/apis/servicecontrol_v1/classes.rb', line 1785 def quota_extraction_state @quota_extraction_state end |
#quota_metrics ⇒ Array<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
1798 1799 1800 |
# File 'lib/google/apis/servicecontrol_v1/classes.rb', line 1798 def quota_metrics @quota_metrics end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1805 1806 1807 1808 1809 1810 |
# File 'lib/google/apis/servicecontrol_v1/classes.rb', line 1805 def update!(**args) @limit_exceeded = args[:limit_exceeded] if args.key?(:limit_exceeded) @quota_consumed = args[:quota_consumed] if args.key?(:quota_consumed) @quota_extraction_state = args[:quota_extraction_state] if args.key?(:quota_extraction_state) @quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics) end |