google-cloud-logging 1.10.5 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +2 -1
  3. data/CHANGELOG.md +47 -0
  4. data/TROUBLESHOOTING.md +2 -8
  5. data/lib/google-cloud-logging.rb +14 -15
  6. data/lib/google/cloud/logging.rb +12 -13
  7. data/lib/google/cloud/logging/credentials.rb +2 -2
  8. data/lib/google/cloud/logging/entry.rb +5 -5
  9. data/lib/google/cloud/logging/entry/http_request.rb +3 -3
  10. data/lib/google/cloud/logging/entry/list.rb +1 -1
  11. data/lib/google/cloud/logging/entry/operation.rb +3 -3
  12. data/lib/google/cloud/logging/entry/source_location.rb +3 -3
  13. data/lib/google/cloud/logging/log/list.rb +1 -1
  14. data/lib/google/cloud/logging/metric.rb +2 -2
  15. data/lib/google/cloud/logging/metric/list.rb +1 -1
  16. data/lib/google/cloud/logging/resource_descriptor/list.rb +1 -1
  17. data/lib/google/cloud/logging/service.rb +70 -173
  18. data/lib/google/cloud/logging/sink.rb +2 -2
  19. data/lib/google/cloud/logging/sink/list.rb +1 -1
  20. data/lib/google/cloud/logging/version.rb +1 -1
  21. metadata +11 -81
  22. data/lib/google/cloud/logging/v2.rb +0 -18
  23. data/lib/google/cloud/logging/v2/config_service_v2_client.rb +0 -1368
  24. data/lib/google/cloud/logging/v2/config_service_v2_client_config.json +0 -101
  25. data/lib/google/cloud/logging/v2/credentials.rb +0 -39
  26. data/lib/google/cloud/logging/v2/doc/google/api/distribution.rb +0 -164
  27. data/lib/google/cloud/logging/v2/doc/google/api/label.rb +0 -42
  28. data/lib/google/cloud/logging/v2/doc/google/api/metric.rb +0 -233
  29. data/lib/google/cloud/logging/v2/doc/google/api/monitored_resource.rb +0 -85
  30. data/lib/google/cloud/logging/v2/doc/google/logging/type/http_request.rb +0 -86
  31. data/lib/google/cloud/logging/v2/doc/google/logging/v2/log_entry.rb +0 -179
  32. data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging.rb +0 -238
  33. data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging_config.rb +0 -660
  34. data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging_metrics.rb +0 -220
  35. data/lib/google/cloud/logging/v2/doc/google/protobuf/any.rb +0 -131
  36. data/lib/google/cloud/logging/v2/doc/google/protobuf/duration.rb +0 -91
  37. data/lib/google/cloud/logging/v2/doc/google/protobuf/empty.rb +0 -29
  38. data/lib/google/cloud/logging/v2/doc/google/protobuf/field_mask.rb +0 -222
  39. data/lib/google/cloud/logging/v2/doc/google/protobuf/struct.rb +0 -74
  40. data/lib/google/cloud/logging/v2/doc/google/protobuf/timestamp.rb +0 -113
  41. data/lib/google/cloud/logging/v2/logging_service_v2_client.rb +0 -680
  42. data/lib/google/cloud/logging/v2/logging_service_v2_client_config.json +0 -56
  43. data/lib/google/cloud/logging/v2/metrics_service_v2_client.rb +0 -475
  44. data/lib/google/cloud/logging/v2/metrics_service_v2_client_config.json +0 -51
  45. data/lib/google/logging/v2/log_entry_pb.rb +0 -59
  46. data/lib/google/logging/v2/logging_config_pb.rb +0 -173
  47. data/lib/google/logging/v2/logging_config_services_pb.rb +0 -112
  48. data/lib/google/logging/v2/logging_metrics_pb.rb +0 -72
  49. data/lib/google/logging/v2/logging_metrics_services_pb.rb +0 -52
  50. data/lib/google/logging/v2/logging_pb.rb +0 -80
  51. data/lib/google/logging/v2/logging_services_pb.rb +0 -64
@@ -1,85 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Api
18
- # An object that describes the schema of a {Google::Api::MonitoredResource MonitoredResource} object using a
19
- # type name and a set of labels. For example, the monitored resource
20
- # descriptor for Google Compute Engine VM instances has a type of
21
- # `"gce_instance"` and specifies the use of the labels `"instance_id"` and
22
- # `"zone"` to identify particular VM instances.
23
- #
24
- # Different APIs can support different monitored resource types. APIs generally
25
- # provide a `list` method that returns the monitored resource descriptors used
26
- # by the API.
27
- # @!attribute [rw] name
28
- # @return [String]
29
- # Optional. The resource name of the monitored resource descriptor:
30
- # `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
31
- # \\{type} is the value of the `type` field in this object and
32
- # \\{project_id} is a project ID that provides API-specific context for
33
- # accessing the type. APIs that do not use project information can use the
34
- # resource name format `"monitoredResourceDescriptors/{type}"`.
35
- # @!attribute [rw] type
36
- # @return [String]
37
- # Required. The monitored resource type. For example, the type
38
- # `"cloudsql_database"` represents databases in Google Cloud SQL.
39
- # The maximum length of this value is 256 characters.
40
- # @!attribute [rw] display_name
41
- # @return [String]
42
- # Optional. A concise name for the monitored resource type that might be
43
- # displayed in user interfaces. It should be a Title Cased Noun Phrase,
44
- # without any article or other determiners. For example,
45
- # `"Google Cloud SQL Database"`.
46
- # @!attribute [rw] description
47
- # @return [String]
48
- # Optional. A detailed description of the monitored resource type that might
49
- # be used in documentation.
50
- # @!attribute [rw] labels
51
- # @return [Array<Google::Api::LabelDescriptor>]
52
- # Required. A set of labels used to describe instances of this monitored
53
- # resource type. For example, an individual Google Cloud SQL database is
54
- # identified by values for the labels `"database_id"` and `"zone"`.
55
- # @!attribute [rw] launch_stage
56
- # @return [Google::Api::LaunchStage]
57
- # Optional. The launch stage of the monitored resource definition.
58
- class MonitoredResourceDescriptor; end
59
-
60
- # An object representing a resource that can be used for monitoring, logging,
61
- # billing, or other purposes. Examples include virtual machine instances,
62
- # databases, and storage devices such as disks. The `type` field identifies a
63
- # {Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} object that describes the resource's
64
- # schema. Information in the `labels` field identifies the actual resource and
65
- # its attributes according to the schema. For example, a particular Compute
66
- # Engine VM instance could be represented by the following object, because the
67
- # {Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} for `"gce_instance"` has labels
68
- # `"instance_id"` and `"zone"`:
69
- #
70
- # { "type": "gce_instance",
71
- # "labels": { "instance_id": "12345678901234",
72
- # "zone": "us-central1-a" }}
73
- # @!attribute [rw] type
74
- # @return [String]
75
- # Required. The monitored resource type. This field must match
76
- # the `type` field of a {Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} object. For
77
- # example, the type of a Compute Engine VM instance is `gce_instance`.
78
- # @!attribute [rw] labels
79
- # @return [Hash{String => String}]
80
- # Required. Values for all of the labels listed in the associated monitored
81
- # resource descriptor. For example, Compute Engine VM instances use the
82
- # labels `"project_id"`, `"instance_id"`, and `"zone"`.
83
- class MonitoredResource; end
84
- end
85
- end
@@ -1,86 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Logging
18
- module Type
19
- # A common proto for logging HTTP requests. Only contains semantics
20
- # defined by the HTTP specification. Product-specific logging
21
- # information MUST be defined in a separate message.
22
- # @!attribute [rw] request_method
23
- # @return [String]
24
- # The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
25
- # @!attribute [rw] request_url
26
- # @return [String]
27
- # The scheme (http, https), the host name, the path and the query
28
- # portion of the URL that was requested.
29
- # Example: `"http://example.com/some/info?color=red"`.
30
- # @!attribute [rw] request_size
31
- # @return [Integer]
32
- # The size of the HTTP request message in bytes, including the request
33
- # headers and the request body.
34
- # @!attribute [rw] status
35
- # @return [Integer]
36
- # The response code indicating the status of response.
37
- # Examples: 200, 404.
38
- # @!attribute [rw] response_size
39
- # @return [Integer]
40
- # The size of the HTTP response message sent back to the client, in bytes,
41
- # including the response headers and the response body.
42
- # @!attribute [rw] user_agent
43
- # @return [String]
44
- # The user agent sent by the client. Example:
45
- # `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET
46
- # CLR 1.0.3705)"`.
47
- # @!attribute [rw] remote_ip
48
- # @return [String]
49
- # The IP address (IPv4 or IPv6) of the client that issued the HTTP
50
- # request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`.
51
- # @!attribute [rw] server_ip
52
- # @return [String]
53
- # The IP address (IPv4 or IPv6) of the origin server that the request was
54
- # sent to.
55
- # @!attribute [rw] referer
56
- # @return [String]
57
- # The referer URL of the request, as defined in
58
- # [HTTP/1.1 Header Field
59
- # Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
60
- # @!attribute [rw] latency
61
- # @return [Google::Protobuf::Duration]
62
- # The request processing latency on the server, from the time the request was
63
- # received until the response was sent.
64
- # @!attribute [rw] cache_lookup
65
- # @return [true, false]
66
- # Whether or not a cache lookup was attempted.
67
- # @!attribute [rw] cache_hit
68
- # @return [true, false]
69
- # Whether or not an entity was served from cache
70
- # (with or without validation).
71
- # @!attribute [rw] cache_validated_with_origin_server
72
- # @return [true, false]
73
- # Whether or not the response was validated with the origin server before
74
- # being served from cache. This field is only meaningful if `cache_hit` is
75
- # True.
76
- # @!attribute [rw] cache_fill_bytes
77
- # @return [Integer]
78
- # The number of HTTP response bytes inserted into cache. Set only when a
79
- # cache fill was attempted.
80
- # @!attribute [rw] protocol
81
- # @return [String]
82
- # Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
83
- class HttpRequest; end
84
- end
85
- end
86
- end
@@ -1,179 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Logging
18
- module V2
19
- # An individual entry in a log.
20
- # @!attribute [rw] log_name
21
- # @return [String]
22
- # Required. The resource name of the log to which this log entry belongs:
23
- #
24
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
25
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
26
- # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
27
- # "folders/[FOLDER_ID]/logs/[LOG_ID]"
28
- #
29
- # A project number may be used in place of PROJECT_ID. The project number is
30
- # translated to its corresponding PROJECT_ID internally and the `log_name`
31
- # field will contain PROJECT_ID in queries and exports.
32
- #
33
- # `[LOG_ID]` must be URL-encoded within `log_name`. Example:
34
- # `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`.
35
- # `[LOG_ID]` must be less than 512 characters long and can only include the
36
- # following characters: upper and lower case alphanumeric characters,
37
- # forward-slash, underscore, hyphen, and period.
38
- #
39
- # For backward compatibility, if `log_name` begins with a forward-slash, such
40
- # as `/projects/...`, then the log entry is ingested as usual but the
41
- # forward-slash is removed. Listing the log entry will not show the leading
42
- # slash and filtering for a log name with a leading slash will never return
43
- # any results.
44
- # @!attribute [rw] resource
45
- # @return [Google::Api::MonitoredResource]
46
- # Required. The monitored resource that produced this log entry.
47
- #
48
- # Example: a log entry that reports a database error would be associated with
49
- # the monitored resource designating the particular database that reported
50
- # the error.
51
- # @!attribute [rw] proto_payload
52
- # @return [Google::Protobuf::Any]
53
- # The log entry payload, represented as a protocol buffer. Some Google
54
- # Cloud Platform services use this field for their log entry payloads.
55
- #
56
- # The following protocol buffer types are supported; user-defined types
57
- # are not supported:
58
- #
59
- # "type.googleapis.com/google.cloud.audit.AuditLog"
60
- # "type.googleapis.com/google.appengine.logging.v1.RequestLog"
61
- # @!attribute [rw] text_payload
62
- # @return [String]
63
- # The log entry payload, represented as a Unicode string (UTF-8).
64
- # @!attribute [rw] json_payload
65
- # @return [Google::Protobuf::Struct]
66
- # The log entry payload, represented as a structure that is
67
- # expressed as a JSON object.
68
- # @!attribute [rw] timestamp
69
- # @return [Google::Protobuf::Timestamp]
70
- # Optional. The time the event described by the log entry occurred. This time is used
71
- # to compute the log entry's age and to enforce the logs retention period.
72
- # If this field is omitted in a new log entry, then Logging assigns it the
73
- # current time. Timestamps have nanosecond accuracy, but trailing zeros in
74
- # the fractional seconds might be omitted when the timestamp is displayed.
75
- #
76
- # Incoming log entries should have timestamps that are no more than the [logs
77
- # retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
78
- # in the future. Log entries outside those time boundaries will not be
79
- # available when calling `entries.list`, but those log entries can still be
80
- # [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
81
- # @!attribute [rw] receive_timestamp
82
- # @return [Google::Protobuf::Timestamp]
83
- # Output only. The time the log entry was received by Logging.
84
- # @!attribute [rw] severity
85
- # @return [Google::Logging::Type::LogSeverity]
86
- # Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`.
87
- # @!attribute [rw] insert_id
88
- # @return [String]
89
- # Optional. A unique identifier for the log entry. If you provide a value, then
90
- # Logging considers other log entries in the same project, with the same
91
- # `timestamp`, and with the same `insert_id` to be duplicates which are
92
- # removed in a single query result. However, there are no guarantees of
93
- # de-duplication in the export of logs.
94
- #
95
- # If the `insert_id` is omitted when writing a log entry, the Logging API
96
- # assigns its own unique identifier in this field.
97
- #
98
- # In queries, the `insert_id` is also used to order log entries that have
99
- # the same `log_name` and `timestamp` values.
100
- # @!attribute [rw] http_request
101
- # @return [Google::Logging::Type::HttpRequest]
102
- # Optional. Information about the HTTP request associated with this log entry, if
103
- # applicable.
104
- # @!attribute [rw] labels
105
- # @return [Hash{String => String}]
106
- # Optional. A set of user-defined (key, value) data that provides additional
107
- # information about the log entry.
108
- # @!attribute [rw] operation
109
- # @return [Google::Logging::V2::LogEntryOperation]
110
- # Optional. Information about an operation associated with the log entry, if
111
- # applicable.
112
- # @!attribute [rw] trace
113
- # @return [String]
114
- # Optional. Resource name of the trace associated with the log entry, if any. If it
115
- # contains a relative resource name, the name is assumed to be relative to
116
- # `//tracing.googleapis.com`. Example:
117
- # `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
118
- # @!attribute [rw] span_id
119
- # @return [String]
120
- # Optional. The span ID within the trace associated with the log entry.
121
- #
122
- # For Trace spans, this is the same format that the Trace API v2 uses: a
123
- # 16-character hexadecimal encoding of an 8-byte array, such as
124
- # `000000000000004a`.
125
- # @!attribute [rw] trace_sampled
126
- # @return [true, false]
127
- # Optional. The sampling decision of the trace associated with the log entry.
128
- #
129
- # True means that the trace resource name in the `trace` field was sampled
130
- # for storage in a trace backend. False means that the trace was not sampled
131
- # for storage when this log entry was written, or the sampling decision was
132
- # unknown at the time. A non-sampled `trace` value is still useful as a
133
- # request correlation identifier. The default is False.
134
- # @!attribute [rw] source_location
135
- # @return [Google::Logging::V2::LogEntrySourceLocation]
136
- # Optional. Source code location information associated with the log entry, if any.
137
- class LogEntry; end
138
-
139
- # Additional information about a potentially long-running operation with which
140
- # a log entry is associated.
141
- # @!attribute [rw] id
142
- # @return [String]
143
- # Optional. An arbitrary operation identifier. Log entries with the same
144
- # identifier are assumed to be part of the same operation.
145
- # @!attribute [rw] producer
146
- # @return [String]
147
- # Optional. An arbitrary producer identifier. The combination of `id` and
148
- # `producer` must be globally unique. Examples for `producer`:
149
- # `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`.
150
- # @!attribute [rw] first
151
- # @return [true, false]
152
- # Optional. Set this to True if this is the first log entry in the operation.
153
- # @!attribute [rw] last
154
- # @return [true, false]
155
- # Optional. Set this to True if this is the last log entry in the operation.
156
- class LogEntryOperation; end
157
-
158
- # Additional information about the source code location that produced the log
159
- # entry.
160
- # @!attribute [rw] file
161
- # @return [String]
162
- # Optional. Source file name. Depending on the runtime environment, this
163
- # might be a simple name or a fully-qualified name.
164
- # @!attribute [rw] line
165
- # @return [Integer]
166
- # Optional. Line within the source file. 1-based; 0 indicates no line number
167
- # available.
168
- # @!attribute [rw] function
169
- # @return [String]
170
- # Optional. Human-readable name of the function or method being invoked, with
171
- # optional context such as the class or package name. This information may be
172
- # used in contexts such as the logs viewer, where a file and line number are
173
- # less meaningful. The format can vary by language. For example:
174
- # `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function`
175
- # (Python).
176
- class LogEntrySourceLocation; end
177
- end
178
- end
179
- end
@@ -1,238 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Logging
18
- module V2
19
- # The parameters to DeleteLog.
20
- # @!attribute [rw] log_name
21
- # @return [String]
22
- # Required. The resource name of the log to delete:
23
- #
24
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
25
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
26
- # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
27
- # "folders/[FOLDER_ID]/logs/[LOG_ID]"
28
- #
29
- # `[LOG_ID]` must be URL-encoded. For example,
30
- # `"projects/my-project-id/logs/syslog"`,
31
- # `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`.
32
- # For more information about log names, see
33
- # {Google::Logging::V2::LogEntry LogEntry}.
34
- class DeleteLogRequest; end
35
-
36
- # The parameters to WriteLogEntries.
37
- # @!attribute [rw] log_name
38
- # @return [String]
39
- # Optional. A default log resource name that is assigned to all log entries
40
- # in `entries` that do not specify a value for `log_name`:
41
- #
42
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
43
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
44
- # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
45
- # "folders/[FOLDER_ID]/logs/[LOG_ID]"
46
- #
47
- # `[LOG_ID]` must be URL-encoded. For example:
48
- #
49
- # "projects/my-project-id/logs/syslog"
50
- # "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"
51
- #
52
- # The permission `logging.logEntries.create` is needed on each project,
53
- # organization, billing account, or folder that is receiving new log
54
- # entries, whether the resource is specified in `logName` or in an
55
- # individual log entry.
56
- # @!attribute [rw] resource
57
- # @return [Google::Api::MonitoredResource]
58
- # Optional. A default monitored resource object that is assigned to all log
59
- # entries in `entries` that do not specify a value for `resource`. Example:
60
- #
61
- # { "type": "gce_instance",
62
- # "labels": {
63
- # "zone": "us-central1-a", "instance_id": "00000000000000000000" }}
64
- #
65
- # See {Google::Logging::V2::LogEntry LogEntry}.
66
- # @!attribute [rw] labels
67
- # @return [Hash{String => String}]
68
- # Optional. Default labels that are added to the `labels` field of all log
69
- # entries in `entries`. If a log entry already has a label with the same key
70
- # as a label in this parameter, then the log entry's label is not changed.
71
- # See {Google::Logging::V2::LogEntry LogEntry}.
72
- # @!attribute [rw] entries
73
- # @return [Array<Google::Logging::V2::LogEntry>]
74
- # Required. The log entries to send to Logging. The order of log
75
- # entries in this list does not matter. Values supplied in this method's
76
- # `log_name`, `resource`, and `labels` fields are copied into those log
77
- # entries in this list that do not include values for their corresponding
78
- # fields. For more information, see the
79
- # {Google::Logging::V2::LogEntry LogEntry} type.
80
- #
81
- # If the `timestamp` or `insert_id` fields are missing in log entries, then
82
- # this method supplies the current time or a unique identifier, respectively.
83
- # The supplied values are chosen so that, among the log entries that did not
84
- # supply their own values, the entries earlier in the list will sort before
85
- # the entries later in the list. See the `entries.list` method.
86
- #
87
- # Log entries with timestamps that are more than the
88
- # [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than
89
- # 24 hours in the future will not be available when calling `entries.list`.
90
- # However, those log entries can still be
91
- # [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
92
- #
93
- # To improve throughput and to avoid exceeding the
94
- # [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`,
95
- # you should try to include several log entries in this list,
96
- # rather than calling this method for each individual log entry.
97
- # @!attribute [rw] partial_success
98
- # @return [true, false]
99
- # Optional. Whether valid entries should be written even if some other
100
- # entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any
101
- # entry is not written, then the response status is the error associated
102
- # with one of the failed entries and the response includes error details
103
- # keyed by the entries' zero-based index in the `entries.write` method.
104
- # @!attribute [rw] dry_run
105
- # @return [true, false]
106
- # Optional. If true, the request should expect normal response, but the
107
- # entries won't be persisted nor exported. Useful for checking whether the
108
- # logging API endpoints are working properly before sending valuable data.
109
- class WriteLogEntriesRequest; end
110
-
111
- # Result returned from WriteLogEntries.
112
- class WriteLogEntriesResponse; end
113
-
114
- # The parameters to `ListLogEntries`.
115
- # @!attribute [rw] resource_names
116
- # @return [Array<String>]
117
- # Required. Names of one or more parent resources from which to
118
- # retrieve log entries:
119
- #
120
- # "projects/[PROJECT_ID]"
121
- # "organizations/[ORGANIZATION_ID]"
122
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
123
- # "folders/[FOLDER_ID]"
124
- #
125
- #
126
- # Projects listed in the `project_ids` field are added to this list.
127
- # @!attribute [rw] filter
128
- # @return [String]
129
- # Optional. A filter that chooses which log entries to return. See [Advanced
130
- # Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). Only log entries that
131
- # match the filter are returned. An empty filter matches all log entries in
132
- # the resources listed in `resource_names`. Referencing a parent resource
133
- # that is not listed in `resource_names` will cause the filter to return no
134
- # results.
135
- # The maximum length of the filter is 20000 characters.
136
- # @!attribute [rw] order_by
137
- # @return [String]
138
- # Optional. How the results should be sorted. Presently, the only permitted
139
- # values are `"timestamp asc"` (default) and `"timestamp desc"`. The first
140
- # option returns entries in order of increasing values of
141
- # `LogEntry.timestamp` (oldest first), and the second option returns entries
142
- # in order of decreasing timestamps (newest first). Entries with equal
143
- # timestamps are returned in order of their `insert_id` values.
144
- # @!attribute [rw] page_size
145
- # @return [Integer]
146
- # Optional. The maximum number of results to return from this request.
147
- # Non-positive values are ignored. The presence of `next_page_token` in the
148
- # response indicates that more results might be available.
149
- # @!attribute [rw] page_token
150
- # @return [String]
151
- # Optional. If present, then retrieve the next batch of results from the
152
- # preceding call to this method. `page_token` must be the value of
153
- # `next_page_token` from the previous response. The values of other method
154
- # parameters should be identical to those in the previous call.
155
- class ListLogEntriesRequest; end
156
-
157
- # Result returned from `ListLogEntries`.
158
- # @!attribute [rw] entries
159
- # @return [Array<Google::Logging::V2::LogEntry>]
160
- # A list of log entries. If `entries` is empty, `nextPageToken` may still be
161
- # returned, indicating that more entries may exist. See `nextPageToken` for
162
- # more information.
163
- # @!attribute [rw] next_page_token
164
- # @return [String]
165
- # If there might be more results than those appearing in this response, then
166
- # `nextPageToken` is included. To get the next set of results, call this
167
- # method again using the value of `nextPageToken` as `pageToken`.
168
- #
169
- # If a value for `next_page_token` appears and the `entries` field is empty,
170
- # it means that the search found no log entries so far but it did not have
171
- # time to search all the possible log entries. Retry the method with this
172
- # value for `page_token` to continue the search. Alternatively, consider
173
- # speeding up the search by changing your filter to specify a single log name
174
- # or resource type, or to narrow the time range of the search.
175
- class ListLogEntriesResponse; end
176
-
177
- # The parameters to ListMonitoredResourceDescriptors
178
- # @!attribute [rw] page_size
179
- # @return [Integer]
180
- # Optional. The maximum number of results to return from this request.
181
- # Non-positive values are ignored. The presence of `nextPageToken` in the
182
- # response indicates that more results might be available.
183
- # @!attribute [rw] page_token
184
- # @return [String]
185
- # Optional. If present, then retrieve the next batch of results from the
186
- # preceding call to this method. `pageToken` must be the value of
187
- # `nextPageToken` from the previous response. The values of other method
188
- # parameters should be identical to those in the previous call.
189
- class ListMonitoredResourceDescriptorsRequest; end
190
-
191
- # Result returned from ListMonitoredResourceDescriptors.
192
- # @!attribute [rw] resource_descriptors
193
- # @return [Array<Google::Api::MonitoredResourceDescriptor>]
194
- # A list of resource descriptors.
195
- # @!attribute [rw] next_page_token
196
- # @return [String]
197
- # If there might be more results than those appearing in this response, then
198
- # `nextPageToken` is included. To get the next set of results, call this
199
- # method again using the value of `nextPageToken` as `pageToken`.
200
- class ListMonitoredResourceDescriptorsResponse; end
201
-
202
- # The parameters to ListLogs.
203
- # @!attribute [rw] parent
204
- # @return [String]
205
- # Required. The resource name that owns the logs:
206
- #
207
- # "projects/[PROJECT_ID]"
208
- # "organizations/[ORGANIZATION_ID]"
209
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
210
- # "folders/[FOLDER_ID]"
211
- # @!attribute [rw] page_size
212
- # @return [Integer]
213
- # Optional. The maximum number of results to return from this request.
214
- # Non-positive values are ignored. The presence of `nextPageToken` in the
215
- # response indicates that more results might be available.
216
- # @!attribute [rw] page_token
217
- # @return [String]
218
- # Optional. If present, then retrieve the next batch of results from the
219
- # preceding call to this method. `pageToken` must be the value of
220
- # `nextPageToken` from the previous response. The values of other method
221
- # parameters should be identical to those in the previous call.
222
- class ListLogsRequest; end
223
-
224
- # Result returned from ListLogs.
225
- # @!attribute [rw] log_names
226
- # @return [Array<String>]
227
- # A list of log names. For example,
228
- # `"projects/my-project/logs/syslog"` or
229
- # `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`.
230
- # @!attribute [rw] next_page_token
231
- # @return [String]
232
- # If there might be more results than those appearing in this response, then
233
- # `nextPageToken` is included. To get the next set of results, call this
234
- # method again using the value of `nextPageToken` as `pageToken`.
235
- class ListLogsResponse; end
236
- end
237
- end
238
- end