google-cloud-monitoring-v3 0.9.0 → 0.11.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 +1 -1
- data/README.md +3 -3
- data/lib/google/cloud/monitoring/v3/alert_policy_service/client.rb +6 -8
- data/lib/google/cloud/monitoring/v3/alert_policy_service.rb +1 -1
- data/lib/google/cloud/monitoring/v3/group_service/client.rb +10 -14
- data/lib/google/cloud/monitoring/v3/group_service.rb +1 -1
- data/lib/google/cloud/monitoring/v3/metric_service/client.rb +14 -20
- data/lib/google/cloud/monitoring/v3/metric_service.rb +1 -1
- data/lib/google/cloud/monitoring/v3/notification_channel_service/client.rb +10 -14
- data/lib/google/cloud/monitoring/v3/notification_channel_service.rb +1 -1
- data/lib/google/cloud/monitoring/v3/query_service/client.rb +6 -8
- data/lib/google/cloud/monitoring/v3/query_service.rb +1 -1
- data/lib/google/cloud/monitoring/v3/service_monitoring_service/client.rb +10 -14
- data/lib/google/cloud/monitoring/v3/service_monitoring_service.rb +1 -1
- data/lib/google/cloud/monitoring/v3/snooze_service/client.rb +746 -0
- data/lib/google/cloud/monitoring/v3/snooze_service/credentials.rb +53 -0
- data/lib/google/cloud/monitoring/v3/snooze_service/paths.rb +149 -0
- data/lib/google/cloud/monitoring/v3/snooze_service.rb +51 -0
- data/lib/google/cloud/monitoring/v3/uptime_check_service/client.rb +23 -21
- data/lib/google/cloud/monitoring/v3/uptime_check_service.rb +6 -6
- data/lib/google/cloud/monitoring/v3/version.rb +1 -1
- data/lib/google/cloud/monitoring/v3.rb +3 -2
- data/lib/google/monitoring/v3/snooze_pb.rb +33 -0
- data/lib/google/monitoring/v3/snooze_service_pb.rb +51 -0
- data/lib/google/monitoring/v3/snooze_service_services_pb.rb +57 -0
- data/lib/google/monitoring/v3/uptime_pb.rb +54 -0
- data/lib/google/monitoring/v3/uptime_service_pb.rb +1 -0
- data/lib/google/monitoring/v3/uptime_service_services_pb.rb +5 -5
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/distribution.rb +2 -0
- data/proto_docs/google/api/launch_stage.rb +3 -3
- data/proto_docs/google/api/metric.rb +10 -6
- data/proto_docs/google/api/monitored_resource.rb +30 -18
- data/proto_docs/google/monitoring/v3/snooze.rb +74 -0
- data/proto_docs/google/monitoring/v3/snooze_service.rb +154 -0
- data/proto_docs/google/monitoring/v3/uptime.rb +184 -14
- data/proto_docs/google/monitoring/v3/uptime_service.rb +8 -1
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +18 -8
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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 SnoozeService
|
26
|
+
# Credentials for the SnoozeService 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,149 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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 SnoozeService
|
25
|
+
# Path helper methods for the SnoozeService API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified AlertPolicy resource string.
|
29
|
+
#
|
30
|
+
# @overload alert_policy_path(project:, alert_policy:)
|
31
|
+
# The resource will be in the following format:
|
32
|
+
#
|
33
|
+
# `projects/{project}/alertPolicies/{alert_policy}`
|
34
|
+
#
|
35
|
+
# @param project [String]
|
36
|
+
# @param alert_policy [String]
|
37
|
+
#
|
38
|
+
# @overload alert_policy_path(organization:, alert_policy:)
|
39
|
+
# The resource will be in the following format:
|
40
|
+
#
|
41
|
+
# `organizations/{organization}/alertPolicies/{alert_policy}`
|
42
|
+
#
|
43
|
+
# @param organization [String]
|
44
|
+
# @param alert_policy [String]
|
45
|
+
#
|
46
|
+
# @overload alert_policy_path(folder:, alert_policy:)
|
47
|
+
# The resource will be in the following format:
|
48
|
+
#
|
49
|
+
# `folders/{folder}/alertPolicies/{alert_policy}`
|
50
|
+
#
|
51
|
+
# @param folder [String]
|
52
|
+
# @param alert_policy [String]
|
53
|
+
#
|
54
|
+
# @return [::String]
|
55
|
+
def alert_policy_path **args
|
56
|
+
resources = {
|
57
|
+
"alert_policy:project" => (proc do |project:, alert_policy:|
|
58
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
59
|
+
|
60
|
+
"projects/#{project}/alertPolicies/#{alert_policy}"
|
61
|
+
end),
|
62
|
+
"alert_policy:organization" => (proc do |organization:, alert_policy:|
|
63
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
64
|
+
|
65
|
+
"organizations/#{organization}/alertPolicies/#{alert_policy}"
|
66
|
+
end),
|
67
|
+
"alert_policy:folder" => (proc do |folder:, alert_policy:|
|
68
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
69
|
+
|
70
|
+
"folders/#{folder}/alertPolicies/#{alert_policy}"
|
71
|
+
end)
|
72
|
+
}
|
73
|
+
|
74
|
+
resource = resources[args.keys.sort.join(":")]
|
75
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
76
|
+
resource.call(**args)
|
77
|
+
end
|
78
|
+
|
79
|
+
##
|
80
|
+
# Create a fully-qualified Project resource string.
|
81
|
+
#
|
82
|
+
# The resource will be in the following format:
|
83
|
+
#
|
84
|
+
# `projects/{project}`
|
85
|
+
#
|
86
|
+
# @param project [String]
|
87
|
+
#
|
88
|
+
# @return [::String]
|
89
|
+
def project_path project:
|
90
|
+
"projects/#{project}"
|
91
|
+
end
|
92
|
+
|
93
|
+
##
|
94
|
+
# Create a fully-qualified Snooze resource string.
|
95
|
+
#
|
96
|
+
# The resource will be in the following format:
|
97
|
+
#
|
98
|
+
# `projects/{project}/snoozes/{snooze}`
|
99
|
+
#
|
100
|
+
# @param project [String]
|
101
|
+
# @param snooze [String]
|
102
|
+
#
|
103
|
+
# @return [::String]
|
104
|
+
def snooze_path project:, snooze:
|
105
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
106
|
+
|
107
|
+
"projects/#{project}/snoozes/#{snooze}"
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Create a fully-qualified Workspace resource string.
|
112
|
+
#
|
113
|
+
# @overload workspace_path(project:)
|
114
|
+
# The resource will be in the following format:
|
115
|
+
#
|
116
|
+
# `projects/{project}`
|
117
|
+
#
|
118
|
+
# @param project [String]
|
119
|
+
#
|
120
|
+
# @overload workspace_path(workspace:)
|
121
|
+
# The resource will be in the following format:
|
122
|
+
#
|
123
|
+
# `workspaces/{workspace}`
|
124
|
+
#
|
125
|
+
# @param workspace [String]
|
126
|
+
#
|
127
|
+
# @return [::String]
|
128
|
+
def workspace_path **args
|
129
|
+
resources = {
|
130
|
+
"project" => (proc do |project:|
|
131
|
+
"projects/#{project}"
|
132
|
+
end),
|
133
|
+
"workspace" => (proc do |workspace:|
|
134
|
+
"workspaces/#{workspace}"
|
135
|
+
end)
|
136
|
+
}
|
137
|
+
|
138
|
+
resource = resources[args.keys.sort.join(":")]
|
139
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
140
|
+
resource.call(**args)
|
141
|
+
end
|
142
|
+
|
143
|
+
extend self
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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 "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/monitoring/v3/version"
|
24
|
+
|
25
|
+
require "google/cloud/monitoring/v3/snooze_service/credentials"
|
26
|
+
require "google/cloud/monitoring/v3/snooze_service/paths"
|
27
|
+
require "google/cloud/monitoring/v3/snooze_service/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Cloud
|
31
|
+
module Monitoring
|
32
|
+
module V3
|
33
|
+
##
|
34
|
+
# The SnoozeService API is used to temporarily prevent an alert policy from
|
35
|
+
# generating alerts. A Snooze is a description of the criteria under which one
|
36
|
+
# or more alert policies should not fire alerts for the specified duration.
|
37
|
+
#
|
38
|
+
# @example Load this service and instantiate a gRPC client
|
39
|
+
#
|
40
|
+
# require "google/cloud/monitoring/v3/snooze_service"
|
41
|
+
# client = ::Google::Cloud::Monitoring::V3::SnoozeService::Client.new
|
42
|
+
#
|
43
|
+
module SnoozeService
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
helper_path = ::File.join __dir__, "snooze_service", "helpers.rb"
|
51
|
+
require "google/cloud/monitoring/v3/snooze_service/helpers" if ::File.file? helper_path
|
@@ -28,13 +28,13 @@ module Google
|
|
28
28
|
# Client for the UptimeCheckService service.
|
29
29
|
#
|
30
30
|
# The UptimeCheckService API is used to manage (list, create, delete, edit)
|
31
|
-
# Uptime check configurations in the
|
31
|
+
# Uptime check configurations in the Cloud Monitoring product. An Uptime
|
32
32
|
# check is a piece of configuration that determines which resources and
|
33
33
|
# services to monitor for availability. These configurations can also be
|
34
|
-
# configured interactively by navigating to the [Cloud
|
35
|
-
# (
|
36
|
-
# clicking on "Monitoring" on the left-hand side to navigate to
|
37
|
-
# and then clicking on "Uptime".
|
34
|
+
# configured interactively by navigating to the [Cloud console]
|
35
|
+
# (https://console.cloud.google.com), selecting the appropriate project,
|
36
|
+
# clicking on "Monitoring" on the left-hand side to navigate to Cloud
|
37
|
+
# Monitoring, and then clicking on "Uptime".
|
38
38
|
#
|
39
39
|
class Client
|
40
40
|
include Paths
|
@@ -189,7 +189,7 @@ module Google
|
|
189
189
|
# @param options [::Gapic::CallOptions, ::Hash]
|
190
190
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
191
191
|
#
|
192
|
-
# @overload list_uptime_check_configs(parent: nil, page_size: nil, page_token: nil)
|
192
|
+
# @overload list_uptime_check_configs(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
193
193
|
# Pass arguments to `list_uptime_check_configs` via keyword arguments. Note that at
|
194
194
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
195
195
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -200,6 +200,12 @@ module Google
|
|
200
200
|
# Uptime check configurations are listed. The format is:
|
201
201
|
#
|
202
202
|
# projects/[PROJECT_ID_OR_NUMBER]
|
203
|
+
# @param filter [::String]
|
204
|
+
# If provided, this field specifies the criteria that must be met by
|
205
|
+
# uptime checks to be included in the response.
|
206
|
+
#
|
207
|
+
# For more details, see [Filtering
|
208
|
+
# syntax](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering#filter_syntax).
|
203
209
|
# @param page_size [::Integer]
|
204
210
|
# The maximum number of results to return in a single response. The server
|
205
211
|
# may further constrain the maximum number of results returned in a single
|
@@ -230,13 +236,11 @@ module Google
|
|
230
236
|
# # Call the list_uptime_check_configs method.
|
231
237
|
# result = client.list_uptime_check_configs request
|
232
238
|
#
|
233
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
234
|
-
# #
|
235
|
-
#
|
236
|
-
# # methods are also available for managing paging directly.
|
237
|
-
# result.each do |response|
|
239
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
240
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
241
|
+
# result.each do |item|
|
238
242
|
# # Each element is of type ::Google::Cloud::Monitoring::V3::UptimeCheckConfig.
|
239
|
-
# p
|
243
|
+
# p item
|
240
244
|
# end
|
241
245
|
#
|
242
246
|
def list_uptime_check_configs request, options = nil
|
@@ -490,7 +494,7 @@ module Google
|
|
490
494
|
# the values for the set of fields mentioned in the `updateMask`. If an
|
491
495
|
# `updateMask` has not been given, this Uptime check configuration replaces
|
492
496
|
# the current configuration. If a field is mentioned in `updateMask` but
|
493
|
-
# the
|
497
|
+
# the corresponding field is omitted in this partial Uptime check
|
494
498
|
# configuration, it has the effect of deleting/clearing the field from the
|
495
499
|
# configuration on the server.
|
496
500
|
#
|
@@ -701,13 +705,11 @@ module Google
|
|
701
705
|
# # Call the list_uptime_check_ips method.
|
702
706
|
# result = client.list_uptime_check_ips request
|
703
707
|
#
|
704
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
705
|
-
# #
|
706
|
-
#
|
707
|
-
# # methods are also available for managing paging directly.
|
708
|
-
# result.each do |response|
|
708
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
709
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
710
|
+
# result.each do |item|
|
709
711
|
# # Each element is of type ::Google::Cloud::Monitoring::V3::UptimeCheckIp.
|
710
|
-
# p
|
712
|
+
# p item
|
711
713
|
# end
|
712
714
|
#
|
713
715
|
def list_uptime_check_ips request, options = nil
|
@@ -782,9 +784,9 @@ module Google
|
|
782
784
|
# * (`String`) The path to a service account key file in JSON format
|
783
785
|
# * (`Hash`) A service account key as a Hash
|
784
786
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
785
|
-
# (see the [googleauth docs](https://
|
787
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
786
788
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
787
|
-
# (see the [signet docs](https://
|
789
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
788
790
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
789
791
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
790
792
|
# * (`nil`) indicating no credentials
|
@@ -32,15 +32,15 @@ module Google
|
|
32
32
|
module V3
|
33
33
|
##
|
34
34
|
# The UptimeCheckService API is used to manage (list, create, delete, edit)
|
35
|
-
# Uptime check configurations in the
|
35
|
+
# Uptime check configurations in the Cloud Monitoring product. An Uptime
|
36
36
|
# check is a piece of configuration that determines which resources and
|
37
37
|
# services to monitor for availability. These configurations can also be
|
38
|
-
# configured interactively by navigating to the [Cloud
|
39
|
-
# (
|
40
|
-
# clicking on "Monitoring" on the left-hand side to navigate to
|
41
|
-
# and then clicking on "Uptime".
|
38
|
+
# configured interactively by navigating to the [Cloud console]
|
39
|
+
# (https://console.cloud.google.com), selecting the appropriate project,
|
40
|
+
# clicking on "Monitoring" on the left-hand side to navigate to Cloud
|
41
|
+
# Monitoring, and then clicking on "Uptime".
|
42
42
|
#
|
43
|
-
#
|
43
|
+
# @example Load this service and instantiate a gRPC client
|
44
44
|
#
|
45
45
|
# require "google/cloud/monitoring/v3/uptime_check_service"
|
46
46
|
# client = ::Google::Cloud::Monitoring::V3::UptimeCheckService::Client.new
|
@@ -22,6 +22,7 @@ require "google/cloud/monitoring/v3/metric_service"
|
|
22
22
|
require "google/cloud/monitoring/v3/notification_channel_service"
|
23
23
|
require "google/cloud/monitoring/v3/query_service"
|
24
24
|
require "google/cloud/monitoring/v3/service_monitoring_service"
|
25
|
+
require "google/cloud/monitoring/v3/snooze_service"
|
25
26
|
require "google/cloud/monitoring/v3/uptime_check_service"
|
26
27
|
require "google/cloud/monitoring/v3/version"
|
27
28
|
|
@@ -29,9 +30,9 @@ module Google
|
|
29
30
|
module Cloud
|
30
31
|
module Monitoring
|
31
32
|
##
|
32
|
-
#
|
33
|
+
# API client module.
|
33
34
|
#
|
34
|
-
# @example
|
35
|
+
# @example Load this package, including all its services, and instantiate a gRPC client
|
35
36
|
#
|
36
37
|
# require "google/cloud/monitoring/v3"
|
37
38
|
# client = ::Google::Cloud::Monitoring::V3::AlertPolicyService::Client.new
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/monitoring/v3/snooze.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/field_behavior_pb'
|
7
|
+
require 'google/api/resource_pb'
|
8
|
+
require 'google/monitoring/v3/common_pb'
|
9
|
+
|
10
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
|
+
add_file("google/monitoring/v3/snooze.proto", :syntax => :proto3) do
|
12
|
+
add_message "google.monitoring.v3.Snooze" do
|
13
|
+
optional :name, :string, 1
|
14
|
+
optional :criteria, :message, 3, "google.monitoring.v3.Snooze.Criteria"
|
15
|
+
optional :interval, :message, 4, "google.monitoring.v3.TimeInterval"
|
16
|
+
optional :display_name, :string, 5
|
17
|
+
end
|
18
|
+
add_message "google.monitoring.v3.Snooze.Criteria" do
|
19
|
+
repeated :policies, :string, 1
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
module Google
|
25
|
+
module Cloud
|
26
|
+
module Monitoring
|
27
|
+
module V3
|
28
|
+
Snooze = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.Snooze").msgclass
|
29
|
+
Snooze::Criteria = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.Snooze.Criteria").msgclass
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/monitoring/v3/snooze_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/snooze_pb'
|
11
|
+
require 'google/protobuf/field_mask_pb'
|
12
|
+
|
13
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
|
+
add_file("google/monitoring/v3/snooze_service.proto", :syntax => :proto3) do
|
15
|
+
add_message "google.monitoring.v3.CreateSnoozeRequest" do
|
16
|
+
optional :parent, :string, 1
|
17
|
+
optional :snooze, :message, 2, "google.monitoring.v3.Snooze"
|
18
|
+
end
|
19
|
+
add_message "google.monitoring.v3.ListSnoozesRequest" do
|
20
|
+
optional :parent, :string, 1
|
21
|
+
optional :filter, :string, 2
|
22
|
+
optional :page_size, :int32, 4
|
23
|
+
optional :page_token, :string, 5
|
24
|
+
end
|
25
|
+
add_message "google.monitoring.v3.ListSnoozesResponse" do
|
26
|
+
repeated :snoozes, :message, 1, "google.monitoring.v3.Snooze"
|
27
|
+
optional :next_page_token, :string, 2
|
28
|
+
end
|
29
|
+
add_message "google.monitoring.v3.GetSnoozeRequest" do
|
30
|
+
optional :name, :string, 1
|
31
|
+
end
|
32
|
+
add_message "google.monitoring.v3.UpdateSnoozeRequest" do
|
33
|
+
optional :snooze, :message, 1, "google.monitoring.v3.Snooze"
|
34
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
module Google
|
40
|
+
module Cloud
|
41
|
+
module Monitoring
|
42
|
+
module V3
|
43
|
+
CreateSnoozeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.CreateSnoozeRequest").msgclass
|
44
|
+
ListSnoozesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.ListSnoozesRequest").msgclass
|
45
|
+
ListSnoozesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.ListSnoozesResponse").msgclass
|
46
|
+
GetSnoozeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.GetSnoozeRequest").msgclass
|
47
|
+
UpdateSnoozeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.monitoring.v3.UpdateSnoozeRequest").msgclass
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/monitoring/v3/snooze_service.proto for package 'Google.Cloud.Monitoring.V3'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2022 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/snooze_service_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Monitoring
|
25
|
+
module V3
|
26
|
+
module SnoozeService
|
27
|
+
# The SnoozeService API is used to temporarily prevent an alert policy from
|
28
|
+
# generating alerts. A Snooze is a description of the criteria under which one
|
29
|
+
# or more alert policies should not fire alerts for the specified duration.
|
30
|
+
class Service
|
31
|
+
|
32
|
+
include ::GRPC::GenericService
|
33
|
+
|
34
|
+
self.marshal_class_method = :encode
|
35
|
+
self.unmarshal_class_method = :decode
|
36
|
+
self.service_name = 'google.monitoring.v3.SnoozeService'
|
37
|
+
|
38
|
+
# Creates a `Snooze` that will prevent alerts, which match the provided
|
39
|
+
# criteria, from being opened. The `Snooze` applies for a specific time
|
40
|
+
# interval.
|
41
|
+
rpc :CreateSnooze, ::Google::Cloud::Monitoring::V3::CreateSnoozeRequest, ::Google::Cloud::Monitoring::V3::Snooze
|
42
|
+
# Lists the `Snooze`s associated with a project. Can optionally pass in
|
43
|
+
# `filter`, which specifies predicates to match `Snooze`s.
|
44
|
+
rpc :ListSnoozes, ::Google::Cloud::Monitoring::V3::ListSnoozesRequest, ::Google::Cloud::Monitoring::V3::ListSnoozesResponse
|
45
|
+
# Retrieves a `Snooze` by `name`.
|
46
|
+
rpc :GetSnooze, ::Google::Cloud::Monitoring::V3::GetSnoozeRequest, ::Google::Cloud::Monitoring::V3::Snooze
|
47
|
+
# Updates a `Snooze`, identified by its `name`, with the parameters in the
|
48
|
+
# given `Snooze` object.
|
49
|
+
rpc :UpdateSnooze, ::Google::Cloud::Monitoring::V3::UpdateSnoozeRequest, ::Google::Cloud::Monitoring::V3::Snooze
|
50
|
+
end
|
51
|
+
|
52
|
+
Stub = Service.rpc_stub_class
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|