Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="logging_v2.html">Stackdriver Logging API</a> . <a href="logging_v2.projects.html">projects</a> . <a href="logging_v2.projects.metrics.html">metrics</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#create">create(parent=None, body, x__xgafv=None)</a></code></p> |
| 79 | <p class="firstline">Creates a logs-based metric.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#delete">delete(metricName=None, x__xgafv=None)</a></code></p> |
| 82 | <p class="firstline">Deletes a logs-based metric.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#get">get(metricName=None, x__xgafv=None)</a></code></p> |
| 85 | <p class="firstline">Gets a logs-based metric.</p> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#list">list(parent=None, pageToken=None, x__xgafv=None, pageSize=None)</a></code></p> |
| 88 | <p class="firstline">Lists logs-based metrics.</p> |
| 89 | <p class="toc_element"> |
| 90 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 91 | <p class="firstline">Retrieves the next page of results.</p> |
| 92 | <p class="toc_element"> |
| 93 | <code><a href="#update">update(metricName=None, body, x__xgafv=None)</a></code></p> |
| 94 | <p class="firstline">Creates or updates a logs-based metric.</p> |
| 95 | <h3>Method Details</h3> |
| 96 | <div class="method"> |
| 97 | <code class="details" id="create">create(parent=None, body, x__xgafv=None)</code> |
| 98 | <pre>Creates a logs-based metric. |
| 99 | |
| 100 | Args: |
| 101 | parent: string, The resource name of the project in which to create the metric. |
| 102 | Example: `"projects/my-project-id"`. |
| 103 | |
| 104 | The new metric must be provided in the request. (required) |
| 105 | body: object, The request body. (required) |
| 106 | The object takes the form of: |
| 107 | |
| 108 | { # Describes a logs-based metric. The value of the metric is the |
| 109 | # number of log entries that match a logs filter. |
| 110 | "filter": "A String", # Required. An [advanced logs filter](/logging/docs/view/advanced_filters). |
| 111 | # Example: `"resource.type=gae_app AND severity>=ERROR"`. |
| 112 | "version": "A String", # Output only. The API version that created or updated this metric. |
| 113 | # The version also dictates the syntax of the filter expression. When a value |
| 114 | # for this field is missing, the default value of V2 should be assumed. |
| 115 | "description": "A String", # Optional. A description of this metric, which is used in documentation. |
| 116 | "name": "A String", # Required. The client-assigned metric identifier. Example: |
| 117 | # `"severe_errors"`. Metric identifiers are limited to 100 |
| 118 | # characters and can include only the following characters: `A-Z`, |
| 119 | # `a-z`, `0-9`, and the special characters `_-.,+!*',()%/`. The |
| 120 | # forward-slash character (`/`) denotes a hierarchy of name pieces, |
| 121 | # and it cannot be the first character of the name. The '%' character |
| 122 | # is used to URL encode unsafe and reserved characters and must be |
| 123 | # followed by two hexadecimal digits according to RFC 1738. |
| 124 | } |
| 125 | |
| 126 | x__xgafv: string, V1 error format. |
| 127 | Allowed values |
| 128 | 1 - v1 error format |
| 129 | 2 - v2 error format |
| 130 | |
| 131 | Returns: |
| 132 | An object of the form: |
| 133 | |
| 134 | { # Describes a logs-based metric. The value of the metric is the |
| 135 | # number of log entries that match a logs filter. |
| 136 | "filter": "A String", # Required. An [advanced logs filter](/logging/docs/view/advanced_filters). |
| 137 | # Example: `"resource.type=gae_app AND severity>=ERROR"`. |
| 138 | "version": "A String", # Output only. The API version that created or updated this metric. |
| 139 | # The version also dictates the syntax of the filter expression. When a value |
| 140 | # for this field is missing, the default value of V2 should be assumed. |
| 141 | "description": "A String", # Optional. A description of this metric, which is used in documentation. |
| 142 | "name": "A String", # Required. The client-assigned metric identifier. Example: |
| 143 | # `"severe_errors"`. Metric identifiers are limited to 100 |
| 144 | # characters and can include only the following characters: `A-Z`, |
| 145 | # `a-z`, `0-9`, and the special characters `_-.,+!*',()%/`. The |
| 146 | # forward-slash character (`/`) denotes a hierarchy of name pieces, |
| 147 | # and it cannot be the first character of the name. The '%' character |
| 148 | # is used to URL encode unsafe and reserved characters and must be |
| 149 | # followed by two hexadecimal digits according to RFC 1738. |
| 150 | }</pre> |
| 151 | </div> |
| 152 | |
| 153 | <div class="method"> |
| 154 | <code class="details" id="delete">delete(metricName=None, x__xgafv=None)</code> |
| 155 | <pre>Deletes a logs-based metric. |
| 156 | |
| 157 | Args: |
| 158 | metricName: string, The resource name of the metric to delete. |
| 159 | Example: `"projects/my-project-id/metrics/my-metric-id"`. (required) |
| 160 | x__xgafv: string, V1 error format. |
| 161 | Allowed values |
| 162 | 1 - v1 error format |
| 163 | 2 - v2 error format |
| 164 | |
| 165 | Returns: |
| 166 | An object of the form: |
| 167 | |
| 168 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 169 | # empty messages in your APIs. A typical example is to use it as the request |
| 170 | # or the response type of an API method. For instance: |
| 171 | # |
| 172 | # service Foo { |
| 173 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 174 | # } |
| 175 | # |
| 176 | # The JSON representation for `Empty` is empty JSON object `{}`. |
| 177 | }</pre> |
| 178 | </div> |
| 179 | |
| 180 | <div class="method"> |
| 181 | <code class="details" id="get">get(metricName=None, x__xgafv=None)</code> |
| 182 | <pre>Gets a logs-based metric. |
| 183 | |
| 184 | Args: |
| 185 | metricName: string, The resource name of the desired metric. |
| 186 | Example: `"projects/my-project-id/metrics/my-metric-id"`. (required) |
| 187 | x__xgafv: string, V1 error format. |
| 188 | Allowed values |
| 189 | 1 - v1 error format |
| 190 | 2 - v2 error format |
| 191 | |
| 192 | Returns: |
| 193 | An object of the form: |
| 194 | |
| 195 | { # Describes a logs-based metric. The value of the metric is the |
| 196 | # number of log entries that match a logs filter. |
| 197 | "filter": "A String", # Required. An [advanced logs filter](/logging/docs/view/advanced_filters). |
| 198 | # Example: `"resource.type=gae_app AND severity>=ERROR"`. |
| 199 | "version": "A String", # Output only. The API version that created or updated this metric. |
| 200 | # The version also dictates the syntax of the filter expression. When a value |
| 201 | # for this field is missing, the default value of V2 should be assumed. |
| 202 | "description": "A String", # Optional. A description of this metric, which is used in documentation. |
| 203 | "name": "A String", # Required. The client-assigned metric identifier. Example: |
| 204 | # `"severe_errors"`. Metric identifiers are limited to 100 |
| 205 | # characters and can include only the following characters: `A-Z`, |
| 206 | # `a-z`, `0-9`, and the special characters `_-.,+!*',()%/`. The |
| 207 | # forward-slash character (`/`) denotes a hierarchy of name pieces, |
| 208 | # and it cannot be the first character of the name. The '%' character |
| 209 | # is used to URL encode unsafe and reserved characters and must be |
| 210 | # followed by two hexadecimal digits according to RFC 1738. |
| 211 | }</pre> |
| 212 | </div> |
| 213 | |
| 214 | <div class="method"> |
| 215 | <code class="details" id="list">list(parent=None, pageToken=None, x__xgafv=None, pageSize=None)</code> |
| 216 | <pre>Lists logs-based metrics. |
| 217 | |
| 218 | Args: |
| 219 | parent: string, Required. The resource name containing the metrics. |
| 220 | Example: `"projects/my-project-id"`. (required) |
| 221 | pageToken: string, Optional. If present, then retrieve the next batch of results from the |
| 222 | preceding call to this method. `pageToken` must be the value of |
| 223 | `nextPageToken` from the previous response. The values of other method |
| 224 | parameters should be identical to those in the previous call. |
| 225 | x__xgafv: string, V1 error format. |
| 226 | Allowed values |
| 227 | 1 - v1 error format |
| 228 | 2 - v2 error format |
| 229 | pageSize: integer, Optional. The maximum number of results to return from this request. |
| 230 | Non-positive values are ignored. The presence of `nextPageToken` in the |
| 231 | response indicates that more results might be available. |
| 232 | |
| 233 | Returns: |
| 234 | An object of the form: |
| 235 | |
| 236 | { # Result returned from ListLogMetrics. |
| 237 | "metrics": [ # A list of logs-based metrics. |
| 238 | { # Describes a logs-based metric. The value of the metric is the |
| 239 | # number of log entries that match a logs filter. |
| 240 | "filter": "A String", # Required. An [advanced logs filter](/logging/docs/view/advanced_filters). |
| 241 | # Example: `"resource.type=gae_app AND severity>=ERROR"`. |
| 242 | "version": "A String", # Output only. The API version that created or updated this metric. |
| 243 | # The version also dictates the syntax of the filter expression. When a value |
| 244 | # for this field is missing, the default value of V2 should be assumed. |
| 245 | "description": "A String", # Optional. A description of this metric, which is used in documentation. |
| 246 | "name": "A String", # Required. The client-assigned metric identifier. Example: |
| 247 | # `"severe_errors"`. Metric identifiers are limited to 100 |
| 248 | # characters and can include only the following characters: `A-Z`, |
| 249 | # `a-z`, `0-9`, and the special characters `_-.,+!*',()%/`. The |
| 250 | # forward-slash character (`/`) denotes a hierarchy of name pieces, |
| 251 | # and it cannot be the first character of the name. The '%' character |
| 252 | # is used to URL encode unsafe and reserved characters and must be |
| 253 | # followed by two hexadecimal digits according to RFC 1738. |
| 254 | }, |
| 255 | ], |
| 256 | "nextPageToken": "A String", # If there might be more results than appear in this response, then |
| 257 | # `nextPageToken` is included. To get the next set of results, call this |
| 258 | # method again using the value of `nextPageToken` as `pageToken`. |
| 259 | }</pre> |
| 260 | </div> |
| 261 | |
| 262 | <div class="method"> |
| 263 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 264 | <pre>Retrieves the next page of results. |
| 265 | |
| 266 | Args: |
| 267 | previous_request: The request for the previous page. (required) |
| 268 | previous_response: The response from the request for the previous page. (required) |
| 269 | |
| 270 | Returns: |
| 271 | A request object that you can call 'execute()' on to request the next |
| 272 | page. Returns None if there are no more items in the collection. |
| 273 | </pre> |
| 274 | </div> |
| 275 | |
| 276 | <div class="method"> |
| 277 | <code class="details" id="update">update(metricName=None, body, x__xgafv=None)</code> |
| 278 | <pre>Creates or updates a logs-based metric. |
| 279 | |
| 280 | Args: |
| 281 | metricName: string, The resource name of the metric to update. |
| 282 | Example: `"projects/my-project-id/metrics/my-metric-id"`. |
| 283 | |
| 284 | The updated metric must be provided in the request and have the |
| 285 | same identifier that is specified in `metricName`. |
| 286 | If the metric does not exist, it is created. (required) |
| 287 | body: object, The request body. (required) |
| 288 | The object takes the form of: |
| 289 | |
| 290 | { # Describes a logs-based metric. The value of the metric is the |
| 291 | # number of log entries that match a logs filter. |
| 292 | "filter": "A String", # Required. An [advanced logs filter](/logging/docs/view/advanced_filters). |
| 293 | # Example: `"resource.type=gae_app AND severity>=ERROR"`. |
| 294 | "version": "A String", # Output only. The API version that created or updated this metric. |
| 295 | # The version also dictates the syntax of the filter expression. When a value |
| 296 | # for this field is missing, the default value of V2 should be assumed. |
| 297 | "description": "A String", # Optional. A description of this metric, which is used in documentation. |
| 298 | "name": "A String", # Required. The client-assigned metric identifier. Example: |
| 299 | # `"severe_errors"`. Metric identifiers are limited to 100 |
| 300 | # characters and can include only the following characters: `A-Z`, |
| 301 | # `a-z`, `0-9`, and the special characters `_-.,+!*',()%/`. The |
| 302 | # forward-slash character (`/`) denotes a hierarchy of name pieces, |
| 303 | # and it cannot be the first character of the name. The '%' character |
| 304 | # is used to URL encode unsafe and reserved characters and must be |
| 305 | # followed by two hexadecimal digits according to RFC 1738. |
| 306 | } |
| 307 | |
| 308 | x__xgafv: string, V1 error format. |
| 309 | Allowed values |
| 310 | 1 - v1 error format |
| 311 | 2 - v2 error format |
| 312 | |
| 313 | Returns: |
| 314 | An object of the form: |
| 315 | |
| 316 | { # Describes a logs-based metric. The value of the metric is the |
| 317 | # number of log entries that match a logs filter. |
| 318 | "filter": "A String", # Required. An [advanced logs filter](/logging/docs/view/advanced_filters). |
| 319 | # Example: `"resource.type=gae_app AND severity>=ERROR"`. |
| 320 | "version": "A String", # Output only. The API version that created or updated this metric. |
| 321 | # The version also dictates the syntax of the filter expression. When a value |
| 322 | # for this field is missing, the default value of V2 should be assumed. |
| 323 | "description": "A String", # Optional. A description of this metric, which is used in documentation. |
| 324 | "name": "A String", # Required. The client-assigned metric identifier. Example: |
| 325 | # `"severe_errors"`. Metric identifiers are limited to 100 |
| 326 | # characters and can include only the following characters: `A-Z`, |
| 327 | # `a-z`, `0-9`, and the special characters `_-.,+!*',()%/`. The |
| 328 | # forward-slash character (`/`) denotes a hierarchy of name pieces, |
| 329 | # and it cannot be the first character of the name. The '%' character |
| 330 | # is used to URL encode unsafe and reserved characters and must be |
| 331 | # followed by two hexadecimal digits according to RFC 1738. |
| 332 | }</pre> |
| 333 | </div> |
| 334 | |
| 335 | </body></html> |