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"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 78 | <code><a href="#allocateQuota">allocateQuota(serviceName, body=None, 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"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 81 | <code><a href="#check">check(serviceName, body=None, 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"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 84 | <code><a href="#report">report(serviceName, body=None, 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"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 88 | <code class="details" id="allocateQuota">allocateQuota(serviceName, body=None, 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) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 106 | body: object, The request body. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 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. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 145 | # Note that this map must not contain monitored resource labels. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 146 | "a_key": "A String", |
| 147 | }, |
| 148 | "doubleValue": 3.14, # A double precision floating point value. |
| 149 | "boolValue": True or False, # A boolean value. |
| 150 | "startTime": "A String", # The start of the time period over which this metric value's measurement |
| 151 | # applies. The time period has different semantics for different metric |
| 152 | # types (cumulative, delta, and gauge). See the metric definition |
| 153 | # documentation in the service configuration for details. |
| 154 | "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value. |
| 155 | # points. It contains the size of the population of sample points plus |
| 156 | # additional optional information: |
| 157 | # |
| 158 | # - the arithmetic mean of the samples |
| 159 | # - the minimum and maximum of the samples |
| 160 | # - the sum-squared-deviation of the samples, used to compute variance |
| 161 | # - a histogram of the values of the sample points |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 162 | "count": "A String", # The total number of samples in the distribution. Must be >= 0. |
| 163 | "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean: |
| 164 | # Sum[i=1..count]((x_i - mean)^2) |
| 165 | # where each x_i is a sample values. If `count` is zero then this field |
| 166 | # must be zero, otherwise validation of the request fails. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 167 | "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are |
| 168 | # optional. If present, they must sum to the `count` value. |
| 169 | # |
| 170 | # The buckets are defined below in `bucket_option`. There are N buckets. |
| 171 | # `bucket_counts[0]` is the number of samples in the underflow bucket. |
| 172 | # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples |
| 173 | # in each of the finite buckets. And `bucket_counts[N] is the number |
| 174 | # of samples in the overflow bucket. See the comments of `bucket_option` |
| 175 | # below for more details. |
| 176 | # |
| 177 | # Any suffix of trailing zeros may be omitted. |
| 178 | "A String", |
| 179 | ], |
| 180 | "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width. |
| 181 | "scale": 3.14, # The i'th exponential bucket covers the interval |
| 182 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 183 | # where i ranges from 1 to num_finite_buckets inclusive. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 184 | # Must be > 0. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 185 | "growthFactor": 3.14, # The i'th exponential bucket covers the interval |
| 186 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 187 | # where i ranges from 1 to num_finite_buckets inclusive. |
| 188 | # Must be larger than 1.0. |
| 189 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 190 | # the total number of buckets is `num_finite_buckets` + 2. |
| 191 | # See comments on `bucket_options` for details. |
| 192 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 193 | "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 194 | "exemplars": [ # Example points. Must be in increasing order of `value` field. |
| 195 | { # Exemplars are example points that may be used to annotate aggregated |
| 196 | # distribution values. They are metadata that gives information about a |
| 197 | # particular value added to a Distribution bucket, such as a trace ID that |
| 198 | # was active when a value was added. They may contain further information, |
| 199 | # such as a example values and timestamps, origin, etc. |
| 200 | "timestamp": "A String", # The observation (sampling) time of the above value. |
| 201 | "attachments": [ # Contextual information about the example value. Examples are: |
| 202 | # |
| 203 | # Trace: type.googleapis.com/google.monitoring.v3.SpanContext |
| 204 | # |
| 205 | # Literal string: type.googleapis.com/google.protobuf.StringValue |
| 206 | # |
| 207 | # Labels dropped during aggregation: |
| 208 | # type.googleapis.com/google.monitoring.v3.DroppedLabels |
| 209 | # |
| 210 | # There may be only a single attachment of any given message type in a |
| 211 | # single exemplar, and this is enforced by the system. |
| 212 | { |
| 213 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 214 | }, |
| 215 | ], |
| 216 | "value": 3.14, # Value of the exemplar point. This value determines to which bucket the |
| 217 | # exemplar belongs. |
| 218 | }, |
| 219 | ], |
| 220 | "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 221 | "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width. |
| 222 | "width": 3.14, # The i'th linear bucket covers the interval |
| 223 | # [offset + (i-1) * width, offset + i * width) |
| 224 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 225 | # Must be strictly positive. |
| 226 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 227 | # the total number of buckets is `num_finite_buckets` + 2. |
| 228 | # See comments on `bucket_options` for details. |
| 229 | "offset": 3.14, # The i'th linear bucket covers the interval |
| 230 | # [offset + (i-1) * width, offset + i * width) |
| 231 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 232 | }, |
| 233 | "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width. |
| 234 | "bounds": [ # 'bound' is a list of strictly increasing boundaries between |
| 235 | # buckets. Note that a list of length N-1 defines N buckets because |
| 236 | # of fenceposting. See comments on `bucket_options` for details. |
| 237 | # |
| 238 | # The i'th finite bucket covers the interval |
| 239 | # [bound[i-1], bound[i]) |
| 240 | # where i ranges from 1 to bound_size() - 1. Note that there are no |
| 241 | # finite buckets at all if 'bound' only contains a single element; in |
| 242 | # that special case the single bound defines the boundary between the |
| 243 | # underflow and overflow buckets. |
| 244 | # |
| 245 | # bucket number lower bound upper bound |
| 246 | # i == 0 (underflow) -inf bound[i] |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 247 | # 0 < i < bound_size() bound[i-1] bound[i] |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 248 | # i == bound_size() (overflow) bound[i-1] +inf |
| 249 | 3.14, |
| 250 | ], |
| 251 | }, |
| 252 | "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is |
| 253 | # zero then this field must be zero. |
| 254 | }, |
| 255 | "stringValue": "A String", # A text string value. |
| 256 | "int64Value": "A String", # A signed 64-bit integer value. |
| 257 | "endTime": "A String", # The end of the time period over which this metric value's measurement |
| 258 | # applies. |
| 259 | }, |
| 260 | ], |
| 261 | "metricName": "A String", # The metric name defined in the service configuration. |
| 262 | }, |
| 263 | ], |
| 264 | "methodName": "A String", # Fully qualified name of the API method for which this quota operation is |
| 265 | # 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] | 266 | # billing status rules defined in service configuration. |
| 267 | # |
| 268 | # This field should not be set if any of the following is true: |
| 269 | # (1) the quota operation is performed on non-API resources. |
| 270 | # (2) quota_metrics is set because the caller is doing quota override. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 271 | # |
| 272 | # Example of an RPC method name: |
| 273 | # google.example.library.v1.LibraryService.CreateShelf |
| 274 | "labels": { # Labels describing the operation. |
| 275 | "a_key": "A String", |
| 276 | }, |
| 277 | "quotaMode": "A String", # Quota mode for this operation. |
| 278 | "consumerId": "A String", # Identity of the consumer for whom this quota operation is being performed. |
| 279 | # |
| 280 | # This can be in one of the following formats: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 281 | # project:<project_id>, |
| 282 | # project_number:<project_number>, |
| 283 | # api_key:<api_key>. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 284 | "operationId": "A String", # Identity of the operation. This is expected to be unique within the scope |
| 285 | # of the service that generated the operation, and guarantees idempotency in |
| 286 | # case of retries. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 287 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 288 | # In order to ensure best performance and latency in the Quota backends, |
| 289 | # operation_ids are optimally associated with time, so that related |
| 290 | # operations can be accessed fast in storage. For this reason, the |
| 291 | # recommended token for services that intend to operate at a high QPS is |
| 292 | # Unix time in nanos + UUID |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 293 | }, |
| 294 | } |
| 295 | |
| 296 | x__xgafv: string, V1 error format. |
| 297 | Allowed values |
| 298 | 1 - v1 error format |
| 299 | 2 - v2 error format |
| 300 | |
| 301 | Returns: |
| 302 | An object of the form: |
| 303 | |
| 304 | { # Response message for the AllocateQuota method. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 305 | "allocateErrors": [ # Indicates the decision of the allocate. |
| 306 | { # Represents error information for QuotaOperation. |
| 307 | "code": "A String", # Error code. |
| 308 | "description": "A String", # Free-form text that provides details on the cause of the error. |
| 309 | "subject": "A String", # Subject to whom this error applies. See the specific enum for more details |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 310 | # on this field. For example, "clientip:<ip address of client>" or |
| 311 | # "project:<Google developer project id>". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 312 | }, |
| 313 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 314 | "serviceConfigId": "A String", # ID of the actual config used to process the request. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 315 | "quotaMetrics": [ # Quota metrics to indicate the result of allocation. Depending on the |
| 316 | # request, one or more of the following metrics will be included: |
| 317 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 318 | # 1. Per quota group or per quota metric incremental usage will be specified |
| 319 | # using the following delta metric : |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 320 | # "serviceruntime.googleapis.com/api/consumer/quota_used_count" |
| 321 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 322 | # 2. The quota limit reached condition will be specified using the following |
| 323 | # boolean metric : |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 324 | # "serviceruntime.googleapis.com/quota/exceeded" |
| 325 | { # Represents a set of metric values in the same metric. |
| 326 | # Each metric value in the set should have a unique combination of start time, |
| 327 | # end time, and label values. |
| 328 | "metricValues": [ # The values in this metric. |
| 329 | { # Represents a single metric value. |
| 330 | "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] | 331 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 332 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 333 | # If `units` is positive, `nanos` must be positive or zero. |
| 334 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 335 | # If `units` is negative, `nanos` must be negative or zero. |
| 336 | # 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] | 337 | "units": "A String", # The whole units of the amount. |
| 338 | # 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] | 339 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 340 | }, |
| 341 | "labels": { # The labels describing the metric value. |
| 342 | # See comments on google.api.servicecontrol.v1.Operation.labels for |
| 343 | # the overriding relationship. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 344 | # Note that this map must not contain monitored resource labels. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 345 | "a_key": "A String", |
| 346 | }, |
| 347 | "doubleValue": 3.14, # A double precision floating point value. |
| 348 | "boolValue": True or False, # A boolean value. |
| 349 | "startTime": "A String", # The start of the time period over which this metric value's measurement |
| 350 | # applies. The time period has different semantics for different metric |
| 351 | # types (cumulative, delta, and gauge). See the metric definition |
| 352 | # documentation in the service configuration for details. |
| 353 | "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value. |
| 354 | # points. It contains the size of the population of sample points plus |
| 355 | # additional optional information: |
| 356 | # |
| 357 | # - the arithmetic mean of the samples |
| 358 | # - the minimum and maximum of the samples |
| 359 | # - the sum-squared-deviation of the samples, used to compute variance |
| 360 | # - a histogram of the values of the sample points |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 361 | "count": "A String", # The total number of samples in the distribution. Must be >= 0. |
| 362 | "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean: |
| 363 | # Sum[i=1..count]((x_i - mean)^2) |
| 364 | # where each x_i is a sample values. If `count` is zero then this field |
| 365 | # must be zero, otherwise validation of the request fails. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 366 | "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are |
| 367 | # optional. If present, they must sum to the `count` value. |
| 368 | # |
| 369 | # The buckets are defined below in `bucket_option`. There are N buckets. |
| 370 | # `bucket_counts[0]` is the number of samples in the underflow bucket. |
| 371 | # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples |
| 372 | # in each of the finite buckets. And `bucket_counts[N] is the number |
| 373 | # of samples in the overflow bucket. See the comments of `bucket_option` |
| 374 | # below for more details. |
| 375 | # |
| 376 | # Any suffix of trailing zeros may be omitted. |
| 377 | "A String", |
| 378 | ], |
| 379 | "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width. |
| 380 | "scale": 3.14, # The i'th exponential bucket covers the interval |
| 381 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 382 | # where i ranges from 1 to num_finite_buckets inclusive. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 383 | # Must be > 0. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 384 | "growthFactor": 3.14, # The i'th exponential bucket covers the interval |
| 385 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 386 | # where i ranges from 1 to num_finite_buckets inclusive. |
| 387 | # Must be larger than 1.0. |
| 388 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 389 | # the total number of buckets is `num_finite_buckets` + 2. |
| 390 | # See comments on `bucket_options` for details. |
| 391 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 392 | "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 393 | "exemplars": [ # Example points. Must be in increasing order of `value` field. |
| 394 | { # Exemplars are example points that may be used to annotate aggregated |
| 395 | # distribution values. They are metadata that gives information about a |
| 396 | # particular value added to a Distribution bucket, such as a trace ID that |
| 397 | # was active when a value was added. They may contain further information, |
| 398 | # such as a example values and timestamps, origin, etc. |
| 399 | "timestamp": "A String", # The observation (sampling) time of the above value. |
| 400 | "attachments": [ # Contextual information about the example value. Examples are: |
| 401 | # |
| 402 | # Trace: type.googleapis.com/google.monitoring.v3.SpanContext |
| 403 | # |
| 404 | # Literal string: type.googleapis.com/google.protobuf.StringValue |
| 405 | # |
| 406 | # Labels dropped during aggregation: |
| 407 | # type.googleapis.com/google.monitoring.v3.DroppedLabels |
| 408 | # |
| 409 | # There may be only a single attachment of any given message type in a |
| 410 | # single exemplar, and this is enforced by the system. |
| 411 | { |
| 412 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 413 | }, |
| 414 | ], |
| 415 | "value": 3.14, # Value of the exemplar point. This value determines to which bucket the |
| 416 | # exemplar belongs. |
| 417 | }, |
| 418 | ], |
| 419 | "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 420 | "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width. |
| 421 | "width": 3.14, # The i'th linear bucket covers the interval |
| 422 | # [offset + (i-1) * width, offset + i * width) |
| 423 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 424 | # Must be strictly positive. |
| 425 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 426 | # the total number of buckets is `num_finite_buckets` + 2. |
| 427 | # See comments on `bucket_options` for details. |
| 428 | "offset": 3.14, # The i'th linear bucket covers the interval |
| 429 | # [offset + (i-1) * width, offset + i * width) |
| 430 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 431 | }, |
| 432 | "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width. |
| 433 | "bounds": [ # 'bound' is a list of strictly increasing boundaries between |
| 434 | # buckets. Note that a list of length N-1 defines N buckets because |
| 435 | # of fenceposting. See comments on `bucket_options` for details. |
| 436 | # |
| 437 | # The i'th finite bucket covers the interval |
| 438 | # [bound[i-1], bound[i]) |
| 439 | # where i ranges from 1 to bound_size() - 1. Note that there are no |
| 440 | # finite buckets at all if 'bound' only contains a single element; in |
| 441 | # that special case the single bound defines the boundary between the |
| 442 | # underflow and overflow buckets. |
| 443 | # |
| 444 | # bucket number lower bound upper bound |
| 445 | # i == 0 (underflow) -inf bound[i] |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 446 | # 0 < i < bound_size() bound[i-1] bound[i] |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 447 | # i == bound_size() (overflow) bound[i-1] +inf |
| 448 | 3.14, |
| 449 | ], |
| 450 | }, |
| 451 | "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is |
| 452 | # zero then this field must be zero. |
| 453 | }, |
| 454 | "stringValue": "A String", # A text string value. |
| 455 | "int64Value": "A String", # A signed 64-bit integer value. |
| 456 | "endTime": "A String", # The end of the time period over which this metric value's measurement |
| 457 | # applies. |
| 458 | }, |
| 459 | ], |
| 460 | "metricName": "A String", # The metric name defined in the service configuration. |
| 461 | }, |
| 462 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 463 | "allocateInfo": { # WARNING: DO NOT use this field until this warning message is removed. |
| 464 | "unusedArguments": [ # A list of label keys that were unused by the server in processing the |
| 465 | # request. Thus, for similar requests repeated in a certain future time |
| 466 | # window, the caller can choose to ignore these labels in the requests |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 467 | # to achieve better client-side cache hits and quota aggregation for rate |
| 468 | # quota. This field is not populated for allocation quota checks. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 469 | "A String", |
| 470 | ], |
| 471 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 472 | "operationId": "A String", # The same operation_id value used in the AllocateQuotaRequest. Used for |
| 473 | # logging and diagnostics purposes. |
| 474 | }</pre> |
| 475 | </div> |
| 476 | |
| 477 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 478 | <code class="details" id="check">check(serviceName, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 479 | <pre>Checks whether an operation on a service should be allowed to proceed |
| 480 | based on the configuration of the service and related policies. It must be |
| 481 | called before the operation is executed. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 482 | |
| 483 | 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] | 484 | 60 seconds. In case of any server errors, the client should rely on the |
| 485 | cached results for much longer time to avoid outage. |
| 486 | WARNING: There is general 60s delay for the configuration and policy |
| 487 | propagation, therefore callers MUST NOT depend on the `Check` method having |
| 488 | the latest policy information. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 489 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 490 | NOTE: the CheckRequest has the size limit of 64KB. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 491 | |
| 492 | This method requires the `servicemanagement.services.check` permission |
| 493 | on the specified service. For more information, see |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 494 | [Cloud IAM](https://cloud.google.com/iam). |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 495 | |
| 496 | Args: |
| 497 | serviceName: string, The service name as specified in its service configuration. For example, |
| 498 | `"pubsub.googleapis.com"`. |
| 499 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 500 | See |
| 501 | [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) |
| 502 | for the definition of a service name. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 503 | body: object, The request body. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 504 | The object takes the form of: |
| 505 | |
| 506 | { # Request message for the Check method. |
| 507 | "skipActivationCheck": True or False, # Indicates if service activation check should be skipped for this request. |
| 508 | # Default behavior is to perform the check and apply relevant quota. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 509 | # WARNING: Setting this flag to "true" will disable quota enforcement. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 510 | "operation": { # Represents information regarding an operation. # The operation to be checked. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 511 | "operationName": "A String", # Fully qualified name of the operation. Reserved for future use. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 512 | "traceSpans": [ # Unimplemented. A list of Cloud Trace spans. The span names shall contain |
| 513 | # the id of the destination project which can be either the produce or the |
| 514 | # consumer project. |
| 515 | { # A span represents a single operation within a trace. Spans can be |
| 516 | # nested to form a trace tree. Often, a trace contains a root span |
| 517 | # that describes the end-to-end latency, and one or more subspans for |
| 518 | # its sub-operations. A trace can also contain multiple root spans, |
| 519 | # or none at all. Spans do not need to be contiguous&mdash;there may be |
| 520 | # gaps or overlaps between spans in a trace. |
| 521 | "status": { # The `Status` type defines a logical error model that is suitable for # An optional final status for this span. |
| 522 | # different programming environments, including REST APIs and RPC APIs. It is |
| 523 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 524 | # three pieces of data: error code, error message, and error details. |
| 525 | # |
| 526 | # You can find out more about this error model and how to work with it in the |
| 527 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 528 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 529 | # user-facing error message should be localized and sent in the |
| 530 | # google.rpc.Status.details field, or localized by the client. |
| 531 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 532 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 533 | # message types for APIs to use. |
| 534 | { |
| 535 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 536 | }, |
| 537 | ], |
| 538 | }, |
| 539 | "childSpanCount": 42, # An optional number of child spans that were generated while this span |
| 540 | # was active. If set, allows implementation to detect missing child spans. |
| 541 | "displayName": { # Represents a string that might be shortened to a specified length. # A description of the span's operation (up to 128 bytes). |
| 542 | # Stackdriver Trace displays the description in the |
| 543 | # Google Cloud Platform Console. |
| 544 | # For example, the display name can be a qualified method name or a file name |
| 545 | # and a line number where the operation is called. A best practice is to use |
| 546 | # the same display name within an application and at the same call point. |
| 547 | # This makes it easier to correlate spans in different traces. |
| 548 | "value": "A String", # The shortened string. For example, if the original string is 500 |
| 549 | # bytes long and the limit of the string is 128 bytes, then |
| 550 | # `value` contains the first 128 bytes of the 500-byte string. |
| 551 | # |
| 552 | # Truncation always happens on a UTF8 character boundary. If there |
| 553 | # are multi-byte characters in the string, then the length of the |
| 554 | # shortened string might be less than the size limit. |
| 555 | "truncatedByteCount": 42, # The number of bytes removed from the original string. If this |
| 556 | # value is 0, then the string was not shortened. |
| 557 | }, |
| 558 | "name": "A String", # The resource name of the span in the following format: |
| 559 | # |
| 560 | # projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project; |
| 561 | # it is a 32-character hexadecimal encoding of a 16-byte array. |
| 562 | # |
| 563 | # [SPAN_ID] is a unique identifier for a span within a trace; it |
| 564 | # is a 16-character hexadecimal encoding of an 8-byte array. |
| 565 | "spanKind": "A String", # Distinguishes between spans generated in a particular context. For example, |
| 566 | # two spans with the same name may be distinguished using `CLIENT` (caller) |
| 567 | # and `SERVER` (callee) to identify an RPC call. |
| 568 | "parentSpanId": "A String", # The [SPAN_ID] of this span's parent span. If this is a root span, |
| 569 | # then this field must be empty. |
| 570 | "startTime": "A String", # The start time of the span. On the client side, this is the time kept by |
| 571 | # the local machine where the span execution starts. On the server side, this |
| 572 | # is the time when the server's application handler starts running. |
| 573 | "spanId": "A String", # The [SPAN_ID] portion of the span's resource name. |
| 574 | "attributes": { # A set of attributes, each in the format `[KEY]:[VALUE]`. # A set of attributes on the span. You can have up to 32 attributes per |
| 575 | # span. |
| 576 | "droppedAttributesCount": 42, # The number of attributes that were discarded. Attributes can be discarded |
| 577 | # because their keys are too long or because there are too many attributes. |
| 578 | # If this value is 0 then all attributes are valid. |
| 579 | "attributeMap": { # The set of attributes. Each attribute's key can be up to 128 bytes |
| 580 | # long. The value can be a string up to 256 bytes, a signed 64-bit integer, |
| 581 | # or the Boolean values `true` and `false`. For example: |
| 582 | # |
| 583 | # "/instance_id": "my-instance" |
| 584 | # "/http/user_agent": "" |
| 585 | # "/http/request_bytes": 300 |
| 586 | # "abc.com/myattribute": true |
| 587 | "a_key": { # The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute. |
| 588 | "stringValue": { # Represents a string that might be shortened to a specified length. # A string up to 256 bytes long. |
| 589 | "value": "A String", # The shortened string. For example, if the original string is 500 |
| 590 | # bytes long and the limit of the string is 128 bytes, then |
| 591 | # `value` contains the first 128 bytes of the 500-byte string. |
| 592 | # |
| 593 | # Truncation always happens on a UTF8 character boundary. If there |
| 594 | # are multi-byte characters in the string, then the length of the |
| 595 | # shortened string might be less than the size limit. |
| 596 | "truncatedByteCount": 42, # The number of bytes removed from the original string. If this |
| 597 | # value is 0, then the string was not shortened. |
| 598 | }, |
| 599 | "boolValue": True or False, # A Boolean value represented by `true` or `false`. |
| 600 | "intValue": "A String", # A 64-bit signed integer. |
| 601 | }, |
| 602 | }, |
| 603 | }, |
| 604 | "endTime": "A String", # The end time of the span. On the client side, this is the time kept by |
| 605 | # the local machine where the span execution ends. On the server side, this |
| 606 | # is the time when the server application handler stops running. |
| 607 | "sameProcessAsParentSpan": True or False, # (Optional) Set this parameter to indicate whether this span is in |
| 608 | # the same process as its parent. If you do not set this parameter, |
| 609 | # Stackdriver Trace is unable to take advantage of this helpful |
| 610 | # information. |
| 611 | }, |
| 612 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 613 | "metricValueSets": [ # Represents information about this operation. Each MetricValueSet |
| 614 | # corresponds to a metric defined in the service configuration. |
| 615 | # The data type used in the MetricValueSet must agree with |
| 616 | # the data type specified in the metric definition. |
| 617 | # |
| 618 | # Within a single operation, it is not allowed to have more than one |
| 619 | # MetricValue instances that have the same metric names and identical |
| 620 | # label value combinations. If a request has such duplicated MetricValue |
| 621 | # instances, the entire request is rejected with |
| 622 | # an invalid argument error. |
| 623 | { # Represents a set of metric values in the same metric. |
| 624 | # Each metric value in the set should have a unique combination of start time, |
| 625 | # end time, and label values. |
| 626 | "metricValues": [ # The values in this metric. |
| 627 | { # Represents a single metric value. |
| 628 | "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] | 629 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 630 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 631 | # If `units` is positive, `nanos` must be positive or zero. |
| 632 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 633 | # If `units` is negative, `nanos` must be negative or zero. |
| 634 | # 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] | 635 | "units": "A String", # The whole units of the amount. |
| 636 | # 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] | 637 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 638 | }, |
| 639 | "labels": { # The labels describing the metric value. |
| 640 | # See comments on google.api.servicecontrol.v1.Operation.labels for |
| 641 | # the overriding relationship. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 642 | # Note that this map must not contain monitored resource labels. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 643 | "a_key": "A String", |
| 644 | }, |
| 645 | "doubleValue": 3.14, # A double precision floating point value. |
| 646 | "boolValue": True or False, # A boolean value. |
| 647 | "startTime": "A String", # The start of the time period over which this metric value's measurement |
| 648 | # applies. The time period has different semantics for different metric |
| 649 | # types (cumulative, delta, and gauge). See the metric definition |
| 650 | # documentation in the service configuration for details. |
| 651 | "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value. |
| 652 | # points. It contains the size of the population of sample points plus |
| 653 | # additional optional information: |
| 654 | # |
| 655 | # - the arithmetic mean of the samples |
| 656 | # - the minimum and maximum of the samples |
| 657 | # - the sum-squared-deviation of the samples, used to compute variance |
| 658 | # - a histogram of the values of the sample points |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 659 | "count": "A String", # The total number of samples in the distribution. Must be >= 0. |
| 660 | "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean: |
| 661 | # Sum[i=1..count]((x_i - mean)^2) |
| 662 | # where each x_i is a sample values. If `count` is zero then this field |
| 663 | # must be zero, otherwise validation of the request fails. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 664 | "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are |
| 665 | # optional. If present, they must sum to the `count` value. |
| 666 | # |
| 667 | # The buckets are defined below in `bucket_option`. There are N buckets. |
| 668 | # `bucket_counts[0]` is the number of samples in the underflow bucket. |
| 669 | # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples |
| 670 | # in each of the finite buckets. And `bucket_counts[N] is the number |
| 671 | # of samples in the overflow bucket. See the comments of `bucket_option` |
| 672 | # below for more details. |
| 673 | # |
| 674 | # Any suffix of trailing zeros may be omitted. |
| 675 | "A String", |
| 676 | ], |
| 677 | "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width. |
| 678 | "scale": 3.14, # The i'th exponential bucket covers the interval |
| 679 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 680 | # where i ranges from 1 to num_finite_buckets inclusive. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 681 | # Must be > 0. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 682 | "growthFactor": 3.14, # The i'th exponential bucket covers the interval |
| 683 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 684 | # where i ranges from 1 to num_finite_buckets inclusive. |
| 685 | # Must be larger than 1.0. |
| 686 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 687 | # the total number of buckets is `num_finite_buckets` + 2. |
| 688 | # See comments on `bucket_options` for details. |
| 689 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 690 | "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 691 | "exemplars": [ # Example points. Must be in increasing order of `value` field. |
| 692 | { # Exemplars are example points that may be used to annotate aggregated |
| 693 | # distribution values. They are metadata that gives information about a |
| 694 | # particular value added to a Distribution bucket, such as a trace ID that |
| 695 | # was active when a value was added. They may contain further information, |
| 696 | # such as a example values and timestamps, origin, etc. |
| 697 | "timestamp": "A String", # The observation (sampling) time of the above value. |
| 698 | "attachments": [ # Contextual information about the example value. Examples are: |
| 699 | # |
| 700 | # Trace: type.googleapis.com/google.monitoring.v3.SpanContext |
| 701 | # |
| 702 | # Literal string: type.googleapis.com/google.protobuf.StringValue |
| 703 | # |
| 704 | # Labels dropped during aggregation: |
| 705 | # type.googleapis.com/google.monitoring.v3.DroppedLabels |
| 706 | # |
| 707 | # There may be only a single attachment of any given message type in a |
| 708 | # single exemplar, and this is enforced by the system. |
| 709 | { |
| 710 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 711 | }, |
| 712 | ], |
| 713 | "value": 3.14, # Value of the exemplar point. This value determines to which bucket the |
| 714 | # exemplar belongs. |
| 715 | }, |
| 716 | ], |
| 717 | "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 718 | "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width. |
| 719 | "width": 3.14, # The i'th linear bucket covers the interval |
| 720 | # [offset + (i-1) * width, offset + i * width) |
| 721 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 722 | # Must be strictly positive. |
| 723 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 724 | # the total number of buckets is `num_finite_buckets` + 2. |
| 725 | # See comments on `bucket_options` for details. |
| 726 | "offset": 3.14, # The i'th linear bucket covers the interval |
| 727 | # [offset + (i-1) * width, offset + i * width) |
| 728 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 729 | }, |
| 730 | "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width. |
| 731 | "bounds": [ # 'bound' is a list of strictly increasing boundaries between |
| 732 | # buckets. Note that a list of length N-1 defines N buckets because |
| 733 | # of fenceposting. See comments on `bucket_options` for details. |
| 734 | # |
| 735 | # The i'th finite bucket covers the interval |
| 736 | # [bound[i-1], bound[i]) |
| 737 | # where i ranges from 1 to bound_size() - 1. Note that there are no |
| 738 | # finite buckets at all if 'bound' only contains a single element; in |
| 739 | # that special case the single bound defines the boundary between the |
| 740 | # underflow and overflow buckets. |
| 741 | # |
| 742 | # bucket number lower bound upper bound |
| 743 | # i == 0 (underflow) -inf bound[i] |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 744 | # 0 < i < bound_size() bound[i-1] bound[i] |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 745 | # i == bound_size() (overflow) bound[i-1] +inf |
| 746 | 3.14, |
| 747 | ], |
| 748 | }, |
| 749 | "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is |
| 750 | # zero then this field must be zero. |
| 751 | }, |
| 752 | "stringValue": "A String", # A text string value. |
| 753 | "int64Value": "A String", # A signed 64-bit integer value. |
| 754 | "endTime": "A String", # The end of the time period over which this metric value's measurement |
| 755 | # applies. |
| 756 | }, |
| 757 | ], |
| 758 | "metricName": "A String", # The metric name defined in the service configuration. |
| 759 | }, |
| 760 | ], |
Jon Wayne Parrott | 2512a0c | 2016-08-29 10:21:22 -0700 | [diff] [blame] | 761 | "importance": "A String", # DO NOT USE. This is an experimental field. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 762 | "labels": { # Labels describing the operation. Only the following labels are allowed: |
| 763 | # |
| 764 | # - Labels describing monitored resources as defined in |
| 765 | # the service configuration. |
| 766 | # - Default labels of metric values. When specified, labels defined in the |
| 767 | # metric value override these default. |
| 768 | # - The following labels defined by Google Cloud Platform: |
| 769 | # - `cloud.googleapis.com/location` describing the location where the |
| 770 | # operation happened, |
| 771 | # - `servicecontrol.googleapis.com/user_agent` describing the user agent |
| 772 | # of the API request, |
| 773 | # - `servicecontrol.googleapis.com/service_agent` describing the service |
| 774 | # used to handle the API request (e.g. ESP), |
| 775 | # - `servicecontrol.googleapis.com/platform` describing the platform |
| 776 | # where the API is served, such as App Engine, Compute Engine, or |
| 777 | # Kubernetes Engine. |
| 778 | "a_key": "A String", |
| 779 | }, |
| 780 | "quotaProperties": { # Represents the properties needed for quota operations. # Represents the properties needed for quota check. Applicable only if this |
| 781 | # operation is for a quota check request. If this is not specified, no quota |
| 782 | # check will be performed. |
| 783 | "quotaMode": "A String", # Quota mode for this operation. |
| 784 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 785 | "consumerId": "A String", # Identity of the consumer who is using the service. |
| 786 | # This field should be filled in for the operations initiated by a |
| 787 | # consumer, but not for service-initiated operations that are |
| 788 | # not related to a specific consumer. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 789 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 790 | # - This can be in one of the following formats: |
| 791 | # - project:PROJECT_ID, |
| 792 | # - project`_`number:PROJECT_NUMBER, |
| 793 | # - projects/PROJECT_ID or PROJECT_NUMBER, |
| 794 | # - folders/FOLDER_NUMBER, |
| 795 | # - organizations/ORGANIZATION_NUMBER, |
| 796 | # - api`_`key:API_KEY. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 797 | "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] | 798 | # with. Only a combination of 1000 user labels per consumer project are |
| 799 | # allowed. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 800 | "a_key": "A String", |
| 801 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 802 | "logEntries": [ # Represents information to be logged. |
| 803 | { # An individual log entry. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 804 | "httpRequest": { # A common proto for logging HTTP requests. Only contains semantics # Optional. Information about the HTTP request associated with this |
| 805 | # log entry, if applicable. |
| 806 | # defined by the HTTP specification. Product-specific logging |
| 807 | # information MUST be defined in a separate message. |
| 808 | "status": 42, # The response code indicating the status of the response. |
| 809 | # Examples: 200, 404. |
| 810 | "cacheValidatedWithOriginServer": True or False, # Whether or not the response was validated with the origin server before |
| 811 | # being served from cache. This field is only meaningful if `cache_hit` is |
| 812 | # True. |
| 813 | "protocol": "A String", # Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 814 | "requestMethod": "A String", # The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. |
| 815 | "latency": "A String", # The request processing latency on the server, from the time the request was |
| 816 | # received until the response was sent. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 817 | "cacheFillBytes": "A String", # The number of HTTP response bytes inserted into cache. Set only when a |
| 818 | # cache fill was attempted. |
| 819 | "requestUrl": "A String", # The scheme (http, https), the host name, the path, and the query |
| 820 | # portion of the URL that was requested. |
| 821 | # Example: `"http://example.com/some/info?color=red"`. |
| 822 | "serverIp": "A String", # The IP address (IPv4 or IPv6) of the origin server that the request was |
| 823 | # sent to. |
| 824 | "cacheLookup": True or False, # Whether or not a cache lookup was attempted. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 825 | "cacheHit": True or False, # Whether or not an entity was served from cache |
| 826 | # (with or without validation). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 827 | "referer": "A String", # The referer URL of the request, as defined in |
| 828 | # [HTTP/1.1 Header Field |
| 829 | # Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). |
| 830 | "remoteIp": "A String", # The IP address (IPv4 or IPv6) of the client that issued the HTTP |
| 831 | # request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. |
| 832 | "userAgent": "A String", # The user agent sent by the client. Example: |
| 833 | # `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET |
| 834 | # CLR 1.0.3705)"`. |
| 835 | "requestSize": "A String", # The size of the HTTP request message in bytes, including the request |
| 836 | # headers and the request body. |
| 837 | "responseSize": "A String", # The size of the HTTP response message sent back to the client, in bytes, |
| 838 | # including the response headers and the response body. |
| 839 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 840 | "textPayload": "A String", # The log entry payload, represented as a Unicode string (UTF-8). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 841 | "trace": "A String", # Optional. Resource name of the trace associated with the log entry, if any. |
| 842 | # If this field contains a relative resource name, you can assume the name is |
| 843 | # relative to `//tracing.googleapis.com`. Example: |
| 844 | # `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 845 | "timestamp": "A String", # The time the event described by the log entry occurred. If |
| 846 | # omitted, defaults to operation start time. |
| 847 | "labels": { # A set of user-defined (key, value) data that provides additional |
| 848 | # information about the log entry. |
| 849 | "a_key": "A String", |
| 850 | }, |
| 851 | "structPayload": { # The log entry payload, represented as a structure that |
| 852 | # is expressed as a JSON object. |
| 853 | "a_key": "", # Properties of the object. |
| 854 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 855 | "name": "A String", # Required. The log to which this log entry belongs. Examples: `"syslog"`, |
| 856 | # `"book_log"`. |
| 857 | "insertId": "A String", # A unique ID for the log entry used for deduplication. If omitted, |
| 858 | # the implementation will generate one based on operation_id. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 859 | "protoPayload": { # The log entry payload, represented as a protocol buffer that is |
| 860 | # expressed as a JSON object. The only accepted type currently is |
| 861 | # AuditLog. |
| 862 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 863 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 864 | "operation": { # Additional information about a potentially long-running operation with which # Optional. Information about an operation associated with the log entry, if |
| 865 | # applicable. |
| 866 | # a log entry is associated. |
| 867 | "last": True or False, # Optional. Set this to True if this is the last log entry in the operation. |
| 868 | "id": "A String", # Optional. An arbitrary operation identifier. Log entries with the |
| 869 | # same identifier are assumed to be part of the same operation. |
| 870 | "producer": "A String", # Optional. An arbitrary producer identifier. The combination of |
| 871 | # `id` and `producer` must be globally unique. Examples for `producer`: |
| 872 | # `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. |
| 873 | "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] | 874 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 875 | "sourceLocation": { # Additional information about the source code location that produced the log # Optional. Source code location information associated with the log entry, |
| 876 | # if any. |
| 877 | # entry. |
| 878 | "function": "A String", # Optional. Human-readable name of the function or method being invoked, with |
| 879 | # optional context such as the class or package name. This information may be |
| 880 | # used in contexts such as the logs viewer, where a file and line number are |
| 881 | # less meaningful. The format can vary by language. For example: |
| 882 | # `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` |
| 883 | # (Python). |
| 884 | "line": "A String", # Optional. Line within the source file. 1-based; 0 indicates no line number |
| 885 | # available. |
| 886 | "file": "A String", # Optional. Source file name. Depending on the runtime environment, this |
| 887 | # might be a simple name or a fully-qualified name. |
| 888 | }, |
| 889 | "severity": "A String", # The severity of the log entry. The default value is |
| 890 | # `LogSeverity.DEFAULT`. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 891 | }, |
| 892 | ], |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 893 | "startTime": "A String", # Required. Start time of the operation. |
| 894 | "endTime": "A String", # End time of the operation. |
| 895 | # Required when the operation is used in ServiceController.Report, |
| 896 | # but optional when the operation is used in ServiceController.Check. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 897 | "resources": [ # The resources that are involved in the operation. |
| 898 | # The maximum supported number of entries in this field is 100. |
| 899 | { # Describes a resource associated with this operation. |
| 900 | "resourceContainer": "A String", # The identifier of the parent of this resource instance. |
| 901 | # Must be in one of the following formats: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 902 | # - “projects/<project-id or project-number>” |
| 903 | # - “folders/<folder-id>” |
| 904 | # - “organizations/<organization-id>” |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 905 | "resourceName": "A String", # Name of the resource. This is used for auditing purposes. |
| 906 | "resourceLocation": "A String", # The location of the resource. If not empty, the resource will be checked |
| 907 | # against location policy. The value must be a valid zone, region or |
| 908 | # multiregion. For example: "europe-west4" or "northamerica-northeast1-a" |
| 909 | }, |
| 910 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 911 | "operationId": "A String", # Identity of the operation. This must be unique within the scope of the |
| 912 | # service that generated the operation. If the service calls |
| 913 | # Check() and Report() on the same operation, the two calls should carry |
| 914 | # the same id. |
| 915 | # |
| 916 | # UUID version 4 is recommended, though not required. |
| 917 | # In scenarios where an operation is computed from existing information |
| 918 | # and an idempotent id is desirable for deduplication purpose, UUID version 5 |
| 919 | # is recommended. See RFC 4122 for details. |
| 920 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 921 | "serviceConfigId": "A String", # Specifies which version of service configuration should be used to process |
| 922 | # the request. |
| 923 | # |
| 924 | # If unspecified or no matching version can be found, the |
| 925 | # latest one will be used. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 926 | "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] | 927 | } |
| 928 | |
| 929 | x__xgafv: string, V1 error format. |
| 930 | Allowed values |
| 931 | 1 - v1 error format |
| 932 | 2 - v2 error format |
| 933 | |
| 934 | Returns: |
| 935 | An object of the form: |
| 936 | |
| 937 | { # Response message for the Check method. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 938 | "checkInfo": { # Contains additional information about the check operation. # Feedback data returned from the server during processing a Check request. |
| 939 | "unusedArguments": [ # A list of fields and label keys that are ignored by the server. |
| 940 | # The client doesn't need to send them for following requests to improve |
| 941 | # performance and allow better aggregation. |
| 942 | "A String", |
| 943 | ], |
| 944 | "consumerInfo": { # `ConsumerInfo` provides information about the consumer. # Consumer info of this check. |
| 945 | "consumerNumber": "A String", # The consumer identity number, can be Google cloud project number, folder |
| 946 | # number or organization number e.g. 1234567890. A value of 0 indicates no |
| 947 | # consumer number is found. |
| 948 | "type": "A String", # The type of the consumer which should have been defined in |
| 949 | # [Google Resource Manager](https://cloud.google.com/resource-manager/). |
| 950 | "projectNumber": "A String", # The Google cloud project number, e.g. 1234567890. A value of 0 indicates |
| 951 | # no project number is found. |
| 952 | # |
| 953 | # NOTE: This field is deprecated after Chemist support flexible consumer |
| 954 | # id. New code should not depend on this field anymore. |
| 955 | }, |
| 956 | }, |
| 957 | "checkErrors": [ # Indicate the decision of the check. |
| 958 | # |
| 959 | # If no check errors are present, the service should process the operation. |
| 960 | # Otherwise the service should use the list of errors to determine the |
| 961 | # appropriate action. |
| 962 | { # Defines the errors to be returned in |
| 963 | # google.api.servicecontrol.v1.CheckResponse.check_errors. |
| 964 | "status": { # The `Status` type defines a logical error model that is suitable for # Contains public information about the check error. If available, |
| 965 | # `status.code` will be non zero and client can propagate it out as public |
| 966 | # error. |
| 967 | # different programming environments, including REST APIs and RPC APIs. It is |
| 968 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 969 | # three pieces of data: error code, error message, and error details. |
| 970 | # |
| 971 | # You can find out more about this error model and how to work with it in the |
| 972 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 973 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 974 | # user-facing error message should be localized and sent in the |
| 975 | # google.rpc.Status.details field, or localized by the client. |
| 976 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 977 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 978 | # message types for APIs to use. |
| 979 | { |
| 980 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 981 | }, |
| 982 | ], |
| 983 | }, |
| 984 | "code": "A String", # The error code. |
| 985 | "detail": "A String", # Free-form text providing details on the error cause of the error. |
| 986 | "subject": "A String", # Subject to whom this error applies. See the specific code enum for more |
| 987 | # details on this field. For example: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 988 | # - “project:<project-id or project-number>” |
| 989 | # - “folder:<folder-id>” |
| 990 | # - “organization:<organization-id>” |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 991 | }, |
| 992 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 993 | "serviceRolloutId": "A String", # The current service rollout id used to process the request. |
Jon Wayne Parrott | 2512a0c | 2016-08-29 10:21:22 -0700 | [diff] [blame] | 994 | "serviceConfigId": "A String", # The actual config id used to process the request. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 995 | "quotaInfo": { # Contains the quota information for a quota check response. # Quota information for the check request associated with this response. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 996 | "quotaConsumed": { # Map of quota group name to the actual number of tokens consumed. If the |
| 997 | # quota check was not successful, then this will not be populated due to no |
| 998 | # quota consumption. |
| 999 | # |
| 1000 | # We are not merging this field with 'quota_metrics' field because of the |
| 1001 | # complexity of scaling in Chemist client code base. For simplicity, we will |
| 1002 | # keep this field for Castor (that scales quota usage) and 'quota_metrics' |
| 1003 | # for SuperQuota (that doesn't scale quota usage). |
| 1004 | "a_key": 42, |
| 1005 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1006 | "quotaMetrics": [ # Quota metrics to indicate the usage. Depending on the check request, one or |
| 1007 | # more of the following metrics will be included: |
| 1008 | # |
| 1009 | # 1. For rate quota, per quota group or per quota metric incremental usage |
| 1010 | # will be specified using the following delta metric: |
| 1011 | # "serviceruntime.googleapis.com/api/consumer/quota_used_count" |
| 1012 | # |
| 1013 | # 2. For allocation quota, per quota metric total usage will be specified |
| 1014 | # using the following gauge metric: |
| 1015 | # "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" |
| 1016 | # |
| 1017 | # 3. For both rate quota and allocation quota, the quota limit reached |
| 1018 | # condition will be specified using the following boolean metric: |
| 1019 | # "serviceruntime.googleapis.com/quota/exceeded" |
| 1020 | { # Represents a set of metric values in the same metric. |
| 1021 | # Each metric value in the set should have a unique combination of start time, |
| 1022 | # end time, and label values. |
| 1023 | "metricValues": [ # The values in this metric. |
| 1024 | { # Represents a single metric value. |
| 1025 | "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] | 1026 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 1027 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 1028 | # If `units` is positive, `nanos` must be positive or zero. |
| 1029 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 1030 | # If `units` is negative, `nanos` must be negative or zero. |
| 1031 | # 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] | 1032 | "units": "A String", # The whole units of the amount. |
| 1033 | # 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] | 1034 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 1035 | }, |
| 1036 | "labels": { # The labels describing the metric value. |
| 1037 | # See comments on google.api.servicecontrol.v1.Operation.labels for |
| 1038 | # the overriding relationship. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1039 | # Note that this map must not contain monitored resource labels. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1040 | "a_key": "A String", |
| 1041 | }, |
| 1042 | "doubleValue": 3.14, # A double precision floating point value. |
| 1043 | "boolValue": True or False, # A boolean value. |
| 1044 | "startTime": "A String", # The start of the time period over which this metric value's measurement |
| 1045 | # applies. The time period has different semantics for different metric |
| 1046 | # types (cumulative, delta, and gauge). See the metric definition |
| 1047 | # documentation in the service configuration for details. |
| 1048 | "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value. |
| 1049 | # points. It contains the size of the population of sample points plus |
| 1050 | # additional optional information: |
| 1051 | # |
| 1052 | # - the arithmetic mean of the samples |
| 1053 | # - the minimum and maximum of the samples |
| 1054 | # - the sum-squared-deviation of the samples, used to compute variance |
| 1055 | # - a histogram of the values of the sample points |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1056 | "count": "A String", # The total number of samples in the distribution. Must be >= 0. |
| 1057 | "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean: |
| 1058 | # Sum[i=1..count]((x_i - mean)^2) |
| 1059 | # where each x_i is a sample values. If `count` is zero then this field |
| 1060 | # must be zero, otherwise validation of the request fails. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1061 | "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are |
| 1062 | # optional. If present, they must sum to the `count` value. |
| 1063 | # |
| 1064 | # The buckets are defined below in `bucket_option`. There are N buckets. |
| 1065 | # `bucket_counts[0]` is the number of samples in the underflow bucket. |
| 1066 | # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples |
| 1067 | # in each of the finite buckets. And `bucket_counts[N] is the number |
| 1068 | # of samples in the overflow bucket. See the comments of `bucket_option` |
| 1069 | # below for more details. |
| 1070 | # |
| 1071 | # Any suffix of trailing zeros may be omitted. |
| 1072 | "A String", |
| 1073 | ], |
| 1074 | "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width. |
| 1075 | "scale": 3.14, # The i'th exponential bucket covers the interval |
| 1076 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 1077 | # where i ranges from 1 to num_finite_buckets inclusive. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1078 | # Must be > 0. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1079 | "growthFactor": 3.14, # The i'th exponential bucket covers the interval |
| 1080 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 1081 | # where i ranges from 1 to num_finite_buckets inclusive. |
| 1082 | # Must be larger than 1.0. |
| 1083 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 1084 | # the total number of buckets is `num_finite_buckets` + 2. |
| 1085 | # See comments on `bucket_options` for details. |
| 1086 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1087 | "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1088 | "exemplars": [ # Example points. Must be in increasing order of `value` field. |
| 1089 | { # Exemplars are example points that may be used to annotate aggregated |
| 1090 | # distribution values. They are metadata that gives information about a |
| 1091 | # particular value added to a Distribution bucket, such as a trace ID that |
| 1092 | # was active when a value was added. They may contain further information, |
| 1093 | # such as a example values and timestamps, origin, etc. |
| 1094 | "timestamp": "A String", # The observation (sampling) time of the above value. |
| 1095 | "attachments": [ # Contextual information about the example value. Examples are: |
| 1096 | # |
| 1097 | # Trace: type.googleapis.com/google.monitoring.v3.SpanContext |
| 1098 | # |
| 1099 | # Literal string: type.googleapis.com/google.protobuf.StringValue |
| 1100 | # |
| 1101 | # Labels dropped during aggregation: |
| 1102 | # type.googleapis.com/google.monitoring.v3.DroppedLabels |
| 1103 | # |
| 1104 | # There may be only a single attachment of any given message type in a |
| 1105 | # single exemplar, and this is enforced by the system. |
| 1106 | { |
| 1107 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1108 | }, |
| 1109 | ], |
| 1110 | "value": 3.14, # Value of the exemplar point. This value determines to which bucket the |
| 1111 | # exemplar belongs. |
| 1112 | }, |
| 1113 | ], |
| 1114 | "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1115 | "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width. |
| 1116 | "width": 3.14, # The i'th linear bucket covers the interval |
| 1117 | # [offset + (i-1) * width, offset + i * width) |
| 1118 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 1119 | # Must be strictly positive. |
| 1120 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 1121 | # the total number of buckets is `num_finite_buckets` + 2. |
| 1122 | # See comments on `bucket_options` for details. |
| 1123 | "offset": 3.14, # The i'th linear bucket covers the interval |
| 1124 | # [offset + (i-1) * width, offset + i * width) |
| 1125 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 1126 | }, |
| 1127 | "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width. |
| 1128 | "bounds": [ # 'bound' is a list of strictly increasing boundaries between |
| 1129 | # buckets. Note that a list of length N-1 defines N buckets because |
| 1130 | # of fenceposting. See comments on `bucket_options` for details. |
| 1131 | # |
| 1132 | # The i'th finite bucket covers the interval |
| 1133 | # [bound[i-1], bound[i]) |
| 1134 | # where i ranges from 1 to bound_size() - 1. Note that there are no |
| 1135 | # finite buckets at all if 'bound' only contains a single element; in |
| 1136 | # that special case the single bound defines the boundary between the |
| 1137 | # underflow and overflow buckets. |
| 1138 | # |
| 1139 | # bucket number lower bound upper bound |
| 1140 | # i == 0 (underflow) -inf bound[i] |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1141 | # 0 < i < bound_size() bound[i-1] bound[i] |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1142 | # i == bound_size() (overflow) bound[i-1] +inf |
| 1143 | 3.14, |
| 1144 | ], |
| 1145 | }, |
| 1146 | "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is |
| 1147 | # zero then this field must be zero. |
| 1148 | }, |
| 1149 | "stringValue": "A String", # A text string value. |
| 1150 | "int64Value": "A String", # A signed 64-bit integer value. |
| 1151 | "endTime": "A String", # The end of the time period over which this metric value's measurement |
| 1152 | # applies. |
| 1153 | }, |
| 1154 | ], |
| 1155 | "metricName": "A String", # The metric name defined in the service configuration. |
| 1156 | }, |
| 1157 | ], |
| 1158 | "limitExceeded": [ # Quota Metrics that have exceeded quota limits. |
| 1159 | # For QuotaGroup-based quota, this is QuotaGroup.name |
| 1160 | # For QuotaLimit-based quota, this is QuotaLimit.name |
| 1161 | # See: google.api.Quota |
| 1162 | # Deprecated: Use quota_metrics to get per quota group limit exceeded status. |
| 1163 | "A String", |
| 1164 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1165 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1166 | "operationId": "A String", # The same operation_id value used in the CheckRequest. |
| 1167 | # Used for logging and diagnostics purposes. |
| 1168 | }</pre> |
| 1169 | </div> |
| 1170 | |
| 1171 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1172 | <code class="details" id="report">report(serviceName, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1173 | <pre>Reports operation results to Google Service Control, such as logs and |
| 1174 | metrics. It should be called after an operation is completed. |
| 1175 | |
| 1176 | If feasible, the client should aggregate reporting data for up to 5 |
| 1177 | seconds to reduce API traffic. Limiting aggregation to 5 seconds is to |
| 1178 | reduce data loss during client crashes. Clients should carefully choose |
| 1179 | the aggregation time window to avoid data loss risk more than 0.01% |
| 1180 | for business and compliance reasons. |
| 1181 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1182 | NOTE: the ReportRequest has the size limit (wire-format byte size) of |
| 1183 | 1MB. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1184 | |
| 1185 | This method requires the `servicemanagement.services.report` permission |
| 1186 | on the specified service. For more information, see |
| 1187 | [Google Cloud IAM](https://cloud.google.com/iam). |
| 1188 | |
| 1189 | Args: |
| 1190 | serviceName: string, The service name as specified in its service configuration. For example, |
| 1191 | `"pubsub.googleapis.com"`. |
| 1192 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1193 | See |
| 1194 | [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) |
| 1195 | for the definition of a service name. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1196 | body: object, The request body. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1197 | The object takes the form of: |
| 1198 | |
| 1199 | { # Request message for the Report method. |
| 1200 | "operations": [ # Operations to be reported. |
| 1201 | # |
| 1202 | # Typically the service should report one operation per request. |
| 1203 | # Putting multiple operations into a single request is allowed, but should |
| 1204 | # be used only when multiple operations are natually available at the time |
| 1205 | # of the report. |
| 1206 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1207 | # There is no limit on the number of operations in the same ReportRequest, |
| 1208 | # however the ReportRequest size should be no larger than 1MB. See |
| 1209 | # ReportResponse.report_errors for partial failure behavior. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1210 | { # Represents information regarding an operation. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1211 | "operationName": "A String", # Fully qualified name of the operation. Reserved for future use. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1212 | "traceSpans": [ # Unimplemented. A list of Cloud Trace spans. The span names shall contain |
| 1213 | # the id of the destination project which can be either the produce or the |
| 1214 | # consumer project. |
| 1215 | { # A span represents a single operation within a trace. Spans can be |
| 1216 | # nested to form a trace tree. Often, a trace contains a root span |
| 1217 | # that describes the end-to-end latency, and one or more subspans for |
| 1218 | # its sub-operations. A trace can also contain multiple root spans, |
| 1219 | # or none at all. Spans do not need to be contiguous&mdash;there may be |
| 1220 | # gaps or overlaps between spans in a trace. |
| 1221 | "status": { # The `Status` type defines a logical error model that is suitable for # An optional final status for this span. |
| 1222 | # different programming environments, including REST APIs and RPC APIs. It is |
| 1223 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 1224 | # three pieces of data: error code, error message, and error details. |
| 1225 | # |
| 1226 | # You can find out more about this error model and how to work with it in the |
| 1227 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 1228 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 1229 | # user-facing error message should be localized and sent in the |
| 1230 | # google.rpc.Status.details field, or localized by the client. |
| 1231 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 1232 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 1233 | # message types for APIs to use. |
| 1234 | { |
| 1235 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1236 | }, |
| 1237 | ], |
| 1238 | }, |
| 1239 | "childSpanCount": 42, # An optional number of child spans that were generated while this span |
| 1240 | # was active. If set, allows implementation to detect missing child spans. |
| 1241 | "displayName": { # Represents a string that might be shortened to a specified length. # A description of the span's operation (up to 128 bytes). |
| 1242 | # Stackdriver Trace displays the description in the |
| 1243 | # Google Cloud Platform Console. |
| 1244 | # For example, the display name can be a qualified method name or a file name |
| 1245 | # and a line number where the operation is called. A best practice is to use |
| 1246 | # the same display name within an application and at the same call point. |
| 1247 | # This makes it easier to correlate spans in different traces. |
| 1248 | "value": "A String", # The shortened string. For example, if the original string is 500 |
| 1249 | # bytes long and the limit of the string is 128 bytes, then |
| 1250 | # `value` contains the first 128 bytes of the 500-byte string. |
| 1251 | # |
| 1252 | # Truncation always happens on a UTF8 character boundary. If there |
| 1253 | # are multi-byte characters in the string, then the length of the |
| 1254 | # shortened string might be less than the size limit. |
| 1255 | "truncatedByteCount": 42, # The number of bytes removed from the original string. If this |
| 1256 | # value is 0, then the string was not shortened. |
| 1257 | }, |
| 1258 | "name": "A String", # The resource name of the span in the following format: |
| 1259 | # |
| 1260 | # projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project; |
| 1261 | # it is a 32-character hexadecimal encoding of a 16-byte array. |
| 1262 | # |
| 1263 | # [SPAN_ID] is a unique identifier for a span within a trace; it |
| 1264 | # is a 16-character hexadecimal encoding of an 8-byte array. |
| 1265 | "spanKind": "A String", # Distinguishes between spans generated in a particular context. For example, |
| 1266 | # two spans with the same name may be distinguished using `CLIENT` (caller) |
| 1267 | # and `SERVER` (callee) to identify an RPC call. |
| 1268 | "parentSpanId": "A String", # The [SPAN_ID] of this span's parent span. If this is a root span, |
| 1269 | # then this field must be empty. |
| 1270 | "startTime": "A String", # The start time of the span. On the client side, this is the time kept by |
| 1271 | # the local machine where the span execution starts. On the server side, this |
| 1272 | # is the time when the server's application handler starts running. |
| 1273 | "spanId": "A String", # The [SPAN_ID] portion of the span's resource name. |
| 1274 | "attributes": { # A set of attributes, each in the format `[KEY]:[VALUE]`. # A set of attributes on the span. You can have up to 32 attributes per |
| 1275 | # span. |
| 1276 | "droppedAttributesCount": 42, # The number of attributes that were discarded. Attributes can be discarded |
| 1277 | # because their keys are too long or because there are too many attributes. |
| 1278 | # If this value is 0 then all attributes are valid. |
| 1279 | "attributeMap": { # The set of attributes. Each attribute's key can be up to 128 bytes |
| 1280 | # long. The value can be a string up to 256 bytes, a signed 64-bit integer, |
| 1281 | # or the Boolean values `true` and `false`. For example: |
| 1282 | # |
| 1283 | # "/instance_id": "my-instance" |
| 1284 | # "/http/user_agent": "" |
| 1285 | # "/http/request_bytes": 300 |
| 1286 | # "abc.com/myattribute": true |
| 1287 | "a_key": { # The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute. |
| 1288 | "stringValue": { # Represents a string that might be shortened to a specified length. # A string up to 256 bytes long. |
| 1289 | "value": "A String", # The shortened string. For example, if the original string is 500 |
| 1290 | # bytes long and the limit of the string is 128 bytes, then |
| 1291 | # `value` contains the first 128 bytes of the 500-byte string. |
| 1292 | # |
| 1293 | # Truncation always happens on a UTF8 character boundary. If there |
| 1294 | # are multi-byte characters in the string, then the length of the |
| 1295 | # shortened string might be less than the size limit. |
| 1296 | "truncatedByteCount": 42, # The number of bytes removed from the original string. If this |
| 1297 | # value is 0, then the string was not shortened. |
| 1298 | }, |
| 1299 | "boolValue": True or False, # A Boolean value represented by `true` or `false`. |
| 1300 | "intValue": "A String", # A 64-bit signed integer. |
| 1301 | }, |
| 1302 | }, |
| 1303 | }, |
| 1304 | "endTime": "A String", # The end time of the span. On the client side, this is the time kept by |
| 1305 | # the local machine where the span execution ends. On the server side, this |
| 1306 | # is the time when the server application handler stops running. |
| 1307 | "sameProcessAsParentSpan": True or False, # (Optional) Set this parameter to indicate whether this span is in |
| 1308 | # the same process as its parent. If you do not set this parameter, |
| 1309 | # Stackdriver Trace is unable to take advantage of this helpful |
| 1310 | # information. |
| 1311 | }, |
| 1312 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1313 | "metricValueSets": [ # Represents information about this operation. Each MetricValueSet |
| 1314 | # corresponds to a metric defined in the service configuration. |
| 1315 | # The data type used in the MetricValueSet must agree with |
| 1316 | # the data type specified in the metric definition. |
| 1317 | # |
| 1318 | # Within a single operation, it is not allowed to have more than one |
| 1319 | # MetricValue instances that have the same metric names and identical |
| 1320 | # label value combinations. If a request has such duplicated MetricValue |
| 1321 | # instances, the entire request is rejected with |
| 1322 | # an invalid argument error. |
| 1323 | { # Represents a set of metric values in the same metric. |
| 1324 | # Each metric value in the set should have a unique combination of start time, |
| 1325 | # end time, and label values. |
| 1326 | "metricValues": [ # The values in this metric. |
| 1327 | { # Represents a single metric value. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1328 | "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] | 1329 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 1330 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 1331 | # If `units` is positive, `nanos` must be positive or zero. |
| 1332 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 1333 | # If `units` is negative, `nanos` must be negative or zero. |
| 1334 | # 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] | 1335 | "units": "A String", # The whole units of the amount. |
| 1336 | # 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] | 1337 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 1338 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1339 | "labels": { # The labels describing the metric value. |
| 1340 | # See comments on google.api.servicecontrol.v1.Operation.labels for |
| 1341 | # the overriding relationship. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1342 | # Note that this map must not contain monitored resource labels. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1343 | "a_key": "A String", |
| 1344 | }, |
| 1345 | "doubleValue": 3.14, # A double precision floating point value. |
| 1346 | "boolValue": True or False, # A boolean value. |
| 1347 | "startTime": "A String", # The start of the time period over which this metric value's measurement |
| 1348 | # applies. The time period has different semantics for different metric |
| 1349 | # types (cumulative, delta, and gauge). See the metric definition |
| 1350 | # documentation in the service configuration for details. |
| 1351 | "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value. |
| 1352 | # points. It contains the size of the population of sample points plus |
| 1353 | # additional optional information: |
| 1354 | # |
| 1355 | # - the arithmetic mean of the samples |
| 1356 | # - the minimum and maximum of the samples |
| 1357 | # - the sum-squared-deviation of the samples, used to compute variance |
| 1358 | # - a histogram of the values of the sample points |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1359 | "count": "A String", # The total number of samples in the distribution. Must be >= 0. |
| 1360 | "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean: |
| 1361 | # Sum[i=1..count]((x_i - mean)^2) |
| 1362 | # where each x_i is a sample values. If `count` is zero then this field |
| 1363 | # must be zero, otherwise validation of the request fails. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1364 | "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are |
| 1365 | # optional. If present, they must sum to the `count` value. |
| 1366 | # |
| 1367 | # The buckets are defined below in `bucket_option`. There are N buckets. |
| 1368 | # `bucket_counts[0]` is the number of samples in the underflow bucket. |
| 1369 | # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples |
| 1370 | # in each of the finite buckets. And `bucket_counts[N] is the number |
| 1371 | # of samples in the overflow bucket. See the comments of `bucket_option` |
| 1372 | # below for more details. |
| 1373 | # |
| 1374 | # Any suffix of trailing zeros may be omitted. |
| 1375 | "A String", |
| 1376 | ], |
| 1377 | "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width. |
| 1378 | "scale": 3.14, # The i'th exponential bucket covers the interval |
| 1379 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 1380 | # where i ranges from 1 to num_finite_buckets inclusive. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1381 | # Must be > 0. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1382 | "growthFactor": 3.14, # The i'th exponential bucket covers the interval |
| 1383 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 1384 | # where i ranges from 1 to num_finite_buckets inclusive. |
| 1385 | # Must be larger than 1.0. |
| 1386 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 1387 | # the total number of buckets is `num_finite_buckets` + 2. |
| 1388 | # See comments on `bucket_options` for details. |
| 1389 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1390 | "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1391 | "exemplars": [ # Example points. Must be in increasing order of `value` field. |
| 1392 | { # Exemplars are example points that may be used to annotate aggregated |
| 1393 | # distribution values. They are metadata that gives information about a |
| 1394 | # particular value added to a Distribution bucket, such as a trace ID that |
| 1395 | # was active when a value was added. They may contain further information, |
| 1396 | # such as a example values and timestamps, origin, etc. |
| 1397 | "timestamp": "A String", # The observation (sampling) time of the above value. |
| 1398 | "attachments": [ # Contextual information about the example value. Examples are: |
| 1399 | # |
| 1400 | # Trace: type.googleapis.com/google.monitoring.v3.SpanContext |
| 1401 | # |
| 1402 | # Literal string: type.googleapis.com/google.protobuf.StringValue |
| 1403 | # |
| 1404 | # Labels dropped during aggregation: |
| 1405 | # type.googleapis.com/google.monitoring.v3.DroppedLabels |
| 1406 | # |
| 1407 | # There may be only a single attachment of any given message type in a |
| 1408 | # single exemplar, and this is enforced by the system. |
| 1409 | { |
| 1410 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1411 | }, |
| 1412 | ], |
| 1413 | "value": 3.14, # Value of the exemplar point. This value determines to which bucket the |
| 1414 | # exemplar belongs. |
| 1415 | }, |
| 1416 | ], |
| 1417 | "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1418 | "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width. |
| 1419 | "width": 3.14, # The i'th linear bucket covers the interval |
| 1420 | # [offset + (i-1) * width, offset + i * width) |
| 1421 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 1422 | # Must be strictly positive. |
| 1423 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 1424 | # the total number of buckets is `num_finite_buckets` + 2. |
| 1425 | # See comments on `bucket_options` for details. |
| 1426 | "offset": 3.14, # The i'th linear bucket covers the interval |
| 1427 | # [offset + (i-1) * width, offset + i * width) |
| 1428 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 1429 | }, |
| 1430 | "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width. |
| 1431 | "bounds": [ # 'bound' is a list of strictly increasing boundaries between |
| 1432 | # buckets. Note that a list of length N-1 defines N buckets because |
| 1433 | # of fenceposting. See comments on `bucket_options` for details. |
| 1434 | # |
| 1435 | # The i'th finite bucket covers the interval |
| 1436 | # [bound[i-1], bound[i]) |
| 1437 | # where i ranges from 1 to bound_size() - 1. Note that there are no |
| 1438 | # finite buckets at all if 'bound' only contains a single element; in |
| 1439 | # that special case the single bound defines the boundary between the |
| 1440 | # underflow and overflow buckets. |
| 1441 | # |
| 1442 | # bucket number lower bound upper bound |
| 1443 | # i == 0 (underflow) -inf bound[i] |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1444 | # 0 < i < bound_size() bound[i-1] bound[i] |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1445 | # i == bound_size() (overflow) bound[i-1] +inf |
| 1446 | 3.14, |
| 1447 | ], |
| 1448 | }, |
| 1449 | "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is |
| 1450 | # zero then this field must be zero. |
| 1451 | }, |
| 1452 | "stringValue": "A String", # A text string value. |
| 1453 | "int64Value": "A String", # A signed 64-bit integer value. |
| 1454 | "endTime": "A String", # The end of the time period over which this metric value's measurement |
| 1455 | # applies. |
| 1456 | }, |
| 1457 | ], |
| 1458 | "metricName": "A String", # The metric name defined in the service configuration. |
| 1459 | }, |
| 1460 | ], |
Jon Wayne Parrott | 2512a0c | 2016-08-29 10:21:22 -0700 | [diff] [blame] | 1461 | "importance": "A String", # DO NOT USE. This is an experimental field. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1462 | "labels": { # Labels describing the operation. Only the following labels are allowed: |
| 1463 | # |
| 1464 | # - Labels describing monitored resources as defined in |
| 1465 | # the service configuration. |
| 1466 | # - Default labels of metric values. When specified, labels defined in the |
| 1467 | # metric value override these default. |
| 1468 | # - The following labels defined by Google Cloud Platform: |
| 1469 | # - `cloud.googleapis.com/location` describing the location where the |
| 1470 | # operation happened, |
| 1471 | # - `servicecontrol.googleapis.com/user_agent` describing the user agent |
| 1472 | # of the API request, |
| 1473 | # - `servicecontrol.googleapis.com/service_agent` describing the service |
| 1474 | # used to handle the API request (e.g. ESP), |
| 1475 | # - `servicecontrol.googleapis.com/platform` describing the platform |
| 1476 | # where the API is served, such as App Engine, Compute Engine, or |
| 1477 | # Kubernetes Engine. |
| 1478 | "a_key": "A String", |
| 1479 | }, |
| 1480 | "quotaProperties": { # Represents the properties needed for quota operations. # Represents the properties needed for quota check. Applicable only if this |
| 1481 | # operation is for a quota check request. If this is not specified, no quota |
| 1482 | # check will be performed. |
| 1483 | "quotaMode": "A String", # Quota mode for this operation. |
| 1484 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1485 | "consumerId": "A String", # Identity of the consumer who is using the service. |
| 1486 | # This field should be filled in for the operations initiated by a |
| 1487 | # consumer, but not for service-initiated operations that are |
| 1488 | # not related to a specific consumer. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 1489 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1490 | # - This can be in one of the following formats: |
| 1491 | # - project:PROJECT_ID, |
| 1492 | # - project`_`number:PROJECT_NUMBER, |
| 1493 | # - projects/PROJECT_ID or PROJECT_NUMBER, |
| 1494 | # - folders/FOLDER_NUMBER, |
| 1495 | # - organizations/ORGANIZATION_NUMBER, |
| 1496 | # - api`_`key:API_KEY. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1497 | "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] | 1498 | # with. Only a combination of 1000 user labels per consumer project are |
| 1499 | # allowed. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1500 | "a_key": "A String", |
| 1501 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1502 | "logEntries": [ # Represents information to be logged. |
| 1503 | { # An individual log entry. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1504 | "httpRequest": { # A common proto for logging HTTP requests. Only contains semantics # Optional. Information about the HTTP request associated with this |
| 1505 | # log entry, if applicable. |
| 1506 | # defined by the HTTP specification. Product-specific logging |
| 1507 | # information MUST be defined in a separate message. |
| 1508 | "status": 42, # The response code indicating the status of the response. |
| 1509 | # Examples: 200, 404. |
| 1510 | "cacheValidatedWithOriginServer": True or False, # Whether or not the response was validated with the origin server before |
| 1511 | # being served from cache. This field is only meaningful if `cache_hit` is |
| 1512 | # True. |
| 1513 | "protocol": "A String", # Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1514 | "requestMethod": "A String", # The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. |
| 1515 | "latency": "A String", # The request processing latency on the server, from the time the request was |
| 1516 | # received until the response was sent. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1517 | "cacheFillBytes": "A String", # The number of HTTP response bytes inserted into cache. Set only when a |
| 1518 | # cache fill was attempted. |
| 1519 | "requestUrl": "A String", # The scheme (http, https), the host name, the path, and the query |
| 1520 | # portion of the URL that was requested. |
| 1521 | # Example: `"http://example.com/some/info?color=red"`. |
| 1522 | "serverIp": "A String", # The IP address (IPv4 or IPv6) of the origin server that the request was |
| 1523 | # sent to. |
| 1524 | "cacheLookup": True or False, # Whether or not a cache lookup was attempted. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1525 | "cacheHit": True or False, # Whether or not an entity was served from cache |
| 1526 | # (with or without validation). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1527 | "referer": "A String", # The referer URL of the request, as defined in |
| 1528 | # [HTTP/1.1 Header Field |
| 1529 | # Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). |
| 1530 | "remoteIp": "A String", # The IP address (IPv4 or IPv6) of the client that issued the HTTP |
| 1531 | # request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. |
| 1532 | "userAgent": "A String", # The user agent sent by the client. Example: |
| 1533 | # `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET |
| 1534 | # CLR 1.0.3705)"`. |
| 1535 | "requestSize": "A String", # The size of the HTTP request message in bytes, including the request |
| 1536 | # headers and the request body. |
| 1537 | "responseSize": "A String", # The size of the HTTP response message sent back to the client, in bytes, |
| 1538 | # including the response headers and the response body. |
| 1539 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1540 | "textPayload": "A String", # The log entry payload, represented as a Unicode string (UTF-8). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1541 | "trace": "A String", # Optional. Resource name of the trace associated with the log entry, if any. |
| 1542 | # If this field contains a relative resource name, you can assume the name is |
| 1543 | # relative to `//tracing.googleapis.com`. Example: |
| 1544 | # `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1545 | "timestamp": "A String", # The time the event described by the log entry occurred. If |
| 1546 | # omitted, defaults to operation start time. |
| 1547 | "labels": { # A set of user-defined (key, value) data that provides additional |
| 1548 | # information about the log entry. |
| 1549 | "a_key": "A String", |
| 1550 | }, |
| 1551 | "structPayload": { # The log entry payload, represented as a structure that |
| 1552 | # is expressed as a JSON object. |
| 1553 | "a_key": "", # Properties of the object. |
| 1554 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1555 | "name": "A String", # Required. The log to which this log entry belongs. Examples: `"syslog"`, |
| 1556 | # `"book_log"`. |
| 1557 | "insertId": "A String", # A unique ID for the log entry used for deduplication. If omitted, |
| 1558 | # the implementation will generate one based on operation_id. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1559 | "protoPayload": { # The log entry payload, represented as a protocol buffer that is |
| 1560 | # expressed as a JSON object. The only accepted type currently is |
| 1561 | # AuditLog. |
| 1562 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1563 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1564 | "operation": { # Additional information about a potentially long-running operation with which # Optional. Information about an operation associated with the log entry, if |
| 1565 | # applicable. |
| 1566 | # a log entry is associated. |
| 1567 | "last": True or False, # Optional. Set this to True if this is the last log entry in the operation. |
| 1568 | "id": "A String", # Optional. An arbitrary operation identifier. Log entries with the |
| 1569 | # same identifier are assumed to be part of the same operation. |
| 1570 | "producer": "A String", # Optional. An arbitrary producer identifier. The combination of |
| 1571 | # `id` and `producer` must be globally unique. Examples for `producer`: |
| 1572 | # `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. |
| 1573 | "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] | 1574 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1575 | "sourceLocation": { # Additional information about the source code location that produced the log # Optional. Source code location information associated with the log entry, |
| 1576 | # if any. |
| 1577 | # entry. |
| 1578 | "function": "A String", # Optional. Human-readable name of the function or method being invoked, with |
| 1579 | # optional context such as the class or package name. This information may be |
| 1580 | # used in contexts such as the logs viewer, where a file and line number are |
| 1581 | # less meaningful. The format can vary by language. For example: |
| 1582 | # `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` |
| 1583 | # (Python). |
| 1584 | "line": "A String", # Optional. Line within the source file. 1-based; 0 indicates no line number |
| 1585 | # available. |
| 1586 | "file": "A String", # Optional. Source file name. Depending on the runtime environment, this |
| 1587 | # might be a simple name or a fully-qualified name. |
| 1588 | }, |
| 1589 | "severity": "A String", # The severity of the log entry. The default value is |
| 1590 | # `LogSeverity.DEFAULT`. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1591 | }, |
| 1592 | ], |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1593 | "startTime": "A String", # Required. Start time of the operation. |
| 1594 | "endTime": "A String", # End time of the operation. |
| 1595 | # Required when the operation is used in ServiceController.Report, |
| 1596 | # but optional when the operation is used in ServiceController.Check. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1597 | "resources": [ # The resources that are involved in the operation. |
| 1598 | # The maximum supported number of entries in this field is 100. |
| 1599 | { # Describes a resource associated with this operation. |
| 1600 | "resourceContainer": "A String", # The identifier of the parent of this resource instance. |
| 1601 | # Must be in one of the following formats: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1602 | # - “projects/<project-id or project-number>” |
| 1603 | # - “folders/<folder-id>” |
| 1604 | # - “organizations/<organization-id>” |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1605 | "resourceName": "A String", # Name of the resource. This is used for auditing purposes. |
| 1606 | "resourceLocation": "A String", # The location of the resource. If not empty, the resource will be checked |
| 1607 | # against location policy. The value must be a valid zone, region or |
| 1608 | # multiregion. For example: "europe-west4" or "northamerica-northeast1-a" |
| 1609 | }, |
| 1610 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1611 | "operationId": "A String", # Identity of the operation. This must be unique within the scope of the |
| 1612 | # service that generated the operation. If the service calls |
| 1613 | # Check() and Report() on the same operation, the two calls should carry |
| 1614 | # the same id. |
| 1615 | # |
| 1616 | # UUID version 4 is recommended, though not required. |
| 1617 | # In scenarios where an operation is computed from existing information |
| 1618 | # and an idempotent id is desirable for deduplication purpose, UUID version 5 |
| 1619 | # is recommended. See RFC 4122 for details. |
| 1620 | }, |
| 1621 | ], |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1622 | "serviceConfigId": "A String", # Specifies which version of service config should be used to process the |
| 1623 | # request. |
| 1624 | # |
| 1625 | # If unspecified or no matching version can be found, the |
| 1626 | # latest one will be used. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1627 | } |
| 1628 | |
| 1629 | x__xgafv: string, V1 error format. |
| 1630 | Allowed values |
| 1631 | 1 - v1 error format |
| 1632 | 2 - v2 error format |
| 1633 | |
| 1634 | Returns: |
| 1635 | An object of the form: |
| 1636 | |
| 1637 | { # Response message for the Report method. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1638 | "reportErrors": [ # Partial failures, one for each `Operation` in the request that failed |
| 1639 | # processing. There are three possible combinations of the RPC status: |
| 1640 | # |
| 1641 | # 1. The combination of a successful RPC status and an empty `report_errors` |
| 1642 | # list indicates a complete success where all `Operations` in the |
| 1643 | # request are processed successfully. |
| 1644 | # 2. The combination of a successful RPC status and a non-empty |
| 1645 | # `report_errors` list indicates a partial success where some |
| 1646 | # `Operations` in the request succeeded. Each |
| 1647 | # `Operation` that failed processing has a corresponding item |
| 1648 | # in this list. |
| 1649 | # 3. A failed RPC status indicates a general non-deterministic failure. |
| 1650 | # When this happens, it's impossible to know which of the |
| 1651 | # 'Operations' in the request succeeded or failed. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1652 | { # Represents the processing error of one Operation in the request. |
| 1653 | "status": { # The `Status` type defines a logical error model that is suitable for # Details of the error when processing the Operation. |
| 1654 | # different programming environments, including REST APIs and RPC APIs. It is |
| 1655 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 1656 | # three pieces of data: error code, error message, and error details. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1657 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1658 | # You can find out more about this error model and how to work with it in the |
| 1659 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1660 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 1661 | # user-facing error message should be localized and sent in the |
| 1662 | # google.rpc.Status.details field, or localized by the client. |
| 1663 | "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] | 1664 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 1665 | # message types for APIs to use. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1666 | { |
| 1667 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1668 | }, |
| 1669 | ], |
| 1670 | }, |
| 1671 | "operationId": "A String", # The Operation.operation_id value from the request. |
| 1672 | }, |
| 1673 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1674 | "reportInfos": [ # Quota usage for each quota release `Operation` request. |
| 1675 | # |
| 1676 | # Fully or partially failed quota release request may or may not be present |
| 1677 | # in `report_quota_info`. For example, a failed quota release request will |
| 1678 | # have the current quota usage info when precise quota library returns the |
| 1679 | # info. A deadline exceeded quota request will not have quota usage info. |
| 1680 | # |
| 1681 | # 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] | 1682 | { # Contains additional info about the report operation. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1683 | "quotaInfo": { # Contains the quota information for a quota check response. # Quota usage info when processing the `Operation`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1684 | "quotaConsumed": { # Map of quota group name to the actual number of tokens consumed. If the |
| 1685 | # quota check was not successful, then this will not be populated due to no |
| 1686 | # quota consumption. |
| 1687 | # |
| 1688 | # We are not merging this field with 'quota_metrics' field because of the |
| 1689 | # complexity of scaling in Chemist client code base. For simplicity, we will |
| 1690 | # keep this field for Castor (that scales quota usage) and 'quota_metrics' |
| 1691 | # for SuperQuota (that doesn't scale quota usage). |
| 1692 | "a_key": 42, |
| 1693 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1694 | "quotaMetrics": [ # Quota metrics to indicate the usage. Depending on the check request, one or |
| 1695 | # more of the following metrics will be included: |
| 1696 | # |
| 1697 | # 1. For rate quota, per quota group or per quota metric incremental usage |
| 1698 | # will be specified using the following delta metric: |
| 1699 | # "serviceruntime.googleapis.com/api/consumer/quota_used_count" |
| 1700 | # |
| 1701 | # 2. For allocation quota, per quota metric total usage will be specified |
| 1702 | # using the following gauge metric: |
| 1703 | # "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" |
| 1704 | # |
| 1705 | # 3. For both rate quota and allocation quota, the quota limit reached |
| 1706 | # condition will be specified using the following boolean metric: |
| 1707 | # "serviceruntime.googleapis.com/quota/exceeded" |
| 1708 | { # Represents a set of metric values in the same metric. |
| 1709 | # Each metric value in the set should have a unique combination of start time, |
| 1710 | # end time, and label values. |
| 1711 | "metricValues": [ # The values in this metric. |
| 1712 | { # Represents a single metric value. |
| 1713 | "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] | 1714 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 1715 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 1716 | # If `units` is positive, `nanos` must be positive or zero. |
| 1717 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 1718 | # If `units` is negative, `nanos` must be negative or zero. |
| 1719 | # 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] | 1720 | "units": "A String", # The whole units of the amount. |
| 1721 | # 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] | 1722 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 1723 | }, |
| 1724 | "labels": { # The labels describing the metric value. |
| 1725 | # See comments on google.api.servicecontrol.v1.Operation.labels for |
| 1726 | # the overriding relationship. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1727 | # Note that this map must not contain monitored resource labels. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1728 | "a_key": "A String", |
| 1729 | }, |
| 1730 | "doubleValue": 3.14, # A double precision floating point value. |
| 1731 | "boolValue": True or False, # A boolean value. |
| 1732 | "startTime": "A String", # The start of the time period over which this metric value's measurement |
| 1733 | # applies. The time period has different semantics for different metric |
| 1734 | # types (cumulative, delta, and gauge). See the metric definition |
| 1735 | # documentation in the service configuration for details. |
| 1736 | "distributionValue": { # Distribution represents a frequency distribution of double-valued sample # A distribution value. |
| 1737 | # points. It contains the size of the population of sample points plus |
| 1738 | # additional optional information: |
| 1739 | # |
| 1740 | # - the arithmetic mean of the samples |
| 1741 | # - the minimum and maximum of the samples |
| 1742 | # - the sum-squared-deviation of the samples, used to compute variance |
| 1743 | # - a histogram of the values of the sample points |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1744 | "count": "A String", # The total number of samples in the distribution. Must be >= 0. |
| 1745 | "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean: |
| 1746 | # Sum[i=1..count]((x_i - mean)^2) |
| 1747 | # where each x_i is a sample values. If `count` is zero then this field |
| 1748 | # must be zero, otherwise validation of the request fails. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1749 | "bucketCounts": [ # The number of samples in each histogram bucket. `bucket_counts` are |
| 1750 | # optional. If present, they must sum to the `count` value. |
| 1751 | # |
| 1752 | # The buckets are defined below in `bucket_option`. There are N buckets. |
| 1753 | # `bucket_counts[0]` is the number of samples in the underflow bucket. |
| 1754 | # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples |
| 1755 | # in each of the finite buckets. And `bucket_counts[N] is the number |
| 1756 | # of samples in the overflow bucket. See the comments of `bucket_option` |
| 1757 | # below for more details. |
| 1758 | # |
| 1759 | # Any suffix of trailing zeros may be omitted. |
| 1760 | "A String", |
| 1761 | ], |
| 1762 | "exponentialBuckets": { # Describing buckets with exponentially growing width. # Buckets with exponentially growing width. |
| 1763 | "scale": 3.14, # The i'th exponential bucket covers the interval |
| 1764 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 1765 | # where i ranges from 1 to num_finite_buckets inclusive. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1766 | # Must be > 0. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1767 | "growthFactor": 3.14, # The i'th exponential bucket covers the interval |
| 1768 | # [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 1769 | # where i ranges from 1 to num_finite_buckets inclusive. |
| 1770 | # Must be larger than 1.0. |
| 1771 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 1772 | # the total number of buckets is `num_finite_buckets` + 2. |
| 1773 | # See comments on `bucket_options` for details. |
| 1774 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1775 | "maximum": 3.14, # The maximum of the population of values. Ignored if `count` is zero. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1776 | "exemplars": [ # Example points. Must be in increasing order of `value` field. |
| 1777 | { # Exemplars are example points that may be used to annotate aggregated |
| 1778 | # distribution values. They are metadata that gives information about a |
| 1779 | # particular value added to a Distribution bucket, such as a trace ID that |
| 1780 | # was active when a value was added. They may contain further information, |
| 1781 | # such as a example values and timestamps, origin, etc. |
| 1782 | "timestamp": "A String", # The observation (sampling) time of the above value. |
| 1783 | "attachments": [ # Contextual information about the example value. Examples are: |
| 1784 | # |
| 1785 | # Trace: type.googleapis.com/google.monitoring.v3.SpanContext |
| 1786 | # |
| 1787 | # Literal string: type.googleapis.com/google.protobuf.StringValue |
| 1788 | # |
| 1789 | # Labels dropped during aggregation: |
| 1790 | # type.googleapis.com/google.monitoring.v3.DroppedLabels |
| 1791 | # |
| 1792 | # There may be only a single attachment of any given message type in a |
| 1793 | # single exemplar, and this is enforced by the system. |
| 1794 | { |
| 1795 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1796 | }, |
| 1797 | ], |
| 1798 | "value": 3.14, # Value of the exemplar point. This value determines to which bucket the |
| 1799 | # exemplar belongs. |
| 1800 | }, |
| 1801 | ], |
| 1802 | "minimum": 3.14, # The minimum of the population of values. Ignored if `count` is zero. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1803 | "linearBuckets": { # Describing buckets with constant width. # Buckets with constant width. |
| 1804 | "width": 3.14, # The i'th linear bucket covers the interval |
| 1805 | # [offset + (i-1) * width, offset + i * width) |
| 1806 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 1807 | # Must be strictly positive. |
| 1808 | "numFiniteBuckets": 42, # The number of finite buckets. With the underflow and overflow buckets, |
| 1809 | # the total number of buckets is `num_finite_buckets` + 2. |
| 1810 | # See comments on `bucket_options` for details. |
| 1811 | "offset": 3.14, # The i'th linear bucket covers the interval |
| 1812 | # [offset + (i-1) * width, offset + i * width) |
| 1813 | # where i ranges from 1 to num_finite_buckets, inclusive. |
| 1814 | }, |
| 1815 | "explicitBuckets": { # Describing buckets with arbitrary user-provided width. # Buckets with arbitrary user-provided width. |
| 1816 | "bounds": [ # 'bound' is a list of strictly increasing boundaries between |
| 1817 | # buckets. Note that a list of length N-1 defines N buckets because |
| 1818 | # of fenceposting. See comments on `bucket_options` for details. |
| 1819 | # |
| 1820 | # The i'th finite bucket covers the interval |
| 1821 | # [bound[i-1], bound[i]) |
| 1822 | # where i ranges from 1 to bound_size() - 1. Note that there are no |
| 1823 | # finite buckets at all if 'bound' only contains a single element; in |
| 1824 | # that special case the single bound defines the boundary between the |
| 1825 | # underflow and overflow buckets. |
| 1826 | # |
| 1827 | # bucket number lower bound upper bound |
| 1828 | # i == 0 (underflow) -inf bound[i] |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1829 | # 0 < i < bound_size() bound[i-1] bound[i] |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1830 | # i == bound_size() (overflow) bound[i-1] +inf |
| 1831 | 3.14, |
| 1832 | ], |
| 1833 | }, |
| 1834 | "mean": 3.14, # The arithmetic mean of the samples in the distribution. If `count` is |
| 1835 | # zero then this field must be zero. |
| 1836 | }, |
| 1837 | "stringValue": "A String", # A text string value. |
| 1838 | "int64Value": "A String", # A signed 64-bit integer value. |
| 1839 | "endTime": "A String", # The end of the time period over which this metric value's measurement |
| 1840 | # applies. |
| 1841 | }, |
| 1842 | ], |
| 1843 | "metricName": "A String", # The metric name defined in the service configuration. |
| 1844 | }, |
| 1845 | ], |
| 1846 | "limitExceeded": [ # Quota Metrics that have exceeded quota limits. |
| 1847 | # For QuotaGroup-based quota, this is QuotaGroup.name |
| 1848 | # For QuotaLimit-based quota, this is QuotaLimit.name |
| 1849 | # See: google.api.Quota |
| 1850 | # Deprecated: Use quota_metrics to get per quota group limit exceeded status. |
| 1851 | "A String", |
| 1852 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1853 | }, |
| 1854 | "operationId": "A String", # The Operation.operation_id value from the request. |
| 1855 | }, |
| 1856 | ], |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1857 | "serviceConfigId": "A String", # The actual config id used to process the request. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1858 | "serviceRolloutId": "A String", # The current service rollout id used to process the request. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1859 | }</pre> |
| 1860 | </div> |
| 1861 | |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1862 | </body></html> |