google-apis-monitoring_v3 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2043 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module MonitoringV3
23
+ # Cloud Monitoring API
24
+ #
25
+ # Manages your Cloud Monitoring data and configurations. Most projects must be
26
+ # associated with a Workspace, with a few exceptions as noted on the individual
27
+ # method pages. The table entries below are presented in alphabetical order, not
28
+ # in order of common use. For explanations of the concepts found in the table
29
+ # entries, read the Cloud Monitoring documentation.
30
+ #
31
+ # @example
32
+ # require 'google/apis/monitoring_v3'
33
+ #
34
+ # Monitoring = Google::Apis::MonitoringV3 # Alias the module
35
+ # service = Monitoring::MonitoringService.new
36
+ #
37
+ # @see https://cloud.google.com/monitoring/api/
38
+ class MonitoringService < Google::Apis::Core::BaseService
39
+ # @return [String]
40
+ # API key. Your API key identifies your project and provides you with API access,
41
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
42
+ attr_accessor :key
43
+
44
+ # @return [String]
45
+ # Available to use for quota purposes for server-side applications. Can be any
46
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
47
+ attr_accessor :quota_user
48
+
49
+ def initialize
50
+ super('https://monitoring.googleapis.com/', '',
51
+ client_name: 'google-apis-monitoring_v3',
52
+ client_version: Google::Apis::MonitoringV3::GEM_VERSION)
53
+ @batch_path = 'batch'
54
+ end
55
+
56
+ # Creates a new alerting policy.
57
+ # @param [String] name
58
+ # Required. The project in which to create the alerting policy. The format is:
59
+ # projects/[PROJECT_ID_OR_NUMBER] Note that this field names the parent
60
+ # container in which the alerting policy will be written, not the name of the
61
+ # created policy. |name| must be a host project of a workspace, otherwise
62
+ # INVALID_ARGUMENT error will return. The alerting policy that is returned will
63
+ # have a name that contains a normalized representation of this name as a prefix
64
+ # but adds a suffix of the form /alertPolicies/[ALERT_POLICY_ID], identifying
65
+ # the policy in the container.
66
+ # @param [Google::Apis::MonitoringV3::AlertPolicy] alert_policy_object
67
+ # @param [String] fields
68
+ # Selector specifying which fields to include in a partial response.
69
+ # @param [String] quota_user
70
+ # Available to use for quota purposes for server-side applications. Can be any
71
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
72
+ # @param [Google::Apis::RequestOptions] options
73
+ # Request-specific options
74
+ #
75
+ # @yield [result, err] Result & error if block supplied
76
+ # @yieldparam result [Google::Apis::MonitoringV3::AlertPolicy] parsed result object
77
+ # @yieldparam err [StandardError] error object if request failed
78
+ #
79
+ # @return [Google::Apis::MonitoringV3::AlertPolicy]
80
+ #
81
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
82
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
83
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
84
+ def create_project_alert_policy(name, alert_policy_object = nil, fields: nil, quota_user: nil, options: nil, &block)
85
+ command = make_simple_command(:post, 'v3/{+name}/alertPolicies', options)
86
+ command.request_representation = Google::Apis::MonitoringV3::AlertPolicy::Representation
87
+ command.request_object = alert_policy_object
88
+ command.response_representation = Google::Apis::MonitoringV3::AlertPolicy::Representation
89
+ command.response_class = Google::Apis::MonitoringV3::AlertPolicy
90
+ command.params['name'] = name unless name.nil?
91
+ command.query['fields'] = fields unless fields.nil?
92
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
93
+ execute_or_queue_command(command, &block)
94
+ end
95
+
96
+ # Deletes an alerting policy.
97
+ # @param [String] name
98
+ # Required. The alerting policy to delete. The format is: projects/[
99
+ # PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] For more information,
100
+ # see AlertPolicy.
101
+ # @param [String] fields
102
+ # Selector specifying which fields to include in a partial response.
103
+ # @param [String] quota_user
104
+ # Available to use for quota purposes for server-side applications. Can be any
105
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
106
+ # @param [Google::Apis::RequestOptions] options
107
+ # Request-specific options
108
+ #
109
+ # @yield [result, err] Result & error if block supplied
110
+ # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object
111
+ # @yieldparam err [StandardError] error object if request failed
112
+ #
113
+ # @return [Google::Apis::MonitoringV3::Empty]
114
+ #
115
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
116
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
117
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
118
+ def delete_project_alert_policy(name, fields: nil, quota_user: nil, options: nil, &block)
119
+ command = make_simple_command(:delete, 'v3/{+name}', options)
120
+ command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
121
+ command.response_class = Google::Apis::MonitoringV3::Empty
122
+ command.params['name'] = name unless name.nil?
123
+ command.query['fields'] = fields unless fields.nil?
124
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
125
+ execute_or_queue_command(command, &block)
126
+ end
127
+
128
+ # Gets a single alerting policy.
129
+ # @param [String] name
130
+ # Required. The alerting policy to retrieve. The format is: projects/[
131
+ # PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
132
+ # @param [String] fields
133
+ # Selector specifying which fields to include in a partial response.
134
+ # @param [String] quota_user
135
+ # Available to use for quota purposes for server-side applications. Can be any
136
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
137
+ # @param [Google::Apis::RequestOptions] options
138
+ # Request-specific options
139
+ #
140
+ # @yield [result, err] Result & error if block supplied
141
+ # @yieldparam result [Google::Apis::MonitoringV3::AlertPolicy] parsed result object
142
+ # @yieldparam err [StandardError] error object if request failed
143
+ #
144
+ # @return [Google::Apis::MonitoringV3::AlertPolicy]
145
+ #
146
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
147
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
148
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
149
+ def get_project_alert_policy(name, fields: nil, quota_user: nil, options: nil, &block)
150
+ command = make_simple_command(:get, 'v3/{+name}', options)
151
+ command.response_representation = Google::Apis::MonitoringV3::AlertPolicy::Representation
152
+ command.response_class = Google::Apis::MonitoringV3::AlertPolicy
153
+ command.params['name'] = name unless name.nil?
154
+ command.query['fields'] = fields unless fields.nil?
155
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
156
+ execute_or_queue_command(command, &block)
157
+ end
158
+
159
+ # Lists the existing alerting policies for the workspace.
160
+ # @param [String] name
161
+ # Required. The project whose alert policies are to be listed. The format is:
162
+ # projects/[PROJECT_ID_OR_NUMBER] Note that this field names the parent
163
+ # container in which the alerting policies to be listed are stored. To retrieve
164
+ # a single alerting policy by name, use the GetAlertPolicy operation, instead.
165
+ # @param [String] filter
166
+ # If provided, this field specifies the criteria that must be met by alert
167
+ # policies to be included in the response.For more details, see sorting and
168
+ # filtering (https://cloud.google.com/monitoring/api/v3/sorting-and-filtering).
169
+ # @param [String] order_by
170
+ # A comma-separated list of fields by which to sort the result. Supports the
171
+ # same set of field references as the filter field. Entries can be prefixed with
172
+ # a minus sign to sort by the field in descending order.For more details, see
173
+ # sorting and filtering (https://cloud.google.com/monitoring/api/v3/sorting-and-
174
+ # filtering).
175
+ # @param [Fixnum] page_size
176
+ # The maximum number of results to return in a single response.
177
+ # @param [String] page_token
178
+ # If this field is not empty then it must contain the nextPageToken value
179
+ # returned by a previous call to this method. Using this field causes the method
180
+ # to return more results from the previous method call.
181
+ # @param [String] fields
182
+ # Selector specifying which fields to include in a partial response.
183
+ # @param [String] quota_user
184
+ # Available to use for quota purposes for server-side applications. Can be any
185
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
186
+ # @param [Google::Apis::RequestOptions] options
187
+ # Request-specific options
188
+ #
189
+ # @yield [result, err] Result & error if block supplied
190
+ # @yieldparam result [Google::Apis::MonitoringV3::ListAlertPoliciesResponse] parsed result object
191
+ # @yieldparam err [StandardError] error object if request failed
192
+ #
193
+ # @return [Google::Apis::MonitoringV3::ListAlertPoliciesResponse]
194
+ #
195
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
196
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
197
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
198
+ def list_project_alert_policies(name, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
199
+ command = make_simple_command(:get, 'v3/{+name}/alertPolicies', options)
200
+ command.response_representation = Google::Apis::MonitoringV3::ListAlertPoliciesResponse::Representation
201
+ command.response_class = Google::Apis::MonitoringV3::ListAlertPoliciesResponse
202
+ command.params['name'] = name unless name.nil?
203
+ command.query['filter'] = filter unless filter.nil?
204
+ command.query['orderBy'] = order_by unless order_by.nil?
205
+ command.query['pageSize'] = page_size unless page_size.nil?
206
+ command.query['pageToken'] = page_token unless page_token.nil?
207
+ command.query['fields'] = fields unless fields.nil?
208
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
209
+ execute_or_queue_command(command, &block)
210
+ end
211
+
212
+ # Updates an alerting policy. You can either replace the entire policy with a
213
+ # new one or replace only certain fields in the current alerting policy by
214
+ # specifying the fields to be updated via updateMask. Returns the updated
215
+ # alerting policy.
216
+ # @param [String] name
217
+ # Required if the policy exists. The resource name for this policy. The format
218
+ # is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] [
219
+ # ALERT_POLICY_ID] is assigned by Stackdriver Monitoring when the policy is
220
+ # created. When calling the alertPolicies.create method, do not include the name
221
+ # field in the alerting policy passed as part of the request.
222
+ # @param [Google::Apis::MonitoringV3::AlertPolicy] alert_policy_object
223
+ # @param [String] update_mask
224
+ # Optional. A list of alerting policy field names. If this field is not empty,
225
+ # each listed field in the existing alerting policy is set to the value of the
226
+ # corresponding field in the supplied policy (alert_policy), or to the field's
227
+ # default value if the field is not in the supplied alerting policy. Fields not
228
+ # listed retain their previous value.Examples of valid field masks include
229
+ # display_name, documentation, documentation.content, documentation.mime_type,
230
+ # user_labels, user_label.nameofkey, enabled, conditions, combiner, etc.If this
231
+ # field is empty, then the supplied alerting policy replaces the existing policy.
232
+ # It is the same as deleting the existing policy and adding the supplied policy,
233
+ # except for the following: The new policy will have the same [ALERT_POLICY_ID]
234
+ # as the former policy. This gives you continuity with the former policy in your
235
+ # notifications and incidents. Conditions in the new policy will keep their
236
+ # former [CONDITION_ID] if the supplied condition includes the name field with
237
+ # that [CONDITION_ID]. If the supplied condition omits the name field, then a
238
+ # new [CONDITION_ID] is created.
239
+ # @param [String] fields
240
+ # Selector specifying which fields to include in a partial response.
241
+ # @param [String] quota_user
242
+ # Available to use for quota purposes for server-side applications. Can be any
243
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
244
+ # @param [Google::Apis::RequestOptions] options
245
+ # Request-specific options
246
+ #
247
+ # @yield [result, err] Result & error if block supplied
248
+ # @yieldparam result [Google::Apis::MonitoringV3::AlertPolicy] parsed result object
249
+ # @yieldparam err [StandardError] error object if request failed
250
+ #
251
+ # @return [Google::Apis::MonitoringV3::AlertPolicy]
252
+ #
253
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
254
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
255
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
256
+ def patch_project_alert_policy(name, alert_policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
257
+ command = make_simple_command(:patch, 'v3/{+name}', options)
258
+ command.request_representation = Google::Apis::MonitoringV3::AlertPolicy::Representation
259
+ command.request_object = alert_policy_object
260
+ command.response_representation = Google::Apis::MonitoringV3::AlertPolicy::Representation
261
+ command.response_class = Google::Apis::MonitoringV3::AlertPolicy
262
+ command.params['name'] = name unless name.nil?
263
+ command.query['updateMask'] = update_mask unless update_mask.nil?
264
+ command.query['fields'] = fields unless fields.nil?
265
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
266
+ execute_or_queue_command(command, &block)
267
+ end
268
+
269
+ # Stackdriver Monitoring Agent only: Creates a new time series.This method is
270
+ # only for use by the Stackdriver Monitoring Agent. Use projects.timeSeries.
271
+ # create instead.
272
+ # @param [String] name
273
+ # The project in which to create the time series. The format is: projects/[
274
+ # PROJECT_ID_OR_NUMBER]
275
+ # @param [Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest] create_collectd_time_series_request_object
276
+ # @param [String] fields
277
+ # Selector specifying which fields to include in a partial response.
278
+ # @param [String] quota_user
279
+ # Available to use for quota purposes for server-side applications. Can be any
280
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
281
+ # @param [Google::Apis::RequestOptions] options
282
+ # Request-specific options
283
+ #
284
+ # @yield [result, err] Result & error if block supplied
285
+ # @yieldparam result [Google::Apis::MonitoringV3::CreateCollectdTimeSeriesResponse] parsed result object
286
+ # @yieldparam err [StandardError] error object if request failed
287
+ #
288
+ # @return [Google::Apis::MonitoringV3::CreateCollectdTimeSeriesResponse]
289
+ #
290
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
291
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
292
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
293
+ def create_collectd_time_series(name, create_collectd_time_series_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
294
+ command = make_simple_command(:post, 'v3/{+name}/collectdTimeSeries', options)
295
+ command.request_representation = Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest::Representation
296
+ command.request_object = create_collectd_time_series_request_object
297
+ command.response_representation = Google::Apis::MonitoringV3::CreateCollectdTimeSeriesResponse::Representation
298
+ command.response_class = Google::Apis::MonitoringV3::CreateCollectdTimeSeriesResponse
299
+ command.params['name'] = name unless name.nil?
300
+ command.query['fields'] = fields unless fields.nil?
301
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
302
+ execute_or_queue_command(command, &block)
303
+ end
304
+
305
+ # Creates a new group.
306
+ # @param [String] name
307
+ # Required. The project in which to create the group. The format is: projects/[
308
+ # PROJECT_ID_OR_NUMBER]
309
+ # @param [Google::Apis::MonitoringV3::Group] group_object
310
+ # @param [Boolean] validate_only
311
+ # If true, validate this request but do not create the group.
312
+ # @param [String] fields
313
+ # Selector specifying which fields to include in a partial response.
314
+ # @param [String] quota_user
315
+ # Available to use for quota purposes for server-side applications. Can be any
316
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
317
+ # @param [Google::Apis::RequestOptions] options
318
+ # Request-specific options
319
+ #
320
+ # @yield [result, err] Result & error if block supplied
321
+ # @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object
322
+ # @yieldparam err [StandardError] error object if request failed
323
+ #
324
+ # @return [Google::Apis::MonitoringV3::Group]
325
+ #
326
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
327
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
328
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
329
+ def create_project_group(name, group_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
330
+ command = make_simple_command(:post, 'v3/{+name}/groups', options)
331
+ command.request_representation = Google::Apis::MonitoringV3::Group::Representation
332
+ command.request_object = group_object
333
+ command.response_representation = Google::Apis::MonitoringV3::Group::Representation
334
+ command.response_class = Google::Apis::MonitoringV3::Group
335
+ command.params['name'] = name unless name.nil?
336
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
337
+ command.query['fields'] = fields unless fields.nil?
338
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
339
+ execute_or_queue_command(command, &block)
340
+ end
341
+
342
+ # Deletes an existing group.
343
+ # @param [String] name
344
+ # Required. The group to delete. The format is: projects/[PROJECT_ID_OR_NUMBER]/
345
+ # groups/[GROUP_ID]
346
+ # @param [Boolean] recursive
347
+ # If this field is true, then the request means to delete a group with all its
348
+ # descendants. Otherwise, the request means to delete a group only when it has
349
+ # no descendants. The default value is false.
350
+ # @param [String] fields
351
+ # Selector specifying which fields to include in a partial response.
352
+ # @param [String] quota_user
353
+ # Available to use for quota purposes for server-side applications. Can be any
354
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
355
+ # @param [Google::Apis::RequestOptions] options
356
+ # Request-specific options
357
+ #
358
+ # @yield [result, err] Result & error if block supplied
359
+ # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object
360
+ # @yieldparam err [StandardError] error object if request failed
361
+ #
362
+ # @return [Google::Apis::MonitoringV3::Empty]
363
+ #
364
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
365
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
366
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
367
+ def delete_project_group(name, recursive: nil, fields: nil, quota_user: nil, options: nil, &block)
368
+ command = make_simple_command(:delete, 'v3/{+name}', options)
369
+ command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
370
+ command.response_class = Google::Apis::MonitoringV3::Empty
371
+ command.params['name'] = name unless name.nil?
372
+ command.query['recursive'] = recursive unless recursive.nil?
373
+ command.query['fields'] = fields unless fields.nil?
374
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
375
+ execute_or_queue_command(command, &block)
376
+ end
377
+
378
+ # Gets a single group.
379
+ # @param [String] name
380
+ # Required. The group to retrieve. The format is: projects/[PROJECT_ID_OR_NUMBER]
381
+ # /groups/[GROUP_ID]
382
+ # @param [String] fields
383
+ # Selector specifying which fields to include in a partial response.
384
+ # @param [String] quota_user
385
+ # Available to use for quota purposes for server-side applications. Can be any
386
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
387
+ # @param [Google::Apis::RequestOptions] options
388
+ # Request-specific options
389
+ #
390
+ # @yield [result, err] Result & error if block supplied
391
+ # @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object
392
+ # @yieldparam err [StandardError] error object if request failed
393
+ #
394
+ # @return [Google::Apis::MonitoringV3::Group]
395
+ #
396
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
397
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
398
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
399
+ def get_project_group(name, fields: nil, quota_user: nil, options: nil, &block)
400
+ command = make_simple_command(:get, 'v3/{+name}', options)
401
+ command.response_representation = Google::Apis::MonitoringV3::Group::Representation
402
+ command.response_class = Google::Apis::MonitoringV3::Group
403
+ command.params['name'] = name unless name.nil?
404
+ command.query['fields'] = fields unless fields.nil?
405
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
406
+ execute_or_queue_command(command, &block)
407
+ end
408
+
409
+ # Lists the existing groups.
410
+ # @param [String] name
411
+ # Required. The project whose groups are to be listed. The format is: projects/[
412
+ # PROJECT_ID_OR_NUMBER]
413
+ # @param [String] ancestors_of_group
414
+ # A group name. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
415
+ # Returns groups that are ancestors of the specified group. The groups are
416
+ # returned in order, starting with the immediate parent and ending with the most
417
+ # distant ancestor. If the specified group has no immediate parent, the results
418
+ # are empty.
419
+ # @param [String] children_of_group
420
+ # A group name. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
421
+ # Returns groups whose parent_name field contains the group name. If no groups
422
+ # have this parent, the results are empty.
423
+ # @param [String] descendants_of_group
424
+ # A group name. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
425
+ # Returns the descendants of the specified group. This is a superset of the
426
+ # results returned by the children_of_group filter, and includes children-of-
427
+ # children, and so forth.
428
+ # @param [Fixnum] page_size
429
+ # A positive number that is the maximum number of results to return.
430
+ # @param [String] page_token
431
+ # If this field is not empty then it must contain the next_page_token value
432
+ # returned by a previous call to this method. Using this field causes the method
433
+ # to return additional results from the previous method call.
434
+ # @param [String] fields
435
+ # Selector specifying which fields to include in a partial response.
436
+ # @param [String] quota_user
437
+ # Available to use for quota purposes for server-side applications. Can be any
438
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
439
+ # @param [Google::Apis::RequestOptions] options
440
+ # Request-specific options
441
+ #
442
+ # @yield [result, err] Result & error if block supplied
443
+ # @yieldparam result [Google::Apis::MonitoringV3::ListGroupsResponse] parsed result object
444
+ # @yieldparam err [StandardError] error object if request failed
445
+ #
446
+ # @return [Google::Apis::MonitoringV3::ListGroupsResponse]
447
+ #
448
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
449
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
450
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
451
+ def list_project_groups(name, ancestors_of_group: nil, children_of_group: nil, descendants_of_group: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
452
+ command = make_simple_command(:get, 'v3/{+name}/groups', options)
453
+ command.response_representation = Google::Apis::MonitoringV3::ListGroupsResponse::Representation
454
+ command.response_class = Google::Apis::MonitoringV3::ListGroupsResponse
455
+ command.params['name'] = name unless name.nil?
456
+ command.query['ancestorsOfGroup'] = ancestors_of_group unless ancestors_of_group.nil?
457
+ command.query['childrenOfGroup'] = children_of_group unless children_of_group.nil?
458
+ command.query['descendantsOfGroup'] = descendants_of_group unless descendants_of_group.nil?
459
+ command.query['pageSize'] = page_size unless page_size.nil?
460
+ command.query['pageToken'] = page_token unless page_token.nil?
461
+ command.query['fields'] = fields unless fields.nil?
462
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
463
+ execute_or_queue_command(command, &block)
464
+ end
465
+
466
+ # Updates an existing group. You can change any group attributes except name.
467
+ # @param [String] name
468
+ # Output only. The name of this group. The format is: projects/[
469
+ # PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] When creating a group, this field is
470
+ # ignored and a new name is created consisting of the project specified in the
471
+ # call to CreateGroup and a unique [GROUP_ID] that is generated automatically.
472
+ # @param [Google::Apis::MonitoringV3::Group] group_object
473
+ # @param [Boolean] validate_only
474
+ # If true, validate this request but do not update the existing group.
475
+ # @param [String] fields
476
+ # Selector specifying which fields to include in a partial response.
477
+ # @param [String] quota_user
478
+ # Available to use for quota purposes for server-side applications. Can be any
479
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
480
+ # @param [Google::Apis::RequestOptions] options
481
+ # Request-specific options
482
+ #
483
+ # @yield [result, err] Result & error if block supplied
484
+ # @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object
485
+ # @yieldparam err [StandardError] error object if request failed
486
+ #
487
+ # @return [Google::Apis::MonitoringV3::Group]
488
+ #
489
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
490
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
491
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
492
+ def update_project_group(name, group_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
493
+ command = make_simple_command(:put, 'v3/{+name}', options)
494
+ command.request_representation = Google::Apis::MonitoringV3::Group::Representation
495
+ command.request_object = group_object
496
+ command.response_representation = Google::Apis::MonitoringV3::Group::Representation
497
+ command.response_class = Google::Apis::MonitoringV3::Group
498
+ command.params['name'] = name unless name.nil?
499
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
500
+ command.query['fields'] = fields unless fields.nil?
501
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
502
+ execute_or_queue_command(command, &block)
503
+ end
504
+
505
+ # Lists the monitored resources that are members of a group.
506
+ # @param [String] name
507
+ # Required. The group whose members are listed. The format is: projects/[
508
+ # PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
509
+ # @param [String] filter
510
+ # An optional list filter (https://cloud.google.com/monitoring/api/learn_more#
511
+ # filtering) describing the members to be returned. The filter may reference the
512
+ # type, labels, and metadata of monitored resources that comprise the group. For
513
+ # example, to return only resources representing Compute Engine VM instances,
514
+ # use this filter: `resource.type = "gce_instance"`
515
+ # @param [String] interval_end_time
516
+ # Required. The end of the time interval.
517
+ # @param [String] interval_start_time
518
+ # Optional. The beginning of the time interval. The default value for the start
519
+ # time is the end time. The start time must not be later than the end time.
520
+ # @param [Fixnum] page_size
521
+ # A positive number that is the maximum number of results to return.
522
+ # @param [String] page_token
523
+ # If this field is not empty then it must contain the next_page_token value
524
+ # returned by a previous call to this method. Using this field causes the method
525
+ # to return additional results from the previous method call.
526
+ # @param [String] fields
527
+ # Selector specifying which fields to include in a partial response.
528
+ # @param [String] quota_user
529
+ # Available to use for quota purposes for server-side applications. Can be any
530
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
531
+ # @param [Google::Apis::RequestOptions] options
532
+ # Request-specific options
533
+ #
534
+ # @yield [result, err] Result & error if block supplied
535
+ # @yieldparam result [Google::Apis::MonitoringV3::ListGroupMembersResponse] parsed result object
536
+ # @yieldparam err [StandardError] error object if request failed
537
+ #
538
+ # @return [Google::Apis::MonitoringV3::ListGroupMembersResponse]
539
+ #
540
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
541
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
542
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
543
+ def list_project_group_members(name, filter: nil, interval_end_time: nil, interval_start_time: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
544
+ command = make_simple_command(:get, 'v3/{+name}/members', options)
545
+ command.response_representation = Google::Apis::MonitoringV3::ListGroupMembersResponse::Representation
546
+ command.response_class = Google::Apis::MonitoringV3::ListGroupMembersResponse
547
+ command.params['name'] = name unless name.nil?
548
+ command.query['filter'] = filter unless filter.nil?
549
+ command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil?
550
+ command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil?
551
+ command.query['pageSize'] = page_size unless page_size.nil?
552
+ command.query['pageToken'] = page_token unless page_token.nil?
553
+ command.query['fields'] = fields unless fields.nil?
554
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
555
+ execute_or_queue_command(command, &block)
556
+ end
557
+
558
+ # Creates a new metric descriptor. User-created metric descriptors define custom
559
+ # metrics (https://cloud.google.com/monitoring/custom-metrics).
560
+ # @param [String] name
561
+ # Required. The project on which to execute the request. The format is: projects/
562
+ # [PROJECT_ID_OR_NUMBER]
563
+ # @param [Google::Apis::MonitoringV3::MetricDescriptor] metric_descriptor_object
564
+ # @param [String] fields
565
+ # Selector specifying which fields to include in a partial response.
566
+ # @param [String] quota_user
567
+ # Available to use for quota purposes for server-side applications. Can be any
568
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
569
+ # @param [Google::Apis::RequestOptions] options
570
+ # Request-specific options
571
+ #
572
+ # @yield [result, err] Result & error if block supplied
573
+ # @yieldparam result [Google::Apis::MonitoringV3::MetricDescriptor] parsed result object
574
+ # @yieldparam err [StandardError] error object if request failed
575
+ #
576
+ # @return [Google::Apis::MonitoringV3::MetricDescriptor]
577
+ #
578
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
579
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
580
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
581
+ def create_project_metric_descriptor(name, metric_descriptor_object = nil, fields: nil, quota_user: nil, options: nil, &block)
582
+ command = make_simple_command(:post, 'v3/{+name}/metricDescriptors', options)
583
+ command.request_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation
584
+ command.request_object = metric_descriptor_object
585
+ command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation
586
+ command.response_class = Google::Apis::MonitoringV3::MetricDescriptor
587
+ command.params['name'] = name unless name.nil?
588
+ command.query['fields'] = fields unless fields.nil?
589
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
590
+ execute_or_queue_command(command, &block)
591
+ end
592
+
593
+ # Deletes a metric descriptor. Only user-created custom metrics (https://cloud.
594
+ # google.com/monitoring/custom-metrics) can be deleted.
595
+ # @param [String] name
596
+ # Required. The metric descriptor on which to execute the request. The format is:
597
+ # projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example of [
598
+ # METRIC_ID] is: "custom.googleapis.com/my_test_metric".
599
+ # @param [String] fields
600
+ # Selector specifying which fields to include in a partial response.
601
+ # @param [String] quota_user
602
+ # Available to use for quota purposes for server-side applications. Can be any
603
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
604
+ # @param [Google::Apis::RequestOptions] options
605
+ # Request-specific options
606
+ #
607
+ # @yield [result, err] Result & error if block supplied
608
+ # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object
609
+ # @yieldparam err [StandardError] error object if request failed
610
+ #
611
+ # @return [Google::Apis::MonitoringV3::Empty]
612
+ #
613
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
614
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
615
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
616
+ def delete_project_metric_descriptor(name, fields: nil, quota_user: nil, options: nil, &block)
617
+ command = make_simple_command(:delete, 'v3/{+name}', options)
618
+ command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
619
+ command.response_class = Google::Apis::MonitoringV3::Empty
620
+ command.params['name'] = name unless name.nil?
621
+ command.query['fields'] = fields unless fields.nil?
622
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
623
+ execute_or_queue_command(command, &block)
624
+ end
625
+
626
+ # Gets a single metric descriptor. This method does not require a Workspace.
627
+ # @param [String] name
628
+ # Required. The metric descriptor on which to execute the request. The format is:
629
+ # projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example
630
+ # value of [METRIC_ID] is "compute.googleapis.com/instance/disk/read_bytes_count"
631
+ # .
632
+ # @param [String] fields
633
+ # Selector specifying which fields to include in a partial response.
634
+ # @param [String] quota_user
635
+ # Available to use for quota purposes for server-side applications. Can be any
636
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
637
+ # @param [Google::Apis::RequestOptions] options
638
+ # Request-specific options
639
+ #
640
+ # @yield [result, err] Result & error if block supplied
641
+ # @yieldparam result [Google::Apis::MonitoringV3::MetricDescriptor] parsed result object
642
+ # @yieldparam err [StandardError] error object if request failed
643
+ #
644
+ # @return [Google::Apis::MonitoringV3::MetricDescriptor]
645
+ #
646
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
647
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
648
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
649
+ def get_project_metric_descriptor(name, fields: nil, quota_user: nil, options: nil, &block)
650
+ command = make_simple_command(:get, 'v3/{+name}', options)
651
+ command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation
652
+ command.response_class = Google::Apis::MonitoringV3::MetricDescriptor
653
+ command.params['name'] = name unless name.nil?
654
+ command.query['fields'] = fields unless fields.nil?
655
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
656
+ execute_or_queue_command(command, &block)
657
+ end
658
+
659
+ # Lists metric descriptors that match a filter. This method does not require a
660
+ # Workspace.
661
+ # @param [String] name
662
+ # Required. The project on which to execute the request. The format is: projects/
663
+ # [PROJECT_ID_OR_NUMBER]
664
+ # @param [String] filter
665
+ # If this field is empty, all custom and system-defined metric descriptors are
666
+ # returned. Otherwise, the filter (https://cloud.google.com/monitoring/api/v3/
667
+ # filters) specifies which metric descriptors are to be returned. For example,
668
+ # the following filter matches all custom metrics (https://cloud.google.com/
669
+ # monitoring/custom-metrics): metric.type = starts_with("custom.googleapis.com/")
670
+ #
671
+ # @param [Fixnum] page_size
672
+ # A positive number that is the maximum number of results to return.
673
+ # @param [String] page_token
674
+ # If this field is not empty then it must contain the nextPageToken value
675
+ # returned by a previous call to this method. Using this field causes the method
676
+ # to return additional results from the previous method call.
677
+ # @param [String] fields
678
+ # Selector specifying which fields to include in a partial response.
679
+ # @param [String] quota_user
680
+ # Available to use for quota purposes for server-side applications. Can be any
681
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
682
+ # @param [Google::Apis::RequestOptions] options
683
+ # Request-specific options
684
+ #
685
+ # @yield [result, err] Result & error if block supplied
686
+ # @yieldparam result [Google::Apis::MonitoringV3::ListMetricDescriptorsResponse] parsed result object
687
+ # @yieldparam err [StandardError] error object if request failed
688
+ #
689
+ # @return [Google::Apis::MonitoringV3::ListMetricDescriptorsResponse]
690
+ #
691
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
692
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
693
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
694
+ def list_project_metric_descriptors(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
695
+ command = make_simple_command(:get, 'v3/{+name}/metricDescriptors', options)
696
+ command.response_representation = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse::Representation
697
+ command.response_class = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse
698
+ command.params['name'] = name unless name.nil?
699
+ command.query['filter'] = filter unless filter.nil?
700
+ command.query['pageSize'] = page_size unless page_size.nil?
701
+ command.query['pageToken'] = page_token unless page_token.nil?
702
+ command.query['fields'] = fields unless fields.nil?
703
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
704
+ execute_or_queue_command(command, &block)
705
+ end
706
+
707
+ # Gets a single monitored resource descriptor. This method does not require a
708
+ # Workspace.
709
+ # @param [String] name
710
+ # Required. The monitored resource descriptor to get. The format is: projects/[
711
+ # PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] The [
712
+ # RESOURCE_TYPE] is a predefined type, such as cloudsql_database.
713
+ # @param [String] fields
714
+ # Selector specifying which fields to include in a partial response.
715
+ # @param [String] quota_user
716
+ # Available to use for quota purposes for server-side applications. Can be any
717
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
718
+ # @param [Google::Apis::RequestOptions] options
719
+ # Request-specific options
720
+ #
721
+ # @yield [result, err] Result & error if block supplied
722
+ # @yieldparam result [Google::Apis::MonitoringV3::MonitoredResourceDescriptor] parsed result object
723
+ # @yieldparam err [StandardError] error object if request failed
724
+ #
725
+ # @return [Google::Apis::MonitoringV3::MonitoredResourceDescriptor]
726
+ #
727
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
728
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
729
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
730
+ def get_project_monitored_resource_descriptor(name, fields: nil, quota_user: nil, options: nil, &block)
731
+ command = make_simple_command(:get, 'v3/{+name}', options)
732
+ command.response_representation = Google::Apis::MonitoringV3::MonitoredResourceDescriptor::Representation
733
+ command.response_class = Google::Apis::MonitoringV3::MonitoredResourceDescriptor
734
+ command.params['name'] = name unless name.nil?
735
+ command.query['fields'] = fields unless fields.nil?
736
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
737
+ execute_or_queue_command(command, &block)
738
+ end
739
+
740
+ # Lists monitored resource descriptors that match a filter. This method does not
741
+ # require a Workspace.
742
+ # @param [String] name
743
+ # Required. The project on which to execute the request. The format is: projects/
744
+ # [PROJECT_ID_OR_NUMBER]
745
+ # @param [String] filter
746
+ # An optional filter (https://cloud.google.com/monitoring/api/v3/filters)
747
+ # describing the descriptors to be returned. The filter can reference the
748
+ # descriptor's type and labels. For example, the following filter returns only
749
+ # Google Compute Engine descriptors that have an id label: resource.type =
750
+ # starts_with("gce_") AND resource.label:id
751
+ # @param [Fixnum] page_size
752
+ # A positive number that is the maximum number of results to return.
753
+ # @param [String] page_token
754
+ # If this field is not empty then it must contain the nextPageToken value
755
+ # returned by a previous call to this method. Using this field causes the method
756
+ # to return additional results from the previous method call.
757
+ # @param [String] fields
758
+ # Selector specifying which fields to include in a partial response.
759
+ # @param [String] quota_user
760
+ # Available to use for quota purposes for server-side applications. Can be any
761
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
762
+ # @param [Google::Apis::RequestOptions] options
763
+ # Request-specific options
764
+ #
765
+ # @yield [result, err] Result & error if block supplied
766
+ # @yieldparam result [Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse] parsed result object
767
+ # @yieldparam err [StandardError] error object if request failed
768
+ #
769
+ # @return [Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse]
770
+ #
771
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
772
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
773
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
774
+ def list_project_monitored_resource_descriptors(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
775
+ command = make_simple_command(:get, 'v3/{+name}/monitoredResourceDescriptors', options)
776
+ command.response_representation = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse::Representation
777
+ command.response_class = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse
778
+ command.params['name'] = name unless name.nil?
779
+ command.query['filter'] = filter unless filter.nil?
780
+ command.query['pageSize'] = page_size unless page_size.nil?
781
+ command.query['pageToken'] = page_token unless page_token.nil?
782
+ command.query['fields'] = fields unless fields.nil?
783
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
784
+ execute_or_queue_command(command, &block)
785
+ end
786
+
787
+ # Gets a single channel descriptor. The descriptor indicates which fields are
788
+ # expected / permitted for a notification channel of the given type.
789
+ # @param [String] name
790
+ # Required. The channel type for which to execute the request. The format is:
791
+ # projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]
792
+ # @param [String] fields
793
+ # Selector specifying which fields to include in a partial response.
794
+ # @param [String] quota_user
795
+ # Available to use for quota purposes for server-side applications. Can be any
796
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
797
+ # @param [Google::Apis::RequestOptions] options
798
+ # Request-specific options
799
+ #
800
+ # @yield [result, err] Result & error if block supplied
801
+ # @yieldparam result [Google::Apis::MonitoringV3::NotificationChannelDescriptor] parsed result object
802
+ # @yieldparam err [StandardError] error object if request failed
803
+ #
804
+ # @return [Google::Apis::MonitoringV3::NotificationChannelDescriptor]
805
+ #
806
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
807
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
808
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
809
+ def get_project_notification_channel_descriptor(name, fields: nil, quota_user: nil, options: nil, &block)
810
+ command = make_simple_command(:get, 'v3/{+name}', options)
811
+ command.response_representation = Google::Apis::MonitoringV3::NotificationChannelDescriptor::Representation
812
+ command.response_class = Google::Apis::MonitoringV3::NotificationChannelDescriptor
813
+ command.params['name'] = name unless name.nil?
814
+ command.query['fields'] = fields unless fields.nil?
815
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
816
+ execute_or_queue_command(command, &block)
817
+ end
818
+
819
+ # Lists the descriptors for supported channel types. The use of descriptors
820
+ # makes it possible for new channel types to be dynamically added.
821
+ # @param [String] name
822
+ # Required. The REST resource name of the parent from which to retrieve the
823
+ # notification channel descriptors. The expected syntax is: projects/[
824
+ # PROJECT_ID_OR_NUMBER] Note that this names the parent container in which to
825
+ # look for the descriptors; to retrieve a single descriptor by name, use the
826
+ # GetNotificationChannelDescriptor operation, instead.
827
+ # @param [Fixnum] page_size
828
+ # The maximum number of results to return in a single response. If not set to a
829
+ # positive number, a reasonable value will be chosen by the service.
830
+ # @param [String] page_token
831
+ # If non-empty, page_token must contain a value returned as the next_page_token
832
+ # in a previous response to request the next set of results.
833
+ # @param [String] fields
834
+ # Selector specifying which fields to include in a partial response.
835
+ # @param [String] quota_user
836
+ # Available to use for quota purposes for server-side applications. Can be any
837
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
838
+ # @param [Google::Apis::RequestOptions] options
839
+ # Request-specific options
840
+ #
841
+ # @yield [result, err] Result & error if block supplied
842
+ # @yieldparam result [Google::Apis::MonitoringV3::ListNotificationChannelDescriptorsResponse] parsed result object
843
+ # @yieldparam err [StandardError] error object if request failed
844
+ #
845
+ # @return [Google::Apis::MonitoringV3::ListNotificationChannelDescriptorsResponse]
846
+ #
847
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
848
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
849
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
850
+ def list_project_notification_channel_descriptors(name, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
851
+ command = make_simple_command(:get, 'v3/{+name}/notificationChannelDescriptors', options)
852
+ command.response_representation = Google::Apis::MonitoringV3::ListNotificationChannelDescriptorsResponse::Representation
853
+ command.response_class = Google::Apis::MonitoringV3::ListNotificationChannelDescriptorsResponse
854
+ command.params['name'] = name unless name.nil?
855
+ command.query['pageSize'] = page_size unless page_size.nil?
856
+ command.query['pageToken'] = page_token unless page_token.nil?
857
+ command.query['fields'] = fields unless fields.nil?
858
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
859
+ execute_or_queue_command(command, &block)
860
+ end
861
+
862
+ # Creates a new notification channel, representing a single notification
863
+ # endpoint such as an email address, SMS number, or PagerDuty service.
864
+ # @param [String] name
865
+ # Required. The project on which to execute the request. The format is: projects/
866
+ # [PROJECT_ID_OR_NUMBER] This names the container into which the channel will be
867
+ # written, this does not name the newly created channel. The resulting channel's
868
+ # name will have a normalized version of this field as a prefix, but will add /
869
+ # notificationChannels/[CHANNEL_ID] to identify the channel.
870
+ # @param [Google::Apis::MonitoringV3::NotificationChannel] notification_channel_object
871
+ # @param [String] fields
872
+ # Selector specifying which fields to include in a partial response.
873
+ # @param [String] quota_user
874
+ # Available to use for quota purposes for server-side applications. Can be any
875
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
876
+ # @param [Google::Apis::RequestOptions] options
877
+ # Request-specific options
878
+ #
879
+ # @yield [result, err] Result & error if block supplied
880
+ # @yieldparam result [Google::Apis::MonitoringV3::NotificationChannel] parsed result object
881
+ # @yieldparam err [StandardError] error object if request failed
882
+ #
883
+ # @return [Google::Apis::MonitoringV3::NotificationChannel]
884
+ #
885
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
886
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
887
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
888
+ def create_project_notification_channel(name, notification_channel_object = nil, fields: nil, quota_user: nil, options: nil, &block)
889
+ command = make_simple_command(:post, 'v3/{+name}/notificationChannels', options)
890
+ command.request_representation = Google::Apis::MonitoringV3::NotificationChannel::Representation
891
+ command.request_object = notification_channel_object
892
+ command.response_representation = Google::Apis::MonitoringV3::NotificationChannel::Representation
893
+ command.response_class = Google::Apis::MonitoringV3::NotificationChannel
894
+ command.params['name'] = name unless name.nil?
895
+ command.query['fields'] = fields unless fields.nil?
896
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
897
+ execute_or_queue_command(command, &block)
898
+ end
899
+
900
+ # Deletes a notification channel.
901
+ # @param [String] name
902
+ # Required. The channel for which to execute the request. The format is:
903
+ # projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
904
+ # @param [Boolean] force
905
+ # If true, the notification channel will be deleted regardless of its use in
906
+ # alert policies (the policies will be updated to remove the channel). If false,
907
+ # channels that are still referenced by an existing alerting policy will fail to
908
+ # be deleted in a delete operation.
909
+ # @param [String] fields
910
+ # Selector specifying which fields to include in a partial response.
911
+ # @param [String] quota_user
912
+ # Available to use for quota purposes for server-side applications. Can be any
913
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
914
+ # @param [Google::Apis::RequestOptions] options
915
+ # Request-specific options
916
+ #
917
+ # @yield [result, err] Result & error if block supplied
918
+ # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object
919
+ # @yieldparam err [StandardError] error object if request failed
920
+ #
921
+ # @return [Google::Apis::MonitoringV3::Empty]
922
+ #
923
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
924
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
925
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
926
+ def delete_project_notification_channel(name, force: nil, fields: nil, quota_user: nil, options: nil, &block)
927
+ command = make_simple_command(:delete, 'v3/{+name}', options)
928
+ command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
929
+ command.response_class = Google::Apis::MonitoringV3::Empty
930
+ command.params['name'] = name unless name.nil?
931
+ command.query['force'] = force unless force.nil?
932
+ command.query['fields'] = fields unless fields.nil?
933
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
934
+ execute_or_queue_command(command, &block)
935
+ end
936
+
937
+ # Gets a single notification channel. The channel includes the relevant
938
+ # configuration details with which the channel was created. However, the
939
+ # response may truncate or omit passwords, API keys, or other private key matter
940
+ # and thus the response may not be 100% identical to the information that was
941
+ # supplied in the call to the create method.
942
+ # @param [String] name
943
+ # Required. The channel for which to execute the request. The format is:
944
+ # projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
945
+ # @param [String] fields
946
+ # Selector specifying which fields to include in a partial response.
947
+ # @param [String] quota_user
948
+ # Available to use for quota purposes for server-side applications. Can be any
949
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
950
+ # @param [Google::Apis::RequestOptions] options
951
+ # Request-specific options
952
+ #
953
+ # @yield [result, err] Result & error if block supplied
954
+ # @yieldparam result [Google::Apis::MonitoringV3::NotificationChannel] parsed result object
955
+ # @yieldparam err [StandardError] error object if request failed
956
+ #
957
+ # @return [Google::Apis::MonitoringV3::NotificationChannel]
958
+ #
959
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
960
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
961
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
962
+ def get_project_notification_channel(name, fields: nil, quota_user: nil, options: nil, &block)
963
+ command = make_simple_command(:get, 'v3/{+name}', options)
964
+ command.response_representation = Google::Apis::MonitoringV3::NotificationChannel::Representation
965
+ command.response_class = Google::Apis::MonitoringV3::NotificationChannel
966
+ command.params['name'] = name unless name.nil?
967
+ command.query['fields'] = fields unless fields.nil?
968
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
969
+ execute_or_queue_command(command, &block)
970
+ end
971
+
972
+ # Requests a verification code for an already verified channel that can then be
973
+ # used in a call to VerifyNotificationChannel() on a different channel with an
974
+ # equivalent identity in the same or in a different project. This makes it
975
+ # possible to copy a channel between projects without requiring manual
976
+ # reverification of the channel. If the channel is not in the verified state,
977
+ # this method will fail (in other words, this may only be used if the
978
+ # SendNotificationChannelVerificationCode and VerifyNotificationChannel paths
979
+ # have already been used to put the given channel into the verified state).There
980
+ # is no guarantee that the verification codes returned by this method will be of
981
+ # a similar structure or form as the ones that are delivered to the channel via
982
+ # SendNotificationChannelVerificationCode; while VerifyNotificationChannel()
983
+ # will recognize both the codes delivered via
984
+ # SendNotificationChannelVerificationCode() and returned from
985
+ # GetNotificationChannelVerificationCode(), it is typically the case that the
986
+ # verification codes delivered via SendNotificationChannelVerificationCode()
987
+ # will be shorter and also have a shorter expiration (e.g. codes such as "G-
988
+ # 123456") whereas GetVerificationCode() will typically return a much longer,
989
+ # websafe base 64 encoded string that has a longer expiration time.
990
+ # @param [String] name
991
+ # Required. The notification channel for which a verification code is to be
992
+ # generated and retrieved. This must name a channel that is already verified; if
993
+ # the specified channel is not verified, the request will fail.
994
+ # @param [Google::Apis::MonitoringV3::GetNotificationChannelVerificationCodeRequest] get_notification_channel_verification_code_request_object
995
+ # @param [String] fields
996
+ # Selector specifying which fields to include in a partial response.
997
+ # @param [String] quota_user
998
+ # Available to use for quota purposes for server-side applications. Can be any
999
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1000
+ # @param [Google::Apis::RequestOptions] options
1001
+ # Request-specific options
1002
+ #
1003
+ # @yield [result, err] Result & error if block supplied
1004
+ # @yieldparam result [Google::Apis::MonitoringV3::GetNotificationChannelVerificationCodeResponse] parsed result object
1005
+ # @yieldparam err [StandardError] error object if request failed
1006
+ #
1007
+ # @return [Google::Apis::MonitoringV3::GetNotificationChannelVerificationCodeResponse]
1008
+ #
1009
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1010
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1011
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1012
+ def get_project_notification_channel_verification_code(name, get_notification_channel_verification_code_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1013
+ command = make_simple_command(:post, 'v3/{+name}:getVerificationCode', options)
1014
+ command.request_representation = Google::Apis::MonitoringV3::GetNotificationChannelVerificationCodeRequest::Representation
1015
+ command.request_object = get_notification_channel_verification_code_request_object
1016
+ command.response_representation = Google::Apis::MonitoringV3::GetNotificationChannelVerificationCodeResponse::Representation
1017
+ command.response_class = Google::Apis::MonitoringV3::GetNotificationChannelVerificationCodeResponse
1018
+ command.params['name'] = name unless name.nil?
1019
+ command.query['fields'] = fields unless fields.nil?
1020
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1021
+ execute_or_queue_command(command, &block)
1022
+ end
1023
+
1024
+ # Lists the notification channels that have been created for the project.
1025
+ # @param [String] name
1026
+ # Required. The project on which to execute the request. The format is: projects/
1027
+ # [PROJECT_ID_OR_NUMBER] This names the container in which to look for the
1028
+ # notification channels; it does not name a specific channel. To query a
1029
+ # specific channel by REST resource name, use the GetNotificationChannel
1030
+ # operation.
1031
+ # @param [String] filter
1032
+ # If provided, this field specifies the criteria that must be met by
1033
+ # notification channels to be included in the response.For more details, see
1034
+ # sorting and filtering (https://cloud.google.com/monitoring/api/v3/sorting-and-
1035
+ # filtering).
1036
+ # @param [String] order_by
1037
+ # A comma-separated list of fields by which to sort the result. Supports the
1038
+ # same set of fields as in filter. Entries can be prefixed with a minus sign to
1039
+ # sort in descending rather than ascending order.For more details, see sorting
1040
+ # and filtering (https://cloud.google.com/monitoring/api/v3/sorting-and-
1041
+ # filtering).
1042
+ # @param [Fixnum] page_size
1043
+ # The maximum number of results to return in a single response. If not set to a
1044
+ # positive number, a reasonable value will be chosen by the service.
1045
+ # @param [String] page_token
1046
+ # If non-empty, page_token must contain a value returned as the next_page_token
1047
+ # in a previous response to request the next set of results.
1048
+ # @param [String] fields
1049
+ # Selector specifying which fields to include in a partial response.
1050
+ # @param [String] quota_user
1051
+ # Available to use for quota purposes for server-side applications. Can be any
1052
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1053
+ # @param [Google::Apis::RequestOptions] options
1054
+ # Request-specific options
1055
+ #
1056
+ # @yield [result, err] Result & error if block supplied
1057
+ # @yieldparam result [Google::Apis::MonitoringV3::ListNotificationChannelsResponse] parsed result object
1058
+ # @yieldparam err [StandardError] error object if request failed
1059
+ #
1060
+ # @return [Google::Apis::MonitoringV3::ListNotificationChannelsResponse]
1061
+ #
1062
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1063
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1064
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1065
+ def list_project_notification_channels(name, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1066
+ command = make_simple_command(:get, 'v3/{+name}/notificationChannels', options)
1067
+ command.response_representation = Google::Apis::MonitoringV3::ListNotificationChannelsResponse::Representation
1068
+ command.response_class = Google::Apis::MonitoringV3::ListNotificationChannelsResponse
1069
+ command.params['name'] = name unless name.nil?
1070
+ command.query['filter'] = filter unless filter.nil?
1071
+ command.query['orderBy'] = order_by unless order_by.nil?
1072
+ command.query['pageSize'] = page_size unless page_size.nil?
1073
+ command.query['pageToken'] = page_token unless page_token.nil?
1074
+ command.query['fields'] = fields unless fields.nil?
1075
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1076
+ execute_or_queue_command(command, &block)
1077
+ end
1078
+
1079
+ # Updates a notification channel. Fields not specified in the field mask remain
1080
+ # unchanged.
1081
+ # @param [String] name
1082
+ # The full REST resource name for this channel. The format is: projects/[
1083
+ # PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] The [CHANNEL_ID] is
1084
+ # automatically assigned by the server on creation.
1085
+ # @param [Google::Apis::MonitoringV3::NotificationChannel] notification_channel_object
1086
+ # @param [String] update_mask
1087
+ # The fields to update.
1088
+ # @param [String] fields
1089
+ # Selector specifying which fields to include in a partial response.
1090
+ # @param [String] quota_user
1091
+ # Available to use for quota purposes for server-side applications. Can be any
1092
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1093
+ # @param [Google::Apis::RequestOptions] options
1094
+ # Request-specific options
1095
+ #
1096
+ # @yield [result, err] Result & error if block supplied
1097
+ # @yieldparam result [Google::Apis::MonitoringV3::NotificationChannel] parsed result object
1098
+ # @yieldparam err [StandardError] error object if request failed
1099
+ #
1100
+ # @return [Google::Apis::MonitoringV3::NotificationChannel]
1101
+ #
1102
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1103
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1104
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1105
+ def patch_project_notification_channel(name, notification_channel_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1106
+ command = make_simple_command(:patch, 'v3/{+name}', options)
1107
+ command.request_representation = Google::Apis::MonitoringV3::NotificationChannel::Representation
1108
+ command.request_object = notification_channel_object
1109
+ command.response_representation = Google::Apis::MonitoringV3::NotificationChannel::Representation
1110
+ command.response_class = Google::Apis::MonitoringV3::NotificationChannel
1111
+ command.params['name'] = name unless name.nil?
1112
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1113
+ command.query['fields'] = fields unless fields.nil?
1114
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1115
+ execute_or_queue_command(command, &block)
1116
+ end
1117
+
1118
+ # Causes a verification code to be delivered to the channel. The code can then
1119
+ # be supplied in VerifyNotificationChannel to verify the channel.
1120
+ # @param [String] name
1121
+ # Required. The notification channel to which to send a verification code.
1122
+ # @param [Google::Apis::MonitoringV3::SendNotificationChannelVerificationCodeRequest] send_notification_channel_verification_code_request_object
1123
+ # @param [String] fields
1124
+ # Selector specifying which fields to include in a partial response.
1125
+ # @param [String] quota_user
1126
+ # Available to use for quota purposes for server-side applications. Can be any
1127
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1128
+ # @param [Google::Apis::RequestOptions] options
1129
+ # Request-specific options
1130
+ #
1131
+ # @yield [result, err] Result & error if block supplied
1132
+ # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object
1133
+ # @yieldparam err [StandardError] error object if request failed
1134
+ #
1135
+ # @return [Google::Apis::MonitoringV3::Empty]
1136
+ #
1137
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1138
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1139
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1140
+ def send_project_notification_channel_verification_code(name, send_notification_channel_verification_code_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1141
+ command = make_simple_command(:post, 'v3/{+name}:sendVerificationCode', options)
1142
+ command.request_representation = Google::Apis::MonitoringV3::SendNotificationChannelVerificationCodeRequest::Representation
1143
+ command.request_object = send_notification_channel_verification_code_request_object
1144
+ command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
1145
+ command.response_class = Google::Apis::MonitoringV3::Empty
1146
+ command.params['name'] = name unless name.nil?
1147
+ command.query['fields'] = fields unless fields.nil?
1148
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1149
+ execute_or_queue_command(command, &block)
1150
+ end
1151
+
1152
+ # Verifies a NotificationChannel by proving receipt of the code delivered to the
1153
+ # channel as a result of calling SendNotificationChannelVerificationCode.
1154
+ # @param [String] name
1155
+ # Required. The notification channel to verify.
1156
+ # @param [Google::Apis::MonitoringV3::VerifyNotificationChannelRequest] verify_notification_channel_request_object
1157
+ # @param [String] fields
1158
+ # Selector specifying which fields to include in a partial response.
1159
+ # @param [String] quota_user
1160
+ # Available to use for quota purposes for server-side applications. Can be any
1161
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1162
+ # @param [Google::Apis::RequestOptions] options
1163
+ # Request-specific options
1164
+ #
1165
+ # @yield [result, err] Result & error if block supplied
1166
+ # @yieldparam result [Google::Apis::MonitoringV3::NotificationChannel] parsed result object
1167
+ # @yieldparam err [StandardError] error object if request failed
1168
+ #
1169
+ # @return [Google::Apis::MonitoringV3::NotificationChannel]
1170
+ #
1171
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1172
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1173
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1174
+ def verify_notification_channel(name, verify_notification_channel_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1175
+ command = make_simple_command(:post, 'v3/{+name}:verify', options)
1176
+ command.request_representation = Google::Apis::MonitoringV3::VerifyNotificationChannelRequest::Representation
1177
+ command.request_object = verify_notification_channel_request_object
1178
+ command.response_representation = Google::Apis::MonitoringV3::NotificationChannel::Representation
1179
+ command.response_class = Google::Apis::MonitoringV3::NotificationChannel
1180
+ command.params['name'] = name unless name.nil?
1181
+ command.query['fields'] = fields unless fields.nil?
1182
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1183
+ execute_or_queue_command(command, &block)
1184
+ end
1185
+
1186
+ # Creates or adds data to one or more time series. The response is empty if all
1187
+ # time series in the request were written. If any time series could not be
1188
+ # written, a corresponding failure message is included in the error response.
1189
+ # @param [String] name
1190
+ # Required. The project on which to execute the request. The format is: projects/
1191
+ # [PROJECT_ID_OR_NUMBER]
1192
+ # @param [Google::Apis::MonitoringV3::CreateTimeSeriesRequest] create_time_series_request_object
1193
+ # @param [String] fields
1194
+ # Selector specifying which fields to include in a partial response.
1195
+ # @param [String] quota_user
1196
+ # Available to use for quota purposes for server-side applications. Can be any
1197
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1198
+ # @param [Google::Apis::RequestOptions] options
1199
+ # Request-specific options
1200
+ #
1201
+ # @yield [result, err] Result & error if block supplied
1202
+ # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object
1203
+ # @yieldparam err [StandardError] error object if request failed
1204
+ #
1205
+ # @return [Google::Apis::MonitoringV3::Empty]
1206
+ #
1207
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1208
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1209
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1210
+ def create_project_time_series(name, create_time_series_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1211
+ command = make_simple_command(:post, 'v3/{+name}/timeSeries', options)
1212
+ command.request_representation = Google::Apis::MonitoringV3::CreateTimeSeriesRequest::Representation
1213
+ command.request_object = create_time_series_request_object
1214
+ command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
1215
+ command.response_class = Google::Apis::MonitoringV3::Empty
1216
+ command.params['name'] = name unless name.nil?
1217
+ command.query['fields'] = fields unless fields.nil?
1218
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1219
+ execute_or_queue_command(command, &block)
1220
+ end
1221
+
1222
+ # Lists time series that match a filter. This method does not require a
1223
+ # Workspace.
1224
+ # @param [String] name
1225
+ # Required. The project on which to execute the request. The format is: projects/
1226
+ # [PROJECT_ID_OR_NUMBER]
1227
+ # @param [String] aggregation_alignment_period
1228
+ # The alignment_period specifies a time interval, in seconds, that is used to
1229
+ # divide the data in all the time series into consistent blocks of time. This
1230
+ # will be done before the per-series aligner can be applied to the data.The
1231
+ # value must be at least 60 seconds. If a per-series aligner other than
1232
+ # ALIGN_NONE is specified, this field is required or an error is returned. If no
1233
+ # per-series aligner is specified, or the aligner ALIGN_NONE is specified, then
1234
+ # this field is ignored.The maximum value of the alignment_period is 104 weeks (
1235
+ # 2 years) for charts, and 90,000 seconds (25 hours) for alerting policies.
1236
+ # @param [String] aggregation_cross_series_reducer
1237
+ # The reduction operation to be used to combine time series into a single time
1238
+ # series, where the value of each data point in the resulting series is a
1239
+ # function of all the already aligned values in the input time series.Not all
1240
+ # reducer operations can be applied to all time series. The valid choices depend
1241
+ # on the metric_kind and the value_type of the original time series. Reduction
1242
+ # can yield a time series with a different metric_kind or value_type than the
1243
+ # input time series.Time series data must first be aligned (see
1244
+ # per_series_aligner) in order to perform cross-time series reduction. If
1245
+ # cross_series_reducer is specified, then per_series_aligner must be specified,
1246
+ # and must not be ALIGN_NONE. An alignment_period must also be specified;
1247
+ # otherwise, an error is returned.
1248
+ # @param [Array<String>, String] aggregation_group_by_fields
1249
+ # The set of fields to preserve when cross_series_reducer is specified. The
1250
+ # group_by_fields determine how the time series are partitioned into subsets
1251
+ # prior to applying the aggregation operation. Each subset contains time series
1252
+ # that have the same value for each of the grouping fields. Each individual time
1253
+ # series is a member of exactly one subset. The cross_series_reducer is applied
1254
+ # to each subset of time series. It is not possible to reduce across different
1255
+ # resource types, so this field implicitly contains resource.type. Fields not
1256
+ # specified in group_by_fields are aggregated away. If group_by_fields is not
1257
+ # specified and all the time series have the same resource type, then the time
1258
+ # series are aggregated into a single output time series. If
1259
+ # cross_series_reducer is not defined, this field is ignored.
1260
+ # @param [String] aggregation_per_series_aligner
1261
+ # An Aligner describes how to bring the data points in a single time series into
1262
+ # temporal alignment. Except for ALIGN_NONE, all alignments cause all the data
1263
+ # points in an alignment_period to be mathematically grouped together, resulting
1264
+ # in a single data point for each alignment_period with end timestamp at the end
1265
+ # of the period.Not all alignment operations may be applied to all time series.
1266
+ # The valid choices depend on the metric_kind and value_type of the original
1267
+ # time series. Alignment can change the metric_kind or the value_type of the
1268
+ # time series.Time series data must be aligned in order to perform cross-time
1269
+ # series reduction. If cross_series_reducer is specified, then
1270
+ # per_series_aligner must be specified and not equal to ALIGN_NONE and
1271
+ # alignment_period must be specified; otherwise, an error is returned.
1272
+ # @param [String] filter
1273
+ # Required. A monitoring filter (https://cloud.google.com/monitoring/api/v3/
1274
+ # filters) that specifies which time series should be returned. The filter must
1275
+ # specify a single metric type, and can additionally specify metric labels and
1276
+ # other information. For example: metric.type = "compute.googleapis.com/instance/
1277
+ # cpu/usage_time" AND metric.labels.instance_name = "my-instance-name"
1278
+ # @param [String] interval_end_time
1279
+ # Required. The end of the time interval.
1280
+ # @param [String] interval_start_time
1281
+ # Optional. The beginning of the time interval. The default value for the start
1282
+ # time is the end time. The start time must not be later than the end time.
1283
+ # @param [String] order_by
1284
+ # Unsupported: must be left blank. The points in each time series are currently
1285
+ # returned in reverse time order (most recent to oldest).
1286
+ # @param [Fixnum] page_size
1287
+ # A positive number that is the maximum number of results to return. If
1288
+ # page_size is empty or more than 100,000 results, the effective page_size is
1289
+ # 100,000 results. If view is set to FULL, this is the maximum number of Points
1290
+ # returned. If view is set to HEADERS, this is the maximum number of TimeSeries
1291
+ # returned.
1292
+ # @param [String] page_token
1293
+ # If this field is not empty then it must contain the nextPageToken value
1294
+ # returned by a previous call to this method. Using this field causes the method
1295
+ # to return additional results from the previous method call.
1296
+ # @param [String] secondary_aggregation_alignment_period
1297
+ # The alignment_period specifies a time interval, in seconds, that is used to
1298
+ # divide the data in all the time series into consistent blocks of time. This
1299
+ # will be done before the per-series aligner can be applied to the data.The
1300
+ # value must be at least 60 seconds. If a per-series aligner other than
1301
+ # ALIGN_NONE is specified, this field is required or an error is returned. If no
1302
+ # per-series aligner is specified, or the aligner ALIGN_NONE is specified, then
1303
+ # this field is ignored.The maximum value of the alignment_period is 104 weeks (
1304
+ # 2 years) for charts, and 90,000 seconds (25 hours) for alerting policies.
1305
+ # @param [String] secondary_aggregation_cross_series_reducer
1306
+ # The reduction operation to be used to combine time series into a single time
1307
+ # series, where the value of each data point in the resulting series is a
1308
+ # function of all the already aligned values in the input time series.Not all
1309
+ # reducer operations can be applied to all time series. The valid choices depend
1310
+ # on the metric_kind and the value_type of the original time series. Reduction
1311
+ # can yield a time series with a different metric_kind or value_type than the
1312
+ # input time series.Time series data must first be aligned (see
1313
+ # per_series_aligner) in order to perform cross-time series reduction. If
1314
+ # cross_series_reducer is specified, then per_series_aligner must be specified,
1315
+ # and must not be ALIGN_NONE. An alignment_period must also be specified;
1316
+ # otherwise, an error is returned.
1317
+ # @param [Array<String>, String] secondary_aggregation_group_by_fields
1318
+ # The set of fields to preserve when cross_series_reducer is specified. The
1319
+ # group_by_fields determine how the time series are partitioned into subsets
1320
+ # prior to applying the aggregation operation. Each subset contains time series
1321
+ # that have the same value for each of the grouping fields. Each individual time
1322
+ # series is a member of exactly one subset. The cross_series_reducer is applied
1323
+ # to each subset of time series. It is not possible to reduce across different
1324
+ # resource types, so this field implicitly contains resource.type. Fields not
1325
+ # specified in group_by_fields are aggregated away. If group_by_fields is not
1326
+ # specified and all the time series have the same resource type, then the time
1327
+ # series are aggregated into a single output time series. If
1328
+ # cross_series_reducer is not defined, this field is ignored.
1329
+ # @param [String] secondary_aggregation_per_series_aligner
1330
+ # An Aligner describes how to bring the data points in a single time series into
1331
+ # temporal alignment. Except for ALIGN_NONE, all alignments cause all the data
1332
+ # points in an alignment_period to be mathematically grouped together, resulting
1333
+ # in a single data point for each alignment_period with end timestamp at the end
1334
+ # of the period.Not all alignment operations may be applied to all time series.
1335
+ # The valid choices depend on the metric_kind and value_type of the original
1336
+ # time series. Alignment can change the metric_kind or the value_type of the
1337
+ # time series.Time series data must be aligned in order to perform cross-time
1338
+ # series reduction. If cross_series_reducer is specified, then
1339
+ # per_series_aligner must be specified and not equal to ALIGN_NONE and
1340
+ # alignment_period must be specified; otherwise, an error is returned.
1341
+ # @param [String] view
1342
+ # Required. Specifies which information is returned about the time series.
1343
+ # @param [String] fields
1344
+ # Selector specifying which fields to include in a partial response.
1345
+ # @param [String] quota_user
1346
+ # Available to use for quota purposes for server-side applications. Can be any
1347
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1348
+ # @param [Google::Apis::RequestOptions] options
1349
+ # Request-specific options
1350
+ #
1351
+ # @yield [result, err] Result & error if block supplied
1352
+ # @yieldparam result [Google::Apis::MonitoringV3::ListTimeSeriesResponse] parsed result object
1353
+ # @yieldparam err [StandardError] error object if request failed
1354
+ #
1355
+ # @return [Google::Apis::MonitoringV3::ListTimeSeriesResponse]
1356
+ #
1357
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1358
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1359
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1360
+ def list_project_time_series(name, aggregation_alignment_period: nil, aggregation_cross_series_reducer: nil, aggregation_group_by_fields: nil, aggregation_per_series_aligner: nil, filter: nil, interval_end_time: nil, interval_start_time: nil, order_by: nil, page_size: nil, page_token: nil, secondary_aggregation_alignment_period: nil, secondary_aggregation_cross_series_reducer: nil, secondary_aggregation_group_by_fields: nil, secondary_aggregation_per_series_aligner: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
1361
+ command = make_simple_command(:get, 'v3/{+name}/timeSeries', options)
1362
+ command.response_representation = Google::Apis::MonitoringV3::ListTimeSeriesResponse::Representation
1363
+ command.response_class = Google::Apis::MonitoringV3::ListTimeSeriesResponse
1364
+ command.params['name'] = name unless name.nil?
1365
+ command.query['aggregation.alignmentPeriod'] = aggregation_alignment_period unless aggregation_alignment_period.nil?
1366
+ command.query['aggregation.crossSeriesReducer'] = aggregation_cross_series_reducer unless aggregation_cross_series_reducer.nil?
1367
+ command.query['aggregation.groupByFields'] = aggregation_group_by_fields unless aggregation_group_by_fields.nil?
1368
+ command.query['aggregation.perSeriesAligner'] = aggregation_per_series_aligner unless aggregation_per_series_aligner.nil?
1369
+ command.query['filter'] = filter unless filter.nil?
1370
+ command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil?
1371
+ command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil?
1372
+ command.query['orderBy'] = order_by unless order_by.nil?
1373
+ command.query['pageSize'] = page_size unless page_size.nil?
1374
+ command.query['pageToken'] = page_token unless page_token.nil?
1375
+ command.query['secondaryAggregation.alignmentPeriod'] = secondary_aggregation_alignment_period unless secondary_aggregation_alignment_period.nil?
1376
+ command.query['secondaryAggregation.crossSeriesReducer'] = secondary_aggregation_cross_series_reducer unless secondary_aggregation_cross_series_reducer.nil?
1377
+ command.query['secondaryAggregation.groupByFields'] = secondary_aggregation_group_by_fields unless secondary_aggregation_group_by_fields.nil?
1378
+ command.query['secondaryAggregation.perSeriesAligner'] = secondary_aggregation_per_series_aligner unless secondary_aggregation_per_series_aligner.nil?
1379
+ command.query['view'] = view unless view.nil?
1380
+ command.query['fields'] = fields unless fields.nil?
1381
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1382
+ execute_or_queue_command(command, &block)
1383
+ end
1384
+
1385
+ # Queries time series using Monitoring Query Language. This method does not
1386
+ # require a Workspace.
1387
+ # @param [String] name
1388
+ # Required. The project on which to execute the request. The format is: projects/
1389
+ # [PROJECT_ID_OR_NUMBER]
1390
+ # @param [Google::Apis::MonitoringV3::QueryTimeSeriesRequest] query_time_series_request_object
1391
+ # @param [String] fields
1392
+ # Selector specifying which fields to include in a partial response.
1393
+ # @param [String] quota_user
1394
+ # Available to use for quota purposes for server-side applications. Can be any
1395
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1396
+ # @param [Google::Apis::RequestOptions] options
1397
+ # Request-specific options
1398
+ #
1399
+ # @yield [result, err] Result & error if block supplied
1400
+ # @yieldparam result [Google::Apis::MonitoringV3::QueryTimeSeriesResponse] parsed result object
1401
+ # @yieldparam err [StandardError] error object if request failed
1402
+ #
1403
+ # @return [Google::Apis::MonitoringV3::QueryTimeSeriesResponse]
1404
+ #
1405
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1406
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1407
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1408
+ def query_time_series(name, query_time_series_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1409
+ command = make_simple_command(:post, 'v3/{+name}/timeSeries:query', options)
1410
+ command.request_representation = Google::Apis::MonitoringV3::QueryTimeSeriesRequest::Representation
1411
+ command.request_object = query_time_series_request_object
1412
+ command.response_representation = Google::Apis::MonitoringV3::QueryTimeSeriesResponse::Representation
1413
+ command.response_class = Google::Apis::MonitoringV3::QueryTimeSeriesResponse
1414
+ command.params['name'] = name unless name.nil?
1415
+ command.query['fields'] = fields unless fields.nil?
1416
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1417
+ execute_or_queue_command(command, &block)
1418
+ end
1419
+
1420
+ # Creates a new Uptime check configuration.
1421
+ # @param [String] parent
1422
+ # Required. The project in which to create the Uptime check. The format is:
1423
+ # projects/[PROJECT_ID_OR_NUMBER]
1424
+ # @param [Google::Apis::MonitoringV3::UptimeCheckConfig] uptime_check_config_object
1425
+ # @param [String] fields
1426
+ # Selector specifying which fields to include in a partial response.
1427
+ # @param [String] quota_user
1428
+ # Available to use for quota purposes for server-side applications. Can be any
1429
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1430
+ # @param [Google::Apis::RequestOptions] options
1431
+ # Request-specific options
1432
+ #
1433
+ # @yield [result, err] Result & error if block supplied
1434
+ # @yieldparam result [Google::Apis::MonitoringV3::UptimeCheckConfig] parsed result object
1435
+ # @yieldparam err [StandardError] error object if request failed
1436
+ #
1437
+ # @return [Google::Apis::MonitoringV3::UptimeCheckConfig]
1438
+ #
1439
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1440
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1441
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1442
+ def create_project_uptime_check_config(parent, uptime_check_config_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1443
+ command = make_simple_command(:post, 'v3/{+parent}/uptimeCheckConfigs', options)
1444
+ command.request_representation = Google::Apis::MonitoringV3::UptimeCheckConfig::Representation
1445
+ command.request_object = uptime_check_config_object
1446
+ command.response_representation = Google::Apis::MonitoringV3::UptimeCheckConfig::Representation
1447
+ command.response_class = Google::Apis::MonitoringV3::UptimeCheckConfig
1448
+ command.params['parent'] = parent unless parent.nil?
1449
+ command.query['fields'] = fields unless fields.nil?
1450
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1451
+ execute_or_queue_command(command, &block)
1452
+ end
1453
+
1454
+ # Deletes an Uptime check configuration. Note that this method will fail if the
1455
+ # Uptime check configuration is referenced by an alert policy or other dependent
1456
+ # configs that would be rendered invalid by the deletion.
1457
+ # @param [String] name
1458
+ # Required. The Uptime check configuration to delete. The format is: projects/[
1459
+ # PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID]
1460
+ # @param [String] fields
1461
+ # Selector specifying which fields to include in a partial response.
1462
+ # @param [String] quota_user
1463
+ # Available to use for quota purposes for server-side applications. Can be any
1464
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1465
+ # @param [Google::Apis::RequestOptions] options
1466
+ # Request-specific options
1467
+ #
1468
+ # @yield [result, err] Result & error if block supplied
1469
+ # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object
1470
+ # @yieldparam err [StandardError] error object if request failed
1471
+ #
1472
+ # @return [Google::Apis::MonitoringV3::Empty]
1473
+ #
1474
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1475
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1476
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1477
+ def delete_project_uptime_check_config(name, fields: nil, quota_user: nil, options: nil, &block)
1478
+ command = make_simple_command(:delete, 'v3/{+name}', options)
1479
+ command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
1480
+ command.response_class = Google::Apis::MonitoringV3::Empty
1481
+ command.params['name'] = name unless name.nil?
1482
+ command.query['fields'] = fields unless fields.nil?
1483
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1484
+ execute_or_queue_command(command, &block)
1485
+ end
1486
+
1487
+ # Gets a single Uptime check configuration.
1488
+ # @param [String] name
1489
+ # Required. The Uptime check configuration to retrieve. The format is: projects/[
1490
+ # PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID]
1491
+ # @param [String] fields
1492
+ # Selector specifying which fields to include in a partial response.
1493
+ # @param [String] quota_user
1494
+ # Available to use for quota purposes for server-side applications. Can be any
1495
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1496
+ # @param [Google::Apis::RequestOptions] options
1497
+ # Request-specific options
1498
+ #
1499
+ # @yield [result, err] Result & error if block supplied
1500
+ # @yieldparam result [Google::Apis::MonitoringV3::UptimeCheckConfig] parsed result object
1501
+ # @yieldparam err [StandardError] error object if request failed
1502
+ #
1503
+ # @return [Google::Apis::MonitoringV3::UptimeCheckConfig]
1504
+ #
1505
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1506
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1507
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1508
+ def get_project_uptime_check_config(name, fields: nil, quota_user: nil, options: nil, &block)
1509
+ command = make_simple_command(:get, 'v3/{+name}', options)
1510
+ command.response_representation = Google::Apis::MonitoringV3::UptimeCheckConfig::Representation
1511
+ command.response_class = Google::Apis::MonitoringV3::UptimeCheckConfig
1512
+ command.params['name'] = name unless name.nil?
1513
+ command.query['fields'] = fields unless fields.nil?
1514
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1515
+ execute_or_queue_command(command, &block)
1516
+ end
1517
+
1518
+ # Lists the existing valid Uptime check configurations for the project (leaving
1519
+ # out any invalid configurations).
1520
+ # @param [String] parent
1521
+ # Required. The project whose Uptime check configurations are listed. The format
1522
+ # is: projects/[PROJECT_ID_OR_NUMBER]
1523
+ # @param [Fixnum] page_size
1524
+ # The maximum number of results to return in a single response. The server may
1525
+ # further constrain the maximum number of results returned in a single page. If
1526
+ # the page_size is <=0, the server will decide the number of results to be
1527
+ # returned.
1528
+ # @param [String] page_token
1529
+ # If this field is not empty then it must contain the nextPageToken value
1530
+ # returned by a previous call to this method. Using this field causes the method
1531
+ # to return more results from the previous method call.
1532
+ # @param [String] fields
1533
+ # Selector specifying which fields to include in a partial response.
1534
+ # @param [String] quota_user
1535
+ # Available to use for quota purposes for server-side applications. Can be any
1536
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1537
+ # @param [Google::Apis::RequestOptions] options
1538
+ # Request-specific options
1539
+ #
1540
+ # @yield [result, err] Result & error if block supplied
1541
+ # @yieldparam result [Google::Apis::MonitoringV3::ListUptimeCheckConfigsResponse] parsed result object
1542
+ # @yieldparam err [StandardError] error object if request failed
1543
+ #
1544
+ # @return [Google::Apis::MonitoringV3::ListUptimeCheckConfigsResponse]
1545
+ #
1546
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1547
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1548
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1549
+ def list_project_uptime_check_configs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1550
+ command = make_simple_command(:get, 'v3/{+parent}/uptimeCheckConfigs', options)
1551
+ command.response_representation = Google::Apis::MonitoringV3::ListUptimeCheckConfigsResponse::Representation
1552
+ command.response_class = Google::Apis::MonitoringV3::ListUptimeCheckConfigsResponse
1553
+ command.params['parent'] = parent unless parent.nil?
1554
+ command.query['pageSize'] = page_size unless page_size.nil?
1555
+ command.query['pageToken'] = page_token unless page_token.nil?
1556
+ command.query['fields'] = fields unless fields.nil?
1557
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1558
+ execute_or_queue_command(command, &block)
1559
+ end
1560
+
1561
+ # Updates an Uptime check configuration. You can either replace the entire
1562
+ # configuration with a new one or replace only certain fields in the current
1563
+ # configuration by specifying the fields to be updated via updateMask. Returns
1564
+ # the updated configuration.
1565
+ # @param [String] name
1566
+ # A unique resource name for this Uptime check configuration. The format is:
1567
+ # projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] [
1568
+ # PROJECT_ID_OR_NUMBER] is the Workspace host project associated with the Uptime
1569
+ # check.This field should be omitted when creating the Uptime check
1570
+ # configuration; on create, the resource name is assigned by the server and
1571
+ # included in the response.
1572
+ # @param [Google::Apis::MonitoringV3::UptimeCheckConfig] uptime_check_config_object
1573
+ # @param [String] update_mask
1574
+ # Optional. If present, only the listed fields in the current Uptime check
1575
+ # configuration are updated with values from the new configuration. If this
1576
+ # field is empty, then the current configuration is completely replaced with the
1577
+ # new configuration.
1578
+ # @param [String] fields
1579
+ # Selector specifying which fields to include in a partial response.
1580
+ # @param [String] quota_user
1581
+ # Available to use for quota purposes for server-side applications. Can be any
1582
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1583
+ # @param [Google::Apis::RequestOptions] options
1584
+ # Request-specific options
1585
+ #
1586
+ # @yield [result, err] Result & error if block supplied
1587
+ # @yieldparam result [Google::Apis::MonitoringV3::UptimeCheckConfig] parsed result object
1588
+ # @yieldparam err [StandardError] error object if request failed
1589
+ #
1590
+ # @return [Google::Apis::MonitoringV3::UptimeCheckConfig]
1591
+ #
1592
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1593
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1594
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1595
+ def patch_project_uptime_check_config(name, uptime_check_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1596
+ command = make_simple_command(:patch, 'v3/{+name}', options)
1597
+ command.request_representation = Google::Apis::MonitoringV3::UptimeCheckConfig::Representation
1598
+ command.request_object = uptime_check_config_object
1599
+ command.response_representation = Google::Apis::MonitoringV3::UptimeCheckConfig::Representation
1600
+ command.response_class = Google::Apis::MonitoringV3::UptimeCheckConfig
1601
+ command.params['name'] = name unless name.nil?
1602
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1603
+ command.query['fields'] = fields unless fields.nil?
1604
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1605
+ execute_or_queue_command(command, &block)
1606
+ end
1607
+
1608
+ # Create a Service.
1609
+ # @param [String] parent
1610
+ # Required. Resource name of the parent workspace. The format is: projects/[
1611
+ # PROJECT_ID_OR_NUMBER]
1612
+ # @param [Google::Apis::MonitoringV3::Service] service_object
1613
+ # @param [String] service_id
1614
+ # Optional. The Service id to use for this Service. If omitted, an id will be
1615
+ # generated instead. Must match the pattern [a-z0-9\-]+
1616
+ # @param [String] fields
1617
+ # Selector specifying which fields to include in a partial response.
1618
+ # @param [String] quota_user
1619
+ # Available to use for quota purposes for server-side applications. Can be any
1620
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1621
+ # @param [Google::Apis::RequestOptions] options
1622
+ # Request-specific options
1623
+ #
1624
+ # @yield [result, err] Result & error if block supplied
1625
+ # @yieldparam result [Google::Apis::MonitoringV3::Service] parsed result object
1626
+ # @yieldparam err [StandardError] error object if request failed
1627
+ #
1628
+ # @return [Google::Apis::MonitoringV3::Service]
1629
+ #
1630
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1631
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1632
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1633
+ def create_service(parent, service_object = nil, service_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1634
+ command = make_simple_command(:post, 'v3/{+parent}/services', options)
1635
+ command.request_representation = Google::Apis::MonitoringV3::Service::Representation
1636
+ command.request_object = service_object
1637
+ command.response_representation = Google::Apis::MonitoringV3::Service::Representation
1638
+ command.response_class = Google::Apis::MonitoringV3::Service
1639
+ command.params['parent'] = parent unless parent.nil?
1640
+ command.query['serviceId'] = service_id unless service_id.nil?
1641
+ command.query['fields'] = fields unless fields.nil?
1642
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1643
+ execute_or_queue_command(command, &block)
1644
+ end
1645
+
1646
+ # Soft delete this Service.
1647
+ # @param [String] name
1648
+ # Required. Resource name of the Service to delete. The format is: projects/[
1649
+ # PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
1650
+ # @param [String] fields
1651
+ # Selector specifying which fields to include in a partial response.
1652
+ # @param [String] quota_user
1653
+ # Available to use for quota purposes for server-side applications. Can be any
1654
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1655
+ # @param [Google::Apis::RequestOptions] options
1656
+ # Request-specific options
1657
+ #
1658
+ # @yield [result, err] Result & error if block supplied
1659
+ # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object
1660
+ # @yieldparam err [StandardError] error object if request failed
1661
+ #
1662
+ # @return [Google::Apis::MonitoringV3::Empty]
1663
+ #
1664
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1665
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1666
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1667
+ def delete_service(name, fields: nil, quota_user: nil, options: nil, &block)
1668
+ command = make_simple_command(:delete, 'v3/{+name}', options)
1669
+ command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
1670
+ command.response_class = Google::Apis::MonitoringV3::Empty
1671
+ command.params['name'] = name unless name.nil?
1672
+ command.query['fields'] = fields unless fields.nil?
1673
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1674
+ execute_or_queue_command(command, &block)
1675
+ end
1676
+
1677
+ # Get the named Service.
1678
+ # @param [String] name
1679
+ # Required. Resource name of the Service. The format is: projects/[
1680
+ # PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
1681
+ # @param [String] fields
1682
+ # Selector specifying which fields to include in a partial response.
1683
+ # @param [String] quota_user
1684
+ # Available to use for quota purposes for server-side applications. Can be any
1685
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1686
+ # @param [Google::Apis::RequestOptions] options
1687
+ # Request-specific options
1688
+ #
1689
+ # @yield [result, err] Result & error if block supplied
1690
+ # @yieldparam result [Google::Apis::MonitoringV3::Service] parsed result object
1691
+ # @yieldparam err [StandardError] error object if request failed
1692
+ #
1693
+ # @return [Google::Apis::MonitoringV3::Service]
1694
+ #
1695
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1696
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1697
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1698
+ def get_service(name, fields: nil, quota_user: nil, options: nil, &block)
1699
+ command = make_simple_command(:get, 'v3/{+name}', options)
1700
+ command.response_representation = Google::Apis::MonitoringV3::Service::Representation
1701
+ command.response_class = Google::Apis::MonitoringV3::Service
1702
+ command.params['name'] = name unless name.nil?
1703
+ command.query['fields'] = fields unless fields.nil?
1704
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1705
+ execute_or_queue_command(command, &block)
1706
+ end
1707
+
1708
+ # List Services for this workspace.
1709
+ # @param [String] parent
1710
+ # Required. Resource name of the parent containing the listed services, either a
1711
+ # project or a Monitoring Workspace. The formats are: projects/[
1712
+ # PROJECT_ID_OR_NUMBER] workspaces/[HOST_PROJECT_ID_OR_NUMBER]
1713
+ # @param [String] filter
1714
+ # A filter specifying what Services to return. The filter currently supports the
1715
+ # following fields: - `identifier_case` - `app_engine.module_id` - `
1716
+ # cloud_endpoints.service` (reserved for future use) - `mesh_istio.mesh_uid` - `
1717
+ # mesh_istio.service_namespace` - `mesh_istio.service_name` - `cluster_istio.
1718
+ # location` (deprecated) - `cluster_istio.cluster_name` (deprecated) - `
1719
+ # cluster_istio.service_namespace` (deprecated) - `cluster_istio.service_name` (
1720
+ # deprecated) identifier_case refers to which option in the identifier oneof is
1721
+ # populated. For example, the filter identifier_case = "CUSTOM" would match all
1722
+ # services with a value for the custom field. Valid options are "CUSTOM", "
1723
+ # APP_ENGINE", "MESH_ISTIO", plus "CLUSTER_ISTIO" (deprecated) and "
1724
+ # CLOUD_ENDPOINTS" (reserved for future use).
1725
+ # @param [Fixnum] page_size
1726
+ # A non-negative number that is the maximum number of results to return. When 0,
1727
+ # use default page size.
1728
+ # @param [String] page_token
1729
+ # If this field is not empty then it must contain the nextPageToken value
1730
+ # returned by a previous call to this method. Using this field causes the method
1731
+ # to return additional results from the previous method call.
1732
+ # @param [String] fields
1733
+ # Selector specifying which fields to include in a partial response.
1734
+ # @param [String] quota_user
1735
+ # Available to use for quota purposes for server-side applications. Can be any
1736
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1737
+ # @param [Google::Apis::RequestOptions] options
1738
+ # Request-specific options
1739
+ #
1740
+ # @yield [result, err] Result & error if block supplied
1741
+ # @yieldparam result [Google::Apis::MonitoringV3::ListServicesResponse] parsed result object
1742
+ # @yieldparam err [StandardError] error object if request failed
1743
+ #
1744
+ # @return [Google::Apis::MonitoringV3::ListServicesResponse]
1745
+ #
1746
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1747
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1748
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1749
+ def list_services(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1750
+ command = make_simple_command(:get, 'v3/{+parent}/services', options)
1751
+ command.response_representation = Google::Apis::MonitoringV3::ListServicesResponse::Representation
1752
+ command.response_class = Google::Apis::MonitoringV3::ListServicesResponse
1753
+ command.params['parent'] = parent unless parent.nil?
1754
+ command.query['filter'] = filter unless filter.nil?
1755
+ command.query['pageSize'] = page_size unless page_size.nil?
1756
+ command.query['pageToken'] = page_token unless page_token.nil?
1757
+ command.query['fields'] = fields unless fields.nil?
1758
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1759
+ execute_or_queue_command(command, &block)
1760
+ end
1761
+
1762
+ # Update this Service.
1763
+ # @param [String] name
1764
+ # Resource name for this Service. The format is: projects/[PROJECT_ID_OR_NUMBER]/
1765
+ # services/[SERVICE_ID]
1766
+ # @param [Google::Apis::MonitoringV3::Service] service_object
1767
+ # @param [String] update_mask
1768
+ # A set of field paths defining which fields to use for the update.
1769
+ # @param [String] fields
1770
+ # Selector specifying which fields to include in a partial response.
1771
+ # @param [String] quota_user
1772
+ # Available to use for quota purposes for server-side applications. Can be any
1773
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1774
+ # @param [Google::Apis::RequestOptions] options
1775
+ # Request-specific options
1776
+ #
1777
+ # @yield [result, err] Result & error if block supplied
1778
+ # @yieldparam result [Google::Apis::MonitoringV3::Service] parsed result object
1779
+ # @yieldparam err [StandardError] error object if request failed
1780
+ #
1781
+ # @return [Google::Apis::MonitoringV3::Service]
1782
+ #
1783
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1784
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1785
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1786
+ def patch_service(name, service_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1787
+ command = make_simple_command(:patch, 'v3/{+name}', options)
1788
+ command.request_representation = Google::Apis::MonitoringV3::Service::Representation
1789
+ command.request_object = service_object
1790
+ command.response_representation = Google::Apis::MonitoringV3::Service::Representation
1791
+ command.response_class = Google::Apis::MonitoringV3::Service
1792
+ command.params['name'] = name unless name.nil?
1793
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1794
+ command.query['fields'] = fields unless fields.nil?
1795
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1796
+ execute_or_queue_command(command, &block)
1797
+ end
1798
+
1799
+ # Create a ServiceLevelObjective for the given Service.
1800
+ # @param [String] parent
1801
+ # Required. Resource name of the parent Service. The format is: projects/[
1802
+ # PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
1803
+ # @param [Google::Apis::MonitoringV3::ServiceLevelObjective] service_level_objective_object
1804
+ # @param [String] service_level_objective_id
1805
+ # Optional. The ServiceLevelObjective id to use for this ServiceLevelObjective.
1806
+ # If omitted, an id will be generated instead. Must match the pattern [a-z0-9\-]+
1807
+ # @param [String] fields
1808
+ # Selector specifying which fields to include in a partial response.
1809
+ # @param [String] quota_user
1810
+ # Available to use for quota purposes for server-side applications. Can be any
1811
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1812
+ # @param [Google::Apis::RequestOptions] options
1813
+ # Request-specific options
1814
+ #
1815
+ # @yield [result, err] Result & error if block supplied
1816
+ # @yieldparam result [Google::Apis::MonitoringV3::ServiceLevelObjective] parsed result object
1817
+ # @yieldparam err [StandardError] error object if request failed
1818
+ #
1819
+ # @return [Google::Apis::MonitoringV3::ServiceLevelObjective]
1820
+ #
1821
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1822
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1823
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1824
+ def create_service_service_level_objective(parent, service_level_objective_object = nil, service_level_objective_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1825
+ command = make_simple_command(:post, 'v3/{+parent}/serviceLevelObjectives', options)
1826
+ command.request_representation = Google::Apis::MonitoringV3::ServiceLevelObjective::Representation
1827
+ command.request_object = service_level_objective_object
1828
+ command.response_representation = Google::Apis::MonitoringV3::ServiceLevelObjective::Representation
1829
+ command.response_class = Google::Apis::MonitoringV3::ServiceLevelObjective
1830
+ command.params['parent'] = parent unless parent.nil?
1831
+ command.query['serviceLevelObjectiveId'] = service_level_objective_id unless service_level_objective_id.nil?
1832
+ command.query['fields'] = fields unless fields.nil?
1833
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1834
+ execute_or_queue_command(command, &block)
1835
+ end
1836
+
1837
+ # Delete the given ServiceLevelObjective.
1838
+ # @param [String] name
1839
+ # Required. Resource name of the ServiceLevelObjective to delete. The format is:
1840
+ # projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[
1841
+ # SLO_NAME]
1842
+ # @param [String] fields
1843
+ # Selector specifying which fields to include in a partial response.
1844
+ # @param [String] quota_user
1845
+ # Available to use for quota purposes for server-side applications. Can be any
1846
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1847
+ # @param [Google::Apis::RequestOptions] options
1848
+ # Request-specific options
1849
+ #
1850
+ # @yield [result, err] Result & error if block supplied
1851
+ # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object
1852
+ # @yieldparam err [StandardError] error object if request failed
1853
+ #
1854
+ # @return [Google::Apis::MonitoringV3::Empty]
1855
+ #
1856
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1857
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1858
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1859
+ def delete_service_service_level_objective(name, fields: nil, quota_user: nil, options: nil, &block)
1860
+ command = make_simple_command(:delete, 'v3/{+name}', options)
1861
+ command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
1862
+ command.response_class = Google::Apis::MonitoringV3::Empty
1863
+ command.params['name'] = name unless name.nil?
1864
+ command.query['fields'] = fields unless fields.nil?
1865
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1866
+ execute_or_queue_command(command, &block)
1867
+ end
1868
+
1869
+ # Get a ServiceLevelObjective by name.
1870
+ # @param [String] name
1871
+ # Required. Resource name of the ServiceLevelObjective to get. The format is:
1872
+ # projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[
1873
+ # SLO_NAME]
1874
+ # @param [String] view
1875
+ # View of the ServiceLevelObjective to return. If DEFAULT, return the
1876
+ # ServiceLevelObjective as originally defined. If EXPLICIT and the
1877
+ # ServiceLevelObjective is defined in terms of a BasicSli, replace the BasicSli
1878
+ # with a RequestBasedSli spelling out how the SLI is computed.
1879
+ # @param [String] fields
1880
+ # Selector specifying which fields to include in a partial response.
1881
+ # @param [String] quota_user
1882
+ # Available to use for quota purposes for server-side applications. Can be any
1883
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1884
+ # @param [Google::Apis::RequestOptions] options
1885
+ # Request-specific options
1886
+ #
1887
+ # @yield [result, err] Result & error if block supplied
1888
+ # @yieldparam result [Google::Apis::MonitoringV3::ServiceLevelObjective] parsed result object
1889
+ # @yieldparam err [StandardError] error object if request failed
1890
+ #
1891
+ # @return [Google::Apis::MonitoringV3::ServiceLevelObjective]
1892
+ #
1893
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1894
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1895
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1896
+ def get_service_service_level_objective(name, view: nil, fields: nil, quota_user: nil, options: nil, &block)
1897
+ command = make_simple_command(:get, 'v3/{+name}', options)
1898
+ command.response_representation = Google::Apis::MonitoringV3::ServiceLevelObjective::Representation
1899
+ command.response_class = Google::Apis::MonitoringV3::ServiceLevelObjective
1900
+ command.params['name'] = name unless name.nil?
1901
+ command.query['view'] = view unless view.nil?
1902
+ command.query['fields'] = fields unless fields.nil?
1903
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1904
+ execute_or_queue_command(command, &block)
1905
+ end
1906
+
1907
+ # List the ServiceLevelObjectives for the given Service.
1908
+ # @param [String] parent
1909
+ # Required. Resource name of the parent containing the listed SLOs, either a
1910
+ # project or a Monitoring Workspace. The formats are: projects/[
1911
+ # PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] workspaces/[
1912
+ # HOST_PROJECT_ID_OR_NUMBER]/services/-
1913
+ # @param [String] filter
1914
+ # A filter specifying what ServiceLevelObjectives to return.
1915
+ # @param [Fixnum] page_size
1916
+ # A non-negative number that is the maximum number of results to return. When 0,
1917
+ # use default page size.
1918
+ # @param [String] page_token
1919
+ # If this field is not empty then it must contain the nextPageToken value
1920
+ # returned by a previous call to this method. Using this field causes the method
1921
+ # to return additional results from the previous method call.
1922
+ # @param [String] view
1923
+ # View of the ServiceLevelObjectives to return. If DEFAULT, return each
1924
+ # ServiceLevelObjective as originally defined. If EXPLICIT and the
1925
+ # ServiceLevelObjective is defined in terms of a BasicSli, replace the BasicSli
1926
+ # with a RequestBasedSli spelling out how the SLI is computed.
1927
+ # @param [String] fields
1928
+ # Selector specifying which fields to include in a partial response.
1929
+ # @param [String] quota_user
1930
+ # Available to use for quota purposes for server-side applications. Can be any
1931
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1932
+ # @param [Google::Apis::RequestOptions] options
1933
+ # Request-specific options
1934
+ #
1935
+ # @yield [result, err] Result & error if block supplied
1936
+ # @yieldparam result [Google::Apis::MonitoringV3::ListServiceLevelObjectivesResponse] parsed result object
1937
+ # @yieldparam err [StandardError] error object if request failed
1938
+ #
1939
+ # @return [Google::Apis::MonitoringV3::ListServiceLevelObjectivesResponse]
1940
+ #
1941
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1942
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1943
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1944
+ def list_service_service_level_objectives(parent, filter: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
1945
+ command = make_simple_command(:get, 'v3/{+parent}/serviceLevelObjectives', options)
1946
+ command.response_representation = Google::Apis::MonitoringV3::ListServiceLevelObjectivesResponse::Representation
1947
+ command.response_class = Google::Apis::MonitoringV3::ListServiceLevelObjectivesResponse
1948
+ command.params['parent'] = parent unless parent.nil?
1949
+ command.query['filter'] = filter unless filter.nil?
1950
+ command.query['pageSize'] = page_size unless page_size.nil?
1951
+ command.query['pageToken'] = page_token unless page_token.nil?
1952
+ command.query['view'] = view unless view.nil?
1953
+ command.query['fields'] = fields unless fields.nil?
1954
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1955
+ execute_or_queue_command(command, &block)
1956
+ end
1957
+
1958
+ # Update the given ServiceLevelObjective.
1959
+ # @param [String] name
1960
+ # Resource name for this ServiceLevelObjective. The format is: projects/[
1961
+ # PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
1962
+ # @param [Google::Apis::MonitoringV3::ServiceLevelObjective] service_level_objective_object
1963
+ # @param [String] update_mask
1964
+ # A set of field paths defining which fields to use for the update.
1965
+ # @param [String] fields
1966
+ # Selector specifying which fields to include in a partial response.
1967
+ # @param [String] quota_user
1968
+ # Available to use for quota purposes for server-side applications. Can be any
1969
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1970
+ # @param [Google::Apis::RequestOptions] options
1971
+ # Request-specific options
1972
+ #
1973
+ # @yield [result, err] Result & error if block supplied
1974
+ # @yieldparam result [Google::Apis::MonitoringV3::ServiceLevelObjective] parsed result object
1975
+ # @yieldparam err [StandardError] error object if request failed
1976
+ #
1977
+ # @return [Google::Apis::MonitoringV3::ServiceLevelObjective]
1978
+ #
1979
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1980
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1981
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1982
+ def patch_service_service_level_objective(name, service_level_objective_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1983
+ command = make_simple_command(:patch, 'v3/{+name}', options)
1984
+ command.request_representation = Google::Apis::MonitoringV3::ServiceLevelObjective::Representation
1985
+ command.request_object = service_level_objective_object
1986
+ command.response_representation = Google::Apis::MonitoringV3::ServiceLevelObjective::Representation
1987
+ command.response_class = Google::Apis::MonitoringV3::ServiceLevelObjective
1988
+ command.params['name'] = name unless name.nil?
1989
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1990
+ command.query['fields'] = fields unless fields.nil?
1991
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1992
+ execute_or_queue_command(command, &block)
1993
+ end
1994
+
1995
+ # Returns the list of IP addresses that checkers run from
1996
+ # @param [Fixnum] page_size
1997
+ # The maximum number of results to return in a single response. The server may
1998
+ # further constrain the maximum number of results returned in a single page. If
1999
+ # the page_size is <=0, the server will decide the number of results to be
2000
+ # returned. NOTE: this field is not yet implemented
2001
+ # @param [String] page_token
2002
+ # If this field is not empty then it must contain the nextPageToken value
2003
+ # returned by a previous call to this method. Using this field causes the method
2004
+ # to return more results from the previous method call. NOTE: this field is not
2005
+ # yet implemented
2006
+ # @param [String] fields
2007
+ # Selector specifying which fields to include in a partial response.
2008
+ # @param [String] quota_user
2009
+ # Available to use for quota purposes for server-side applications. Can be any
2010
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2011
+ # @param [Google::Apis::RequestOptions] options
2012
+ # Request-specific options
2013
+ #
2014
+ # @yield [result, err] Result & error if block supplied
2015
+ # @yieldparam result [Google::Apis::MonitoringV3::ListUptimeCheckIpsResponse] parsed result object
2016
+ # @yieldparam err [StandardError] error object if request failed
2017
+ #
2018
+ # @return [Google::Apis::MonitoringV3::ListUptimeCheckIpsResponse]
2019
+ #
2020
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2021
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2022
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2023
+ def list_uptime_check_ips(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2024
+ command = make_simple_command(:get, 'v3/uptimeCheckIps', options)
2025
+ command.response_representation = Google::Apis::MonitoringV3::ListUptimeCheckIpsResponse::Representation
2026
+ command.response_class = Google::Apis::MonitoringV3::ListUptimeCheckIpsResponse
2027
+ command.query['pageSize'] = page_size unless page_size.nil?
2028
+ command.query['pageToken'] = page_token unless page_token.nil?
2029
+ command.query['fields'] = fields unless fields.nil?
2030
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2031
+ execute_or_queue_command(command, &block)
2032
+ end
2033
+
2034
+ protected
2035
+
2036
+ def apply_command_defaults(command)
2037
+ command.query['key'] = key unless key.nil?
2038
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2039
+ end
2040
+ end
2041
+ end
2042
+ end
2043
+ end