google-cloud-monitoring-v3 0.4.1 → 0.6.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.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/monitoring/v3/alert_policy_service/client.rb +52 -56
- data/lib/google/cloud/monitoring/v3/alert_policy_service/paths.rb +14 -0
- data/lib/google/cloud/monitoring/v3/group_service/client.rb +58 -66
- data/lib/google/cloud/monitoring/v3/group_service/paths.rb +14 -0
- data/lib/google/cloud/monitoring/v3/metric_service/client.rb +166 -75
- data/lib/google/cloud/monitoring/v3/notification_channel_service/client.rb +75 -79
- data/lib/google/cloud/monitoring/v3/notification_channel_service/paths.rb +14 -0
- data/lib/google/cloud/monitoring/v3/query_service/client.rb +35 -39
- data/lib/google/cloud/monitoring/v3/service_monitoring_service/client.rb +70 -73
- data/lib/google/cloud/monitoring/v3/service_monitoring_service/paths.rb +14 -0
- data/lib/google/cloud/monitoring/v3/uptime_check_service/client.rb +56 -61
- data/lib/google/cloud/monitoring/v3/uptime_check_service/paths.rb +14 -0
- 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/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/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 +12 -0
- 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/query_service_pb.rb +2 -2
- 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/uptime_pb.rb +2 -2
- data/lib/google/monitoring/v3/uptime_service_pb.rb +3 -2
- data/proto_docs/google/api/distribution.rb +2 -2
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/api/launch_stage.rb +7 -1
- data/proto_docs/google/api/metric.rb +109 -36
- data/proto_docs/google/api/monitored_resource.rb +7 -6
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/monitoring/v3/alert.rb +68 -3
- data/proto_docs/google/monitoring/v3/alert_service.rb +4 -2
- data/proto_docs/google/monitoring/v3/common.rb +17 -5
- data/proto_docs/google/monitoring/v3/group_service.rb +4 -2
- data/proto_docs/google/monitoring/v3/metric.rb +3 -1
- data/proto_docs/google/monitoring/v3/metric_service.rb +13 -8
- data/proto_docs/google/monitoring/v3/notification_service.rb +8 -4
- data/proto_docs/google/monitoring/v3/service.rb +38 -6
- data/proto_docs/google/monitoring/v3/service_service.rb +4 -2
- data/proto_docs/google/monitoring/v3/span_context.rb +2 -2
- data/proto_docs/google/monitoring/v3/uptime.rb +5 -2
- data/proto_docs/google/monitoring/v3/uptime_service.rb +4 -2
- metadata +5 -4
@@ -44,13 +44,12 @@ module Google
|
|
44
44
|
# See {::Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client::Configuration}
|
45
45
|
# for a description of the configuration fields.
|
46
46
|
#
|
47
|
-
#
|
47
|
+
# @example
|
48
48
|
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
# end
|
49
|
+
# # Modify the configuration for all ServiceMonitoringService clients
|
50
|
+
# ::Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.configure do |config|
|
51
|
+
# config.timeout = 10.0
|
52
|
+
# end
|
54
53
|
#
|
55
54
|
# @yield [config] Configure the Client client.
|
56
55
|
# @yieldparam config [Client::Configuration]
|
@@ -72,56 +71,38 @@ module Google
|
|
72
71
|
|
73
72
|
default_config.rpcs.get_service.timeout = 30.0
|
74
73
|
default_config.rpcs.get_service.retry_policy = {
|
75
|
-
initial_delay: 0.1,
|
76
|
-
max_delay: 30.0,
|
77
|
-
multiplier: 1.3,
|
78
|
-
retry_codes: [4, 14]
|
74
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
79
75
|
}
|
80
76
|
|
81
77
|
default_config.rpcs.list_services.timeout = 30.0
|
82
78
|
default_config.rpcs.list_services.retry_policy = {
|
83
|
-
initial_delay: 0.1,
|
84
|
-
max_delay: 30.0,
|
85
|
-
multiplier: 1.3,
|
86
|
-
retry_codes: [4, 14]
|
79
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
87
80
|
}
|
88
81
|
|
89
82
|
default_config.rpcs.update_service.timeout = 30.0
|
90
83
|
|
91
84
|
default_config.rpcs.delete_service.timeout = 30.0
|
92
85
|
default_config.rpcs.delete_service.retry_policy = {
|
93
|
-
initial_delay: 0.1,
|
94
|
-
max_delay: 30.0,
|
95
|
-
multiplier: 1.3,
|
96
|
-
retry_codes: [4, 14]
|
86
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
97
87
|
}
|
98
88
|
|
99
89
|
default_config.rpcs.create_service_level_objective.timeout = 30.0
|
100
90
|
|
101
91
|
default_config.rpcs.get_service_level_objective.timeout = 30.0
|
102
92
|
default_config.rpcs.get_service_level_objective.retry_policy = {
|
103
|
-
initial_delay: 0.1,
|
104
|
-
max_delay: 30.0,
|
105
|
-
multiplier: 1.3,
|
106
|
-
retry_codes: [4, 14]
|
93
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
107
94
|
}
|
108
95
|
|
109
96
|
default_config.rpcs.list_service_level_objectives.timeout = 30.0
|
110
97
|
default_config.rpcs.list_service_level_objectives.retry_policy = {
|
111
|
-
initial_delay: 0.1,
|
112
|
-
max_delay: 30.0,
|
113
|
-
multiplier: 1.3,
|
114
|
-
retry_codes: [4, 14]
|
98
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
115
99
|
}
|
116
100
|
|
117
101
|
default_config.rpcs.update_service_level_objective.timeout = 30.0
|
118
102
|
|
119
103
|
default_config.rpcs.delete_service_level_objective.timeout = 30.0
|
120
104
|
default_config.rpcs.delete_service_level_objective.retry_policy = {
|
121
|
-
initial_delay: 0.1,
|
122
|
-
max_delay: 30.0,
|
123
|
-
multiplier: 1.3,
|
124
|
-
retry_codes: [4, 14]
|
105
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
125
106
|
}
|
126
107
|
|
127
108
|
default_config
|
@@ -153,19 +134,15 @@ module Google
|
|
153
134
|
##
|
154
135
|
# Create a new ServiceMonitoringService client object.
|
155
136
|
#
|
156
|
-
#
|
157
|
-
#
|
158
|
-
# To create a new ServiceMonitoringService client with the default
|
159
|
-
# configuration:
|
160
|
-
#
|
161
|
-
# client = ::Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
|
137
|
+
# @example
|
162
138
|
#
|
163
|
-
#
|
164
|
-
#
|
139
|
+
# # Create a client using the default configuration
|
140
|
+
# client = ::Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new
|
165
141
|
#
|
166
|
-
#
|
167
|
-
#
|
168
|
-
#
|
142
|
+
# # Create a client using a custom configuration
|
143
|
+
# client = ::Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new do |config|
|
144
|
+
# config.timeout = 10.0
|
145
|
+
# end
|
169
146
|
#
|
170
147
|
# @yield [config] Configure the ServiceMonitoringService client.
|
171
148
|
# @yieldparam config [Client::Configuration]
|
@@ -185,14 +162,13 @@ module Google
|
|
185
162
|
|
186
163
|
# Create credentials
|
187
164
|
credentials = @config.credentials
|
188
|
-
# Use self-signed JWT if the
|
165
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
189
166
|
# but only if the default endpoint does not have a region prefix.
|
190
|
-
enable_self_signed_jwt = @config.
|
191
|
-
@config.endpoint == Client.configure.endpoint &&
|
167
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
192
168
|
!@config.endpoint.split(".").first.include?("-")
|
193
169
|
credentials ||= Credentials.default scope: @config.scope,
|
194
170
|
enable_self_signed_jwt: enable_self_signed_jwt
|
195
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
171
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
196
172
|
credentials = Credentials.new credentials, scope: @config.scope
|
197
173
|
end
|
198
174
|
@quota_project_id = @config.quota_project
|
@@ -228,7 +204,8 @@ module Google
|
|
228
204
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
229
205
|
#
|
230
206
|
# @param parent [::String]
|
231
|
-
# Required. Resource name of
|
207
|
+
# Required. Resource [name](https://cloud.google.com/monitoring/api/v3#project_name) of
|
208
|
+
# the parent workspace. The format is:
|
232
209
|
#
|
233
210
|
# projects/[PROJECT_ID_OR_NUMBER]
|
234
211
|
# @param service_id [::String]
|
@@ -271,7 +248,9 @@ module Google
|
|
271
248
|
options.apply_defaults timeout: @config.rpcs.create_service.timeout,
|
272
249
|
metadata: metadata,
|
273
250
|
retry_policy: @config.rpcs.create_service.retry_policy
|
274
|
-
|
251
|
+
|
252
|
+
options.apply_defaults timeout: @config.timeout,
|
253
|
+
metadata: @config.metadata,
|
275
254
|
retry_policy: @config.retry_policy
|
276
255
|
|
277
256
|
@service_monitoring_service_stub.call_rpc :create_service, request, options: options do |response, operation|
|
@@ -339,7 +318,9 @@ module Google
|
|
339
318
|
options.apply_defaults timeout: @config.rpcs.get_service.timeout,
|
340
319
|
metadata: metadata,
|
341
320
|
retry_policy: @config.rpcs.get_service.retry_policy
|
342
|
-
|
321
|
+
|
322
|
+
options.apply_defaults timeout: @config.timeout,
|
323
|
+
metadata: @config.metadata,
|
343
324
|
retry_policy: @config.retry_policy
|
344
325
|
|
345
326
|
@service_monitoring_service_stub.call_rpc :get_service, request, options: options do |response, operation|
|
@@ -370,7 +351,8 @@ module Google
|
|
370
351
|
#
|
371
352
|
# @param parent [::String]
|
372
353
|
# Required. Resource name of the parent containing the listed services, either a
|
373
|
-
# project or a
|
354
|
+
# [project](https://cloud.google.com/monitoring/api/v3#project_name) or a
|
355
|
+
# Monitoring Workspace. The formats are:
|
374
356
|
#
|
375
357
|
# projects/[PROJECT_ID_OR_NUMBER]
|
376
358
|
# workspaces/[HOST_PROJECT_ID_OR_NUMBER]
|
@@ -436,7 +418,9 @@ module Google
|
|
436
418
|
options.apply_defaults timeout: @config.rpcs.list_services.timeout,
|
437
419
|
metadata: metadata,
|
438
420
|
retry_policy: @config.rpcs.list_services.retry_policy
|
439
|
-
|
421
|
+
|
422
|
+
options.apply_defaults timeout: @config.timeout,
|
423
|
+
metadata: @config.metadata,
|
440
424
|
retry_policy: @config.retry_policy
|
441
425
|
|
442
426
|
@service_monitoring_service_stub.call_rpc :list_services, request, options: options do |response, operation|
|
@@ -506,7 +490,9 @@ module Google
|
|
506
490
|
options.apply_defaults timeout: @config.rpcs.update_service.timeout,
|
507
491
|
metadata: metadata,
|
508
492
|
retry_policy: @config.rpcs.update_service.retry_policy
|
509
|
-
|
493
|
+
|
494
|
+
options.apply_defaults timeout: @config.timeout,
|
495
|
+
metadata: @config.metadata,
|
510
496
|
retry_policy: @config.retry_policy
|
511
497
|
|
512
498
|
@service_monitoring_service_stub.call_rpc :update_service, request, options: options do |response, operation|
|
@@ -574,7 +560,9 @@ module Google
|
|
574
560
|
options.apply_defaults timeout: @config.rpcs.delete_service.timeout,
|
575
561
|
metadata: metadata,
|
576
562
|
retry_policy: @config.rpcs.delete_service.retry_policy
|
577
|
-
|
563
|
+
|
564
|
+
options.apply_defaults timeout: @config.timeout,
|
565
|
+
metadata: @config.metadata,
|
578
566
|
retry_policy: @config.retry_policy
|
579
567
|
|
580
568
|
@service_monitoring_service_stub.call_rpc :delete_service, request, options: options do |response, operation|
|
@@ -650,7 +638,9 @@ module Google
|
|
650
638
|
options.apply_defaults timeout: @config.rpcs.create_service_level_objective.timeout,
|
651
639
|
metadata: metadata,
|
652
640
|
retry_policy: @config.rpcs.create_service_level_objective.retry_policy
|
653
|
-
|
641
|
+
|
642
|
+
options.apply_defaults timeout: @config.timeout,
|
643
|
+
metadata: @config.metadata,
|
654
644
|
retry_policy: @config.retry_policy
|
655
645
|
|
656
646
|
@service_monitoring_service_stub.call_rpc :create_service_level_objective, request, options: options do |response, operation|
|
@@ -723,7 +713,9 @@ module Google
|
|
723
713
|
options.apply_defaults timeout: @config.rpcs.get_service_level_objective.timeout,
|
724
714
|
metadata: metadata,
|
725
715
|
retry_policy: @config.rpcs.get_service_level_objective.retry_policy
|
726
|
-
|
716
|
+
|
717
|
+
options.apply_defaults timeout: @config.timeout,
|
718
|
+
metadata: @config.metadata,
|
727
719
|
retry_policy: @config.retry_policy
|
728
720
|
|
729
721
|
@service_monitoring_service_stub.call_rpc :get_service_level_objective, request, options: options do |response, operation|
|
@@ -807,7 +799,9 @@ module Google
|
|
807
799
|
options.apply_defaults timeout: @config.rpcs.list_service_level_objectives.timeout,
|
808
800
|
metadata: metadata,
|
809
801
|
retry_policy: @config.rpcs.list_service_level_objectives.retry_policy
|
810
|
-
|
802
|
+
|
803
|
+
options.apply_defaults timeout: @config.timeout,
|
804
|
+
metadata: @config.metadata,
|
811
805
|
retry_policy: @config.retry_policy
|
812
806
|
|
813
807
|
@service_monitoring_service_stub.call_rpc :list_service_level_objectives, request, options: options do |response, operation|
|
@@ -877,7 +871,9 @@ module Google
|
|
877
871
|
options.apply_defaults timeout: @config.rpcs.update_service_level_objective.timeout,
|
878
872
|
metadata: metadata,
|
879
873
|
retry_policy: @config.rpcs.update_service_level_objective.retry_policy
|
880
|
-
|
874
|
+
|
875
|
+
options.apply_defaults timeout: @config.timeout,
|
876
|
+
metadata: @config.metadata,
|
881
877
|
retry_policy: @config.retry_policy
|
882
878
|
|
883
879
|
@service_monitoring_service_stub.call_rpc :update_service_level_objective, request, options: options do |response, operation|
|
@@ -945,7 +941,9 @@ module Google
|
|
945
941
|
options.apply_defaults timeout: @config.rpcs.delete_service_level_objective.timeout,
|
946
942
|
metadata: metadata,
|
947
943
|
retry_policy: @config.rpcs.delete_service_level_objective.retry_policy
|
948
|
-
|
944
|
+
|
945
|
+
options.apply_defaults timeout: @config.timeout,
|
946
|
+
metadata: @config.metadata,
|
949
947
|
retry_policy: @config.retry_policy
|
950
948
|
|
951
949
|
@service_monitoring_service_stub.call_rpc :delete_service_level_objective, request, options: options do |response, operation|
|
@@ -969,22 +967,21 @@ module Google
|
|
969
967
|
# Configuration can be applied globally to all clients, or to a single client
|
970
968
|
# on construction.
|
971
969
|
#
|
972
|
-
#
|
973
|
-
#
|
974
|
-
#
|
975
|
-
# to 20 seconds,
|
976
|
-
#
|
977
|
-
#
|
978
|
-
#
|
979
|
-
#
|
980
|
-
#
|
981
|
-
#
|
982
|
-
#
|
983
|
-
#
|
984
|
-
#
|
985
|
-
#
|
986
|
-
#
|
987
|
-
# end
|
970
|
+
# @example
|
971
|
+
#
|
972
|
+
# # Modify the global config, setting the timeout for
|
973
|
+
# # create_service to 20 seconds,
|
974
|
+
# # and all remaining timeouts to 10 seconds.
|
975
|
+
# ::Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.configure do |config|
|
976
|
+
# config.timeout = 10.0
|
977
|
+
# config.rpcs.create_service.timeout = 20.0
|
978
|
+
# end
|
979
|
+
#
|
980
|
+
# # Apply the above configuration only to a new client.
|
981
|
+
# client = ::Google::Cloud::Monitoring::V3::ServiceMonitoringService::Client.new do |config|
|
982
|
+
# config.timeout = 10.0
|
983
|
+
# config.rpcs.create_service.timeout = 20.0
|
984
|
+
# end
|
988
985
|
#
|
989
986
|
# @!attribute [rw] endpoint
|
990
987
|
# The hostname or hostname:port of the service endpoint.
|
@@ -52,6 +52,20 @@ module Google
|
|
52
52
|
"organizations/#{organization}"
|
53
53
|
end
|
54
54
|
|
55
|
+
##
|
56
|
+
# Create a fully-qualified Project resource string.
|
57
|
+
#
|
58
|
+
# The resource will be in the following format:
|
59
|
+
#
|
60
|
+
# `projects/{project}`
|
61
|
+
#
|
62
|
+
# @param project [String]
|
63
|
+
#
|
64
|
+
# @return [::String]
|
65
|
+
def project_path project:
|
66
|
+
"projects/#{project}"
|
67
|
+
end
|
68
|
+
|
55
69
|
##
|
56
70
|
# Create a fully-qualified Service resource string.
|
57
71
|
#
|
@@ -48,13 +48,12 @@ module Google
|
|
48
48
|
# See {::Google::Cloud::Monitoring::V3::UptimeCheckService::Client::Configuration}
|
49
49
|
# for a description of the configuration fields.
|
50
50
|
#
|
51
|
-
#
|
51
|
+
# @example
|
52
52
|
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
# end
|
53
|
+
# # Modify the configuration for all UptimeCheckService clients
|
54
|
+
# ::Google::Cloud::Monitoring::V3::UptimeCheckService::Client.configure do |config|
|
55
|
+
# config.timeout = 10.0
|
56
|
+
# end
|
58
57
|
#
|
59
58
|
# @yield [config] Configure the Client client.
|
60
59
|
# @yieldparam config [Client::Configuration]
|
@@ -74,18 +73,12 @@ module Google
|
|
74
73
|
|
75
74
|
default_config.rpcs.list_uptime_check_configs.timeout = 30.0
|
76
75
|
default_config.rpcs.list_uptime_check_configs.retry_policy = {
|
77
|
-
initial_delay: 0.1,
|
78
|
-
max_delay: 30.0,
|
79
|
-
multiplier: 1.3,
|
80
|
-
retry_codes: [4, 14]
|
76
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
81
77
|
}
|
82
78
|
|
83
79
|
default_config.rpcs.get_uptime_check_config.timeout = 30.0
|
84
80
|
default_config.rpcs.get_uptime_check_config.retry_policy = {
|
85
|
-
initial_delay: 0.1,
|
86
|
-
max_delay: 30.0,
|
87
|
-
multiplier: 1.3,
|
88
|
-
retry_codes: [4, 14]
|
81
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
89
82
|
}
|
90
83
|
|
91
84
|
default_config.rpcs.create_uptime_check_config.timeout = 30.0
|
@@ -94,18 +87,12 @@ module Google
|
|
94
87
|
|
95
88
|
default_config.rpcs.delete_uptime_check_config.timeout = 30.0
|
96
89
|
default_config.rpcs.delete_uptime_check_config.retry_policy = {
|
97
|
-
initial_delay: 0.1,
|
98
|
-
max_delay: 30.0,
|
99
|
-
multiplier: 1.3,
|
100
|
-
retry_codes: [4, 14]
|
90
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
101
91
|
}
|
102
92
|
|
103
93
|
default_config.rpcs.list_uptime_check_ips.timeout = 30.0
|
104
94
|
default_config.rpcs.list_uptime_check_ips.retry_policy = {
|
105
|
-
initial_delay: 0.1,
|
106
|
-
max_delay: 30.0,
|
107
|
-
multiplier: 1.3,
|
108
|
-
retry_codes: [4, 14]
|
95
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
|
109
96
|
}
|
110
97
|
|
111
98
|
default_config
|
@@ -137,19 +124,15 @@ module Google
|
|
137
124
|
##
|
138
125
|
# Create a new UptimeCheckService client object.
|
139
126
|
#
|
140
|
-
#
|
141
|
-
#
|
142
|
-
# To create a new UptimeCheckService client with the default
|
143
|
-
# configuration:
|
127
|
+
# @example
|
144
128
|
#
|
145
|
-
#
|
129
|
+
# # Create a client using the default configuration
|
130
|
+
# client = ::Google::Cloud::Monitoring::V3::UptimeCheckService::Client.new
|
146
131
|
#
|
147
|
-
#
|
148
|
-
#
|
149
|
-
#
|
150
|
-
#
|
151
|
-
# config.timeout = 10.0
|
152
|
-
# end
|
132
|
+
# # Create a client using a custom configuration
|
133
|
+
# client = ::Google::Cloud::Monitoring::V3::UptimeCheckService::Client.new do |config|
|
134
|
+
# config.timeout = 10.0
|
135
|
+
# end
|
153
136
|
#
|
154
137
|
# @yield [config] Configure the UptimeCheckService client.
|
155
138
|
# @yieldparam config [Client::Configuration]
|
@@ -169,14 +152,13 @@ module Google
|
|
169
152
|
|
170
153
|
# Create credentials
|
171
154
|
credentials = @config.credentials
|
172
|
-
# Use self-signed JWT if the
|
155
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
173
156
|
# but only if the default endpoint does not have a region prefix.
|
174
|
-
enable_self_signed_jwt = @config.
|
175
|
-
@config.endpoint == Client.configure.endpoint &&
|
157
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
176
158
|
!@config.endpoint.split(".").first.include?("-")
|
177
159
|
credentials ||= Credentials.default scope: @config.scope,
|
178
160
|
enable_self_signed_jwt: enable_self_signed_jwt
|
179
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
161
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
180
162
|
credentials = Credentials.new credentials, scope: @config.scope
|
181
163
|
end
|
182
164
|
@quota_project_id = @config.quota_project
|
@@ -213,7 +195,8 @@ module Google
|
|
213
195
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
214
196
|
#
|
215
197
|
# @param parent [::String]
|
216
|
-
# Required. The project
|
198
|
+
# Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name)
|
199
|
+
# whose Uptime check configurations are listed. The format is:
|
217
200
|
#
|
218
201
|
# projects/[PROJECT_ID_OR_NUMBER]
|
219
202
|
# @param page_size [::Integer]
|
@@ -260,7 +243,9 @@ module Google
|
|
260
243
|
options.apply_defaults timeout: @config.rpcs.list_uptime_check_configs.timeout,
|
261
244
|
metadata: metadata,
|
262
245
|
retry_policy: @config.rpcs.list_uptime_check_configs.retry_policy
|
263
|
-
|
246
|
+
|
247
|
+
options.apply_defaults timeout: @config.timeout,
|
248
|
+
metadata: @config.metadata,
|
264
249
|
retry_policy: @config.retry_policy
|
265
250
|
|
266
251
|
@uptime_check_service_stub.call_rpc :list_uptime_check_configs, request, options: options do |response, operation|
|
@@ -329,7 +314,9 @@ module Google
|
|
329
314
|
options.apply_defaults timeout: @config.rpcs.get_uptime_check_config.timeout,
|
330
315
|
metadata: metadata,
|
331
316
|
retry_policy: @config.rpcs.get_uptime_check_config.retry_policy
|
332
|
-
|
317
|
+
|
318
|
+
options.apply_defaults timeout: @config.timeout,
|
319
|
+
metadata: @config.metadata,
|
333
320
|
retry_policy: @config.retry_policy
|
334
321
|
|
335
322
|
@uptime_check_service_stub.call_rpc :get_uptime_check_config, request, options: options do |response, operation|
|
@@ -359,7 +346,8 @@ module Google
|
|
359
346
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
360
347
|
#
|
361
348
|
# @param parent [::String]
|
362
|
-
# Required. The project in
|
349
|
+
# Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) in
|
350
|
+
# which to create the Uptime check. The format is:
|
363
351
|
#
|
364
352
|
# projects/[PROJECT_ID_OR_NUMBER]
|
365
353
|
# @param uptime_check_config [::Google::Cloud::Monitoring::V3::UptimeCheckConfig, ::Hash]
|
@@ -399,7 +387,9 @@ module Google
|
|
399
387
|
options.apply_defaults timeout: @config.rpcs.create_uptime_check_config.timeout,
|
400
388
|
metadata: metadata,
|
401
389
|
retry_policy: @config.rpcs.create_uptime_check_config.retry_policy
|
402
|
-
|
390
|
+
|
391
|
+
options.apply_defaults timeout: @config.timeout,
|
392
|
+
metadata: @config.metadata,
|
403
393
|
retry_policy: @config.retry_policy
|
404
394
|
|
405
395
|
@uptime_check_service_stub.call_rpc :create_uptime_check_config, request, options: options do |response, operation|
|
@@ -483,7 +473,9 @@ module Google
|
|
483
473
|
options.apply_defaults timeout: @config.rpcs.update_uptime_check_config.timeout,
|
484
474
|
metadata: metadata,
|
485
475
|
retry_policy: @config.rpcs.update_uptime_check_config.retry_policy
|
486
|
-
|
476
|
+
|
477
|
+
options.apply_defaults timeout: @config.timeout,
|
478
|
+
metadata: @config.metadata,
|
487
479
|
retry_policy: @config.retry_policy
|
488
480
|
|
489
481
|
@uptime_check_service_stub.call_rpc :update_uptime_check_config, request, options: options do |response, operation|
|
@@ -553,7 +545,9 @@ module Google
|
|
553
545
|
options.apply_defaults timeout: @config.rpcs.delete_uptime_check_config.timeout,
|
554
546
|
metadata: metadata,
|
555
547
|
retry_policy: @config.rpcs.delete_uptime_check_config.retry_policy
|
556
|
-
|
548
|
+
|
549
|
+
options.apply_defaults timeout: @config.timeout,
|
550
|
+
metadata: @config.metadata,
|
557
551
|
retry_policy: @config.retry_policy
|
558
552
|
|
559
553
|
@uptime_check_service_stub.call_rpc :delete_uptime_check_config, request, options: options do |response, operation|
|
@@ -622,7 +616,9 @@ module Google
|
|
622
616
|
options.apply_defaults timeout: @config.rpcs.list_uptime_check_ips.timeout,
|
623
617
|
metadata: metadata,
|
624
618
|
retry_policy: @config.rpcs.list_uptime_check_ips.retry_policy
|
625
|
-
|
619
|
+
|
620
|
+
options.apply_defaults timeout: @config.timeout,
|
621
|
+
metadata: @config.metadata,
|
626
622
|
retry_policy: @config.retry_policy
|
627
623
|
|
628
624
|
@uptime_check_service_stub.call_rpc :list_uptime_check_ips, request, options: options do |response, operation|
|
@@ -647,22 +643,21 @@ module Google
|
|
647
643
|
# Configuration can be applied globally to all clients, or to a single client
|
648
644
|
# on construction.
|
649
645
|
#
|
650
|
-
#
|
651
|
-
#
|
652
|
-
#
|
653
|
-
# to 20 seconds,
|
654
|
-
#
|
655
|
-
#
|
656
|
-
#
|
657
|
-
#
|
658
|
-
#
|
659
|
-
#
|
660
|
-
#
|
661
|
-
#
|
662
|
-
#
|
663
|
-
#
|
664
|
-
#
|
665
|
-
# end
|
646
|
+
# @example
|
647
|
+
#
|
648
|
+
# # Modify the global config, setting the timeout for
|
649
|
+
# # list_uptime_check_configs to 20 seconds,
|
650
|
+
# # and all remaining timeouts to 10 seconds.
|
651
|
+
# ::Google::Cloud::Monitoring::V3::UptimeCheckService::Client.configure do |config|
|
652
|
+
# config.timeout = 10.0
|
653
|
+
# config.rpcs.list_uptime_check_configs.timeout = 20.0
|
654
|
+
# end
|
655
|
+
#
|
656
|
+
# # Apply the above configuration only to a new client.
|
657
|
+
# client = ::Google::Cloud::Monitoring::V3::UptimeCheckService::Client.new do |config|
|
658
|
+
# config.timeout = 10.0
|
659
|
+
# config.rpcs.list_uptime_check_configs.timeout = 20.0
|
660
|
+
# end
|
666
661
|
#
|
667
662
|
# @!attribute [rw] endpoint
|
668
663
|
# The hostname or hostname:port of the service endpoint.
|
@@ -52,6 +52,20 @@ module Google
|
|
52
52
|
"organizations/#{organization}"
|
53
53
|
end
|
54
54
|
|
55
|
+
##
|
56
|
+
# Create a fully-qualified Project resource string.
|
57
|
+
#
|
58
|
+
# The resource will be in the following format:
|
59
|
+
#
|
60
|
+
# `projects/{project}`
|
61
|
+
#
|
62
|
+
# @param project [String]
|
63
|
+
#
|
64
|
+
# @return [::String]
|
65
|
+
def project_path project:
|
66
|
+
"projects/#{project}"
|
67
|
+
end
|
68
|
+
|
55
69
|
##
|
56
70
|
# Create a fully-qualified UptimeCheckConfig resource string.
|
57
71
|
#
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/monitoring/v3/alert.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/field_behavior_pb'
|
7
5
|
require 'google/api/resource_pb'
|
8
6
|
require 'google/monitoring/v3/common_pb'
|
@@ -10,6 +8,8 @@ require 'google/monitoring/v3/mutation_record_pb'
|
|
10
8
|
require 'google/protobuf/duration_pb'
|
11
9
|
require 'google/protobuf/wrappers_pb'
|
12
10
|
require 'google/rpc/status_pb'
|
11
|
+
require 'google/protobuf'
|
12
|
+
|
13
13
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
14
|
add_file("google/monitoring/v3/alert.proto", :syntax => :proto3) do
|
15
15
|
add_message "google.monitoring.v3.AlertPolicy" do
|
@@ -24,6 +24,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
24
24
|
repeated :notification_channels, :string, 14
|
25
25
|
optional :creation_record, :message, 10, "google.monitoring.v3.MutationRecord"
|
26
26
|
optional :mutation_record, :message, 11, "google.monitoring.v3.MutationRecord"
|
27
|
+
optional :alert_strategy, :message, 21, "google.monitoring.v3.AlertPolicy.AlertStrategy"
|
27
28
|
end
|
28
29
|
add_message "google.monitoring.v3.AlertPolicy.Documentation" do
|
29
30
|
optional :content, :string, 1
|
@@ -35,6 +36,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
35
36
|
oneof :condition do
|
36
37
|
optional :condition_threshold, :message, 1, "google.monitoring.v3.AlertPolicy.Condition.MetricThreshold"
|
37
38
|
optional :condition_absent, :message, 2, "google.monitoring.v3.AlertPolicy.Condition.MetricAbsence"
|
39
|
+
optional :condition_matched_log, :message, 20, "google.monitoring.v3.AlertPolicy.Condition.LogMatch"
|
38
40
|
optional :condition_monitoring_query_language, :message, 19, "google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition"
|
39
41
|
end
|
40
42
|
end
|
@@ -60,11 +62,21 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
60
62
|
optional :duration, :message, 2, "google.protobuf.Duration"
|
61
63
|
optional :trigger, :message, 3, "google.monitoring.v3.AlertPolicy.Condition.Trigger"
|
62
64
|
end
|
65
|
+
add_message "google.monitoring.v3.AlertPolicy.Condition.LogMatch" do
|
66
|
+
optional :filter, :string, 1
|
67
|
+
map :label_extractors, :string, :string, 2
|
68
|
+
end
|
63
69
|
add_message "google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition" do
|
64
70
|
optional :query, :string, 1
|
65
71
|
optional :duration, :message, 2, "google.protobuf.Duration"
|
66
72
|
optional :trigger, :message, 3, "google.monitoring.v3.AlertPolicy.Condition.Trigger"
|
67
73
|
end
|
74
|
+
add_message "google.monitoring.v3.AlertPolicy.AlertStrategy" do
|
75
|
+
optional :notification_rate_limit, :message, 1, "google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit"
|
76
|
+
end
|
77
|
+
add_message "google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit" do
|
78
|
+
optional :period, :message, 1, "google.protobuf.Duration"
|
79
|
+
end
|
68
80
|
add_enum "google.monitoring.v3.AlertPolicy.ConditionCombinerType" do
|
69
81
|
value :COMBINE_UNSPECIFIED, 0
|
70
82
|
value :AND, 1
|
@@ -84,7 +96,10 @@ module Google
|
|
84
96
|
AlertPolicy::Condition::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.Condition.Trigger").msgclass
|
85
97
|
AlertPolicy::Condition::MetricThreshold = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.Condition.MetricThreshold").msgclass
|
86
98
|
AlertPolicy::Condition::MetricAbsence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.Condition.MetricAbsence").msgclass
|
99
|
+
AlertPolicy::Condition::LogMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.Condition.LogMatch").msgclass
|
87
100
|
AlertPolicy::Condition::MonitoringQueryLanguageCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition").msgclass
|
101
|
+
AlertPolicy::AlertStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.AlertStrategy").msgclass
|
102
|
+
AlertPolicy::AlertStrategy::NotificationRateLimit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit").msgclass
|
88
103
|
AlertPolicy::ConditionCombinerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.ConditionCombinerType").enummodule
|
89
104
|
end
|
90
105
|
end
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/monitoring/v3/alert_service.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
|
|
10
8
|
require 'google/monitoring/v3/alert_pb'
|
11
9
|
require 'google/protobuf/empty_pb'
|
12
10
|
require 'google/protobuf/field_mask_pb'
|
11
|
+
require 'google/protobuf'
|
12
|
+
|
13
13
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
14
|
add_file("google/monitoring/v3/alert_service.proto", :syntax => :proto3) do
|
15
15
|
add_message "google.monitoring.v3.CreateAlertPolicyRequest" do
|