blob: 2866ef94497f0061c10af5ced9da63e4801beec5 [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.sinks.html">sinks</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 sink.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(sinkName=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes a sink.</p>
83<p class="toc_element">
84 <code><a href="#get">get(sinkName=None, x__xgafv=None)</a></code></p>
85<p class="firstline">Gets a sink.</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 sinks.</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(sinkName=None, body, x__xgafv=None)</a></code></p>
94<p class="firstline">Updates or creates a sink.</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 sink.
99
100Args:
101 parent: string, Required. The resource in which to create the sink.
102Example: `"projects/my-project-id"`.
103The new sink must be provided in the request. (required)
104 body: object, The request body. (required)
105 The object takes the form of:
106
107{ # Describes a sink used to export log entries outside of Stackdriver Logging.
108 "endTime": "A String", # Optional. Time at which this sink expires.
109 "name": "A String", # Required. The client-assigned sink identifier, unique within the
110 # project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
111 # limited to 1000 characters and can include only the following characters:
112 # `A-Z`, `a-z`, `0-9`, and the special characters `_-.`. The maximum length
113 # of the name is 100 characters.
114 "destination": "A String", # Required. The export destination. See
115 # [Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs).
116 # Examples:
117 #
118 # "storage.googleapis.com/my-gcs-bucket"
119 # "bigquery.googleapis.com/projects/my-project-id/datasets/my-dataset"
120 # "pubsub.googleapis.com/projects/my-project/topics/my-topic"
121 "filter": "A String", # Optional. An [advanced logs filter](/logging/docs/view/advanced_filters).
122 # Only log entries matching the filter are exported. The filter
123 # must be consistent with the log entry format specified by the
124 # `outputVersionFormat` parameter, regardless of the format of the
125 # log entry that was originally written to Stackdriver Logging.
126 # Example filter (V2 format):
127 #
128 # logName=projects/my-projectid/logs/syslog AND severity>=ERROR
129 "startTime": "A String", # Optional. Time range for which this sink is active.
130 # Logs are exported only if start_time <= entry.timestamp < end_time
131 # Both start_time and end_time may be omitted to specify
132 # (half) infinite ranges. The start_time must be less than the end_time.
133 "outputVersionFormat": "A String", # Optional. The log entry version to use for this sink's exported log
134 # entries. This version does not have to correspond to the version of the
135 # log entry that was written to Stackdriver Logging. If omitted, the
136 # v2 format is used.
137 "writerIdentity": "A String", # Output only. The IAM identity to which the destination needs to grant write
138 # access. This may be a service account or a group.
139 # Examples (Do not assume these specific values):
140 # "serviceAccount:cloud-logs@system.gserviceaccount.com"
141 # "group:cloud-logs@google.com"
142 #
143 # For GCS destinations, the role "roles/owner" is required on the bucket
144 # For Cloud Pubsub destinations, the role "roles/pubsub.publisher" is
145 # required on the topic
146 # For BigQuery, the role "roles/editor" is required on the dataset
147 }
148
149 x__xgafv: string, V1 error format.
150 Allowed values
151 1 - v1 error format
152 2 - v2 error format
153
154Returns:
155 An object of the form:
156
157 { # Describes a sink used to export log entries outside of Stackdriver Logging.
158 "endTime": "A String", # Optional. Time at which this sink expires.
159 "name": "A String", # Required. The client-assigned sink identifier, unique within the
160 # project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
161 # limited to 1000 characters and can include only the following characters:
162 # `A-Z`, `a-z`, `0-9`, and the special characters `_-.`. The maximum length
163 # of the name is 100 characters.
164 "destination": "A String", # Required. The export destination. See
165 # [Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs).
166 # Examples:
167 #
168 # "storage.googleapis.com/my-gcs-bucket"
169 # "bigquery.googleapis.com/projects/my-project-id/datasets/my-dataset"
170 # "pubsub.googleapis.com/projects/my-project/topics/my-topic"
171 "filter": "A String", # Optional. An [advanced logs filter](/logging/docs/view/advanced_filters).
172 # Only log entries matching the filter are exported. The filter
173 # must be consistent with the log entry format specified by the
174 # `outputVersionFormat` parameter, regardless of the format of the
175 # log entry that was originally written to Stackdriver Logging.
176 # Example filter (V2 format):
177 #
178 # logName=projects/my-projectid/logs/syslog AND severity>=ERROR
179 "startTime": "A String", # Optional. Time range for which this sink is active.
180 # Logs are exported only if start_time <= entry.timestamp < end_time
181 # Both start_time and end_time may be omitted to specify
182 # (half) infinite ranges. The start_time must be less than the end_time.
183 "outputVersionFormat": "A String", # Optional. The log entry version to use for this sink's exported log
184 # entries. This version does not have to correspond to the version of the
185 # log entry that was written to Stackdriver Logging. If omitted, the
186 # v2 format is used.
187 "writerIdentity": "A String", # Output only. The IAM identity to which the destination needs to grant write
188 # access. This may be a service account or a group.
189 # Examples (Do not assume these specific values):
190 # "serviceAccount:cloud-logs@system.gserviceaccount.com"
191 # "group:cloud-logs@google.com"
192 #
193 # For GCS destinations, the role "roles/owner" is required on the bucket
194 # For Cloud Pubsub destinations, the role "roles/pubsub.publisher" is
195 # required on the topic
196 # For BigQuery, the role "roles/editor" is required on the dataset
197 }</pre>
198</div>
199
200<div class="method">
201 <code class="details" id="delete">delete(sinkName=None, x__xgafv=None)</code>
202 <pre>Deletes a sink.
203
204Args:
205 sinkName: string, Required. The resource name of the sink to delete, including the parent
206resource and the sink identifier. Example:
207`"projects/my-project-id/sinks/my-sink-id"`. It is an error if the sink
208does not exist. (required)
209 x__xgafv: string, V1 error format.
210 Allowed values
211 1 - v1 error format
212 2 - v2 error format
213
214Returns:
215 An object of the form:
216
217 { # A generic empty message that you can re-use to avoid defining duplicated
218 # empty messages in your APIs. A typical example is to use it as the request
219 # or the response type of an API method. For instance:
220 #
221 # service Foo {
222 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
223 # }
224 #
225 # The JSON representation for `Empty` is empty JSON object `{}`.
226 }</pre>
227</div>
228
229<div class="method">
230 <code class="details" id="get">get(sinkName=None, x__xgafv=None)</code>
231 <pre>Gets a sink.
232
233Args:
234 sinkName: string, Required. The resource name of the sink to return.
235Example: `"projects/my-project-id/sinks/my-sink-id"`. (required)
236 x__xgafv: string, V1 error format.
237 Allowed values
238 1 - v1 error format
239 2 - v2 error format
240
241Returns:
242 An object of the form:
243
244 { # Describes a sink used to export log entries outside of Stackdriver Logging.
245 "endTime": "A String", # Optional. Time at which this sink expires.
246 "name": "A String", # Required. The client-assigned sink identifier, unique within the
247 # project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
248 # limited to 1000 characters and can include only the following characters:
249 # `A-Z`, `a-z`, `0-9`, and the special characters `_-.`. The maximum length
250 # of the name is 100 characters.
251 "destination": "A String", # Required. The export destination. See
252 # [Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs).
253 # Examples:
254 #
255 # "storage.googleapis.com/my-gcs-bucket"
256 # "bigquery.googleapis.com/projects/my-project-id/datasets/my-dataset"
257 # "pubsub.googleapis.com/projects/my-project/topics/my-topic"
258 "filter": "A String", # Optional. An [advanced logs filter](/logging/docs/view/advanced_filters).
259 # Only log entries matching the filter are exported. The filter
260 # must be consistent with the log entry format specified by the
261 # `outputVersionFormat` parameter, regardless of the format of the
262 # log entry that was originally written to Stackdriver Logging.
263 # Example filter (V2 format):
264 #
265 # logName=projects/my-projectid/logs/syslog AND severity>=ERROR
266 "startTime": "A String", # Optional. Time range for which this sink is active.
267 # Logs are exported only if start_time <= entry.timestamp < end_time
268 # Both start_time and end_time may be omitted to specify
269 # (half) infinite ranges. The start_time must be less than the end_time.
270 "outputVersionFormat": "A String", # Optional. The log entry version to use for this sink's exported log
271 # entries. This version does not have to correspond to the version of the
272 # log entry that was written to Stackdriver Logging. If omitted, the
273 # v2 format is used.
274 "writerIdentity": "A String", # Output only. The IAM identity to which the destination needs to grant write
275 # access. This may be a service account or a group.
276 # Examples (Do not assume these specific values):
277 # "serviceAccount:cloud-logs@system.gserviceaccount.com"
278 # "group:cloud-logs@google.com"
279 #
280 # For GCS destinations, the role "roles/owner" is required on the bucket
281 # For Cloud Pubsub destinations, the role "roles/pubsub.publisher" is
282 # required on the topic
283 # For BigQuery, the role "roles/editor" is required on the dataset
284 }</pre>
285</div>
286
287<div class="method">
288 <code class="details" id="list">list(parent=None, pageToken=None, x__xgafv=None, pageSize=None)</code>
289 <pre>Lists sinks.
290
291Args:
292 parent: string, Required. The cloud resource containing the sinks.
293Example: `"projects/my-logging-project"`. (required)
294 pageToken: string, Optional. If present, then retrieve the next batch of results from the
295preceding call to this method. `pageToken` must be the value of
296`nextPageToken` from the previous response. The values of other method
297parameters should be identical to those in the previous call.
298 x__xgafv: string, V1 error format.
299 Allowed values
300 1 - v1 error format
301 2 - v2 error format
302 pageSize: integer, Optional. The maximum number of results to return from this request.
303Non-positive values are ignored. The presence of `nextPageToken` in the
304response indicates that more results might be available.
305
306Returns:
307 An object of the form:
308
309 { # Result returned from `ListSinks`.
310 "nextPageToken": "A String", # If there might be more results than appear in this response, then
311 # `nextPageToken` is included. To get the next set of results, call the same
312 # method again using the value of `nextPageToken` as `pageToken`.
313 "sinks": [ # A list of sinks.
314 { # Describes a sink used to export log entries outside of Stackdriver Logging.
315 "endTime": "A String", # Optional. Time at which this sink expires.
316 "name": "A String", # Required. The client-assigned sink identifier, unique within the
317 # project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
318 # limited to 1000 characters and can include only the following characters:
319 # `A-Z`, `a-z`, `0-9`, and the special characters `_-.`. The maximum length
320 # of the name is 100 characters.
321 "destination": "A String", # Required. The export destination. See
322 # [Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs).
323 # Examples:
324 #
325 # "storage.googleapis.com/my-gcs-bucket"
326 # "bigquery.googleapis.com/projects/my-project-id/datasets/my-dataset"
327 # "pubsub.googleapis.com/projects/my-project/topics/my-topic"
328 "filter": "A String", # Optional. An [advanced logs filter](/logging/docs/view/advanced_filters).
329 # Only log entries matching the filter are exported. The filter
330 # must be consistent with the log entry format specified by the
331 # `outputVersionFormat` parameter, regardless of the format of the
332 # log entry that was originally written to Stackdriver Logging.
333 # Example filter (V2 format):
334 #
335 # logName=projects/my-projectid/logs/syslog AND severity>=ERROR
336 "startTime": "A String", # Optional. Time range for which this sink is active.
337 # Logs are exported only if start_time <= entry.timestamp < end_time
338 # Both start_time and end_time may be omitted to specify
339 # (half) infinite ranges. The start_time must be less than the end_time.
340 "outputVersionFormat": "A String", # Optional. The log entry version to use for this sink's exported log
341 # entries. This version does not have to correspond to the version of the
342 # log entry that was written to Stackdriver Logging. If omitted, the
343 # v2 format is used.
344 "writerIdentity": "A String", # Output only. The IAM identity to which the destination needs to grant write
345 # access. This may be a service account or a group.
346 # Examples (Do not assume these specific values):
347 # "serviceAccount:cloud-logs@system.gserviceaccount.com"
348 # "group:cloud-logs@google.com"
349 #
350 # For GCS destinations, the role "roles/owner" is required on the bucket
351 # For Cloud Pubsub destinations, the role "roles/pubsub.publisher" is
352 # required on the topic
353 # For BigQuery, the role "roles/editor" is required on the dataset
354 },
355 ],
356 }</pre>
357</div>
358
359<div class="method">
360 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
361 <pre>Retrieves the next page of results.
362
363Args:
364 previous_request: The request for the previous page. (required)
365 previous_response: The response from the request for the previous page. (required)
366
367Returns:
368 A request object that you can call 'execute()' on to request the next
369 page. Returns None if there are no more items in the collection.
370 </pre>
371</div>
372
373<div class="method">
374 <code class="details" id="update">update(sinkName=None, body, x__xgafv=None)</code>
375 <pre>Updates or creates a sink.
376
377Args:
378 sinkName: string, Required. The resource name of the sink to update, including the parent
379resource and the sink identifier. If the sink does not exist, this method
380creates the sink. Example: `"projects/my-project-id/sinks/my-sink-id"`. (required)
381 body: object, The request body. (required)
382 The object takes the form of:
383
384{ # Describes a sink used to export log entries outside of Stackdriver Logging.
385 "endTime": "A String", # Optional. Time at which this sink expires.
386 "name": "A String", # Required. The client-assigned sink identifier, unique within the
387 # project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
388 # limited to 1000 characters and can include only the following characters:
389 # `A-Z`, `a-z`, `0-9`, and the special characters `_-.`. The maximum length
390 # of the name is 100 characters.
391 "destination": "A String", # Required. The export destination. See
392 # [Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs).
393 # Examples:
394 #
395 # "storage.googleapis.com/my-gcs-bucket"
396 # "bigquery.googleapis.com/projects/my-project-id/datasets/my-dataset"
397 # "pubsub.googleapis.com/projects/my-project/topics/my-topic"
398 "filter": "A String", # Optional. An [advanced logs filter](/logging/docs/view/advanced_filters).
399 # Only log entries matching the filter are exported. The filter
400 # must be consistent with the log entry format specified by the
401 # `outputVersionFormat` parameter, regardless of the format of the
402 # log entry that was originally written to Stackdriver Logging.
403 # Example filter (V2 format):
404 #
405 # logName=projects/my-projectid/logs/syslog AND severity>=ERROR
406 "startTime": "A String", # Optional. Time range for which this sink is active.
407 # Logs are exported only if start_time <= entry.timestamp < end_time
408 # Both start_time and end_time may be omitted to specify
409 # (half) infinite ranges. The start_time must be less than the end_time.
410 "outputVersionFormat": "A String", # Optional. The log entry version to use for this sink's exported log
411 # entries. This version does not have to correspond to the version of the
412 # log entry that was written to Stackdriver Logging. If omitted, the
413 # v2 format is used.
414 "writerIdentity": "A String", # Output only. The IAM identity to which the destination needs to grant write
415 # access. This may be a service account or a group.
416 # Examples (Do not assume these specific values):
417 # "serviceAccount:cloud-logs@system.gserviceaccount.com"
418 # "group:cloud-logs@google.com"
419 #
420 # For GCS destinations, the role "roles/owner" is required on the bucket
421 # For Cloud Pubsub destinations, the role "roles/pubsub.publisher" is
422 # required on the topic
423 # For BigQuery, the role "roles/editor" is required on the dataset
424 }
425
426 x__xgafv: string, V1 error format.
427 Allowed values
428 1 - v1 error format
429 2 - v2 error format
430
431Returns:
432 An object of the form:
433
434 { # Describes a sink used to export log entries outside of Stackdriver Logging.
435 "endTime": "A String", # Optional. Time at which this sink expires.
436 "name": "A String", # Required. The client-assigned sink identifier, unique within the
437 # project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
438 # limited to 1000 characters and can include only the following characters:
439 # `A-Z`, `a-z`, `0-9`, and the special characters `_-.`. The maximum length
440 # of the name is 100 characters.
441 "destination": "A String", # Required. The export destination. See
442 # [Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs).
443 # Examples:
444 #
445 # "storage.googleapis.com/my-gcs-bucket"
446 # "bigquery.googleapis.com/projects/my-project-id/datasets/my-dataset"
447 # "pubsub.googleapis.com/projects/my-project/topics/my-topic"
448 "filter": "A String", # Optional. An [advanced logs filter](/logging/docs/view/advanced_filters).
449 # Only log entries matching the filter are exported. The filter
450 # must be consistent with the log entry format specified by the
451 # `outputVersionFormat` parameter, regardless of the format of the
452 # log entry that was originally written to Stackdriver Logging.
453 # Example filter (V2 format):
454 #
455 # logName=projects/my-projectid/logs/syslog AND severity>=ERROR
456 "startTime": "A String", # Optional. Time range for which this sink is active.
457 # Logs are exported only if start_time <= entry.timestamp < end_time
458 # Both start_time and end_time may be omitted to specify
459 # (half) infinite ranges. The start_time must be less than the end_time.
460 "outputVersionFormat": "A String", # Optional. The log entry version to use for this sink's exported log
461 # entries. This version does not have to correspond to the version of the
462 # log entry that was written to Stackdriver Logging. If omitted, the
463 # v2 format is used.
464 "writerIdentity": "A String", # Output only. The IAM identity to which the destination needs to grant write
465 # access. This may be a service account or a group.
466 # Examples (Do not assume these specific values):
467 # "serviceAccount:cloud-logs@system.gserviceaccount.com"
468 # "group:cloud-logs@google.com"
469 #
470 # For GCS destinations, the role "roles/owner" is required on the bucket
471 # For Cloud Pubsub destinations, the role "roles/pubsub.publisher" is
472 # required on the topic
473 # For BigQuery, the role "roles/editor" is required on the dataset
474 }</pre>
475</div>
476
477</body></html>