google-cloud-monitoring 0.28.0 → 0.29.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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -0
  3. data/README.md +38 -12
  4. data/lib/google/cloud/monitoring.rb +52 -2
  5. data/lib/google/cloud/monitoring/v3.rb +124 -52
  6. data/lib/google/cloud/monitoring/v3/alert_policy_service_client.rb +67 -29
  7. data/lib/google/cloud/monitoring/v3/credentials.rb +43 -0
  8. data/lib/google/cloud/monitoring/v3/doc/google/api/metric.rb +7 -11
  9. data/lib/google/cloud/monitoring/v3/doc/google/api/monitored_resource.rb +27 -3
  10. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/alert.rb +7 -8
  11. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/alert_service.rb +135 -0
  12. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/group_service.rb +145 -0
  13. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/metric.rb +17 -12
  14. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/metric_service.rb +227 -0
  15. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/notification_service.rb +213 -0
  16. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/uptime.rb +49 -29
  17. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/uptime_service.rb +131 -0
  18. data/lib/google/cloud/monitoring/v3/doc/google/protobuf/any.rb +124 -0
  19. data/lib/google/cloud/monitoring/v3/doc/google/protobuf/empty.rb +28 -0
  20. data/lib/google/cloud/monitoring/v3/doc/google/protobuf/struct.rb +73 -0
  21. data/lib/google/cloud/monitoring/v3/doc/google/rpc/status.rb +83 -0
  22. data/lib/google/cloud/monitoring/v3/doc/overview.rb +26 -1
  23. data/lib/google/cloud/monitoring/v3/group_service_client.rb +78 -35
  24. data/lib/google/cloud/monitoring/v3/metric_service_client.rb +99 -47
  25. data/lib/google/cloud/monitoring/v3/notification_channel_service_client.rb +87 -39
  26. data/lib/google/cloud/monitoring/v3/uptime_check_service_client.rb +90 -47
  27. data/lib/google/monitoring/v3/alert_service_services_pb.rb +1 -1
  28. data/lib/google/monitoring/v3/dropped_labels_pb.rb +19 -0
  29. data/lib/google/monitoring/v3/group_service_services_pb.rb +2 -2
  30. data/lib/google/monitoring/v3/metric_pb.rb +3 -0
  31. data/lib/google/monitoring/v3/metric_service_pb.rb +2 -0
  32. data/lib/google/monitoring/v3/metric_service_services_pb.rb +1 -1
  33. data/lib/google/monitoring/v3/notification_service_services_pb.rb +1 -1
  34. data/lib/google/monitoring/v3/span_context_pb.rb +18 -0
  35. data/lib/google/monitoring/v3/uptime_pb.rb +10 -9
  36. data/lib/google/monitoring/v3/uptime_service_pb.rb +1 -0
  37. data/lib/google/monitoring/v3/uptime_service_services_pb.rb +1 -1
  38. metadata +59 -6
  39. data/lib/google/cloud/monitoring/credentials.rb +0 -33
@@ -0,0 +1,83 @@
1
+ # Copyright 2018 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
+ module Google
16
+ module Rpc
17
+ # The +Status+ type defines a logical error model that is suitable for different
18
+ # programming environments, including REST APIs and RPC APIs. It is used by
19
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
20
+ #
21
+ # * Simple to use and understand for most users
22
+ # * Flexible enough to meet unexpected needs
23
+ #
24
+ # = Overview
25
+ #
26
+ # The +Status+ message contains three pieces of data: error code, error message,
27
+ # and error details. The error code should be an enum value of
28
+ # {Google::Rpc::Code}, but it may accept additional error codes if needed. The
29
+ # error message should be a developer-facing English message that helps
30
+ # developers *understand* and *resolve* the error. If a localized user-facing
31
+ # error message is needed, put the localized message in the error details or
32
+ # localize it in the client. The optional error details may contain arbitrary
33
+ # information about the error. There is a predefined set of error detail types
34
+ # in the package +google.rpc+ that can be used for common error conditions.
35
+ #
36
+ # = Language mapping
37
+ #
38
+ # The +Status+ message is the logical representation of the error model, but it
39
+ # is not necessarily the actual wire format. When the +Status+ message is
40
+ # exposed in different client libraries and different wire protocols, it can be
41
+ # mapped differently. For example, it will likely be mapped to some exceptions
42
+ # in Java, but more likely mapped to some error codes in C.
43
+ #
44
+ # = Other uses
45
+ #
46
+ # The error model and the +Status+ message can be used in a variety of
47
+ # environments, either with or without APIs, to provide a
48
+ # consistent developer experience across different environments.
49
+ #
50
+ # Example uses of this error model include:
51
+ #
52
+ # * Partial errors. If a service needs to return partial errors to the client,
53
+ # it may embed the +Status+ in the normal response to indicate the partial
54
+ # errors.
55
+ #
56
+ # * Workflow errors. A typical workflow has multiple steps. Each step may
57
+ # have a +Status+ message for error reporting.
58
+ #
59
+ # * Batch operations. If a client uses batch request and batch response, the
60
+ # +Status+ message should be used directly inside batch response, one for
61
+ # each error sub-response.
62
+ #
63
+ # * Asynchronous operations. If an API call embeds asynchronous operation
64
+ # results in its response, the status of those operations should be
65
+ # represented directly using the +Status+ message.
66
+ #
67
+ # * Logging. If some API errors are stored in logs, the message +Status+ could
68
+ # be used directly after any stripping needed for security/privacy reasons.
69
+ # @!attribute [rw] code
70
+ # @return [Integer]
71
+ # The status code, which should be an enum value of {Google::Rpc::Code}.
72
+ # @!attribute [rw] message
73
+ # @return [String]
74
+ # A developer-facing error message, which should be in English. Any
75
+ # user-facing error message should be localized and sent in the
76
+ # {Google::Rpc::Status#details} field, or localized by the client.
77
+ # @!attribute [rw] details
78
+ # @return [Array<Google::Protobuf::Any>]
79
+ # A list of messages that carry the error details. There is a common set of
80
+ # message types for APIs to use.
81
+ class Status; end
82
+ end
83
+ end
@@ -31,7 +31,7 @@ module Google
31
31
  #
32
32
  # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
33
33
  # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
34
- # 3. [Enable the Stackdriver Monitoring API.](https://console.cloud.google.com/apis/api/monitoring)
34
+ # 3. [Enable the Stackdriver Monitoring API.](https://console.cloud.google.com/apis/library/monitoring.googleapis.com)
35
35
  # 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
36
36
  #
37
37
  # ### Installation
@@ -69,6 +69,31 @@ module Google
69
69
  #
70
70
  # [Product Documentation]: https://cloud.google.com/monitoring
71
71
  #
72
+ # ## Enabling Logging
73
+ #
74
+ # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
75
+ # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
76
+ # or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
77
+ # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
78
+ # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
79
+ #
80
+ # Configuring a Ruby stdlib logger:
81
+ #
82
+ # ```ruby
83
+ # require "logger"
84
+ #
85
+ # module MyLogger
86
+ # LOGGER = Logger.new $stderr, level: Logger::WARN
87
+ # def logger
88
+ # LOGGER
89
+ # end
90
+ # end
91
+ #
92
+ # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
93
+ # module GRPC
94
+ # extend MyLogger
95
+ # end
96
+ # ```
72
97
  #
73
98
  module Monitoring
74
99
  module V3
@@ -25,14 +25,14 @@ require "pathname"
25
25
  require "google/gax"
26
26
 
27
27
  require "google/monitoring/v3/group_service_pb"
28
- require "google/cloud/monitoring/credentials"
28
+ require "google/cloud/monitoring/v3/credentials"
29
29
 
30
30
  module Google
31
31
  module Cloud
32
32
  module Monitoring
33
33
  module V3
34
34
  # The Group API lets you inspect and manage your
35
- # [groups](https://cloud.google.comgoogle.monitoring.v3.Group).
35
+ # [groups](https://cloud.google.com#google.monitoring.v3.Group).
36
36
  #
37
37
  # A group is a named filter that is used to identify
38
38
  # a collection of monitored resources. Groups are typically used to
@@ -55,6 +55,9 @@ module Google
55
55
  # The default port of the service.
56
56
  DEFAULT_SERVICE_PORT = 443
57
57
 
58
+ # The default set of gRPC interceptors.
59
+ GRPC_INTERCEPTORS = []
60
+
58
61
  DEFAULT_TIMEOUT = 30
59
62
 
60
63
  PAGE_DESCRIPTORS = {
@@ -136,11 +139,18 @@ module Google
136
139
  # or the specified config is missing data points.
137
140
  # @param timeout [Numeric]
138
141
  # The default timeout, in seconds, for calls made through this client.
142
+ # @param metadata [Hash]
143
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
144
+ # @param exception_transformer [Proc]
145
+ # An optional proc that intercepts any exceptions raised during an API call to inject
146
+ # custom error handling.
139
147
  def initialize \
140
148
  credentials: nil,
141
149
  scopes: ALL_SCOPES,
142
150
  client_config: {},
143
151
  timeout: DEFAULT_TIMEOUT,
152
+ metadata: nil,
153
+ exception_transformer: nil,
144
154
  lib_name: nil,
145
155
  lib_version: ""
146
156
  # These require statements are intentionally placed here to initialize
@@ -149,10 +159,10 @@ module Google
149
159
  require "google/gax/grpc"
150
160
  require "google/monitoring/v3/group_service_services_pb"
151
161
 
152
- credentials ||= Google::Cloud::Monitoring::Credentials.default
162
+ credentials ||= Google::Cloud::Monitoring::V3::Credentials.default
153
163
 
154
164
  if credentials.is_a?(String) || credentials.is_a?(Hash)
155
- updater_proc = Google::Cloud::Monitoring::Credentials.new(credentials).updater_proc
165
+ updater_proc = Google::Cloud::Monitoring::V3::Credentials.new(credentials).updater_proc
156
166
  end
157
167
  if credentials.is_a?(GRPC::Core::Channel)
158
168
  channel = credentials
@@ -176,6 +186,7 @@ module Google
176
186
  google_api_client.freeze
177
187
 
178
188
  headers = { :"x-goog-api-client" => google_api_client }
189
+ headers.merge!(metadata) unless metadata.nil?
179
190
  client_config_file = Pathname.new(__dir__).join(
180
191
  "group_service_client_config.json"
181
192
  )
@@ -188,13 +199,14 @@ module Google
188
199
  timeout,
189
200
  page_descriptors: PAGE_DESCRIPTORS,
190
201
  errors: Google::Gax::Grpc::API_ERRORS,
191
- kwargs: headers
202
+ metadata: headers
192
203
  )
193
204
  end
194
205
 
195
206
  # Allow overriding the service path/port in subclasses.
196
207
  service_path = self.class::SERVICE_ADDRESS
197
208
  port = self.class::DEFAULT_SERVICE_PORT
209
+ interceptors = self.class::GRPC_INTERCEPTORS
198
210
  @group_service_stub = Google::Gax::Grpc.create_stub(
199
211
  service_path,
200
212
  port,
@@ -202,32 +214,39 @@ module Google
202
214
  channel: channel,
203
215
  updater_proc: updater_proc,
204
216
  scopes: scopes,
217
+ interceptors: interceptors,
205
218
  &Google::Monitoring::V3::GroupService::Stub.method(:new)
206
219
  )
207
220
 
208
221
  @list_groups = Google::Gax.create_api_call(
209
222
  @group_service_stub.method(:list_groups),
210
- defaults["list_groups"]
223
+ defaults["list_groups"],
224
+ exception_transformer: exception_transformer
211
225
  )
212
226
  @get_group = Google::Gax.create_api_call(
213
227
  @group_service_stub.method(:get_group),
214
- defaults["get_group"]
228
+ defaults["get_group"],
229
+ exception_transformer: exception_transformer
215
230
  )
216
231
  @create_group = Google::Gax.create_api_call(
217
232
  @group_service_stub.method(:create_group),
218
- defaults["create_group"]
233
+ defaults["create_group"],
234
+ exception_transformer: exception_transformer
219
235
  )
220
236
  @update_group = Google::Gax.create_api_call(
221
237
  @group_service_stub.method(:update_group),
222
- defaults["update_group"]
238
+ defaults["update_group"],
239
+ exception_transformer: exception_transformer
223
240
  )
224
241
  @delete_group = Google::Gax.create_api_call(
225
242
  @group_service_stub.method(:delete_group),
226
- defaults["delete_group"]
243
+ defaults["delete_group"],
244
+ exception_transformer: exception_transformer
227
245
  )
228
246
  @list_group_members = Google::Gax.create_api_call(
229
247
  @group_service_stub.method(:list_group_members),
230
- defaults["list_group_members"]
248
+ defaults["list_group_members"],
249
+ exception_transformer: exception_transformer
231
250
  )
232
251
  end
233
252
 
@@ -262,6 +281,9 @@ module Google
262
281
  # @param options [Google::Gax::CallOptions]
263
282
  # Overrides the default settings for this call, e.g, timeout,
264
283
  # retries, etc.
284
+ # @yield [result, operation] Access the result along with the RPC operation
285
+ # @yieldparam result [Google::Gax::PagedEnumerable<Google::Monitoring::V3::Group>]
286
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
265
287
  # @return [Google::Gax::PagedEnumerable<Google::Monitoring::V3::Group>]
266
288
  # An enumerable of Google::Monitoring::V3::Group instances.
267
289
  # See Google::Gax::PagedEnumerable documentation for other
@@ -269,9 +291,9 @@ module Google
269
291
  # object.
270
292
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
271
293
  # @example
272
- # require "google/cloud/monitoring/v3"
294
+ # require "google/cloud/monitoring"
273
295
  #
274
- # group_service_client = Google::Cloud::Monitoring::V3::Group.new
296
+ # group_service_client = Google::Cloud::Monitoring::Group.new(version: :v3)
275
297
  # formatted_name = Google::Cloud::Monitoring::V3::GroupServiceClient.project_path("[PROJECT]")
276
298
  #
277
299
  # # Iterate over all results.
@@ -293,7 +315,8 @@ module Google
293
315
  ancestors_of_group: nil,
294
316
  descendants_of_group: nil,
295
317
  page_size: nil,
296
- options: nil
318
+ options: nil,
319
+ &block
297
320
  req = {
298
321
  name: name,
299
322
  children_of_group: children_of_group,
@@ -302,7 +325,7 @@ module Google
302
325
  page_size: page_size
303
326
  }.delete_if { |_, v| v.nil? }
304
327
  req = Google::Gax::to_proto(req, Google::Monitoring::V3::ListGroupsRequest)
305
- @list_groups.call(req, options)
328
+ @list_groups.call(req, options, &block)
306
329
  end
307
330
 
308
331
  # Gets a single group.
@@ -313,23 +336,27 @@ module Google
313
336
  # @param options [Google::Gax::CallOptions]
314
337
  # Overrides the default settings for this call, e.g, timeout,
315
338
  # retries, etc.
339
+ # @yield [result, operation] Access the result along with the RPC operation
340
+ # @yieldparam result [Google::Monitoring::V3::Group]
341
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
316
342
  # @return [Google::Monitoring::V3::Group]
317
343
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
318
344
  # @example
319
- # require "google/cloud/monitoring/v3"
345
+ # require "google/cloud/monitoring"
320
346
  #
321
- # group_service_client = Google::Cloud::Monitoring::V3::Group.new
347
+ # group_service_client = Google::Cloud::Monitoring::Group.new(version: :v3)
322
348
  # formatted_name = Google::Cloud::Monitoring::V3::GroupServiceClient.group_path("[PROJECT]", "[GROUP]")
323
349
  # response = group_service_client.get_group(formatted_name)
324
350
 
325
351
  def get_group \
326
352
  name,
327
- options: nil
353
+ options: nil,
354
+ &block
328
355
  req = {
329
356
  name: name
330
357
  }.delete_if { |_, v| v.nil? }
331
358
  req = Google::Gax::to_proto(req, Google::Monitoring::V3::GetGroupRequest)
332
- @get_group.call(req, options)
359
+ @get_group.call(req, options, &block)
333
360
  end
334
361
 
335
362
  # Creates a new group.
@@ -347,12 +374,15 @@ module Google
347
374
  # @param options [Google::Gax::CallOptions]
348
375
  # Overrides the default settings for this call, e.g, timeout,
349
376
  # retries, etc.
377
+ # @yield [result, operation] Access the result along with the RPC operation
378
+ # @yieldparam result [Google::Monitoring::V3::Group]
379
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
350
380
  # @return [Google::Monitoring::V3::Group]
351
381
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
352
382
  # @example
353
- # require "google/cloud/monitoring/v3"
383
+ # require "google/cloud/monitoring"
354
384
  #
355
- # group_service_client = Google::Cloud::Monitoring::V3::Group.new
385
+ # group_service_client = Google::Cloud::Monitoring::Group.new(version: :v3)
356
386
  # formatted_name = Google::Cloud::Monitoring::V3::GroupServiceClient.project_path("[PROJECT]")
357
387
  #
358
388
  # # TODO: Initialize +group+:
@@ -363,14 +393,15 @@ module Google
363
393
  name,
364
394
  group,
365
395
  validate_only: nil,
366
- options: nil
396
+ options: nil,
397
+ &block
367
398
  req = {
368
399
  name: name,
369
400
  group: group,
370
401
  validate_only: validate_only
371
402
  }.delete_if { |_, v| v.nil? }
372
403
  req = Google::Gax::to_proto(req, Google::Monitoring::V3::CreateGroupRequest)
373
- @create_group.call(req, options)
404
+ @create_group.call(req, options, &block)
374
405
  end
375
406
 
376
407
  # Updates an existing group.
@@ -386,12 +417,15 @@ module Google
386
417
  # @param options [Google::Gax::CallOptions]
387
418
  # Overrides the default settings for this call, e.g, timeout,
388
419
  # retries, etc.
420
+ # @yield [result, operation] Access the result along with the RPC operation
421
+ # @yieldparam result [Google::Monitoring::V3::Group]
422
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
389
423
  # @return [Google::Monitoring::V3::Group]
390
424
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
391
425
  # @example
392
- # require "google/cloud/monitoring/v3"
426
+ # require "google/cloud/monitoring"
393
427
  #
394
- # group_service_client = Google::Cloud::Monitoring::V3::Group.new
428
+ # group_service_client = Google::Cloud::Monitoring::Group.new(version: :v3)
395
429
  #
396
430
  # # TODO: Initialize +group+:
397
431
  # group = {}
@@ -400,13 +434,14 @@ module Google
400
434
  def update_group \
401
435
  group,
402
436
  validate_only: nil,
403
- options: nil
437
+ options: nil,
438
+ &block
404
439
  req = {
405
440
  group: group,
406
441
  validate_only: validate_only
407
442
  }.delete_if { |_, v| v.nil? }
408
443
  req = Google::Gax::to_proto(req, Google::Monitoring::V3::UpdateGroupRequest)
409
- @update_group.call(req, options)
444
+ @update_group.call(req, options, &block)
410
445
  end
411
446
 
412
447
  # Deletes an existing group.
@@ -417,22 +452,26 @@ module Google
417
452
  # @param options [Google::Gax::CallOptions]
418
453
  # Overrides the default settings for this call, e.g, timeout,
419
454
  # retries, etc.
455
+ # @yield [result, operation] Access the result along with the RPC operation
456
+ # @yieldparam result []
457
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
420
458
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
421
459
  # @example
422
- # require "google/cloud/monitoring/v3"
460
+ # require "google/cloud/monitoring"
423
461
  #
424
- # group_service_client = Google::Cloud::Monitoring::V3::Group.new
462
+ # group_service_client = Google::Cloud::Monitoring::Group.new(version: :v3)
425
463
  # formatted_name = Google::Cloud::Monitoring::V3::GroupServiceClient.group_path("[PROJECT]", "[GROUP]")
426
464
  # group_service_client.delete_group(formatted_name)
427
465
 
428
466
  def delete_group \
429
467
  name,
430
- options: nil
468
+ options: nil,
469
+ &block
431
470
  req = {
432
471
  name: name
433
472
  }.delete_if { |_, v| v.nil? }
434
473
  req = Google::Gax::to_proto(req, Google::Monitoring::V3::DeleteGroupRequest)
435
- @delete_group.call(req, options)
474
+ @delete_group.call(req, options, &block)
436
475
  nil
437
476
  end
438
477
 
@@ -465,6 +504,9 @@ module Google
465
504
  # @param options [Google::Gax::CallOptions]
466
505
  # Overrides the default settings for this call, e.g, timeout,
467
506
  # retries, etc.
507
+ # @yield [result, operation] Access the result along with the RPC operation
508
+ # @yieldparam result [Google::Gax::PagedEnumerable<Google::Api::MonitoredResource>]
509
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
468
510
  # @return [Google::Gax::PagedEnumerable<Google::Api::MonitoredResource>]
469
511
  # An enumerable of Google::Api::MonitoredResource instances.
470
512
  # See Google::Gax::PagedEnumerable documentation for other
@@ -472,9 +514,9 @@ module Google
472
514
  # object.
473
515
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
474
516
  # @example
475
- # require "google/cloud/monitoring/v3"
517
+ # require "google/cloud/monitoring"
476
518
  #
477
- # group_service_client = Google::Cloud::Monitoring::V3::Group.new
519
+ # group_service_client = Google::Cloud::Monitoring::Group.new(version: :v3)
478
520
  # formatted_name = Google::Cloud::Monitoring::V3::GroupServiceClient.group_path("[PROJECT]", "[GROUP]")
479
521
  #
480
522
  # # Iterate over all results.
@@ -495,7 +537,8 @@ module Google
495
537
  page_size: nil,
496
538
  filter: nil,
497
539
  interval: nil,
498
- options: nil
540
+ options: nil,
541
+ &block
499
542
  req = {
500
543
  name: name,
501
544
  page_size: page_size,
@@ -503,7 +546,7 @@ module Google
503
546
  interval: interval
504
547
  }.delete_if { |_, v| v.nil? }
505
548
  req = Google::Gax::to_proto(req, Google::Monitoring::V3::ListGroupMembersRequest)
506
- @list_group_members.call(req, options)
549
+ @list_group_members.call(req, options, &block)
507
550
  end
508
551
  end
509
552
  end