blob: c0c8764ff72d489a5ec5b3ce64d3dbc12a6720dc [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
Dan O'Mearadd494642020-05-01 07:42:23 -070075<h1><a href="logging_v2.html">Cloud Logging API</a> . <a href="logging_v2.entries.html">entries</a></h1>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#list">list(body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim65020912020-05-20 12:08:20 -070079<p class="firstline">Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see Exporting Logs (https://cloud.google.com/logging/docs/export).</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070080<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040081 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#write">write(body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070086<h3>Method Details</h3>
87<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070088 <code class="details" id="list">list(body=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -070089 <pre>Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see Exporting Logs (https://cloud.google.com/logging/docs/export).
Sai Cheemalapatidf613972016-10-21 13:59:49 -070090
91Args:
Dan O'Mearadd494642020-05-01 07:42:23 -070092 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -070093 The object takes the form of:
94
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080095{ # The parameters to ListLogEntries.
Bu Sun Kim65020912020-05-20 12:08:20 -070096 &quot;orderBy&quot;: &quot;A String&quot;, # Optional. How the results should be sorted. Presently, the only permitted values are &quot;timestamp asc&quot; (default) and &quot;timestamp desc&quot;. The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of their insert_id values.
97 &quot;resourceNames&quot;: [ # Required. Names of one or more parent resources from which to retrieve log entries:
98 # &quot;projects/[PROJECT_ID]&quot;
99 # &quot;organizations/[ORGANIZATION_ID]&quot;
100 # &quot;billingAccounts/[BILLING_ACCOUNT_ID]&quot;
101 # &quot;folders/[FOLDER_ID]&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800102 # Projects listed in the project_ids field are added to this list.
Bu Sun Kim65020912020-05-20 12:08:20 -0700103 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700104 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700105 &quot;filter&quot;: &quot;A String&quot;, # Optional. A filter that chooses which log entries to return. See Advanced Logs Queries (https://cloud.google.com/logging/docs/view/advanced-queries). Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in resource_names. Referencing a parent resource that is not listed in resource_names will cause the filter to return no results. The maximum length of the filter is 20000 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700106 &quot;projectIds&quot;: [ # Optional. Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: &quot;my-project-1A&quot;.
107 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700108 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700109 &quot;pageToken&quot;: &quot;A String&quot;, # Optional. If present, then retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of other method parameters should be identical to those in the previous call.
110 &quot;pageSize&quot;: 42, # Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of next_page_token in the response indicates that more results might be available.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700111 }
112
113 x__xgafv: string, V1 error format.
114 Allowed values
115 1 - v1 error format
116 2 - v2 error format
117
118Returns:
119 An object of the form:
120
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800121 { # Result returned from ListLogEntries.
Bu Sun Kim65020912020-05-20 12:08:20 -0700122 &quot;nextPageToken&quot;: &quot;A String&quot;, # If there might be more results than those appearing 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.If a value for next_page_token appears and the entries field is empty, it means that the search found no log entries so far but it did not have time to search all the possible log entries. Retry the method with this value for page_token to continue the search. Alternatively, consider speeding up the search by changing your filter to specify a single log name or resource type, or to narrow the time range of the search.
123 &quot;entries&quot;: [ # A list of log entries. If entries is empty, nextPageToken may still be returned, indicating that more entries may exist. See nextPageToken for more information.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700124 { # An individual entry in a log.
Bu Sun Kim65020912020-05-20 12:08:20 -0700125 &quot;operation&quot;: { # Additional information about a potentially long-running operation with which a log entry is associated. # Optional. Information about an operation associated with the log entry, if applicable.
Bu Sun Kim65020912020-05-20 12:08:20 -0700126 &quot;id&quot;: &quot;A String&quot;, # Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation.
127 &quot;producer&quot;: &quot;A String&quot;, # Optional. An arbitrary producer identifier. The combination of id and producer must be globally unique. Examples for producer: &quot;MyDivision.MyBigCompany.com&quot;, &quot;github.com/MyProject/MyApplication&quot;.
128 &quot;first&quot;: True or False, # Optional. Set this to True if this is the first log entry in the operation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700129 &quot;last&quot;: True or False, # Optional. Set this to True if this is the last log entry in the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700130 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700131 &quot;insertId&quot;: &quot;A String&quot;, # Optional. A unique identifier for the log entry. If you provide a value, then Logging considers other log entries in the same project, with the same timestamp, and with the same insert_id to be duplicates which are removed in a single query result. However, there are no guarantees of de-duplication in the export of logs.If the insert_id is omitted when writing a log entry, the Logging API assigns its own unique identifier in this field.In queries, the insert_id is also used to order log entries that have the same log_name and timestamp values.
132 &quot;metadata&quot;: { # Auxiliary metadata for a MonitoredResource object. MonitoredResource objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Monitoring and Logging use an ingestion pipeline to extract metadata for cloud resources of all types, and store the metadata in this message. # Output only. Deprecated. Additional metadata about the monitored resource.Only k8s_container, k8s_pod, and k8s_node MonitoredResources have this field populated for GKE versions older than 1.12.6. For GKE versions 1.12.6 and above, the metadata field has been deprecated. The Kubernetes pod labels that used to be in metadata.userLabels will now be present in the labels field with a key prefix of k8s-pod/. The system labels that were present in the metadata.systemLabels field will no longer be available in the LogEntry.
133 &quot;systemLabels&quot;: { # Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including &quot;machine_image&quot;, &quot;vpc&quot;, &quot;subnet_id&quot;, &quot;security_group&quot;, &quot;name&quot;, etc. System label values can be only strings, Boolean values, or a list of strings. For example:
134 # { &quot;name&quot;: &quot;my-test-instance&quot;,
135 # &quot;security_group&quot;: [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;],
136 # &quot;spot_instance&quot;: false }
137 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700139 &quot;userLabels&quot;: { # Output only. A map of user-defined metadata labels.
140 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700141 },
142 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700143 &quot;textPayload&quot;: &quot;A String&quot;, # The log entry payload, represented as a Unicode string (UTF-8).
144 &quot;protoPayload&quot;: { # The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads.The following protocol buffer types are supported; user-defined types are not supported:&quot;type.googleapis.com/google.cloud.audit.AuditLog&quot; &quot;type.googleapis.com/google.appengine.logging.v1.RequestLog&quot;
145 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
146 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700147 &quot;trace&quot;: &quot;A String&quot;, # Optional. Resource name of the trace associated with the log entry, if any. If it contains a relative resource name, the name is assumed to be relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824
148 &quot;labels&quot;: { # Optional. A set of user-defined (key, value) data that provides additional information about the log entry.
149 &quot;a_key&quot;: &quot;A String&quot;,
150 },
151 &quot;severity&quot;: &quot;A String&quot;, # Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT.
152 &quot;sourceLocation&quot;: { # Additional information about the source code location that produced the log entry. # Optional. Source code location information associated with the log entry, if any.
153 &quot;file&quot;: &quot;A String&quot;, # Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.
154 &quot;function&quot;: &quot;A String&quot;, # Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).
155 &quot;line&quot;: &quot;A String&quot;, # Optional. Line within the source file. 1-based; 0 indicates no line number available.
156 },
157 &quot;spanId&quot;: &quot;A String&quot;, # Optional. The span ID within the trace associated with the log entry.For Trace spans, this is the same format that the Trace API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such as 000000000000004a.
158 &quot;traceSampled&quot;: True or False, # Optional. The sampling decision of the trace associated with the log entry.True means that the trace resource name in the trace field was sampled for storage in a trace backend. False means that the trace was not sampled for storage when this log entry was written, or the sampling decision was unknown at the time. A non-sampled trace value is still useful as a request correlation identifier. The default is False.
159 &quot;receiveTimestamp&quot;: &quot;A String&quot;, # Output only. The time the log entry was received by Logging.
160 &quot;timestamp&quot;: &quot;A String&quot;, # Optional. The time the event described by the log entry occurred. This time is used to compute the log entry&#x27;s age and to enforce the logs retention period. If this field is omitted in a new log entry, then Logging assigns it the current time. Timestamps have nanosecond accuracy, but trailing zeros in the fractional seconds might be omitted when the timestamp is displayed.Incoming log entries must have timestamps that don&#x27;t exceed the logs retention period (https://cloud.google.com/logging/quotas#logs_retention_periods) in the past, and that don&#x27;t exceed 24 hours in the future. Log entries outside those time boundaries aren&#x27;t ingested by Logging.
161 &quot;logName&quot;: &quot;A String&quot;, # Required. The resource name of the log to which this log entry belongs:
162 # &quot;projects/[PROJECT_ID]/logs/[LOG_ID]&quot;
163 # &quot;organizations/[ORGANIZATION_ID]/logs/[LOG_ID]&quot;
164 # &quot;billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]&quot;
165 # &quot;folders/[FOLDER_ID]/logs/[LOG_ID]&quot;
166 # A project number may be used in place of PROJECT_ID. The project number is translated to its corresponding PROJECT_ID internally and the log_name field will contain PROJECT_ID in queries and exports.[LOG_ID] must be URL-encoded within log_name. Example: &quot;organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity&quot;. [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results.
167 &quot;httpRequest&quot;: { # A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message. # Optional. Information about the HTTP request associated with this log entry, if applicable.
168 &quot;cacheFillBytes&quot;: &quot;A String&quot;, # The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.
169 &quot;requestMethod&quot;: &quot;A String&quot;, # The request method. Examples: &quot;GET&quot;, &quot;HEAD&quot;, &quot;PUT&quot;, &quot;POST&quot;.
170 &quot;protocol&quot;: &quot;A String&quot;, # Protocol used for the request. Examples: &quot;HTTP/1.1&quot;, &quot;HTTP/2&quot;, &quot;websocket&quot;
171 &quot;responseSize&quot;: &quot;A String&quot;, # The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.
172 &quot;requestSize&quot;: &quot;A String&quot;, # The size of the HTTP request message in bytes, including the request headers and the request body.
173 &quot;requestUrl&quot;: &quot;A String&quot;, # The scheme (http, https), the host name, the path and the query portion of the URL that was requested. Example: &quot;http://example.com/some/info?color=red&quot;.
174 &quot;remoteIp&quot;: &quot;A String&quot;, # The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: &quot;192.168.1.1&quot;, &quot;FE80::0202:B3FF:FE1E:8329&quot;.
175 &quot;serverIp&quot;: &quot;A String&quot;, # The IP address (IPv4 or IPv6) of the origin server that the request was sent to.
176 &quot;cacheLookup&quot;: True or False, # Whether or not a cache lookup was attempted.
177 &quot;cacheHit&quot;: True or False, # Whether or not an entity was served from cache (with or without validation).
178 &quot;cacheValidatedWithOriginServer&quot;: True or False, # Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if cache_hit is True.
179 &quot;status&quot;: 42, # The response code indicating the status of response. Examples: 200, 404.
180 &quot;referer&quot;: &quot;A String&quot;, # The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
181 &quot;latency&quot;: &quot;A String&quot;, # The request processing latency on the server, from the time the request was received until the response was sent.
182 &quot;userAgent&quot;: &quot;A String&quot;, # The user agent sent by the client. Example: &quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET
183 # CLR 1.0.3705)&quot;.
184 },
185 &quot;resource&quot;: { # An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource&#x27;s schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for &quot;gce_instance&quot; has labels &quot;instance_id&quot; and &quot;zone&quot;: # Required. The monitored resource that produced this log entry.Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error.
186 # { &quot;type&quot;: &quot;gce_instance&quot;,
187 # &quot;labels&quot;: { &quot;instance_id&quot;: &quot;12345678901234&quot;,
188 # &quot;zone&quot;: &quot;us-central1-a&quot; }}
189 &quot;type&quot;: &quot;A String&quot;, # Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance.
190 &quot;labels&quot;: { # Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels &quot;project_id&quot;, &quot;instance_id&quot;, and &quot;zone&quot;.
191 &quot;a_key&quot;: &quot;A String&quot;,
192 },
193 },
194 &quot;jsonPayload&quot;: { # The log entry payload, represented as a structure that is expressed as a JSON object.
195 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
196 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700197 },
198 ],
199 }</pre>
200</div>
201
202<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400203 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
204 <pre>Retrieves the next page of results.
205
206Args:
207 previous_request: The request for the previous page. (required)
208 previous_response: The response from the request for the previous page. (required)
209
210Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700211 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400212 page. Returns None if there are no more items in the collection.
213 </pre>
214</div>
215
216<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700217 <code class="details" id="write">write(body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700218 <pre>Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700219
220Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700221 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700222 The object takes the form of:
223
224{ # The parameters to WriteLogEntries.
Bu Sun Kim65020912020-05-20 12:08:20 -0700225 &quot;logName&quot;: &quot;A String&quot;, # Optional. A default log resource name that is assigned to all log entries in entries that do not specify a value for log_name:
226 # &quot;projects/[PROJECT_ID]/logs/[LOG_ID]&quot;
227 # &quot;organizations/[ORGANIZATION_ID]/logs/[LOG_ID]&quot;
228 # &quot;billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]&quot;
229 # &quot;folders/[FOLDER_ID]/logs/[LOG_ID]&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700230 # [LOG_ID] must be URL-encoded. For example:
Bu Sun Kim65020912020-05-20 12:08:20 -0700231 # &quot;projects/my-project-id/logs/syslog&quot;
232 # &quot;organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700233 # The permission logging.logEntries.create is needed on each project, organization, billing account, or folder that is receiving new log entries, whether the resource is specified in logName or in an individual log entry.
Bu Sun Kim65020912020-05-20 12:08:20 -0700234 &quot;entries&quot;: [ # Required. The log entries to send to Logging. The order of log entries in this list does not matter. Values supplied in this method&#x27;s log_name, resource, and labels fields are copied into those log entries in this list that do not include values for their corresponding fields. For more information, see the LogEntry type.If the timestamp or insert_id fields are missing in log entries, then this method supplies the current time or a unique identifier, respectively. The supplied values are chosen so that, among the log entries that did not supply their own values, the entries earlier in the list will sort before the entries later in the list. See the entries.list method.Log entries with timestamps that are more than the logs retention period (https://cloud.google.com/logging/quota-policy) in the past or more than 24 hours in the future will not be available when calling entries.list. However, those log entries can still be exported with LogSinks (https://cloud.google.com/logging/docs/api/tasks/exporting-logs).To improve throughput and to avoid exceeding the quota limit (https://cloud.google.com/logging/quota-policy) for calls to entries.write, you should try to include several log entries in this list, rather than calling this method for each individual log entry.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700235 { # An individual entry in a log.
Bu Sun Kim65020912020-05-20 12:08:20 -0700236 &quot;operation&quot;: { # Additional information about a potentially long-running operation with which a log entry is associated. # Optional. Information about an operation associated with the log entry, if applicable.
Bu Sun Kim65020912020-05-20 12:08:20 -0700237 &quot;id&quot;: &quot;A String&quot;, # Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation.
238 &quot;producer&quot;: &quot;A String&quot;, # Optional. An arbitrary producer identifier. The combination of id and producer must be globally unique. Examples for producer: &quot;MyDivision.MyBigCompany.com&quot;, &quot;github.com/MyProject/MyApplication&quot;.
239 &quot;first&quot;: True or False, # Optional. Set this to True if this is the first log entry in the operation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700240 &quot;last&quot;: True or False, # Optional. Set this to True if this is the last log entry in the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700241 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700242 &quot;insertId&quot;: &quot;A String&quot;, # Optional. A unique identifier for the log entry. If you provide a value, then Logging considers other log entries in the same project, with the same timestamp, and with the same insert_id to be duplicates which are removed in a single query result. However, there are no guarantees of de-duplication in the export of logs.If the insert_id is omitted when writing a log entry, the Logging API assigns its own unique identifier in this field.In queries, the insert_id is also used to order log entries that have the same log_name and timestamp values.
243 &quot;metadata&quot;: { # Auxiliary metadata for a MonitoredResource object. MonitoredResource objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Monitoring and Logging use an ingestion pipeline to extract metadata for cloud resources of all types, and store the metadata in this message. # Output only. Deprecated. Additional metadata about the monitored resource.Only k8s_container, k8s_pod, and k8s_node MonitoredResources have this field populated for GKE versions older than 1.12.6. For GKE versions 1.12.6 and above, the metadata field has been deprecated. The Kubernetes pod labels that used to be in metadata.userLabels will now be present in the labels field with a key prefix of k8s-pod/. The system labels that were present in the metadata.systemLabels field will no longer be available in the LogEntry.
244 &quot;systemLabels&quot;: { # Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including &quot;machine_image&quot;, &quot;vpc&quot;, &quot;subnet_id&quot;, &quot;security_group&quot;, &quot;name&quot;, etc. System label values can be only strings, Boolean values, or a list of strings. For example:
245 # { &quot;name&quot;: &quot;my-test-instance&quot;,
246 # &quot;security_group&quot;: [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;],
247 # &quot;spot_instance&quot;: false }
248 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700249 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700250 &quot;userLabels&quot;: { # Output only. A map of user-defined metadata labels.
251 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700252 },
253 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700254 &quot;textPayload&quot;: &quot;A String&quot;, # The log entry payload, represented as a Unicode string (UTF-8).
255 &quot;protoPayload&quot;: { # The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads.The following protocol buffer types are supported; user-defined types are not supported:&quot;type.googleapis.com/google.cloud.audit.AuditLog&quot; &quot;type.googleapis.com/google.appengine.logging.v1.RequestLog&quot;
256 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
257 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700258 &quot;trace&quot;: &quot;A String&quot;, # Optional. Resource name of the trace associated with the log entry, if any. If it contains a relative resource name, the name is assumed to be relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824
259 &quot;labels&quot;: { # Optional. A set of user-defined (key, value) data that provides additional information about the log entry.
260 &quot;a_key&quot;: &quot;A String&quot;,
261 },
262 &quot;severity&quot;: &quot;A String&quot;, # Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT.
263 &quot;sourceLocation&quot;: { # Additional information about the source code location that produced the log entry. # Optional. Source code location information associated with the log entry, if any.
264 &quot;file&quot;: &quot;A String&quot;, # Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.
265 &quot;function&quot;: &quot;A String&quot;, # Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).
266 &quot;line&quot;: &quot;A String&quot;, # Optional. Line within the source file. 1-based; 0 indicates no line number available.
267 },
268 &quot;spanId&quot;: &quot;A String&quot;, # Optional. The span ID within the trace associated with the log entry.For Trace spans, this is the same format that the Trace API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such as 000000000000004a.
269 &quot;traceSampled&quot;: True or False, # Optional. The sampling decision of the trace associated with the log entry.True means that the trace resource name in the trace field was sampled for storage in a trace backend. False means that the trace was not sampled for storage when this log entry was written, or the sampling decision was unknown at the time. A non-sampled trace value is still useful as a request correlation identifier. The default is False.
270 &quot;receiveTimestamp&quot;: &quot;A String&quot;, # Output only. The time the log entry was received by Logging.
271 &quot;timestamp&quot;: &quot;A String&quot;, # Optional. The time the event described by the log entry occurred. This time is used to compute the log entry&#x27;s age and to enforce the logs retention period. If this field is omitted in a new log entry, then Logging assigns it the current time. Timestamps have nanosecond accuracy, but trailing zeros in the fractional seconds might be omitted when the timestamp is displayed.Incoming log entries must have timestamps that don&#x27;t exceed the logs retention period (https://cloud.google.com/logging/quotas#logs_retention_periods) in the past, and that don&#x27;t exceed 24 hours in the future. Log entries outside those time boundaries aren&#x27;t ingested by Logging.
272 &quot;logName&quot;: &quot;A String&quot;, # Required. The resource name of the log to which this log entry belongs:
273 # &quot;projects/[PROJECT_ID]/logs/[LOG_ID]&quot;
274 # &quot;organizations/[ORGANIZATION_ID]/logs/[LOG_ID]&quot;
275 # &quot;billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]&quot;
276 # &quot;folders/[FOLDER_ID]/logs/[LOG_ID]&quot;
277 # A project number may be used in place of PROJECT_ID. The project number is translated to its corresponding PROJECT_ID internally and the log_name field will contain PROJECT_ID in queries and exports.[LOG_ID] must be URL-encoded within log_name. Example: &quot;organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity&quot;. [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results.
278 &quot;httpRequest&quot;: { # A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message. # Optional. Information about the HTTP request associated with this log entry, if applicable.
279 &quot;cacheFillBytes&quot;: &quot;A String&quot;, # The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.
280 &quot;requestMethod&quot;: &quot;A String&quot;, # The request method. Examples: &quot;GET&quot;, &quot;HEAD&quot;, &quot;PUT&quot;, &quot;POST&quot;.
281 &quot;protocol&quot;: &quot;A String&quot;, # Protocol used for the request. Examples: &quot;HTTP/1.1&quot;, &quot;HTTP/2&quot;, &quot;websocket&quot;
282 &quot;responseSize&quot;: &quot;A String&quot;, # The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.
283 &quot;requestSize&quot;: &quot;A String&quot;, # The size of the HTTP request message in bytes, including the request headers and the request body.
284 &quot;requestUrl&quot;: &quot;A String&quot;, # The scheme (http, https), the host name, the path and the query portion of the URL that was requested. Example: &quot;http://example.com/some/info?color=red&quot;.
285 &quot;remoteIp&quot;: &quot;A String&quot;, # The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: &quot;192.168.1.1&quot;, &quot;FE80::0202:B3FF:FE1E:8329&quot;.
286 &quot;serverIp&quot;: &quot;A String&quot;, # The IP address (IPv4 or IPv6) of the origin server that the request was sent to.
287 &quot;cacheLookup&quot;: True or False, # Whether or not a cache lookup was attempted.
288 &quot;cacheHit&quot;: True or False, # Whether or not an entity was served from cache (with or without validation).
289 &quot;cacheValidatedWithOriginServer&quot;: True or False, # Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if cache_hit is True.
290 &quot;status&quot;: 42, # The response code indicating the status of response. Examples: 200, 404.
291 &quot;referer&quot;: &quot;A String&quot;, # The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
292 &quot;latency&quot;: &quot;A String&quot;, # The request processing latency on the server, from the time the request was received until the response was sent.
293 &quot;userAgent&quot;: &quot;A String&quot;, # The user agent sent by the client. Example: &quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET
294 # CLR 1.0.3705)&quot;.
295 },
296 &quot;resource&quot;: { # An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource&#x27;s schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for &quot;gce_instance&quot; has labels &quot;instance_id&quot; and &quot;zone&quot;: # Required. The monitored resource that produced this log entry.Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error.
297 # { &quot;type&quot;: &quot;gce_instance&quot;,
298 # &quot;labels&quot;: { &quot;instance_id&quot;: &quot;12345678901234&quot;,
299 # &quot;zone&quot;: &quot;us-central1-a&quot; }}
300 &quot;type&quot;: &quot;A String&quot;, # Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance.
301 &quot;labels&quot;: { # Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels &quot;project_id&quot;, &quot;instance_id&quot;, and &quot;zone&quot;.
302 &quot;a_key&quot;: &quot;A String&quot;,
303 },
304 },
305 &quot;jsonPayload&quot;: { # The log entry payload, represented as a structure that is expressed as a JSON object.
306 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
307 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700308 },
309 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700310 &quot;partialSuccess&quot;: True or False, # Optional. Whether valid entries should be written even if some other entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not written, then the response status is the error associated with one of the failed entries and the response includes error details keyed by the entries&#x27; zero-based index in the entries.write method.
311 &quot;dryRun&quot;: True or False, # Optional. If true, the request should expect normal response, but the entries won&#x27;t be persisted nor exported. Useful for checking whether the logging API endpoints are working properly before sending valuable data.
312 &quot;labels&quot;: { # Optional. Default labels that are added to the labels field of all log entries in entries. If a log entry already has a label with the same key as a label in this parameter, then the log entry&#x27;s label is not changed. See LogEntry.
313 &quot;a_key&quot;: &quot;A String&quot;,
314 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700315 &quot;resource&quot;: { # An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource&#x27;s schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for &quot;gce_instance&quot; has labels &quot;instance_id&quot; and &quot;zone&quot;: # Optional. A default monitored resource object that is assigned to all log entries in entries that do not specify a value for resource. Example:
316 # { &quot;type&quot;: &quot;gce_instance&quot;,
317 # &quot;labels&quot;: {
318 # &quot;zone&quot;: &quot;us-central1-a&quot;, &quot;instance_id&quot;: &quot;00000000000000000000&quot; }}
319 # See LogEntry.
320 # { &quot;type&quot;: &quot;gce_instance&quot;,
321 # &quot;labels&quot;: { &quot;instance_id&quot;: &quot;12345678901234&quot;,
322 # &quot;zone&quot;: &quot;us-central1-a&quot; }}
323 &quot;type&quot;: &quot;A String&quot;, # Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance.
324 &quot;labels&quot;: { # Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels &quot;project_id&quot;, &quot;instance_id&quot;, and &quot;zone&quot;.
325 &quot;a_key&quot;: &quot;A String&quot;,
326 },
327 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700328 }
329
330 x__xgafv: string, V1 error format.
331 Allowed values
332 1 - v1 error format
333 2 - v2 error format
334
335Returns:
336 An object of the form:
337
Dan O'Mearadd494642020-05-01 07:42:23 -0700338 { # Result returned from WriteLogEntries.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700339 }</pre>
340</div>
341
342</body></html>