google-cloud-monitoring-v3 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e2adcdd895a09b496d0690535f9e8b610ebf955a5826ece302aab758ac9e4e4
4
- data.tar.gz: 02dd20945c0b716859a9cb5be7c8898a368e469afe92d78e45246933fe36929d
3
+ metadata.gz: 135c4d1afadbf4c699971b07032372bd90c61c0848ab176ff5efdd5f294a1d01
4
+ data.tar.gz: 1a162a3e4b27d3d843b9348568ce58dcadb76a201af38fd419ecbae73c4d88e4
5
5
  SHA512:
6
- metadata.gz: c09357f07ce077d4c8249eac7277e4cb7ab801a170108502b00fcfc906e99b2c8e2df25469c270157fb663e367569fc5f8340ee9da5f2b825a7136ece5c7a983
7
- data.tar.gz: 340f1e694260e5ed7996812d68afb121536a5e9ae1fa97788a6fd61fc20a4aadac7a484a7be1a0f9b79be769c700e7fbec1dff4804fbcae6787453a588666ae7
6
+ metadata.gz: 21d9c448175505c545653338caa4b45bf09b0bb572b353b8b1a6b450bc603475991c750d284b0ffa17bd7b2fee219c8bbf67179bfa3795e36b8e1df4ba4300cb
7
+ data.tar.gz: '087d61b21d791ffdd7e21739a4160825d80eaa642ee2b60e714963283c2e67f9a9916724c7753de98ea4f8c28ed2bf40c1f22bc7a1940987c4938275e9b2b49d'
@@ -228,6 +228,27 @@ module Google
228
228
  #
229
229
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
230
230
  #
231
+ # @example Basic example
232
+ # require "google/cloud/monitoring/v3"
233
+ #
234
+ # # Create a client object. The client can be reused for multiple calls.
235
+ # client = Google::Cloud::Monitoring::V3::AlertPolicyService::Client.new
236
+ #
237
+ # # Create a request. To set request fields, pass in keyword arguments.
238
+ # request = Google::Cloud::Monitoring::V3::ListAlertPoliciesRequest.new
239
+ #
240
+ # # Call the list_alert_policies method.
241
+ # result = client.list_alert_policies request
242
+ #
243
+ # # The returned object is of type Gapic::PagedEnumerable. You can
244
+ # # iterate over all elements by calling #each, and the enumerable
245
+ # # will lazily make API calls to fetch subsequent pages. Other
246
+ # # methods are also available for managing paging directly.
247
+ # result.each do |response|
248
+ # # Each element is of type ::Google::Cloud::Monitoring::V3::AlertPolicy.
249
+ # p response
250
+ # end
251
+ #
231
252
  def list_alert_policies request, options = nil
232
253
  raise ::ArgumentError, "request must be provided" if request.nil?
233
254
 
@@ -245,9 +266,11 @@ module Google
245
266
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
246
267
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
247
268
 
248
- header_params = {
249
- "name" => request.name
250
- }
269
+ header_params = {}
270
+ if request.name
271
+ header_params["name"] = request.name
272
+ end
273
+
251
274
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
252
275
  metadata[:"x-goog-request-params"] ||= request_params_header
253
276
 
@@ -299,6 +322,21 @@ module Google
299
322
  #
300
323
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
301
324
  #
325
+ # @example Basic example
326
+ # require "google/cloud/monitoring/v3"
327
+ #
328
+ # # Create a client object. The client can be reused for multiple calls.
329
+ # client = Google::Cloud::Monitoring::V3::AlertPolicyService::Client.new
330
+ #
331
+ # # Create a request. To set request fields, pass in keyword arguments.
332
+ # request = Google::Cloud::Monitoring::V3::GetAlertPolicyRequest.new
333
+ #
334
+ # # Call the get_alert_policy method.
335
+ # result = client.get_alert_policy request
336
+ #
337
+ # # The returned object is of type Google::Cloud::Monitoring::V3::AlertPolicy.
338
+ # p result
339
+ #
302
340
  def get_alert_policy request, options = nil
303
341
  raise ::ArgumentError, "request must be provided" if request.nil?
304
342
 
@@ -316,9 +354,11 @@ module Google
316
354
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
317
355
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
318
356
 
319
- header_params = {
320
- "name" => request.name
321
- }
357
+ header_params = {}
358
+ if request.name
359
+ header_params["name"] = request.name
360
+ end
361
+
322
362
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
323
363
  metadata[:"x-goog-request-params"] ||= request_params_header
324
364
 
@@ -382,6 +422,21 @@ module Google
382
422
  #
383
423
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
384
424
  #
425
+ # @example Basic example
426
+ # require "google/cloud/monitoring/v3"
427
+ #
428
+ # # Create a client object. The client can be reused for multiple calls.
429
+ # client = Google::Cloud::Monitoring::V3::AlertPolicyService::Client.new
430
+ #
431
+ # # Create a request. To set request fields, pass in keyword arguments.
432
+ # request = Google::Cloud::Monitoring::V3::CreateAlertPolicyRequest.new
433
+ #
434
+ # # Call the create_alert_policy method.
435
+ # result = client.create_alert_policy request
436
+ #
437
+ # # The returned object is of type Google::Cloud::Monitoring::V3::AlertPolicy.
438
+ # p result
439
+ #
385
440
  def create_alert_policy request, options = nil
386
441
  raise ::ArgumentError, "request must be provided" if request.nil?
387
442
 
@@ -399,9 +454,11 @@ module Google
399
454
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
400
455
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
401
456
 
402
- header_params = {
403
- "name" => request.name
404
- }
457
+ header_params = {}
458
+ if request.name
459
+ header_params["name"] = request.name
460
+ end
461
+
405
462
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
406
463
  metadata[:"x-goog-request-params"] ||= request_params_header
407
464
 
@@ -454,6 +511,21 @@ module Google
454
511
  #
455
512
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
456
513
  #
514
+ # @example Basic example
515
+ # require "google/cloud/monitoring/v3"
516
+ #
517
+ # # Create a client object. The client can be reused for multiple calls.
518
+ # client = Google::Cloud::Monitoring::V3::AlertPolicyService::Client.new
519
+ #
520
+ # # Create a request. To set request fields, pass in keyword arguments.
521
+ # request = Google::Cloud::Monitoring::V3::DeleteAlertPolicyRequest.new
522
+ #
523
+ # # Call the delete_alert_policy method.
524
+ # result = client.delete_alert_policy request
525
+ #
526
+ # # The returned object is of type Google::Protobuf::Empty.
527
+ # p result
528
+ #
457
529
  def delete_alert_policy request, options = nil
458
530
  raise ::ArgumentError, "request must be provided" if request.nil?
459
531
 
@@ -471,9 +543,11 @@ module Google
471
543
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
472
544
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
473
545
 
474
- header_params = {
475
- "name" => request.name
476
- }
546
+ header_params = {}
547
+ if request.name
548
+ header_params["name"] = request.name
549
+ end
550
+
477
551
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
478
552
  metadata[:"x-goog-request-params"] ||= request_params_header
479
553
 
@@ -550,6 +624,21 @@ module Google
550
624
  #
551
625
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
552
626
  #
627
+ # @example Basic example
628
+ # require "google/cloud/monitoring/v3"
629
+ #
630
+ # # Create a client object. The client can be reused for multiple calls.
631
+ # client = Google::Cloud::Monitoring::V3::AlertPolicyService::Client.new
632
+ #
633
+ # # Create a request. To set request fields, pass in keyword arguments.
634
+ # request = Google::Cloud::Monitoring::V3::UpdateAlertPolicyRequest.new
635
+ #
636
+ # # Call the update_alert_policy method.
637
+ # result = client.update_alert_policy request
638
+ #
639
+ # # The returned object is of type Google::Cloud::Monitoring::V3::AlertPolicy.
640
+ # p result
641
+ #
553
642
  def update_alert_policy request, options = nil
554
643
  raise ::ArgumentError, "request must be provided" if request.nil?
555
644
 
@@ -567,9 +656,11 @@ module Google
567
656
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
568
657
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
569
658
 
570
- header_params = {
571
- "alert_policy.name" => request.alert_policy.name
572
- }
659
+ header_params = {}
660
+ if request.alert_policy&.name
661
+ header_params["alert_policy.name"] = request.alert_policy.name
662
+ end
663
+
573
664
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
574
665
  metadata[:"x-goog-request-params"] ||= request_params_header
575
666
 
@@ -244,6 +244,27 @@ module Google
244
244
  #
245
245
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
246
246
  #
247
+ # @example Basic example
248
+ # require "google/cloud/monitoring/v3"
249
+ #
250
+ # # Create a client object. The client can be reused for multiple calls.
251
+ # client = Google::Cloud::Monitoring::V3::GroupService::Client.new
252
+ #
253
+ # # Create a request. To set request fields, pass in keyword arguments.
254
+ # request = Google::Cloud::Monitoring::V3::ListGroupsRequest.new
255
+ #
256
+ # # Call the list_groups method.
257
+ # result = client.list_groups request
258
+ #
259
+ # # The returned object is of type Gapic::PagedEnumerable. You can
260
+ # # iterate over all elements by calling #each, and the enumerable
261
+ # # will lazily make API calls to fetch subsequent pages. Other
262
+ # # methods are also available for managing paging directly.
263
+ # result.each do |response|
264
+ # # Each element is of type ::Google::Cloud::Monitoring::V3::Group.
265
+ # p response
266
+ # end
267
+ #
247
268
  def list_groups request, options = nil
248
269
  raise ::ArgumentError, "request must be provided" if request.nil?
249
270
 
@@ -261,9 +282,11 @@ module Google
261
282
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
262
283
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
263
284
 
264
- header_params = {
265
- "name" => request.name
266
- }
285
+ header_params = {}
286
+ if request.name
287
+ header_params["name"] = request.name
288
+ end
289
+
267
290
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
268
291
  metadata[:"x-goog-request-params"] ||= request_params_header
269
292
 
@@ -315,6 +338,21 @@ module Google
315
338
  #
316
339
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
317
340
  #
341
+ # @example Basic example
342
+ # require "google/cloud/monitoring/v3"
343
+ #
344
+ # # Create a client object. The client can be reused for multiple calls.
345
+ # client = Google::Cloud::Monitoring::V3::GroupService::Client.new
346
+ #
347
+ # # Create a request. To set request fields, pass in keyword arguments.
348
+ # request = Google::Cloud::Monitoring::V3::GetGroupRequest.new
349
+ #
350
+ # # Call the get_group method.
351
+ # result = client.get_group request
352
+ #
353
+ # # The returned object is of type Google::Cloud::Monitoring::V3::Group.
354
+ # p result
355
+ #
318
356
  def get_group request, options = nil
319
357
  raise ::ArgumentError, "request must be provided" if request.nil?
320
358
 
@@ -332,9 +370,11 @@ module Google
332
370
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
333
371
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
334
372
 
335
- header_params = {
336
- "name" => request.name
337
- }
373
+ header_params = {}
374
+ if request.name
375
+ header_params["name"] = request.name
376
+ end
377
+
338
378
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
339
379
  metadata[:"x-goog-request-params"] ||= request_params_header
340
380
 
@@ -391,6 +431,21 @@ module Google
391
431
  #
392
432
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
393
433
  #
434
+ # @example Basic example
435
+ # require "google/cloud/monitoring/v3"
436
+ #
437
+ # # Create a client object. The client can be reused for multiple calls.
438
+ # client = Google::Cloud::Monitoring::V3::GroupService::Client.new
439
+ #
440
+ # # Create a request. To set request fields, pass in keyword arguments.
441
+ # request = Google::Cloud::Monitoring::V3::CreateGroupRequest.new
442
+ #
443
+ # # Call the create_group method.
444
+ # result = client.create_group request
445
+ #
446
+ # # The returned object is of type Google::Cloud::Monitoring::V3::Group.
447
+ # p result
448
+ #
394
449
  def create_group request, options = nil
395
450
  raise ::ArgumentError, "request must be provided" if request.nil?
396
451
 
@@ -408,9 +463,11 @@ module Google
408
463
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
409
464
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
410
465
 
411
- header_params = {
412
- "name" => request.name
413
- }
466
+ header_params = {}
467
+ if request.name
468
+ header_params["name"] = request.name
469
+ end
470
+
414
471
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
415
472
  metadata[:"x-goog-request-params"] ||= request_params_header
416
473
 
@@ -463,6 +520,21 @@ module Google
463
520
  #
464
521
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
465
522
  #
523
+ # @example Basic example
524
+ # require "google/cloud/monitoring/v3"
525
+ #
526
+ # # Create a client object. The client can be reused for multiple calls.
527
+ # client = Google::Cloud::Monitoring::V3::GroupService::Client.new
528
+ #
529
+ # # Create a request. To set request fields, pass in keyword arguments.
530
+ # request = Google::Cloud::Monitoring::V3::UpdateGroupRequest.new
531
+ #
532
+ # # Call the update_group method.
533
+ # result = client.update_group request
534
+ #
535
+ # # The returned object is of type Google::Cloud::Monitoring::V3::Group.
536
+ # p result
537
+ #
466
538
  def update_group request, options = nil
467
539
  raise ::ArgumentError, "request must be provided" if request.nil?
468
540
 
@@ -480,9 +552,11 @@ module Google
480
552
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
481
553
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
482
554
 
483
- header_params = {
484
- "group.name" => request.group.name
485
- }
555
+ header_params = {}
556
+ if request.group&.name
557
+ header_params["group.name"] = request.group.name
558
+ end
559
+
486
560
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
487
561
  metadata[:"x-goog-request-params"] ||= request_params_header
488
562
 
@@ -537,6 +611,21 @@ module Google
537
611
  #
538
612
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
539
613
  #
614
+ # @example Basic example
615
+ # require "google/cloud/monitoring/v3"
616
+ #
617
+ # # Create a client object. The client can be reused for multiple calls.
618
+ # client = Google::Cloud::Monitoring::V3::GroupService::Client.new
619
+ #
620
+ # # Create a request. To set request fields, pass in keyword arguments.
621
+ # request = Google::Cloud::Monitoring::V3::DeleteGroupRequest.new
622
+ #
623
+ # # Call the delete_group method.
624
+ # result = client.delete_group request
625
+ #
626
+ # # The returned object is of type Google::Protobuf::Empty.
627
+ # p result
628
+ #
540
629
  def delete_group request, options = nil
541
630
  raise ::ArgumentError, "request must be provided" if request.nil?
542
631
 
@@ -554,9 +643,11 @@ module Google
554
643
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
555
644
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
556
645
 
557
- header_params = {
558
- "name" => request.name
559
- }
646
+ header_params = {}
647
+ if request.name
648
+ header_params["name"] = request.name
649
+ end
650
+
560
651
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
561
652
  metadata[:"x-goog-request-params"] ||= request_params_header
562
653
 
@@ -627,6 +718,27 @@ module Google
627
718
  #
628
719
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
629
720
  #
721
+ # @example Basic example
722
+ # require "google/cloud/monitoring/v3"
723
+ #
724
+ # # Create a client object. The client can be reused for multiple calls.
725
+ # client = Google::Cloud::Monitoring::V3::GroupService::Client.new
726
+ #
727
+ # # Create a request. To set request fields, pass in keyword arguments.
728
+ # request = Google::Cloud::Monitoring::V3::ListGroupMembersRequest.new
729
+ #
730
+ # # Call the list_group_members method.
731
+ # result = client.list_group_members request
732
+ #
733
+ # # The returned object is of type Gapic::PagedEnumerable. You can
734
+ # # iterate over all elements by calling #each, and the enumerable
735
+ # # will lazily make API calls to fetch subsequent pages. Other
736
+ # # methods are also available for managing paging directly.
737
+ # result.each do |response|
738
+ # # Each element is of type ::Google::Api::MonitoredResource.
739
+ # p response
740
+ # end
741
+ #
630
742
  def list_group_members request, options = nil
631
743
  raise ::ArgumentError, "request must be provided" if request.nil?
632
744
 
@@ -644,9 +756,11 @@ module Google
644
756
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
645
757
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
646
758
 
647
- header_params = {
648
- "name" => request.name
649
- }
759
+ header_params = {}
760
+ if request.name
761
+ header_params["name"] = request.name
762
+ end
763
+
650
764
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
651
765
  metadata[:"x-goog-request-params"] ||= request_params_header
652
766