google-cloud-logging 0.21.2 → 0.23.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,33 +15,38 @@
15
15
  module Google
16
16
  module Logging
17
17
  module V2
18
- # Describes a sink used to export log entries outside Stackdriver Logging.
18
+ # Describes a sink used to export log entries outside of Stackdriver Logging.
19
+ # A logs filter controls which log entries are exported. Sinks can have a
20
+ # start time and an end time; these can be used to place log entries from an
21
+ # exact time range into a particular destination. If both +start_time+ and
22
+ # +end_time+ are present, then +start_time+ must be less than +end_time+.
19
23
  # @!attribute [rw] name
20
24
  # @return [String]
21
25
  # Required. The client-assigned sink identifier, unique within the
22
26
  # project. Example: +"my-syslog-errors-to-pubsub"+. Sink identifiers are
23
- # limited to 1000 characters and can include only the following characters:
24
- # +A-Z+, +a-z+, +0-9+, and the special characters +_-.+. The maximum length
25
- # of the name is 100 characters.
27
+ # limited to 100 characters and can include only the following characters:
28
+ # upper and lower-case alphanumeric characters, underscores, hyphens, and
29
+ # periods.
26
30
  # @!attribute [rw] destination
27
31
  # @return [String]
28
- # Required. The export destination. See
29
- # {Exporting Logs With Sinks}[https://cloud.google.com/logging/docs/api/tasks/exporting-logs].
30
- # Examples:
32
+ # Required. The export destination:
33
+ #
34
+ # "storage.googleapis.com/[GCS_BUCKET]"
35
+ # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
36
+ # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"
31
37
  #
32
- # "storage.googleapis.com/my-gcs-bucket"
33
- # "bigquery.googleapis.com/projects/my-project-id/datasets/my-dataset"
34
- # "pubsub.googleapis.com/projects/my-project/topics/my-topic"
38
+ # For more information, see
39
+ # {Exporting Logs With Sinks}[https://cloud.google.com/logging/docs/api/tasks/exporting-logs].
35
40
  # @!attribute [rw] filter
36
41
  # @return [String]
37
42
  # Optional. An {advanced logs filter}[https://cloud.google.com/logging/docs/view/advanced_filters].
38
43
  # Only log entries matching the filter are exported. The filter
39
44
  # must be consistent with the log entry format specified by the
40
45
  # +outputVersionFormat+ parameter, regardless of the format of the
41
- # log entry that was originally written to Stackdriver Logging.
42
- # Example filter (V2 format):
46
+ # log entry that was originally ingested by Stackdriver Logging.
47
+ # The following example uses field names in the v2 log entry format:
43
48
  #
44
- # logName=projects/my-projectid/logs/syslog AND severity>=ERROR
49
+ # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
45
50
  # @!attribute [rw] output_version_format
46
51
  # @return [Google::Logging::V2::LogSink::VersionFormat]
47
52
  # Optional. The log entry version to use for this sink's exported log
@@ -50,18 +55,23 @@ module Google
50
55
  # v2 format is used.
51
56
  # @!attribute [rw] writer_identity
52
57
  # @return [String]
53
- # Output only. The iam identity to which the destination needs to grant write
54
- # access. This may be a service account or a group.
55
- # Examples (Do not assume these specific values):
56
- # "serviceAccount:cloud-logs@system.gserviceaccount.com"
57
- # "group:cloud-logs@google.com"
58
- #
59
- # For GCS destinations, the role "roles/owner" is required on the bucket
60
- # For Cloud Pubsub destinations, the role "roles/pubsub.publisher" is
61
- # required on the topic
62
- # For BigQuery, the role "roles/editor" is required on the dataset
58
+ # Output only. An IAM identity—a service account or group—that
59
+ # will write exported log entries to the destination on behalf of Stackdriver
60
+ # Logging. You must grant this identity write-access to the destination.
61
+ # Consult the destination service's documentation to determine the exact role
62
+ # that must be granted.
63
+ # @!attribute [rw] start_time
64
+ # @return [Google::Protobuf::Timestamp]
65
+ # Optional. The time at which this sink will begin exporting log entries. If
66
+ # this value is present, then log entries are exported only if +start_time+
67
+ # <=+entry.timestamp+.
68
+ # @!attribute [rw] end_time
69
+ # @return [Google::Protobuf::Timestamp]
70
+ # Optional. Time at which this sink will stop exporting log entries. If this
71
+ # value is present, then log entries are exported only if +entry.timestamp+ <
72
+ # +end_time+.
63
73
  class LogSink
64
- # Available log entry formats. Log entries can be written to Cloud
74
+ # Available log entry formats. Log entries can be written to Stackdriver
65
75
  # Logging in either format and can be exported in either format.
66
76
  # Version 2 is the preferred format.
67
77
  module VersionFormat
@@ -79,8 +89,10 @@ module Google
79
89
  # The parameters to +ListSinks+.
80
90
  # @!attribute [rw] parent
81
91
  # @return [String]
82
- # Required. The cloud resource containing the sinks.
83
- # Example: +"projects/my-logging-project"+.
92
+ # Required. The resource name where this sink was created:
93
+ #
94
+ # "projects/[PROJECT_ID]"
95
+ # "organizations/[ORGANIZATION_ID]"
84
96
  # @!attribute [rw] page_token
85
97
  # @return [String]
86
98
  # Optional. If present, then retrieve the next batch of results from the
@@ -108,42 +120,66 @@ module Google
108
120
  # The parameters to +GetSink+.
109
121
  # @!attribute [rw] sink_name
110
122
  # @return [String]
111
- # Required. The resource name of the sink to return.
112
- # Example: +"projects/my-project-id/sinks/my-sink-id"+.
123
+ # Required. The resource name of the sink to return:
124
+ #
125
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
126
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
113
127
  class GetSinkRequest; end
114
128
 
115
129
  # The parameters to +CreateSink+.
116
130
  # @!attribute [rw] parent
117
131
  # @return [String]
118
- # Required. The resource in which to create the sink.
119
- # Example: +"projects/my-project-id"+.
120
- # The new sink must be provided in the request.
132
+ # Required. The resource in which to create the sink:
133
+ #
134
+ # "projects/[PROJECT_ID]"
135
+ # "organizations/[ORGANIZATION_ID]"
121
136
  # @!attribute [rw] sink
122
137
  # @return [Google::Logging::V2::LogSink]
123
138
  # Required. The new sink, whose +name+ parameter is a sink identifier that
124
139
  # is not already in use.
140
+ # @!attribute [rw] unique_writer_identity
141
+ # @return [true, false]
142
+ # Optional. Whether the sink will have a dedicated service account returned
143
+ # in the sink's writer_identity. Set this field to be true to export
144
+ # logs from one project to a different project. This field is ignored for
145
+ # non-project sinks (e.g. organization sinks) because those sinks are
146
+ # required to have dedicated service accounts.
125
147
  class CreateSinkRequest; end
126
148
 
127
149
  # The parameters to +UpdateSink+.
128
150
  # @!attribute [rw] sink_name
129
151
  # @return [String]
130
152
  # Required. The resource name of the sink to update, including the parent
131
- # resource and the sink identifier. If the sink does not exist, this method
132
- # creates the sink. Example: +"projects/my-project-id/sinks/my-sink-id"+.
153
+ # resource and the sink identifier:
154
+ #
155
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
156
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
157
+ #
158
+ # Example: +"projects/my-project-id/sinks/my-sink-id"+.
133
159
  # @!attribute [rw] sink
134
160
  # @return [Google::Logging::V2::LogSink]
135
161
  # Required. The updated sink, whose name is the same identifier that appears
136
162
  # as part of +sinkName+. If +sinkName+ does not exist, then
137
163
  # this method creates a new sink.
164
+ # @!attribute [rw] unique_writer_identity
165
+ # @return [true, false]
166
+ # Optional. Whether the sink will have a dedicated service account returned
167
+ # in the sink's writer_identity. Set this field to be true to export
168
+ # logs from one project to a different project. This field is ignored for
169
+ # non-project sinks (e.g. organization sinks) because those sinks are
170
+ # required to have dedicated service accounts.
138
171
  class UpdateSinkRequest; end
139
172
 
140
173
  # The parameters to +DeleteSink+.
141
174
  # @!attribute [rw] sink_name
142
175
  # @return [String]
143
176
  # Required. The resource name of the sink to delete, including the parent
144
- # resource and the sink identifier. Example:
145
- # +"projects/my-project-id/sinks/my-sink-id"+. It is an error if the sink
146
- # does not exist.
177
+ # resource and the sink identifier:
178
+ #
179
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
180
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
181
+ #
182
+ # It is an error if the sink does not exist.
147
183
  class DeleteSinkRequest; end
148
184
  end
149
185
  end
@@ -19,21 +19,32 @@ module Google
19
19
  # number of log entries that match a logs filter.
20
20
  # @!attribute [rw] name
21
21
  # @return [String]
22
- # Required. The client-assigned metric identifier. Example:
23
- # +"severe_errors"+. Metric identifiers are limited to 100
24
- # characters and can include only the following characters: +A-Z+,
25
- # +a-z+, +0-9+, and the special characters +_-.,+!*',()%/+. The
26
- # forward-slash character (+/+) denotes a hierarchy of name pieces,
27
- # and it cannot be the first character of the name. The '%' character
28
- # is used to URL encode unsafe and reserved characters and must be
29
- # followed by two hexadecimal digits according to RFC 1738.
22
+ # Required. The client-assigned metric identifier.
23
+ # Examples: +"error_count"+, +"nginx/requests"+.
24
+ #
25
+ # Metric identifiers are limited to 100 characters and can include
26
+ # only the following characters: +A-Z+, +a-z+, +0-9+, and the
27
+ # special characters +_-.,+!*',()%/+. The forward-slash character
28
+ # (+/+) denotes a hierarchy of name pieces, and it cannot be the
29
+ # first character of the name.
30
+ #
31
+ # The metric identifier in this field must not be
32
+ # {URL-encoded}[https://en.wikipedia.org/wiki/Percent-encoding].
33
+ # However, when the metric identifier appears as the +[METRIC_ID]+
34
+ # part of a +metric_name+ API parameter, then the metric identifier
35
+ # must be URL-encoded. Example:
36
+ # +"projects/my-project/metrics/nginx%2Frequests"+.
30
37
  # @!attribute [rw] description
31
38
  # @return [String]
32
39
  # Optional. A description of this metric, which is used in documentation.
33
40
  # @!attribute [rw] filter
34
41
  # @return [String]
35
42
  # Required. An {advanced logs filter}[https://cloud.google.com/logging/docs/view/advanced_filters].
36
- # Example: +"resource.type=gae_app AND severity>=ERROR"+.
43
+ # Example:
44
+ #
45
+ # "resource.type=gae_app AND severity>=ERROR"
46
+ #
47
+ # The maximum length of the filter is 20000 characters.
37
48
  # @!attribute [rw] version
38
49
  # @return [Google::Logging::V2::LogMetric::ApiVersion]
39
50
  # Output only. The API version that created or updated this metric.
@@ -53,8 +64,9 @@ module Google
53
64
  # The parameters to ListLogMetrics.
54
65
  # @!attribute [rw] parent
55
66
  # @return [String]
56
- # Required. The resource name containing the metrics.
57
- # Example: +"projects/my-project-id"+.
67
+ # Required. The name of the project containing the metrics:
68
+ #
69
+ # "projects/[PROJECT_ID]"
58
70
  # @!attribute [rw] page_token
59
71
  # @return [String]
60
72
  # Optional. If present, then retrieve the next batch of results from the
@@ -82,15 +94,17 @@ module Google
82
94
  # The parameters to GetLogMetric.
83
95
  # @!attribute [rw] metric_name
84
96
  # @return [String]
85
- # The resource name of the desired metric.
86
- # Example: +"projects/my-project-id/metrics/my-metric-id"+.
97
+ # The resource name of the desired metric:
98
+ #
99
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
87
100
  class GetLogMetricRequest; end
88
101
 
89
102
  # The parameters to CreateLogMetric.
90
103
  # @!attribute [rw] parent
91
104
  # @return [String]
92
- # The resource name of the project in which to create the metric.
93
- # Example: +"projects/my-project-id"+.
105
+ # The resource name of the project in which to create the metric:
106
+ #
107
+ # "projects/[PROJECT_ID]"
94
108
  #
95
109
  # The new metric must be provided in the request.
96
110
  # @!attribute [rw] metric
@@ -102,24 +116,24 @@ module Google
102
116
  # The parameters to UpdateLogMetric.
103
117
  # @!attribute [rw] metric_name
104
118
  # @return [String]
105
- # The resource name of the metric to update.
106
- # Example: +"projects/my-project-id/metrics/my-metric-id"+.
119
+ # The resource name of the metric to update:
107
120
  #
108
- # The updated metric must be provided in the request and have the
109
- # same identifier that is specified in +metricName+.
110
- # If the metric does not exist, it is created.
121
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
122
+ #
123
+ # The updated metric must be provided in the request and it's
124
+ # +name+ field must be the same as +[METRIC_ID]+ If the metric
125
+ # does not exist in +[PROJECT_ID]+, then a new metric is created.
111
126
  # @!attribute [rw] metric
112
127
  # @return [Google::Logging::V2::LogMetric]
113
- # The updated metric, whose name must be the same as the
114
- # metric identifier in +metricName+. If +metricName+ does not
115
- # exist, then a new metric is created.
128
+ # The updated metric.
116
129
  class UpdateLogMetricRequest; end
117
130
 
118
131
  # The parameters to DeleteLogMetric.
119
132
  # @!attribute [rw] metric_name
120
133
  # @return [String]
121
- # The resource name of the metric to delete.
122
- # Example: +"projects/my-project-id/metrics/my-metric-id"+.
134
+ # The resource name of the metric to delete:
135
+ #
136
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
123
137
  class DeleteLogMetricRequest; end
124
138
  end
125
139
  end
@@ -36,7 +36,7 @@ module Google
36
36
  #
37
37
  # @!attribute [r] logging_service_v2_stub
38
38
  # @return [Google::Logging::V2::LoggingServiceV2::Stub]
39
- class LoggingServiceV2Api
39
+ class LoggingServiceV2Client
40
40
  attr_reader :logging_service_v2_stub
41
41
 
42
42
  # The default address of the service.
@@ -72,11 +72,11 @@ module Google
72
72
  "https://www.googleapis.com/auth/logging.write"
73
73
  ].freeze
74
74
 
75
- PARENT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
75
+ PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
76
76
  "projects/{project}"
77
77
  )
78
78
 
79
- private_constant :PARENT_PATH_TEMPLATE
79
+ private_constant :PROJECT_PATH_TEMPLATE
80
80
 
81
81
  LOG_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
82
82
  "projects/{project}/logs/{log}"
@@ -84,11 +84,11 @@ module Google
84
84
 
85
85
  private_constant :LOG_PATH_TEMPLATE
86
86
 
87
- # Returns a fully-qualified parent resource name string.
87
+ # Returns a fully-qualified project resource name string.
88
88
  # @param project [String]
89
89
  # @return [String]
90
- def self.parent_path project
91
- PARENT_PATH_TEMPLATE.render(
90
+ def self.project_path project
91
+ PROJECT_PATH_TEMPLATE.render(
92
92
  :"project" => project
93
93
  )
94
94
  end
@@ -104,11 +104,11 @@ module Google
104
104
  )
105
105
  end
106
106
 
107
- # Parses the project from a parent resource.
108
- # @param parent_name [String]
107
+ # Parses the project from a project resource.
108
+ # @param project_name [String]
109
109
  # @return [String]
110
- def self.match_project_from_parent_name parent_name
111
- PARENT_PATH_TEMPLATE.match(parent_name)["project"]
110
+ def self.match_project_from_project_name project_name
111
+ PROJECT_PATH_TEMPLATE.match(project_name)["project"]
112
112
  end
113
113
 
114
114
  # Parses the project from a log resource.
@@ -160,6 +160,7 @@ module Google
160
160
  require "google/gax/grpc"
161
161
  require "google/logging/v2/logging_services_pb"
162
162
 
163
+
163
164
  google_api_client = "#{app_name}/#{app_version} " \
164
165
  "#{CODE_GEN_NAME_VERSION} gax/#{Google::Gax::VERSION} " \
165
166
  "ruby/#{RUBY_VERSION}".freeze
@@ -208,24 +209,32 @@ module Google
208
209
 
209
210
  # Service calls
210
211
 
211
- # Deletes a log and all its log entries.
212
- # The log will reappear if it receives new entries.
212
+ # Deletes all the log entries in a log.
213
+ # The log reappears if it receives new entries.
213
214
  #
214
215
  # @param log_name [String]
215
- # Required. The resource name of the log to delete. Example:
216
- # +"projects/my-project/logs/syslog"+.
216
+ # Required. The resource name of the log to delete:
217
+ #
218
+ # "projects/[PROJECT_ID]/logs/[LOG_ID]"
219
+ # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
220
+ #
221
+ # +[LOG_ID]+ must be URL-encoded. For example,
222
+ # +"projects/my-project-id/logs/syslog"+,
223
+ # +"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"+.
224
+ # For more information about log names, see
225
+ # LogEntry.
217
226
  # @param options [Google::Gax::CallOptions]
218
227
  # Overrides the default settings for this call, e.g, timeout,
219
228
  # retries, etc.
220
229
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
221
230
  # @example
222
- # require "google/cloud/logging/v2/logging_service_v2_api"
231
+ # require "google/cloud/logging/v2/logging_service_v2_client"
223
232
  #
224
- # LoggingServiceV2Api = Google::Cloud::Logging::V2::LoggingServiceV2Api
233
+ # LoggingServiceV2Client = Google::Cloud::Logging::V2::LoggingServiceV2Client
225
234
  #
226
- # logging_service_v2_api = LoggingServiceV2Api.new
227
- # formatted_log_name = LoggingServiceV2Api.log_path("[PROJECT]", "[LOG]")
228
- # logging_service_v2_api.delete_log(formatted_log_name)
235
+ # logging_service_v2_client = LoggingServiceV2Client.new
236
+ # formatted_log_name = LoggingServiceV2Client.log_path("[PROJECT]", "[LOG]")
237
+ # logging_service_v2_client.delete_log(formatted_log_name)
229
238
 
230
239
  def delete_log \
231
240
  log_name,
@@ -234,6 +243,7 @@ module Google
234
243
  log_name: log_name
235
244
  }.delete_if { |_, v| v.nil? })
236
245
  @delete_log.call(req, options)
246
+ nil
237
247
  end
238
248
 
239
249
  # Writes log entries to Stackdriver Logging. All log entries are
@@ -241,8 +251,15 @@ module Google
241
251
  #
242
252
  # @param log_name [String]
243
253
  # Optional. A default log resource name that is assigned to all log entries
244
- # in +entries+ that do not specify a value for +log_name+. Example:
245
- # +"projects/my-project/logs/syslog"+. See
254
+ # in +entries+ that do not specify a value for +log_name+:
255
+ #
256
+ # "projects/[PROJECT_ID]/logs/[LOG_ID]"
257
+ # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
258
+ #
259
+ # +[LOG_ID]+ must be URL-encoded. For example,
260
+ # +"projects/my-project-id/logs/syslog"+ or
261
+ # +"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"+.
262
+ # For more information about log names, see
246
263
  # LogEntry.
247
264
  # @param resource [Google::Api::MonitoredResource]
248
265
  # Optional. A default monitored resource object that is assigned to all log
@@ -280,13 +297,13 @@ module Google
280
297
  # @return [Google::Logging::V2::WriteLogEntriesResponse]
281
298
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
282
299
  # @example
283
- # require "google/cloud/logging/v2/logging_service_v2_api"
300
+ # require "google/cloud/logging/v2/logging_service_v2_client"
284
301
  #
285
- # LoggingServiceV2Api = Google::Cloud::Logging::V2::LoggingServiceV2Api
302
+ # LoggingServiceV2Client = Google::Cloud::Logging::V2::LoggingServiceV2Client
286
303
  #
287
- # logging_service_v2_api = LoggingServiceV2Api.new
304
+ # logging_service_v2_client = LoggingServiceV2Client.new
288
305
  # entries = []
289
- # response = logging_service_v2_api.write_log_entries(entries)
306
+ # response = logging_service_v2_client.write_log_entries(entries)
290
307
 
291
308
  def write_log_entries \
292
309
  entries,
@@ -311,18 +328,23 @@ module Google
311
328
  #
312
329
  # @param project_ids [Array<String>]
313
330
  # Deprecated. One or more project identifiers or project numbers from which
314
- # to retrieve log entries. Examples: +"my-project-1A"+, +"1234567890"+. If
331
+ # to retrieve log entries. Example: +"my-project-1A"+. If
315
332
  # present, these project identifiers are converted to resource format and
316
333
  # added to the list of resources in +resourceNames+. Callers should use
317
334
  # +resourceNames+ rather than this parameter.
318
335
  # @param resource_names [Array<String>]
319
- # Optional. One or more cloud resources from which to retrieve log entries.
320
- # Example: +"projects/my-project-1A"+, +"projects/1234567890"+. Projects
321
- # listed in +projectIds+ are added to this list.
336
+ # Required. One or more cloud resources from which to retrieve log
337
+ # entries:
338
+ #
339
+ # "projects/[PROJECT_ID]"
340
+ # "organizations/[ORGANIZATION_ID]"
341
+ #
342
+ # Projects listed in the +project_ids+ field are added to this list.
322
343
  # @param filter [String]
323
344
  # Optional. A filter that chooses which log entries to return. See {Advanced
324
345
  # Logs Filters}[https://cloud.google.com/logging/docs/view/advanced_filters]. Only log entries that
325
346
  # match the filter are returned. An empty filter matches all log entries.
347
+ # The maximum length of the filter is 20000 characters.
326
348
  # @param order_by [String]
327
349
  # Optional. How the results should be sorted. Presently, the only permitted
328
350
  # values are +"timestamp asc"+ (default) and +"timestamp desc"+. The first
@@ -346,20 +368,20 @@ module Google
346
368
  # object.
347
369
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
348
370
  # @example
349
- # require "google/cloud/logging/v2/logging_service_v2_api"
371
+ # require "google/cloud/logging/v2/logging_service_v2_client"
350
372
  #
351
- # LoggingServiceV2Api = Google::Cloud::Logging::V2::LoggingServiceV2Api
373
+ # LoggingServiceV2Client = Google::Cloud::Logging::V2::LoggingServiceV2Client
352
374
  #
353
- # logging_service_v2_api = LoggingServiceV2Api.new
354
- # project_ids = []
375
+ # logging_service_v2_client = LoggingServiceV2Client.new
376
+ # resource_names = []
355
377
  #
356
378
  # # Iterate over all results.
357
- # logging_service_v2_api.list_log_entries(project_ids).each do |element|
379
+ # logging_service_v2_client.list_log_entries(resource_names).each do |element|
358
380
  # # Process element.
359
381
  # end
360
382
  #
361
383
  # # Or iterate over results one page at a time.
362
- # logging_service_v2_api.list_log_entries(project_ids).each_page do |page|
384
+ # logging_service_v2_client.list_log_entries(resource_names).each_page do |page|
363
385
  # # Process each page at a time.
364
386
  # page.each do |element|
365
387
  # # Process element.
@@ -367,15 +389,15 @@ module Google
367
389
  # end
368
390
 
369
391
  def list_log_entries \
370
- project_ids,
371
- resource_names: nil,
392
+ resource_names,
393
+ project_ids: nil,
372
394
  filter: nil,
373
395
  order_by: nil,
374
396
  page_size: nil,
375
397
  options: nil
376
398
  req = Google::Logging::V2::ListLogEntriesRequest.new({
377
- project_ids: project_ids,
378
399
  resource_names: resource_names,
400
+ project_ids: project_ids,
379
401
  filter: filter,
380
402
  order_by: order_by,
381
403
  page_size: page_size
@@ -401,19 +423,19 @@ module Google
401
423
  # object.
402
424
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
403
425
  # @example
404
- # require "google/cloud/logging/v2/logging_service_v2_api"
426
+ # require "google/cloud/logging/v2/logging_service_v2_client"
405
427
  #
406
- # LoggingServiceV2Api = Google::Cloud::Logging::V2::LoggingServiceV2Api
428
+ # LoggingServiceV2Client = Google::Cloud::Logging::V2::LoggingServiceV2Client
407
429
  #
408
- # logging_service_v2_api = LoggingServiceV2Api.new
430
+ # logging_service_v2_client = LoggingServiceV2Client.new
409
431
  #
410
432
  # # Iterate over all results.
411
- # logging_service_v2_api.list_monitored_resource_descriptors.each do |element|
433
+ # logging_service_v2_client.list_monitored_resource_descriptors.each do |element|
412
434
  # # Process element.
413
435
  # end
414
436
  #
415
437
  # # Or iterate over results one page at a time.
416
- # logging_service_v2_api.list_monitored_resource_descriptors.each_page do |page|
438
+ # logging_service_v2_client.list_monitored_resource_descriptors.each_page do |page|
417
439
  # # Process each page at a time.
418
440
  # page.each do |element|
419
441
  # # Process element.