google-cloud-monitoring-v3 0.4.2 → 0.6.1
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/lib/google/cloud/monitoring/v3/alert_policy_service/client.rb +157 -61
- data/lib/google/cloud/monitoring/v3/group_service/client.rb +189 -68
- data/lib/google/cloud/monitoring/v3/metric_service/client.rb +360 -80
- data/lib/google/cloud/monitoring/v3/notification_channel_service/client.rb +286 -87
- data/lib/google/cloud/monitoring/v3/query_service/client.rb +60 -41
- data/lib/google/cloud/monitoring/v3/service_monitoring_service/client.rb +281 -84
- data/lib/google/cloud/monitoring/v3/uptime_check_service/client.rb +182 -63
- data/lib/google/cloud/monitoring/v3/version.rb +1 -1
- data/lib/google/monitoring/v3/alert_pb.rb +17 -2
- data/lib/google/monitoring/v3/alert_service_pb.rb +2 -2
- data/lib/google/monitoring/v3/alert_service_services_pb.rb +1 -1
- data/lib/google/monitoring/v3/common_pb.rb +2 -2
- data/lib/google/monitoring/v3/group_pb.rb +1 -1
- data/lib/google/monitoring/v3/group_service_pb.rb +2 -2
- data/lib/google/monitoring/v3/group_service_services_pb.rb +1 -1
- data/lib/google/monitoring/v3/metric_pb.rb +2 -2
- data/lib/google/monitoring/v3/metric_service_pb.rb +2 -2
- data/lib/google/monitoring/v3/metric_service_services_pb.rb +13 -1
- data/lib/google/monitoring/v3/mutation_record_pb.rb +1 -1
- data/lib/google/monitoring/v3/notification_pb.rb +2 -2
- data/lib/google/monitoring/v3/notification_service_pb.rb +2 -2
- data/lib/google/monitoring/v3/notification_service_services_pb.rb +1 -1
- data/lib/google/monitoring/v3/query_service_pb.rb +2 -2
- data/lib/google/monitoring/v3/query_service_services_pb.rb +1 -1
- data/lib/google/monitoring/v3/service_pb.rb +5 -2
- data/lib/google/monitoring/v3/service_service_pb.rb +2 -2
- data/lib/google/monitoring/v3/service_service_services_pb.rb +1 -1
- data/lib/google/monitoring/v3/uptime_pb.rb +2 -2
- data/lib/google/monitoring/v3/uptime_service_pb.rb +3 -2
- data/lib/google/monitoring/v3/uptime_service_services_pb.rb +1 -1
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/monitoring/v3/alert.rb +68 -3
- data/proto_docs/google/monitoring/v3/alert_service.rb +4 -2
- data/proto_docs/google/monitoring/v3/common.rb +17 -5
- data/proto_docs/google/monitoring/v3/group_service.rb +4 -2
- data/proto_docs/google/monitoring/v3/metric.rb +3 -1
- data/proto_docs/google/monitoring/v3/metric_service.rb +13 -8
- data/proto_docs/google/monitoring/v3/notification_service.rb +8 -4
- data/proto_docs/google/monitoring/v3/service.rb +38 -6
- data/proto_docs/google/monitoring/v3/service_service.rb +4 -2
- data/proto_docs/google/monitoring/v3/span_context.rb +2 -2
- data/proto_docs/google/monitoring/v3/uptime.rb +5 -2
- data/proto_docs/google/monitoring/v3/uptime_service.rb +4 -2
- metadata +5 -4
@@ -44,13 +44,12 @@ module Google
|
|
44
44
|
# See {::Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client::Configuration}
|
45
45
|
# for a description of the configuration fields.
|
46
46
|
#
|
47
|
-
#
|
47
|
+
# @example
|
48
48
|
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
# end
|
49
|
+
# # Modify the configuration for all ServiceMonitoringService clients
|
50
|
+
# ::Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.configure do |config|
|
51
|
+
# config.timeout = 10.0
|
52
|
+
# end
|
54
53
|
#
|
55
54
|
# @yield [config] Configure the Client client.
|
56
55
|
# @yieldparam config [Client::Configuration]
|
@@ -72,38 +71,38 @@ module Google
|
|
72
71
|
|
73
72
|
default_config.rpcs.get_service.timeout = 30.0
|
74
73
|
default_config.rpcs.get_service.retry_policy = {
|
75
|
-
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [
|
74
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
76
75
|
}
|
77
76
|
|
78
77
|
default_config.rpcs.list_services.timeout = 30.0
|
79
78
|
default_config.rpcs.list_services.retry_policy = {
|
80
|
-
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [
|
79
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
81
80
|
}
|
82
81
|
|
83
82
|
default_config.rpcs.update_service.timeout = 30.0
|
84
83
|
|
85
84
|
default_config.rpcs.delete_service.timeout = 30.0
|
86
85
|
default_config.rpcs.delete_service.retry_policy = {
|
87
|
-
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [
|
86
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
88
87
|
}
|
89
88
|
|
90
89
|
default_config.rpcs.create_service_level_objective.timeout = 30.0
|
91
90
|
|
92
91
|
default_config.rpcs.get_service_level_objective.timeout = 30.0
|
93
92
|
default_config.rpcs.get_service_level_objective.retry_policy = {
|
94
|
-
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [
|
93
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
95
94
|
}
|
96
95
|
|
97
96
|
default_config.rpcs.list_service_level_objectives.timeout = 30.0
|
98
97
|
default_config.rpcs.list_service_level_objectives.retry_policy = {
|
99
|
-
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [
|
98
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
100
99
|
}
|
101
100
|
|
102
101
|
default_config.rpcs.update_service_level_objective.timeout = 30.0
|
103
102
|
|
104
103
|
default_config.rpcs.delete_service_level_objective.timeout = 30.0
|
105
104
|
default_config.rpcs.delete_service_level_objective.retry_policy = {
|
106
|
-
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [
|
105
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
107
106
|
}
|
108
107
|
|
109
108
|
default_config
|
@@ -135,19 +134,15 @@ module Google
|
|
135
134
|
##
|
136
135
|
# Create a new ServiceMonitoringService client object.
|
137
136
|
#
|
138
|
-
#
|
139
|
-
#
|
140
|
-
# To create a new ServiceMonitoringService client with the default
|
141
|
-
# configuration:
|
142
|
-
#
|
143
|
-
# client = ::Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
|
137
|
+
# @example
|
144
138
|
#
|
145
|
-
#
|
146
|
-
#
|
139
|
+
# # Create a client using the default configuration
|
140
|
+
# client = ::Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
|
147
141
|
#
|
148
|
-
#
|
149
|
-
#
|
150
|
-
#
|
142
|
+
# # Create a client using a custom configuration
|
143
|
+
# client = ::Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new do |config|
|
144
|
+
# config.timeout = 10.0
|
145
|
+
# end
|
151
146
|
#
|
152
147
|
# @yield [config] Configure the ServiceMonitoringService client.
|
153
148
|
# @yieldparam config [Client::Configuration]
|
@@ -167,10 +162,9 @@ module Google
|
|
167
162
|
|
168
163
|
# Create credentials
|
169
164
|
credentials = @config.credentials
|
170
|
-
# Use self-signed JWT if the
|
165
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
171
166
|
# but only if the default endpoint does not have a region prefix.
|
172
|
-
enable_self_signed_jwt = @config.
|
173
|
-
@config.endpoint == Client.configure.endpoint &&
|
167
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
174
168
|
!@config.endpoint.split(".").first.include?("-")
|
175
169
|
credentials ||= Credentials.default scope: @config.scope,
|
176
170
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -210,7 +204,8 @@ module Google
|
|
210
204
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
211
205
|
#
|
212
206
|
# @param parent [::String]
|
213
|
-
# Required. Resource name of
|
207
|
+
# Required. Resource [name](https://cloud.google.com/monitoring/api/v3#project_name) of
|
208
|
+
# the parent workspace. The format is:
|
214
209
|
#
|
215
210
|
# projects/[PROJECT_ID_OR_NUMBER]
|
216
211
|
# @param service_id [::String]
|
@@ -227,6 +222,21 @@ module Google
|
|
227
222
|
#
|
228
223
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
229
224
|
#
|
225
|
+
# @example Basic example
|
226
|
+
# require "google/cloud/monitoring/v3"
|
227
|
+
#
|
228
|
+
# # Create a client object. The client can be reused for multiple calls.
|
229
|
+
# client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
|
230
|
+
#
|
231
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
232
|
+
# request = Google::Cloud::Monitoring::V3::CreateServiceRequest.new
|
233
|
+
#
|
234
|
+
# # Call the create_service method.
|
235
|
+
# result = client.create_service request
|
236
|
+
#
|
237
|
+
# # The returned object is of type Google::Cloud::Monitoring::V3::Service.
|
238
|
+
# p result
|
239
|
+
#
|
230
240
|
def create_service request, options = nil
|
231
241
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
232
242
|
|
@@ -244,16 +254,20 @@ module Google
|
|
244
254
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
245
255
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
246
256
|
|
247
|
-
header_params = {
|
248
|
-
|
249
|
-
|
257
|
+
header_params = {}
|
258
|
+
if request.parent
|
259
|
+
header_params["parent"] = request.parent
|
260
|
+
end
|
261
|
+
|
250
262
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
251
263
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
252
264
|
|
253
265
|
options.apply_defaults timeout: @config.rpcs.create_service.timeout,
|
254
266
|
metadata: metadata,
|
255
267
|
retry_policy: @config.rpcs.create_service.retry_policy
|
256
|
-
|
268
|
+
|
269
|
+
options.apply_defaults timeout: @config.timeout,
|
270
|
+
metadata: @config.metadata,
|
257
271
|
retry_policy: @config.retry_policy
|
258
272
|
|
259
273
|
@service_monitoring_service_stub.call_rpc :create_service, request, options: options do |response, operation|
|
@@ -295,6 +309,21 @@ module Google
|
|
295
309
|
#
|
296
310
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
297
311
|
#
|
312
|
+
# @example Basic example
|
313
|
+
# require "google/cloud/monitoring/v3"
|
314
|
+
#
|
315
|
+
# # Create a client object. The client can be reused for multiple calls.
|
316
|
+
# client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
|
317
|
+
#
|
318
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
319
|
+
# request = Google::Cloud::Monitoring::V3::GetServiceRequest.new
|
320
|
+
#
|
321
|
+
# # Call the get_service method.
|
322
|
+
# result = client.get_service request
|
323
|
+
#
|
324
|
+
# # The returned object is of type Google::Cloud::Monitoring::V3::Service.
|
325
|
+
# p result
|
326
|
+
#
|
298
327
|
def get_service request, options = nil
|
299
328
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
300
329
|
|
@@ -312,16 +341,20 @@ module Google
|
|
312
341
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
313
342
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
314
343
|
|
315
|
-
header_params = {
|
316
|
-
|
317
|
-
|
344
|
+
header_params = {}
|
345
|
+
if request.name
|
346
|
+
header_params["name"] = request.name
|
347
|
+
end
|
348
|
+
|
318
349
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
319
350
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
320
351
|
|
321
352
|
options.apply_defaults timeout: @config.rpcs.get_service.timeout,
|
322
353
|
metadata: metadata,
|
323
354
|
retry_policy: @config.rpcs.get_service.retry_policy
|
324
|
-
|
355
|
+
|
356
|
+
options.apply_defaults timeout: @config.timeout,
|
357
|
+
metadata: @config.metadata,
|
325
358
|
retry_policy: @config.retry_policy
|
326
359
|
|
327
360
|
@service_monitoring_service_stub.call_rpc :get_service, request, options: options do |response, operation|
|
@@ -352,7 +385,8 @@ module Google
|
|
352
385
|
#
|
353
386
|
# @param parent [::String]
|
354
387
|
# Required. Resource name of the parent containing the listed services, either a
|
355
|
-
# project or a
|
388
|
+
# [project](https://cloud.google.com/monitoring/api/v3#project_name) or a
|
389
|
+
# Monitoring Workspace. The formats are:
|
356
390
|
#
|
357
391
|
# projects/[PROJECT_ID_OR_NUMBER]
|
358
392
|
# workspaces/[HOST_PROJECT_ID_OR_NUMBER]
|
@@ -392,6 +426,27 @@ module Google
|
|
392
426
|
#
|
393
427
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
394
428
|
#
|
429
|
+
# @example Basic example
|
430
|
+
# require "google/cloud/monitoring/v3"
|
431
|
+
#
|
432
|
+
# # Create a client object. The client can be reused for multiple calls.
|
433
|
+
# client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
|
434
|
+
#
|
435
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
436
|
+
# request = Google::Cloud::Monitoring::V3::ListServicesRequest.new
|
437
|
+
#
|
438
|
+
# # Call the list_services method.
|
439
|
+
# result = client.list_services request
|
440
|
+
#
|
441
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
442
|
+
# # iterate over all elements by calling #each, and the enumerable
|
443
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
444
|
+
# # methods are also available for managing paging directly.
|
445
|
+
# result.each do |response|
|
446
|
+
# # Each element is of type ::Google::Cloud::Monitoring::V3::Service.
|
447
|
+
# p response
|
448
|
+
# end
|
449
|
+
#
|
395
450
|
def list_services request, options = nil
|
396
451
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
397
452
|
|
@@ -409,16 +464,20 @@ module Google
|
|
409
464
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
410
465
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
411
466
|
|
412
|
-
header_params = {
|
413
|
-
|
414
|
-
|
467
|
+
header_params = {}
|
468
|
+
if request.parent
|
469
|
+
header_params["parent"] = request.parent
|
470
|
+
end
|
471
|
+
|
415
472
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
416
473
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
417
474
|
|
418
475
|
options.apply_defaults timeout: @config.rpcs.list_services.timeout,
|
419
476
|
metadata: metadata,
|
420
477
|
retry_policy: @config.rpcs.list_services.retry_policy
|
421
|
-
|
478
|
+
|
479
|
+
options.apply_defaults timeout: @config.timeout,
|
480
|
+
metadata: @config.metadata,
|
422
481
|
retry_policy: @config.retry_policy
|
423
482
|
|
424
483
|
@service_monitoring_service_stub.call_rpc :list_services, request, options: options do |response, operation|
|
@@ -462,6 +521,21 @@ module Google
|
|
462
521
|
#
|
463
522
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
464
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::ServiceMonitoringService::Client.new
|
529
|
+
#
|
530
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
531
|
+
# request = Google::Cloud::Monitoring::V3::UpdateServiceRequest.new
|
532
|
+
#
|
533
|
+
# # Call the update_service method.
|
534
|
+
# result = client.update_service request
|
535
|
+
#
|
536
|
+
# # The returned object is of type Google::Cloud::Monitoring::V3::Service.
|
537
|
+
# p result
|
538
|
+
#
|
465
539
|
def update_service request, options = nil
|
466
540
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
467
541
|
|
@@ -479,16 +553,20 @@ module Google
|
|
479
553
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
480
554
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
481
555
|
|
482
|
-
header_params = {
|
483
|
-
|
484
|
-
|
556
|
+
header_params = {}
|
557
|
+
if request.service&.name
|
558
|
+
header_params["service.name"] = request.service.name
|
559
|
+
end
|
560
|
+
|
485
561
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
486
562
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
487
563
|
|
488
564
|
options.apply_defaults timeout: @config.rpcs.update_service.timeout,
|
489
565
|
metadata: metadata,
|
490
566
|
retry_policy: @config.rpcs.update_service.retry_policy
|
491
|
-
|
567
|
+
|
568
|
+
options.apply_defaults timeout: @config.timeout,
|
569
|
+
metadata: @config.metadata,
|
492
570
|
retry_policy: @config.retry_policy
|
493
571
|
|
494
572
|
@service_monitoring_service_stub.call_rpc :update_service, request, options: options do |response, operation|
|
@@ -530,6 +608,21 @@ module Google
|
|
530
608
|
#
|
531
609
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
532
610
|
#
|
611
|
+
# @example Basic example
|
612
|
+
# require "google/cloud/monitoring/v3"
|
613
|
+
#
|
614
|
+
# # Create a client object. The client can be reused for multiple calls.
|
615
|
+
# client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
|
616
|
+
#
|
617
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
618
|
+
# request = Google::Cloud::Monitoring::V3::DeleteServiceRequest.new
|
619
|
+
#
|
620
|
+
# # Call the delete_service method.
|
621
|
+
# result = client.delete_service request
|
622
|
+
#
|
623
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
624
|
+
# p result
|
625
|
+
#
|
533
626
|
def delete_service request, options = nil
|
534
627
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
535
628
|
|
@@ -547,16 +640,20 @@ module Google
|
|
547
640
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
548
641
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
549
642
|
|
550
|
-
header_params = {
|
551
|
-
|
552
|
-
|
643
|
+
header_params = {}
|
644
|
+
if request.name
|
645
|
+
header_params["name"] = request.name
|
646
|
+
end
|
647
|
+
|
553
648
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
554
649
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
555
650
|
|
556
651
|
options.apply_defaults timeout: @config.rpcs.delete_service.timeout,
|
557
652
|
metadata: metadata,
|
558
653
|
retry_policy: @config.rpcs.delete_service.retry_policy
|
559
|
-
|
654
|
+
|
655
|
+
options.apply_defaults timeout: @config.timeout,
|
656
|
+
metadata: @config.metadata,
|
560
657
|
retry_policy: @config.retry_policy
|
561
658
|
|
562
659
|
@service_monitoring_service_stub.call_rpc :delete_service, request, options: options do |response, operation|
|
@@ -606,6 +703,21 @@ module Google
|
|
606
703
|
#
|
607
704
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
608
705
|
#
|
706
|
+
# @example Basic example
|
707
|
+
# require "google/cloud/monitoring/v3"
|
708
|
+
#
|
709
|
+
# # Create a client object. The client can be reused for multiple calls.
|
710
|
+
# client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
|
711
|
+
#
|
712
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
713
|
+
# request = Google::Cloud::Monitoring::V3::CreateServiceLevelObjectiveRequest.new
|
714
|
+
#
|
715
|
+
# # Call the create_service_level_objective method.
|
716
|
+
# result = client.create_service_level_objective request
|
717
|
+
#
|
718
|
+
# # The returned object is of type Google::Cloud::Monitoring::V3::ServiceLevelObjective.
|
719
|
+
# p result
|
720
|
+
#
|
609
721
|
def create_service_level_objective request, options = nil
|
610
722
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
611
723
|
|
@@ -623,16 +735,20 @@ module Google
|
|
623
735
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
624
736
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
625
737
|
|
626
|
-
header_params = {
|
627
|
-
|
628
|
-
|
738
|
+
header_params = {}
|
739
|
+
if request.parent
|
740
|
+
header_params["parent"] = request.parent
|
741
|
+
end
|
742
|
+
|
629
743
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
630
744
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
631
745
|
|
632
746
|
options.apply_defaults timeout: @config.rpcs.create_service_level_objective.timeout,
|
633
747
|
metadata: metadata,
|
634
748
|
retry_policy: @config.rpcs.create_service_level_objective.retry_policy
|
635
|
-
|
749
|
+
|
750
|
+
options.apply_defaults timeout: @config.timeout,
|
751
|
+
metadata: @config.metadata,
|
636
752
|
retry_policy: @config.retry_policy
|
637
753
|
|
638
754
|
@service_monitoring_service_stub.call_rpc :create_service_level_objective, request, options: options do |response, operation|
|
@@ -679,6 +795,21 @@ module Google
|
|
679
795
|
#
|
680
796
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
681
797
|
#
|
798
|
+
# @example Basic example
|
799
|
+
# require "google/cloud/monitoring/v3"
|
800
|
+
#
|
801
|
+
# # Create a client object. The client can be reused for multiple calls.
|
802
|
+
# client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
|
803
|
+
#
|
804
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
805
|
+
# request = Google::Cloud::Monitoring::V3::GetServiceLevelObjectiveRequest.new
|
806
|
+
#
|
807
|
+
# # Call the get_service_level_objective method.
|
808
|
+
# result = client.get_service_level_objective request
|
809
|
+
#
|
810
|
+
# # The returned object is of type Google::Cloud::Monitoring::V3::ServiceLevelObjective.
|
811
|
+
# p result
|
812
|
+
#
|
682
813
|
def get_service_level_objective request, options = nil
|
683
814
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
684
815
|
|
@@ -696,16 +827,20 @@ module Google
|
|
696
827
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
697
828
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
698
829
|
|
699
|
-
header_params = {
|
700
|
-
|
701
|
-
|
830
|
+
header_params = {}
|
831
|
+
if request.name
|
832
|
+
header_params["name"] = request.name
|
833
|
+
end
|
834
|
+
|
702
835
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
703
836
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
704
837
|
|
705
838
|
options.apply_defaults timeout: @config.rpcs.get_service_level_objective.timeout,
|
706
839
|
metadata: metadata,
|
707
840
|
retry_policy: @config.rpcs.get_service_level_objective.retry_policy
|
708
|
-
|
841
|
+
|
842
|
+
options.apply_defaults timeout: @config.timeout,
|
843
|
+
metadata: @config.metadata,
|
709
844
|
retry_policy: @config.retry_policy
|
710
845
|
|
711
846
|
@service_monitoring_service_stub.call_rpc :get_service_level_objective, request, options: options do |response, operation|
|
@@ -763,6 +898,27 @@ module Google
|
|
763
898
|
#
|
764
899
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
765
900
|
#
|
901
|
+
# @example Basic example
|
902
|
+
# require "google/cloud/monitoring/v3"
|
903
|
+
#
|
904
|
+
# # Create a client object. The client can be reused for multiple calls.
|
905
|
+
# client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
|
906
|
+
#
|
907
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
908
|
+
# request = Google::Cloud::Monitoring::V3::ListServiceLevelObjectivesRequest.new
|
909
|
+
#
|
910
|
+
# # Call the list_service_level_objectives method.
|
911
|
+
# result = client.list_service_level_objectives request
|
912
|
+
#
|
913
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
914
|
+
# # iterate over all elements by calling #each, and the enumerable
|
915
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
916
|
+
# # methods are also available for managing paging directly.
|
917
|
+
# result.each do |response|
|
918
|
+
# # Each element is of type ::Google::Cloud::Monitoring::V3::ServiceLevelObjective.
|
919
|
+
# p response
|
920
|
+
# end
|
921
|
+
#
|
766
922
|
def list_service_level_objectives request, options = nil
|
767
923
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
768
924
|
|
@@ -780,16 +936,20 @@ module Google
|
|
780
936
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
781
937
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
782
938
|
|
783
|
-
header_params = {
|
784
|
-
|
785
|
-
|
939
|
+
header_params = {}
|
940
|
+
if request.parent
|
941
|
+
header_params["parent"] = request.parent
|
942
|
+
end
|
943
|
+
|
786
944
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
787
945
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
788
946
|
|
789
947
|
options.apply_defaults timeout: @config.rpcs.list_service_level_objectives.timeout,
|
790
948
|
metadata: metadata,
|
791
949
|
retry_policy: @config.rpcs.list_service_level_objectives.retry_policy
|
792
|
-
|
950
|
+
|
951
|
+
options.apply_defaults timeout: @config.timeout,
|
952
|
+
metadata: @config.metadata,
|
793
953
|
retry_policy: @config.retry_policy
|
794
954
|
|
795
955
|
@service_monitoring_service_stub.call_rpc :list_service_level_objectives, request, options: options do |response, operation|
|
@@ -833,6 +993,21 @@ module Google
|
|
833
993
|
#
|
834
994
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
835
995
|
#
|
996
|
+
# @example Basic example
|
997
|
+
# require "google/cloud/monitoring/v3"
|
998
|
+
#
|
999
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1000
|
+
# client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
|
1001
|
+
#
|
1002
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1003
|
+
# request = Google::Cloud::Monitoring::V3::UpdateServiceLevelObjectiveRequest.new
|
1004
|
+
#
|
1005
|
+
# # Call the update_service_level_objective method.
|
1006
|
+
# result = client.update_service_level_objective request
|
1007
|
+
#
|
1008
|
+
# # The returned object is of type Google::Cloud::Monitoring::V3::ServiceLevelObjective.
|
1009
|
+
# p result
|
1010
|
+
#
|
836
1011
|
def update_service_level_objective request, options = nil
|
837
1012
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
838
1013
|
|
@@ -850,16 +1025,20 @@ module Google
|
|
850
1025
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
851
1026
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
852
1027
|
|
853
|
-
header_params = {
|
854
|
-
|
855
|
-
|
1028
|
+
header_params = {}
|
1029
|
+
if request.service_level_objective&.name
|
1030
|
+
header_params["service_level_objective.name"] = request.service_level_objective.name
|
1031
|
+
end
|
1032
|
+
|
856
1033
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
857
1034
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
858
1035
|
|
859
1036
|
options.apply_defaults timeout: @config.rpcs.update_service_level_objective.timeout,
|
860
1037
|
metadata: metadata,
|
861
1038
|
retry_policy: @config.rpcs.update_service_level_objective.retry_policy
|
862
|
-
|
1039
|
+
|
1040
|
+
options.apply_defaults timeout: @config.timeout,
|
1041
|
+
metadata: @config.metadata,
|
863
1042
|
retry_policy: @config.retry_policy
|
864
1043
|
|
865
1044
|
@service_monitoring_service_stub.call_rpc :update_service_level_objective, request, options: options do |response, operation|
|
@@ -901,6 +1080,21 @@ module Google
|
|
901
1080
|
#
|
902
1081
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
903
1082
|
#
|
1083
|
+
# @example Basic example
|
1084
|
+
# require "google/cloud/monitoring/v3"
|
1085
|
+
#
|
1086
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1087
|
+
# client = Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
|
1088
|
+
#
|
1089
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1090
|
+
# request = Google::Cloud::Monitoring::V3::DeleteServiceLevelObjectiveRequest.new
|
1091
|
+
#
|
1092
|
+
# # Call the delete_service_level_objective method.
|
1093
|
+
# result = client.delete_service_level_objective request
|
1094
|
+
#
|
1095
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1096
|
+
# p result
|
1097
|
+
#
|
904
1098
|
def delete_service_level_objective request, options = nil
|
905
1099
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
906
1100
|
|
@@ -918,16 +1112,20 @@ module Google
|
|
918
1112
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
919
1113
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
920
1114
|
|
921
|
-
header_params = {
|
922
|
-
|
923
|
-
|
1115
|
+
header_params = {}
|
1116
|
+
if request.name
|
1117
|
+
header_params["name"] = request.name
|
1118
|
+
end
|
1119
|
+
|
924
1120
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
925
1121
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
926
1122
|
|
927
1123
|
options.apply_defaults timeout: @config.rpcs.delete_service_level_objective.timeout,
|
928
1124
|
metadata: metadata,
|
929
1125
|
retry_policy: @config.rpcs.delete_service_level_objective.retry_policy
|
930
|
-
|
1126
|
+
|
1127
|
+
options.apply_defaults timeout: @config.timeout,
|
1128
|
+
metadata: @config.metadata,
|
931
1129
|
retry_policy: @config.retry_policy
|
932
1130
|
|
933
1131
|
@service_monitoring_service_stub.call_rpc :delete_service_level_objective, request, options: options do |response, operation|
|
@@ -951,22 +1149,21 @@ module Google
|
|
951
1149
|
# Configuration can be applied globally to all clients, or to a single client
|
952
1150
|
# on construction.
|
953
1151
|
#
|
954
|
-
#
|
955
|
-
#
|
956
|
-
#
|
957
|
-
# to 20 seconds,
|
958
|
-
#
|
959
|
-
#
|
960
|
-
#
|
961
|
-
#
|
962
|
-
#
|
963
|
-
#
|
964
|
-
#
|
965
|
-
#
|
966
|
-
#
|
967
|
-
#
|
968
|
-
#
|
969
|
-
# end
|
1152
|
+
# @example
|
1153
|
+
#
|
1154
|
+
# # Modify the global config, setting the timeout for
|
1155
|
+
# # create_service to 20 seconds,
|
1156
|
+
# # and all remaining timeouts to 10 seconds.
|
1157
|
+
# ::Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.configure do |config|
|
1158
|
+
# config.timeout = 10.0
|
1159
|
+
# config.rpcs.create_service.timeout = 20.0
|
1160
|
+
# end
|
1161
|
+
#
|
1162
|
+
# # Apply the above configuration only to a new client.
|
1163
|
+
# client = ::Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new do |config|
|
1164
|
+
# config.timeout = 10.0
|
1165
|
+
# config.rpcs.create_service.timeout = 20.0
|
1166
|
+
# end
|
970
1167
|
#
|
971
1168
|
# @!attribute [rw] endpoint
|
972
1169
|
# The hostname or hostname:port of the service endpoint.
|