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
@@ -42,13 +42,12 @@ module Google
|
|
42
42
|
# See {::Google::Cloud::Monitoring::V3::NotificationChannelService::Client::Configuration}
|
43
43
|
# for a description of the configuration fields.
|
44
44
|
#
|
45
|
-
#
|
45
|
+
# @example
|
46
46
|
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
# end
|
47
|
+
# # Modify the configuration for all NotificationChannelService clients
|
48
|
+
# ::Google::Cloud::Monitoring::V3::NotificationChannelService::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
|
+
# end
|
52
51
|
#
|
53
52
|
# @yield [config] Configure the Client client.
|
54
53
|
# @yieldparam config [Client::Configuration]
|
@@ -68,22 +67,22 @@ module Google
|
|
68
67
|
|
69
68
|
default_config.rpcs.list_notification_channel_descriptors.timeout = 30.0
|
70
69
|
default_config.rpcs.list_notification_channel_descriptors.retry_policy = {
|
71
|
-
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [
|
70
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
72
71
|
}
|
73
72
|
|
74
73
|
default_config.rpcs.get_notification_channel_descriptor.timeout = 30.0
|
75
74
|
default_config.rpcs.get_notification_channel_descriptor.retry_policy = {
|
76
|
-
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [
|
75
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
77
76
|
}
|
78
77
|
|
79
78
|
default_config.rpcs.list_notification_channels.timeout = 30.0
|
80
79
|
default_config.rpcs.list_notification_channels.retry_policy = {
|
81
|
-
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [
|
80
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
82
81
|
}
|
83
82
|
|
84
83
|
default_config.rpcs.get_notification_channel.timeout = 30.0
|
85
84
|
default_config.rpcs.get_notification_channel.retry_policy = {
|
86
|
-
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [
|
85
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
87
86
|
}
|
88
87
|
|
89
88
|
default_config.rpcs.create_notification_channel.timeout = 30.0
|
@@ -92,19 +91,19 @@ module Google
|
|
92
91
|
|
93
92
|
default_config.rpcs.delete_notification_channel.timeout = 30.0
|
94
93
|
default_config.rpcs.delete_notification_channel.retry_policy = {
|
95
|
-
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [
|
94
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
96
95
|
}
|
97
96
|
|
98
97
|
default_config.rpcs.send_notification_channel_verification_code.timeout = 30.0
|
99
98
|
|
100
99
|
default_config.rpcs.get_notification_channel_verification_code.timeout = 30.0
|
101
100
|
default_config.rpcs.get_notification_channel_verification_code.retry_policy = {
|
102
|
-
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [
|
101
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
103
102
|
}
|
104
103
|
|
105
104
|
default_config.rpcs.verify_notification_channel.timeout = 30.0
|
106
105
|
default_config.rpcs.verify_notification_channel.retry_policy = {
|
107
|
-
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [
|
106
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
108
107
|
}
|
109
108
|
|
110
109
|
default_config
|
@@ -136,19 +135,15 @@ module Google
|
|
136
135
|
##
|
137
136
|
# Create a new NotificationChannelService client object.
|
138
137
|
#
|
139
|
-
#
|
140
|
-
#
|
141
|
-
# To create a new NotificationChannelService client with the default
|
142
|
-
# configuration:
|
143
|
-
#
|
144
|
-
# client = ::Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new
|
138
|
+
# @example
|
145
139
|
#
|
146
|
-
#
|
147
|
-
#
|
140
|
+
# # Create a client using the default configuration
|
141
|
+
# client = ::Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new
|
148
142
|
#
|
149
|
-
#
|
150
|
-
#
|
151
|
-
#
|
143
|
+
# # Create a client using a custom configuration
|
144
|
+
# client = ::Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new do |config|
|
145
|
+
# config.timeout = 10.0
|
146
|
+
# end
|
152
147
|
#
|
153
148
|
# @yield [config] Configure the NotificationChannelService client.
|
154
149
|
# @yieldparam config [Client::Configuration]
|
@@ -168,10 +163,9 @@ module Google
|
|
168
163
|
|
169
164
|
# Create credentials
|
170
165
|
credentials = @config.credentials
|
171
|
-
# Use self-signed JWT if the
|
166
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
172
167
|
# but only if the default endpoint does not have a region prefix.
|
173
|
-
enable_self_signed_jwt = @config.
|
174
|
-
@config.endpoint == Client.configure.endpoint &&
|
168
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
175
169
|
!@config.endpoint.split(".").first.include?("-")
|
176
170
|
credentials ||= Credentials.default scope: @config.scope,
|
177
171
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -217,8 +211,10 @@ module Google
|
|
217
211
|
#
|
218
212
|
# projects/[PROJECT_ID_OR_NUMBER]
|
219
213
|
#
|
220
|
-
# Note that this
|
221
|
-
#
|
214
|
+
# Note that this
|
215
|
+
# [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent
|
216
|
+
# container in which to look for the descriptors; to retrieve a single
|
217
|
+
# descriptor by name, use the
|
222
218
|
# {::Google::Cloud::Monitoring::V3::NotificationChannelService::Client#get_notification_channel_descriptor GetNotificationChannelDescriptor}
|
223
219
|
# operation, instead.
|
224
220
|
# @param page_size [::Integer]
|
@@ -238,6 +234,27 @@ module Google
|
|
238
234
|
#
|
239
235
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
240
236
|
#
|
237
|
+
# @example Basic example
|
238
|
+
# require "google/cloud/monitoring/v3"
|
239
|
+
#
|
240
|
+
# # Create a client object. The client can be reused for multiple calls.
|
241
|
+
# client = Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new
|
242
|
+
#
|
243
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
244
|
+
# request = Google::Cloud::Monitoring::V3::ListNotificationChannelDescriptorsRequest.new
|
245
|
+
#
|
246
|
+
# # Call the list_notification_channel_descriptors method.
|
247
|
+
# result = client.list_notification_channel_descriptors request
|
248
|
+
#
|
249
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
250
|
+
# # iterate over all elements by calling #each, and the enumerable
|
251
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
252
|
+
# # methods are also available for managing paging directly.
|
253
|
+
# result.each do |response|
|
254
|
+
# # Each element is of type ::Google::Cloud::Monitoring::V3::NotificationChannelDescriptor.
|
255
|
+
# p response
|
256
|
+
# end
|
257
|
+
#
|
241
258
|
def list_notification_channel_descriptors request, options = nil
|
242
259
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
243
260
|
|
@@ -255,16 +272,20 @@ module Google
|
|
255
272
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
256
273
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
257
274
|
|
258
|
-
header_params = {
|
259
|
-
|
260
|
-
|
275
|
+
header_params = {}
|
276
|
+
if request.name
|
277
|
+
header_params["name"] = request.name
|
278
|
+
end
|
279
|
+
|
261
280
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
262
281
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
263
282
|
|
264
283
|
options.apply_defaults timeout: @config.rpcs.list_notification_channel_descriptors.timeout,
|
265
284
|
metadata: metadata,
|
266
285
|
retry_policy: @config.rpcs.list_notification_channel_descriptors.retry_policy
|
267
|
-
|
286
|
+
|
287
|
+
options.apply_defaults timeout: @config.timeout,
|
288
|
+
metadata: @config.metadata,
|
268
289
|
retry_policy: @config.retry_policy
|
269
290
|
|
270
291
|
@notification_channel_service_stub.call_rpc :list_notification_channel_descriptors, request, options: options do |response, operation|
|
@@ -308,6 +329,21 @@ module Google
|
|
308
329
|
#
|
309
330
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
310
331
|
#
|
332
|
+
# @example Basic example
|
333
|
+
# require "google/cloud/monitoring/v3"
|
334
|
+
#
|
335
|
+
# # Create a client object. The client can be reused for multiple calls.
|
336
|
+
# client = Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new
|
337
|
+
#
|
338
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
339
|
+
# request = Google::Cloud::Monitoring::V3::GetNotificationChannelDescriptorRequest.new
|
340
|
+
#
|
341
|
+
# # Call the get_notification_channel_descriptor method.
|
342
|
+
# result = client.get_notification_channel_descriptor request
|
343
|
+
#
|
344
|
+
# # The returned object is of type Google::Cloud::Monitoring::V3::NotificationChannelDescriptor.
|
345
|
+
# p result
|
346
|
+
#
|
311
347
|
def get_notification_channel_descriptor request, options = nil
|
312
348
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
313
349
|
|
@@ -325,16 +361,20 @@ module Google
|
|
325
361
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
326
362
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
327
363
|
|
328
|
-
header_params = {
|
329
|
-
|
330
|
-
|
364
|
+
header_params = {}
|
365
|
+
if request.name
|
366
|
+
header_params["name"] = request.name
|
367
|
+
end
|
368
|
+
|
331
369
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
332
370
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
333
371
|
|
334
372
|
options.apply_defaults timeout: @config.rpcs.get_notification_channel_descriptor.timeout,
|
335
373
|
metadata: metadata,
|
336
374
|
retry_policy: @config.rpcs.get_notification_channel_descriptor.retry_policy
|
337
|
-
|
375
|
+
|
376
|
+
options.apply_defaults timeout: @config.timeout,
|
377
|
+
metadata: @config.metadata,
|
338
378
|
retry_policy: @config.retry_policy
|
339
379
|
|
340
380
|
@notification_channel_service_stub.call_rpc :get_notification_channel_descriptor, request, options: options do |response, operation|
|
@@ -364,7 +404,8 @@ module Google
|
|
364
404
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
365
405
|
#
|
366
406
|
# @param name [::String]
|
367
|
-
# Required. The project on
|
407
|
+
# Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on
|
408
|
+
# which to execute the request. The format is:
|
368
409
|
#
|
369
410
|
# projects/[PROJECT_ID_OR_NUMBER]
|
370
411
|
#
|
@@ -404,6 +445,27 @@ module Google
|
|
404
445
|
#
|
405
446
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
406
447
|
#
|
448
|
+
# @example Basic example
|
449
|
+
# require "google/cloud/monitoring/v3"
|
450
|
+
#
|
451
|
+
# # Create a client object. The client can be reused for multiple calls.
|
452
|
+
# client = Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new
|
453
|
+
#
|
454
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
455
|
+
# request = Google::Cloud::Monitoring::V3::ListNotificationChannelsRequest.new
|
456
|
+
#
|
457
|
+
# # Call the list_notification_channels method.
|
458
|
+
# result = client.list_notification_channels request
|
459
|
+
#
|
460
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
461
|
+
# # iterate over all elements by calling #each, and the enumerable
|
462
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
463
|
+
# # methods are also available for managing paging directly.
|
464
|
+
# result.each do |response|
|
465
|
+
# # Each element is of type ::Google::Cloud::Monitoring::V3::NotificationChannel.
|
466
|
+
# p response
|
467
|
+
# end
|
468
|
+
#
|
407
469
|
def list_notification_channels request, options = nil
|
408
470
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
409
471
|
|
@@ -421,16 +483,20 @@ module Google
|
|
421
483
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
422
484
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
423
485
|
|
424
|
-
header_params = {
|
425
|
-
|
426
|
-
|
486
|
+
header_params = {}
|
487
|
+
if request.name
|
488
|
+
header_params["name"] = request.name
|
489
|
+
end
|
490
|
+
|
427
491
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
428
492
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
429
493
|
|
430
494
|
options.apply_defaults timeout: @config.rpcs.list_notification_channels.timeout,
|
431
495
|
metadata: metadata,
|
432
496
|
retry_policy: @config.rpcs.list_notification_channels.retry_policy
|
433
|
-
|
497
|
+
|
498
|
+
options.apply_defaults timeout: @config.timeout,
|
499
|
+
metadata: @config.metadata,
|
434
500
|
retry_policy: @config.retry_policy
|
435
501
|
|
436
502
|
@notification_channel_service_stub.call_rpc :list_notification_channels, request, options: options do |response, operation|
|
@@ -477,6 +543,21 @@ module Google
|
|
477
543
|
#
|
478
544
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
479
545
|
#
|
546
|
+
# @example Basic example
|
547
|
+
# require "google/cloud/monitoring/v3"
|
548
|
+
#
|
549
|
+
# # Create a client object. The client can be reused for multiple calls.
|
550
|
+
# client = Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new
|
551
|
+
#
|
552
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
553
|
+
# request = Google::Cloud::Monitoring::V3::GetNotificationChannelRequest.new
|
554
|
+
#
|
555
|
+
# # Call the get_notification_channel method.
|
556
|
+
# result = client.get_notification_channel request
|
557
|
+
#
|
558
|
+
# # The returned object is of type Google::Cloud::Monitoring::V3::NotificationChannel.
|
559
|
+
# p result
|
560
|
+
#
|
480
561
|
def get_notification_channel request, options = nil
|
481
562
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
482
563
|
|
@@ -494,16 +575,20 @@ module Google
|
|
494
575
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
495
576
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
496
577
|
|
497
|
-
header_params = {
|
498
|
-
|
499
|
-
|
578
|
+
header_params = {}
|
579
|
+
if request.name
|
580
|
+
header_params["name"] = request.name
|
581
|
+
end
|
582
|
+
|
500
583
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
501
584
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
502
585
|
|
503
586
|
options.apply_defaults timeout: @config.rpcs.get_notification_channel.timeout,
|
504
587
|
metadata: metadata,
|
505
588
|
retry_policy: @config.rpcs.get_notification_channel.retry_policy
|
506
|
-
|
589
|
+
|
590
|
+
options.apply_defaults timeout: @config.timeout,
|
591
|
+
metadata: @config.metadata,
|
507
592
|
retry_policy: @config.retry_policy
|
508
593
|
|
509
594
|
@notification_channel_service_stub.call_rpc :get_notification_channel, request, options: options do |response, operation|
|
@@ -534,7 +619,8 @@ module Google
|
|
534
619
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
535
620
|
#
|
536
621
|
# @param name [::String]
|
537
|
-
# Required. The project on
|
622
|
+
# Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on
|
623
|
+
# which to execute the request. The format is:
|
538
624
|
#
|
539
625
|
# projects/[PROJECT_ID_OR_NUMBER]
|
540
626
|
#
|
@@ -553,6 +639,21 @@ module Google
|
|
553
639
|
#
|
554
640
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
555
641
|
#
|
642
|
+
# @example Basic example
|
643
|
+
# require "google/cloud/monitoring/v3"
|
644
|
+
#
|
645
|
+
# # Create a client object. The client can be reused for multiple calls.
|
646
|
+
# client = Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new
|
647
|
+
#
|
648
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
649
|
+
# request = Google::Cloud::Monitoring::V3::CreateNotificationChannelRequest.new
|
650
|
+
#
|
651
|
+
# # Call the create_notification_channel method.
|
652
|
+
# result = client.create_notification_channel request
|
653
|
+
#
|
654
|
+
# # The returned object is of type Google::Cloud::Monitoring::V3::NotificationChannel.
|
655
|
+
# p result
|
656
|
+
#
|
556
657
|
def create_notification_channel request, options = nil
|
557
658
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
558
659
|
|
@@ -570,16 +671,20 @@ module Google
|
|
570
671
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
571
672
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
572
673
|
|
573
|
-
header_params = {
|
574
|
-
|
575
|
-
|
674
|
+
header_params = {}
|
675
|
+
if request.name
|
676
|
+
header_params["name"] = request.name
|
677
|
+
end
|
678
|
+
|
576
679
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
577
680
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
578
681
|
|
579
682
|
options.apply_defaults timeout: @config.rpcs.create_notification_channel.timeout,
|
580
683
|
metadata: metadata,
|
581
684
|
retry_policy: @config.rpcs.create_notification_channel.retry_policy
|
582
|
-
|
685
|
+
|
686
|
+
options.apply_defaults timeout: @config.timeout,
|
687
|
+
metadata: @config.metadata,
|
583
688
|
retry_policy: @config.retry_policy
|
584
689
|
|
585
690
|
@notification_channel_service_stub.call_rpc :create_notification_channel, request, options: options do |response, operation|
|
@@ -625,6 +730,21 @@ module Google
|
|
625
730
|
#
|
626
731
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
627
732
|
#
|
733
|
+
# @example Basic example
|
734
|
+
# require "google/cloud/monitoring/v3"
|
735
|
+
#
|
736
|
+
# # Create a client object. The client can be reused for multiple calls.
|
737
|
+
# client = Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new
|
738
|
+
#
|
739
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
740
|
+
# request = Google::Cloud::Monitoring::V3::UpdateNotificationChannelRequest.new
|
741
|
+
#
|
742
|
+
# # Call the update_notification_channel method.
|
743
|
+
# result = client.update_notification_channel request
|
744
|
+
#
|
745
|
+
# # The returned object is of type Google::Cloud::Monitoring::V3::NotificationChannel.
|
746
|
+
# p result
|
747
|
+
#
|
628
748
|
def update_notification_channel request, options = nil
|
629
749
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
630
750
|
|
@@ -642,16 +762,20 @@ module Google
|
|
642
762
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
643
763
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
644
764
|
|
645
|
-
header_params = {
|
646
|
-
|
647
|
-
|
765
|
+
header_params = {}
|
766
|
+
if request.notification_channel&.name
|
767
|
+
header_params["notification_channel.name"] = request.notification_channel.name
|
768
|
+
end
|
769
|
+
|
648
770
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
649
771
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
650
772
|
|
651
773
|
options.apply_defaults timeout: @config.rpcs.update_notification_channel.timeout,
|
652
774
|
metadata: metadata,
|
653
775
|
retry_policy: @config.rpcs.update_notification_channel.retry_policy
|
654
|
-
|
776
|
+
|
777
|
+
options.apply_defaults timeout: @config.timeout,
|
778
|
+
metadata: @config.metadata,
|
655
779
|
retry_policy: @config.retry_policy
|
656
780
|
|
657
781
|
@notification_channel_service_stub.call_rpc :update_notification_channel, request, options: options do |response, operation|
|
@@ -698,6 +822,21 @@ module Google
|
|
698
822
|
#
|
699
823
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
700
824
|
#
|
825
|
+
# @example Basic example
|
826
|
+
# require "google/cloud/monitoring/v3"
|
827
|
+
#
|
828
|
+
# # Create a client object. The client can be reused for multiple calls.
|
829
|
+
# client = Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new
|
830
|
+
#
|
831
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
832
|
+
# request = Google::Cloud::Monitoring::V3::DeleteNotificationChannelRequest.new
|
833
|
+
#
|
834
|
+
# # Call the delete_notification_channel method.
|
835
|
+
# result = client.delete_notification_channel request
|
836
|
+
#
|
837
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
838
|
+
# p result
|
839
|
+
#
|
701
840
|
def delete_notification_channel request, options = nil
|
702
841
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
703
842
|
|
@@ -715,16 +854,20 @@ module Google
|
|
715
854
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
716
855
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
717
856
|
|
718
|
-
header_params = {
|
719
|
-
|
720
|
-
|
857
|
+
header_params = {}
|
858
|
+
if request.name
|
859
|
+
header_params["name"] = request.name
|
860
|
+
end
|
861
|
+
|
721
862
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
722
863
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
723
864
|
|
724
865
|
options.apply_defaults timeout: @config.rpcs.delete_notification_channel.timeout,
|
725
866
|
metadata: metadata,
|
726
867
|
retry_policy: @config.rpcs.delete_notification_channel.retry_policy
|
727
|
-
|
868
|
+
|
869
|
+
options.apply_defaults timeout: @config.timeout,
|
870
|
+
metadata: @config.metadata,
|
728
871
|
retry_policy: @config.retry_policy
|
729
872
|
|
730
873
|
@notification_channel_service_stub.call_rpc :delete_notification_channel, request, options: options do |response, operation|
|
@@ -765,6 +908,21 @@ module Google
|
|
765
908
|
#
|
766
909
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
767
910
|
#
|
911
|
+
# @example Basic example
|
912
|
+
# require "google/cloud/monitoring/v3"
|
913
|
+
#
|
914
|
+
# # Create a client object. The client can be reused for multiple calls.
|
915
|
+
# client = Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new
|
916
|
+
#
|
917
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
918
|
+
# request = Google::Cloud::Monitoring::V3::SendNotificationChannelVerificationCodeRequest.new
|
919
|
+
#
|
920
|
+
# # Call the send_notification_channel_verification_code method.
|
921
|
+
# result = client.send_notification_channel_verification_code request
|
922
|
+
#
|
923
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
924
|
+
# p result
|
925
|
+
#
|
768
926
|
def send_notification_channel_verification_code request, options = nil
|
769
927
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
770
928
|
|
@@ -782,16 +940,20 @@ module Google
|
|
782
940
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
783
941
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
784
942
|
|
785
|
-
header_params = {
|
786
|
-
|
787
|
-
|
943
|
+
header_params = {}
|
944
|
+
if request.name
|
945
|
+
header_params["name"] = request.name
|
946
|
+
end
|
947
|
+
|
788
948
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
789
949
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
790
950
|
|
791
951
|
options.apply_defaults timeout: @config.rpcs.send_notification_channel_verification_code.timeout,
|
792
952
|
metadata: metadata,
|
793
953
|
retry_policy: @config.rpcs.send_notification_channel_verification_code.retry_policy
|
794
|
-
|
954
|
+
|
955
|
+
options.apply_defaults timeout: @config.timeout,
|
956
|
+
metadata: @config.metadata,
|
795
957
|
retry_policy: @config.retry_policy
|
796
958
|
|
797
959
|
@notification_channel_service_stub.call_rpc :send_notification_channel_verification_code, request, options: options do |response, operation|
|
@@ -863,6 +1025,21 @@ module Google
|
|
863
1025
|
#
|
864
1026
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
865
1027
|
#
|
1028
|
+
# @example Basic example
|
1029
|
+
# require "google/cloud/monitoring/v3"
|
1030
|
+
#
|
1031
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1032
|
+
# client = Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new
|
1033
|
+
#
|
1034
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1035
|
+
# request = Google::Cloud::Monitoring::V3::GetNotificationChannelVerificationCodeRequest.new
|
1036
|
+
#
|
1037
|
+
# # Call the get_notification_channel_verification_code method.
|
1038
|
+
# result = client.get_notification_channel_verification_code request
|
1039
|
+
#
|
1040
|
+
# # The returned object is of type Google::Cloud::Monitoring::V3::GetNotificationChannelVerificationCodeResponse.
|
1041
|
+
# p result
|
1042
|
+
#
|
866
1043
|
def get_notification_channel_verification_code request, options = nil
|
867
1044
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
868
1045
|
|
@@ -880,16 +1057,20 @@ module Google
|
|
880
1057
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
881
1058
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
882
1059
|
|
883
|
-
header_params = {
|
884
|
-
|
885
|
-
|
1060
|
+
header_params = {}
|
1061
|
+
if request.name
|
1062
|
+
header_params["name"] = request.name
|
1063
|
+
end
|
1064
|
+
|
886
1065
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
887
1066
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
888
1067
|
|
889
1068
|
options.apply_defaults timeout: @config.rpcs.get_notification_channel_verification_code.timeout,
|
890
1069
|
metadata: metadata,
|
891
1070
|
retry_policy: @config.rpcs.get_notification_channel_verification_code.retry_policy
|
892
|
-
|
1071
|
+
|
1072
|
+
options.apply_defaults timeout: @config.timeout,
|
1073
|
+
metadata: @config.metadata,
|
893
1074
|
retry_policy: @config.retry_policy
|
894
1075
|
|
895
1076
|
@notification_channel_service_stub.call_rpc :get_notification_channel_verification_code, request, options: options do |response, operation|
|
@@ -939,6 +1120,21 @@ module Google
|
|
939
1120
|
#
|
940
1121
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
941
1122
|
#
|
1123
|
+
# @example Basic example
|
1124
|
+
# require "google/cloud/monitoring/v3"
|
1125
|
+
#
|
1126
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1127
|
+
# client = Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new
|
1128
|
+
#
|
1129
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1130
|
+
# request = Google::Cloud::Monitoring::V3::VerifyNotificationChannelRequest.new
|
1131
|
+
#
|
1132
|
+
# # Call the verify_notification_channel method.
|
1133
|
+
# result = client.verify_notification_channel request
|
1134
|
+
#
|
1135
|
+
# # The returned object is of type Google::Cloud::Monitoring::V3::NotificationChannel.
|
1136
|
+
# p result
|
1137
|
+
#
|
942
1138
|
def verify_notification_channel request, options = nil
|
943
1139
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
944
1140
|
|
@@ -956,16 +1152,20 @@ module Google
|
|
956
1152
|
gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
|
957
1153
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
958
1154
|
|
959
|
-
header_params = {
|
960
|
-
|
961
|
-
|
1155
|
+
header_params = {}
|
1156
|
+
if request.name
|
1157
|
+
header_params["name"] = request.name
|
1158
|
+
end
|
1159
|
+
|
962
1160
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
963
1161
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
964
1162
|
|
965
1163
|
options.apply_defaults timeout: @config.rpcs.verify_notification_channel.timeout,
|
966
1164
|
metadata: metadata,
|
967
1165
|
retry_policy: @config.rpcs.verify_notification_channel.retry_policy
|
968
|
-
|
1166
|
+
|
1167
|
+
options.apply_defaults timeout: @config.timeout,
|
1168
|
+
metadata: @config.metadata,
|
969
1169
|
retry_policy: @config.retry_policy
|
970
1170
|
|
971
1171
|
@notification_channel_service_stub.call_rpc :verify_notification_channel, request, options: options do |response, operation|
|
@@ -989,22 +1189,21 @@ module Google
|
|
989
1189
|
# Configuration can be applied globally to all clients, or to a single client
|
990
1190
|
# on construction.
|
991
1191
|
#
|
992
|
-
#
|
993
|
-
#
|
994
|
-
#
|
995
|
-
# to 20 seconds,
|
996
|
-
#
|
997
|
-
#
|
998
|
-
#
|
999
|
-
#
|
1000
|
-
#
|
1001
|
-
#
|
1002
|
-
#
|
1003
|
-
#
|
1004
|
-
#
|
1005
|
-
#
|
1006
|
-
#
|
1007
|
-
# end
|
1192
|
+
# @example
|
1193
|
+
#
|
1194
|
+
# # Modify the global config, setting the timeout for
|
1195
|
+
# # list_notification_channel_descriptors to 20 seconds,
|
1196
|
+
# # and all remaining timeouts to 10 seconds.
|
1197
|
+
# ::Google::Cloud::Monitoring::V3::NotificationChannelService::Client.configure do |config|
|
1198
|
+
# config.timeout = 10.0
|
1199
|
+
# config.rpcs.list_notification_channel_descriptors.timeout = 20.0
|
1200
|
+
# end
|
1201
|
+
#
|
1202
|
+
# # Apply the above configuration only to a new client.
|
1203
|
+
# client = ::Google::Cloud::Monitoring::V3::NotificationChannelService::Client.new do |config|
|
1204
|
+
# config.timeout = 10.0
|
1205
|
+
# config.rpcs.list_notification_channel_descriptors.timeout = 20.0
|
1206
|
+
# end
|
1008
1207
|
#
|
1009
1208
|
# @!attribute [rw] endpoint
|
1010
1209
|
# The hostname or hostname:port of the service endpoint.
|