google-cloud-monitoring-v3 0.5.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- 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 +291 -24
- 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
- data/lib/google/monitoring/v3/alert_pb.rb +3 -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 +8 -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 +4 -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 +3 -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 +2 -2
- data/lib/google/monitoring/v3/uptime_service_services_pb.rb +1 -1
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/monitoring/v3/alert.rb +9 -5
- data/proto_docs/google/monitoring/v3/common.rb +25 -1
- data/proto_docs/google/monitoring/v3/notification.rb +4 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9118910b6876838ce61d06e0f12b91062daeba4194646f59272c98d7cfcd780c
|
4
|
+
data.tar.gz: b7085b7f4af99e5c86a8266fabc523e5411462a2978afc08e22c16e2605bfde6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 011ab25cc96ec2e7f7e008cdabc0badb5ee70c737457b268daf262a20141522280073c8e5eb72df62242b0453bc7a532294ab6770c97c55fc29af3460caf4f13
|
7
|
+
data.tar.gz: 0eeca157c6c8b942179ed064788dfcfcd32c22ee11b76e76f6aea6b35f94a98a1f7b1870d922d8a59fd145ad60a5e3e2a7cd65f0564648525030200af408a606
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
|