• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="servicecontrol_v1.html">Google Service Control API</a> . <a href="servicecontrol_v1.services.html">services</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#allocateQuota">allocateQuota(serviceName, body, x__xgafv=None)</a></code></p>
79<p class="firstline">Attempts to allocate quota for the specified consumer. It should be called</p>
80<p class="toc_element">
81  <code><a href="#check">check(serviceName, body, x__xgafv=None)</a></code></p>
82<p class="firstline">Checks an operation with Google Service Control to decide whether</p>
83<p class="toc_element">
84  <code><a href="#endReconciliation">endReconciliation(serviceName, body, x__xgafv=None)</a></code></p>
85<p class="firstline">Signals the quota controller that service ends the ongoing usage</p>
86<p class="toc_element">
87  <code><a href="#releaseQuota">releaseQuota(serviceName, body, x__xgafv=None)</a></code></p>
88<p class="firstline">Releases previously allocated quota done through AllocateQuota method.</p>
89<p class="toc_element">
90  <code><a href="#report">report(serviceName, body, x__xgafv=None)</a></code></p>
91<p class="firstline">Reports operation results to Google Service Control, such as logs and</p>
92<p class="toc_element">
93  <code><a href="#startReconciliation">startReconciliation(serviceName, body, x__xgafv=None)</a></code></p>
94<p class="firstline">Unlike rate quota, allocation quota does not get refilled periodically.</p>
95<h3>Method Details</h3>
96<div class="method">
97    <code class="details" id="allocateQuota">allocateQuota(serviceName, body, x__xgafv=None)</code>
98  <pre>Attempts to allocate quota for the specified consumer. It should be called
99before the operation is executed.
100
101This method requires the `servicemanagement.services.quota`
102permission on the specified service. For more information, see
103[Google Cloud IAM](https://cloud.google.com/iam).
104
105**NOTE:** the client code **must** fail-open if the server returns one
106of the following quota errors:
107-   `PROJECT_STATUS_UNAVAILABLE`
108-   `SERVICE_STATUS_UNAVAILABLE`
109-   `BILLING_STATUS_UNAVAILABLE`
110-   `QUOTA_SYSTEM_UNAVAILABLE`
111
112The server may inject above errors to prohibit any hard dependency
113on the quota system.
114
115Args:
116  serviceName: string, Name of the service as specified in the service configuration. For example,
117`"pubsub.googleapis.com"`.
118
119See google.api.Service for the definition of a service name. (required)
120  body: object, The request body. (required)
121    The object takes the form of:
122
123{ # Request message for the AllocateQuota method.
124    "allocationMode": "A String", # Allocation mode for this operation.
125        # Deprecated: use QuotaMode inside the QuotaOperation.
126    "serviceConfigId": "A String", # Specifies which version of service configuration should be used to process
127        # the request. If unspecified or no matching version can be found, the latest
128        # one will be used.
129    "allocateOperation": { # Represents information regarding a quota operation. # Operation that describes the quota allocation.
130      "quotaMetrics": [ # Represents information about this operation. Each MetricValueSet
131          # corresponds to a metric defined in the service configuration.
132          # The data type used in the MetricValueSet must agree with
133          # the data type specified in the metric definition.
134          #
135          # Within a single operation, it is not allowed to have more than one
136          # MetricValue instances that have the same metric names and identical
137          # label value combinations. If a request has such duplicated MetricValue
138          # instances, the entire request is rejected with
139          # an invalid argument error.
140        { # Represents a set of metric values in the same metric.
141            # Each metric value in the set should have a unique combination of start time,
142            # end time, and label values.
143          "metricValues": [ # The values in this metric.
144            { # Represents a single metric value.
145              "moneyValue": { # Represents an amount of money with its currency type. # A money value.
146                "nanos": 42, # Number of nano (10^-9) units of the amount.
147                    # The value must be between -999,999,999 and +999,999,999 inclusive.
148                    # If `units` is positive, `nanos` must be positive or zero.
149                    # If `units` is zero, `nanos` can be positive, zero, or negative.
150                    # If `units` is negative, `nanos` must be negative or zero.
151                    # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
152                "units": "A String", # The whole units of the amount.
153                    # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
154                "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217.
155              },
156              "labels": { # The labels describing the metric value.
157                  # See comments on google.api.servicecontrol.v1.Operation.labels for
158                  # the overriding relationship.
159                "a_key": "A String",
160              },
161              "doubleValue": 3.14, # A double precision floating point value.
162              "boolValue": True or False, # A boolean value.
163              "startTime": "A String", # The start of the time period over which this metric value's measurement
164                  # applies. The time period has different semantics for different metric
165                  # types (cumulative, delta, and gauge). See the metric definition
166                  # documentation in the service configuration for details.
167              "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value.
168                  # points. It contains the size of the population of sample points plus
169                  # additional optional information:
170                  #
171                  #   - the arithmetic mean of the samples
172                  #   - the minimum and maximum of the samples
173                  #   - the sum-squared-deviation of the samples, used to compute variance
174                  #   - a histogram of the values of the sample points
175                "count": "A String", # The total number of samples in the distribution. Must be >= 0.
176                "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean:
177                    #   Sum[i=1..count]((x_i - mean)^2)
178                    # where each x_i is a sample values. If `count` is zero then this field
179                    # must be zero, otherwise validation of the request fails.
180                "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are
181                    # optional. If present, they must sum to the `count` value.
182                    #
183                    # The buckets are defined below in `bucket_option`. There are N buckets.
184                    # `bucket_counts[0]` is the number of samples in the underflow bucket.
185                    # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
186                    # in each of the finite buckets. And `bucket_counts[N] is the number
187                    # of samples in the overflow bucket. See the comments of `bucket_option`
188                    # below for more details.
189                    #
190                    # Any suffix of trailing zeros may be omitted.
191                  "A String",
192                ],
193                "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width.
194                  "scale": 3.14, # The i'th exponential bucket covers the interval
195                      #   [scale * growth_factor^(i-1), scale * growth_factor^i)
196                      # where i ranges from 1 to num_finite_buckets inclusive.
197                      # Must be > 0.
198                  "growthFactor": 3.14, # The i'th exponential bucket covers the interval
199                      #   [scale * growth_factor^(i-1), scale * growth_factor^i)
200                      # where i ranges from 1 to num_finite_buckets inclusive.
201                      # Must be larger than 1.0.
202                  "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
203                      # the total number of buckets is `num_finite_buckets` + 2.
204                      # See comments on `bucket_options` for details.
205                },
206                "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero.
207                "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero.
208                "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width.
209                  "width": 3.14, # The i'th linear bucket covers the interval
210                      #   [offset + (i-1) * width, offset + i * width)
211                      # where i ranges from 1 to num_finite_buckets, inclusive.
212                      # Must be strictly positive.
213                  "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
214                      # the total number of buckets is `num_finite_buckets` + 2.
215                      # See comments on `bucket_options` for details.
216                  "offset": 3.14, # The i'th linear bucket covers the interval
217                      #   [offset + (i-1) * width, offset + i * width)
218                      # where i ranges from 1 to num_finite_buckets, inclusive.
219                },
220                "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width.
221                  "bounds": [ # 'bound' is a list of strictly increasing boundaries between
222                      # buckets. Note that a list of length N-1 defines N buckets because
223                      # of fenceposting. See comments on `bucket_options` for details.
224                      #
225                      # The i'th finite bucket covers the interval
226                      #   [bound[i-1], bound[i])
227                      # where i ranges from 1 to bound_size() - 1. Note that there are no
228                      # finite buckets at all if 'bound' only contains a single element; in
229                      # that special case the single bound defines the boundary between the
230                      # underflow and overflow buckets.
231                      #
232                      # bucket number                   lower bound    upper bound
233                      #  i == 0 (underflow)              -inf           bound[i]
234                      #  0 < i < bound_size()            bound[i-1]     bound[i]
235                      #  i == bound_size() (overflow)    bound[i-1]     +inf
236                    3.14,
237                  ],
238                },
239                "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is
240                    # zero then this field must be zero.
241              },
242              "stringValue": "A String", # A text string value.
243              "int64Value": "A String", # A signed 64-bit integer value.
244              "endTime": "A String", # The end of the time period over which this metric value's measurement
245                  # applies.
246            },
247          ],
248          "metricName": "A String", # The metric name defined in the service configuration.
249        },
250      ],
251      "methodName": "A String", # Fully qualified name of the API method for which this quota operation is
252          # requested. This name is used for matching quota rules or metric rules and
253          # billing status rules defined in service configuration. This field is not
254          # required if the quota operation is performed on non-API resources.
255          #
256          # Example of an RPC method name:
257          #     google.example.library.v1.LibraryService.CreateShelf
258      "labels": { # Labels describing the operation.
259        "a_key": "A String",
260      },
261      "quotaMode": "A String", # Quota mode for this operation.
262      "consumerId": "A String", # Identity of the consumer for whom this quota operation is being performed.
263          #
264          # This can be in one of the following formats:
265          #   project:<project_id>,
266          #   project_number:<project_number>,
267          #   api_key:<api_key>.
268      "operationId": "A String", # Identity of the operation. This must be unique within the scope of the
269          # service that generated the operation. If the service calls AllocateQuota
270          # and ReleaseQuota on the same operation, the two calls should carry the
271          # same ID.
272          #
273          # UUID version 4 is recommended, though not required. In scenarios where an
274          # operation is computed from existing information and an idempotent id is
275          # desirable for deduplication purpose, UUID version 5 is recommended. See
276          # RFC 4122 for details.
277    },
278  }
279
280  x__xgafv: string, V1 error format.
281    Allowed values
282      1 - v1 error format
283      2 - v2 error format
284
285Returns:
286  An object of the form:
287
288    { # Response message for the AllocateQuota method.
289    "serviceConfigId": "A String", # ID of the actual config used to process the request.
290    "quotaMetrics": [ # Quota metrics to indicate the result of allocation. Depending on the
291        # request, one or more of the following metrics will be included:
292        #
293        # 1. For rate quota, per quota group or per quota metric incremental usage
294        # will be specified using the following delta metric:
295        #   "serviceruntime.googleapis.com/api/consumer/quota_used_count"
296        #
297        # 2. For allocation quota, per quota metric total usage will be specified
298        # using the following gauge metric:
299        #   "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
300        #
301        # 3. For both rate quota and allocation quota, the quota limit reached
302        # condition will be specified using the following boolean metric:
303        #   "serviceruntime.googleapis.com/quota/exceeded"
304        #
305        # 4. For allocation quota, value for each quota limit associated with
306        # the metrics will be specified using the following gauge metric:
307        #   "serviceruntime.googleapis.com/quota/limit"
308      { # Represents a set of metric values in the same metric.
309          # Each metric value in the set should have a unique combination of start time,
310          # end time, and label values.
311        "metricValues": [ # The values in this metric.
312          { # Represents a single metric value.
313            "moneyValue": { # Represents an amount of money with its currency type. # A money value.
314              "nanos": 42, # Number of nano (10^-9) units of the amount.
315                  # The value must be between -999,999,999 and +999,999,999 inclusive.
316                  # If `units` is positive, `nanos` must be positive or zero.
317                  # If `units` is zero, `nanos` can be positive, zero, or negative.
318                  # If `units` is negative, `nanos` must be negative or zero.
319                  # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
320              "units": "A String", # The whole units of the amount.
321                  # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
322              "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217.
323            },
324            "labels": { # The labels describing the metric value.
325                # See comments on google.api.servicecontrol.v1.Operation.labels for
326                # the overriding relationship.
327              "a_key": "A String",
328            },
329            "doubleValue": 3.14, # A double precision floating point value.
330            "boolValue": True or False, # A boolean value.
331            "startTime": "A String", # The start of the time period over which this metric value's measurement
332                # applies. The time period has different semantics for different metric
333                # types (cumulative, delta, and gauge). See the metric definition
334                # documentation in the service configuration for details.
335            "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value.
336                # points. It contains the size of the population of sample points plus
337                # additional optional information:
338                #
339                #   - the arithmetic mean of the samples
340                #   - the minimum and maximum of the samples
341                #   - the sum-squared-deviation of the samples, used to compute variance
342                #   - a histogram of the values of the sample points
343              "count": "A String", # The total number of samples in the distribution. Must be >= 0.
344              "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean:
345                  #   Sum[i=1..count]((x_i - mean)^2)
346                  # where each x_i is a sample values. If `count` is zero then this field
347                  # must be zero, otherwise validation of the request fails.
348              "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are
349                  # optional. If present, they must sum to the `count` value.
350                  #
351                  # The buckets are defined below in `bucket_option`. There are N buckets.
352                  # `bucket_counts[0]` is the number of samples in the underflow bucket.
353                  # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
354                  # in each of the finite buckets. And `bucket_counts[N] is the number
355                  # of samples in the overflow bucket. See the comments of `bucket_option`
356                  # below for more details.
357                  #
358                  # Any suffix of trailing zeros may be omitted.
359                "A String",
360              ],
361              "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width.
362                "scale": 3.14, # The i'th exponential bucket covers the interval
363                    #   [scale * growth_factor^(i-1), scale * growth_factor^i)
364                    # where i ranges from 1 to num_finite_buckets inclusive.
365                    # Must be > 0.
366                "growthFactor": 3.14, # The i'th exponential bucket covers the interval
367                    #   [scale * growth_factor^(i-1), scale * growth_factor^i)
368                    # where i ranges from 1 to num_finite_buckets inclusive.
369                    # Must be larger than 1.0.
370                "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
371                    # the total number of buckets is `num_finite_buckets` + 2.
372                    # See comments on `bucket_options` for details.
373              },
374              "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero.
375              "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero.
376              "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width.
377                "width": 3.14, # The i'th linear bucket covers the interval
378                    #   [offset + (i-1) * width, offset + i * width)
379                    # where i ranges from 1 to num_finite_buckets, inclusive.
380                    # Must be strictly positive.
381                "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
382                    # the total number of buckets is `num_finite_buckets` + 2.
383                    # See comments on `bucket_options` for details.
384                "offset": 3.14, # The i'th linear bucket covers the interval
385                    #   [offset + (i-1) * width, offset + i * width)
386                    # where i ranges from 1 to num_finite_buckets, inclusive.
387              },
388              "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width.
389                "bounds": [ # 'bound' is a list of strictly increasing boundaries between
390                    # buckets. Note that a list of length N-1 defines N buckets because
391                    # of fenceposting. See comments on `bucket_options` for details.
392                    #
393                    # The i'th finite bucket covers the interval
394                    #   [bound[i-1], bound[i])
395                    # where i ranges from 1 to bound_size() - 1. Note that there are no
396                    # finite buckets at all if 'bound' only contains a single element; in
397                    # that special case the single bound defines the boundary between the
398                    # underflow and overflow buckets.
399                    #
400                    # bucket number                   lower bound    upper bound
401                    #  i == 0 (underflow)              -inf           bound[i]
402                    #  0 < i < bound_size()            bound[i-1]     bound[i]
403                    #  i == bound_size() (overflow)    bound[i-1]     +inf
404                  3.14,
405                ],
406              },
407              "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is
408                  # zero then this field must be zero.
409            },
410            "stringValue": "A String", # A text string value.
411            "int64Value": "A String", # A signed 64-bit integer value.
412            "endTime": "A String", # The end of the time period over which this metric value's measurement
413                # applies.
414          },
415        ],
416        "metricName": "A String", # The metric name defined in the service configuration.
417      },
418    ],
419    "allocateErrors": [ # Indicates the decision of the allocate.
420      {
421        "code": "A String", # Error code.
422        "description": "A String", # Free-form text that provides details on the cause of the error.
423        "subject": "A String", # Subject to whom this error applies. See the specific enum for more details
424            # on this field. For example, "clientip:<ip address of client>" or
425            # "project:<Google developer project id>".
426      },
427    ],
428    "operationId": "A String", # The same operation_id value used in the AllocateQuotaRequest. Used for
429        # logging and diagnostics purposes.
430  }</pre>
431</div>
432
433<div class="method">
434    <code class="details" id="check">check(serviceName, body, x__xgafv=None)</code>
435  <pre>Checks an operation with Google Service Control to decide whether
436the given operation should proceed. It should be called before the
437operation is executed.
438
439If feasible, the client should cache the check results and reuse them for
44060 seconds. In case of server errors, the client can rely on the cached
441results for longer time.
442
443NOTE: the `CheckRequest` has the size limit of 64KB.
444
445This method requires the `servicemanagement.services.check` permission
446on the specified service. For more information, see
447[Google Cloud IAM](https://cloud.google.com/iam).
448
449Args:
450  serviceName: string, The service name as specified in its service configuration. For example,
451`"pubsub.googleapis.com"`.
452
453See google.api.Service for the definition of a service name. (required)
454  body: object, The request body. (required)
455    The object takes the form of:
456
457{ # Request message for the Check method.
458    "skipActivationCheck": True or False, # Indicates if service activation check should be skipped for this request.
459        # Default behavior is to perform the check and apply relevant quota.
460    "serviceConfigId": "A String", # Specifies which version of service configuration should be used to process
461        # the request.
462        #
463        # If unspecified or no matching version can be found, the
464        # latest one will be used.
465    "operation": { # Represents information regarding an operation. # The operation to be checked.
466      "labels": { # Labels describing the operation. Only the following labels are allowed:
467          #
468          # - Labels describing monitored resources as defined in
469          #   the service configuration.
470          # - Default labels of metric values. When specified, labels defined in the
471          #   metric value override these default.
472          # - The following labels defined by Google Cloud Platform:
473          #     - `cloud.googleapis.com/location` describing the location where the
474          #        operation happened,
475          #     - `servicecontrol.googleapis.com/user_agent` describing the user agent
476          #        of the API request,
477          #     - `servicecontrol.googleapis.com/service_agent` describing the service
478          #        used to handle the API request (e.g. ESP),
479          #     - `servicecontrol.googleapis.com/platform` describing the platform
480          #        where the API is served (e.g. GAE, GCE, GKE).
481        "a_key": "A String",
482      },
483      "metricValueSets": [ # Represents information about this operation. Each MetricValueSet
484          # corresponds to a metric defined in the service configuration.
485          # The data type used in the MetricValueSet must agree with
486          # the data type specified in the metric definition.
487          #
488          # Within a single operation, it is not allowed to have more than one
489          # MetricValue instances that have the same metric names and identical
490          # label value combinations. If a request has such duplicated MetricValue
491          # instances, the entire request is rejected with
492          # an invalid argument error.
493        { # Represents a set of metric values in the same metric.
494            # Each metric value in the set should have a unique combination of start time,
495            # end time, and label values.
496          "metricValues": [ # The values in this metric.
497            { # Represents a single metric value.
498              "moneyValue": { # Represents an amount of money with its currency type. # A money value.
499                "nanos": 42, # Number of nano (10^-9) units of the amount.
500                    # The value must be between -999,999,999 and +999,999,999 inclusive.
501                    # If `units` is positive, `nanos` must be positive or zero.
502                    # If `units` is zero, `nanos` can be positive, zero, or negative.
503                    # If `units` is negative, `nanos` must be negative or zero.
504                    # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
505                "units": "A String", # The whole units of the amount.
506                    # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
507                "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217.
508              },
509              "labels": { # The labels describing the metric value.
510                  # See comments on google.api.servicecontrol.v1.Operation.labels for
511                  # the overriding relationship.
512                "a_key": "A String",
513              },
514              "doubleValue": 3.14, # A double precision floating point value.
515              "boolValue": True or False, # A boolean value.
516              "startTime": "A String", # The start of the time period over which this metric value's measurement
517                  # applies. The time period has different semantics for different metric
518                  # types (cumulative, delta, and gauge). See the metric definition
519                  # documentation in the service configuration for details.
520              "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value.
521                  # points. It contains the size of the population of sample points plus
522                  # additional optional information:
523                  #
524                  #   - the arithmetic mean of the samples
525                  #   - the minimum and maximum of the samples
526                  #   - the sum-squared-deviation of the samples, used to compute variance
527                  #   - a histogram of the values of the sample points
528                "count": "A String", # The total number of samples in the distribution. Must be >= 0.
529                "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean:
530                    #   Sum[i=1..count]((x_i - mean)^2)
531                    # where each x_i is a sample values. If `count` is zero then this field
532                    # must be zero, otherwise validation of the request fails.
533                "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are
534                    # optional. If present, they must sum to the `count` value.
535                    #
536                    # The buckets are defined below in `bucket_option`. There are N buckets.
537                    # `bucket_counts[0]` is the number of samples in the underflow bucket.
538                    # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
539                    # in each of the finite buckets. And `bucket_counts[N] is the number
540                    # of samples in the overflow bucket. See the comments of `bucket_option`
541                    # below for more details.
542                    #
543                    # Any suffix of trailing zeros may be omitted.
544                  "A String",
545                ],
546                "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width.
547                  "scale": 3.14, # The i'th exponential bucket covers the interval
548                      #   [scale * growth_factor^(i-1), scale * growth_factor^i)
549                      # where i ranges from 1 to num_finite_buckets inclusive.
550                      # Must be > 0.
551                  "growthFactor": 3.14, # The i'th exponential bucket covers the interval
552                      #   [scale * growth_factor^(i-1), scale * growth_factor^i)
553                      # where i ranges from 1 to num_finite_buckets inclusive.
554                      # Must be larger than 1.0.
555                  "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
556                      # the total number of buckets is `num_finite_buckets` + 2.
557                      # See comments on `bucket_options` for details.
558                },
559                "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero.
560                "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero.
561                "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width.
562                  "width": 3.14, # The i'th linear bucket covers the interval
563                      #   [offset + (i-1) * width, offset + i * width)
564                      # where i ranges from 1 to num_finite_buckets, inclusive.
565                      # Must be strictly positive.
566                  "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
567                      # the total number of buckets is `num_finite_buckets` + 2.
568                      # See comments on `bucket_options` for details.
569                  "offset": 3.14, # The i'th linear bucket covers the interval
570                      #   [offset + (i-1) * width, offset + i * width)
571                      # where i ranges from 1 to num_finite_buckets, inclusive.
572                },
573                "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width.
574                  "bounds": [ # 'bound' is a list of strictly increasing boundaries between
575                      # buckets. Note that a list of length N-1 defines N buckets because
576                      # of fenceposting. See comments on `bucket_options` for details.
577                      #
578                      # The i'th finite bucket covers the interval
579                      #   [bound[i-1], bound[i])
580                      # where i ranges from 1 to bound_size() - 1. Note that there are no
581                      # finite buckets at all if 'bound' only contains a single element; in
582                      # that special case the single bound defines the boundary between the
583                      # underflow and overflow buckets.
584                      #
585                      # bucket number                   lower bound    upper bound
586                      #  i == 0 (underflow)              -inf           bound[i]
587                      #  0 < i < bound_size()            bound[i-1]     bound[i]
588                      #  i == bound_size() (overflow)    bound[i-1]     +inf
589                    3.14,
590                  ],
591                },
592                "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is
593                    # zero then this field must be zero.
594              },
595              "stringValue": "A String", # A text string value.
596              "int64Value": "A String", # A signed 64-bit integer value.
597              "endTime": "A String", # The end of the time period over which this metric value's measurement
598                  # applies.
599            },
600          ],
601          "metricName": "A String", # The metric name defined in the service configuration.
602        },
603      ],
604      "importance": "A String", # DO NOT USE. This is an experimental field.
605      "operationName": "A String", # Fully qualified name of the operation. Reserved for future use.
606      "resourceContainer": "A String", # The resource name of the parent of a resource in the resource hierarchy.
607          #
608          # This can be in one of the following formats:
609          #     - “projects/<project-id or project-number>”
610          #     - “folders/<folder-id>”
611          #     - “organizations/<organization-id>”
612      "quotaProperties": { # Represents the properties needed for quota operations. # Represents the properties needed for quota check. Applicable only if this
613          # operation is for a quota check request.
614        "quotaMode": "A String", # Quota mode for this operation.
615        "limitByIds": { # LimitType IDs that should be used for checking quota. Key in this map
616            # should be a valid LimitType string, and the value is the ID to be used. For
617            # example, an entry <USER, 123> will cause all user quota limits to use 123
618            # as the user ID. See google/api/quota.proto for the definition of LimitType.
619            # CLIENT_PROJECT: Not supported.
620            # USER: Value of this entry will be used for enforcing user-level quota
621            #       limits. If none specified, caller IP passed in the
622            #       servicecontrol.googleapis.com/caller_ip label will be used instead.
623            #       If the server cannot resolve a value for this LimitType, an error
624            #       will be thrown. No validation will be performed on this ID.
625            # Deprecated: use servicecontrol.googleapis.com/user label to send user ID.
626          "a_key": "A String",
627        },
628      },
629      "consumerId": "A String", # Identity of the consumer who is using the service.
630          # This field should be filled in for the operations initiated by a
631          # consumer, but not for service-initiated operations that are
632          # not related to a specific consumer.
633          #
634          # This can be in one of the following formats:
635          #   project:<project_id>,
636          #   project_number:<project_number>,
637          #   api_key:<api_key>.
638      "userLabels": { # User defined labels for the resource that this operation is associated
639          # with.
640        "a_key": "A String",
641      },
642      "logEntries": [ # Represents information to be logged.
643        { # An individual log entry.
644          "severity": "A String", # The severity of the log entry. The default value is
645              # `LogSeverity.DEFAULT`.
646          "textPayload": "A String", # The log entry payload, represented as a Unicode string (UTF-8).
647          "timestamp": "A String", # The time the event described by the log entry occurred. If
648              # omitted, defaults to operation start time.
649          "labels": { # A set of user-defined (key, value) data that provides additional
650              # information about the log entry.
651            "a_key": "A String",
652          },
653          "structPayload": { # The log entry payload, represented as a structure that
654              # is expressed as a JSON object.
655            "a_key": "", # Properties of the object.
656          },
657          "insertId": "A String", # A unique ID for the log entry used for deduplication. If omitted,
658              # the implementation will generate one based on operation_id.
659          "protoPayload": { # The log entry payload, represented as a protocol buffer that is
660              # expressed as a JSON object. You can only pass `protoPayload`
661              # values that belong to a set of approved types.
662            "a_key": "", # Properties of the object. Contains field @type with type URL.
663          },
664          "name": "A String", # Required. The log to which this log entry belongs. Examples: `"syslog"`,
665              # `"book_log"`.
666        },
667      ],
668      "startTime": "A String", # Required. Start time of the operation.
669      "endTime": "A String", # End time of the operation.
670          # Required when the operation is used in ServiceController.Report,
671          # but optional when the operation is used in ServiceController.Check.
672      "operationId": "A String", # Identity of the operation. This must be unique within the scope of the
673          # service that generated the operation. If the service calls
674          # Check() and Report() on the same operation, the two calls should carry
675          # the same id.
676          #
677          # UUID version 4 is recommended, though not required.
678          # In scenarios where an operation is computed from existing information
679          # and an idempotent id is desirable for deduplication purpose, UUID version 5
680          # is recommended. See RFC 4122 for details.
681    },
682    "requestProjectSettings": True or False, # Requests the project settings to be returned as part of the check response.
683  }
684
685  x__xgafv: string, V1 error format.
686    Allowed values
687      1 - v1 error format
688      2 - v2 error format
689
690Returns:
691  An object of the form:
692
693    { # Response message for the Check method.
694    "serviceConfigId": "A String", # The actual config id used to process the request.
695    "quotaInfo": { # Contains the quota information for a quota check response. # Quota information for the check request associated with this response.
696      "quotaMetrics": [ # Quota metrics to indicate the usage. Depending on the check request, one or
697          # more of the following metrics will be included:
698          #
699          # 1. For rate quota, per quota group or per quota metric incremental usage
700          # will be specified using the following delta metric:
701          #   "serviceruntime.googleapis.com/api/consumer/quota_used_count"
702          #
703          # 2. For allocation quota, per quota metric total usage will be specified
704          # using the following gauge metric:
705          #   "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
706          #
707          # 3. For both rate quota and allocation quota, the quota limit reached
708          # condition will be specified using the following boolean metric:
709          #   "serviceruntime.googleapis.com/quota/exceeded"
710        { # Represents a set of metric values in the same metric.
711            # Each metric value in the set should have a unique combination of start time,
712            # end time, and label values.
713          "metricValues": [ # The values in this metric.
714            { # Represents a single metric value.
715              "moneyValue": { # Represents an amount of money with its currency type. # A money value.
716                "nanos": 42, # Number of nano (10^-9) units of the amount.
717                    # The value must be between -999,999,999 and +999,999,999 inclusive.
718                    # If `units` is positive, `nanos` must be positive or zero.
719                    # If `units` is zero, `nanos` can be positive, zero, or negative.
720                    # If `units` is negative, `nanos` must be negative or zero.
721                    # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
722                "units": "A String", # The whole units of the amount.
723                    # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
724                "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217.
725              },
726              "labels": { # The labels describing the metric value.
727                  # See comments on google.api.servicecontrol.v1.Operation.labels for
728                  # the overriding relationship.
729                "a_key": "A String",
730              },
731              "doubleValue": 3.14, # A double precision floating point value.
732              "boolValue": True or False, # A boolean value.
733              "startTime": "A String", # The start of the time period over which this metric value's measurement
734                  # applies. The time period has different semantics for different metric
735                  # types (cumulative, delta, and gauge). See the metric definition
736                  # documentation in the service configuration for details.
737              "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value.
738                  # points. It contains the size of the population of sample points plus
739                  # additional optional information:
740                  #
741                  #   - the arithmetic mean of the samples
742                  #   - the minimum and maximum of the samples
743                  #   - the sum-squared-deviation of the samples, used to compute variance
744                  #   - a histogram of the values of the sample points
745                "count": "A String", # The total number of samples in the distribution. Must be >= 0.
746                "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean:
747                    #   Sum[i=1..count]((x_i - mean)^2)
748                    # where each x_i is a sample values. If `count` is zero then this field
749                    # must be zero, otherwise validation of the request fails.
750                "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are
751                    # optional. If present, they must sum to the `count` value.
752                    #
753                    # The buckets are defined below in `bucket_option`. There are N buckets.
754                    # `bucket_counts[0]` is the number of samples in the underflow bucket.
755                    # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
756                    # in each of the finite buckets. And `bucket_counts[N] is the number
757                    # of samples in the overflow bucket. See the comments of `bucket_option`
758                    # below for more details.
759                    #
760                    # Any suffix of trailing zeros may be omitted.
761                  "A String",
762                ],
763                "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width.
764                  "scale": 3.14, # The i'th exponential bucket covers the interval
765                      #   [scale * growth_factor^(i-1), scale * growth_factor^i)
766                      # where i ranges from 1 to num_finite_buckets inclusive.
767                      # Must be > 0.
768                  "growthFactor": 3.14, # The i'th exponential bucket covers the interval
769                      #   [scale * growth_factor^(i-1), scale * growth_factor^i)
770                      # where i ranges from 1 to num_finite_buckets inclusive.
771                      # Must be larger than 1.0.
772                  "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
773                      # the total number of buckets is `num_finite_buckets` + 2.
774                      # See comments on `bucket_options` for details.
775                },
776                "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero.
777                "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero.
778                "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width.
779                  "width": 3.14, # The i'th linear bucket covers the interval
780                      #   [offset + (i-1) * width, offset + i * width)
781                      # where i ranges from 1 to num_finite_buckets, inclusive.
782                      # Must be strictly positive.
783                  "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
784                      # the total number of buckets is `num_finite_buckets` + 2.
785                      # See comments on `bucket_options` for details.
786                  "offset": 3.14, # The i'th linear bucket covers the interval
787                      #   [offset + (i-1) * width, offset + i * width)
788                      # where i ranges from 1 to num_finite_buckets, inclusive.
789                },
790                "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width.
791                  "bounds": [ # 'bound' is a list of strictly increasing boundaries between
792                      # buckets. Note that a list of length N-1 defines N buckets because
793                      # of fenceposting. See comments on `bucket_options` for details.
794                      #
795                      # The i'th finite bucket covers the interval
796                      #   [bound[i-1], bound[i])
797                      # where i ranges from 1 to bound_size() - 1. Note that there are no
798                      # finite buckets at all if 'bound' only contains a single element; in
799                      # that special case the single bound defines the boundary between the
800                      # underflow and overflow buckets.
801                      #
802                      # bucket number                   lower bound    upper bound
803                      #  i == 0 (underflow)              -inf           bound[i]
804                      #  0 < i < bound_size()            bound[i-1]     bound[i]
805                      #  i == bound_size() (overflow)    bound[i-1]     +inf
806                    3.14,
807                  ],
808                },
809                "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is
810                    # zero then this field must be zero.
811              },
812              "stringValue": "A String", # A text string value.
813              "int64Value": "A String", # A signed 64-bit integer value.
814              "endTime": "A String", # The end of the time period over which this metric value's measurement
815                  # applies.
816            },
817          ],
818          "metricName": "A String", # The metric name defined in the service configuration.
819        },
820      ],
821      "limitExceeded": [ # Quota Metrics that have exceeded quota limits.
822          # For QuotaGroup-based quota, this is QuotaGroup.name
823          # For QuotaLimit-based quota, this is QuotaLimit.name
824          # See: google.api.Quota
825          # Deprecated: Use quota_metrics to get per quota group limit exceeded status.
826        "A String",
827      ],
828      "quotaConsumed": { # Map of quota group name to the actual number of tokens consumed. If the
829          # quota check was not successful, then this will not be populated due to no
830          # quota consumption.
831          # Deprecated: Use quota_metrics to get per quota group usage.
832        "a_key": 42,
833      },
834    },
835    "checkInfo": { # Feedback data returned from the server during processing a Check request.
836      "unusedArguments": [ # A list of fields and label keys that are ignored by the server.
837          # The client doesn't need to send them for following requests to improve
838          # performance and allow better aggregation.
839        "A String",
840      ],
841    },
842    "checkErrors": [ # Indicate the decision of the check.
843        #
844        # If no check errors are present, the service should process the operation.
845        # Otherwise the service should use the list of errors to determine the
846        # appropriate action.
847      { # Defines the errors to be returned in
848          # google.api.servicecontrol.v1.CheckResponse.check_errors.
849        "code": "A String", # The error code.
850        "detail": "A String", # Free-form text providing details on the error cause of the error.
851      },
852    ],
853    "operationId": "A String", # The same operation_id value used in the CheckRequest.
854        # Used for logging and diagnostics purposes.
855  }</pre>
856</div>
857
858<div class="method">
859    <code class="details" id="endReconciliation">endReconciliation(serviceName, body, x__xgafv=None)</code>
860  <pre>Signals the quota controller that service ends the ongoing usage
861reconciliation.
862
863This method requires the `servicemanagement.services.quota`
864permission on the specified service. For more information, see
865[Google Cloud IAM](https://cloud.google.com/iam).
866
867Args:
868  serviceName: string, Name of the service as specified in the service configuration. For example,
869`"pubsub.googleapis.com"`.
870
871See google.api.Service for the definition of a service name. (required)
872  body: object, The request body. (required)
873    The object takes the form of:
874
875{
876    "serviceConfigId": "A String", # Specifies which version of service configuration should be used to process
877        # the request. If unspecified or no matching version can be found, the latest
878        # one will be used.
879    "reconciliationOperation": { # Represents information regarding a quota operation. # Operation that describes the quota reconciliation.
880      "quotaMetrics": [ # Represents information about this operation. Each MetricValueSet
881          # corresponds to a metric defined in the service configuration.
882          # The data type used in the MetricValueSet must agree with
883          # the data type specified in the metric definition.
884          #
885          # Within a single operation, it is not allowed to have more than one
886          # MetricValue instances that have the same metric names and identical
887          # label value combinations. If a request has such duplicated MetricValue
888          # instances, the entire request is rejected with
889          # an invalid argument error.
890        { # Represents a set of metric values in the same metric.
891            # Each metric value in the set should have a unique combination of start time,
892            # end time, and label values.
893          "metricValues": [ # The values in this metric.
894            { # Represents a single metric value.
895              "moneyValue": { # Represents an amount of money with its currency type. # A money value.
896                "nanos": 42, # Number of nano (10^-9) units of the amount.
897                    # The value must be between -999,999,999 and +999,999,999 inclusive.
898                    # If `units` is positive, `nanos` must be positive or zero.
899                    # If `units` is zero, `nanos` can be positive, zero, or negative.
900                    # If `units` is negative, `nanos` must be negative or zero.
901                    # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
902                "units": "A String", # The whole units of the amount.
903                    # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
904                "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217.
905              },
906              "labels": { # The labels describing the metric value.
907                  # See comments on google.api.servicecontrol.v1.Operation.labels for
908                  # the overriding relationship.
909                "a_key": "A String",
910              },
911              "doubleValue": 3.14, # A double precision floating point value.
912              "boolValue": True or False, # A boolean value.
913              "startTime": "A String", # The start of the time period over which this metric value's measurement
914                  # applies. The time period has different semantics for different metric
915                  # types (cumulative, delta, and gauge). See the metric definition
916                  # documentation in the service configuration for details.
917              "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value.
918                  # points. It contains the size of the population of sample points plus
919                  # additional optional information:
920                  #
921                  #   - the arithmetic mean of the samples
922                  #   - the minimum and maximum of the samples
923                  #   - the sum-squared-deviation of the samples, used to compute variance
924                  #   - a histogram of the values of the sample points
925                "count": "A String", # The total number of samples in the distribution. Must be >= 0.
926                "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean:
927                    #   Sum[i=1..count]((x_i - mean)^2)
928                    # where each x_i is a sample values. If `count` is zero then this field
929                    # must be zero, otherwise validation of the request fails.
930                "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are
931                    # optional. If present, they must sum to the `count` value.
932                    #
933                    # The buckets are defined below in `bucket_option`. There are N buckets.
934                    # `bucket_counts[0]` is the number of samples in the underflow bucket.
935                    # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
936                    # in each of the finite buckets. And `bucket_counts[N] is the number
937                    # of samples in the overflow bucket. See the comments of `bucket_option`
938                    # below for more details.
939                    #
940                    # Any suffix of trailing zeros may be omitted.
941                  "A String",
942                ],
943                "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width.
944                  "scale": 3.14, # The i'th exponential bucket covers the interval
945                      #   [scale * growth_factor^(i-1), scale * growth_factor^i)
946                      # where i ranges from 1 to num_finite_buckets inclusive.
947                      # Must be > 0.
948                  "growthFactor": 3.14, # The i'th exponential bucket covers the interval
949                      #   [scale * growth_factor^(i-1), scale * growth_factor^i)
950                      # where i ranges from 1 to num_finite_buckets inclusive.
951                      # Must be larger than 1.0.
952                  "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
953                      # the total number of buckets is `num_finite_buckets` + 2.
954                      # See comments on `bucket_options` for details.
955                },
956                "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero.
957                "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero.
958                "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width.
959                  "width": 3.14, # The i'th linear bucket covers the interval
960                      #   [offset + (i-1) * width, offset + i * width)
961                      # where i ranges from 1 to num_finite_buckets, inclusive.
962                      # Must be strictly positive.
963                  "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
964                      # the total number of buckets is `num_finite_buckets` + 2.
965                      # See comments on `bucket_options` for details.
966                  "offset": 3.14, # The i'th linear bucket covers the interval
967                      #   [offset + (i-1) * width, offset + i * width)
968                      # where i ranges from 1 to num_finite_buckets, inclusive.
969                },
970                "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width.
971                  "bounds": [ # 'bound' is a list of strictly increasing boundaries between
972                      # buckets. Note that a list of length N-1 defines N buckets because
973                      # of fenceposting. See comments on `bucket_options` for details.
974                      #
975                      # The i'th finite bucket covers the interval
976                      #   [bound[i-1], bound[i])
977                      # where i ranges from 1 to bound_size() - 1. Note that there are no
978                      # finite buckets at all if 'bound' only contains a single element; in
979                      # that special case the single bound defines the boundary between the
980                      # underflow and overflow buckets.
981                      #
982                      # bucket number                   lower bound    upper bound
983                      #  i == 0 (underflow)              -inf           bound[i]
984                      #  0 < i < bound_size()            bound[i-1]     bound[i]
985                      #  i == bound_size() (overflow)    bound[i-1]     +inf
986                    3.14,
987                  ],
988                },
989                "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is
990                    # zero then this field must be zero.
991              },
992              "stringValue": "A String", # A text string value.
993              "int64Value": "A String", # A signed 64-bit integer value.
994              "endTime": "A String", # The end of the time period over which this metric value's measurement
995                  # applies.
996            },
997          ],
998          "metricName": "A String", # The metric name defined in the service configuration.
999        },
1000      ],
1001      "methodName": "A String", # Fully qualified name of the API method for which this quota operation is
1002          # requested. This name is used for matching quota rules or metric rules and
1003          # billing status rules defined in service configuration. This field is not
1004          # required if the quota operation is performed on non-API resources.
1005          #
1006          # Example of an RPC method name:
1007          #     google.example.library.v1.LibraryService.CreateShelf
1008      "labels": { # Labels describing the operation.
1009        "a_key": "A String",
1010      },
1011      "quotaMode": "A String", # Quota mode for this operation.
1012      "consumerId": "A String", # Identity of the consumer for whom this quota operation is being performed.
1013          #
1014          # This can be in one of the following formats:
1015          #   project:<project_id>,
1016          #   project_number:<project_number>,
1017          #   api_key:<api_key>.
1018      "operationId": "A String", # Identity of the operation. This must be unique within the scope of the
1019          # service that generated the operation. If the service calls AllocateQuota
1020          # and ReleaseQuota on the same operation, the two calls should carry the
1021          # same ID.
1022          #
1023          # UUID version 4 is recommended, though not required. In scenarios where an
1024          # operation is computed from existing information and an idempotent id is
1025          # desirable for deduplication purpose, UUID version 5 is recommended. See
1026          # RFC 4122 for details.
1027    },
1028  }
1029
1030  x__xgafv: string, V1 error format.
1031    Allowed values
1032      1 - v1 error format
1033      2 - v2 error format
1034
1035Returns:
1036  An object of the form:
1037
1038    {
1039    "serviceConfigId": "A String", # ID of the actual config used to process the request.
1040    "quotaMetrics": [ # Metric values as tracked by One Platform before the adjustment was made.
1041        # The following metrics will be included:
1042        #
1043        # 1. Per quota metric total usage will be specified using the following gauge
1044        # metric:
1045        #   "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
1046        #
1047        # 2. Value for each quota limit associated with the metrics will be specified
1048        # using the following gauge metric:
1049        #   "serviceruntime.googleapis.com/quota/limit"
1050        #
1051        # 3. Delta value of the usage after the reconciliation for limits associated
1052        # with the metrics will be specified using the following metric:
1053        #   "serviceruntime.googleapis.com/allocation/reconciliation_delta"
1054        # The delta value is defined as:
1055        #   new_usage_from_client - existing_value_in_spanner.
1056        # This metric is not defined in serviceruntime.yaml or in Cloud Monarch.
1057        # This metric is meant for callers' use only. Since this metric is not
1058        # defined in the monitoring backend, reporting on this metric will result in
1059        # an error.
1060      { # Represents a set of metric values in the same metric.
1061          # Each metric value in the set should have a unique combination of start time,
1062          # end time, and label values.
1063        "metricValues": [ # The values in this metric.
1064          { # Represents a single metric value.
1065            "moneyValue": { # Represents an amount of money with its currency type. # A money value.
1066              "nanos": 42, # Number of nano (10^-9) units of the amount.
1067                  # The value must be between -999,999,999 and +999,999,999 inclusive.
1068                  # If `units` is positive, `nanos` must be positive or zero.
1069                  # If `units` is zero, `nanos` can be positive, zero, or negative.
1070                  # If `units` is negative, `nanos` must be negative or zero.
1071                  # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
1072              "units": "A String", # The whole units of the amount.
1073                  # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
1074              "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217.
1075            },
1076            "labels": { # The labels describing the metric value.
1077                # See comments on google.api.servicecontrol.v1.Operation.labels for
1078                # the overriding relationship.
1079              "a_key": "A String",
1080            },
1081            "doubleValue": 3.14, # A double precision floating point value.
1082            "boolValue": True or False, # A boolean value.
1083            "startTime": "A String", # The start of the time period over which this metric value's measurement
1084                # applies. The time period has different semantics for different metric
1085                # types (cumulative, delta, and gauge). See the metric definition
1086                # documentation in the service configuration for details.
1087            "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value.
1088                # points. It contains the size of the population of sample points plus
1089                # additional optional information:
1090                #
1091                #   - the arithmetic mean of the samples
1092                #   - the minimum and maximum of the samples
1093                #   - the sum-squared-deviation of the samples, used to compute variance
1094                #   - a histogram of the values of the sample points
1095              "count": "A String", # The total number of samples in the distribution. Must be >= 0.
1096              "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean:
1097                  #   Sum[i=1..count]((x_i - mean)^2)
1098                  # where each x_i is a sample values. If `count` is zero then this field
1099                  # must be zero, otherwise validation of the request fails.
1100              "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are
1101                  # optional. If present, they must sum to the `count` value.
1102                  #
1103                  # The buckets are defined below in `bucket_option`. There are N buckets.
1104                  # `bucket_counts[0]` is the number of samples in the underflow bucket.
1105                  # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
1106                  # in each of the finite buckets. And `bucket_counts[N] is the number
1107                  # of samples in the overflow bucket. See the comments of `bucket_option`
1108                  # below for more details.
1109                  #
1110                  # Any suffix of trailing zeros may be omitted.
1111                "A String",
1112              ],
1113              "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width.
1114                "scale": 3.14, # The i'th exponential bucket covers the interval
1115                    #   [scale * growth_factor^(i-1), scale * growth_factor^i)
1116                    # where i ranges from 1 to num_finite_buckets inclusive.
1117                    # Must be > 0.
1118                "growthFactor": 3.14, # The i'th exponential bucket covers the interval
1119                    #   [scale * growth_factor^(i-1), scale * growth_factor^i)
1120                    # where i ranges from 1 to num_finite_buckets inclusive.
1121                    # Must be larger than 1.0.
1122                "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
1123                    # the total number of buckets is `num_finite_buckets` + 2.
1124                    # See comments on `bucket_options` for details.
1125              },
1126              "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero.
1127              "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero.
1128              "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width.
1129                "width": 3.14, # The i'th linear bucket covers the interval
1130                    #   [offset + (i-1) * width, offset + i * width)
1131                    # where i ranges from 1 to num_finite_buckets, inclusive.
1132                    # Must be strictly positive.
1133                "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
1134                    # the total number of buckets is `num_finite_buckets` + 2.
1135                    # See comments on `bucket_options` for details.
1136                "offset": 3.14, # The i'th linear bucket covers the interval
1137                    #   [offset + (i-1) * width, offset + i * width)
1138                    # where i ranges from 1 to num_finite_buckets, inclusive.
1139              },
1140              "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width.
1141                "bounds": [ # 'bound' is a list of strictly increasing boundaries between
1142                    # buckets. Note that a list of length N-1 defines N buckets because
1143                    # of fenceposting. See comments on `bucket_options` for details.
1144                    #
1145                    # The i'th finite bucket covers the interval
1146                    #   [bound[i-1], bound[i])
1147                    # where i ranges from 1 to bound_size() - 1. Note that there are no
1148                    # finite buckets at all if 'bound' only contains a single element; in
1149                    # that special case the single bound defines the boundary between the
1150                    # underflow and overflow buckets.
1151                    #
1152                    # bucket number                   lower bound    upper bound
1153                    #  i == 0 (underflow)              -inf           bound[i]
1154                    #  0 < i < bound_size()            bound[i-1]     bound[i]
1155                    #  i == bound_size() (overflow)    bound[i-1]     +inf
1156                  3.14,
1157                ],
1158              },
1159              "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is
1160                  # zero then this field must be zero.
1161            },
1162            "stringValue": "A String", # A text string value.
1163            "int64Value": "A String", # A signed 64-bit integer value.
1164            "endTime": "A String", # The end of the time period over which this metric value's measurement
1165                # applies.
1166          },
1167        ],
1168        "metricName": "A String", # The metric name defined in the service configuration.
1169      },
1170    ],
1171    "reconciliationErrors": [ # Indicates the decision of the reconciliation end.
1172      {
1173        "code": "A String", # Error code.
1174        "description": "A String", # Free-form text that provides details on the cause of the error.
1175        "subject": "A String", # Subject to whom this error applies. See the specific enum for more details
1176            # on this field. For example, "clientip:<ip address of client>" or
1177            # "project:<Google developer project id>".
1178      },
1179    ],
1180    "operationId": "A String", # The same operation_id value used in the EndReconciliationRequest. Used for
1181        # logging and diagnostics purposes.
1182  }</pre>
1183</div>
1184
1185<div class="method">
1186    <code class="details" id="releaseQuota">releaseQuota(serviceName, body, x__xgafv=None)</code>
1187  <pre>Releases previously allocated quota done through AllocateQuota method.
1188
1189This method requires the `servicemanagement.services.quota`
1190permission on the specified service. For more information, see
1191[Google Cloud IAM](https://cloud.google.com/iam).
1192
1193**NOTE:** the client code **must** fail-open if the server returns one
1194of the following quota errors:
1195-   `PROJECT_STATUS_UNAVAILABLE`
1196-   `SERVICE_STATUS_UNAVAILABLE`
1197-   `BILLING_STATUS_UNAVAILABLE`
1198-   `QUOTA_SYSTEM_UNAVAILABLE`
1199
1200The server may inject above errors to prohibit any hard dependency
1201on the quota system.
1202
1203Args:
1204  serviceName: string, Name of the service as specified in the service configuration. For example,
1205`"pubsub.googleapis.com"`.
1206
1207See google.api.Service for the definition of a service name. (required)
1208  body: object, The request body. (required)
1209    The object takes the form of:
1210
1211{ # Request message for the ReleaseQuota method.
1212    "releaseOperation": { # Represents information regarding a quota operation. # Operation that describes the quota release.
1213      "quotaMetrics": [ # Represents information about this operation. Each MetricValueSet
1214          # corresponds to a metric defined in the service configuration.
1215          # The data type used in the MetricValueSet must agree with
1216          # the data type specified in the metric definition.
1217          #
1218          # Within a single operation, it is not allowed to have more than one
1219          # MetricValue instances that have the same metric names and identical
1220          # label value combinations. If a request has such duplicated MetricValue
1221          # instances, the entire request is rejected with
1222          # an invalid argument error.
1223        { # Represents a set of metric values in the same metric.
1224            # Each metric value in the set should have a unique combination of start time,
1225            # end time, and label values.
1226          "metricValues": [ # The values in this metric.
1227            { # Represents a single metric value.
1228              "moneyValue": { # Represents an amount of money with its currency type. # A money value.
1229                "nanos": 42, # Number of nano (10^-9) units of the amount.
1230                    # The value must be between -999,999,999 and +999,999,999 inclusive.
1231                    # If `units` is positive, `nanos` must be positive or zero.
1232                    # If `units` is zero, `nanos` can be positive, zero, or negative.
1233                    # If `units` is negative, `nanos` must be negative or zero.
1234                    # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
1235                "units": "A String", # The whole units of the amount.
1236                    # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
1237                "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217.
1238              },
1239              "labels": { # The labels describing the metric value.
1240                  # See comments on google.api.servicecontrol.v1.Operation.labels for
1241                  # the overriding relationship.
1242                "a_key": "A String",
1243              },
1244              "doubleValue": 3.14, # A double precision floating point value.
1245              "boolValue": True or False, # A boolean value.
1246              "startTime": "A String", # The start of the time period over which this metric value's measurement
1247                  # applies. The time period has different semantics for different metric
1248                  # types (cumulative, delta, and gauge). See the metric definition
1249                  # documentation in the service configuration for details.
1250              "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value.
1251                  # points. It contains the size of the population of sample points plus
1252                  # additional optional information:
1253                  #
1254                  #   - the arithmetic mean of the samples
1255                  #   - the minimum and maximum of the samples
1256                  #   - the sum-squared-deviation of the samples, used to compute variance
1257                  #   - a histogram of the values of the sample points
1258                "count": "A String", # The total number of samples in the distribution. Must be >= 0.
1259                "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean:
1260                    #   Sum[i=1..count]((x_i - mean)^2)
1261                    # where each x_i is a sample values. If `count` is zero then this field
1262                    # must be zero, otherwise validation of the request fails.
1263                "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are
1264                    # optional. If present, they must sum to the `count` value.
1265                    #
1266                    # The buckets are defined below in `bucket_option`. There are N buckets.
1267                    # `bucket_counts[0]` is the number of samples in the underflow bucket.
1268                    # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
1269                    # in each of the finite buckets. And `bucket_counts[N] is the number
1270                    # of samples in the overflow bucket. See the comments of `bucket_option`
1271                    # below for more details.
1272                    #
1273                    # Any suffix of trailing zeros may be omitted.
1274                  "A String",
1275                ],
1276                "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width.
1277                  "scale": 3.14, # The i'th exponential bucket covers the interval
1278                      #   [scale * growth_factor^(i-1), scale * growth_factor^i)
1279                      # where i ranges from 1 to num_finite_buckets inclusive.
1280                      # Must be > 0.
1281                  "growthFactor": 3.14, # The i'th exponential bucket covers the interval
1282                      #   [scale * growth_factor^(i-1), scale * growth_factor^i)
1283                      # where i ranges from 1 to num_finite_buckets inclusive.
1284                      # Must be larger than 1.0.
1285                  "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
1286                      # the total number of buckets is `num_finite_buckets` + 2.
1287                      # See comments on `bucket_options` for details.
1288                },
1289                "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero.
1290                "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero.
1291                "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width.
1292                  "width": 3.14, # The i'th linear bucket covers the interval
1293                      #   [offset + (i-1) * width, offset + i * width)
1294                      # where i ranges from 1 to num_finite_buckets, inclusive.
1295                      # Must be strictly positive.
1296                  "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
1297                      # the total number of buckets is `num_finite_buckets` + 2.
1298                      # See comments on `bucket_options` for details.
1299                  "offset": 3.14, # The i'th linear bucket covers the interval
1300                      #   [offset + (i-1) * width, offset + i * width)
1301                      # where i ranges from 1 to num_finite_buckets, inclusive.
1302                },
1303                "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width.
1304                  "bounds": [ # 'bound' is a list of strictly increasing boundaries between
1305                      # buckets. Note that a list of length N-1 defines N buckets because
1306                      # of fenceposting. See comments on `bucket_options` for details.
1307                      #
1308                      # The i'th finite bucket covers the interval
1309                      #   [bound[i-1], bound[i])
1310                      # where i ranges from 1 to bound_size() - 1. Note that there are no
1311                      # finite buckets at all if 'bound' only contains a single element; in
1312                      # that special case the single bound defines the boundary between the
1313                      # underflow and overflow buckets.
1314                      #
1315                      # bucket number                   lower bound    upper bound
1316                      #  i == 0 (underflow)              -inf           bound[i]
1317                      #  0 < i < bound_size()            bound[i-1]     bound[i]
1318                      #  i == bound_size() (overflow)    bound[i-1]     +inf
1319                    3.14,
1320                  ],
1321                },
1322                "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is
1323                    # zero then this field must be zero.
1324              },
1325              "stringValue": "A String", # A text string value.
1326              "int64Value": "A String", # A signed 64-bit integer value.
1327              "endTime": "A String", # The end of the time period over which this metric value's measurement
1328                  # applies.
1329            },
1330          ],
1331          "metricName": "A String", # The metric name defined in the service configuration.
1332        },
1333      ],
1334      "methodName": "A String", # Fully qualified name of the API method for which this quota operation is
1335          # requested. This name is used for matching quota rules or metric rules and
1336          # billing status rules defined in service configuration. This field is not
1337          # required if the quota operation is performed on non-API resources.
1338          #
1339          # Example of an RPC method name:
1340          #     google.example.library.v1.LibraryService.CreateShelf
1341      "labels": { # Labels describing the operation.
1342        "a_key": "A String",
1343      },
1344      "quotaMode": "A String", # Quota mode for this operation.
1345      "consumerId": "A String", # Identity of the consumer for whom this quota operation is being performed.
1346          #
1347          # This can be in one of the following formats:
1348          #   project:<project_id>,
1349          #   project_number:<project_number>,
1350          #   api_key:<api_key>.
1351      "operationId": "A String", # Identity of the operation. This must be unique within the scope of the
1352          # service that generated the operation. If the service calls AllocateQuota
1353          # and ReleaseQuota on the same operation, the two calls should carry the
1354          # same ID.
1355          #
1356          # UUID version 4 is recommended, though not required. In scenarios where an
1357          # operation is computed from existing information and an idempotent id is
1358          # desirable for deduplication purpose, UUID version 5 is recommended. See
1359          # RFC 4122 for details.
1360    },
1361    "serviceConfigId": "A String", # Specifies which version of service configuration should be used to process
1362        # the request. If unspecified or no matching version can be found, the latest
1363        # one will be used.
1364  }
1365
1366  x__xgafv: string, V1 error format.
1367    Allowed values
1368      1 - v1 error format
1369      2 - v2 error format
1370
1371Returns:
1372  An object of the form:
1373
1374    { # Response message for the ReleaseQuota method.
1375    "serviceConfigId": "A String", # ID of the actual config used to process the request.
1376    "quotaMetrics": [ # Quota metrics to indicate the result of release. Depending on the
1377        # request, one or more of the following metrics will be included:
1378        #
1379        # 1. For rate quota, per quota group or per quota metric released amount
1380        # will be specified using the following delta metric:
1381        #   "serviceruntime.googleapis.com/api/consumer/quota_refund_count"
1382        #
1383        # 2. For allocation quota, per quota metric total usage will be specified
1384        # using the following gauge metric:
1385        #   "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
1386        #
1387        # 3. For allocation quota, value for each quota limit associated with
1388        # the metrics will be specified using the following gauge metric:
1389        #   "serviceruntime.googleapis.com/quota/limit"
1390      { # Represents a set of metric values in the same metric.
1391          # Each metric value in the set should have a unique combination of start time,
1392          # end time, and label values.
1393        "metricValues": [ # The values in this metric.
1394          { # Represents a single metric value.
1395            "moneyValue": { # Represents an amount of money with its currency type. # A money value.
1396              "nanos": 42, # Number of nano (10^-9) units of the amount.
1397                  # The value must be between -999,999,999 and +999,999,999 inclusive.
1398                  # If `units` is positive, `nanos` must be positive or zero.
1399                  # If `units` is zero, `nanos` can be positive, zero, or negative.
1400                  # If `units` is negative, `nanos` must be negative or zero.
1401                  # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
1402              "units": "A String", # The whole units of the amount.
1403                  # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
1404              "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217.
1405            },
1406            "labels": { # The labels describing the metric value.
1407                # See comments on google.api.servicecontrol.v1.Operation.labels for
1408                # the overriding relationship.
1409              "a_key": "A String",
1410            },
1411            "doubleValue": 3.14, # A double precision floating point value.
1412            "boolValue": True or False, # A boolean value.
1413            "startTime": "A String", # The start of the time period over which this metric value's measurement
1414                # applies. The time period has different semantics for different metric
1415                # types (cumulative, delta, and gauge). See the metric definition
1416                # documentation in the service configuration for details.
1417            "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value.
1418                # points. It contains the size of the population of sample points plus
1419                # additional optional information:
1420                #
1421                #   - the arithmetic mean of the samples
1422                #   - the minimum and maximum of the samples
1423                #   - the sum-squared-deviation of the samples, used to compute variance
1424                #   - a histogram of the values of the sample points
1425              "count": "A String", # The total number of samples in the distribution. Must be >= 0.
1426              "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean:
1427                  #   Sum[i=1..count]((x_i - mean)^2)
1428                  # where each x_i is a sample values. If `count` is zero then this field
1429                  # must be zero, otherwise validation of the request fails.
1430              "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are
1431                  # optional. If present, they must sum to the `count` value.
1432                  #
1433                  # The buckets are defined below in `bucket_option`. There are N buckets.
1434                  # `bucket_counts[0]` is the number of samples in the underflow bucket.
1435                  # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
1436                  # in each of the finite buckets. And `bucket_counts[N] is the number
1437                  # of samples in the overflow bucket. See the comments of `bucket_option`
1438                  # below for more details.
1439                  #
1440                  # Any suffix of trailing zeros may be omitted.
1441                "A String",
1442              ],
1443              "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width.
1444                "scale": 3.14, # The i'th exponential bucket covers the interval
1445                    #   [scale * growth_factor^(i-1), scale * growth_factor^i)
1446                    # where i ranges from 1 to num_finite_buckets inclusive.
1447                    # Must be > 0.
1448                "growthFactor": 3.14, # The i'th exponential bucket covers the interval
1449                    #   [scale * growth_factor^(i-1), scale * growth_factor^i)
1450                    # where i ranges from 1 to num_finite_buckets inclusive.
1451                    # Must be larger than 1.0.
1452                "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
1453                    # the total number of buckets is `num_finite_buckets` + 2.
1454                    # See comments on `bucket_options` for details.
1455              },
1456              "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero.
1457              "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero.
1458              "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width.
1459                "width": 3.14, # The i'th linear bucket covers the interval
1460                    #   [offset + (i-1) * width, offset + i * width)
1461                    # where i ranges from 1 to num_finite_buckets, inclusive.
1462                    # Must be strictly positive.
1463                "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
1464                    # the total number of buckets is `num_finite_buckets` + 2.
1465                    # See comments on `bucket_options` for details.
1466                "offset": 3.14, # The i'th linear bucket covers the interval
1467                    #   [offset + (i-1) * width, offset + i * width)
1468                    # where i ranges from 1 to num_finite_buckets, inclusive.
1469              },
1470              "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width.
1471                "bounds": [ # 'bound' is a list of strictly increasing boundaries between
1472                    # buckets. Note that a list of length N-1 defines N buckets because
1473                    # of fenceposting. See comments on `bucket_options` for details.
1474                    #
1475                    # The i'th finite bucket covers the interval
1476                    #   [bound[i-1], bound[i])
1477                    # where i ranges from 1 to bound_size() - 1. Note that there are no
1478                    # finite buckets at all if 'bound' only contains a single element; in
1479                    # that special case the single bound defines the boundary between the
1480                    # underflow and overflow buckets.
1481                    #
1482                    # bucket number                   lower bound    upper bound
1483                    #  i == 0 (underflow)              -inf           bound[i]
1484                    #  0 < i < bound_size()            bound[i-1]     bound[i]
1485                    #  i == bound_size() (overflow)    bound[i-1]     +inf
1486                  3.14,
1487                ],
1488              },
1489              "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is
1490                  # zero then this field must be zero.
1491            },
1492            "stringValue": "A String", # A text string value.
1493            "int64Value": "A String", # A signed 64-bit integer value.
1494            "endTime": "A String", # The end of the time period over which this metric value's measurement
1495                # applies.
1496          },
1497        ],
1498        "metricName": "A String", # The metric name defined in the service configuration.
1499      },
1500    ],
1501    "releaseErrors": [ # Indicates the decision of the release.
1502      {
1503        "code": "A String", # Error code.
1504        "description": "A String", # Free-form text that provides details on the cause of the error.
1505        "subject": "A String", # Subject to whom this error applies. See the specific enum for more details
1506            # on this field. For example, "clientip:<ip address of client>" or
1507            # "project:<Google developer project id>".
1508      },
1509    ],
1510    "operationId": "A String", # The same operation_id value used in the ReleaseQuotaRequest. Used for
1511        # logging and diagnostics purposes.
1512  }</pre>
1513</div>
1514
1515<div class="method">
1516    <code class="details" id="report">report(serviceName, body, x__xgafv=None)</code>
1517  <pre>Reports operation results to Google Service Control, such as logs and
1518metrics. It should be called after an operation is completed.
1519
1520If feasible, the client should aggregate reporting data for up to 5
1521seconds to reduce API traffic. Limiting aggregation to 5 seconds is to
1522reduce data loss during client crashes. Clients should carefully choose
1523the aggregation time window to avoid data loss risk more than 0.01%
1524for business and compliance reasons.
1525
1526NOTE: the `ReportRequest` has the size limit of 1MB.
1527
1528This method requires the `servicemanagement.services.report` permission
1529on the specified service. For more information, see
1530[Google Cloud IAM](https://cloud.google.com/iam).
1531
1532Args:
1533  serviceName: string, The service name as specified in its service configuration. For example,
1534`"pubsub.googleapis.com"`.
1535
1536See google.api.Service for the definition of a service name. (required)
1537  body: object, The request body. (required)
1538    The object takes the form of:
1539
1540{ # Request message for the Report method.
1541    "operations": [ # Operations to be reported.
1542        #
1543        # Typically the service should report one operation per request.
1544        # Putting multiple operations into a single request is allowed, but should
1545        # be used only when multiple operations are natually available at the time
1546        # of the report.
1547        #
1548        # If multiple operations are in a single request, the total request size
1549        # should be no larger than 1MB. See ReportResponse.report_errors for
1550        # partial failure behavior.
1551      { # Represents information regarding an operation.
1552        "labels": { # Labels describing the operation. Only the following labels are allowed:
1553            #
1554            # - Labels describing monitored resources as defined in
1555            #   the service configuration.
1556            # - Default labels of metric values. When specified, labels defined in the
1557            #   metric value override these default.
1558            # - The following labels defined by Google Cloud Platform:
1559            #     - `cloud.googleapis.com/location` describing the location where the
1560            #        operation happened,
1561            #     - `servicecontrol.googleapis.com/user_agent` describing the user agent
1562            #        of the API request,
1563            #     - `servicecontrol.googleapis.com/service_agent` describing the service
1564            #        used to handle the API request (e.g. ESP),
1565            #     - `servicecontrol.googleapis.com/platform` describing the platform
1566            #        where the API is served (e.g. GAE, GCE, GKE).
1567          "a_key": "A String",
1568        },
1569        "metricValueSets": [ # Represents information about this operation. Each MetricValueSet
1570            # corresponds to a metric defined in the service configuration.
1571            # The data type used in the MetricValueSet must agree with
1572            # the data type specified in the metric definition.
1573            #
1574            # Within a single operation, it is not allowed to have more than one
1575            # MetricValue instances that have the same metric names and identical
1576            # label value combinations. If a request has such duplicated MetricValue
1577            # instances, the entire request is rejected with
1578            # an invalid argument error.
1579          { # Represents a set of metric values in the same metric.
1580              # Each metric value in the set should have a unique combination of start time,
1581              # end time, and label values.
1582            "metricValues": [ # The values in this metric.
1583              { # Represents a single metric value.
1584                "moneyValue": { # Represents an amount of money with its currency type. # A money value.
1585                  "nanos": 42, # Number of nano (10^-9) units of the amount.
1586                      # The value must be between -999,999,999 and +999,999,999 inclusive.
1587                      # If `units` is positive, `nanos` must be positive or zero.
1588                      # If `units` is zero, `nanos` can be positive, zero, or negative.
1589                      # If `units` is negative, `nanos` must be negative or zero.
1590                      # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
1591                  "units": "A String", # The whole units of the amount.
1592                      # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
1593                  "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217.
1594                },
1595                "labels": { # The labels describing the metric value.
1596                    # See comments on google.api.servicecontrol.v1.Operation.labels for
1597                    # the overriding relationship.
1598                  "a_key": "A String",
1599                },
1600                "doubleValue": 3.14, # A double precision floating point value.
1601                "boolValue": True or False, # A boolean value.
1602                "startTime": "A String", # The start of the time period over which this metric value's measurement
1603                    # applies. The time period has different semantics for different metric
1604                    # types (cumulative, delta, and gauge). See the metric definition
1605                    # documentation in the service configuration for details.
1606                "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value.
1607                    # points. It contains the size of the population of sample points plus
1608                    # additional optional information:
1609                    #
1610                    #   - the arithmetic mean of the samples
1611                    #   - the minimum and maximum of the samples
1612                    #   - the sum-squared-deviation of the samples, used to compute variance
1613                    #   - a histogram of the values of the sample points
1614                  "count": "A String", # The total number of samples in the distribution. Must be >= 0.
1615                  "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean:
1616                      #   Sum[i=1..count]((x_i - mean)^2)
1617                      # where each x_i is a sample values. If `count` is zero then this field
1618                      # must be zero, otherwise validation of the request fails.
1619                  "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are
1620                      # optional. If present, they must sum to the `count` value.
1621                      #
1622                      # The buckets are defined below in `bucket_option`. There are N buckets.
1623                      # `bucket_counts[0]` is the number of samples in the underflow bucket.
1624                      # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
1625                      # in each of the finite buckets. And `bucket_counts[N] is the number
1626                      # of samples in the overflow bucket. See the comments of `bucket_option`
1627                      # below for more details.
1628                      #
1629                      # Any suffix of trailing zeros may be omitted.
1630                    "A String",
1631                  ],
1632                  "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width.
1633                    "scale": 3.14, # The i'th exponential bucket covers the interval
1634                        #   [scale * growth_factor^(i-1), scale * growth_factor^i)
1635                        # where i ranges from 1 to num_finite_buckets inclusive.
1636                        # Must be > 0.
1637                    "growthFactor": 3.14, # The i'th exponential bucket covers the interval
1638                        #   [scale * growth_factor^(i-1), scale * growth_factor^i)
1639                        # where i ranges from 1 to num_finite_buckets inclusive.
1640                        # Must be larger than 1.0.
1641                    "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
1642                        # the total number of buckets is `num_finite_buckets` + 2.
1643                        # See comments on `bucket_options` for details.
1644                  },
1645                  "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero.
1646                  "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero.
1647                  "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width.
1648                    "width": 3.14, # The i'th linear bucket covers the interval
1649                        #   [offset + (i-1) * width, offset + i * width)
1650                        # where i ranges from 1 to num_finite_buckets, inclusive.
1651                        # Must be strictly positive.
1652                    "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
1653                        # the total number of buckets is `num_finite_buckets` + 2.
1654                        # See comments on `bucket_options` for details.
1655                    "offset": 3.14, # The i'th linear bucket covers the interval
1656                        #   [offset + (i-1) * width, offset + i * width)
1657                        # where i ranges from 1 to num_finite_buckets, inclusive.
1658                  },
1659                  "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width.
1660                    "bounds": [ # 'bound' is a list of strictly increasing boundaries between
1661                        # buckets. Note that a list of length N-1 defines N buckets because
1662                        # of fenceposting. See comments on `bucket_options` for details.
1663                        #
1664                        # The i'th finite bucket covers the interval
1665                        #   [bound[i-1], bound[i])
1666                        # where i ranges from 1 to bound_size() - 1. Note that there are no
1667                        # finite buckets at all if 'bound' only contains a single element; in
1668                        # that special case the single bound defines the boundary between the
1669                        # underflow and overflow buckets.
1670                        #
1671                        # bucket number                   lower bound    upper bound
1672                        #  i == 0 (underflow)              -inf           bound[i]
1673                        #  0 < i < bound_size()            bound[i-1]     bound[i]
1674                        #  i == bound_size() (overflow)    bound[i-1]     +inf
1675                      3.14,
1676                    ],
1677                  },
1678                  "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is
1679                      # zero then this field must be zero.
1680                },
1681                "stringValue": "A String", # A text string value.
1682                "int64Value": "A String", # A signed 64-bit integer value.
1683                "endTime": "A String", # The end of the time period over which this metric value's measurement
1684                    # applies.
1685              },
1686            ],
1687            "metricName": "A String", # The metric name defined in the service configuration.
1688          },
1689        ],
1690        "importance": "A String", # DO NOT USE. This is an experimental field.
1691        "operationName": "A String", # Fully qualified name of the operation. Reserved for future use.
1692        "resourceContainer": "A String", # The resource name of the parent of a resource in the resource hierarchy.
1693            #
1694            # This can be in one of the following formats:
1695            #     - “projects/<project-id or project-number>”
1696            #     - “folders/<folder-id>”
1697            #     - “organizations/<organization-id>”
1698        "quotaProperties": { # Represents the properties needed for quota operations. # Represents the properties needed for quota check. Applicable only if this
1699            # operation is for a quota check request.
1700          "quotaMode": "A String", # Quota mode for this operation.
1701          "limitByIds": { # LimitType IDs that should be used for checking quota. Key in this map
1702              # should be a valid LimitType string, and the value is the ID to be used. For
1703              # example, an entry <USER, 123> will cause all user quota limits to use 123
1704              # as the user ID. See google/api/quota.proto for the definition of LimitType.
1705              # CLIENT_PROJECT: Not supported.
1706              # USER: Value of this entry will be used for enforcing user-level quota
1707              #       limits. If none specified, caller IP passed in the
1708              #       servicecontrol.googleapis.com/caller_ip label will be used instead.
1709              #       If the server cannot resolve a value for this LimitType, an error
1710              #       will be thrown. No validation will be performed on this ID.
1711              # Deprecated: use servicecontrol.googleapis.com/user label to send user ID.
1712            "a_key": "A String",
1713          },
1714        },
1715        "consumerId": "A String", # Identity of the consumer who is using the service.
1716            # This field should be filled in for the operations initiated by a
1717            # consumer, but not for service-initiated operations that are
1718            # not related to a specific consumer.
1719            #
1720            # This can be in one of the following formats:
1721            #   project:<project_id>,
1722            #   project_number:<project_number>,
1723            #   api_key:<api_key>.
1724        "userLabels": { # User defined labels for the resource that this operation is associated
1725            # with.
1726          "a_key": "A String",
1727        },
1728        "logEntries": [ # Represents information to be logged.
1729          { # An individual log entry.
1730            "severity": "A String", # The severity of the log entry. The default value is
1731                # `LogSeverity.DEFAULT`.
1732            "textPayload": "A String", # The log entry payload, represented as a Unicode string (UTF-8).
1733            "timestamp": "A String", # The time the event described by the log entry occurred. If
1734                # omitted, defaults to operation start time.
1735            "labels": { # A set of user-defined (key, value) data that provides additional
1736                # information about the log entry.
1737              "a_key": "A String",
1738            },
1739            "structPayload": { # The log entry payload, represented as a structure that
1740                # is expressed as a JSON object.
1741              "a_key": "", # Properties of the object.
1742            },
1743            "insertId": "A String", # A unique ID for the log entry used for deduplication. If omitted,
1744                # the implementation will generate one based on operation_id.
1745            "protoPayload": { # The log entry payload, represented as a protocol buffer that is
1746                # expressed as a JSON object. You can only pass `protoPayload`
1747                # values that belong to a set of approved types.
1748              "a_key": "", # Properties of the object. Contains field @type with type URL.
1749            },
1750            "name": "A String", # Required. The log to which this log entry belongs. Examples: `"syslog"`,
1751                # `"book_log"`.
1752          },
1753        ],
1754        "startTime": "A String", # Required. Start time of the operation.
1755        "endTime": "A String", # End time of the operation.
1756            # Required when the operation is used in ServiceController.Report,
1757            # but optional when the operation is used in ServiceController.Check.
1758        "operationId": "A String", # Identity of the operation. This must be unique within the scope of the
1759            # service that generated the operation. If the service calls
1760            # Check() and Report() on the same operation, the two calls should carry
1761            # the same id.
1762            #
1763            # UUID version 4 is recommended, though not required.
1764            # In scenarios where an operation is computed from existing information
1765            # and an idempotent id is desirable for deduplication purpose, UUID version 5
1766            # is recommended. See RFC 4122 for details.
1767      },
1768    ],
1769    "serviceConfigId": "A String", # Specifies which version of service config should be used to process the
1770        # request.
1771        #
1772        # If unspecified or no matching version can be found, the
1773        # latest one will be used.
1774  }
1775
1776  x__xgafv: string, V1 error format.
1777    Allowed values
1778      1 - v1 error format
1779      2 - v2 error format
1780
1781Returns:
1782  An object of the form:
1783
1784    { # Response message for the Report method.
1785    "reportErrors": [ # Partial failures, one for each `Operation` in the request that failed
1786        # processing. There are three possible combinations of the RPC status:
1787        #
1788        # 1. The combination of a successful RPC status and an empty `report_errors`
1789        #    list indicates a complete success where all `Operations` in the
1790        #    request are processed successfully.
1791        # 2. The combination of a successful RPC status and a non-empty
1792        #    `report_errors` list indicates a partial success where some
1793        #    `Operations` in the request succeeded. Each
1794        #    `Operation` that failed processing has a corresponding item
1795        #    in this list.
1796        # 3. A failed RPC status indicates a general non-deterministic failure.
1797        #    When this happens, it's impossible to know which of the
1798        #    'Operations' in the request succeeded or failed.
1799      { # Represents the processing error of one `Operation` in the request.
1800        "status": { # The `Status` type defines a logical error model that is suitable for different # Details of the error when processing the `Operation`.
1801            # programming environments, including REST APIs and RPC APIs. It is used by
1802            # [gRPC](https://github.com/grpc). The error model is designed to be:
1803            #
1804            # - Simple to use and understand for most users
1805            # - Flexible enough to meet unexpected needs
1806            #
1807            # # Overview
1808            #
1809            # The `Status` message contains three pieces of data: error code, error message,
1810            # and error details. The error code should be an enum value of
1811            # google.rpc.Code, but it may accept additional error codes if needed.  The
1812            # error message should be a developer-facing English message that helps
1813            # developers *understand* and *resolve* the error. If a localized user-facing
1814            # error message is needed, put the localized message in the error details or
1815            # localize it in the client. The optional error details may contain arbitrary
1816            # information about the error. There is a predefined set of error detail types
1817            # in the package `google.rpc` that can be used for common error conditions.
1818            #
1819            # # Language mapping
1820            #
1821            # The `Status` message is the logical representation of the error model, but it
1822            # is not necessarily the actual wire format. When the `Status` message is
1823            # exposed in different client libraries and different wire protocols, it can be
1824            # mapped differently. For example, it will likely be mapped to some exceptions
1825            # in Java, but more likely mapped to some error codes in C.
1826            #
1827            # # Other uses
1828            #
1829            # The error model and the `Status` message can be used in a variety of
1830            # environments, either with or without APIs, to provide a
1831            # consistent developer experience across different environments.
1832            #
1833            # Example uses of this error model include:
1834            #
1835            # - Partial errors. If a service needs to return partial errors to the client,
1836            #     it may embed the `Status` in the normal response to indicate the partial
1837            #     errors.
1838            #
1839            # - Workflow errors. A typical workflow has multiple steps. Each step may
1840            #     have a `Status` message for error reporting.
1841            #
1842            # - Batch operations. If a client uses batch request and batch response, the
1843            #     `Status` message should be used directly inside batch response, one for
1844            #     each error sub-response.
1845            #
1846            # - Asynchronous operations. If an API call embeds asynchronous operation
1847            #     results in its response, the status of those operations should be
1848            #     represented directly using the `Status` message.
1849            #
1850            # - Logging. If some API errors are stored in logs, the message `Status` could
1851            #     be used directly after any stripping needed for security/privacy reasons.
1852          "message": "A String", # A developer-facing error message, which should be in English. Any
1853              # user-facing error message should be localized and sent in the
1854              # google.rpc.Status.details field, or localized by the client.
1855          "code": 42, # The status code, which should be an enum value of google.rpc.Code.
1856          "details": [ # A list of messages that carry the error details.  There will be a
1857              # common set of message types for APIs to use.
1858            {
1859              "a_key": "", # Properties of the object. Contains field @type with type URL.
1860            },
1861          ],
1862        },
1863        "operationId": "A String", # The Operation.operation_id value from the request.
1864      },
1865    ],
1866    "reportInfos": [ # Quota usage for each quota release `Operation` request.
1867        #
1868        # Fully or partially failed quota release request may or may not be present
1869        # in `report_quota_info`. For example, a failed quota release request will
1870        # have the current quota usage info when precise quota library returns the
1871        # info. A deadline exceeded quota request will not have quota usage info.
1872        #
1873        # If there is no quota release request, report_quota_info will be empty.
1874      {
1875        "quotaInfo": { # Contains the quota information for a quota check response. # Quota usage info when processing the `Operation`.
1876          "quotaMetrics": [ # Quota metrics to indicate the usage. Depending on the check request, one or
1877              # more of the following metrics will be included:
1878              #
1879              # 1. For rate quota, per quota group or per quota metric incremental usage
1880              # will be specified using the following delta metric:
1881              #   "serviceruntime.googleapis.com/api/consumer/quota_used_count"
1882              #
1883              # 2. For allocation quota, per quota metric total usage will be specified
1884              # using the following gauge metric:
1885              #   "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
1886              #
1887              # 3. For both rate quota and allocation quota, the quota limit reached
1888              # condition will be specified using the following boolean metric:
1889              #   "serviceruntime.googleapis.com/quota/exceeded"
1890            { # Represents a set of metric values in the same metric.
1891                # Each metric value in the set should have a unique combination of start time,
1892                # end time, and label values.
1893              "metricValues": [ # The values in this metric.
1894                { # Represents a single metric value.
1895                  "moneyValue": { # Represents an amount of money with its currency type. # A money value.
1896                    "nanos": 42, # Number of nano (10^-9) units of the amount.
1897                        # The value must be between -999,999,999 and +999,999,999 inclusive.
1898                        # If `units` is positive, `nanos` must be positive or zero.
1899                        # If `units` is zero, `nanos` can be positive, zero, or negative.
1900                        # If `units` is negative, `nanos` must be negative or zero.
1901                        # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
1902                    "units": "A String", # The whole units of the amount.
1903                        # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
1904                    "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217.
1905                  },
1906                  "labels": { # The labels describing the metric value.
1907                      # See comments on google.api.servicecontrol.v1.Operation.labels for
1908                      # the overriding relationship.
1909                    "a_key": "A String",
1910                  },
1911                  "doubleValue": 3.14, # A double precision floating point value.
1912                  "boolValue": True or False, # A boolean value.
1913                  "startTime": "A String", # The start of the time period over which this metric value's measurement
1914                      # applies. The time period has different semantics for different metric
1915                      # types (cumulative, delta, and gauge). See the metric definition
1916                      # documentation in the service configuration for details.
1917                  "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value.
1918                      # points. It contains the size of the population of sample points plus
1919                      # additional optional information:
1920                      #
1921                      #   - the arithmetic mean of the samples
1922                      #   - the minimum and maximum of the samples
1923                      #   - the sum-squared-deviation of the samples, used to compute variance
1924                      #   - a histogram of the values of the sample points
1925                    "count": "A String", # The total number of samples in the distribution. Must be >= 0.
1926                    "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean:
1927                        #   Sum[i=1..count]((x_i - mean)^2)
1928                        # where each x_i is a sample values. If `count` is zero then this field
1929                        # must be zero, otherwise validation of the request fails.
1930                    "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are
1931                        # optional. If present, they must sum to the `count` value.
1932                        #
1933                        # The buckets are defined below in `bucket_option`. There are N buckets.
1934                        # `bucket_counts[0]` is the number of samples in the underflow bucket.
1935                        # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
1936                        # in each of the finite buckets. And `bucket_counts[N] is the number
1937                        # of samples in the overflow bucket. See the comments of `bucket_option`
1938                        # below for more details.
1939                        #
1940                        # Any suffix of trailing zeros may be omitted.
1941                      "A String",
1942                    ],
1943                    "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width.
1944                      "scale": 3.14, # The i'th exponential bucket covers the interval
1945                          #   [scale * growth_factor^(i-1), scale * growth_factor^i)
1946                          # where i ranges from 1 to num_finite_buckets inclusive.
1947                          # Must be > 0.
1948                      "growthFactor": 3.14, # The i'th exponential bucket covers the interval
1949                          #   [scale * growth_factor^(i-1), scale * growth_factor^i)
1950                          # where i ranges from 1 to num_finite_buckets inclusive.
1951                          # Must be larger than 1.0.
1952                      "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
1953                          # the total number of buckets is `num_finite_buckets` + 2.
1954                          # See comments on `bucket_options` for details.
1955                    },
1956                    "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero.
1957                    "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero.
1958                    "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width.
1959                      "width": 3.14, # The i'th linear bucket covers the interval
1960                          #   [offset + (i-1) * width, offset + i * width)
1961                          # where i ranges from 1 to num_finite_buckets, inclusive.
1962                          # Must be strictly positive.
1963                      "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
1964                          # the total number of buckets is `num_finite_buckets` + 2.
1965                          # See comments on `bucket_options` for details.
1966                      "offset": 3.14, # The i'th linear bucket covers the interval
1967                          #   [offset + (i-1) * width, offset + i * width)
1968                          # where i ranges from 1 to num_finite_buckets, inclusive.
1969                    },
1970                    "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width.
1971                      "bounds": [ # 'bound' is a list of strictly increasing boundaries between
1972                          # buckets. Note that a list of length N-1 defines N buckets because
1973                          # of fenceposting. See comments on `bucket_options` for details.
1974                          #
1975                          # The i'th finite bucket covers the interval
1976                          #   [bound[i-1], bound[i])
1977                          # where i ranges from 1 to bound_size() - 1. Note that there are no
1978                          # finite buckets at all if 'bound' only contains a single element; in
1979                          # that special case the single bound defines the boundary between the
1980                          # underflow and overflow buckets.
1981                          #
1982                          # bucket number                   lower bound    upper bound
1983                          #  i == 0 (underflow)              -inf           bound[i]
1984                          #  0 < i < bound_size()            bound[i-1]     bound[i]
1985                          #  i == bound_size() (overflow)    bound[i-1]     +inf
1986                        3.14,
1987                      ],
1988                    },
1989                    "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is
1990                        # zero then this field must be zero.
1991                  },
1992                  "stringValue": "A String", # A text string value.
1993                  "int64Value": "A String", # A signed 64-bit integer value.
1994                  "endTime": "A String", # The end of the time period over which this metric value's measurement
1995                      # applies.
1996                },
1997              ],
1998              "metricName": "A String", # The metric name defined in the service configuration.
1999            },
2000          ],
2001          "limitExceeded": [ # Quota Metrics that have exceeded quota limits.
2002              # For QuotaGroup-based quota, this is QuotaGroup.name
2003              # For QuotaLimit-based quota, this is QuotaLimit.name
2004              # See: google.api.Quota
2005              # Deprecated: Use quota_metrics to get per quota group limit exceeded status.
2006            "A String",
2007          ],
2008          "quotaConsumed": { # Map of quota group name to the actual number of tokens consumed. If the
2009              # quota check was not successful, then this will not be populated due to no
2010              # quota consumption.
2011              # Deprecated: Use quota_metrics to get per quota group usage.
2012            "a_key": 42,
2013          },
2014        },
2015        "operationId": "A String", # The Operation.operation_id value from the request.
2016      },
2017    ],
2018    "serviceConfigId": "A String", # The actual config id used to process the request.
2019  }</pre>
2020</div>
2021
2022<div class="method">
2023    <code class="details" id="startReconciliation">startReconciliation(serviceName, body, x__xgafv=None)</code>
2024  <pre>Unlike rate quota, allocation quota does not get refilled periodically.
2025So, it is possible that the quota usage as seen by the service differs from
2026what the One Platform considers the usage is. This is expected to happen
2027only rarely, but over time this can accumulate. Services can invoke
2028StartReconciliation and EndReconciliation to correct this usage drift, as
2029described below:
20301. Service sends StartReconciliation with a timestamp in future for each
2031   metric that needs to be reconciled. The timestamp being in future allows
2032   to account for in-flight AllocateQuota and ReleaseQuota requests for the
2033   same metric.
20342. One Platform records this timestamp and starts tracking subsequent
2035   AllocateQuota and ReleaseQuota requests until EndReconciliation is
2036   called.
20373. At or after the time specified in the StartReconciliation, service
2038   sends EndReconciliation with the usage that needs to be reconciled to.
20394. One Platform adjusts its own record of usage for that metric to the
2040   value specified in EndReconciliation by taking in to account any
2041   allocation or release between StartReconciliation and EndReconciliation.
2042
2043Signals the quota controller that the service wants to perform a usage
2044reconciliation as specified in the request.
2045
2046This method requires the `servicemanagement.services.quota`
2047permission on the specified service. For more information, see
2048[Google Cloud IAM](https://cloud.google.com/iam).
2049
2050Args:
2051  serviceName: string, Name of the service as specified in the service configuration. For example,
2052`"pubsub.googleapis.com"`.
2053
2054See google.api.Service for the definition of a service name. (required)
2055  body: object, The request body. (required)
2056    The object takes the form of:
2057
2058{
2059    "serviceConfigId": "A String", # Specifies which version of service configuration should be used to process
2060        # the request. If unspecified or no matching version can be found, the latest
2061        # one will be used.
2062    "reconciliationOperation": { # Represents information regarding a quota operation. # Operation that describes the quota reconciliation.
2063      "quotaMetrics": [ # Represents information about this operation. Each MetricValueSet
2064          # corresponds to a metric defined in the service configuration.
2065          # The data type used in the MetricValueSet must agree with
2066          # the data type specified in the metric definition.
2067          #
2068          # Within a single operation, it is not allowed to have more than one
2069          # MetricValue instances that have the same metric names and identical
2070          # label value combinations. If a request has such duplicated MetricValue
2071          # instances, the entire request is rejected with
2072          # an invalid argument error.
2073        { # Represents a set of metric values in the same metric.
2074            # Each metric value in the set should have a unique combination of start time,
2075            # end time, and label values.
2076          "metricValues": [ # The values in this metric.
2077            { # Represents a single metric value.
2078              "moneyValue": { # Represents an amount of money with its currency type. # A money value.
2079                "nanos": 42, # Number of nano (10^-9) units of the amount.
2080                    # The value must be between -999,999,999 and +999,999,999 inclusive.
2081                    # If `units` is positive, `nanos` must be positive or zero.
2082                    # If `units` is zero, `nanos` can be positive, zero, or negative.
2083                    # If `units` is negative, `nanos` must be negative or zero.
2084                    # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
2085                "units": "A String", # The whole units of the amount.
2086                    # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
2087                "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217.
2088              },
2089              "labels": { # The labels describing the metric value.
2090                  # See comments on google.api.servicecontrol.v1.Operation.labels for
2091                  # the overriding relationship.
2092                "a_key": "A String",
2093              },
2094              "doubleValue": 3.14, # A double precision floating point value.
2095              "boolValue": True or False, # A boolean value.
2096              "startTime": "A String", # The start of the time period over which this metric value's measurement
2097                  # applies. The time period has different semantics for different metric
2098                  # types (cumulative, delta, and gauge). See the metric definition
2099                  # documentation in the service configuration for details.
2100              "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value.
2101                  # points. It contains the size of the population of sample points plus
2102                  # additional optional information:
2103                  #
2104                  #   - the arithmetic mean of the samples
2105                  #   - the minimum and maximum of the samples
2106                  #   - the sum-squared-deviation of the samples, used to compute variance
2107                  #   - a histogram of the values of the sample points
2108                "count": "A String", # The total number of samples in the distribution. Must be >= 0.
2109                "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean:
2110                    #   Sum[i=1..count]((x_i - mean)^2)
2111                    # where each x_i is a sample values. If `count` is zero then this field
2112                    # must be zero, otherwise validation of the request fails.
2113                "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are
2114                    # optional. If present, they must sum to the `count` value.
2115                    #
2116                    # The buckets are defined below in `bucket_option`. There are N buckets.
2117                    # `bucket_counts[0]` is the number of samples in the underflow bucket.
2118                    # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
2119                    # in each of the finite buckets. And `bucket_counts[N] is the number
2120                    # of samples in the overflow bucket. See the comments of `bucket_option`
2121                    # below for more details.
2122                    #
2123                    # Any suffix of trailing zeros may be omitted.
2124                  "A String",
2125                ],
2126                "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width.
2127                  "scale": 3.14, # The i'th exponential bucket covers the interval
2128                      #   [scale * growth_factor^(i-1), scale * growth_factor^i)
2129                      # where i ranges from 1 to num_finite_buckets inclusive.
2130                      # Must be > 0.
2131                  "growthFactor": 3.14, # The i'th exponential bucket covers the interval
2132                      #   [scale * growth_factor^(i-1), scale * growth_factor^i)
2133                      # where i ranges from 1 to num_finite_buckets inclusive.
2134                      # Must be larger than 1.0.
2135                  "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
2136                      # the total number of buckets is `num_finite_buckets` + 2.
2137                      # See comments on `bucket_options` for details.
2138                },
2139                "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero.
2140                "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero.
2141                "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width.
2142                  "width": 3.14, # The i'th linear bucket covers the interval
2143                      #   [offset + (i-1) * width, offset + i * width)
2144                      # where i ranges from 1 to num_finite_buckets, inclusive.
2145                      # Must be strictly positive.
2146                  "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
2147                      # the total number of buckets is `num_finite_buckets` + 2.
2148                      # See comments on `bucket_options` for details.
2149                  "offset": 3.14, # The i'th linear bucket covers the interval
2150                      #   [offset + (i-1) * width, offset + i * width)
2151                      # where i ranges from 1 to num_finite_buckets, inclusive.
2152                },
2153                "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width.
2154                  "bounds": [ # 'bound' is a list of strictly increasing boundaries between
2155                      # buckets. Note that a list of length N-1 defines N buckets because
2156                      # of fenceposting. See comments on `bucket_options` for details.
2157                      #
2158                      # The i'th finite bucket covers the interval
2159                      #   [bound[i-1], bound[i])
2160                      # where i ranges from 1 to bound_size() - 1. Note that there are no
2161                      # finite buckets at all if 'bound' only contains a single element; in
2162                      # that special case the single bound defines the boundary between the
2163                      # underflow and overflow buckets.
2164                      #
2165                      # bucket number                   lower bound    upper bound
2166                      #  i == 0 (underflow)              -inf           bound[i]
2167                      #  0 < i < bound_size()            bound[i-1]     bound[i]
2168                      #  i == bound_size() (overflow)    bound[i-1]     +inf
2169                    3.14,
2170                  ],
2171                },
2172                "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is
2173                    # zero then this field must be zero.
2174              },
2175              "stringValue": "A String", # A text string value.
2176              "int64Value": "A String", # A signed 64-bit integer value.
2177              "endTime": "A String", # The end of the time period over which this metric value's measurement
2178                  # applies.
2179            },
2180          ],
2181          "metricName": "A String", # The metric name defined in the service configuration.
2182        },
2183      ],
2184      "methodName": "A String", # Fully qualified name of the API method for which this quota operation is
2185          # requested. This name is used for matching quota rules or metric rules and
2186          # billing status rules defined in service configuration. This field is not
2187          # required if the quota operation is performed on non-API resources.
2188          #
2189          # Example of an RPC method name:
2190          #     google.example.library.v1.LibraryService.CreateShelf
2191      "labels": { # Labels describing the operation.
2192        "a_key": "A String",
2193      },
2194      "quotaMode": "A String", # Quota mode for this operation.
2195      "consumerId": "A String", # Identity of the consumer for whom this quota operation is being performed.
2196          #
2197          # This can be in one of the following formats:
2198          #   project:<project_id>,
2199          #   project_number:<project_number>,
2200          #   api_key:<api_key>.
2201      "operationId": "A String", # Identity of the operation. This must be unique within the scope of the
2202          # service that generated the operation. If the service calls AllocateQuota
2203          # and ReleaseQuota on the same operation, the two calls should carry the
2204          # same ID.
2205          #
2206          # UUID version 4 is recommended, though not required. In scenarios where an
2207          # operation is computed from existing information and an idempotent id is
2208          # desirable for deduplication purpose, UUID version 5 is recommended. See
2209          # RFC 4122 for details.
2210    },
2211  }
2212
2213  x__xgafv: string, V1 error format.
2214    Allowed values
2215      1 - v1 error format
2216      2 - v2 error format
2217
2218Returns:
2219  An object of the form:
2220
2221    {
2222    "serviceConfigId": "A String", # ID of the actual config used to process the request.
2223    "quotaMetrics": [ # Metric values as tracked by One Platform before the start of
2224        # reconciliation. The following metrics will be included:
2225        #
2226        # 1. Per quota metric total usage will be specified using the following gauge
2227        # metric:
2228        #   "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
2229        #
2230        # 2. Value for each quota limit associated with the metrics will be specified
2231        # using the following gauge metric:
2232        #   "serviceruntime.googleapis.com/quota/limit"
2233      { # Represents a set of metric values in the same metric.
2234          # Each metric value in the set should have a unique combination of start time,
2235          # end time, and label values.
2236        "metricValues": [ # The values in this metric.
2237          { # Represents a single metric value.
2238            "moneyValue": { # Represents an amount of money with its currency type. # A money value.
2239              "nanos": 42, # Number of nano (10^-9) units of the amount.
2240                  # The value must be between -999,999,999 and +999,999,999 inclusive.
2241                  # If `units` is positive, `nanos` must be positive or zero.
2242                  # If `units` is zero, `nanos` can be positive, zero, or negative.
2243                  # If `units` is negative, `nanos` must be negative or zero.
2244                  # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
2245              "units": "A String", # The whole units of the amount.
2246                  # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
2247              "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217.
2248            },
2249            "labels": { # The labels describing the metric value.
2250                # See comments on google.api.servicecontrol.v1.Operation.labels for
2251                # the overriding relationship.
2252              "a_key": "A String",
2253            },
2254            "doubleValue": 3.14, # A double precision floating point value.
2255            "boolValue": True or False, # A boolean value.
2256            "startTime": "A String", # The start of the time period over which this metric value's measurement
2257                # applies. The time period has different semantics for different metric
2258                # types (cumulative, delta, and gauge). See the metric definition
2259                # documentation in the service configuration for details.
2260            "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value.
2261                # points. It contains the size of the population of sample points plus
2262                # additional optional information:
2263                #
2264                #   - the arithmetic mean of the samples
2265                #   - the minimum and maximum of the samples
2266                #   - the sum-squared-deviation of the samples, used to compute variance
2267                #   - a histogram of the values of the sample points
2268              "count": "A String", # The total number of samples in the distribution. Must be >= 0.
2269              "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean:
2270                  #   Sum[i=1..count]((x_i - mean)^2)
2271                  # where each x_i is a sample values. If `count` is zero then this field
2272                  # must be zero, otherwise validation of the request fails.
2273              "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are
2274                  # optional. If present, they must sum to the `count` value.
2275                  #
2276                  # The buckets are defined below in `bucket_option`. There are N buckets.
2277                  # `bucket_counts[0]` is the number of samples in the underflow bucket.
2278                  # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
2279                  # in each of the finite buckets. And `bucket_counts[N] is the number
2280                  # of samples in the overflow bucket. See the comments of `bucket_option`
2281                  # below for more details.
2282                  #
2283                  # Any suffix of trailing zeros may be omitted.
2284                "A String",
2285              ],
2286              "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width.
2287                "scale": 3.14, # The i'th exponential bucket covers the interval
2288                    #   [scale * growth_factor^(i-1), scale * growth_factor^i)
2289                    # where i ranges from 1 to num_finite_buckets inclusive.
2290                    # Must be > 0.
2291                "growthFactor": 3.14, # The i'th exponential bucket covers the interval
2292                    #   [scale * growth_factor^(i-1), scale * growth_factor^i)
2293                    # where i ranges from 1 to num_finite_buckets inclusive.
2294                    # Must be larger than 1.0.
2295                "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
2296                    # the total number of buckets is `num_finite_buckets` + 2.
2297                    # See comments on `bucket_options` for details.
2298              },
2299              "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero.
2300              "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero.
2301              "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width.
2302                "width": 3.14, # The i'th linear bucket covers the interval
2303                    #   [offset + (i-1) * width, offset + i * width)
2304                    # where i ranges from 1 to num_finite_buckets, inclusive.
2305                    # Must be strictly positive.
2306                "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets,
2307                    # the total number of buckets is `num_finite_buckets` + 2.
2308                    # See comments on `bucket_options` for details.
2309                "offset": 3.14, # The i'th linear bucket covers the interval
2310                    #   [offset + (i-1) * width, offset + i * width)
2311                    # where i ranges from 1 to num_finite_buckets, inclusive.
2312              },
2313              "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width.
2314                "bounds": [ # 'bound' is a list of strictly increasing boundaries between
2315                    # buckets. Note that a list of length N-1 defines N buckets because
2316                    # of fenceposting. See comments on `bucket_options` for details.
2317                    #
2318                    # The i'th finite bucket covers the interval
2319                    #   [bound[i-1], bound[i])
2320                    # where i ranges from 1 to bound_size() - 1. Note that there are no
2321                    # finite buckets at all if 'bound' only contains a single element; in
2322                    # that special case the single bound defines the boundary between the
2323                    # underflow and overflow buckets.
2324                    #
2325                    # bucket number                   lower bound    upper bound
2326                    #  i == 0 (underflow)              -inf           bound[i]
2327                    #  0 < i < bound_size()            bound[i-1]     bound[i]
2328                    #  i == bound_size() (overflow)    bound[i-1]     +inf
2329                  3.14,
2330                ],
2331              },
2332              "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is
2333                  # zero then this field must be zero.
2334            },
2335            "stringValue": "A String", # A text string value.
2336            "int64Value": "A String", # A signed 64-bit integer value.
2337            "endTime": "A String", # The end of the time period over which this metric value's measurement
2338                # applies.
2339          },
2340        ],
2341        "metricName": "A String", # The metric name defined in the service configuration.
2342      },
2343    ],
2344    "reconciliationErrors": [ # Indicates the decision of the reconciliation start.
2345      {
2346        "code": "A String", # Error code.
2347        "description": "A String", # Free-form text that provides details on the cause of the error.
2348        "subject": "A String", # Subject to whom this error applies. See the specific enum for more details
2349            # on this field. For example, "clientip:<ip address of client>" or
2350            # "project:<Google developer project id>".
2351      },
2352    ],
2353    "operationId": "A String", # The same operation_id value used in the StartReconciliationRequest. Used
2354        # for logging and diagnostics purposes.
2355  }</pre>
2356</div>
2357
2358</body></html>