blob: 2fc6597b9b64077045e0e7499fff34611804220f [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="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">
Thomas Coffee2f245372017-03-27 10:39:26 -070078 <code><a href="#create">create(parent, body, x__xgafv=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<p class="firstline">Creates a logs-based metric.</p>
80<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070081 <code><a href="#delete">delete(metricName, x__xgafv=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070082<p class="firstline">Deletes a logs-based metric.</p>
83<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070084 <code><a href="#get">get(metricName, x__xgafv=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070085<p class="firstline">Gets a logs-based metric.</p>
86<p class="toc_element">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040087 <code><a href="#list">list(parent, pageToken=None, x__xgafv=None, pageSize=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070088<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">
Thomas Coffee2f245372017-03-27 10:39:26 -070093 <code><a href="#update">update(metricName, body, x__xgafv=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070094<p class="firstline">Creates or updates a logs-based metric.</p>
95<h3>Method Details</h3>
96<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -070097 <code class="details" id="create">create(parent, body, x__xgafv=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070098 <pre>Creates a logs-based metric.
99
100Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800101 parent: string, The resource name of the project in which to create the metric:
102"projects/[PROJECT_ID]"
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700103The new metric must be provided in the request. (required)
104 body: object, The request body. (required)
105 The object takes the form of:
106
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800107{ # Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval.
108 "filter": "A String", # Required. An advanced logs filter which is used to match log entries. Example:
109 # "resource.type=gae_app AND severity>=ERROR"
110 # The maximum length of the filter is 20000 characters.
111 "version": "A String", # Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400112 "description": "A String", # Optional. A description of this metric, which is used in documentation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400113 "name": "A String", # Required. The client-assigned metric identifier. Examples: "error_count", "nginx/requests".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests".
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700114 }
115
116 x__xgafv: string, V1 error format.
117 Allowed values
118 1 - v1 error format
119 2 - v2 error format
120
121Returns:
122 An object of the form:
123
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800124 { # Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval.
125 "filter": "A String", # Required. An advanced logs filter which is used to match log entries. Example:
126 # "resource.type=gae_app AND severity>=ERROR"
127 # The maximum length of the filter is 20000 characters.
128 "version": "A String", # Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400129 "description": "A String", # Optional. A description of this metric, which is used in documentation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400130 "name": "A String", # Required. The client-assigned metric identifier. Examples: "error_count", "nginx/requests".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests".
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700131 }</pre>
132</div>
133
134<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700135 <code class="details" id="delete">delete(metricName, x__xgafv=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700136 <pre>Deletes a logs-based metric.
137
138Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800139 metricName: string, The resource name of the metric to delete:
140"projects/[PROJECT_ID]/metrics/[METRIC_ID]"
141 (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700142 x__xgafv: string, V1 error format.
143 Allowed values
144 1 - v1 error format
145 2 - v2 error format
146
147Returns:
148 An object of the form:
149
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800150 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
151 # service Foo {
152 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
153 # }
154 # The JSON representation for Empty is empty JSON object {}.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700155 }</pre>
156</div>
157
158<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700159 <code class="details" id="get">get(metricName, x__xgafv=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700160 <pre>Gets a logs-based metric.
161
162Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800163 metricName: string, The resource name of the desired metric:
164"projects/[PROJECT_ID]/metrics/[METRIC_ID]"
165 (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700166 x__xgafv: string, V1 error format.
167 Allowed values
168 1 - v1 error format
169 2 - v2 error format
170
171Returns:
172 An object of the form:
173
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800174 { # Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval.
175 "filter": "A String", # Required. An advanced logs filter which is used to match log entries. Example:
176 # "resource.type=gae_app AND severity>=ERROR"
177 # The maximum length of the filter is 20000 characters.
178 "version": "A String", # Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400179 "description": "A String", # Optional. A description of this metric, which is used in documentation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400180 "name": "A String", # Required. The client-assigned metric identifier. Examples: "error_count", "nginx/requests".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests".
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700181 }</pre>
182</div>
183
184<div class="method">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400185 <code class="details" id="list">list(parent, pageToken=None, x__xgafv=None, pageSize=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700186 <pre>Lists logs-based metrics.
187
188Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800189 parent: string, Required. The name of the project containing the metrics:
190"projects/[PROJECT_ID]"
191 (required)
192 pageToken: string, Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700193 x__xgafv: string, V1 error format.
194 Allowed values
195 1 - v1 error format
196 2 - v2 error format
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400197 pageSize: integer, Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700198
199Returns:
200 An object of the form:
201
202 { # Result returned from ListLogMetrics.
203 "metrics": [ # A list of logs-based metrics.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800204 { # Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval.
205 "filter": "A String", # Required. An advanced logs filter which is used to match log entries. Example:
206 # "resource.type=gae_app AND severity>=ERROR"
207 # The maximum length of the filter is 20000 characters.
208 "version": "A String", # Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400209 "description": "A String", # Optional. A description of this metric, which is used in documentation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400210 "name": "A String", # Required. The client-assigned metric identifier. Examples: "error_count", "nginx/requests".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests".
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700211 },
212 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800213 "nextPageToken": "A String", # If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700214 }</pre>
215</div>
216
217<div class="method">
218 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
219 <pre>Retrieves the next page of results.
220
221Args:
222 previous_request: The request for the previous page. (required)
223 previous_response: The response from the request for the previous page. (required)
224
225Returns:
226 A request object that you can call 'execute()' on to request the next
227 page. Returns None if there are no more items in the collection.
228 </pre>
229</div>
230
231<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700232 <code class="details" id="update">update(metricName, body, x__xgafv=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700233 <pre>Creates or updates a logs-based metric.
234
235Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800236 metricName: string, The resource name of the metric to update:
237"projects/[PROJECT_ID]/metrics/[METRIC_ID]"
238The updated metric must be provided in the request and it's name field must be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new metric is created. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700239 body: object, The request body. (required)
240 The object takes the form of:
241
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800242{ # Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval.
243 "filter": "A String", # Required. An advanced logs filter which is used to match log entries. Example:
244 # "resource.type=gae_app AND severity>=ERROR"
245 # The maximum length of the filter is 20000 characters.
246 "version": "A String", # Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400247 "description": "A String", # Optional. A description of this metric, which is used in documentation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400248 "name": "A String", # Required. The client-assigned metric identifier. Examples: "error_count", "nginx/requests".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests".
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700249 }
250
251 x__xgafv: string, V1 error format.
252 Allowed values
253 1 - v1 error format
254 2 - v2 error format
255
256Returns:
257 An object of the form:
258
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800259 { # Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval.
260 "filter": "A String", # Required. An advanced logs filter which is used to match log entries. Example:
261 # "resource.type=gae_app AND severity>=ERROR"
262 # The maximum length of the filter is 20000 characters.
263 "version": "A String", # Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400264 "description": "A String", # Optional. A description of this metric, which is used in documentation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400265 "name": "A String", # Required. The client-assigned metric identifier. Examples: "error_count", "nginx/requests".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests".
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700266 }</pre>
267</div>
268
269</body></html>