google-cloud-monitoring 0.29.3 → 0.29.4
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.
- checksums.yaml +4 -4
- data/.yardopts +2 -0
- data/AUTHENTICATION.md +199 -0
- data/README.md +3 -3
- data/lib/google/cloud/monitoring.rb +3 -3
- data/lib/google/cloud/monitoring/v3.rb +3 -3
- data/lib/google/cloud/monitoring/v3/alert_policy_service_client.rb +45 -30
- data/lib/google/cloud/monitoring/v3/doc/google/api/distribution.rb +1 -1
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/alert.rb +8 -4
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/common.rb +7 -4
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/group.rb +2 -1
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/notification.rb +5 -3
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/notification_service.rb +2 -1
- data/lib/google/cloud/monitoring/v3/doc/google/protobuf/any.rb +2 -1
- data/lib/google/cloud/monitoring/v3/doc/google/protobuf/field_mask.rb +18 -26
- data/lib/google/cloud/monitoring/v3/doc/google/protobuf/timestamp.rb +15 -13
- data/lib/google/cloud/monitoring/v3/doc/google/rpc/status.rb +17 -14
- data/lib/google/cloud/monitoring/v3/group_service_client.rb +52 -34
- data/lib/google/cloud/monitoring/v3/metric_service_client.rb +75 -46
- data/lib/google/cloud/monitoring/v3/notification_channel_service_client.rb +60 -38
- data/lib/google/cloud/monitoring/v3/uptime_check_service_client.rb +34 -19
- data/lib/google/monitoring/v3/metric_service_services_pb.rb +10 -5
- metadata +6 -6
@@ -79,12 +79,6 @@ module Google
|
|
79
79
|
].freeze
|
80
80
|
|
81
81
|
|
82
|
-
PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
83
|
-
"projects/{project}"
|
84
|
-
)
|
85
|
-
|
86
|
-
private_constant :PROJECT_PATH_TEMPLATE
|
87
|
-
|
88
82
|
METRIC_DESCRIPTOR_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
89
83
|
"projects/{project}/metricDescriptors/{metric_descriptor=**}"
|
90
84
|
)
|
@@ -97,14 +91,11 @@ module Google
|
|
97
91
|
|
98
92
|
private_constant :MONITORED_RESOURCE_DESCRIPTOR_PATH_TEMPLATE
|
99
93
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
:"project" => project
|
106
|
-
)
|
107
|
-
end
|
94
|
+
PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
95
|
+
"projects/{project}"
|
96
|
+
)
|
97
|
+
|
98
|
+
private_constant :PROJECT_PATH_TEMPLATE
|
108
99
|
|
109
100
|
# Returns a fully-qualified metric_descriptor resource name string.
|
110
101
|
# @param project [String]
|
@@ -128,6 +119,15 @@ module Google
|
|
128
119
|
)
|
129
120
|
end
|
130
121
|
|
122
|
+
# Returns a fully-qualified project resource name string.
|
123
|
+
# @param project [String]
|
124
|
+
# @return [String]
|
125
|
+
def self.project_path project
|
126
|
+
PROJECT_PATH_TEMPLATE.render(
|
127
|
+
:"project" => project
|
128
|
+
)
|
129
|
+
end
|
130
|
+
|
131
131
|
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
132
132
|
# Provides the means for authenticating requests made by the client. This parameter can
|
133
133
|
# be many types.
|
@@ -234,48 +234,73 @@ module Google
|
|
234
234
|
@list_monitored_resource_descriptors = Google::Gax.create_api_call(
|
235
235
|
@metric_service_stub.method(:list_monitored_resource_descriptors),
|
236
236
|
defaults["list_monitored_resource_descriptors"],
|
237
|
-
exception_transformer: exception_transformer
|
237
|
+
exception_transformer: exception_transformer,
|
238
|
+
params_extractor: proc do |request|
|
239
|
+
{'name' => request.name}
|
240
|
+
end
|
238
241
|
)
|
239
242
|
@get_monitored_resource_descriptor = Google::Gax.create_api_call(
|
240
243
|
@metric_service_stub.method(:get_monitored_resource_descriptor),
|
241
244
|
defaults["get_monitored_resource_descriptor"],
|
242
|
-
exception_transformer: exception_transformer
|
245
|
+
exception_transformer: exception_transformer,
|
246
|
+
params_extractor: proc do |request|
|
247
|
+
{'name' => request.name}
|
248
|
+
end
|
243
249
|
)
|
244
250
|
@list_metric_descriptors = Google::Gax.create_api_call(
|
245
251
|
@metric_service_stub.method(:list_metric_descriptors),
|
246
252
|
defaults["list_metric_descriptors"],
|
247
|
-
exception_transformer: exception_transformer
|
253
|
+
exception_transformer: exception_transformer,
|
254
|
+
params_extractor: proc do |request|
|
255
|
+
{'name' => request.name}
|
256
|
+
end
|
248
257
|
)
|
249
258
|
@get_metric_descriptor = Google::Gax.create_api_call(
|
250
259
|
@metric_service_stub.method(:get_metric_descriptor),
|
251
260
|
defaults["get_metric_descriptor"],
|
252
|
-
exception_transformer: exception_transformer
|
261
|
+
exception_transformer: exception_transformer,
|
262
|
+
params_extractor: proc do |request|
|
263
|
+
{'name' => request.name}
|
264
|
+
end
|
253
265
|
)
|
254
266
|
@create_metric_descriptor = Google::Gax.create_api_call(
|
255
267
|
@metric_service_stub.method(:create_metric_descriptor),
|
256
268
|
defaults["create_metric_descriptor"],
|
257
|
-
exception_transformer: exception_transformer
|
269
|
+
exception_transformer: exception_transformer,
|
270
|
+
params_extractor: proc do |request|
|
271
|
+
{'name' => request.name}
|
272
|
+
end
|
258
273
|
)
|
259
274
|
@delete_metric_descriptor = Google::Gax.create_api_call(
|
260
275
|
@metric_service_stub.method(:delete_metric_descriptor),
|
261
276
|
defaults["delete_metric_descriptor"],
|
262
|
-
exception_transformer: exception_transformer
|
277
|
+
exception_transformer: exception_transformer,
|
278
|
+
params_extractor: proc do |request|
|
279
|
+
{'name' => request.name}
|
280
|
+
end
|
263
281
|
)
|
264
282
|
@list_time_series = Google::Gax.create_api_call(
|
265
283
|
@metric_service_stub.method(:list_time_series),
|
266
284
|
defaults["list_time_series"],
|
267
|
-
exception_transformer: exception_transformer
|
285
|
+
exception_transformer: exception_transformer,
|
286
|
+
params_extractor: proc do |request|
|
287
|
+
{'name' => request.name}
|
288
|
+
end
|
268
289
|
)
|
269
290
|
@create_time_series = Google::Gax.create_api_call(
|
270
291
|
@metric_service_stub.method(:create_time_series),
|
271
292
|
defaults["create_time_series"],
|
272
|
-
exception_transformer: exception_transformer
|
293
|
+
exception_transformer: exception_transformer,
|
294
|
+
params_extractor: proc do |request|
|
295
|
+
{'name' => request.name}
|
296
|
+
end
|
273
297
|
)
|
274
298
|
end
|
275
299
|
|
276
300
|
# Service calls
|
277
301
|
|
278
|
-
# Lists monitored resource descriptors that match a filter. This method does
|
302
|
+
# Lists monitored resource descriptors that match a filter. This method does
|
303
|
+
# not require a Stackdriver account.
|
279
304
|
#
|
280
305
|
# @param name [String]
|
281
306
|
# The project on which to execute the request. The format is
|
@@ -309,16 +334,16 @@ module Google
|
|
309
334
|
# @example
|
310
335
|
# require "google/cloud/monitoring"
|
311
336
|
#
|
312
|
-
#
|
337
|
+
# metric_client = Google::Cloud::Monitoring::Metric.new(version: :v3)
|
313
338
|
# formatted_name = Google::Cloud::Monitoring::V3::MetricServiceClient.project_path("[PROJECT]")
|
314
339
|
#
|
315
340
|
# # Iterate over all results.
|
316
|
-
#
|
341
|
+
# metric_client.list_monitored_resource_descriptors(formatted_name).each do |element|
|
317
342
|
# # Process element.
|
318
343
|
# end
|
319
344
|
#
|
320
345
|
# # Or iterate over results one page at a time.
|
321
|
-
#
|
346
|
+
# metric_client.list_monitored_resource_descriptors(formatted_name).each_page do |page|
|
322
347
|
# # Process each page at a time.
|
323
348
|
# page.each do |element|
|
324
349
|
# # Process element.
|
@@ -340,7 +365,8 @@ module Google
|
|
340
365
|
@list_monitored_resource_descriptors.call(req, options, &block)
|
341
366
|
end
|
342
367
|
|
343
|
-
# Gets a single monitored resource descriptor. This method does not require a
|
368
|
+
# Gets a single monitored resource descriptor. This method does not require a
|
369
|
+
# Stackdriver account.
|
344
370
|
#
|
345
371
|
# @param name [String]
|
346
372
|
# The monitored resource descriptor to get. The format is
|
@@ -358,9 +384,9 @@ module Google
|
|
358
384
|
# @example
|
359
385
|
# require "google/cloud/monitoring"
|
360
386
|
#
|
361
|
-
#
|
387
|
+
# metric_client = Google::Cloud::Monitoring::Metric.new(version: :v3)
|
362
388
|
# formatted_name = Google::Cloud::Monitoring::V3::MetricServiceClient.monitored_resource_descriptor_path("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]")
|
363
|
-
# response =
|
389
|
+
# response = metric_client.get_monitored_resource_descriptor(formatted_name)
|
364
390
|
|
365
391
|
def get_monitored_resource_descriptor \
|
366
392
|
name,
|
@@ -373,7 +399,8 @@ module Google
|
|
373
399
|
@get_monitored_resource_descriptor.call(req, options, &block)
|
374
400
|
end
|
375
401
|
|
376
|
-
# Lists metric descriptors that match a filter. This method does not require
|
402
|
+
# Lists metric descriptors that match a filter. This method does not require
|
403
|
+
# a Stackdriver account.
|
377
404
|
#
|
378
405
|
# @param name [String]
|
379
406
|
# The project on which to execute the request. The format is
|
@@ -408,16 +435,16 @@ module Google
|
|
408
435
|
# @example
|
409
436
|
# require "google/cloud/monitoring"
|
410
437
|
#
|
411
|
-
#
|
438
|
+
# metric_client = Google::Cloud::Monitoring::Metric.new(version: :v3)
|
412
439
|
# formatted_name = Google::Cloud::Monitoring::V3::MetricServiceClient.project_path("[PROJECT]")
|
413
440
|
#
|
414
441
|
# # Iterate over all results.
|
415
|
-
#
|
442
|
+
# metric_client.list_metric_descriptors(formatted_name).each do |element|
|
416
443
|
# # Process element.
|
417
444
|
# end
|
418
445
|
#
|
419
446
|
# # Or iterate over results one page at a time.
|
420
|
-
#
|
447
|
+
# metric_client.list_metric_descriptors(formatted_name).each_page do |page|
|
421
448
|
# # Process each page at a time.
|
422
449
|
# page.each do |element|
|
423
450
|
# # Process element.
|
@@ -439,7 +466,8 @@ module Google
|
|
439
466
|
@list_metric_descriptors.call(req, options, &block)
|
440
467
|
end
|
441
468
|
|
442
|
-
# Gets a single metric descriptor. This method does not require a Stackdriver
|
469
|
+
# Gets a single metric descriptor. This method does not require a Stackdriver
|
470
|
+
# account.
|
443
471
|
#
|
444
472
|
# @param name [String]
|
445
473
|
# The metric descriptor on which to execute the request. The format is
|
@@ -457,9 +485,9 @@ module Google
|
|
457
485
|
# @example
|
458
486
|
# require "google/cloud/monitoring"
|
459
487
|
#
|
460
|
-
#
|
488
|
+
# metric_client = Google::Cloud::Monitoring::Metric.new(version: :v3)
|
461
489
|
# formatted_name = Google::Cloud::Monitoring::V3::MetricServiceClient.metric_descriptor_path("[PROJECT]", "[METRIC_DESCRIPTOR]")
|
462
|
-
# response =
|
490
|
+
# response = metric_client.get_metric_descriptor(formatted_name)
|
463
491
|
|
464
492
|
def get_metric_descriptor \
|
465
493
|
name,
|
@@ -495,12 +523,12 @@ module Google
|
|
495
523
|
# @example
|
496
524
|
# require "google/cloud/monitoring"
|
497
525
|
#
|
498
|
-
#
|
526
|
+
# metric_client = Google::Cloud::Monitoring::Metric.new(version: :v3)
|
499
527
|
# formatted_name = Google::Cloud::Monitoring::V3::MetricServiceClient.project_path("[PROJECT]")
|
500
528
|
#
|
501
529
|
# # TODO: Initialize `metric_descriptor`:
|
502
530
|
# metric_descriptor = {}
|
503
|
-
# response =
|
531
|
+
# response = metric_client.create_metric_descriptor(formatted_name, metric_descriptor)
|
504
532
|
|
505
533
|
def create_metric_descriptor \
|
506
534
|
name,
|
@@ -533,9 +561,9 @@ module Google
|
|
533
561
|
# @example
|
534
562
|
# require "google/cloud/monitoring"
|
535
563
|
#
|
536
|
-
#
|
564
|
+
# metric_client = Google::Cloud::Monitoring::Metric.new(version: :v3)
|
537
565
|
# formatted_name = Google::Cloud::Monitoring::V3::MetricServiceClient.metric_descriptor_path("[PROJECT]", "[METRIC_DESCRIPTOR]")
|
538
|
-
#
|
566
|
+
# metric_client.delete_metric_descriptor(formatted_name)
|
539
567
|
|
540
568
|
def delete_metric_descriptor \
|
541
569
|
name,
|
@@ -549,7 +577,8 @@ module Google
|
|
549
577
|
nil
|
550
578
|
end
|
551
579
|
|
552
|
-
# Lists time series that match a filter. This method does not require a
|
580
|
+
# Lists time series that match a filter. This method does not require a
|
581
|
+
# Stackdriver account.
|
553
582
|
#
|
554
583
|
# @param name [String]
|
555
584
|
# The project on which to execute the request. The format is
|
@@ -600,7 +629,7 @@ module Google
|
|
600
629
|
# @example
|
601
630
|
# require "google/cloud/monitoring"
|
602
631
|
#
|
603
|
-
#
|
632
|
+
# metric_client = Google::Cloud::Monitoring::Metric.new(version: :v3)
|
604
633
|
# formatted_name = Google::Cloud::Monitoring::V3::MetricServiceClient.project_path("[PROJECT]")
|
605
634
|
#
|
606
635
|
# # TODO: Initialize `filter`:
|
@@ -613,12 +642,12 @@ module Google
|
|
613
642
|
# view = :FULL
|
614
643
|
#
|
615
644
|
# # Iterate over all results.
|
616
|
-
#
|
645
|
+
# metric_client.list_time_series(formatted_name, filter, interval, view).each do |element|
|
617
646
|
# # Process element.
|
618
647
|
# end
|
619
648
|
#
|
620
649
|
# # Or iterate over results one page at a time.
|
621
|
-
#
|
650
|
+
# metric_client.list_time_series(formatted_name, filter, interval, view).each_page do |page|
|
622
651
|
# # Process each page at a time.
|
623
652
|
# page.each do |element|
|
624
653
|
# # Process element.
|
@@ -674,12 +703,12 @@ module Google
|
|
674
703
|
# @example
|
675
704
|
# require "google/cloud/monitoring"
|
676
705
|
#
|
677
|
-
#
|
706
|
+
# metric_client = Google::Cloud::Monitoring::Metric.new(version: :v3)
|
678
707
|
# formatted_name = Google::Cloud::Monitoring::V3::MetricServiceClient.project_path("[PROJECT]")
|
679
708
|
#
|
680
709
|
# # TODO: Initialize `time_series`:
|
681
710
|
# time_series = []
|
682
|
-
#
|
711
|
+
# metric_client.create_time_series(formatted_name, time_series)
|
683
712
|
|
684
713
|
def create_time_series \
|
685
714
|
name,
|
@@ -75,12 +75,6 @@ module Google
|
|
75
75
|
].freeze
|
76
76
|
|
77
77
|
|
78
|
-
PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
79
|
-
"projects/{project}"
|
80
|
-
)
|
81
|
-
|
82
|
-
private_constant :PROJECT_PATH_TEMPLATE
|
83
|
-
|
84
78
|
NOTIFICATION_CHANNEL_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
85
79
|
"projects/{project}/notificationChannels/{notification_channel}"
|
86
80
|
)
|
@@ -93,14 +87,11 @@ module Google
|
|
93
87
|
|
94
88
|
private_constant :NOTIFICATION_CHANNEL_DESCRIPTOR_PATH_TEMPLATE
|
95
89
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
:"project" => project
|
102
|
-
)
|
103
|
-
end
|
90
|
+
PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
91
|
+
"projects/{project}"
|
92
|
+
)
|
93
|
+
|
94
|
+
private_constant :PROJECT_PATH_TEMPLATE
|
104
95
|
|
105
96
|
# Returns a fully-qualified notification_channel resource name string.
|
106
97
|
# @param project [String]
|
@@ -124,6 +115,15 @@ module Google
|
|
124
115
|
)
|
125
116
|
end
|
126
117
|
|
118
|
+
# Returns a fully-qualified project resource name string.
|
119
|
+
# @param project [String]
|
120
|
+
# @return [String]
|
121
|
+
def self.project_path project
|
122
|
+
PROJECT_PATH_TEMPLATE.render(
|
123
|
+
:"project" => project
|
124
|
+
)
|
125
|
+
end
|
126
|
+
|
127
127
|
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
128
128
|
# Provides the means for authenticating requests made by the client. This parameter can
|
129
129
|
# be many types.
|
@@ -230,37 +230,58 @@ module Google
|
|
230
230
|
@list_notification_channel_descriptors = Google::Gax.create_api_call(
|
231
231
|
@notification_channel_service_stub.method(:list_notification_channel_descriptors),
|
232
232
|
defaults["list_notification_channel_descriptors"],
|
233
|
-
exception_transformer: exception_transformer
|
233
|
+
exception_transformer: exception_transformer,
|
234
|
+
params_extractor: proc do |request|
|
235
|
+
{'name' => request.name}
|
236
|
+
end
|
234
237
|
)
|
235
238
|
@get_notification_channel_descriptor = Google::Gax.create_api_call(
|
236
239
|
@notification_channel_service_stub.method(:get_notification_channel_descriptor),
|
237
240
|
defaults["get_notification_channel_descriptor"],
|
238
|
-
exception_transformer: exception_transformer
|
241
|
+
exception_transformer: exception_transformer,
|
242
|
+
params_extractor: proc do |request|
|
243
|
+
{'name' => request.name}
|
244
|
+
end
|
239
245
|
)
|
240
246
|
@list_notification_channels = Google::Gax.create_api_call(
|
241
247
|
@notification_channel_service_stub.method(:list_notification_channels),
|
242
248
|
defaults["list_notification_channels"],
|
243
|
-
exception_transformer: exception_transformer
|
249
|
+
exception_transformer: exception_transformer,
|
250
|
+
params_extractor: proc do |request|
|
251
|
+
{'name' => request.name}
|
252
|
+
end
|
244
253
|
)
|
245
254
|
@get_notification_channel = Google::Gax.create_api_call(
|
246
255
|
@notification_channel_service_stub.method(:get_notification_channel),
|
247
256
|
defaults["get_notification_channel"],
|
248
|
-
exception_transformer: exception_transformer
|
257
|
+
exception_transformer: exception_transformer,
|
258
|
+
params_extractor: proc do |request|
|
259
|
+
{'name' => request.name}
|
260
|
+
end
|
249
261
|
)
|
250
262
|
@create_notification_channel = Google::Gax.create_api_call(
|
251
263
|
@notification_channel_service_stub.method(:create_notification_channel),
|
252
264
|
defaults["create_notification_channel"],
|
253
|
-
exception_transformer: exception_transformer
|
265
|
+
exception_transformer: exception_transformer,
|
266
|
+
params_extractor: proc do |request|
|
267
|
+
{'name' => request.name}
|
268
|
+
end
|
254
269
|
)
|
255
270
|
@update_notification_channel = Google::Gax.create_api_call(
|
256
271
|
@notification_channel_service_stub.method(:update_notification_channel),
|
257
272
|
defaults["update_notification_channel"],
|
258
|
-
exception_transformer: exception_transformer
|
273
|
+
exception_transformer: exception_transformer,
|
274
|
+
params_extractor: proc do |request|
|
275
|
+
{'notification_channel.name' => request.notification_channel.name}
|
276
|
+
end
|
259
277
|
)
|
260
278
|
@delete_notification_channel = Google::Gax.create_api_call(
|
261
279
|
@notification_channel_service_stub.method(:delete_notification_channel),
|
262
280
|
defaults["delete_notification_channel"],
|
263
|
-
exception_transformer: exception_transformer
|
281
|
+
exception_transformer: exception_transformer,
|
282
|
+
params_extractor: proc do |request|
|
283
|
+
{'name' => request.name}
|
284
|
+
end
|
264
285
|
)
|
265
286
|
end
|
266
287
|
|
@@ -300,16 +321,16 @@ module Google
|
|
300
321
|
# @example
|
301
322
|
# require "google/cloud/monitoring"
|
302
323
|
#
|
303
|
-
#
|
324
|
+
# notification_channel_client = Google::Cloud::Monitoring::NotificationChannel.new(version: :v3)
|
304
325
|
# formatted_name = Google::Cloud::Monitoring::V3::NotificationChannelServiceClient.project_path("[PROJECT]")
|
305
326
|
#
|
306
327
|
# # Iterate over all results.
|
307
|
-
#
|
328
|
+
# notification_channel_client.list_notification_channel_descriptors(formatted_name).each do |element|
|
308
329
|
# # Process element.
|
309
330
|
# end
|
310
331
|
#
|
311
332
|
# # Or iterate over results one page at a time.
|
312
|
-
#
|
333
|
+
# notification_channel_client.list_notification_channel_descriptors(formatted_name).each_page do |page|
|
313
334
|
# # Process each page at a time.
|
314
335
|
# page.each do |element|
|
315
336
|
# # Process element.
|
@@ -346,9 +367,9 @@ module Google
|
|
346
367
|
# @example
|
347
368
|
# require "google/cloud/monitoring"
|
348
369
|
#
|
349
|
-
#
|
370
|
+
# notification_channel_client = Google::Cloud::Monitoring::NotificationChannel.new(version: :v3)
|
350
371
|
# formatted_name = Google::Cloud::Monitoring::V3::NotificationChannelServiceClient.notification_channel_descriptor_path("[PROJECT]", "[CHANNEL_DESCRIPTOR]")
|
351
|
-
# response =
|
372
|
+
# response = notification_channel_client.get_notification_channel_descriptor(formatted_name)
|
352
373
|
|
353
374
|
def get_notification_channel_descriptor \
|
354
375
|
name,
|
@@ -369,7 +390,8 @@ module Google
|
|
369
390
|
# in which to look for the notification channels; it does not name a
|
370
391
|
# specific channel. To query a specific channel by REST resource name, use
|
371
392
|
# the
|
372
|
-
# {Google::Monitoring::V3::NotificationChannelService::GetNotificationChannel `GetNotificationChannel`}
|
393
|
+
# {Google::Monitoring::V3::NotificationChannelService::GetNotificationChannel `GetNotificationChannel`}
|
394
|
+
# operation.
|
373
395
|
# @param filter [String]
|
374
396
|
# If provided, this field specifies the criteria that must be met by
|
375
397
|
# notification channels to be included in the response.
|
@@ -404,16 +426,16 @@ module Google
|
|
404
426
|
# @example
|
405
427
|
# require "google/cloud/monitoring"
|
406
428
|
#
|
407
|
-
#
|
429
|
+
# notification_channel_client = Google::Cloud::Monitoring::NotificationChannel.new(version: :v3)
|
408
430
|
# formatted_name = Google::Cloud::Monitoring::V3::NotificationChannelServiceClient.project_path("[PROJECT]")
|
409
431
|
#
|
410
432
|
# # Iterate over all results.
|
411
|
-
#
|
433
|
+
# notification_channel_client.list_notification_channels(formatted_name).each do |element|
|
412
434
|
# # Process element.
|
413
435
|
# end
|
414
436
|
#
|
415
437
|
# # Or iterate over results one page at a time.
|
416
|
-
#
|
438
|
+
# notification_channel_client.list_notification_channels(formatted_name).each_page do |page|
|
417
439
|
# # Process each page at a time.
|
418
440
|
# page.each do |element|
|
419
441
|
# # Process element.
|
@@ -457,9 +479,9 @@ module Google
|
|
457
479
|
# @example
|
458
480
|
# require "google/cloud/monitoring"
|
459
481
|
#
|
460
|
-
#
|
482
|
+
# notification_channel_client = Google::Cloud::Monitoring::NotificationChannel.new(version: :v3)
|
461
483
|
# formatted_name = Google::Cloud::Monitoring::V3::NotificationChannelServiceClient.notification_channel_path("[PROJECT]", "[NOTIFICATION_CHANNEL]")
|
462
|
-
# response =
|
484
|
+
# response = notification_channel_client.get_notification_channel(formatted_name)
|
463
485
|
|
464
486
|
def get_notification_channel \
|
465
487
|
name,
|
@@ -499,12 +521,12 @@ module Google
|
|
499
521
|
# @example
|
500
522
|
# require "google/cloud/monitoring"
|
501
523
|
#
|
502
|
-
#
|
524
|
+
# notification_channel_client = Google::Cloud::Monitoring::NotificationChannel.new(version: :v3)
|
503
525
|
# formatted_name = Google::Cloud::Monitoring::V3::NotificationChannelServiceClient.project_path("[PROJECT]")
|
504
526
|
#
|
505
527
|
# # TODO: Initialize `notification_channel`:
|
506
528
|
# notification_channel = {}
|
507
|
-
# response =
|
529
|
+
# response = notification_channel_client.create_notification_channel(formatted_name, notification_channel)
|
508
530
|
|
509
531
|
def create_notification_channel \
|
510
532
|
name,
|
@@ -544,11 +566,11 @@ module Google
|
|
544
566
|
# @example
|
545
567
|
# require "google/cloud/monitoring"
|
546
568
|
#
|
547
|
-
#
|
569
|
+
# notification_channel_client = Google::Cloud::Monitoring::NotificationChannel.new(version: :v3)
|
548
570
|
#
|
549
571
|
# # TODO: Initialize `notification_channel`:
|
550
572
|
# notification_channel = {}
|
551
|
-
# response =
|
573
|
+
# response = notification_channel_client.update_notification_channel(notification_channel)
|
552
574
|
|
553
575
|
def update_notification_channel \
|
554
576
|
notification_channel,
|
@@ -583,9 +605,9 @@ module Google
|
|
583
605
|
# @example
|
584
606
|
# require "google/cloud/monitoring"
|
585
607
|
#
|
586
|
-
#
|
608
|
+
# notification_channel_client = Google::Cloud::Monitoring::NotificationChannel.new(version: :v3)
|
587
609
|
# formatted_name = Google::Cloud::Monitoring::V3::NotificationChannelServiceClient.notification_channel_path("[PROJECT]", "[NOTIFICATION_CHANNEL]")
|
588
|
-
#
|
610
|
+
# notification_channel_client.delete_notification_channel(formatted_name)
|
589
611
|
|
590
612
|
def delete_notification_channel \
|
591
613
|
name,
|