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 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 75 | <h1><a href="servicecontrol_v1.html">Service Control API</a> . <a href="servicecontrol_v1.services.html">services</a></h1> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 78 | <code><a href="#allocateQuota">allocateQuota(serviceName, body, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 79 | <p class="firstline">Attempts to allocate quota for the specified consumer. It should be called</p> |
| 80 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 81 | <code><a href="#check">check(serviceName, body, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 82 | <p class="firstline">Checks whether an operation on a service should be allowed to proceed</p> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 83 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 84 | <code><a href="#report">report(serviceName, body, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 85 | <p class="firstline">Reports operation results to Google Service Control, such as logs and</p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 86 | <h3>Method Details</h3> |
| 87 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 88 | <code class="details" id="allocateQuota">allocateQuota(serviceName, body, x__xgafv=None)</code> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 89 | <pre>Attempts to allocate quota for the specified consumer. It should be called |
| 90 | before the operation is executed. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 91 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 92 | This method requires the `servicemanagement.services.quota` |
| 93 | permission on the specified service. For more information, see |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 94 | [Cloud IAM](https://cloud.google.com/iam). |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 95 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 96 | **NOTE:** The client **must** fail-open on server errors `INTERNAL`, |
| 97 | `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system |
| 98 | reliability, the server may inject these errors to prohibit any hard |
| 99 | dependency on the quota functionality. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 100 | |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 101 | Args: |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 102 | 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] | 103 | `"pubsub.googleapis.com"`. |
| 104 | |
| 105 | See google.api.Service for the definition of a service name. (required) |
| 106 | body: object, The request body. (required) |
| 107 | The object takes the form of: |
| 108 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 109 | { # Request message for the AllocateQuota method. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 110 | "serviceConfigId": "A String", # Specifies which version of service configuration should be used to process |
| 111 | # the request. If unspecified or no matching version can be found, the latest |
| 112 | # one will be used. |
| 113 | "allocateOperation": { # Represents information regarding a quota operation. # Operation that describes the quota allocation. |
| 114 | "quotaMetrics": [ # Represents information about this operation. Each MetricValueSet |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 115 | # corresponds to a metric defined in the service configuration. |
| 116 | # The data type used in the MetricValueSet must agree with |
| 117 | # the data type specified in the metric definition. |
| 118 | # |
| 119 | # Within a single operation, it is not allowed to have more than one |
| 120 | # MetricValue instances that have the same metric names and identical |
| 121 | # label value combinations. If a request has such duplicated MetricValue |
| 122 | # instances, the entire request is rejected with |
| 123 | # an invalid argument error. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 124 | # |
| 125 | # This field is mutually exclusive with method_name. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 126 | { # Represents a set of metric values in the same metric. |
| 127 | # Each metric value in the set should have a unique combination of start time, |
| 128 | # end time, and label values. |
| 129 | "metricValues": [ # The values in this metric. |
| 130 | { # Represents a single metric value. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 131 | "moneyValue": { # Represents an amount of money with its currency type. # A money value. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 132 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 133 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 134 | # If `units` is positive, `nanos` must be positive or zero. |
| 135 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 136 | # If `units` is negative, `nanos` must be negative or zero. |
| 137 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 138 | "units": "A String", # The whole units of the amount. |
| 139 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 140 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 141 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 142 | "labels": { # The labels describing the metric value. |
| 143 | # See comments on google.api.servicecontrol.v1.Operation.labels for |
| 144 | # the overriding relationship. |
| 145 | "a_key": "A String", |
| 146 | }, |
| 147 | "doubleValue": 3.14, # A double precision floating point value. |
| 148 | "boolValue": True or False, # A boolean value. |
| 149 | "startTime": "A String", # The start of the time period over which this metric value's measurement |
| 150 | # applies. The time period has different semantics for different metric |
| 151 | # types (cumulative, delta, and gauge). See the metric definition |
| 152 | # documentation in the service configuration for details. |
| 153 | "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value. |
| 154 | # points. It contains the size of the population of sample points plus |
| 155 | # additional optional information: |
| 156 | # |
| 157 | # - the arithmetic mean of the samples |
| 158 | # - the minimum and maximum of the samples |
| 159 | # - the sum-squared-deviation of the samples, used to compute variance |
| 160 | # - a histogram of the values of the sample points |
| 161 | "count": "A String", # The total number of samples in the distribution. Must be >= 0. |
| 162 | "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are |
| 163 | # optional. If present, they must sum to the `count` value. |
| 164 | # |
| 165 | # The buckets are defined below in `bucket_option`. There are N buckets. |
| 166 | # `bucket_counts[0]` is the number of samples in the underflow bucket. |
| 167 | # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples |
| 168 | # in each of the finite buckets. And `bucket_counts[N] is the number |
| 169 | # of samples in the overflow bucket. See the comments of `bucket_option` |
| 170 | # below for more details. |
| 171 | # |
| 172 | # Any suffix of trailing zeros may be omitted. |
| 173 | "A String", |
| 174 | ], |
| 175 | "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width. |
| 176 | "scale": 3.14, # The i'th exponential bucket covers the interval |
| 177 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 178 | # where i ranges from 1 to num_finite_buckets inclusive. |
| 179 | # Must be > 0. |
| 180 | "growthFactor": 3.14, # The i'th exponential bucket covers the interval |
| 181 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 182 | # where i ranges from 1 to num_finite_buckets inclusive. |
| 183 | # Must be larger than 1.0. |
| 184 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 185 | # the total number of buckets is `num_finite_buckets` + 2. |
| 186 | # See comments on `bucket_options` for details. |
| 187 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 188 | "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 189 | "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero. |
| 190 | "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean: |
| 191 | # Sum[i=1..count]((x_i - mean)^2) |
| 192 | # where each x_i is a sample values. If `count` is zero then this field |
| 193 | # must be zero, otherwise validation of the request fails. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 194 | "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width. |
| 195 | "width": 3.14, # The i'th linear bucket covers the interval |
| 196 | # [offset + (i-1) * width, offset + i * width) |
| 197 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 198 | # Must be strictly positive. |
| 199 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 200 | # the total number of buckets is `num_finite_buckets` + 2. |
| 201 | # See comments on `bucket_options` for details. |
| 202 | "offset": 3.14, # The i'th linear bucket covers the interval |
| 203 | # [offset + (i-1) * width, offset + i * width) |
| 204 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 205 | }, |
| 206 | "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width. |
| 207 | "bounds": [ # 'bound' is a list of strictly increasing boundaries between |
| 208 | # buckets. Note that a list of length N-1 defines N buckets because |
| 209 | # of fenceposting. See comments on `bucket_options` for details. |
| 210 | # |
| 211 | # The i'th finite bucket covers the interval |
| 212 | # [bound[i-1], bound[i]) |
| 213 | # where i ranges from 1 to bound_size() - 1. Note that there are no |
| 214 | # finite buckets at all if 'bound' only contains a single element; in |
| 215 | # that special case the single bound defines the boundary between the |
| 216 | # underflow and overflow buckets. |
| 217 | # |
| 218 | # bucket number lower bound upper bound |
| 219 | # i == 0 (underflow) -inf bound[i] |
| 220 | # 0 < i < bound_size() bound[i-1] bound[i] |
| 221 | # i == bound_size() (overflow) bound[i-1] +inf |
| 222 | 3.14, |
| 223 | ], |
| 224 | }, |
| 225 | "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is |
| 226 | # zero then this field must be zero. |
| 227 | }, |
| 228 | "stringValue": "A String", # A text string value. |
| 229 | "int64Value": "A String", # A signed 64-bit integer value. |
| 230 | "endTime": "A String", # The end of the time period over which this metric value's measurement |
| 231 | # applies. |
| 232 | }, |
| 233 | ], |
| 234 | "metricName": "A String", # The metric name defined in the service configuration. |
| 235 | }, |
| 236 | ], |
| 237 | "methodName": "A String", # Fully qualified name of the API method for which this quota operation is |
| 238 | # requested. This name is used for matching quota rules or metric rules and |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 239 | # billing status rules defined in service configuration. |
| 240 | # |
| 241 | # This field should not be set if any of the following is true: |
| 242 | # (1) the quota operation is performed on non-API resources. |
| 243 | # (2) quota_metrics is set because the caller is doing quota override. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 244 | # |
| 245 | # Example of an RPC method name: |
| 246 | # google.example.library.v1.LibraryService.CreateShelf |
| 247 | "labels": { # Labels describing the operation. |
| 248 | "a_key": "A String", |
| 249 | }, |
| 250 | "quotaMode": "A String", # Quota mode for this operation. |
| 251 | "consumerId": "A String", # Identity of the consumer for whom this quota operation is being performed. |
| 252 | # |
| 253 | # This can be in one of the following formats: |
| 254 | # project:<project_id>, |
| 255 | # project_number:<project_number>, |
| 256 | # api_key:<api_key>. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 257 | "operationId": "A String", # Identity of the operation. This is expected to be unique within the scope |
| 258 | # of the service that generated the operation, and guarantees idempotency in |
| 259 | # case of retries. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 260 | # |
| 261 | # UUID version 4 is recommended, though not required. In scenarios where an |
| 262 | # operation is computed from existing information and an idempotent id is |
| 263 | # desirable for deduplication purpose, UUID version 5 is recommended. See |
| 264 | # RFC 4122 for details. |
| 265 | }, |
| 266 | } |
| 267 | |
| 268 | x__xgafv: string, V1 error format. |
| 269 | Allowed values |
| 270 | 1 - v1 error format |
| 271 | 2 - v2 error format |
| 272 | |
| 273 | Returns: |
| 274 | An object of the form: |
| 275 | |
| 276 | { # Response message for the AllocateQuota method. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 277 | "serviceConfigId": "A String", # ID of the actual config used to process the request. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 278 | "allocateErrors": [ # Indicates the decision of the allocate. |
| 279 | { # Represents error information for QuotaOperation. |
| 280 | "code": "A String", # Error code. |
| 281 | "description": "A String", # Free-form text that provides details on the cause of the error. |
| 282 | "subject": "A String", # Subject to whom this error applies. See the specific enum for more details |
| 283 | # on this field. For example, "clientip:<ip address of client>" or |
| 284 | # "project:<Google developer project id>". |
| 285 | }, |
| 286 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 287 | "quotaMetrics": [ # Quota metrics to indicate the result of allocation. Depending on the |
| 288 | # request, one or more of the following metrics will be included: |
| 289 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 290 | # 1. Per quota group or per quota metric incremental usage will be specified |
| 291 | # using the following delta metric : |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 292 | # "serviceruntime.googleapis.com/api/consumer/quota_used_count" |
| 293 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 294 | # 2. The quota limit reached condition will be specified using the following |
| 295 | # boolean metric : |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 296 | # "serviceruntime.googleapis.com/quota/exceeded" |
| 297 | { # Represents a set of metric values in the same metric. |
| 298 | # Each metric value in the set should have a unique combination of start time, |
| 299 | # end time, and label values. |
| 300 | "metricValues": [ # The values in this metric. |
| 301 | { # Represents a single metric value. |
| 302 | "moneyValue": { # Represents an amount of money with its currency type. # A money value. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 303 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 304 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 305 | # If `units` is positive, `nanos` must be positive or zero. |
| 306 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 307 | # If `units` is negative, `nanos` must be negative or zero. |
| 308 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 309 | "units": "A String", # The whole units of the amount. |
| 310 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 311 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 312 | }, |
| 313 | "labels": { # The labels describing the metric value. |
| 314 | # See comments on google.api.servicecontrol.v1.Operation.labels for |
| 315 | # the overriding relationship. |
| 316 | "a_key": "A String", |
| 317 | }, |
| 318 | "doubleValue": 3.14, # A double precision floating point value. |
| 319 | "boolValue": True or False, # A boolean value. |
| 320 | "startTime": "A String", # The start of the time period over which this metric value's measurement |
| 321 | # applies. The time period has different semantics for different metric |
| 322 | # types (cumulative, delta, and gauge). See the metric definition |
| 323 | # documentation in the service configuration for details. |
| 324 | "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value. |
| 325 | # points. It contains the size of the population of sample points plus |
| 326 | # additional optional information: |
| 327 | # |
| 328 | # - the arithmetic mean of the samples |
| 329 | # - the minimum and maximum of the samples |
| 330 | # - the sum-squared-deviation of the samples, used to compute variance |
| 331 | # - a histogram of the values of the sample points |
| 332 | "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] | 333 | "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are |
| 334 | # optional. If present, they must sum to the `count` value. |
| 335 | # |
| 336 | # The buckets are defined below in `bucket_option`. There are N buckets. |
| 337 | # `bucket_counts[0]` is the number of samples in the underflow bucket. |
| 338 | # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples |
| 339 | # in each of the finite buckets. And `bucket_counts[N] is the number |
| 340 | # of samples in the overflow bucket. See the comments of `bucket_option` |
| 341 | # below for more details. |
| 342 | # |
| 343 | # Any suffix of trailing zeros may be omitted. |
| 344 | "A String", |
| 345 | ], |
| 346 | "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width. |
| 347 | "scale": 3.14, # The i'th exponential bucket covers the interval |
| 348 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 349 | # where i ranges from 1 to num_finite_buckets inclusive. |
| 350 | # Must be > 0. |
| 351 | "growthFactor": 3.14, # The i'th exponential bucket covers the interval |
| 352 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 353 | # where i ranges from 1 to num_finite_buckets inclusive. |
| 354 | # Must be larger than 1.0. |
| 355 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 356 | # the total number of buckets is `num_finite_buckets` + 2. |
| 357 | # See comments on `bucket_options` for details. |
| 358 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 359 | "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 360 | "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero. |
| 361 | "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean: |
| 362 | # Sum[i=1..count]((x_i - mean)^2) |
| 363 | # where each x_i is a sample values. If `count` is zero then this field |
| 364 | # must be zero, otherwise validation of the request fails. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 365 | "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width. |
| 366 | "width": 3.14, # The i'th linear bucket covers the interval |
| 367 | # [offset + (i-1) * width, offset + i * width) |
| 368 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 369 | # Must be strictly positive. |
| 370 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 371 | # the total number of buckets is `num_finite_buckets` + 2. |
| 372 | # See comments on `bucket_options` for details. |
| 373 | "offset": 3.14, # The i'th linear bucket covers the interval |
| 374 | # [offset + (i-1) * width, offset + i * width) |
| 375 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 376 | }, |
| 377 | "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width. |
| 378 | "bounds": [ # 'bound' is a list of strictly increasing boundaries between |
| 379 | # buckets. Note that a list of length N-1 defines N buckets because |
| 380 | # of fenceposting. See comments on `bucket_options` for details. |
| 381 | # |
| 382 | # The i'th finite bucket covers the interval |
| 383 | # [bound[i-1], bound[i]) |
| 384 | # where i ranges from 1 to bound_size() - 1. Note that there are no |
| 385 | # finite buckets at all if 'bound' only contains a single element; in |
| 386 | # that special case the single bound defines the boundary between the |
| 387 | # underflow and overflow buckets. |
| 388 | # |
| 389 | # bucket number lower bound upper bound |
| 390 | # i == 0 (underflow) -inf bound[i] |
| 391 | # 0 < i < bound_size() bound[i-1] bound[i] |
| 392 | # i == bound_size() (overflow) bound[i-1] +inf |
| 393 | 3.14, |
| 394 | ], |
| 395 | }, |
| 396 | "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is |
| 397 | # zero then this field must be zero. |
| 398 | }, |
| 399 | "stringValue": "A String", # A text string value. |
| 400 | "int64Value": "A String", # A signed 64-bit integer value. |
| 401 | "endTime": "A String", # The end of the time period over which this metric value's measurement |
| 402 | # applies. |
| 403 | }, |
| 404 | ], |
| 405 | "metricName": "A String", # The metric name defined in the service configuration. |
| 406 | }, |
| 407 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 408 | "allocateInfo": { # WARNING: DO NOT use this field until this warning message is removed. |
| 409 | "unusedArguments": [ # A list of label keys that were unused by the server in processing the |
| 410 | # request. Thus, for similar requests repeated in a certain future time |
| 411 | # window, the caller can choose to ignore these labels in the requests |
| 412 | # to achieve better client-side cache hits and quota aggregation. |
| 413 | "A String", |
| 414 | ], |
| 415 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 416 | "operationId": "A String", # The same operation_id value used in the AllocateQuotaRequest. Used for |
| 417 | # logging and diagnostics purposes. |
| 418 | }</pre> |
| 419 | </div> |
| 420 | |
| 421 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 422 | <code class="details" id="check">check(serviceName, body, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 423 | <pre>Checks whether an operation on a service should be allowed to proceed |
| 424 | based on the configuration of the service and related policies. It must be |
| 425 | called before the operation is executed. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 426 | |
| 427 | If feasible, the client should cache the check results and reuse them for |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 428 | 60 seconds. In case of any server errors, the client should rely on the |
| 429 | cached results for much longer time to avoid outage. |
| 430 | WARNING: There is general 60s delay for the configuration and policy |
| 431 | propagation, therefore callers MUST NOT depend on the `Check` method having |
| 432 | the latest policy information. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 433 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 434 | NOTE: the CheckRequest has the size limit of 64KB. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 435 | |
| 436 | This method requires the `servicemanagement.services.check` permission |
| 437 | on the specified service. For more information, see |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 438 | [Cloud IAM](https://cloud.google.com/iam). |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 439 | |
| 440 | Args: |
| 441 | serviceName: string, The service name as specified in its service configuration. For example, |
| 442 | `"pubsub.googleapis.com"`. |
| 443 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 444 | See |
| 445 | [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) |
| 446 | for the definition of a service name. (required) |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 447 | body: object, The request body. (required) |
| 448 | The object takes the form of: |
| 449 | |
| 450 | { # Request message for the Check method. |
| 451 | "skipActivationCheck": True or False, # Indicates if service activation check should be skipped for this request. |
| 452 | # Default behavior is to perform the check and apply relevant quota. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 453 | # WARNING: Setting this flag to "true" will disable quota enforcement. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 454 | "serviceConfigId": "A String", # Specifies which version of service configuration should be used to process |
| 455 | # the request. |
| 456 | # |
| 457 | # If unspecified or no matching version can be found, the |
| 458 | # latest one will be used. |
| 459 | "operation": { # Represents information regarding an operation. # The operation to be checked. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 460 | "operationName": "A String", # Fully qualified name of the operation. Reserved for future use. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 461 | "metricValueSets": [ # Represents information about this operation. Each MetricValueSet |
| 462 | # corresponds to a metric defined in the service configuration. |
| 463 | # The data type used in the MetricValueSet must agree with |
| 464 | # the data type specified in the metric definition. |
| 465 | # |
| 466 | # Within a single operation, it is not allowed to have more than one |
| 467 | # MetricValue instances that have the same metric names and identical |
| 468 | # label value combinations. If a request has such duplicated MetricValue |
| 469 | # instances, the entire request is rejected with |
| 470 | # an invalid argument error. |
| 471 | { # Represents a set of metric values in the same metric. |
| 472 | # Each metric value in the set should have a unique combination of start time, |
| 473 | # end time, and label values. |
| 474 | "metricValues": [ # The values in this metric. |
| 475 | { # Represents a single metric value. |
| 476 | "moneyValue": { # Represents an amount of money with its currency type. # A money value. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 477 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 478 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 479 | # If `units` is positive, `nanos` must be positive or zero. |
| 480 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 481 | # If `units` is negative, `nanos` must be negative or zero. |
| 482 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 483 | "units": "A String", # The whole units of the amount. |
| 484 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 485 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 486 | }, |
| 487 | "labels": { # The labels describing the metric value. |
| 488 | # See comments on google.api.servicecontrol.v1.Operation.labels for |
| 489 | # the overriding relationship. |
| 490 | "a_key": "A String", |
| 491 | }, |
| 492 | "doubleValue": 3.14, # A double precision floating point value. |
| 493 | "boolValue": True or False, # A boolean value. |
| 494 | "startTime": "A String", # The start of the time period over which this metric value's measurement |
| 495 | # applies. The time period has different semantics for different metric |
| 496 | # types (cumulative, delta, and gauge). See the metric definition |
| 497 | # documentation in the service configuration for details. |
| 498 | "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value. |
| 499 | # points. It contains the size of the population of sample points plus |
| 500 | # additional optional information: |
| 501 | # |
| 502 | # - the arithmetic mean of the samples |
| 503 | # - the minimum and maximum of the samples |
| 504 | # - the sum-squared-deviation of the samples, used to compute variance |
| 505 | # - a histogram of the values of the sample points |
| 506 | "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] | 507 | "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are |
| 508 | # optional. If present, they must sum to the `count` value. |
| 509 | # |
| 510 | # The buckets are defined below in `bucket_option`. There are N buckets. |
| 511 | # `bucket_counts[0]` is the number of samples in the underflow bucket. |
| 512 | # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples |
| 513 | # in each of the finite buckets. And `bucket_counts[N] is the number |
| 514 | # of samples in the overflow bucket. See the comments of `bucket_option` |
| 515 | # below for more details. |
| 516 | # |
| 517 | # Any suffix of trailing zeros may be omitted. |
| 518 | "A String", |
| 519 | ], |
| 520 | "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width. |
| 521 | "scale": 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 > 0. |
| 525 | "growthFactor": 3.14, # The i'th exponential bucket covers the interval |
| 526 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 527 | # where i ranges from 1 to num_finite_buckets inclusive. |
| 528 | # Must be larger than 1.0. |
| 529 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 530 | # the total number of buckets is `num_finite_buckets` + 2. |
| 531 | # See comments on `bucket_options` for details. |
| 532 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 533 | "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 534 | "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero. |
| 535 | "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean: |
| 536 | # Sum[i=1..count]((x_i - mean)^2) |
| 537 | # where each x_i is a sample values. If `count` is zero then this field |
| 538 | # must be zero, otherwise validation of the request fails. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 539 | "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width. |
| 540 | "width": 3.14, # The i'th linear bucket covers the interval |
| 541 | # [offset + (i-1) * width, offset + i * width) |
| 542 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 543 | # Must be strictly positive. |
| 544 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 545 | # the total number of buckets is `num_finite_buckets` + 2. |
| 546 | # See comments on `bucket_options` for details. |
| 547 | "offset": 3.14, # The i'th linear bucket covers the interval |
| 548 | # [offset + (i-1) * width, offset + i * width) |
| 549 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 550 | }, |
| 551 | "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width. |
| 552 | "bounds": [ # 'bound' is a list of strictly increasing boundaries between |
| 553 | # buckets. Note that a list of length N-1 defines N buckets because |
| 554 | # of fenceposting. See comments on `bucket_options` for details. |
| 555 | # |
| 556 | # The i'th finite bucket covers the interval |
| 557 | # [bound[i-1], bound[i]) |
| 558 | # where i ranges from 1 to bound_size() - 1. Note that there are no |
| 559 | # finite buckets at all if 'bound' only contains a single element; in |
| 560 | # that special case the single bound defines the boundary between the |
| 561 | # underflow and overflow buckets. |
| 562 | # |
| 563 | # bucket number lower bound upper bound |
| 564 | # i == 0 (underflow) -inf bound[i] |
| 565 | # 0 < i < bound_size() bound[i-1] bound[i] |
| 566 | # i == bound_size() (overflow) bound[i-1] +inf |
| 567 | 3.14, |
| 568 | ], |
| 569 | }, |
| 570 | "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is |
| 571 | # zero then this field must be zero. |
| 572 | }, |
| 573 | "stringValue": "A String", # A text string value. |
| 574 | "int64Value": "A String", # A signed 64-bit integer value. |
| 575 | "endTime": "A String", # The end of the time period over which this metric value's measurement |
| 576 | # applies. |
| 577 | }, |
| 578 | ], |
| 579 | "metricName": "A String", # The metric name defined in the service configuration. |
| 580 | }, |
| 581 | ], |
Jon Wayne Parrott | 2512a0c | 2016-08-29 10:21:22 -0700 | [diff] [blame] | 582 | "importance": "A String", # DO NOT USE. This is an experimental field. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 583 | "labels": { # Labels describing the operation. Only the following labels are allowed: |
| 584 | # |
| 585 | # - Labels describing monitored resources as defined in |
| 586 | # the service configuration. |
| 587 | # - Default labels of metric values. When specified, labels defined in the |
| 588 | # metric value override these default. |
| 589 | # - The following labels defined by Google Cloud Platform: |
| 590 | # - `cloud.googleapis.com/location` describing the location where the |
| 591 | # operation happened, |
| 592 | # - `servicecontrol.googleapis.com/user_agent` describing the user agent |
| 593 | # of the API request, |
| 594 | # - `servicecontrol.googleapis.com/service_agent` describing the service |
| 595 | # used to handle the API request (e.g. ESP), |
| 596 | # - `servicecontrol.googleapis.com/platform` describing the platform |
| 597 | # where the API is served, such as App Engine, Compute Engine, or |
| 598 | # Kubernetes Engine. |
| 599 | "a_key": "A String", |
| 600 | }, |
| 601 | "quotaProperties": { # Represents the properties needed for quota operations. # Represents the properties needed for quota check. Applicable only if this |
| 602 | # operation is for a quota check request. If this is not specified, no quota |
| 603 | # check will be performed. |
| 604 | "quotaMode": "A String", # Quota mode for this operation. |
| 605 | }, |
| 606 | "resourceContainer": "A String", # DO NOT USE. This field is deprecated, use "resources" field instead. |
| 607 | # The resource name of the parent of a resource in the resource hierarchy. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 608 | # |
| 609 | # This can be in one of the following formats: |
| 610 | # - “projects/<project-id or project-number>” |
| 611 | # - “folders/<folder-id>” |
| 612 | # - “organizations/<organization-id>” |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 613 | "userLabels": { # User defined labels for the resource that this operation is associated |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 614 | # with. Only a combination of 1000 user labels per consumer project are |
| 615 | # allowed. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 616 | "a_key": "A String", |
| 617 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 618 | "logEntries": [ # Represents information to be logged. |
| 619 | { # An individual log entry. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 620 | "httpRequest": { # A common proto for logging HTTP requests. Only contains semantics # Optional. Information about the HTTP request associated with this |
| 621 | # log entry, if applicable. |
| 622 | # defined by the HTTP specification. Product-specific logging |
| 623 | # information MUST be defined in a separate message. |
| 624 | "status": 42, # The response code indicating the status of the response. |
| 625 | # Examples: 200, 404. |
| 626 | "cacheValidatedWithOriginServer": True or False, # Whether or not the response was validated with the origin server before |
| 627 | # being served from cache. This field is only meaningful if `cache_hit` is |
| 628 | # True. |
| 629 | "protocol": "A String", # Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" |
| 630 | "cacheHit": True or False, # Whether or not an entity was served from cache |
| 631 | # (with or without validation). |
| 632 | "cacheFillBytes": "A String", # The number of HTTP response bytes inserted into cache. Set only when a |
| 633 | # cache fill was attempted. |
| 634 | "requestUrl": "A String", # The scheme (http, https), the host name, the path, and the query |
| 635 | # portion of the URL that was requested. |
| 636 | # Example: `"http://example.com/some/info?color=red"`. |
| 637 | "serverIp": "A String", # The IP address (IPv4 or IPv6) of the origin server that the request was |
| 638 | # sent to. |
| 639 | "cacheLookup": True or False, # Whether or not a cache lookup was attempted. |
| 640 | "latency": "A String", # The request processing latency on the server, from the time the request was |
| 641 | # received until the response was sent. |
| 642 | "requestMethod": "A String", # The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. |
| 643 | "referer": "A String", # The referer URL of the request, as defined in |
| 644 | # [HTTP/1.1 Header Field |
| 645 | # Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). |
| 646 | "remoteIp": "A String", # The IP address (IPv4 or IPv6) of the client that issued the HTTP |
| 647 | # request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. |
| 648 | "userAgent": "A String", # The user agent sent by the client. Example: |
| 649 | # `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET |
| 650 | # CLR 1.0.3705)"`. |
| 651 | "requestSize": "A String", # The size of the HTTP request message in bytes, including the request |
| 652 | # headers and the request body. |
| 653 | "responseSize": "A String", # The size of the HTTP response message sent back to the client, in bytes, |
| 654 | # including the response headers and the response body. |
| 655 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 656 | "severity": "A String", # The severity of the log entry. The default value is |
| 657 | # `LogSeverity.DEFAULT`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 658 | "trace": "A String", # Optional. Resource name of the trace associated with the log entry, if any. |
| 659 | # If this field contains a relative resource name, you can assume the name is |
| 660 | # relative to `//tracing.googleapis.com`. Example: |
| 661 | # `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 662 | "textPayload": "A String", # The log entry payload, represented as a Unicode string (UTF-8). |
| 663 | "timestamp": "A String", # The time the event described by the log entry occurred. If |
| 664 | # omitted, defaults to operation start time. |
| 665 | "labels": { # A set of user-defined (key, value) data that provides additional |
| 666 | # information about the log entry. |
| 667 | "a_key": "A String", |
| 668 | }, |
| 669 | "structPayload": { # The log entry payload, represented as a structure that |
| 670 | # is expressed as a JSON object. |
| 671 | "a_key": "", # Properties of the object. |
| 672 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 673 | "protoPayload": { # The log entry payload, represented as a protocol buffer that is |
| 674 | # expressed as a JSON object. The only accepted type currently is |
| 675 | # AuditLog. |
| 676 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 677 | }, |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 678 | "insertId": "A String", # A unique ID for the log entry used for deduplication. If omitted, |
| 679 | # the implementation will generate one based on operation_id. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 680 | "operation": { # Additional information about a potentially long-running operation with which # Optional. Information about an operation associated with the log entry, if |
| 681 | # applicable. |
| 682 | # a log entry is associated. |
| 683 | "last": True or False, # Optional. Set this to True if this is the last log entry in the operation. |
| 684 | "id": "A String", # Optional. An arbitrary operation identifier. Log entries with the |
| 685 | # same identifier are assumed to be part of the same operation. |
| 686 | "producer": "A String", # Optional. An arbitrary producer identifier. The combination of |
| 687 | # `id` and `producer` must be globally unique. Examples for `producer`: |
| 688 | # `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. |
| 689 | "first": True or False, # Optional. Set this to True if this is the first log entry in the operation. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 690 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 691 | "name": "A String", # Required. The log to which this log entry belongs. Examples: `"syslog"`, |
| 692 | # `"book_log"`. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 693 | }, |
| 694 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 695 | "consumerId": "A String", # Identity of the consumer who is using the service. |
| 696 | # This field should be filled in for the operations initiated by a |
| 697 | # consumer, but not for service-initiated operations that are |
| 698 | # not related to a specific consumer. |
| 699 | # |
| 700 | # - This can be in one of the following formats: |
| 701 | # - project:PROJECT_ID, |
| 702 | # - project`_`number:PROJECT_NUMBER, |
| 703 | # - projects/PROJECT_ID or PROJECT_NUMBER, |
| 704 | # - folders/FOLDER_NUMBER, |
| 705 | # - organizations/ORGANIZATION_NUMBER, |
| 706 | # - api`_`key:API_KEY. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 707 | "startTime": "A String", # Required. Start time of the operation. |
| 708 | "endTime": "A String", # End time of the operation. |
| 709 | # Required when the operation is used in ServiceController.Report, |
| 710 | # but optional when the operation is used in ServiceController.Check. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 711 | "resources": [ # The resources that are involved in the operation. |
| 712 | # The maximum supported number of entries in this field is 100. |
| 713 | { # Describes a resource associated with this operation. |
| 714 | "resourceContainer": "A String", # The identifier of the parent of this resource instance. |
| 715 | # Must be in one of the following formats: |
| 716 | # - “projects/<project-id or project-number>” |
| 717 | # - “folders/<folder-id>” |
| 718 | # - “organizations/<organization-id>” |
| 719 | "resourceName": "A String", # Name of the resource. This is used for auditing purposes. |
| 720 | "resourceLocation": "A String", # The location of the resource. If not empty, the resource will be checked |
| 721 | # against location policy. The value must be a valid zone, region or |
| 722 | # multiregion. For example: "europe-west4" or "northamerica-northeast1-a" |
| 723 | }, |
| 724 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 725 | "operationId": "A String", # Identity of the operation. This must be unique within the scope of the |
| 726 | # service that generated the operation. If the service calls |
| 727 | # Check() and Report() on the same operation, the two calls should carry |
| 728 | # the same id. |
| 729 | # |
| 730 | # UUID version 4 is recommended, though not required. |
| 731 | # In scenarios where an operation is computed from existing information |
| 732 | # and an idempotent id is desirable for deduplication purpose, UUID version 5 |
| 733 | # is recommended. See RFC 4122 for details. |
| 734 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 735 | "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] | 736 | } |
| 737 | |
| 738 | x__xgafv: string, V1 error format. |
| 739 | Allowed values |
| 740 | 1 - v1 error format |
| 741 | 2 - v2 error format |
| 742 | |
| 743 | Returns: |
| 744 | An object of the form: |
| 745 | |
| 746 | { # Response message for the Check method. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 747 | "checkInfo": { # Contains additional information about the check operation. # Feedback data returned from the server during processing a Check request. |
| 748 | "unusedArguments": [ # A list of fields and label keys that are ignored by the server. |
| 749 | # The client doesn't need to send them for following requests to improve |
| 750 | # performance and allow better aggregation. |
| 751 | "A String", |
| 752 | ], |
| 753 | "consumerInfo": { # `ConsumerInfo` provides information about the consumer. # Consumer info of this check. |
| 754 | "consumerNumber": "A String", # The consumer identity number, can be Google cloud project number, folder |
| 755 | # number or organization number e.g. 1234567890. A value of 0 indicates no |
| 756 | # consumer number is found. |
| 757 | "type": "A String", # The type of the consumer which should have been defined in |
| 758 | # [Google Resource Manager](https://cloud.google.com/resource-manager/). |
| 759 | "projectNumber": "A String", # The Google cloud project number, e.g. 1234567890. A value of 0 indicates |
| 760 | # no project number is found. |
| 761 | # |
| 762 | # NOTE: This field is deprecated after Chemist support flexible consumer |
| 763 | # id. New code should not depend on this field anymore. |
| 764 | }, |
| 765 | }, |
| 766 | "checkErrors": [ # Indicate the decision of the check. |
| 767 | # |
| 768 | # If no check errors are present, the service should process the operation. |
| 769 | # Otherwise the service should use the list of errors to determine the |
| 770 | # appropriate action. |
| 771 | { # Defines the errors to be returned in |
| 772 | # google.api.servicecontrol.v1.CheckResponse.check_errors. |
| 773 | "status": { # The `Status` type defines a logical error model that is suitable for # Contains public information about the check error. If available, |
| 774 | # `status.code` will be non zero and client can propagate it out as public |
| 775 | # error. |
| 776 | # different programming environments, including REST APIs and RPC APIs. It is |
| 777 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 778 | # three pieces of data: error code, error message, and error details. |
| 779 | # |
| 780 | # You can find out more about this error model and how to work with it in the |
| 781 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 782 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 783 | # user-facing error message should be localized and sent in the |
| 784 | # google.rpc.Status.details field, or localized by the client. |
| 785 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 786 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 787 | # message types for APIs to use. |
| 788 | { |
| 789 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 790 | }, |
| 791 | ], |
| 792 | }, |
| 793 | "code": "A String", # The error code. |
| 794 | "detail": "A String", # Free-form text providing details on the error cause of the error. |
| 795 | "subject": "A String", # Subject to whom this error applies. See the specific code enum for more |
| 796 | # details on this field. For example: |
| 797 | # - “project:<project-id or project-number>” |
| 798 | # - “folder:<folder-id>” |
| 799 | # - “organization:<organization-id>” |
| 800 | }, |
| 801 | ], |
| 802 | "serviceRolloutId": "A String", # Unimplemented. The current service rollout id used to process the request. |
Jon Wayne Parrott | 2512a0c | 2016-08-29 10:21:22 -0700 | [diff] [blame] | 803 | "serviceConfigId": "A String", # The actual config id used to process the request. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 804 | "quotaInfo": { # Contains the quota information for a quota check response. # Quota information for the check request associated with this response. |
| 805 | "quotaMetrics": [ # Quota metrics to indicate the usage. Depending on the check request, one or |
| 806 | # more of the following metrics will be included: |
| 807 | # |
| 808 | # 1. For rate quota, per quota group or per quota metric incremental usage |
| 809 | # will be specified using the following delta metric: |
| 810 | # "serviceruntime.googleapis.com/api/consumer/quota_used_count" |
| 811 | # |
| 812 | # 2. For allocation quota, per quota metric total usage will be specified |
| 813 | # using the following gauge metric: |
| 814 | # "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" |
| 815 | # |
| 816 | # 3. For both rate quota and allocation quota, the quota limit reached |
| 817 | # condition will be specified using the following boolean metric: |
| 818 | # "serviceruntime.googleapis.com/quota/exceeded" |
| 819 | { # Represents a set of metric values in the same metric. |
| 820 | # Each metric value in the set should have a unique combination of start time, |
| 821 | # end time, and label values. |
| 822 | "metricValues": [ # The values in this metric. |
| 823 | { # Represents a single metric value. |
| 824 | "moneyValue": { # Represents an amount of money with its currency type. # A money value. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 825 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 826 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 827 | # If `units` is positive, `nanos` must be positive or zero. |
| 828 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 829 | # If `units` is negative, `nanos` must be negative or zero. |
| 830 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 831 | "units": "A String", # The whole units of the amount. |
| 832 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 833 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 834 | }, |
| 835 | "labels": { # The labels describing the metric value. |
| 836 | # See comments on google.api.servicecontrol.v1.Operation.labels for |
| 837 | # the overriding relationship. |
| 838 | "a_key": "A String", |
| 839 | }, |
| 840 | "doubleValue": 3.14, # A double precision floating point value. |
| 841 | "boolValue": True or False, # A boolean value. |
| 842 | "startTime": "A String", # The start of the time period over which this metric value's measurement |
| 843 | # applies. The time period has different semantics for different metric |
| 844 | # types (cumulative, delta, and gauge). See the metric definition |
| 845 | # documentation in the service configuration for details. |
| 846 | "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value. |
| 847 | # points. It contains the size of the population of sample points plus |
| 848 | # additional optional information: |
| 849 | # |
| 850 | # - the arithmetic mean of the samples |
| 851 | # - the minimum and maximum of the samples |
| 852 | # - the sum-squared-deviation of the samples, used to compute variance |
| 853 | # - a histogram of the values of the sample points |
| 854 | "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] | 855 | "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are |
| 856 | # optional. If present, they must sum to the `count` value. |
| 857 | # |
| 858 | # The buckets are defined below in `bucket_option`. There are N buckets. |
| 859 | # `bucket_counts[0]` is the number of samples in the underflow bucket. |
| 860 | # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples |
| 861 | # in each of the finite buckets. And `bucket_counts[N] is the number |
| 862 | # of samples in the overflow bucket. See the comments of `bucket_option` |
| 863 | # below for more details. |
| 864 | # |
| 865 | # Any suffix of trailing zeros may be omitted. |
| 866 | "A String", |
| 867 | ], |
| 868 | "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width. |
| 869 | "scale": 3.14, # The i'th exponential bucket covers the interval |
| 870 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 871 | # where i ranges from 1 to num_finite_buckets inclusive. |
| 872 | # Must be > 0. |
| 873 | "growthFactor": 3.14, # The i'th exponential bucket covers the interval |
| 874 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 875 | # where i ranges from 1 to num_finite_buckets inclusive. |
| 876 | # Must be larger than 1.0. |
| 877 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 878 | # the total number of buckets is `num_finite_buckets` + 2. |
| 879 | # See comments on `bucket_options` for details. |
| 880 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 881 | "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 882 | "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero. |
| 883 | "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean: |
| 884 | # Sum[i=1..count]((x_i - mean)^2) |
| 885 | # where each x_i is a sample values. If `count` is zero then this field |
| 886 | # must be zero, otherwise validation of the request fails. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 887 | "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width. |
| 888 | "width": 3.14, # The i'th linear bucket covers the interval |
| 889 | # [offset + (i-1) * width, offset + i * width) |
| 890 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 891 | # Must be strictly positive. |
| 892 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 893 | # the total number of buckets is `num_finite_buckets` + 2. |
| 894 | # See comments on `bucket_options` for details. |
| 895 | "offset": 3.14, # The i'th linear bucket covers the interval |
| 896 | # [offset + (i-1) * width, offset + i * width) |
| 897 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 898 | }, |
| 899 | "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width. |
| 900 | "bounds": [ # 'bound' is a list of strictly increasing boundaries between |
| 901 | # buckets. Note that a list of length N-1 defines N buckets because |
| 902 | # of fenceposting. See comments on `bucket_options` for details. |
| 903 | # |
| 904 | # The i'th finite bucket covers the interval |
| 905 | # [bound[i-1], bound[i]) |
| 906 | # where i ranges from 1 to bound_size() - 1. Note that there are no |
| 907 | # finite buckets at all if 'bound' only contains a single element; in |
| 908 | # that special case the single bound defines the boundary between the |
| 909 | # underflow and overflow buckets. |
| 910 | # |
| 911 | # bucket number lower bound upper bound |
| 912 | # i == 0 (underflow) -inf bound[i] |
| 913 | # 0 < i < bound_size() bound[i-1] bound[i] |
| 914 | # i == bound_size() (overflow) bound[i-1] +inf |
| 915 | 3.14, |
| 916 | ], |
| 917 | }, |
| 918 | "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is |
| 919 | # zero then this field must be zero. |
| 920 | }, |
| 921 | "stringValue": "A String", # A text string value. |
| 922 | "int64Value": "A String", # A signed 64-bit integer value. |
| 923 | "endTime": "A String", # The end of the time period over which this metric value's measurement |
| 924 | # applies. |
| 925 | }, |
| 926 | ], |
| 927 | "metricName": "A String", # The metric name defined in the service configuration. |
| 928 | }, |
| 929 | ], |
| 930 | "limitExceeded": [ # Quota Metrics that have exceeded quota limits. |
| 931 | # For QuotaGroup-based quota, this is QuotaGroup.name |
| 932 | # For QuotaLimit-based quota, this is QuotaLimit.name |
| 933 | # See: google.api.Quota |
| 934 | # Deprecated: Use quota_metrics to get per quota group limit exceeded status. |
| 935 | "A String", |
| 936 | ], |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 937 | "quotaConsumed": { # Map of quota group name to the actual number of tokens consumed. If the |
| 938 | # quota check was not successful, then this will not be populated due to no |
| 939 | # quota consumption. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 940 | # |
| 941 | # We are not merging this field with 'quota_metrics' field because of the |
| 942 | # complexity of scaling in Chemist client code base. For simplicity, we will |
| 943 | # keep this field for Castor (that scales quota usage) and 'quota_metrics' |
| 944 | # for SuperQuota (that doesn't scale quota usage). |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 945 | "a_key": 42, |
| 946 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 947 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 948 | "operationId": "A String", # The same operation_id value used in the CheckRequest. |
| 949 | # Used for logging and diagnostics purposes. |
| 950 | }</pre> |
| 951 | </div> |
| 952 | |
| 953 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 954 | <code class="details" id="report">report(serviceName, body, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 955 | <pre>Reports operation results to Google Service Control, such as logs and |
| 956 | metrics. It should be called after an operation is completed. |
| 957 | |
| 958 | If feasible, the client should aggregate reporting data for up to 5 |
| 959 | seconds to reduce API traffic. Limiting aggregation to 5 seconds is to |
| 960 | reduce data loss during client crashes. Clients should carefully choose |
| 961 | the aggregation time window to avoid data loss risk more than 0.01% |
| 962 | for business and compliance reasons. |
| 963 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 964 | NOTE: the ReportRequest has the size limit of 1MB. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 965 | |
| 966 | This method requires the `servicemanagement.services.report` permission |
| 967 | on the specified service. For more information, see |
| 968 | [Google Cloud IAM](https://cloud.google.com/iam). |
| 969 | |
| 970 | Args: |
| 971 | serviceName: string, The service name as specified in its service configuration. For example, |
| 972 | `"pubsub.googleapis.com"`. |
| 973 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 974 | See |
| 975 | [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) |
| 976 | for the definition of a service name. (required) |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 977 | body: object, The request body. (required) |
| 978 | The object takes the form of: |
| 979 | |
| 980 | { # Request message for the Report method. |
| 981 | "operations": [ # Operations to be reported. |
| 982 | # |
| 983 | # Typically the service should report one operation per request. |
| 984 | # Putting multiple operations into a single request is allowed, but should |
| 985 | # be used only when multiple operations are natually available at the time |
| 986 | # of the report. |
| 987 | # |
| 988 | # If multiple operations are in a single request, the total request size |
| 989 | # should be no larger than 1MB. See ReportResponse.report_errors for |
| 990 | # partial failure behavior. |
| 991 | { # Represents information regarding an operation. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 992 | "operationName": "A String", # Fully qualified name of the operation. Reserved for future use. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 993 | "metricValueSets": [ # Represents information about this operation. Each MetricValueSet |
| 994 | # corresponds to a metric defined in the service configuration. |
| 995 | # The data type used in the MetricValueSet must agree with |
| 996 | # the data type specified in the metric definition. |
| 997 | # |
| 998 | # Within a single operation, it is not allowed to have more than one |
| 999 | # MetricValue instances that have the same metric names and identical |
| 1000 | # label value combinations. If a request has such duplicated MetricValue |
| 1001 | # instances, the entire request is rejected with |
| 1002 | # an invalid argument error. |
| 1003 | { # Represents a set of metric values in the same metric. |
| 1004 | # Each metric value in the set should have a unique combination of start time, |
| 1005 | # end time, and label values. |
| 1006 | "metricValues": [ # The values in this metric. |
| 1007 | { # Represents a single metric value. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1008 | "moneyValue": { # Represents an amount of money with its currency type. # A money value. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1009 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 1010 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 1011 | # If `units` is positive, `nanos` must be positive or zero. |
| 1012 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 1013 | # If `units` is negative, `nanos` must be negative or zero. |
| 1014 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1015 | "units": "A String", # The whole units of the amount. |
| 1016 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1017 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 1018 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1019 | "labels": { # The labels describing the metric value. |
| 1020 | # See comments on google.api.servicecontrol.v1.Operation.labels for |
| 1021 | # the overriding relationship. |
| 1022 | "a_key": "A String", |
| 1023 | }, |
| 1024 | "doubleValue": 3.14, # A double precision floating point value. |
| 1025 | "boolValue": True or False, # A boolean value. |
| 1026 | "startTime": "A String", # The start of the time period over which this metric value's measurement |
| 1027 | # applies. The time period has different semantics for different metric |
| 1028 | # types (cumulative, delta, and gauge). See the metric definition |
| 1029 | # documentation in the service configuration for details. |
| 1030 | "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value. |
| 1031 | # points. It contains the size of the population of sample points plus |
| 1032 | # additional optional information: |
| 1033 | # |
| 1034 | # - the arithmetic mean of the samples |
| 1035 | # - the minimum and maximum of the samples |
| 1036 | # - the sum-squared-deviation of the samples, used to compute variance |
| 1037 | # - a histogram of the values of the sample points |
| 1038 | "count": "A String", # The total number of samples in the distribution. Must be >= 0. |
| 1039 | "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are |
| 1040 | # optional. If present, they must sum to the `count` value. |
| 1041 | # |
| 1042 | # The buckets are defined below in `bucket_option`. There are N buckets. |
| 1043 | # `bucket_counts[0]` is the number of samples in the underflow bucket. |
| 1044 | # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples |
| 1045 | # in each of the finite buckets. And `bucket_counts[N] is the number |
| 1046 | # of samples in the overflow bucket. See the comments of `bucket_option` |
| 1047 | # below for more details. |
| 1048 | # |
| 1049 | # Any suffix of trailing zeros may be omitted. |
| 1050 | "A String", |
| 1051 | ], |
| 1052 | "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width. |
| 1053 | "scale": 3.14, # The i'th exponential bucket covers the interval |
| 1054 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 1055 | # where i ranges from 1 to num_finite_buckets inclusive. |
| 1056 | # Must be > 0. |
| 1057 | "growthFactor": 3.14, # The i'th exponential bucket covers the interval |
| 1058 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 1059 | # where i ranges from 1 to num_finite_buckets inclusive. |
| 1060 | # Must be larger than 1.0. |
| 1061 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 1062 | # the total number of buckets is `num_finite_buckets` + 2. |
| 1063 | # See comments on `bucket_options` for details. |
| 1064 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1065 | "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1066 | "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero. |
| 1067 | "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean: |
| 1068 | # Sum[i=1..count]((x_i - mean)^2) |
| 1069 | # where each x_i is a sample values. If `count` is zero then this field |
| 1070 | # must be zero, otherwise validation of the request fails. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1071 | "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width. |
| 1072 | "width": 3.14, # The i'th linear bucket covers the interval |
| 1073 | # [offset + (i-1) * width, offset + i * width) |
| 1074 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 1075 | # Must be strictly positive. |
| 1076 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 1077 | # the total number of buckets is `num_finite_buckets` + 2. |
| 1078 | # See comments on `bucket_options` for details. |
| 1079 | "offset": 3.14, # The i'th linear bucket covers the interval |
| 1080 | # [offset + (i-1) * width, offset + i * width) |
| 1081 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 1082 | }, |
| 1083 | "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width. |
| 1084 | "bounds": [ # 'bound' is a list of strictly increasing boundaries between |
| 1085 | # buckets. Note that a list of length N-1 defines N buckets because |
| 1086 | # of fenceposting. See comments on `bucket_options` for details. |
| 1087 | # |
| 1088 | # The i'th finite bucket covers the interval |
| 1089 | # [bound[i-1], bound[i]) |
| 1090 | # where i ranges from 1 to bound_size() - 1. Note that there are no |
| 1091 | # finite buckets at all if 'bound' only contains a single element; in |
| 1092 | # that special case the single bound defines the boundary between the |
| 1093 | # underflow and overflow buckets. |
| 1094 | # |
| 1095 | # bucket number lower bound upper bound |
| 1096 | # i == 0 (underflow) -inf bound[i] |
| 1097 | # 0 < i < bound_size() bound[i-1] bound[i] |
| 1098 | # i == bound_size() (overflow) bound[i-1] +inf |
| 1099 | 3.14, |
| 1100 | ], |
| 1101 | }, |
| 1102 | "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is |
| 1103 | # zero then this field must be zero. |
| 1104 | }, |
| 1105 | "stringValue": "A String", # A text string value. |
| 1106 | "int64Value": "A String", # A signed 64-bit integer value. |
| 1107 | "endTime": "A String", # The end of the time period over which this metric value's measurement |
| 1108 | # applies. |
| 1109 | }, |
| 1110 | ], |
| 1111 | "metricName": "A String", # The metric name defined in the service configuration. |
| 1112 | }, |
| 1113 | ], |
Jon Wayne Parrott | 2512a0c | 2016-08-29 10:21:22 -0700 | [diff] [blame] | 1114 | "importance": "A String", # DO NOT USE. This is an experimental field. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1115 | "labels": { # Labels describing the operation. Only the following labels are allowed: |
| 1116 | # |
| 1117 | # - Labels describing monitored resources as defined in |
| 1118 | # the service configuration. |
| 1119 | # - Default labels of metric values. When specified, labels defined in the |
| 1120 | # metric value override these default. |
| 1121 | # - The following labels defined by Google Cloud Platform: |
| 1122 | # - `cloud.googleapis.com/location` describing the location where the |
| 1123 | # operation happened, |
| 1124 | # - `servicecontrol.googleapis.com/user_agent` describing the user agent |
| 1125 | # of the API request, |
| 1126 | # - `servicecontrol.googleapis.com/service_agent` describing the service |
| 1127 | # used to handle the API request (e.g. ESP), |
| 1128 | # - `servicecontrol.googleapis.com/platform` describing the platform |
| 1129 | # where the API is served, such as App Engine, Compute Engine, or |
| 1130 | # Kubernetes Engine. |
| 1131 | "a_key": "A String", |
| 1132 | }, |
| 1133 | "quotaProperties": { # Represents the properties needed for quota operations. # Represents the properties needed for quota check. Applicable only if this |
| 1134 | # operation is for a quota check request. If this is not specified, no quota |
| 1135 | # check will be performed. |
| 1136 | "quotaMode": "A String", # Quota mode for this operation. |
| 1137 | }, |
| 1138 | "resourceContainer": "A String", # DO NOT USE. This field is deprecated, use "resources" field instead. |
| 1139 | # The resource name of the parent of a resource in the resource hierarchy. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 1140 | # |
| 1141 | # This can be in one of the following formats: |
| 1142 | # - “projects/<project-id or project-number>” |
| 1143 | # - “folders/<folder-id>” |
| 1144 | # - “organizations/<organization-id>” |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1145 | "userLabels": { # User defined labels for the resource that this operation is associated |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1146 | # with. Only a combination of 1000 user labels per consumer project are |
| 1147 | # allowed. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1148 | "a_key": "A String", |
| 1149 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1150 | "logEntries": [ # Represents information to be logged. |
| 1151 | { # An individual log entry. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1152 | "httpRequest": { # A common proto for logging HTTP requests. Only contains semantics # Optional. Information about the HTTP request associated with this |
| 1153 | # log entry, if applicable. |
| 1154 | # defined by the HTTP specification. Product-specific logging |
| 1155 | # information MUST be defined in a separate message. |
| 1156 | "status": 42, # The response code indicating the status of the response. |
| 1157 | # Examples: 200, 404. |
| 1158 | "cacheValidatedWithOriginServer": True or False, # Whether or not the response was validated with the origin server before |
| 1159 | # being served from cache. This field is only meaningful if `cache_hit` is |
| 1160 | # True. |
| 1161 | "protocol": "A String", # Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" |
| 1162 | "cacheHit": True or False, # Whether or not an entity was served from cache |
| 1163 | # (with or without validation). |
| 1164 | "cacheFillBytes": "A String", # The number of HTTP response bytes inserted into cache. Set only when a |
| 1165 | # cache fill was attempted. |
| 1166 | "requestUrl": "A String", # The scheme (http, https), the host name, the path, and the query |
| 1167 | # portion of the URL that was requested. |
| 1168 | # Example: `"http://example.com/some/info?color=red"`. |
| 1169 | "serverIp": "A String", # The IP address (IPv4 or IPv6) of the origin server that the request was |
| 1170 | # sent to. |
| 1171 | "cacheLookup": True or False, # Whether or not a cache lookup was attempted. |
| 1172 | "latency": "A String", # The request processing latency on the server, from the time the request was |
| 1173 | # received until the response was sent. |
| 1174 | "requestMethod": "A String", # The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. |
| 1175 | "referer": "A String", # The referer URL of the request, as defined in |
| 1176 | # [HTTP/1.1 Header Field |
| 1177 | # Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). |
| 1178 | "remoteIp": "A String", # The IP address (IPv4 or IPv6) of the client that issued the HTTP |
| 1179 | # request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. |
| 1180 | "userAgent": "A String", # The user agent sent by the client. Example: |
| 1181 | # `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET |
| 1182 | # CLR 1.0.3705)"`. |
| 1183 | "requestSize": "A String", # The size of the HTTP request message in bytes, including the request |
| 1184 | # headers and the request body. |
| 1185 | "responseSize": "A String", # The size of the HTTP response message sent back to the client, in bytes, |
| 1186 | # including the response headers and the response body. |
| 1187 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1188 | "severity": "A String", # The severity of the log entry. The default value is |
| 1189 | # `LogSeverity.DEFAULT`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1190 | "trace": "A String", # Optional. Resource name of the trace associated with the log entry, if any. |
| 1191 | # If this field contains a relative resource name, you can assume the name is |
| 1192 | # relative to `//tracing.googleapis.com`. Example: |
| 1193 | # `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1194 | "textPayload": "A String", # The log entry payload, represented as a Unicode string (UTF-8). |
| 1195 | "timestamp": "A String", # The time the event described by the log entry occurred. If |
| 1196 | # omitted, defaults to operation start time. |
| 1197 | "labels": { # A set of user-defined (key, value) data that provides additional |
| 1198 | # information about the log entry. |
| 1199 | "a_key": "A String", |
| 1200 | }, |
| 1201 | "structPayload": { # The log entry payload, represented as a structure that |
| 1202 | # is expressed as a JSON object. |
| 1203 | "a_key": "", # Properties of the object. |
| 1204 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1205 | "protoPayload": { # The log entry payload, represented as a protocol buffer that is |
| 1206 | # expressed as a JSON object. The only accepted type currently is |
| 1207 | # AuditLog. |
| 1208 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1209 | }, |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 1210 | "insertId": "A String", # A unique ID for the log entry used for deduplication. If omitted, |
| 1211 | # the implementation will generate one based on operation_id. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1212 | "operation": { # Additional information about a potentially long-running operation with which # Optional. Information about an operation associated with the log entry, if |
| 1213 | # applicable. |
| 1214 | # a log entry is associated. |
| 1215 | "last": True or False, # Optional. Set this to True if this is the last log entry in the operation. |
| 1216 | "id": "A String", # Optional. An arbitrary operation identifier. Log entries with the |
| 1217 | # same identifier are assumed to be part of the same operation. |
| 1218 | "producer": "A String", # Optional. An arbitrary producer identifier. The combination of |
| 1219 | # `id` and `producer` must be globally unique. Examples for `producer`: |
| 1220 | # `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. |
| 1221 | "first": True or False, # Optional. Set this to True if this is the first log entry in the operation. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1222 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1223 | "name": "A String", # Required. The log to which this log entry belongs. Examples: `"syslog"`, |
| 1224 | # `"book_log"`. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1225 | }, |
| 1226 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1227 | "consumerId": "A String", # Identity of the consumer who is using the service. |
| 1228 | # This field should be filled in for the operations initiated by a |
| 1229 | # consumer, but not for service-initiated operations that are |
| 1230 | # not related to a specific consumer. |
| 1231 | # |
| 1232 | # - This can be in one of the following formats: |
| 1233 | # - project:PROJECT_ID, |
| 1234 | # - project`_`number:PROJECT_NUMBER, |
| 1235 | # - projects/PROJECT_ID or PROJECT_NUMBER, |
| 1236 | # - folders/FOLDER_NUMBER, |
| 1237 | # - organizations/ORGANIZATION_NUMBER, |
| 1238 | # - api`_`key:API_KEY. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1239 | "startTime": "A String", # Required. Start time of the operation. |
| 1240 | "endTime": "A String", # End time of the operation. |
| 1241 | # Required when the operation is used in ServiceController.Report, |
| 1242 | # but optional when the operation is used in ServiceController.Check. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1243 | "resources": [ # The resources that are involved in the operation. |
| 1244 | # The maximum supported number of entries in this field is 100. |
| 1245 | { # Describes a resource associated with this operation. |
| 1246 | "resourceContainer": "A String", # The identifier of the parent of this resource instance. |
| 1247 | # Must be in one of the following formats: |
| 1248 | # - “projects/<project-id or project-number>” |
| 1249 | # - “folders/<folder-id>” |
| 1250 | # - “organizations/<organization-id>” |
| 1251 | "resourceName": "A String", # Name of the resource. This is used for auditing purposes. |
| 1252 | "resourceLocation": "A String", # The location of the resource. If not empty, the resource will be checked |
| 1253 | # against location policy. The value must be a valid zone, region or |
| 1254 | # multiregion. For example: "europe-west4" or "northamerica-northeast1-a" |
| 1255 | }, |
| 1256 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1257 | "operationId": "A String", # Identity of the operation. This must be unique within the scope of the |
| 1258 | # service that generated the operation. If the service calls |
| 1259 | # Check() and Report() on the same operation, the two calls should carry |
| 1260 | # the same id. |
| 1261 | # |
| 1262 | # UUID version 4 is recommended, though not required. |
| 1263 | # In scenarios where an operation is computed from existing information |
| 1264 | # and an idempotent id is desirable for deduplication purpose, UUID version 5 |
| 1265 | # is recommended. See RFC 4122 for details. |
| 1266 | }, |
| 1267 | ], |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1268 | "serviceConfigId": "A String", # Specifies which version of service config should be used to process the |
| 1269 | # request. |
| 1270 | # |
| 1271 | # If unspecified or no matching version can be found, the |
| 1272 | # latest one will be used. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1273 | } |
| 1274 | |
| 1275 | x__xgafv: string, V1 error format. |
| 1276 | Allowed values |
| 1277 | 1 - v1 error format |
| 1278 | 2 - v2 error format |
| 1279 | |
| 1280 | Returns: |
| 1281 | An object of the form: |
| 1282 | |
| 1283 | { # Response message for the Report method. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1284 | "reportErrors": [ # Partial failures, one for each `Operation` in the request that failed |
| 1285 | # processing. There are three possible combinations of the RPC status: |
| 1286 | # |
| 1287 | # 1. The combination of a successful RPC status and an empty `report_errors` |
| 1288 | # list indicates a complete success where all `Operations` in the |
| 1289 | # request are processed successfully. |
| 1290 | # 2. The combination of a successful RPC status and a non-empty |
| 1291 | # `report_errors` list indicates a partial success where some |
| 1292 | # `Operations` in the request succeeded. Each |
| 1293 | # `Operation` that failed processing has a corresponding item |
| 1294 | # in this list. |
| 1295 | # 3. A failed RPC status indicates a general non-deterministic failure. |
| 1296 | # When this happens, it's impossible to know which of the |
| 1297 | # 'Operations' in the request succeeded or failed. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1298 | { # Represents the processing error of one Operation in the request. |
| 1299 | "status": { # The `Status` type defines a logical error model that is suitable for # Details of the error when processing the Operation. |
| 1300 | # different programming environments, including REST APIs and RPC APIs. It is |
| 1301 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 1302 | # three pieces of data: error code, error message, and error details. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1303 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1304 | # You can find out more about this error model and how to work with it in the |
| 1305 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1306 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 1307 | # user-facing error message should be localized and sent in the |
| 1308 | # google.rpc.Status.details field, or localized by the client. |
| 1309 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1310 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 1311 | # message types for APIs to use. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1312 | { |
| 1313 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1314 | }, |
| 1315 | ], |
| 1316 | }, |
| 1317 | "operationId": "A String", # The Operation.operation_id value from the request. |
| 1318 | }, |
| 1319 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1320 | "reportInfos": [ # Quota usage for each quota release `Operation` request. |
| 1321 | # |
| 1322 | # Fully or partially failed quota release request may or may not be present |
| 1323 | # in `report_quota_info`. For example, a failed quota release request will |
| 1324 | # have the current quota usage info when precise quota library returns the |
| 1325 | # info. A deadline exceeded quota request will not have quota usage info. |
| 1326 | # |
| 1327 | # If there is no quota release request, report_quota_info will be empty. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1328 | { # Contains additional info about the report operation. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1329 | "quotaInfo": { # Contains the quota information for a quota check response. # Quota usage info when processing the `Operation`. |
| 1330 | "quotaMetrics": [ # Quota metrics to indicate the usage. Depending on the check request, one or |
| 1331 | # more of the following metrics will be included: |
| 1332 | # |
| 1333 | # 1. For rate quota, per quota group or per quota metric incremental usage |
| 1334 | # will be specified using the following delta metric: |
| 1335 | # "serviceruntime.googleapis.com/api/consumer/quota_used_count" |
| 1336 | # |
| 1337 | # 2. For allocation quota, per quota metric total usage will be specified |
| 1338 | # using the following gauge metric: |
| 1339 | # "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" |
| 1340 | # |
| 1341 | # 3. For both rate quota and allocation quota, the quota limit reached |
| 1342 | # condition will be specified using the following boolean metric: |
| 1343 | # "serviceruntime.googleapis.com/quota/exceeded" |
| 1344 | { # Represents a set of metric values in the same metric. |
| 1345 | # Each metric value in the set should have a unique combination of start time, |
| 1346 | # end time, and label values. |
| 1347 | "metricValues": [ # The values in this metric. |
| 1348 | { # Represents a single metric value. |
| 1349 | "moneyValue": { # Represents an amount of money with its currency type. # A money value. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1350 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 1351 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 1352 | # If `units` is positive, `nanos` must be positive or zero. |
| 1353 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 1354 | # If `units` is negative, `nanos` must be negative or zero. |
| 1355 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1356 | "units": "A String", # The whole units of the amount. |
| 1357 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1358 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 1359 | }, |
| 1360 | "labels": { # The labels describing the metric value. |
| 1361 | # See comments on google.api.servicecontrol.v1.Operation.labels for |
| 1362 | # the overriding relationship. |
| 1363 | "a_key": "A String", |
| 1364 | }, |
| 1365 | "doubleValue": 3.14, # A double precision floating point value. |
| 1366 | "boolValue": True or False, # A boolean value. |
| 1367 | "startTime": "A String", # The start of the time period over which this metric value's measurement |
| 1368 | # applies. The time period has different semantics for different metric |
| 1369 | # types (cumulative, delta, and gauge). See the metric definition |
| 1370 | # documentation in the service configuration for details. |
| 1371 | "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value. |
| 1372 | # points. It contains the size of the population of sample points plus |
| 1373 | # additional optional information: |
| 1374 | # |
| 1375 | # - the arithmetic mean of the samples |
| 1376 | # - the minimum and maximum of the samples |
| 1377 | # - the sum-squared-deviation of the samples, used to compute variance |
| 1378 | # - a histogram of the values of the sample points |
| 1379 | "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] | 1380 | "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are |
| 1381 | # optional. If present, they must sum to the `count` value. |
| 1382 | # |
| 1383 | # The buckets are defined below in `bucket_option`. There are N buckets. |
| 1384 | # `bucket_counts[0]` is the number of samples in the underflow bucket. |
| 1385 | # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples |
| 1386 | # in each of the finite buckets. And `bucket_counts[N] is the number |
| 1387 | # of samples in the overflow bucket. See the comments of `bucket_option` |
| 1388 | # below for more details. |
| 1389 | # |
| 1390 | # Any suffix of trailing zeros may be omitted. |
| 1391 | "A String", |
| 1392 | ], |
| 1393 | "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width. |
| 1394 | "scale": 3.14, # The i'th exponential bucket covers the interval |
| 1395 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 1396 | # where i ranges from 1 to num_finite_buckets inclusive. |
| 1397 | # Must be > 0. |
| 1398 | "growthFactor": 3.14, # The i'th exponential bucket covers the interval |
| 1399 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 1400 | # where i ranges from 1 to num_finite_buckets inclusive. |
| 1401 | # Must be larger than 1.0. |
| 1402 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 1403 | # the total number of buckets is `num_finite_buckets` + 2. |
| 1404 | # See comments on `bucket_options` for details. |
| 1405 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1406 | "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1407 | "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero. |
| 1408 | "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean: |
| 1409 | # Sum[i=1..count]((x_i - mean)^2) |
| 1410 | # where each x_i is a sample values. If `count` is zero then this field |
| 1411 | # must be zero, otherwise validation of the request fails. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1412 | "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width. |
| 1413 | "width": 3.14, # The i'th linear bucket covers the interval |
| 1414 | # [offset + (i-1) * width, offset + i * width) |
| 1415 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 1416 | # Must be strictly positive. |
| 1417 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 1418 | # the total number of buckets is `num_finite_buckets` + 2. |
| 1419 | # See comments on `bucket_options` for details. |
| 1420 | "offset": 3.14, # The i'th linear bucket covers the interval |
| 1421 | # [offset + (i-1) * width, offset + i * width) |
| 1422 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 1423 | }, |
| 1424 | "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width. |
| 1425 | "bounds": [ # 'bound' is a list of strictly increasing boundaries between |
| 1426 | # buckets. Note that a list of length N-1 defines N buckets because |
| 1427 | # of fenceposting. See comments on `bucket_options` for details. |
| 1428 | # |
| 1429 | # The i'th finite bucket covers the interval |
| 1430 | # [bound[i-1], bound[i]) |
| 1431 | # where i ranges from 1 to bound_size() - 1. Note that there are no |
| 1432 | # finite buckets at all if 'bound' only contains a single element; in |
| 1433 | # that special case the single bound defines the boundary between the |
| 1434 | # underflow and overflow buckets. |
| 1435 | # |
| 1436 | # bucket number lower bound upper bound |
| 1437 | # i == 0 (underflow) -inf bound[i] |
| 1438 | # 0 < i < bound_size() bound[i-1] bound[i] |
| 1439 | # i == bound_size() (overflow) bound[i-1] +inf |
| 1440 | 3.14, |
| 1441 | ], |
| 1442 | }, |
| 1443 | "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is |
| 1444 | # zero then this field must be zero. |
| 1445 | }, |
| 1446 | "stringValue": "A String", # A text string value. |
| 1447 | "int64Value": "A String", # A signed 64-bit integer value. |
| 1448 | "endTime": "A String", # The end of the time period over which this metric value's measurement |
| 1449 | # applies. |
| 1450 | }, |
| 1451 | ], |
| 1452 | "metricName": "A String", # The metric name defined in the service configuration. |
| 1453 | }, |
| 1454 | ], |
| 1455 | "limitExceeded": [ # Quota Metrics that have exceeded quota limits. |
| 1456 | # For QuotaGroup-based quota, this is QuotaGroup.name |
| 1457 | # For QuotaLimit-based quota, this is QuotaLimit.name |
| 1458 | # See: google.api.Quota |
| 1459 | # Deprecated: Use quota_metrics to get per quota group limit exceeded status. |
| 1460 | "A String", |
| 1461 | ], |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 1462 | "quotaConsumed": { # Map of quota group name to the actual number of tokens consumed. If the |
| 1463 | # quota check was not successful, then this will not be populated due to no |
| 1464 | # quota consumption. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1465 | # |
| 1466 | # We are not merging this field with 'quota_metrics' field because of the |
| 1467 | # complexity of scaling in Chemist client code base. For simplicity, we will |
| 1468 | # keep this field for Castor (that scales quota usage) and 'quota_metrics' |
| 1469 | # for SuperQuota (that doesn't scale quota usage). |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 1470 | "a_key": 42, |
| 1471 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1472 | }, |
| 1473 | "operationId": "A String", # The Operation.operation_id value from the request. |
| 1474 | }, |
| 1475 | ], |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1476 | "serviceConfigId": "A String", # The actual config id used to process the request. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 1477 | "serviceRolloutId": "A String", # Unimplemented. The current service rollout id used to process the request. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1478 | }</pre> |
| 1479 | </div> |
| 1480 | |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1481 | </body></html> |