google-cloud-monitoring-v3 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +71 -0
- data/lib/google-cloud-monitoring-v3.rb +21 -0
- data/lib/google/cloud/monitoring/v3.rb +40 -0
- data/lib/google/cloud/monitoring/v3/alert_policy_service.rb +57 -0
- data/lib/google/cloud/monitoring/v3/alert_policy_service/client.rb +772 -0
- data/lib/google/cloud/monitoring/v3/alert_policy_service/credentials.rb +53 -0
- data/lib/google/cloud/monitoring/v3/alert_policy_service/paths.rb +185 -0
- data/lib/google/cloud/monitoring/v3/group_service.rb +60 -0
- data/lib/google/cloud/monitoring/v3/group_service/client.rb +862 -0
- data/lib/google/cloud/monitoring/v3/group_service/credentials.rb +53 -0
- data/lib/google/cloud/monitoring/v3/group_service/paths.rb +127 -0
- data/lib/google/cloud/monitoring/v3/metric_service.rb +50 -0
- data/lib/google/cloud/monitoring/v3/metric_service/client.rb +1040 -0
- data/lib/google/cloud/monitoring/v3/metric_service/credentials.rb +54 -0
- data/lib/google/cloud/monitoring/v3/metric_service/paths.rb +179 -0
- data/lib/google/cloud/monitoring/v3/notification_channel_service.rb +50 -0
- data/lib/google/cloud/monitoring/v3/notification_channel_service/client.rb +1213 -0
- data/lib/google/cloud/monitoring/v3/notification_channel_service/credentials.rb +53 -0
- data/lib/google/cloud/monitoring/v3/notification_channel_service/paths.rb +179 -0
- data/lib/google/cloud/monitoring/v3/service_monitoring_service.rb +52 -0
- data/lib/google/cloud/monitoring/v3/service_monitoring_service/client.rb +1168 -0
- data/lib/google/cloud/monitoring/v3/service_monitoring_service/credentials.rb +53 -0
- data/lib/google/cloud/monitoring/v3/service_monitoring_service/paths.rb +185 -0
- data/lib/google/cloud/monitoring/v3/uptime_check_service.rb +56 -0
- data/lib/google/cloud/monitoring/v3/uptime_check_service/client.rb +822 -0
- data/lib/google/cloud/monitoring/v3/uptime_check_service/credentials.rb +53 -0
- data/lib/google/cloud/monitoring/v3/uptime_check_service/paths.rb +127 -0
- data/lib/google/cloud/monitoring/v3/version.rb +28 -0
- data/lib/google/monitoring/v3/alert_pb.rb +84 -0
- data/lib/google/monitoring/v3/alert_service_pb.rb +56 -0
- data/lib/google/monitoring/v3/alert_service_services_pb.rb +64 -0
- data/lib/google/monitoring/v3/common_pb.rb +98 -0
- data/lib/google/monitoring/v3/dropped_labels_pb.rb +22 -0
- data/lib/google/monitoring/v3/group_pb.rb +27 -0
- data/lib/google/monitoring/v3/group_service_pb.rb +76 -0
- data/lib/google/monitoring/v3/group_service_services_pb.rb +67 -0
- data/lib/google/monitoring/v3/metric_pb.rb +85 -0
- data/lib/google/monitoring/v3/metric_service_pb.rb +133 -0
- data/lib/google/monitoring/v3/metric_service_services_pb.rb +67 -0
- data/lib/google/monitoring/v3/mutation_record_pb.rb +24 -0
- data/lib/google/monitoring/v3/notification_pb.rb +50 -0
- data/lib/google/monitoring/v3/notification_service_pb.rb +93 -0
- data/lib/google/monitoring/v3/notification_service_services_pb.rb +95 -0
- data/lib/google/monitoring/v3/service_pb.rb +152 -0
- data/lib/google/monitoring/v3/service_service_pb.rb +89 -0
- data/lib/google/monitoring/v3/service_service_services_pb.rb +66 -0
- data/lib/google/monitoring/v3/span_context_pb.rb +22 -0
- data/lib/google/monitoring/v3/uptime_pb.rb +126 -0
- data/lib/google/monitoring/v3/uptime_service_pb.rb +66 -0
- data/lib/google/monitoring/v3/uptime_service_services_pb.rb +68 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/distribution.rb +225 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/label.rb +49 -0
- data/proto_docs/google/api/launch_stage.rb +65 -0
- data/proto_docs/google/api/metric.rb +203 -0
- data/proto_docs/google/api/monitored_resource.rb +137 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/monitoring/v3/alert.rb +359 -0
- data/proto_docs/google/monitoring/v3/alert_service.rb +162 -0
- data/proto_docs/google/monitoring/v3/common.rb +464 -0
- data/proto_docs/google/monitoring/v3/dropped_labels.rb +58 -0
- data/proto_docs/google/monitoring/v3/group.rb +84 -0
- data/proto_docs/google/monitoring/v3/group_service.rb +197 -0
- data/proto_docs/google/monitoring/v3/metric.rb +249 -0
- data/proto_docs/google/monitoring/v3/metric_service.rb +366 -0
- data/proto_docs/google/monitoring/v3/mutation_record.rb +38 -0
- data/proto_docs/google/monitoring/v3/notification.rb +186 -0
- data/proto_docs/google/monitoring/v3/notification_service.rb +266 -0
- data/proto_docs/google/monitoring/v3/service.rb +424 -0
- data/proto_docs/google/monitoring/v3/service_service.rb +239 -0
- data/proto_docs/google/monitoring/v3/span_context.rb +49 -0
- data/proto_docs/google/monitoring/v3/uptime.rb +403 -0
- data/proto_docs/google/monitoring/v3/uptime_service.rb +166 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/type/calendar_period.rb +55 -0
- metadata +269 -0
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "googleauth"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Monitoring
|
24
|
+
module V3
|
25
|
+
module UptimeCheckService
|
26
|
+
# Credentials for the UptimeCheckService API.
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
|
+
self.scope = [
|
29
|
+
"https://www.googleapis.com/auth/cloud-platform",
|
30
|
+
"https://www.googleapis.com/auth/monitoring",
|
31
|
+
"https://www.googleapis.com/auth/monitoring.read"
|
32
|
+
]
|
33
|
+
self.env_vars = [
|
34
|
+
"MONITORING_CREDENTIALS",
|
35
|
+
"MONITORING_KEYFILE",
|
36
|
+
"GOOGLE_CLOUD_CREDENTIALS",
|
37
|
+
"GOOGLE_CLOUD_KEYFILE",
|
38
|
+
"GCLOUD_KEYFILE",
|
39
|
+
"MONITORING_CREDENTIALS_JSON",
|
40
|
+
"MONITORING_KEYFILE_JSON",
|
41
|
+
"GOOGLE_CLOUD_CREDENTIALS_JSON",
|
42
|
+
"GOOGLE_CLOUD_KEYFILE_JSON",
|
43
|
+
"GCLOUD_KEYFILE_JSON"
|
44
|
+
]
|
45
|
+
self.paths = [
|
46
|
+
"~/.config/google_cloud/application_default_credentials.json"
|
47
|
+
]
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,127 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Monitoring
|
23
|
+
module V3
|
24
|
+
module UptimeCheckService
|
25
|
+
# Path helper methods for the UptimeCheckService API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Folder resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `folders/{folder}`
|
33
|
+
#
|
34
|
+
# @param folder [String]
|
35
|
+
#
|
36
|
+
# @return [::String]
|
37
|
+
def folder_path folder:
|
38
|
+
"folders/#{folder}"
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# Create a fully-qualified Organization resource string.
|
43
|
+
#
|
44
|
+
# The resource will be in the following format:
|
45
|
+
#
|
46
|
+
# `organizations/{organization}`
|
47
|
+
#
|
48
|
+
# @param organization [String]
|
49
|
+
#
|
50
|
+
# @return [::String]
|
51
|
+
def organization_path organization:
|
52
|
+
"organizations/#{organization}"
|
53
|
+
end
|
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
|
+
|
69
|
+
##
|
70
|
+
# Create a fully-qualified UptimeCheckConfig resource string.
|
71
|
+
#
|
72
|
+
# @overload uptime_check_config_path(project:, uptime_check_config:)
|
73
|
+
# The resource will be in the following format:
|
74
|
+
#
|
75
|
+
# `projects/{project}/uptimeCheckConfigs/{uptime_check_config}`
|
76
|
+
#
|
77
|
+
# @param project [String]
|
78
|
+
# @param uptime_check_config [String]
|
79
|
+
#
|
80
|
+
# @overload uptime_check_config_path(organization:, uptime_check_config:)
|
81
|
+
# The resource will be in the following format:
|
82
|
+
#
|
83
|
+
# `organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}`
|
84
|
+
#
|
85
|
+
# @param organization [String]
|
86
|
+
# @param uptime_check_config [String]
|
87
|
+
#
|
88
|
+
# @overload uptime_check_config_path(folder:, uptime_check_config:)
|
89
|
+
# The resource will be in the following format:
|
90
|
+
#
|
91
|
+
# `folders/{folder}/uptimeCheckConfigs/{uptime_check_config}`
|
92
|
+
#
|
93
|
+
# @param folder [String]
|
94
|
+
# @param uptime_check_config [String]
|
95
|
+
#
|
96
|
+
# @return [::String]
|
97
|
+
def uptime_check_config_path **args
|
98
|
+
resources = {
|
99
|
+
"project:uptime_check_config" => (proc do |project:, uptime_check_config:|
|
100
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
101
|
+
|
102
|
+
"projects/#{project}/uptimeCheckConfigs/#{uptime_check_config}"
|
103
|
+
end),
|
104
|
+
"organization:uptime_check_config" => (proc do |organization:, uptime_check_config:|
|
105
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
106
|
+
|
107
|
+
"organizations/#{organization}/uptimeCheckConfigs/#{uptime_check_config}"
|
108
|
+
end),
|
109
|
+
"folder:uptime_check_config" => (proc do |folder:, uptime_check_config:|
|
110
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
111
|
+
|
112
|
+
"folders/#{folder}/uptimeCheckConfigs/#{uptime_check_config}"
|
113
|
+
end)
|
114
|
+
}
|
115
|
+
|
116
|
+
resource = resources[args.keys.sort.join(":")]
|
117
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
118
|
+
resource.call(**args)
|
119
|
+
end
|
120
|
+
|
121
|
+
extend self
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Monitoring
|
23
|
+
module V3
|
24
|
+
VERSION = "0.1.0"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/monitoring/v3/alert.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/resource_pb'
|
7
|
+
require 'google/monitoring/v3/common_pb'
|
8
|
+
require 'google/monitoring/v3/mutation_record_pb'
|
9
|
+
require 'google/protobuf/duration_pb'
|
10
|
+
require 'google/protobuf/wrappers_pb'
|
11
|
+
require 'google/rpc/status_pb'
|
12
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
|
+
add_file("google/monitoring/v3/alert.proto", :syntax => :proto3) do
|
14
|
+
add_message "google.monitoring.v3.AlertPolicy" do
|
15
|
+
optional :name, :string, 1
|
16
|
+
optional :display_name, :string, 2
|
17
|
+
optional :documentation, :message, 13, "google.monitoring.v3.AlertPolicy.Documentation"
|
18
|
+
map :user_labels, :string, :string, 16
|
19
|
+
repeated :conditions, :message, 12, "google.monitoring.v3.AlertPolicy.Condition"
|
20
|
+
optional :combiner, :enum, 6, "google.monitoring.v3.AlertPolicy.ConditionCombinerType"
|
21
|
+
optional :enabled, :message, 17, "google.protobuf.BoolValue"
|
22
|
+
optional :validity, :message, 18, "google.rpc.Status"
|
23
|
+
repeated :notification_channels, :string, 14
|
24
|
+
optional :creation_record, :message, 10, "google.monitoring.v3.MutationRecord"
|
25
|
+
optional :mutation_record, :message, 11, "google.monitoring.v3.MutationRecord"
|
26
|
+
end
|
27
|
+
add_message "google.monitoring.v3.AlertPolicy.Documentation" do
|
28
|
+
optional :content, :string, 1
|
29
|
+
optional :mime_type, :string, 2
|
30
|
+
end
|
31
|
+
add_message "google.monitoring.v3.AlertPolicy.Condition" do
|
32
|
+
optional :name, :string, 12
|
33
|
+
optional :display_name, :string, 6
|
34
|
+
oneof :condition do
|
35
|
+
optional :condition_threshold, :message, 1, "google.monitoring.v3.AlertPolicy.Condition.MetricThreshold"
|
36
|
+
optional :condition_absent, :message, 2, "google.monitoring.v3.AlertPolicy.Condition.MetricAbsence"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
add_message "google.monitoring.v3.AlertPolicy.Condition.Trigger" do
|
40
|
+
oneof :type do
|
41
|
+
optional :count, :int32, 1
|
42
|
+
optional :percent, :double, 2
|
43
|
+
end
|
44
|
+
end
|
45
|
+
add_message "google.monitoring.v3.AlertPolicy.Condition.MetricThreshold" do
|
46
|
+
optional :filter, :string, 2
|
47
|
+
repeated :aggregations, :message, 8, "google.monitoring.v3.Aggregation"
|
48
|
+
optional :denominator_filter, :string, 9
|
49
|
+
repeated :denominator_aggregations, :message, 10, "google.monitoring.v3.Aggregation"
|
50
|
+
optional :comparison, :enum, 4, "google.monitoring.v3.ComparisonType"
|
51
|
+
optional :threshold_value, :double, 5
|
52
|
+
optional :duration, :message, 6, "google.protobuf.Duration"
|
53
|
+
optional :trigger, :message, 7, "google.monitoring.v3.AlertPolicy.Condition.Trigger"
|
54
|
+
end
|
55
|
+
add_message "google.monitoring.v3.AlertPolicy.Condition.MetricAbsence" do
|
56
|
+
optional :filter, :string, 1
|
57
|
+
repeated :aggregations, :message, 5, "google.monitoring.v3.Aggregation"
|
58
|
+
optional :duration, :message, 2, "google.protobuf.Duration"
|
59
|
+
optional :trigger, :message, 3, "google.monitoring.v3.AlertPolicy.Condition.Trigger"
|
60
|
+
end
|
61
|
+
add_enum "google.monitoring.v3.AlertPolicy.ConditionCombinerType" do
|
62
|
+
value :COMBINE_UNSPECIFIED, 0
|
63
|
+
value :AND, 1
|
64
|
+
value :OR, 2
|
65
|
+
value :AND_WITH_MATCHING_RESOURCE, 3
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
module Google
|
71
|
+
module Cloud
|
72
|
+
module Monitoring
|
73
|
+
module V3
|
74
|
+
AlertPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy").msgclass
|
75
|
+
AlertPolicy::Documentation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.Documentation").msgclass
|
76
|
+
AlertPolicy::Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.Condition").msgclass
|
77
|
+
AlertPolicy::Condition::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.Condition.Trigger").msgclass
|
78
|
+
AlertPolicy::Condition::MetricThreshold = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.Condition.MetricThreshold").msgclass
|
79
|
+
AlertPolicy::Condition::MetricAbsence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.Condition.MetricAbsence").msgclass
|
80
|
+
AlertPolicy::ConditionCombinerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.AlertPolicy.ConditionCombinerType").enummodule
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/monitoring/v3/alert_service.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/client_pb'
|
8
|
+
require 'google/api/field_behavior_pb'
|
9
|
+
require 'google/api/resource_pb'
|
10
|
+
require 'google/monitoring/v3/alert_pb'
|
11
|
+
require 'google/protobuf/empty_pb'
|
12
|
+
require 'google/protobuf/field_mask_pb'
|
13
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
|
+
add_file("google/monitoring/v3/alert_service.proto", :syntax => :proto3) do
|
15
|
+
add_message "google.monitoring.v3.CreateAlertPolicyRequest" do
|
16
|
+
optional :name, :string, 3
|
17
|
+
optional :alert_policy, :message, 2, "google.monitoring.v3.AlertPolicy"
|
18
|
+
end
|
19
|
+
add_message "google.monitoring.v3.GetAlertPolicyRequest" do
|
20
|
+
optional :name, :string, 3
|
21
|
+
end
|
22
|
+
add_message "google.monitoring.v3.ListAlertPoliciesRequest" do
|
23
|
+
optional :name, :string, 4
|
24
|
+
optional :filter, :string, 5
|
25
|
+
optional :order_by, :string, 6
|
26
|
+
optional :page_size, :int32, 2
|
27
|
+
optional :page_token, :string, 3
|
28
|
+
end
|
29
|
+
add_message "google.monitoring.v3.ListAlertPoliciesResponse" do
|
30
|
+
repeated :alert_policies, :message, 3, "google.monitoring.v3.AlertPolicy"
|
31
|
+
optional :next_page_token, :string, 2
|
32
|
+
end
|
33
|
+
add_message "google.monitoring.v3.UpdateAlertPolicyRequest" do
|
34
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
35
|
+
optional :alert_policy, :message, 3, "google.monitoring.v3.AlertPolicy"
|
36
|
+
end
|
37
|
+
add_message "google.monitoring.v3.DeleteAlertPolicyRequest" do
|
38
|
+
optional :name, :string, 3
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
module Google
|
44
|
+
module Cloud
|
45
|
+
module Monitoring
|
46
|
+
module V3
|
47
|
+
CreateAlertPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.CreateAlertPolicyRequest").msgclass
|
48
|
+
GetAlertPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.GetAlertPolicyRequest").msgclass
|
49
|
+
ListAlertPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.ListAlertPoliciesRequest").msgclass
|
50
|
+
ListAlertPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.ListAlertPoliciesResponse").msgclass
|
51
|
+
UpdateAlertPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.UpdateAlertPolicyRequest").msgclass
|
52
|
+
DeleteAlertPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.DeleteAlertPolicyRequest").msgclass
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/monitoring/v3/alert_service.proto for package 'Google.Cloud.Monitoring.V3'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2020 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/monitoring/v3/alert_service_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Monitoring
|
25
|
+
module V3
|
26
|
+
module AlertPolicyService
|
27
|
+
# The AlertPolicyService API is used to manage (list, create, delete,
|
28
|
+
# edit) alert policies in Stackdriver Monitoring. An alerting policy is
|
29
|
+
# a description of the conditions under which some aspect of your
|
30
|
+
# system is considered to be "unhealthy" and the ways to notify
|
31
|
+
# people or services about this state. In addition to using this API, alert
|
32
|
+
# policies can also be managed through
|
33
|
+
# [Stackdriver Monitoring](https://cloud.google.com/monitoring/docs/),
|
34
|
+
# which can be reached by clicking the "Monitoring" tab in
|
35
|
+
# [Cloud Console](https://console.cloud.google.com/).
|
36
|
+
class Service
|
37
|
+
|
38
|
+
include GRPC::GenericService
|
39
|
+
|
40
|
+
self.marshal_class_method = :encode
|
41
|
+
self.unmarshal_class_method = :decode
|
42
|
+
self.service_name = 'google.monitoring.v3.AlertPolicyService'
|
43
|
+
|
44
|
+
# Lists the existing alerting policies for the project.
|
45
|
+
rpc :ListAlertPolicies, Google::Cloud::Monitoring::V3::ListAlertPoliciesRequest, Google::Cloud::Monitoring::V3::ListAlertPoliciesResponse
|
46
|
+
# Gets a single alerting policy.
|
47
|
+
rpc :GetAlertPolicy, Google::Cloud::Monitoring::V3::GetAlertPolicyRequest, Google::Cloud::Monitoring::V3::AlertPolicy
|
48
|
+
# Creates a new alerting policy.
|
49
|
+
rpc :CreateAlertPolicy, Google::Cloud::Monitoring::V3::CreateAlertPolicyRequest, Google::Cloud::Monitoring::V3::AlertPolicy
|
50
|
+
# Deletes an alerting policy.
|
51
|
+
rpc :DeleteAlertPolicy, Google::Cloud::Monitoring::V3::DeleteAlertPolicyRequest, Google::Protobuf::Empty
|
52
|
+
# Updates an alerting policy. You can either replace the entire policy with
|
53
|
+
# a new one or replace only certain fields in the current alerting policy by
|
54
|
+
# specifying the fields to be updated via `updateMask`. Returns the
|
55
|
+
# updated alerting policy.
|
56
|
+
rpc :UpdateAlertPolicy, Google::Cloud::Monitoring::V3::UpdateAlertPolicyRequest, Google::Cloud::Monitoring::V3::AlertPolicy
|
57
|
+
end
|
58
|
+
|
59
|
+
Stub = Service.rpc_stub_class
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/monitoring/v3/common.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/distribution_pb'
|
7
|
+
require 'google/protobuf/duration_pb'
|
8
|
+
require 'google/protobuf/timestamp_pb'
|
9
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
|
+
add_file("google/monitoring/v3/common.proto", :syntax => :proto3) do
|
11
|
+
add_message "google.monitoring.v3.TypedValue" do
|
12
|
+
oneof :value do
|
13
|
+
optional :bool_value, :bool, 1
|
14
|
+
optional :int64_value, :int64, 2
|
15
|
+
optional :double_value, :double, 3
|
16
|
+
optional :string_value, :string, 4
|
17
|
+
optional :distribution_value, :message, 5, "google.api.Distribution"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
add_message "google.monitoring.v3.TimeInterval" do
|
21
|
+
optional :end_time, :message, 2, "google.protobuf.Timestamp"
|
22
|
+
optional :start_time, :message, 1, "google.protobuf.Timestamp"
|
23
|
+
end
|
24
|
+
add_message "google.monitoring.v3.Aggregation" do
|
25
|
+
optional :alignment_period, :message, 1, "google.protobuf.Duration"
|
26
|
+
optional :per_series_aligner, :enum, 2, "google.monitoring.v3.Aggregation.Aligner"
|
27
|
+
optional :cross_series_reducer, :enum, 4, "google.monitoring.v3.Aggregation.Reducer"
|
28
|
+
repeated :group_by_fields, :string, 5
|
29
|
+
end
|
30
|
+
add_enum "google.monitoring.v3.Aggregation.Aligner" do
|
31
|
+
value :ALIGN_NONE, 0
|
32
|
+
value :ALIGN_DELTA, 1
|
33
|
+
value :ALIGN_RATE, 2
|
34
|
+
value :ALIGN_INTERPOLATE, 3
|
35
|
+
value :ALIGN_NEXT_OLDER, 4
|
36
|
+
value :ALIGN_MIN, 10
|
37
|
+
value :ALIGN_MAX, 11
|
38
|
+
value :ALIGN_MEAN, 12
|
39
|
+
value :ALIGN_COUNT, 13
|
40
|
+
value :ALIGN_SUM, 14
|
41
|
+
value :ALIGN_STDDEV, 15
|
42
|
+
value :ALIGN_COUNT_TRUE, 16
|
43
|
+
value :ALIGN_COUNT_FALSE, 24
|
44
|
+
value :ALIGN_FRACTION_TRUE, 17
|
45
|
+
value :ALIGN_PERCENTILE_99, 18
|
46
|
+
value :ALIGN_PERCENTILE_95, 19
|
47
|
+
value :ALIGN_PERCENTILE_50, 20
|
48
|
+
value :ALIGN_PERCENTILE_05, 21
|
49
|
+
value :ALIGN_PERCENT_CHANGE, 23
|
50
|
+
end
|
51
|
+
add_enum "google.monitoring.v3.Aggregation.Reducer" do
|
52
|
+
value :REDUCE_NONE, 0
|
53
|
+
value :REDUCE_MEAN, 1
|
54
|
+
value :REDUCE_MIN, 2
|
55
|
+
value :REDUCE_MAX, 3
|
56
|
+
value :REDUCE_SUM, 4
|
57
|
+
value :REDUCE_STDDEV, 5
|
58
|
+
value :REDUCE_COUNT, 6
|
59
|
+
value :REDUCE_COUNT_TRUE, 7
|
60
|
+
value :REDUCE_COUNT_FALSE, 15
|
61
|
+
value :REDUCE_FRACTION_TRUE, 8
|
62
|
+
value :REDUCE_PERCENTILE_99, 9
|
63
|
+
value :REDUCE_PERCENTILE_95, 10
|
64
|
+
value :REDUCE_PERCENTILE_50, 11
|
65
|
+
value :REDUCE_PERCENTILE_05, 12
|
66
|
+
end
|
67
|
+
add_enum "google.monitoring.v3.ComparisonType" do
|
68
|
+
value :COMPARISON_UNSPECIFIED, 0
|
69
|
+
value :COMPARISON_GT, 1
|
70
|
+
value :COMPARISON_GE, 2
|
71
|
+
value :COMPARISON_LT, 3
|
72
|
+
value :COMPARISON_LE, 4
|
73
|
+
value :COMPARISON_EQ, 5
|
74
|
+
value :COMPARISON_NE, 6
|
75
|
+
end
|
76
|
+
add_enum "google.monitoring.v3.ServiceTier" do
|
77
|
+
value :SERVICE_TIER_UNSPECIFIED, 0
|
78
|
+
value :SERVICE_TIER_BASIC, 1
|
79
|
+
value :SERVICE_TIER_PREMIUM, 2
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
module Google
|
85
|
+
module Cloud
|
86
|
+
module Monitoring
|
87
|
+
module V3
|
88
|
+
TypedValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.TypedValue").msgclass
|
89
|
+
TimeInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.TimeInterval").msgclass
|
90
|
+
Aggregation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.Aggregation").msgclass
|
91
|
+
Aggregation::Aligner = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.Aggregation.Aligner").enummodule
|
92
|
+
Aggregation::Reducer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.Aggregation.Reducer").enummodule
|
93
|
+
ComparisonType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.ComparisonType").enummodule
|
94
|
+
ServiceTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.ServiceTier").enummodule
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|