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