google-cloud-monitoring-v3 0.16.0 → 0.18.0

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.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/monitoring/v3/alert_policy_service/client.rb +13 -5
  3. data/lib/google/cloud/monitoring/v3/group_service/client.rb +26 -14
  4. data/lib/google/cloud/monitoring/v3/metric_service/client.rb +66 -39
  5. data/lib/google/cloud/monitoring/v3/notification_channel_service/client.rb +23 -10
  6. data/lib/google/cloud/monitoring/v3/query_service/client.rb +10 -5
  7. data/lib/google/cloud/monitoring/v3/query_service.rb +1 -1
  8. data/lib/google/cloud/monitoring/v3/service_monitoring_service/client.rb +57 -42
  9. data/lib/google/cloud/monitoring/v3/service_monitoring_service.rb +3 -3
  10. data/lib/google/cloud/monitoring/v3/snooze_service/client.rb +11 -4
  11. data/lib/google/cloud/monitoring/v3/uptime_check_service/client.rb +15 -6
  12. data/lib/google/cloud/monitoring/v3/uptime_check_service/paths.rb +19 -0
  13. data/lib/google/cloud/monitoring/v3/version.rb +1 -1
  14. data/lib/google/monitoring/v3/alert_pb.rb +2 -1
  15. data/lib/google/monitoring/v3/common_pb.rb +1 -1
  16. data/lib/google/monitoring/v3/metric_service_services_pb.rb +11 -7
  17. data/lib/google/monitoring/v3/query_service_pb.rb +2 -2
  18. data/lib/google/monitoring/v3/query_service_services_pb.rb +2 -2
  19. data/lib/google/monitoring/v3/service_pb.rb +7 -1
  20. data/lib/google/monitoring/v3/service_service_services_pb.rb +4 -4
  21. data/lib/google/monitoring/v3/uptime_pb.rb +5 -1
  22. data/proto_docs/google/api/client.rb +4 -0
  23. data/proto_docs/google/api/monitored_resource.rb +1 -1
  24. data/proto_docs/google/monitoring/v3/alert.rb +25 -3
  25. data/proto_docs/google/monitoring/v3/common.rb +43 -33
  26. data/proto_docs/google/monitoring/v3/group_service.rb +11 -8
  27. data/proto_docs/google/monitoring/v3/metric_service.rb +35 -24
  28. data/proto_docs/google/monitoring/v3/service.rb +150 -8
  29. data/proto_docs/google/monitoring/v3/service_service.rb +28 -26
  30. data/proto_docs/google/monitoring/v3/uptime.rb +59 -1
  31. metadata +2 -2
@@ -31,6 +31,9 @@ module Google
31
31
  # controls how messages related to incidents are sent.
32
32
  #
33
33
  class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
34
37
  # @private
35
38
  DEFAULT_ENDPOINT_TEMPLATE = "monitoring.$UNIVERSE_DOMAIN$"
36
39
 
@@ -280,10 +283,11 @@ module Google
280
283
  # Customize the options with defaults
281
284
  metadata = @config.rpcs.list_notification_channel_descriptors.metadata.to_h
282
285
 
283
- # Set x-goog-api-client and x-goog-user-project headers
286
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
284
287
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
285
288
  lib_name: @config.lib_name, lib_version: @config.lib_version,
286
289
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
290
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
287
291
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
288
292
 
289
293
  header_params = {}
@@ -369,10 +373,11 @@ module Google
369
373
  # Customize the options with defaults
370
374
  metadata = @config.rpcs.get_notification_channel_descriptor.metadata.to_h
371
375
 
372
- # Set x-goog-api-client and x-goog-user-project headers
376
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
373
377
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
374
378
  lib_name: @config.lib_name, lib_version: @config.lib_version,
375
379
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
380
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
376
381
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
377
382
 
378
383
  header_params = {}
@@ -492,10 +497,11 @@ module Google
492
497
  # Customize the options with defaults
493
498
  metadata = @config.rpcs.list_notification_channels.metadata.to_h
494
499
 
495
- # Set x-goog-api-client and x-goog-user-project headers
500
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
496
501
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
497
502
  lib_name: @config.lib_name, lib_version: @config.lib_version,
498
503
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
504
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
499
505
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
500
506
 
501
507
  header_params = {}
@@ -584,10 +590,11 @@ module Google
584
590
  # Customize the options with defaults
585
591
  metadata = @config.rpcs.get_notification_channel.metadata.to_h
586
592
 
587
- # Set x-goog-api-client and x-goog-user-project headers
593
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
588
594
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
589
595
  lib_name: @config.lib_name, lib_version: @config.lib_version,
590
596
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
597
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
591
598
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
592
599
 
593
600
  header_params = {}
@@ -686,10 +693,11 @@ module Google
686
693
  # Customize the options with defaults
687
694
  metadata = @config.rpcs.create_notification_channel.metadata.to_h
688
695
 
689
- # Set x-goog-api-client and x-goog-user-project headers
696
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
690
697
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
691
698
  lib_name: @config.lib_name, lib_version: @config.lib_version,
692
699
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
700
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
693
701
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
694
702
 
695
703
  header_params = {}
@@ -782,10 +790,11 @@ module Google
782
790
  # Customize the options with defaults
783
791
  metadata = @config.rpcs.update_notification_channel.metadata.to_h
784
792
 
785
- # Set x-goog-api-client and x-goog-user-project headers
793
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
786
794
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
787
795
  lib_name: @config.lib_name, lib_version: @config.lib_version,
788
796
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
797
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
789
798
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
790
799
 
791
800
  header_params = {}
@@ -879,10 +888,11 @@ module Google
879
888
  # Customize the options with defaults
880
889
  metadata = @config.rpcs.delete_notification_channel.metadata.to_h
881
890
 
882
- # Set x-goog-api-client and x-goog-user-project headers
891
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
883
892
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
884
893
  lib_name: @config.lib_name, lib_version: @config.lib_version,
885
894
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
895
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
886
896
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
887
897
 
888
898
  header_params = {}
@@ -965,10 +975,11 @@ module Google
965
975
  # Customize the options with defaults
966
976
  metadata = @config.rpcs.send_notification_channel_verification_code.metadata.to_h
967
977
 
968
- # Set x-goog-api-client and x-goog-user-project headers
978
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
969
979
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
970
980
  lib_name: @config.lib_name, lib_version: @config.lib_version,
971
981
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
982
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
972
983
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
973
984
 
974
985
  header_params = {}
@@ -1082,10 +1093,11 @@ module Google
1082
1093
  # Customize the options with defaults
1083
1094
  metadata = @config.rpcs.get_notification_channel_verification_code.metadata.to_h
1084
1095
 
1085
- # Set x-goog-api-client and x-goog-user-project headers
1096
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1086
1097
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1087
1098
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1088
1099
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
1100
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1089
1101
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1090
1102
 
1091
1103
  header_params = {}
@@ -1177,10 +1189,11 @@ module Google
1177
1189
  # Customize the options with defaults
1178
1190
  metadata = @config.rpcs.verify_notification_channel.metadata.to_h
1179
1191
 
1180
- # Set x-goog-api-client and x-goog-user-project headers
1192
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1181
1193
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1182
1194
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1183
1195
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
1196
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1184
1197
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1185
1198
 
1186
1199
  header_params = {}
@@ -27,11 +27,14 @@ module Google
27
27
  ##
28
28
  # Client for the QueryService service.
29
29
  #
30
- # The QueryService API is used to manage time series data in Stackdriver
30
+ # The QueryService API is used to manage time series data in Cloud
31
31
  # Monitoring. Time series data is a collection of data points that describes
32
32
  # the time-varying values of a metric.
33
33
  #
34
34
  class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
35
38
  # @private
36
39
  DEFAULT_ENDPOINT_TEMPLATE = "monitoring.$UNIVERSE_DOMAIN$"
37
40
 
@@ -161,7 +164,7 @@ module Google
161
164
  # Service calls
162
165
 
163
166
  ##
164
- # Queries time series using Monitoring Query Language. This method does not require a Workspace.
167
+ # Queries time series using Monitoring Query Language.
165
168
  #
166
169
  # @overload query_time_series(request, options = nil)
167
170
  # Pass arguments to `query_time_series` via a request object, either of type
@@ -179,8 +182,9 @@ module Google
179
182
  # the default parameter values, pass an empty Hash as a request object (see above).
180
183
  #
181
184
  # @param name [::String]
182
- # Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on
183
- # which to execute the request. The format is:
185
+ # Required. The
186
+ # [project](https://cloud.google.com/monitoring/api/v3#project_name) on which
187
+ # to execute the request. The format is:
184
188
  #
185
189
  # projects/[PROJECT_ID_OR_NUMBER]
186
190
  # @param query [::String]
@@ -232,10 +236,11 @@ module Google
232
236
  # Customize the options with defaults
233
237
  metadata = @config.rpcs.query_time_series.metadata.to_h
234
238
 
235
- # Set x-goog-api-client and x-goog-user-project headers
239
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
236
240
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
237
241
  lib_name: @config.lib_name, lib_version: @config.lib_version,
238
242
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
243
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
239
244
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
240
245
 
241
246
  header_params = {}
@@ -30,7 +30,7 @@ module Google
30
30
  module Monitoring
31
31
  module V3
32
32
  ##
33
- # The QueryService API is used to manage time series data in Stackdriver
33
+ # The QueryService API is used to manage time series data in Cloud
34
34
  # Monitoring. Time series data is a collection of data points that describes
35
35
  # the time-varying values of a metric.
36
36
  #
@@ -28,11 +28,14 @@ module Google
28
28
  # Client for the ServiceMonitoringService service.
29
29
  #
30
30
  # The Cloud Monitoring Service-Oriented Monitoring API has endpoints for
31
- # managing and querying aspects of a workspace's services. These include the
32
- # `Service`'s monitored resources, its Service-Level Objectives, and a taxonomy
33
- # of categorized Health Metrics.
31
+ # managing and querying aspects of a Metrics Scope's services. These include
32
+ # the `Service`'s monitored resources, its Service-Level Objectives, and a
33
+ # taxonomy of categorized Health Metrics.
34
34
  #
35
35
  class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
36
39
  # @private
37
40
  DEFAULT_ENDPOINT_TEMPLATE = "monitoring.$UNIVERSE_DOMAIN$"
38
41
 
@@ -220,8 +223,9 @@ module Google
220
223
  # the default parameter values, pass an empty Hash as a request object (see above).
221
224
  #
222
225
  # @param parent [::String]
223
- # Required. Resource [name](https://cloud.google.com/monitoring/api/v3#project_name) of
224
- # the parent workspace. The format is:
226
+ # Required. Resource
227
+ # [name](https://cloud.google.com/monitoring/api/v3#project_name) of the
228
+ # parent Metrics Scope. The format is:
225
229
  #
226
230
  # projects/[PROJECT_ID_OR_NUMBER]
227
231
  # @param service_id [::String]
@@ -264,10 +268,11 @@ module Google
264
268
  # Customize the options with defaults
265
269
  metadata = @config.rpcs.create_service.metadata.to_h
266
270
 
267
- # Set x-goog-api-client and x-goog-user-project headers
271
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
268
272
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
269
273
  lib_name: @config.lib_name, lib_version: @config.lib_version,
270
274
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
275
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
271
276
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
272
277
 
273
278
  header_params = {}
@@ -351,10 +356,11 @@ module Google
351
356
  # Customize the options with defaults
352
357
  metadata = @config.rpcs.get_service.metadata.to_h
353
358
 
354
- # Set x-goog-api-client and x-goog-user-project headers
359
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
355
360
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
356
361
  lib_name: @config.lib_name, lib_version: @config.lib_version,
357
362
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
363
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
358
364
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
359
365
 
360
366
  header_params = {}
@@ -382,7 +388,7 @@ module Google
382
388
  end
383
389
 
384
390
  ##
385
- # List `Service`s for this workspace.
391
+ # List `Service`s for this Metrics Scope.
386
392
  #
387
393
  # @overload list_services(request, options = nil)
388
394
  # Pass arguments to `list_services` via a request object, either of type
@@ -400,32 +406,31 @@ module Google
400
406
  # the default parameter values, pass an empty Hash as a request object (see above).
401
407
  #
402
408
  # @param parent [::String]
403
- # Required. Resource name of the parent containing the listed services, either a
404
- # [project](https://cloud.google.com/monitoring/api/v3#project_name) or a
405
- # Monitoring Workspace. The formats are:
409
+ # Required. Resource name of the parent containing the listed services,
410
+ # either a [project](https://cloud.google.com/monitoring/api/v3#project_name)
411
+ # or a Monitoring Metrics Scope. The formats are:
406
412
  #
407
413
  # projects/[PROJECT_ID_OR_NUMBER]
408
414
  # workspaces/[HOST_PROJECT_ID_OR_NUMBER]
409
415
  # @param filter [::String]
410
- # A filter specifying what `Service`s to return. The filter currently
411
- # supports the following fields:
412
- #
413
- # - `identifier_case`
414
- # - `app_engine.module_id`
415
- # - `cloud_endpoints.service` (reserved for future use)
416
- # - `mesh_istio.mesh_uid`
417
- # - `mesh_istio.service_namespace`
418
- # - `mesh_istio.service_name`
419
- # - `cluster_istio.location` (deprecated)
420
- # - `cluster_istio.cluster_name` (deprecated)
421
- # - `cluster_istio.service_namespace` (deprecated)
422
- # - `cluster_istio.service_name` (deprecated)
423
- #
424
- # `identifier_case` refers to which option in the identifier oneof is
425
- # populated. For example, the filter `identifier_case = "CUSTOM"` would match
426
- # all services with a value for the `custom` field. Valid options are
427
- # "CUSTOM", "APP_ENGINE", "MESH_ISTIO", plus "CLUSTER_ISTIO" (deprecated)
428
- # and "CLOUD_ENDPOINTS" (reserved for future use).
416
+ # A filter specifying what `Service`s to return. The filter supports
417
+ # filtering on a particular service-identifier type or one of its attributes.
418
+ #
419
+ # To filter on a particular service-identifier type, the `identifier_case`
420
+ # refers to which option in the `identifier` field is populated. For example,
421
+ # the filter `identifier_case = "CUSTOM"` would match all services with a
422
+ # value for the `custom` field. Valid options include "CUSTOM", "APP_ENGINE",
423
+ # "MESH_ISTIO", and the other options listed at
424
+ # https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service
425
+ #
426
+ # To filter on an attribute of a service-identifier type, apply the filter
427
+ # name by using the snake case of the service-identifier type and the
428
+ # attribute of that service-identifier type, and join the two with a period.
429
+ # For example, to filter by the `meshUid` field of the `MeshIstio`
430
+ # service-identifier type, you must filter on `mesh_istio.mesh_uid =
431
+ # "123"` to match all services with mesh UID "123". Service-identifier types
432
+ # and their attributes are described at
433
+ # https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service
429
434
  # @param page_size [::Integer]
430
435
  # A non-negative number that is the maximum number of results to return.
431
436
  # When 0, use default page size.
@@ -472,10 +477,11 @@ module Google
472
477
  # Customize the options with defaults
473
478
  metadata = @config.rpcs.list_services.metadata.to_h
474
479
 
475
- # Set x-goog-api-client and x-goog-user-project headers
480
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
476
481
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
477
482
  lib_name: @config.lib_name, lib_version: @config.lib_version,
478
483
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
484
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
479
485
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
480
486
 
481
487
  header_params = {}
@@ -561,10 +567,11 @@ module Google
561
567
  # Customize the options with defaults
562
568
  metadata = @config.rpcs.update_service.metadata.to_h
563
569
 
564
- # Set x-goog-api-client and x-goog-user-project headers
570
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
565
571
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
566
572
  lib_name: @config.lib_name, lib_version: @config.lib_version,
567
573
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
574
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
568
575
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
569
576
 
570
577
  header_params = {}
@@ -648,10 +655,11 @@ module Google
648
655
  # Customize the options with defaults
649
656
  metadata = @config.rpcs.delete_service.metadata.to_h
650
657
 
651
- # Set x-goog-api-client and x-goog-user-project headers
658
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
652
659
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
653
660
  lib_name: @config.lib_name, lib_version: @config.lib_version,
654
661
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
662
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
655
663
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
656
664
 
657
665
  header_params = {}
@@ -703,7 +711,7 @@ module Google
703
711
  # @param service_level_objective_id [::String]
704
712
  # Optional. The ServiceLevelObjective id to use for this
705
713
  # ServiceLevelObjective. If omitted, an id will be generated instead. Must
706
- # match the pattern `[a-z0-9\-]+`
714
+ # match the pattern `^[a-zA-Z0-9-_:.]+$`
707
715
  # @param service_level_objective [::Google::Cloud::Monitoring::V3::ServiceLevelObjective, ::Hash]
708
716
  # Required. The `ServiceLevelObjective` to create.
709
717
  # The provided `name` will be respected if no `ServiceLevelObjective` exists
@@ -743,10 +751,11 @@ module Google
743
751
  # Customize the options with defaults
744
752
  metadata = @config.rpcs.create_service_level_objective.metadata.to_h
745
753
 
746
- # Set x-goog-api-client and x-goog-user-project headers
754
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
747
755
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
748
756
  lib_name: @config.lib_name, lib_version: @config.lib_version,
749
757
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
758
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
750
759
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
751
760
 
752
761
  header_params = {}
@@ -792,7 +801,8 @@ module Google
792
801
  # the default parameter values, pass an empty Hash as a request object (see above).
793
802
  #
794
803
  # @param name [::String]
795
- # Required. Resource name of the `ServiceLevelObjective` to get. The format is:
804
+ # Required. Resource name of the `ServiceLevelObjective` to get. The format
805
+ # is:
796
806
  #
797
807
  # projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
798
808
  # @param view [::Google::Cloud::Monitoring::V3::ServiceLevelObjective::View]
@@ -835,10 +845,11 @@ module Google
835
845
  # Customize the options with defaults
836
846
  metadata = @config.rpcs.get_service_level_objective.metadata.to_h
837
847
 
838
- # Set x-goog-api-client and x-goog-user-project headers
848
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
839
849
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
840
850
  lib_name: @config.lib_name, lib_version: @config.lib_version,
841
851
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
852
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
842
853
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
843
854
 
844
855
  header_params = {}
@@ -885,7 +896,7 @@ module Google
885
896
  #
886
897
  # @param parent [::String]
887
898
  # Required. Resource name of the parent containing the listed SLOs, either a
888
- # project or a Monitoring Workspace. The formats are:
899
+ # project or a Monitoring Metrics Scope. The formats are:
889
900
  #
890
901
  # projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
891
902
  # workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/-
@@ -942,10 +953,11 @@ module Google
942
953
  # Customize the options with defaults
943
954
  metadata = @config.rpcs.list_service_level_objectives.metadata.to_h
944
955
 
945
- # Set x-goog-api-client and x-goog-user-project headers
956
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
946
957
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
947
958
  lib_name: @config.lib_name, lib_version: @config.lib_version,
948
959
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
960
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
949
961
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
950
962
 
951
963
  header_params = {}
@@ -1031,10 +1043,11 @@ module Google
1031
1043
  # Customize the options with defaults
1032
1044
  metadata = @config.rpcs.update_service_level_objective.metadata.to_h
1033
1045
 
1034
- # Set x-goog-api-client and x-goog-user-project headers
1046
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1035
1047
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1036
1048
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1037
1049
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
1050
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1038
1051
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1039
1052
 
1040
1053
  header_params = {}
@@ -1080,7 +1093,8 @@ module Google
1080
1093
  # the default parameter values, pass an empty Hash as a request object (see above).
1081
1094
  #
1082
1095
  # @param name [::String]
1083
- # Required. Resource name of the `ServiceLevelObjective` to delete. The format is:
1096
+ # Required. Resource name of the `ServiceLevelObjective` to delete. The
1097
+ # format is:
1084
1098
  #
1085
1099
  # projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
1086
1100
  #
@@ -1118,10 +1132,11 @@ module Google
1118
1132
  # Customize the options with defaults
1119
1133
  metadata = @config.rpcs.delete_service_level_objective.metadata.to_h
1120
1134
 
1121
- # Set x-goog-api-client and x-goog-user-project headers
1135
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1122
1136
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1123
1137
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1124
1138
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
1139
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1125
1140
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1126
1141
 
1127
1142
  header_params = {}
@@ -32,9 +32,9 @@ module Google
32
32
  module V3
33
33
  ##
34
34
  # The Cloud Monitoring Service-Oriented Monitoring API has endpoints for
35
- # managing and querying aspects of a workspace's services. These include the
36
- # `Service`'s monitored resources, its Service-Level Objectives, and a taxonomy
37
- # of categorized Health Metrics.
35
+ # managing and querying aspects of a Metrics Scope's services. These include
36
+ # the `Service`'s monitored resources, its Service-Level Objectives, and a
37
+ # taxonomy of categorized Health Metrics.
38
38
  #
39
39
  # @example Load this service and instantiate a gRPC client
40
40
  #
@@ -32,6 +32,9 @@ module Google
32
32
  # or more alert policies should not fire alerts for the specified duration.
33
33
  #
34
34
  class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
35
38
  # @private
36
39
  DEFAULT_ENDPOINT_TEMPLATE = "monitoring.$UNIVERSE_DOMAIN$"
37
40
 
@@ -240,10 +243,11 @@ module Google
240
243
  # Customize the options with defaults
241
244
  metadata = @config.rpcs.create_snooze.metadata.to_h
242
245
 
243
- # Set x-goog-api-client and x-goog-user-project headers
246
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
244
247
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
245
248
  lib_name: @config.lib_name, lib_version: @config.lib_version,
246
249
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
250
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
247
251
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
248
252
 
249
253
  header_params = {}
@@ -356,10 +360,11 @@ module Google
356
360
  # Customize the options with defaults
357
361
  metadata = @config.rpcs.list_snoozes.metadata.to_h
358
362
 
359
- # Set x-goog-api-client and x-goog-user-project headers
363
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
360
364
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
361
365
  lib_name: @config.lib_name, lib_version: @config.lib_version,
362
366
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
367
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
363
368
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
364
369
 
365
370
  header_params = {}
@@ -444,10 +449,11 @@ module Google
444
449
  # Customize the options with defaults
445
450
  metadata = @config.rpcs.get_snooze.metadata.to_h
446
451
 
447
- # Set x-goog-api-client and x-goog-user-project headers
452
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
448
453
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
449
454
  lib_name: @config.lib_name, lib_version: @config.lib_version,
450
455
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
456
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
451
457
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
452
458
 
453
459
  header_params = {}
@@ -553,10 +559,11 @@ module Google
553
559
  # Customize the options with defaults
554
560
  metadata = @config.rpcs.update_snooze.metadata.to_h
555
561
 
556
- # Set x-goog-api-client and x-goog-user-project headers
562
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
557
563
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
558
564
  lib_name: @config.lib_name, lib_version: @config.lib_version,
559
565
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
566
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
560
567
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
561
568
 
562
569
  header_params = {}
@@ -37,6 +37,9 @@ module Google
37
37
  # Monitoring, and then clicking on "Uptime".
38
38
  #
39
39
  class Client
40
+ # @private
41
+ API_VERSION = ""
42
+
40
43
  # @private
41
44
  DEFAULT_ENDPOINT_TEMPLATE = "monitoring.$UNIVERSE_DOMAIN$"
42
45
 
@@ -270,10 +273,11 @@ module Google
270
273
  # Customize the options with defaults
271
274
  metadata = @config.rpcs.list_uptime_check_configs.metadata.to_h
272
275
 
273
- # Set x-goog-api-client and x-goog-user-project headers
276
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
274
277
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
275
278
  lib_name: @config.lib_name, lib_version: @config.lib_version,
276
279
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
280
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
277
281
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
278
282
 
279
283
  header_params = {}
@@ -358,10 +362,11 @@ module Google
358
362
  # Customize the options with defaults
359
363
  metadata = @config.rpcs.get_uptime_check_config.metadata.to_h
360
364
 
361
- # Set x-goog-api-client and x-goog-user-project headers
365
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
362
366
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
363
367
  lib_name: @config.lib_name, lib_version: @config.lib_version,
364
368
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
369
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
365
370
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
366
371
 
367
372
  header_params = {}
@@ -449,10 +454,11 @@ module Google
449
454
  # Customize the options with defaults
450
455
  metadata = @config.rpcs.create_uptime_check_config.metadata.to_h
451
456
 
452
- # Set x-goog-api-client and x-goog-user-project headers
457
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
453
458
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
454
459
  lib_name: @config.lib_name, lib_version: @config.lib_version,
455
460
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
461
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
456
462
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
457
463
 
458
464
  header_params = {}
@@ -552,10 +558,11 @@ module Google
552
558
  # Customize the options with defaults
553
559
  metadata = @config.rpcs.update_uptime_check_config.metadata.to_h
554
560
 
555
- # Set x-goog-api-client and x-goog-user-project headers
561
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
556
562
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
557
563
  lib_name: @config.lib_name, lib_version: @config.lib_version,
558
564
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
565
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
559
566
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
560
567
 
561
568
  header_params = {}
@@ -641,10 +648,11 @@ module Google
641
648
  # Customize the options with defaults
642
649
  metadata = @config.rpcs.delete_uptime_check_config.metadata.to_h
643
650
 
644
- # Set x-goog-api-client and x-goog-user-project headers
651
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
645
652
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
646
653
  lib_name: @config.lib_name, lib_version: @config.lib_version,
647
654
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
655
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
648
656
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
649
657
 
650
658
  header_params = {}
@@ -739,10 +747,11 @@ module Google
739
747
  # Customize the options with defaults
740
748
  metadata = @config.rpcs.list_uptime_check_ips.metadata.to_h
741
749
 
742
- # Set x-goog-api-client and x-goog-user-project headers
750
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
743
751
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
744
752
  lib_name: @config.lib_name, lib_version: @config.lib_version,
745
753
  gapic_version: ::Google::Cloud::Monitoring::V3::VERSION
754
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
746
755
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
747
756
 
748
757
  options.apply_defaults timeout: @config.rpcs.list_uptime_check_ips.timeout,
@@ -38,6 +38,25 @@ module Google
38
38
  "folders/#{folder}"
39
39
  end
40
40
 
41
+ ##
42
+ # Create a fully-qualified Function resource string.
43
+ #
44
+ # The resource will be in the following format:
45
+ #
46
+ # `projects/{project}/locations/{location}/functions/{function}`
47
+ #
48
+ # @param project [String]
49
+ # @param location [String]
50
+ # @param function [String]
51
+ #
52
+ # @return [::String]
53
+ def function_path project:, location:, function:
54
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
55
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
56
+
57
+ "projects/#{project}/locations/#{location}/functions/#{function}"
58
+ end
59
+
41
60
  ##
42
61
  # Create a fully-qualified Organization resource string.
43
62
  #