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 +4 -4
- data/lib/google/cloud/monitoring/v3/alert_policy_service/client.rb +106 -15
- data/lib/google/cloud/monitoring/v3/group_service/client.rb +132 -18
- data/lib/google/cloud/monitoring/v3/metric_service/client.rb +198 -27
- data/lib/google/cloud/monitoring/v3/notification_channel_service/client.rb +212 -30
- data/lib/google/cloud/monitoring/v3/query_service/client.rb +26 -3
- data/lib/google/cloud/monitoring/v3/service_monitoring_service/client.rb +212 -30
- data/lib/google/cloud/monitoring/v3/uptime_check_service/client.rb +127 -15
- data/lib/google/cloud/monitoring/v3/version.rb +1 -1
- metadata +2 -2
@@ -224,6 +224,27 @@ module Google
|
|
224
224
|
#
|
225
225
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
226
226
|
#
|
227
|
+
# @example Basic example
|
228
|
+
# require "google/cloud/monitoring/v3"
|
229
|
+
#
|
230
|
+
# # Create a client object. The client can be reused for multiple calls.
|
231
|
+
# client = Google::Cloud::Monitoring::V3::MetricService::Client.new
|
232
|
+
#
|
233
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
234
|
+
# request = Google::Cloud::Monitoring::V3::ListMonitoredResourceDescriptorsRequest.new
|
235
|
+
#
|
236
|
+
# # Call the list_monitored_resource_descriptors method.
|
237
|
+
# result = client.list_monitored_resource_descriptors request
|
238
|
+
#
|
239
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
240
|
+
# # iterate over all elements by calling #each, and the enumerable
|
241
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
242
|
+
# # methods are also available for managing paging directly.
|
243
|
+
# result.each do |response|
|
244
|
+
# # Each element is of type ::Google::Api::MonitoredResourceDescriptor.
|
245
|
+
# p response
|
246
|
+
# end
|
247
|
+
#
|
227
248
|
def list_monitored_resource_descriptors request, options = nil
|
228
249
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
229
250
|
|
@@ -241,9 +262,11 @@ module Google
|
|
241
262
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
242
263
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
243
264
|
|
244
|
-
header_params = {
|
245
|
-
|
246
|
-
|
265
|
+
header_params = {}
|
266
|
+
if request.name
|
267
|
+
header_params["name"] = request.name
|
268
|
+
end
|
269
|
+
|
247
270
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
248
271
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
249
272
|
|
@@ -298,6 +321,21 @@ module Google
|
|
298
321
|
#
|
299
322
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
300
323
|
#
|
324
|
+
# @example Basic example
|
325
|
+
# require "google/cloud/monitoring/v3"
|
326
|
+
#
|
327
|
+
# # Create a client object. The client can be reused for multiple calls.
|
328
|
+
# client = Google::Cloud::Monitoring::V3::MetricService::Client.new
|
329
|
+
#
|
330
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
331
|
+
# request = Google::Cloud::Monitoring::V3::GetMonitoredResourceDescriptorRequest.new
|
332
|
+
#
|
333
|
+
# # Call the get_monitored_resource_descriptor method.
|
334
|
+
# result = client.get_monitored_resource_descriptor request
|
335
|
+
#
|
336
|
+
# # The returned object is of type Google::Api::MonitoredResourceDescriptor.
|
337
|
+
# p result
|
338
|
+
#
|
301
339
|
def get_monitored_resource_descriptor request, options = nil
|
302
340
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
303
341
|
|
@@ -315,9 +353,11 @@ module Google
|
|
315
353
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
316
354
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
317
355
|
|
318
|
-
header_params = {
|
319
|
-
|
320
|
-
|
356
|
+
header_params = {}
|
357
|
+
if request.name
|
358
|
+
header_params["name"] = request.name
|
359
|
+
end
|
360
|
+
|
321
361
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
322
362
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
323
363
|
|
@@ -384,6 +424,27 @@ module Google
|
|
384
424
|
#
|
385
425
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
386
426
|
#
|
427
|
+
# @example Basic example
|
428
|
+
# require "google/cloud/monitoring/v3"
|
429
|
+
#
|
430
|
+
# # Create a client object. The client can be reused for multiple calls.
|
431
|
+
# client = Google::Cloud::Monitoring::V3::MetricService::Client.new
|
432
|
+
#
|
433
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
434
|
+
# request = Google::Cloud::Monitoring::V3::ListMetricDescriptorsRequest.new
|
435
|
+
#
|
436
|
+
# # Call the list_metric_descriptors method.
|
437
|
+
# result = client.list_metric_descriptors request
|
438
|
+
#
|
439
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
440
|
+
# # iterate over all elements by calling #each, and the enumerable
|
441
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
442
|
+
# # methods are also available for managing paging directly.
|
443
|
+
# result.each do |response|
|
444
|
+
# # Each element is of type ::Google::Api::MetricDescriptor.
|
445
|
+
# p response
|
446
|
+
# end
|
447
|
+
#
|
387
448
|
def list_metric_descriptors request, options = nil
|
388
449
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
389
450
|
|
@@ -401,9 +462,11 @@ module Google
|
|
401
462
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
402
463
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
403
464
|
|
404
|
-
header_params = {
|
405
|
-
|
406
|
-
|
465
|
+
header_params = {}
|
466
|
+
if request.name
|
467
|
+
header_params["name"] = request.name
|
468
|
+
end
|
469
|
+
|
407
470
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
408
471
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
409
472
|
|
@@ -458,6 +521,21 @@ module Google
|
|
458
521
|
#
|
459
522
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
460
523
|
#
|
524
|
+
# @example Basic example
|
525
|
+
# require "google/cloud/monitoring/v3"
|
526
|
+
#
|
527
|
+
# # Create a client object. The client can be reused for multiple calls.
|
528
|
+
# client = Google::Cloud::Monitoring::V3::MetricService::Client.new
|
529
|
+
#
|
530
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
531
|
+
# request = Google::Cloud::Monitoring::V3::GetMetricDescriptorRequest.new
|
532
|
+
#
|
533
|
+
# # Call the get_metric_descriptor method.
|
534
|
+
# result = client.get_metric_descriptor request
|
535
|
+
#
|
536
|
+
# # The returned object is of type Google::Api::MetricDescriptor.
|
537
|
+
# p result
|
538
|
+
#
|
461
539
|
def get_metric_descriptor request, options = nil
|
462
540
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
463
541
|
|
@@ -475,9 +553,11 @@ module Google
|
|
475
553
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
476
554
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
477
555
|
|
478
|
-
header_params = {
|
479
|
-
|
480
|
-
|
556
|
+
header_params = {}
|
557
|
+
if request.name
|
558
|
+
header_params["name"] = request.name
|
559
|
+
end
|
560
|
+
|
481
561
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
482
562
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
483
563
|
|
@@ -536,6 +616,21 @@ module Google
|
|
536
616
|
#
|
537
617
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
538
618
|
#
|
619
|
+
# @example Basic example
|
620
|
+
# require "google/cloud/monitoring/v3"
|
621
|
+
#
|
622
|
+
# # Create a client object. The client can be reused for multiple calls.
|
623
|
+
# client = Google::Cloud::Monitoring::V3::MetricService::Client.new
|
624
|
+
#
|
625
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
626
|
+
# request = Google::Cloud::Monitoring::V3::CreateMetricDescriptorRequest.new
|
627
|
+
#
|
628
|
+
# # Call the create_metric_descriptor method.
|
629
|
+
# result = client.create_metric_descriptor request
|
630
|
+
#
|
631
|
+
# # The returned object is of type Google::Api::MetricDescriptor.
|
632
|
+
# p result
|
633
|
+
#
|
539
634
|
def create_metric_descriptor request, options = nil
|
540
635
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
541
636
|
|
@@ -553,9 +648,11 @@ module Google
|
|
553
648
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
554
649
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
555
650
|
|
556
|
-
header_params = {
|
557
|
-
|
558
|
-
|
651
|
+
header_params = {}
|
652
|
+
if request.name
|
653
|
+
header_params["name"] = request.name
|
654
|
+
end
|
655
|
+
|
559
656
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
560
657
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
561
658
|
|
@@ -611,6 +708,21 @@ module Google
|
|
611
708
|
#
|
612
709
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
613
710
|
#
|
711
|
+
# @example Basic example
|
712
|
+
# require "google/cloud/monitoring/v3"
|
713
|
+
#
|
714
|
+
# # Create a client object. The client can be reused for multiple calls.
|
715
|
+
# client = Google::Cloud::Monitoring::V3::MetricService::Client.new
|
716
|
+
#
|
717
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
718
|
+
# request = Google::Cloud::Monitoring::V3::DeleteMetricDescriptorRequest.new
|
719
|
+
#
|
720
|
+
# # Call the delete_metric_descriptor method.
|
721
|
+
# result = client.delete_metric_descriptor request
|
722
|
+
#
|
723
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
724
|
+
# p result
|
725
|
+
#
|
614
726
|
def delete_metric_descriptor request, options = nil
|
615
727
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
616
728
|
|
@@ -628,9 +740,11 @@ module Google
|
|
628
740
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
629
741
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
630
742
|
|
631
|
-
header_params = {
|
632
|
-
|
633
|
-
|
743
|
+
header_params = {}
|
744
|
+
if request.name
|
745
|
+
header_params["name"] = request.name
|
746
|
+
end
|
747
|
+
|
634
748
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
635
749
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
636
750
|
|
@@ -720,6 +834,27 @@ module Google
|
|
720
834
|
#
|
721
835
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
722
836
|
#
|
837
|
+
# @example Basic example
|
838
|
+
# require "google/cloud/monitoring/v3"
|
839
|
+
#
|
840
|
+
# # Create a client object. The client can be reused for multiple calls.
|
841
|
+
# client = Google::Cloud::Monitoring::V3::MetricService::Client.new
|
842
|
+
#
|
843
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
844
|
+
# request = Google::Cloud::Monitoring::V3::ListTimeSeriesRequest.new
|
845
|
+
#
|
846
|
+
# # Call the list_time_series method.
|
847
|
+
# result = client.list_time_series request
|
848
|
+
#
|
849
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
850
|
+
# # iterate over all elements by calling #each, and the enumerable
|
851
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
852
|
+
# # methods are also available for managing paging directly.
|
853
|
+
# result.each do |response|
|
854
|
+
# # Each element is of type ::Google::Cloud::Monitoring::V3::TimeSeries.
|
855
|
+
# p response
|
856
|
+
# end
|
857
|
+
#
|
723
858
|
def list_time_series request, options = nil
|
724
859
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
725
860
|
|
@@ -737,9 +872,11 @@ module Google
|
|
737
872
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
738
873
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
739
874
|
|
740
|
-
header_params = {
|
741
|
-
|
742
|
-
|
875
|
+
header_params = {}
|
876
|
+
if request.name
|
877
|
+
header_params["name"] = request.name
|
878
|
+
end
|
879
|
+
|
743
880
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
744
881
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
745
882
|
|
@@ -803,6 +940,21 @@ module Google
|
|
803
940
|
#
|
804
941
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
805
942
|
#
|
943
|
+
# @example Basic example
|
944
|
+
# require "google/cloud/monitoring/v3"
|
945
|
+
#
|
946
|
+
# # Create a client object. The client can be reused for multiple calls.
|
947
|
+
# client = Google::Cloud::Monitoring::V3::MetricService::Client.new
|
948
|
+
#
|
949
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
950
|
+
# request = Google::Cloud::Monitoring::V3::CreateTimeSeriesRequest.new
|
951
|
+
#
|
952
|
+
# # Call the create_time_series method.
|
953
|
+
# result = client.create_time_series request
|
954
|
+
#
|
955
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
956
|
+
# p result
|
957
|
+
#
|
806
958
|
def create_time_series request, options = nil
|
807
959
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
808
960
|
|
@@ -820,9 +972,11 @@ module Google
|
|
820
972
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
821
973
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
822
974
|
|
823
|
-
header_params = {
|
824
|
-
|
825
|
-
|
975
|
+
header_params = {}
|
976
|
+
if request.name
|
977
|
+
header_params["name"] = request.name
|
978
|
+
end
|
979
|
+
|
826
980
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
827
981
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
828
982
|
|
@@ -890,6 +1044,21 @@ module Google
|
|
890
1044
|
#
|
891
1045
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
892
1046
|
#
|
1047
|
+
# @example Basic example
|
1048
|
+
# require "google/cloud/monitoring/v3"
|
1049
|
+
#
|
1050
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1051
|
+
# client = Google::Cloud::Monitoring::V3::MetricService::Client.new
|
1052
|
+
#
|
1053
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1054
|
+
# request = Google::Cloud::Monitoring::V3::CreateTimeSeriesRequest.new
|
1055
|
+
#
|
1056
|
+
# # Call the create_service_time_series method.
|
1057
|
+
# result = client.create_service_time_series request
|
1058
|
+
#
|
1059
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1060
|
+
# p result
|
1061
|
+
#
|
893
1062
|
def create_service_time_series request, options = nil
|
894
1063
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
895
1064
|
|
@@ -907,9 +1076,11 @@ module Google
|
|
907
1076
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
908
1077
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
909
1078
|
|
910
|
-
header_params = {
|
911
|
-
|
912
|
-
|
1079
|
+
header_params = {}
|
1080
|
+
if request.name
|
1081
|
+
header_params["name"] = request.name
|
1082
|
+
end
|
1083
|
+
|
913
1084
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
914
1085
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
915
1086
|
|