google-cloud-logging-v2 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,10 +33,13 @@ module Google
33
33
  self.unmarshal_class_method = :decode
34
34
  self.service_name = 'google.logging.v2.ConfigServiceV2'
35
35
 
36
- # Lists buckets (Beta).
37
- rpc :ListBuckets, Google::Cloud::Logging::V2::ListBucketsRequest, Google::Cloud::Logging::V2::ListBucketsResponse
38
- # Gets a bucket (Beta).
39
- rpc :GetBucket, Google::Cloud::Logging::V2::GetBucketRequest, Google::Cloud::Logging::V2::LogBucket
36
+ # Lists buckets.
37
+ rpc :ListBuckets, ::Google::Cloud::Logging::V2::ListBucketsRequest, ::Google::Cloud::Logging::V2::ListBucketsResponse
38
+ # Gets a bucket.
39
+ rpc :GetBucket, ::Google::Cloud::Logging::V2::GetBucketRequest, ::Google::Cloud::Logging::V2::LogBucket
40
+ # Creates a bucket that can be used to store log entries. Once a bucket has
41
+ # been created, the region cannot be changed.
42
+ rpc :CreateBucket, ::Google::Cloud::Logging::V2::CreateBucketRequest, ::Google::Cloud::Logging::V2::LogBucket
40
43
  # Updates a bucket. This method replaces the following fields in the
41
44
  # existing bucket with values from the new bucket: `retention_period`
42
45
  #
@@ -47,38 +50,57 @@ module Google
47
50
  # will be returned.
48
51
  #
49
52
  # A buckets region may not be modified after it is created.
50
- # This method is in Beta.
51
- rpc :UpdateBucket, Google::Cloud::Logging::V2::UpdateBucketRequest, Google::Cloud::Logging::V2::LogBucket
53
+ rpc :UpdateBucket, ::Google::Cloud::Logging::V2::UpdateBucketRequest, ::Google::Cloud::Logging::V2::LogBucket
54
+ # Deletes a bucket.
55
+ # Moves the bucket to the DELETE_REQUESTED state. After 7 days, the
56
+ # bucket will be purged and all logs in the bucket will be permanently
57
+ # deleted.
58
+ rpc :DeleteBucket, ::Google::Cloud::Logging::V2::DeleteBucketRequest, ::Google::Protobuf::Empty
59
+ # Undeletes a bucket. A bucket that has been deleted may be undeleted within
60
+ # the grace period of 7 days.
61
+ rpc :UndeleteBucket, ::Google::Cloud::Logging::V2::UndeleteBucketRequest, ::Google::Protobuf::Empty
62
+ # Lists views on a bucket.
63
+ rpc :ListViews, ::Google::Cloud::Logging::V2::ListViewsRequest, ::Google::Cloud::Logging::V2::ListViewsResponse
64
+ # Gets a view.
65
+ rpc :GetView, ::Google::Cloud::Logging::V2::GetViewRequest, ::Google::Cloud::Logging::V2::LogView
66
+ # Creates a view over logs in a bucket. A bucket may contain a maximum of
67
+ # 50 views.
68
+ rpc :CreateView, ::Google::Cloud::Logging::V2::CreateViewRequest, ::Google::Cloud::Logging::V2::LogView
69
+ # Updates a view. This method replaces the following fields in the existing
70
+ # view with values from the new view: `filter`.
71
+ rpc :UpdateView, ::Google::Cloud::Logging::V2::UpdateViewRequest, ::Google::Cloud::Logging::V2::LogView
72
+ # Deletes a view from a bucket.
73
+ rpc :DeleteView, ::Google::Cloud::Logging::V2::DeleteViewRequest, ::Google::Protobuf::Empty
52
74
  # Lists sinks.
53
- rpc :ListSinks, Google::Cloud::Logging::V2::ListSinksRequest, Google::Cloud::Logging::V2::ListSinksResponse
75
+ rpc :ListSinks, ::Google::Cloud::Logging::V2::ListSinksRequest, ::Google::Cloud::Logging::V2::ListSinksResponse
54
76
  # Gets a sink.
55
- rpc :GetSink, Google::Cloud::Logging::V2::GetSinkRequest, Google::Cloud::Logging::V2::LogSink
77
+ rpc :GetSink, ::Google::Cloud::Logging::V2::GetSinkRequest, ::Google::Cloud::Logging::V2::LogSink
56
78
  # Creates a sink that exports specified log entries to a destination. The
57
79
  # export of newly-ingested log entries begins immediately, unless the sink's
58
80
  # `writer_identity` is not permitted to write to the destination. A sink can
59
81
  # export log entries only from the resource owning the sink.
60
- rpc :CreateSink, Google::Cloud::Logging::V2::CreateSinkRequest, Google::Cloud::Logging::V2::LogSink
82
+ rpc :CreateSink, ::Google::Cloud::Logging::V2::CreateSinkRequest, ::Google::Cloud::Logging::V2::LogSink
61
83
  # Updates a sink. This method replaces the following fields in the existing
62
84
  # sink with values from the new sink: `destination`, and `filter`.
63
85
  #
64
86
  # The updated sink might also have a new `writer_identity`; see the
65
87
  # `unique_writer_identity` field.
66
- rpc :UpdateSink, Google::Cloud::Logging::V2::UpdateSinkRequest, Google::Cloud::Logging::V2::LogSink
88
+ rpc :UpdateSink, ::Google::Cloud::Logging::V2::UpdateSinkRequest, ::Google::Cloud::Logging::V2::LogSink
67
89
  # Deletes a sink. If the sink has a unique `writer_identity`, then that
68
90
  # service account is also deleted.
69
- rpc :DeleteSink, Google::Cloud::Logging::V2::DeleteSinkRequest, Google::Protobuf::Empty
91
+ rpc :DeleteSink, ::Google::Cloud::Logging::V2::DeleteSinkRequest, ::Google::Protobuf::Empty
70
92
  # Lists all the exclusions in a parent resource.
71
- rpc :ListExclusions, Google::Cloud::Logging::V2::ListExclusionsRequest, Google::Cloud::Logging::V2::ListExclusionsResponse
93
+ rpc :ListExclusions, ::Google::Cloud::Logging::V2::ListExclusionsRequest, ::Google::Cloud::Logging::V2::ListExclusionsResponse
72
94
  # Gets the description of an exclusion.
73
- rpc :GetExclusion, Google::Cloud::Logging::V2::GetExclusionRequest, Google::Cloud::Logging::V2::LogExclusion
95
+ rpc :GetExclusion, ::Google::Cloud::Logging::V2::GetExclusionRequest, ::Google::Cloud::Logging::V2::LogExclusion
74
96
  # Creates a new exclusion in a specified parent resource.
75
97
  # Only log entries belonging to that resource can be excluded.
76
98
  # You can have up to 10 exclusions in a resource.
77
- rpc :CreateExclusion, Google::Cloud::Logging::V2::CreateExclusionRequest, Google::Cloud::Logging::V2::LogExclusion
99
+ rpc :CreateExclusion, ::Google::Cloud::Logging::V2::CreateExclusionRequest, ::Google::Cloud::Logging::V2::LogExclusion
78
100
  # Changes one or more properties of an existing exclusion.
79
- rpc :UpdateExclusion, Google::Cloud::Logging::V2::UpdateExclusionRequest, Google::Cloud::Logging::V2::LogExclusion
101
+ rpc :UpdateExclusion, ::Google::Cloud::Logging::V2::UpdateExclusionRequest, ::Google::Cloud::Logging::V2::LogExclusion
80
102
  # Deletes an exclusion.
81
- rpc :DeleteExclusion, Google::Cloud::Logging::V2::DeleteExclusionRequest, Google::Protobuf::Empty
103
+ rpc :DeleteExclusion, ::Google::Cloud::Logging::V2::DeleteExclusionRequest, ::Google::Protobuf::Empty
82
104
  # Gets the Logs Router CMEK settings for the given resource.
83
105
  #
84
106
  # Note: CMEK for the Logs Router can currently only be configured for GCP
@@ -86,8 +108,9 @@ module Google
86
108
  # the GCP organization.
87
109
  #
88
110
  # See [Enabling CMEK for Logs
89
- # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
90
- rpc :GetCmekSettings, Google::Cloud::Logging::V2::GetCmekSettingsRequest, Google::Cloud::Logging::V2::CmekSettings
111
+ # Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
112
+ # for more information.
113
+ rpc :GetCmekSettings, ::Google::Cloud::Logging::V2::GetCmekSettingsRequest, ::Google::Cloud::Logging::V2::CmekSettings
91
114
  # Updates the Logs Router CMEK settings for the given resource.
92
115
  #
93
116
  # Note: CMEK for the Logs Router can currently only be configured for GCP
@@ -101,8 +124,9 @@ module Google
101
124
  # 3) access to the key is disabled.
102
125
  #
103
126
  # See [Enabling CMEK for Logs
104
- # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
105
- rpc :UpdateCmekSettings, Google::Cloud::Logging::V2::UpdateCmekSettingsRequest, Google::Cloud::Logging::V2::CmekSettings
127
+ # Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
128
+ # for more information.
129
+ rpc :UpdateCmekSettings, ::Google::Cloud::Logging::V2::UpdateCmekSettingsRequest, ::Google::Cloud::Logging::V2::CmekSettings
106
130
  end
107
131
 
108
132
  Stub = Service.rpc_stub_class
@@ -34,15 +34,15 @@ module Google
34
34
  self.service_name = 'google.logging.v2.MetricsServiceV2'
35
35
 
36
36
  # Lists logs-based metrics.
37
- rpc :ListLogMetrics, Google::Cloud::Logging::V2::ListLogMetricsRequest, Google::Cloud::Logging::V2::ListLogMetricsResponse
37
+ rpc :ListLogMetrics, ::Google::Cloud::Logging::V2::ListLogMetricsRequest, ::Google::Cloud::Logging::V2::ListLogMetricsResponse
38
38
  # Gets a logs-based metric.
39
- rpc :GetLogMetric, Google::Cloud::Logging::V2::GetLogMetricRequest, Google::Cloud::Logging::V2::LogMetric
39
+ rpc :GetLogMetric, ::Google::Cloud::Logging::V2::GetLogMetricRequest, ::Google::Cloud::Logging::V2::LogMetric
40
40
  # Creates a logs-based metric.
41
- rpc :CreateLogMetric, Google::Cloud::Logging::V2::CreateLogMetricRequest, Google::Cloud::Logging::V2::LogMetric
41
+ rpc :CreateLogMetric, ::Google::Cloud::Logging::V2::CreateLogMetricRequest, ::Google::Cloud::Logging::V2::LogMetric
42
42
  # Creates or updates a logs-based metric.
43
- rpc :UpdateLogMetric, Google::Cloud::Logging::V2::UpdateLogMetricRequest, Google::Cloud::Logging::V2::LogMetric
43
+ rpc :UpdateLogMetric, ::Google::Cloud::Logging::V2::UpdateLogMetricRequest, ::Google::Cloud::Logging::V2::LogMetric
44
44
  # Deletes a logs-based metric.
45
- rpc :DeleteLogMetric, Google::Cloud::Logging::V2::DeleteLogMetricRequest, Google::Protobuf::Empty
45
+ rpc :DeleteLogMetric, ::Google::Cloud::Logging::V2::DeleteLogMetricRequest, ::Google::Protobuf::Empty
46
46
  end
47
47
 
48
48
  Stub = Service.rpc_stub_class
@@ -11,6 +11,7 @@ require 'google/logging/v2/log_entry_pb'
11
11
  require 'google/logging/v2/logging_config_pb'
12
12
  require 'google/protobuf/duration_pb'
13
13
  require 'google/protobuf/empty_pb'
14
+ require 'google/protobuf/field_mask_pb'
14
15
  require 'google/protobuf/timestamp_pb'
15
16
  require 'google/rpc/status_pb'
16
17
  require 'google/api/annotations_pb'
@@ -55,11 +56,30 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
55
56
  optional :parent, :string, 1
56
57
  optional :page_size, :int32, 2
57
58
  optional :page_token, :string, 3
59
+ repeated :resource_names, :string, 8
58
60
  end
59
61
  add_message "google.logging.v2.ListLogsResponse" do
60
62
  repeated :log_names, :string, 3
61
63
  optional :next_page_token, :string, 2
62
64
  end
65
+ add_message "google.logging.v2.TailLogEntriesRequest" do
66
+ repeated :resource_names, :string, 1
67
+ optional :filter, :string, 2
68
+ optional :buffer_window, :message, 3, "google.protobuf.Duration"
69
+ end
70
+ add_message "google.logging.v2.TailLogEntriesResponse" do
71
+ repeated :entries, :message, 1, "google.logging.v2.LogEntry"
72
+ repeated :suppression_info, :message, 2, "google.logging.v2.TailLogEntriesResponse.SuppressionInfo"
73
+ end
74
+ add_message "google.logging.v2.TailLogEntriesResponse.SuppressionInfo" do
75
+ optional :reason, :enum, 1, "google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason"
76
+ optional :suppressed_count, :int32, 2
77
+ end
78
+ add_enum "google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason" do
79
+ value :REASON_UNSPECIFIED, 0
80
+ value :RATE_LIMIT, 1
81
+ value :NOT_CONSUMED, 2
82
+ end
63
83
  end
64
84
  end
65
85
 
@@ -77,6 +97,10 @@ module Google
77
97
  ListMonitoredResourceDescriptorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListMonitoredResourceDescriptorsResponse").msgclass
78
98
  ListLogsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListLogsRequest").msgclass
79
99
  ListLogsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListLogsResponse").msgclass
100
+ TailLogEntriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.TailLogEntriesRequest").msgclass
101
+ TailLogEntriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.TailLogEntriesResponse").msgclass
102
+ TailLogEntriesResponse::SuppressionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.TailLogEntriesResponse.SuppressionInfo").msgclass
103
+ TailLogEntriesResponse::SuppressionInfo::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason").enummodule
80
104
  end
81
105
  end
82
106
  end
@@ -37,7 +37,7 @@ module Google
37
37
  # entries. Log entries written shortly before the delete operation might not
38
38
  # be deleted. Entries received after the delete operation with a timestamp
39
39
  # before the operation will be deleted.
40
- rpc :DeleteLog, Google::Cloud::Logging::V2::DeleteLogRequest, Google::Protobuf::Empty
40
+ rpc :DeleteLog, ::Google::Cloud::Logging::V2::DeleteLogRequest, ::Google::Protobuf::Empty
41
41
  # Writes log entries to Logging. This API method is the
42
42
  # only way to send log entries to Logging. This method
43
43
  # is used, directly or indirectly, by the Logging agent
@@ -45,16 +45,20 @@ module Google
45
45
  # A single request may contain log entries for a maximum of 1000
46
46
  # different resources (projects, organizations, billing accounts or
47
47
  # folders)
48
- rpc :WriteLogEntries, Google::Cloud::Logging::V2::WriteLogEntriesRequest, Google::Cloud::Logging::V2::WriteLogEntriesResponse
48
+ rpc :WriteLogEntries, ::Google::Cloud::Logging::V2::WriteLogEntriesRequest, ::Google::Cloud::Logging::V2::WriteLogEntriesResponse
49
49
  # Lists log entries. Use this method to retrieve log entries that originated
50
50
  # from a project/folder/organization/billing account. For ways to export log
51
- # entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export).
52
- rpc :ListLogEntries, Google::Cloud::Logging::V2::ListLogEntriesRequest, Google::Cloud::Logging::V2::ListLogEntriesResponse
51
+ # entries, see [Exporting
52
+ # Logs](https://cloud.google.com/logging/docs/export).
53
+ rpc :ListLogEntries, ::Google::Cloud::Logging::V2::ListLogEntriesRequest, ::Google::Cloud::Logging::V2::ListLogEntriesResponse
53
54
  # Lists the descriptors for monitored resource types used by Logging.
54
- rpc :ListMonitoredResourceDescriptors, Google::Cloud::Logging::V2::ListMonitoredResourceDescriptorsRequest, Google::Cloud::Logging::V2::ListMonitoredResourceDescriptorsResponse
55
+ rpc :ListMonitoredResourceDescriptors, ::Google::Cloud::Logging::V2::ListMonitoredResourceDescriptorsRequest, ::Google::Cloud::Logging::V2::ListMonitoredResourceDescriptorsResponse
55
56
  # Lists the logs in projects, organizations, folders, or billing accounts.
56
57
  # Only logs that have entries are listed.
57
- rpc :ListLogs, Google::Cloud::Logging::V2::ListLogsRequest, Google::Cloud::Logging::V2::ListLogsResponse
58
+ rpc :ListLogs, ::Google::Cloud::Logging::V2::ListLogsRequest, ::Google::Cloud::Logging::V2::ListLogsResponse
59
+ # Streaming read of log entries as they are ingested. Until the stream is
60
+ # terminated, it will continue reading logs.
61
+ rpc :TailLogEntries, stream(::Google::Cloud::Logging::V2::TailLogEntriesRequest), stream(::Google::Cloud::Logging::V2::TailLogEntriesResponse)
58
62
  end
59
63
 
60
64
  Stub = Service.rpc_stub_class
@@ -43,12 +43,12 @@ module Google
43
43
  #
44
44
  # The ResourceDescriptor Yaml config will look like:
45
45
  #
46
- # resources:
47
- # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/\\{project}/topics/\\{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/\\{project}"
46
+ # resources:
47
+ # - type: "pubsub.googleapis.com/Topic"
48
+ # name_descriptor:
49
+ # - pattern: "projects/{project}/topics/{topic}"
50
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
+ # parent_name_extractor: "projects/{project}"
52
52
  #
53
53
  # Sometimes, resources have multiple patterns, typically because they can
54
54
  # live under multiple parents.
@@ -183,15 +183,24 @@ module Google
183
183
  # }
184
184
  # @!attribute [rw] plural
185
185
  # @return [::String]
186
- # The plural name used in the resource name, such as 'projects' for
187
- # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
- # field in k8s CRD spec
186
+ # The plural name used in the resource name and permission names, such as
187
+ # 'projects' for the resource name of 'projects/\\{project}' and the permission
188
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
189
+ # concept of the `plural` field in k8s CRD spec
189
190
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
191
+ #
192
+ # Note: The plural form is required even for singleton resources. See
193
+ # https://aip.dev/156
190
194
  # @!attribute [rw] singular
191
195
  # @return [::String]
192
196
  # The same concept of the `singular` field in k8s CRD spec
193
197
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
198
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
199
+ # @!attribute [rw] style
200
+ # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
201
+ # Style flag(s) for this resource.
202
+ # These indicate that a resource is expected to conform to a given
203
+ # style. See the specific style flags for additional information.
195
204
  class ResourceDescriptor
196
205
  include ::Google::Protobuf::MessageExts
197
206
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -211,6 +220,22 @@ module Google
211
220
  # that from being necessary once there are multiple patterns.)
212
221
  FUTURE_MULTI_PATTERN = 2
213
222
  end
223
+
224
+ # A flag representing a specific style that a resource claims to conform to.
225
+ module Style
226
+ # The unspecified value. Do not use.
227
+ STYLE_UNSPECIFIED = 0
228
+
229
+ # This resource is intended to be "declarative-friendly".
230
+ #
231
+ # Declarative-friendly resources must be more strictly consistent, and
232
+ # setting this to true communicates to tools that this resource should
233
+ # adhere to declarative-friendly expectations.
234
+ #
235
+ # Note: This is used by the API linter (linter.aip.dev) to enable
236
+ # additional checks.
237
+ DECLARATIVE_FRIENDLY = 1
238
+ end
214
239
  end
215
240
 
216
241
  # Defines a proto annotation that describes a string field that refers to
@@ -226,6 +251,17 @@ module Google
226
251
  # type: "pubsub.googleapis.com/Topic"
227
252
  # }];
228
253
  # }
254
+ #
255
+ # Occasionally, a field may reference an arbitrary resource. In this case,
256
+ # APIs use the special value * in their resource reference.
257
+ #
258
+ # Example:
259
+ #
260
+ # message GetIamPolicyRequest {
261
+ # string resource = 2 [(google.api.resource_reference) = {
262
+ # type: "*"
263
+ # }];
264
+ # }
229
265
  # @!attribute [rw] child_type
230
266
  # @return [::String]
231
267
  # The resource type of a child collection that the annotated field
@@ -234,11 +270,11 @@ module Google
234
270
  #
235
271
  # Example:
236
272
  #
237
- # message ListLogEntriesRequest {
238
- # string parent = 1 [(google.api.resource_reference) = {
239
- # child_type: "logging.googleapis.com/LogEntry"
240
- # };
241
- # }
273
+ # message ListLogEntriesRequest {
274
+ # string parent = 1 [(google.api.resource_reference) = {
275
+ # child_type: "logging.googleapis.com/LogEntry"
276
+ # };
277
+ # }
242
278
  class ResourceReference
243
279
  include ::Google::Protobuf::MessageExts
244
280
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -52,11 +52,13 @@ module Google
52
52
  # @!attribute [rw] remote_ip
53
53
  # @return [::String]
54
54
  # The IP address (IPv4 or IPv6) of the client that issued the HTTP
55
- # request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`.
55
+ # request. This field can include port information. Examples:
56
+ # `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
56
57
  # @!attribute [rw] server_ip
57
58
  # @return [::String]
58
59
  # The IP address (IPv4 or IPv6) of the origin server that the request was
59
- # sent to.
60
+ # sent to. This field can include port information. Examples:
61
+ # `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
60
62
  # @!attribute [rw] referer
61
63
  # @return [::String]
62
64
  # The referer URL of the request, as defined in
@@ -78,11 +78,11 @@ module Google
78
78
  # current time. Timestamps have nanosecond accuracy, but trailing zeros in
79
79
  # the fractional seconds might be omitted when the timestamp is displayed.
80
80
  #
81
- # Incoming log entries should have timestamps that are no more than the [logs
82
- # retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
83
- # in the future. Log entries outside those time boundaries will not be
84
- # available when calling `entries.list`, but those log entries can still be
85
- # [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
81
+ # Incoming log entries must have timestamps that don't exceed the
82
+ # [logs retention
83
+ # period](https://cloud.google.com/logging/quotas#logs_retention_periods) in
84
+ # the past, and that don't exceed 24 hours in the future. Log entries outside
85
+ # those time boundaries aren't ingested by Logging.
86
86
  # @!attribute [r] receive_timestamp
87
87
  # @return [::Google::Protobuf::Timestamp]
88
88
  # Output only. The time the log entry was received by Logging.
@@ -93,15 +93,16 @@ module Google
93
93
  # the entries later in the list. See the `entries.list` method.
94
94
  #
95
95
  # Log entries with timestamps that are more than the
96
- # [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than
97
- # 24 hours in the future will not be available when calling `entries.list`.
98
- # However, those log entries can still be
99
- # [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
96
+ # [logs retention period](https://cloud.google.com/logging/quota-policy) in
97
+ # the past or more than 24 hours in the future will not be available when
98
+ # calling `entries.list`. However, those log entries can still be [exported
99
+ # with
100
+ # LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
100
101
  #
101
102
  # To improve throughput and to avoid exceeding the
102
- # [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`,
103
- # you should try to include several log entries in this list,
104
- # rather than calling this method for each individual log entry.
103
+ # [quota limit](https://cloud.google.com/logging/quota-policy) for calls to
104
+ # `entries.write`, you should try to include several log entries in this
105
+ # list, rather than calling this method for each individual log entry.
105
106
  # @!attribute [rw] partial_success
106
107
  # @return [::Boolean]
107
108
  # Optional. Whether valid entries should be written even if some other
@@ -168,17 +169,22 @@ module Google
168
169
  # "billingAccounts/[BILLING_ACCOUNT_ID]"
169
170
  # "folders/[FOLDER_ID]"
170
171
  #
172
+ # May alternatively be one or more views
173
+ # projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
174
+ # organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
175
+ # billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
176
+ # folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
171
177
  #
172
178
  # Projects listed in the `project_ids` field are added to this list.
173
179
  # @!attribute [rw] filter
174
180
  # @return [::String]
175
181
  # Optional. A filter that chooses which log entries to return. See [Advanced
176
- # Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). Only log entries that
177
- # match the filter are returned. An empty filter matches all log entries in
178
- # the resources listed in `resource_names`. Referencing a parent resource
179
- # that is not listed in `resource_names` will cause the filter to return no
180
- # results.
181
- # The maximum length of the filter is 20000 characters.
182
+ # Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries).
183
+ # Only log entries that match the filter are returned. An empty filter
184
+ # matches all log entries in the resources listed in `resource_names`.
185
+ # Referencing a parent resource that is not listed in `resource_names` will
186
+ # cause the filter to return no results. The maximum length of the filter is
187
+ # 20000 characters.
182
188
  # @!attribute [rw] order_by
183
189
  # @return [::String]
184
190
  # Optional. How the results should be sorted. Presently, the only permitted
@@ -190,7 +196,8 @@ module Google
190
196
  # @!attribute [rw] page_size
191
197
  # @return [::Integer]
192
198
  # Optional. The maximum number of results to return from this request.
193
- # Non-positive values are ignored. The presence of `next_page_token` in the
199
+ # Default is 50. If the value is negative or exceeds 1000,
200
+ # the request is rejected. The presence of `next_page_token` in the
194
201
  # response indicates that more results might be available.
195
202
  # @!attribute [rw] page_token
196
203
  # @return [::String]
@@ -277,6 +284,19 @@ module Google
277
284
  # preceding call to this method. `pageToken` must be the value of
278
285
  # `nextPageToken` from the previous response. The values of other method
279
286
  # parameters should be identical to those in the previous call.
287
+ # @!attribute [rw] resource_names
288
+ # @return [::Array<::String>]
289
+ # Optional. The resource name that owns the logs:
290
+ # projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
291
+ # organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
292
+ # billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
293
+ # folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
294
+ #
295
+ # To support legacy queries, it could also be:
296
+ # "projects/[PROJECT_ID]"
297
+ # "organizations/[ORGANIZATION_ID]"
298
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
299
+ # "folders/[FOLDER_ID]"
280
300
  class ListLogsRequest
281
301
  include ::Google::Protobuf::MessageExts
282
302
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -297,6 +317,87 @@ module Google
297
317
  include ::Google::Protobuf::MessageExts
298
318
  extend ::Google::Protobuf::MessageExts::ClassMethods
299
319
  end
320
+
321
+ # The parameters to `TailLogEntries`.
322
+ # @!attribute [rw] resource_names
323
+ # @return [::Array<::String>]
324
+ # Required. Name of a parent resource from which to retrieve log entries:
325
+ #
326
+ # "projects/[PROJECT_ID]"
327
+ # "organizations/[ORGANIZATION_ID]"
328
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
329
+ # "folders/[FOLDER_ID]"
330
+ #
331
+ # May alternatively be one or more views:
332
+ # "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
333
+ # "organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
334
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
335
+ # "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
336
+ # @!attribute [rw] filter
337
+ # @return [::String]
338
+ # Optional. A filter that chooses which log entries to return. See [Advanced
339
+ # Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
340
+ # Only log entries that match the filter are returned. An empty filter
341
+ # matches all log entries in the resources listed in `resource_names`.
342
+ # Referencing a parent resource that is not in `resource_names` will cause
343
+ # the filter to return no results. The maximum length of the filter is 20000
344
+ # characters.
345
+ # @!attribute [rw] buffer_window
346
+ # @return [::Google::Protobuf::Duration]
347
+ # Optional. The amount of time to buffer log entries at the server before
348
+ # being returned to prevent out of order results due to late arriving log
349
+ # entries. Valid values are between 0-60000 milliseconds. Defaults to 2000
350
+ # milliseconds.
351
+ class TailLogEntriesRequest
352
+ include ::Google::Protobuf::MessageExts
353
+ extend ::Google::Protobuf::MessageExts::ClassMethods
354
+ end
355
+
356
+ # Result returned from `TailLogEntries`.
357
+ # @!attribute [rw] entries
358
+ # @return [::Array<::Google::Cloud::Logging::V2::LogEntry>]
359
+ # A list of log entries. Each response in the stream will order entries with
360
+ # increasing values of `LogEntry.timestamp`. Ordering is not guaranteed
361
+ # between separate responses.
362
+ # @!attribute [rw] suppression_info
363
+ # @return [::Array<::Google::Cloud::Logging::V2::TailLogEntriesResponse::SuppressionInfo>]
364
+ # If entries that otherwise would have been included in the session were not
365
+ # sent back to the client, counts of relevant entries omitted from the
366
+ # session with the reason that they were not included. There will be at most
367
+ # one of each reason per response. The counts represent the number of
368
+ # suppressed entries since the last streamed response.
369
+ class TailLogEntriesResponse
370
+ include ::Google::Protobuf::MessageExts
371
+ extend ::Google::Protobuf::MessageExts::ClassMethods
372
+
373
+ # Information about entries that were omitted from the session.
374
+ # @!attribute [rw] reason
375
+ # @return [::Google::Cloud::Logging::V2::TailLogEntriesResponse::SuppressionInfo::Reason]
376
+ # The reason that entries were omitted from the session.
377
+ # @!attribute [rw] suppressed_count
378
+ # @return [::Integer]
379
+ # A lower bound on the count of entries omitted due to `reason`.
380
+ class SuppressionInfo
381
+ include ::Google::Protobuf::MessageExts
382
+ extend ::Google::Protobuf::MessageExts::ClassMethods
383
+
384
+ # An indicator of why entries were omitted.
385
+ module Reason
386
+ # Unexpected default.
387
+ REASON_UNSPECIFIED = 0
388
+
389
+ # Indicates suppression occurred due to relevant entries being
390
+ # received in excess of rate limits. For quotas and limits, see
391
+ # [Logging API quotas and
392
+ # limits](https://cloud.google.com/logging/quotas#api-limits).
393
+ RATE_LIMIT = 1
394
+
395
+ # Indicates suppression occurred due to the client not consuming
396
+ # responses quickly enough.
397
+ NOT_CONSUMED = 2
398
+ end
399
+ end
400
+ end
300
401
  end
301
402
  end
302
403
  end