google-cloud-monitoring 0.29.3 → 0.29.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -186,8 +186,10 @@ module Google
186
186
  # are applied in the order specified.
187
187
  #
188
188
  # This field is similar to the one in the
189
- # [`MetricService.ListTimeSeries` request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
190
- # It is advisable to use the `ListTimeSeries` method when debugging this field.
189
+ # [`MetricService.ListTimeSeries`
190
+ # request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It
191
+ # is advisable to use the `ListTimeSeries` method when debugging this
192
+ # field.
191
193
  # @!attribute [rw] denominator_filter
192
194
  # @return [String]
193
195
  # A [filter](https://cloud.google.com/monitoring/api/v3/filters) that identifies a time
@@ -281,8 +283,10 @@ module Google
281
283
  # are applied in the order specified.
282
284
  #
283
285
  # This field is similar to the
284
- # one in the [`MetricService.ListTimeSeries` request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
285
- # It is advisable to use the `ListTimeSeries` method when debugging this field.
286
+ # one in the [`MetricService.ListTimeSeries`
287
+ # request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It
288
+ # is advisable to use the `ListTimeSeries` method when debugging this
289
+ # field.
286
290
  # @!attribute [rw] duration
287
291
  # @return [Google::Protobuf::Duration]
288
292
  # The amount of time that a time series must fail to report new
@@ -376,8 +376,9 @@ module Google
376
376
  end
377
377
 
378
378
  # The tier of service for a Workspace. Please see the
379
- # [service tiers documentation](https://cloud.google.com/monitoring/workspaces/tiers)
380
- # for more details.
379
+ # [service tiers
380
+ # documentation](https://cloud.google.com/monitoring/workspaces/tiers) for more
381
+ # details.
381
382
  module ServiceTier
382
383
  # An invalid sentinel value, used to indicate that a tier has not
383
384
  # been provided explicitly.
@@ -386,13 +387,15 @@ module Google
386
387
  # The Stackdriver Basic tier, a free tier of service that provides basic
387
388
  # features, a moderate allotment of logs, and access to built-in metrics.
388
389
  # A number of features are not available in this tier. For more details,
389
- # see [the service tiers documentation](https://cloud.google.com/monitoring/workspaces/tiers).
390
+ # see [the service tiers
391
+ # documentation](https://cloud.google.com/monitoring/workspaces/tiers).
390
392
  SERVICE_TIER_BASIC = 1
391
393
 
392
394
  # The Stackdriver Premium tier, a higher, more expensive tier of service
393
395
  # that provides access to all Stackdriver features, lets you use Stackdriver
394
396
  # with AWS accounts, and has a larger allotments for logs and metrics. For
395
- # more details, see [the service tiers documentation](https://cloud.google.com/monitoring/workspaces/tiers).
397
+ # more details, see [the service tiers
398
+ # documentation](https://cloud.google.com/monitoring/workspaces/tiers).
396
399
  SERVICE_TIER_PREMIUM = 2
397
400
  end
398
401
  end
@@ -59,7 +59,8 @@ module Google
59
59
  # For groups with no parent, `parentName` is the empty string, `""`.
60
60
  # @!attribute [rw] filter
61
61
  # @return [String]
62
- # The filter used to determine which monitored resources belong to this group.
62
+ # The filter used to determine which monitored resources belong to this
63
+ # group.
63
64
  # @!attribute [rw] is_cluster
64
65
  # @return [true, false]
65
66
  # If true, the members of this group are considered to be a cluster.
@@ -58,7 +58,9 @@ module Google
58
58
  # @!attribute [rw] type
59
59
  # @return [String]
60
60
  # The type of the notification channel. This field matches the
61
- # value of the {Google::Monitoring::V3::NotificationChannelDescriptor#type NotificationChannelDescriptor#type} field.
61
+ # value of the
62
+ # {Google::Monitoring::V3::NotificationChannelDescriptor#type NotificationChannelDescriptor#type}
63
+ # field.
62
64
  # @!attribute [rw] name
63
65
  # @return [String]
64
66
  # The full REST resource name for this channel. The syntax is:
@@ -81,8 +83,8 @@ module Google
81
83
  # @return [Hash{String => String}]
82
84
  # Configuration fields that define the channel and its behavior. The
83
85
  # permissible and required labels are specified in the
84
- # {Google::Monitoring::V3::NotificationChannelDescriptor#labels NotificationChannelDescriptor#labels} of the
85
- # `NotificationChannelDescriptor` corresponding to the `type` field.
86
+ # {Google::Monitoring::V3::NotificationChannelDescriptor#labels NotificationChannelDescriptor#labels}
87
+ # of the `NotificationChannelDescriptor` corresponding to the `type` field.
86
88
  # @!attribute [rw] user_labels
87
89
  # @return [Hash{String => String}]
88
90
  # User-supplied key/value data that does not need to conform to
@@ -84,7 +84,8 @@ module Google
84
84
  # in which to look for the notification channels; it does not name a
85
85
  # specific channel. To query a specific channel by REST resource name, use
86
86
  # the
87
- # {Google::Monitoring::V3::NotificationChannelService::GetNotificationChannel `GetNotificationChannel`} operation.
87
+ # {Google::Monitoring::V3::NotificationChannelService::GetNotificationChannel `GetNotificationChannel`}
88
+ # operation.
88
89
  # @!attribute [rw] filter
89
90
  # @return [String]
90
91
  # If provided, this field specifies the criteria that must be met by
@@ -97,7 +97,8 @@ module Google
97
97
  # @!attribute [rw] type_url
98
98
  # @return [String]
99
99
  # A URL/resource name that uniquely identifies the type of the serialized
100
- # protocol buffer message. The last segment of the URL's path must represent
100
+ # protocol buffer message. This string must contain at least
101
+ # one "/" character. The last segment of the URL's path must represent
101
102
  # the fully qualified name of the type (as in
102
103
  # `path/google.protobuf.Duration`). The name should be in a canonical form
103
104
  # (e.g., leading "." is not accepted).
@@ -83,57 +83,49 @@ module Google
83
83
  # describe the updated values, the API ignores the values of all
84
84
  # fields not covered by the mask.
85
85
  #
86
- # If a repeated field is specified for an update operation, the existing
87
- # repeated values in the target resource will be overwritten by the new values.
88
- # Note that a repeated field is only allowed in the last position of a `paths`
89
- # string.
86
+ # If a repeated field is specified for an update operation, new values will
87
+ # be appended to the existing repeated field in the target resource. Note that
88
+ # a repeated field is only allowed in the last position of a `paths` string.
90
89
  #
91
90
  # If a sub-message is specified in the last position of the field mask for an
92
- # update operation, then the existing sub-message in the target resource is
93
- # overwritten. Given the target message:
91
+ # update operation, then new value will be merged into the existing sub-message
92
+ # in the target resource.
93
+ #
94
+ # For example, given the target message:
94
95
  #
95
96
  # f {
96
97
  # b {
97
- # d : 1
98
- # x : 2
98
+ # d: 1
99
+ # x: 2
99
100
  # }
100
- # c : 1
101
+ # c: [1]
101
102
  # }
102
103
  #
103
104
  # And an update message:
104
105
  #
105
106
  # f {
106
107
  # b {
107
- # d : 10
108
+ # d: 10
108
109
  # }
110
+ # c: [2]
109
111
  # }
110
112
  #
111
113
  # then if the field mask is:
112
114
  #
113
- # paths: "f.b"
115
+ # paths: ["f.b", "f.c"]
114
116
  #
115
117
  # then the result will be:
116
118
  #
117
119
  # f {
118
120
  # b {
119
- # d : 10
121
+ # d: 10
122
+ # x: 2
120
123
  # }
121
- # c : 1
124
+ # c: [1, 2]
122
125
  # }
123
126
  #
124
- # However, if the update mask was:
125
- #
126
- # paths: "f.b.d"
127
- #
128
- # then the result would be:
129
- #
130
- # f {
131
- # b {
132
- # d : 10
133
- # x : 2
134
- # }
135
- # c : 1
136
- # }
127
+ # An implementation may provide options to override this default behavior for
128
+ # repeated and message fields.
137
129
  #
138
130
  # In order to reset a field's value to the default, the field must
139
131
  # be in the mask and set to the default value in the provided resource.
@@ -15,17 +15,19 @@
15
15
 
16
16
  module Google
17
17
  module Protobuf
18
- # A Timestamp represents a point in time independent of any time zone
19
- # or calendar, represented as seconds and fractions of seconds at
20
- # nanosecond resolution in UTC Epoch time. It is encoded using the
21
- # Proleptic Gregorian Calendar which extends the Gregorian calendar
22
- # backwards to year one. It is encoded assuming all minutes are 60
23
- # seconds long, i.e. leap seconds are "smeared" so that no leap second
24
- # table is needed for interpretation. Range is from
25
- # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
26
- # By restricting to that range, we ensure that we can convert to
27
- # and from RFC 3339 date strings.
28
- # See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
18
+ # A Timestamp represents a point in time independent of any time zone or local
19
+ # calendar, encoded as a count of seconds and fractions of seconds at
20
+ # nanosecond resolution. The count is relative to an epoch at UTC midnight on
21
+ # January 1, 1970, in the proleptic Gregorian calendar which extends the
22
+ # Gregorian calendar backwards to year one.
23
+ #
24
+ # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
25
+ # second table is needed for interpretation, using a [24-hour linear
26
+ # smear](https://developers.google.com/time/smear).
27
+ #
28
+ # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
29
+ # restricting to that range, we ensure that we can convert to and from [RFC
30
+ # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
29
31
  #
30
32
  # = Examples
31
33
  #
@@ -86,12 +88,12 @@ module Google
86
88
  # 01:30 UTC on January 15, 2017.
87
89
  #
88
90
  # In JavaScript, one can convert a Date object to this format using the
89
- # standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
91
+ # standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
90
92
  # method. In Python, a standard `datetime.datetime` object can be converted
91
93
  # to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
92
94
  # with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
93
95
  # can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
94
- # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
96
+ # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
95
97
  # ) to obtain a formatter capable of generating timestamps in this format.
96
98
  # @!attribute [rw] seconds
97
99
  # @return [Integer]
@@ -15,24 +15,25 @@
15
15
 
16
16
  module Google
17
17
  module Rpc
18
- # The `Status` type defines a logical error model that is suitable for different
19
- # programming environments, including REST APIs and RPC APIs. It is used by
20
- # [gRPC](https://github.com/grpc). The error model is designed to be:
18
+ # The `Status` type defines a logical error model that is suitable for
19
+ # different programming environments, including REST APIs and RPC APIs. It is
20
+ # used by [gRPC](https://github.com/grpc). The error model is designed to be:
21
21
  #
22
22
  # * Simple to use and understand for most users
23
23
  # * Flexible enough to meet unexpected needs
24
24
  #
25
25
  # = Overview
26
26
  #
27
- # The `Status` message contains three pieces of data: error code, error message,
28
- # and error details. The error code should be an enum value of
29
- # {Google::Rpc::Code}, but it may accept additional error codes if needed. The
30
- # error message should be a developer-facing English message that helps
31
- # developers *understand* and *resolve* the error. If a localized user-facing
32
- # error message is needed, put the localized message in the error details or
33
- # localize it in the client. The optional error details may contain arbitrary
34
- # information about the error. There is a predefined set of error detail types
35
- # in the package `google.rpc` that can be used for common error conditions.
27
+ # The `Status` message contains three pieces of data: error code, error
28
+ # message, and error details. The error code should be an enum value of
29
+ # {Google::Rpc::Code}, but it may accept additional error codes
30
+ # if needed. The error message should be a developer-facing English message
31
+ # that helps developers *understand* and *resolve* the error. If a localized
32
+ # user-facing error message is needed, put the localized message in the error
33
+ # details or localize it in the client. The optional error details may contain
34
+ # arbitrary information about the error. There is a predefined set of error
35
+ # detail types in the package `google.rpc` that can be used for common error
36
+ # conditions.
36
37
  #
37
38
  # = Language mapping
38
39
  #
@@ -69,12 +70,14 @@ module Google
69
70
  # be used directly after any stripping needed for security/privacy reasons.
70
71
  # @!attribute [rw] code
71
72
  # @return [Integer]
72
- # The status code, which should be an enum value of {Google::Rpc::Code}.
73
+ # The status code, which should be an enum value of
74
+ # {Google::Rpc::Code}.
73
75
  # @!attribute [rw] message
74
76
  # @return [String]
75
77
  # A developer-facing error message, which should be in English. Any
76
78
  # user-facing error message should be localized and sent in the
77
- # {Google::Rpc::Status#details} field, or localized by the client.
79
+ # {Google::Rpc::Status#details} field, or localized
80
+ # by the client.
78
81
  # @!attribute [rw] details
79
82
  # @return [Array<Google::Protobuf::Any>]
80
83
  # A list of messages that carry the error details. There is a common set of
@@ -85,26 +85,17 @@ module Google
85
85
  ].freeze
86
86
 
87
87
 
88
- PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
89
- "projects/{project}"
90
- )
91
-
92
- private_constant :PROJECT_PATH_TEMPLATE
93
-
94
88
  GROUP_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
95
89
  "projects/{project}/groups/{group}"
96
90
  )
97
91
 
98
92
  private_constant :GROUP_PATH_TEMPLATE
99
93
 
100
- # Returns a fully-qualified project resource name string.
101
- # @param project [String]
102
- # @return [String]
103
- def self.project_path project
104
- PROJECT_PATH_TEMPLATE.render(
105
- :"project" => project
106
- )
107
- end
94
+ PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
95
+ "projects/{project}"
96
+ )
97
+
98
+ private_constant :PROJECT_PATH_TEMPLATE
108
99
 
109
100
  # Returns a fully-qualified group resource name string.
110
101
  # @param project [String]
@@ -117,6 +108,15 @@ module Google
117
108
  )
118
109
  end
119
110
 
111
+ # Returns a fully-qualified project resource name string.
112
+ # @param project [String]
113
+ # @return [String]
114
+ def self.project_path project
115
+ PROJECT_PATH_TEMPLATE.render(
116
+ :"project" => project
117
+ )
118
+ end
119
+
120
120
  # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
121
121
  # Provides the means for authenticating requests made by the client. This parameter can
122
122
  # be many types.
@@ -223,32 +223,50 @@ module Google
223
223
  @list_groups = Google::Gax.create_api_call(
224
224
  @group_service_stub.method(:list_groups),
225
225
  defaults["list_groups"],
226
- exception_transformer: exception_transformer
226
+ exception_transformer: exception_transformer,
227
+ params_extractor: proc do |request|
228
+ {'name' => request.name}
229
+ end
227
230
  )
228
231
  @get_group = Google::Gax.create_api_call(
229
232
  @group_service_stub.method(:get_group),
230
233
  defaults["get_group"],
231
- exception_transformer: exception_transformer
234
+ exception_transformer: exception_transformer,
235
+ params_extractor: proc do |request|
236
+ {'name' => request.name}
237
+ end
232
238
  )
233
239
  @create_group = Google::Gax.create_api_call(
234
240
  @group_service_stub.method(:create_group),
235
241
  defaults["create_group"],
236
- exception_transformer: exception_transformer
242
+ exception_transformer: exception_transformer,
243
+ params_extractor: proc do |request|
244
+ {'name' => request.name}
245
+ end
237
246
  )
238
247
  @update_group = Google::Gax.create_api_call(
239
248
  @group_service_stub.method(:update_group),
240
249
  defaults["update_group"],
241
- exception_transformer: exception_transformer
250
+ exception_transformer: exception_transformer,
251
+ params_extractor: proc do |request|
252
+ {'group.name' => request.group.name}
253
+ end
242
254
  )
243
255
  @delete_group = Google::Gax.create_api_call(
244
256
  @group_service_stub.method(:delete_group),
245
257
  defaults["delete_group"],
246
- exception_transformer: exception_transformer
258
+ exception_transformer: exception_transformer,
259
+ params_extractor: proc do |request|
260
+ {'name' => request.name}
261
+ end
247
262
  )
248
263
  @list_group_members = Google::Gax.create_api_call(
249
264
  @group_service_stub.method(:list_group_members),
250
265
  defaults["list_group_members"],
251
- exception_transformer: exception_transformer
266
+ exception_transformer: exception_transformer,
267
+ params_extractor: proc do |request|
268
+ {'name' => request.name}
269
+ end
252
270
  )
253
271
  end
254
272
 
@@ -295,16 +313,16 @@ module Google
295
313
  # @example
296
314
  # require "google/cloud/monitoring"
297
315
  #
298
- # group_service_client = Google::Cloud::Monitoring::Group.new(version: :v3)
316
+ # group_client = Google::Cloud::Monitoring::Group.new(version: :v3)
299
317
  # formatted_name = Google::Cloud::Monitoring::V3::GroupServiceClient.project_path("[PROJECT]")
300
318
  #
301
319
  # # Iterate over all results.
302
- # group_service_client.list_groups(formatted_name).each do |element|
320
+ # group_client.list_groups(formatted_name).each do |element|
303
321
  # # Process element.
304
322
  # end
305
323
  #
306
324
  # # Or iterate over results one page at a time.
307
- # group_service_client.list_groups(formatted_name).each_page do |page|
325
+ # group_client.list_groups(formatted_name).each_page do |page|
308
326
  # # Process each page at a time.
309
327
  # page.each do |element|
310
328
  # # Process element.
@@ -346,9 +364,9 @@ module Google
346
364
  # @example
347
365
  # require "google/cloud/monitoring"
348
366
  #
349
- # group_service_client = Google::Cloud::Monitoring::Group.new(version: :v3)
367
+ # group_client = Google::Cloud::Monitoring::Group.new(version: :v3)
350
368
  # formatted_name = Google::Cloud::Monitoring::V3::GroupServiceClient.group_path("[PROJECT]", "[GROUP]")
351
- # response = group_service_client.get_group(formatted_name)
369
+ # response = group_client.get_group(formatted_name)
352
370
 
353
371
  def get_group \
354
372
  name,
@@ -384,12 +402,12 @@ module Google
384
402
  # @example
385
403
  # require "google/cloud/monitoring"
386
404
  #
387
- # group_service_client = Google::Cloud::Monitoring::Group.new(version: :v3)
405
+ # group_client = Google::Cloud::Monitoring::Group.new(version: :v3)
388
406
  # formatted_name = Google::Cloud::Monitoring::V3::GroupServiceClient.project_path("[PROJECT]")
389
407
  #
390
408
  # # TODO: Initialize `group`:
391
409
  # group = {}
392
- # response = group_service_client.create_group(formatted_name, group)
410
+ # response = group_client.create_group(formatted_name, group)
393
411
 
394
412
  def create_group \
395
413
  name,
@@ -427,11 +445,11 @@ module Google
427
445
  # @example
428
446
  # require "google/cloud/monitoring"
429
447
  #
430
- # group_service_client = Google::Cloud::Monitoring::Group.new(version: :v3)
448
+ # group_client = Google::Cloud::Monitoring::Group.new(version: :v3)
431
449
  #
432
450
  # # TODO: Initialize `group`:
433
451
  # group = {}
434
- # response = group_service_client.update_group(group)
452
+ # response = group_client.update_group(group)
435
453
 
436
454
  def update_group \
437
455
  group,
@@ -461,9 +479,9 @@ module Google
461
479
  # @example
462
480
  # require "google/cloud/monitoring"
463
481
  #
464
- # group_service_client = Google::Cloud::Monitoring::Group.new(version: :v3)
482
+ # group_client = Google::Cloud::Monitoring::Group.new(version: :v3)
465
483
  # formatted_name = Google::Cloud::Monitoring::V3::GroupServiceClient.group_path("[PROJECT]", "[GROUP]")
466
- # group_service_client.delete_group(formatted_name)
484
+ # group_client.delete_group(formatted_name)
467
485
 
468
486
  def delete_group \
469
487
  name,
@@ -518,16 +536,16 @@ module Google
518
536
  # @example
519
537
  # require "google/cloud/monitoring"
520
538
  #
521
- # group_service_client = Google::Cloud::Monitoring::Group.new(version: :v3)
539
+ # group_client = Google::Cloud::Monitoring::Group.new(version: :v3)
522
540
  # formatted_name = Google::Cloud::Monitoring::V3::GroupServiceClient.group_path("[PROJECT]", "[GROUP]")
523
541
  #
524
542
  # # Iterate over all results.
525
- # group_service_client.list_group_members(formatted_name).each do |element|
543
+ # group_client.list_group_members(formatted_name).each do |element|
526
544
  # # Process element.
527
545
  # end
528
546
  #
529
547
  # # Or iterate over results one page at a time.
530
- # group_service_client.list_group_members(formatted_name).each_page do |page|
548
+ # group_client.list_group_members(formatted_name).each_page do |page|
531
549
  # # Process each page at a time.
532
550
  # page.each do |element|
533
551
  # # Process element.