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,247 @@
|
|
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 Api
|
22
|
+
# A simple descriptor of a resource type.
|
23
|
+
#
|
24
|
+
# ResourceDescriptor annotates a resource message (either by means of a
|
25
|
+
# protobuf annotation or use in the service config), and associates the
|
26
|
+
# resource's schema, the resource type, and the pattern of the resource name.
|
27
|
+
#
|
28
|
+
# Example:
|
29
|
+
#
|
30
|
+
# message Topic {
|
31
|
+
# // Indicates this message defines a resource schema.
|
32
|
+
# // Declares the resource type in the format of {service}/{kind}.
|
33
|
+
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
|
+
# option (google.api.resource) = {
|
35
|
+
# type: "pubsub.googleapis.com/Topic"
|
36
|
+
# name_descriptor: {
|
37
|
+
# pattern: "projects/{project}/topics/{topic}"
|
38
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
+
# parent_name_extractor: "projects/{project}"
|
40
|
+
# }
|
41
|
+
# };
|
42
|
+
# }
|
43
|
+
#
|
44
|
+
# The ResourceDescriptor Yaml config will look like:
|
45
|
+
#
|
46
|
+
# resources:
|
47
|
+
# - type: "pubsub.googleapis.com/Topic"
|
48
|
+
# name_descriptor:
|
49
|
+
# - pattern: "projects/\\{project}/topics/\\{topic}"
|
50
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
+
# parent_name_extractor: "projects/\\{project}"
|
52
|
+
#
|
53
|
+
# Sometimes, resources have multiple patterns, typically because they can
|
54
|
+
# live under multiple parents.
|
55
|
+
#
|
56
|
+
# Example:
|
57
|
+
#
|
58
|
+
# message LogEntry {
|
59
|
+
# option (google.api.resource) = {
|
60
|
+
# type: "logging.googleapis.com/LogEntry"
|
61
|
+
# name_descriptor: {
|
62
|
+
# pattern: "projects/{project}/logs/{log}"
|
63
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
64
|
+
# parent_name_extractor: "projects/{project}"
|
65
|
+
# }
|
66
|
+
# name_descriptor: {
|
67
|
+
# pattern: "folders/{folder}/logs/{log}"
|
68
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
+
# parent_name_extractor: "folders/{folder}"
|
70
|
+
# }
|
71
|
+
# name_descriptor: {
|
72
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
+
# parent_name_extractor: "organizations/{organization}"
|
75
|
+
# }
|
76
|
+
# name_descriptor: {
|
77
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
+
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
+
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
+
# }
|
81
|
+
# };
|
82
|
+
# }
|
83
|
+
#
|
84
|
+
# The ResourceDescriptor Yaml config will look like:
|
85
|
+
#
|
86
|
+
# resources:
|
87
|
+
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
+
# name_descriptor:
|
89
|
+
# - pattern: "projects/{project}/logs/{log}"
|
90
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
91
|
+
# parent_name_extractor: "projects/{project}"
|
92
|
+
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
+
# parent_name_extractor: "folders/{folder}"
|
95
|
+
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
+
# parent_name_extractor: "organizations/{organization}"
|
98
|
+
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
+
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
+
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
+
#
|
102
|
+
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
+
# the resource itself has parents for policy evaluation.
|
104
|
+
#
|
105
|
+
# Example:
|
106
|
+
#
|
107
|
+
# message Shelf {
|
108
|
+
# option (google.api.resource) = {
|
109
|
+
# type: "library.googleapis.com/Shelf"
|
110
|
+
# name_descriptor: {
|
111
|
+
# pattern: "shelves/{shelf}"
|
112
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
+
# }
|
114
|
+
# name_descriptor: {
|
115
|
+
# pattern: "shelves/{shelf}"
|
116
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
+
# }
|
118
|
+
# };
|
119
|
+
# }
|
120
|
+
#
|
121
|
+
# The ResourceDescriptor Yaml config will look like:
|
122
|
+
#
|
123
|
+
# resources:
|
124
|
+
# - type: 'library.googleapis.com/Shelf'
|
125
|
+
# name_descriptor:
|
126
|
+
# - pattern: "shelves/{shelf}"
|
127
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
+
# - pattern: "shelves/{shelf}"
|
129
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
130
|
+
# @!attribute [rw] type
|
131
|
+
# @return [::String]
|
132
|
+
# The resource type. It must be in the format of
|
133
|
+
# \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
|
134
|
+
# singular and must not include version numbers.
|
135
|
+
#
|
136
|
+
# Example: `storage.googleapis.com/Bucket`
|
137
|
+
#
|
138
|
+
# The value of the resource_type_kind must follow the regular expression
|
139
|
+
# /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
|
140
|
+
# should use PascalCase (UpperCamelCase). The maximum number of
|
141
|
+
# characters allowed for the `resource_type_kind` is 100.
|
142
|
+
# @!attribute [rw] pattern
|
143
|
+
# @return [::Array<::String>]
|
144
|
+
# Optional. The relative resource name pattern associated with this resource
|
145
|
+
# type. The DNS prefix of the full resource name shouldn't be specified here.
|
146
|
+
#
|
147
|
+
# The path pattern must follow the syntax, which aligns with HTTP binding
|
148
|
+
# syntax:
|
149
|
+
#
|
150
|
+
# Template = Segment { "/" Segment } ;
|
151
|
+
# Segment = LITERAL | Variable ;
|
152
|
+
# Variable = "{" LITERAL "}" ;
|
153
|
+
#
|
154
|
+
# Examples:
|
155
|
+
#
|
156
|
+
# - "projects/\\{project}/topics/\\{topic}"
|
157
|
+
# - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
|
158
|
+
#
|
159
|
+
# The components in braces correspond to the IDs for each resource in the
|
160
|
+
# hierarchy. It is expected that, if multiple patterns are provided,
|
161
|
+
# the same component name (e.g. "project") refers to IDs of the same
|
162
|
+
# type of resource.
|
163
|
+
# @!attribute [rw] name_field
|
164
|
+
# @return [::String]
|
165
|
+
# Optional. The field on the resource that designates the resource name
|
166
|
+
# field. If omitted, this is assumed to be "name".
|
167
|
+
# @!attribute [rw] history
|
168
|
+
# @return [::Google::Api::ResourceDescriptor::History]
|
169
|
+
# Optional. The historical or future-looking state of the resource pattern.
|
170
|
+
#
|
171
|
+
# Example:
|
172
|
+
#
|
173
|
+
# // The InspectTemplate message originally only supported resource
|
174
|
+
# // names with organization, and project was added later.
|
175
|
+
# message InspectTemplate {
|
176
|
+
# option (google.api.resource) = {
|
177
|
+
# type: "dlp.googleapis.com/InspectTemplate"
|
178
|
+
# pattern:
|
179
|
+
# "organizations/{organization}/inspectTemplates/{inspect_template}"
|
180
|
+
# pattern: "projects/{project}/inspectTemplates/{inspect_template}"
|
181
|
+
# history: ORIGINALLY_SINGLE_PATTERN
|
182
|
+
# };
|
183
|
+
# }
|
184
|
+
# @!attribute [rw] plural
|
185
|
+
# @return [::String]
|
186
|
+
# The plural name used in the resource name, such as 'projects' for
|
187
|
+
# the name of 'projects/\\{project}'. It is the same concept of the `plural`
|
188
|
+
# field in k8s CRD spec
|
189
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
190
|
+
# @!attribute [rw] singular
|
191
|
+
# @return [::String]
|
192
|
+
# The same concept of the `singular` field in k8s CRD spec
|
193
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
194
|
+
# Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
195
|
+
class ResourceDescriptor
|
196
|
+
include ::Google::Protobuf::MessageExts
|
197
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
198
|
+
|
199
|
+
# A description of the historical or future-looking state of the
|
200
|
+
# resource pattern.
|
201
|
+
module History
|
202
|
+
# The "unset" value.
|
203
|
+
HISTORY_UNSPECIFIED = 0
|
204
|
+
|
205
|
+
# The resource originally had one pattern and launched as such, and
|
206
|
+
# additional patterns were added later.
|
207
|
+
ORIGINALLY_SINGLE_PATTERN = 1
|
208
|
+
|
209
|
+
# The resource has one pattern, but the API owner expects to add more
|
210
|
+
# later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
|
211
|
+
# that from being necessary once there are multiple patterns.)
|
212
|
+
FUTURE_MULTI_PATTERN = 2
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
# Defines a proto annotation that describes a string field that refers to
|
217
|
+
# an API resource.
|
218
|
+
# @!attribute [rw] type
|
219
|
+
# @return [::String]
|
220
|
+
# The resource type that the annotated field references.
|
221
|
+
#
|
222
|
+
# Example:
|
223
|
+
#
|
224
|
+
# message Subscription {
|
225
|
+
# string topic = 2 [(google.api.resource_reference) = {
|
226
|
+
# type: "pubsub.googleapis.com/Topic"
|
227
|
+
# }];
|
228
|
+
# }
|
229
|
+
# @!attribute [rw] child_type
|
230
|
+
# @return [::String]
|
231
|
+
# The resource type of a child collection that the annotated field
|
232
|
+
# references. This is useful for annotating the `parent` field that
|
233
|
+
# doesn't have a fixed resource type.
|
234
|
+
#
|
235
|
+
# Example:
|
236
|
+
#
|
237
|
+
# message ListLogEntriesRequest {
|
238
|
+
# string parent = 1 [(google.api.resource_reference) = {
|
239
|
+
# child_type: "logging.googleapis.com/LogEntry"
|
240
|
+
# };
|
241
|
+
# }
|
242
|
+
class ResourceReference
|
243
|
+
include ::Google::Protobuf::MessageExts
|
244
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
245
|
+
end
|
246
|
+
end
|
247
|
+
end
|
@@ -0,0 +1,359 @@
|
|
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
|
+
# A description of the conditions under which some aspect of your system is
|
25
|
+
# considered to be "unhealthy" and the ways to notify people or services about
|
26
|
+
# this state. For an overview of alert policies, see
|
27
|
+
# [Introduction to Alerting](https://cloud.google.com/monitoring/alerts/).
|
28
|
+
# @!attribute [rw] name
|
29
|
+
# @return [::String]
|
30
|
+
# Required if the policy exists. The resource name for this policy. The
|
31
|
+
# format is:
|
32
|
+
#
|
33
|
+
# projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
|
34
|
+
#
|
35
|
+
# `[ALERT_POLICY_ID]` is assigned by Stackdriver Monitoring when the policy
|
36
|
+
# is created. When calling the
|
37
|
+
# {::Google::Cloud::Monitoring::V3::AlertPolicyService::Client#create_alert_policy alertPolicies.create}
|
38
|
+
# method, do not include the `name` field in the alerting policy passed as
|
39
|
+
# part of the request.
|
40
|
+
# @!attribute [rw] display_name
|
41
|
+
# @return [::String]
|
42
|
+
# A short name or phrase used to identify the policy in dashboards,
|
43
|
+
# notifications, and incidents. To avoid confusion, don't use the same
|
44
|
+
# display name for multiple policies in the same project. The name is
|
45
|
+
# limited to 512 Unicode characters.
|
46
|
+
# @!attribute [rw] documentation
|
47
|
+
# @return [::Google::Cloud::Monitoring::V3::AlertPolicy::Documentation]
|
48
|
+
# Documentation that is included with notifications and incidents related to
|
49
|
+
# this policy. Best practice is for the documentation to include information
|
50
|
+
# to help responders understand, mitigate, escalate, and correct the
|
51
|
+
# underlying problems detected by the alerting policy. Notification channels
|
52
|
+
# that have limited capacity might not show this documentation.
|
53
|
+
# @!attribute [rw] user_labels
|
54
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
55
|
+
# User-supplied key/value data to be used for organizing and
|
56
|
+
# identifying the `AlertPolicy` objects.
|
57
|
+
#
|
58
|
+
# The field can contain up to 64 entries. Each key and value is limited to
|
59
|
+
# 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
|
60
|
+
# values can contain only lowercase letters, numerals, underscores, and
|
61
|
+
# dashes. Keys must begin with a letter.
|
62
|
+
# @!attribute [rw] conditions
|
63
|
+
# @return [::Array<::Google::Cloud::Monitoring::V3::AlertPolicy::Condition>]
|
64
|
+
# A list of conditions for the policy. The conditions are combined by AND or
|
65
|
+
# OR according to the `combiner` field. If the combined conditions evaluate
|
66
|
+
# to true, then an incident is created. A policy can have from one to six
|
67
|
+
# conditions.
|
68
|
+
# If `condition_time_series_query_language` is present, it must be the only
|
69
|
+
# `condition`.
|
70
|
+
# @!attribute [rw] combiner
|
71
|
+
# @return [::Google::Cloud::Monitoring::V3::AlertPolicy::ConditionCombinerType]
|
72
|
+
# How to combine the results of multiple conditions to determine if an
|
73
|
+
# incident should be opened.
|
74
|
+
# If `condition_time_series_query_language` is present, this must be
|
75
|
+
# `COMBINE_UNSPECIFIED`.
|
76
|
+
# @!attribute [rw] enabled
|
77
|
+
# @return [::Google::Protobuf::BoolValue]
|
78
|
+
# Whether or not the policy is enabled. On write, the default interpretation
|
79
|
+
# if unset is that the policy is enabled. On read, clients should not make
|
80
|
+
# any assumption about the state if it has not been populated. The
|
81
|
+
# field should always be populated on List and Get operations, unless
|
82
|
+
# a field projection has been specified that strips it out.
|
83
|
+
# @!attribute [rw] validity
|
84
|
+
# @return [::Google::Rpc::Status]
|
85
|
+
# Read-only description of how the alert policy is invalid. OK if the alert
|
86
|
+
# policy is valid. If not OK, the alert policy will not generate incidents.
|
87
|
+
# @!attribute [rw] notification_channels
|
88
|
+
# @return [::Array<::String>]
|
89
|
+
# Identifies the notification channels to which notifications should be sent
|
90
|
+
# when incidents are opened or closed or when new violations occur on
|
91
|
+
# an already opened incident. Each element of this array corresponds to
|
92
|
+
# the `name` field in each of the
|
93
|
+
# {::Google::Cloud::Monitoring::V3::NotificationChannel `NotificationChannel`}
|
94
|
+
# objects that are returned from the [`ListNotificationChannels`]
|
95
|
+
# [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
|
96
|
+
# method. The format of the entries in this field is:
|
97
|
+
#
|
98
|
+
# projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
|
99
|
+
# @!attribute [rw] creation_record
|
100
|
+
# @return [::Google::Cloud::Monitoring::V3::MutationRecord]
|
101
|
+
# A read-only record of the creation of the alerting policy. If provided
|
102
|
+
# in a call to create or update, this field will be ignored.
|
103
|
+
# @!attribute [rw] mutation_record
|
104
|
+
# @return [::Google::Cloud::Monitoring::V3::MutationRecord]
|
105
|
+
# A read-only record of the most recent change to the alerting policy. If
|
106
|
+
# provided in a call to create or update, this field will be ignored.
|
107
|
+
class AlertPolicy
|
108
|
+
include ::Google::Protobuf::MessageExts
|
109
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
110
|
+
|
111
|
+
# A content string and a MIME type that describes the content string's
|
112
|
+
# format.
|
113
|
+
# @!attribute [rw] content
|
114
|
+
# @return [::String]
|
115
|
+
# The text of the documentation, interpreted according to `mime_type`.
|
116
|
+
# The content may not exceed 8,192 Unicode characters and may not exceed
|
117
|
+
# more than 10,240 bytes when encoded in UTF-8 format, whichever is
|
118
|
+
# smaller.
|
119
|
+
# @!attribute [rw] mime_type
|
120
|
+
# @return [::String]
|
121
|
+
# The format of the `content` field. Presently, only the value
|
122
|
+
# `"text/markdown"` is supported. See
|
123
|
+
# [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
|
124
|
+
class Documentation
|
125
|
+
include ::Google::Protobuf::MessageExts
|
126
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
127
|
+
end
|
128
|
+
|
129
|
+
# A condition is a true/false test that determines when an alerting policy
|
130
|
+
# should open an incident. If a condition evaluates to true, it signifies
|
131
|
+
# that something is wrong.
|
132
|
+
# @!attribute [rw] name
|
133
|
+
# @return [::String]
|
134
|
+
# Required if the condition exists. The unique resource name for this
|
135
|
+
# condition. Its format is:
|
136
|
+
#
|
137
|
+
# projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]
|
138
|
+
#
|
139
|
+
# `[CONDITION_ID]` is assigned by Stackdriver Monitoring when the
|
140
|
+
# condition is created as part of a new or updated alerting policy.
|
141
|
+
#
|
142
|
+
# When calling the
|
143
|
+
# {::Google::Cloud::Monitoring::V3::AlertPolicyService::Client#create_alert_policy alertPolicies.create}
|
144
|
+
# method, do not include the `name` field in the conditions of the
|
145
|
+
# requested alerting policy. Stackdriver Monitoring creates the
|
146
|
+
# condition identifiers and includes them in the new policy.
|
147
|
+
#
|
148
|
+
# When calling the
|
149
|
+
# {::Google::Cloud::Monitoring::V3::AlertPolicyService::Client#update_alert_policy alertPolicies.update}
|
150
|
+
# method to update a policy, including a condition `name` causes the
|
151
|
+
# existing condition to be updated. Conditions without names are added to
|
152
|
+
# the updated policy. Existing conditions are deleted if they are not
|
153
|
+
# updated.
|
154
|
+
#
|
155
|
+
# Best practice is to preserve `[CONDITION_ID]` if you make only small
|
156
|
+
# changes, such as those to condition thresholds, durations, or trigger
|
157
|
+
# values. Otherwise, treat the change as a new condition and let the
|
158
|
+
# existing condition be deleted.
|
159
|
+
# @!attribute [rw] display_name
|
160
|
+
# @return [::String]
|
161
|
+
# A short name or phrase used to identify the condition in dashboards,
|
162
|
+
# notifications, and incidents. To avoid confusion, don't use the same
|
163
|
+
# display name for multiple conditions in the same policy.
|
164
|
+
# @!attribute [rw] condition_threshold
|
165
|
+
# @return [::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::MetricThreshold]
|
166
|
+
# A condition that compares a time series against a threshold.
|
167
|
+
# @!attribute [rw] condition_absent
|
168
|
+
# @return [::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::MetricAbsence]
|
169
|
+
# A condition that checks that a time series continues to
|
170
|
+
# receive new data points.
|
171
|
+
class Condition
|
172
|
+
include ::Google::Protobuf::MessageExts
|
173
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
174
|
+
|
175
|
+
# Specifies how many time series must fail a predicate to trigger a
|
176
|
+
# condition. If not specified, then a `{count: 1}` trigger is used.
|
177
|
+
# @!attribute [rw] count
|
178
|
+
# @return [::Integer]
|
179
|
+
# The absolute number of time series that must fail
|
180
|
+
# the predicate for the condition to be triggered.
|
181
|
+
# @!attribute [rw] percent
|
182
|
+
# @return [::Float]
|
183
|
+
# The percentage of time series that must fail the
|
184
|
+
# predicate for the condition to be triggered.
|
185
|
+
class Trigger
|
186
|
+
include ::Google::Protobuf::MessageExts
|
187
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
188
|
+
end
|
189
|
+
|
190
|
+
# A condition type that compares a collection of time series
|
191
|
+
# against a threshold.
|
192
|
+
# @!attribute [rw] filter
|
193
|
+
# @return [::String]
|
194
|
+
# A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
|
195
|
+
# identifies which time series should be compared with the threshold.
|
196
|
+
#
|
197
|
+
# The filter is similar to the one that is specified in the
|
198
|
+
# [`ListTimeSeries`
|
199
|
+
# request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
|
200
|
+
# (that call is useful to verify the time series that will be retrieved /
|
201
|
+
# processed) and must specify the metric type and optionally may contain
|
202
|
+
# restrictions on resource type, resource labels, and metric labels.
|
203
|
+
# This field may not exceed 2048 Unicode characters in length.
|
204
|
+
# @!attribute [rw] aggregations
|
205
|
+
# @return [::Array<::Google::Cloud::Monitoring::V3::Aggregation>]
|
206
|
+
# Specifies the alignment of data points in individual time series as
|
207
|
+
# well as how to combine the retrieved time series together (such as
|
208
|
+
# when aggregating multiple streams on each resource to a single
|
209
|
+
# stream for each resource or when aggregating streams across all
|
210
|
+
# members of a group of resrouces). Multiple aggregations
|
211
|
+
# are applied in the order specified.
|
212
|
+
#
|
213
|
+
# This field is similar to the one in the [`ListTimeSeries`
|
214
|
+
# request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
|
215
|
+
# It is advisable to use the `ListTimeSeries` method when debugging this
|
216
|
+
# field.
|
217
|
+
# @!attribute [rw] denominator_filter
|
218
|
+
# @return [::String]
|
219
|
+
# A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
|
220
|
+
# identifies a time series that should be used as the denominator of a
|
221
|
+
# ratio that will be compared with the threshold. If a
|
222
|
+
# `denominator_filter` is specified, the time series specified by the
|
223
|
+
# `filter` field will be used as the numerator.
|
224
|
+
#
|
225
|
+
# The filter must specify the metric type and optionally may contain
|
226
|
+
# restrictions on resource type, resource labels, and metric labels.
|
227
|
+
# This field may not exceed 2048 Unicode characters in length.
|
228
|
+
# @!attribute [rw] denominator_aggregations
|
229
|
+
# @return [::Array<::Google::Cloud::Monitoring::V3::Aggregation>]
|
230
|
+
# Specifies the alignment of data points in individual time series
|
231
|
+
# selected by `denominatorFilter` as
|
232
|
+
# well as how to combine the retrieved time series together (such as
|
233
|
+
# when aggregating multiple streams on each resource to a single
|
234
|
+
# stream for each resource or when aggregating streams across all
|
235
|
+
# members of a group of resources).
|
236
|
+
#
|
237
|
+
# When computing ratios, the `aggregations` and
|
238
|
+
# `denominator_aggregations` fields must use the same alignment period
|
239
|
+
# and produce time series that have the same periodicity and labels.
|
240
|
+
# @!attribute [rw] comparison
|
241
|
+
# @return [::Google::Cloud::Monitoring::V3::ComparisonType]
|
242
|
+
# The comparison to apply between the time series (indicated by `filter`
|
243
|
+
# and `aggregation`) and the threshold (indicated by `threshold_value`).
|
244
|
+
# The comparison is applied on each time series, with the time series
|
245
|
+
# on the left-hand side and the threshold on the right-hand side.
|
246
|
+
#
|
247
|
+
# Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently.
|
248
|
+
# @!attribute [rw] threshold_value
|
249
|
+
# @return [::Float]
|
250
|
+
# A value against which to compare the time series.
|
251
|
+
# @!attribute [rw] duration
|
252
|
+
# @return [::Google::Protobuf::Duration]
|
253
|
+
# The amount of time that a time series must violate the
|
254
|
+
# threshold to be considered failing. Currently, only values
|
255
|
+
# that are a multiple of a minute--e.g., 0, 60, 120, or 300
|
256
|
+
# seconds--are supported. If an invalid value is given, an
|
257
|
+
# error will be returned. When choosing a duration, it is useful to
|
258
|
+
# keep in mind the frequency of the underlying time series data
|
259
|
+
# (which may also be affected by any alignments specified in the
|
260
|
+
# `aggregations` field); a good duration is long enough so that a single
|
261
|
+
# outlier does not generate spurious alerts, but short enough that
|
262
|
+
# unhealthy states are detected and alerted on quickly.
|
263
|
+
# @!attribute [rw] trigger
|
264
|
+
# @return [::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::Trigger]
|
265
|
+
# The number/percent of time series for which the comparison must hold
|
266
|
+
# in order for the condition to trigger. If unspecified, then the
|
267
|
+
# condition will trigger if the comparison is true for any of the
|
268
|
+
# time series that have been identified by `filter` and `aggregations`,
|
269
|
+
# or by the ratio, if `denominator_filter` and `denominator_aggregations`
|
270
|
+
# are specified.
|
271
|
+
class MetricThreshold
|
272
|
+
include ::Google::Protobuf::MessageExts
|
273
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
274
|
+
end
|
275
|
+
|
276
|
+
# A condition type that checks that monitored resources
|
277
|
+
# are reporting data. The configuration defines a metric and
|
278
|
+
# a set of monitored resources. The predicate is considered in violation
|
279
|
+
# when a time series for the specified metric of a monitored
|
280
|
+
# resource does not include any data in the specified `duration`.
|
281
|
+
# @!attribute [rw] filter
|
282
|
+
# @return [::String]
|
283
|
+
# A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
|
284
|
+
# identifies which time series should be compared with the threshold.
|
285
|
+
#
|
286
|
+
# The filter is similar to the one that is specified in the
|
287
|
+
# [`ListTimeSeries`
|
288
|
+
# request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
|
289
|
+
# (that call is useful to verify the time series that will be retrieved /
|
290
|
+
# processed) and must specify the metric type and optionally may contain
|
291
|
+
# restrictions on resource type, resource labels, and metric labels.
|
292
|
+
# This field may not exceed 2048 Unicode characters in length.
|
293
|
+
# @!attribute [rw] aggregations
|
294
|
+
# @return [::Array<::Google::Cloud::Monitoring::V3::Aggregation>]
|
295
|
+
# Specifies the alignment of data points in individual time series as
|
296
|
+
# well as how to combine the retrieved time series together (such as
|
297
|
+
# when aggregating multiple streams on each resource to a single
|
298
|
+
# stream for each resource or when aggregating streams across all
|
299
|
+
# members of a group of resrouces). Multiple aggregations
|
300
|
+
# are applied in the order specified.
|
301
|
+
#
|
302
|
+
# This field is similar to the one in the [`ListTimeSeries`
|
303
|
+
# request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
|
304
|
+
# It is advisable to use the `ListTimeSeries` method when debugging this
|
305
|
+
# field.
|
306
|
+
# @!attribute [rw] duration
|
307
|
+
# @return [::Google::Protobuf::Duration]
|
308
|
+
# The amount of time that a time series must fail to report new
|
309
|
+
# data to be considered failing. Currently, only values that
|
310
|
+
# are a multiple of a minute--e.g. 60, 120, or 300
|
311
|
+
# seconds--are supported. If an invalid value is given, an
|
312
|
+
# error will be returned. The `Duration.nanos` field is
|
313
|
+
# ignored.
|
314
|
+
# @!attribute [rw] trigger
|
315
|
+
# @return [::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::Trigger]
|
316
|
+
# The number/percent of time series for which the comparison must hold
|
317
|
+
# in order for the condition to trigger. If unspecified, then the
|
318
|
+
# condition will trigger if the comparison is true for any of the
|
319
|
+
# time series that have been identified by `filter` and `aggregations`.
|
320
|
+
class MetricAbsence
|
321
|
+
include ::Google::Protobuf::MessageExts
|
322
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
323
|
+
end
|
324
|
+
end
|
325
|
+
|
326
|
+
# @!attribute [rw] key
|
327
|
+
# @return [::String]
|
328
|
+
# @!attribute [rw] value
|
329
|
+
# @return [::String]
|
330
|
+
class UserLabelsEntry
|
331
|
+
include ::Google::Protobuf::MessageExts
|
332
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
333
|
+
end
|
334
|
+
|
335
|
+
# Operators for combining conditions.
|
336
|
+
module ConditionCombinerType
|
337
|
+
# An unspecified combiner.
|
338
|
+
COMBINE_UNSPECIFIED = 0
|
339
|
+
|
340
|
+
# Combine conditions using the logical `AND` operator. An
|
341
|
+
# incident is created only if all the conditions are met
|
342
|
+
# simultaneously. This combiner is satisfied if all conditions are
|
343
|
+
# met, even if they are met on completely different resources.
|
344
|
+
AND = 1
|
345
|
+
|
346
|
+
# Combine conditions using the logical `OR` operator. An incident
|
347
|
+
# is created if any of the listed conditions is met.
|
348
|
+
OR = 2
|
349
|
+
|
350
|
+
# Combine conditions using logical `AND` operator, but unlike the regular
|
351
|
+
# `AND` option, an incident is created only if all conditions are met
|
352
|
+
# simultaneously on at least one resource.
|
353
|
+
AND_WITH_MATCHING_RESOURCE = 3
|
354
|
+
end
|
355
|
+
end
|
356
|
+
end
|
357
|
+
end
|
358
|
+
end
|
359
|
+
end
|