google-cloud-logging 1.10.4 → 1.10.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,9 +4,14 @@
4
4
  "retry_codes": {
5
5
  "idempotent": [
6
6
  "DEADLINE_EXCEEDED",
7
+ "INTERNAL",
7
8
  "UNAVAILABLE"
8
9
  ],
9
- "non_idempotent": []
10
+ "non_idempotent": [],
11
+ "idempotent2": [
12
+ "DEADLINE_EXCEEDED",
13
+ "UNAVAILABLE"
14
+ ]
10
15
  },
11
16
  "retry_params": {
12
17
  "default": {
@@ -20,9 +25,19 @@
20
25
  }
21
26
  },
22
27
  "methods": {
28
+ "DeleteLog": {
29
+ "timeout_millis": 60000,
30
+ "retry_codes_name": "idempotent",
31
+ "retry_params_name": "default"
32
+ },
33
+ "ListLogEntries": {
34
+ "timeout_millis": 10000,
35
+ "retry_codes_name": "idempotent",
36
+ "retry_params_name": "default"
37
+ },
23
38
  "WriteLogEntries": {
24
39
  "timeout_millis": 60000,
25
- "retry_codes_name": "non_idempotent",
40
+ "retry_codes_name": "idempotent",
26
41
  "retry_params_name": "default",
27
42
  "bundling": {
28
43
  "element_count_threshold": 1000,
@@ -30,24 +45,14 @@
30
45
  "delay_threshold_millis": 50
31
46
  }
32
47
  },
33
- "DeleteLog": {
34
- "timeout_millis": 60000,
35
- "retry_codes_name": "non_idempotent",
36
- "retry_params_name": "default"
37
- },
38
- "ListLogEntries": {
39
- "timeout_millis": 10000,
40
- "retry_codes_name": "non_idempotent",
41
- "retry_params_name": "default"
42
- },
43
48
  "ListMonitoredResourceDescriptors": {
44
49
  "timeout_millis": 60000,
45
- "retry_codes_name": "idempotent",
50
+ "retry_codes_name": "idempotent2",
46
51
  "retry_params_name": "default"
47
52
  },
48
53
  "ListLogs": {
49
54
  "timeout_millis": 60000,
50
- "retry_codes_name": "idempotent",
55
+ "retry_codes_name": "idempotent2",
51
56
  "retry_params_name": "default"
52
57
  }
53
58
  }
@@ -216,6 +216,22 @@ module Google
216
216
  &Google::Logging::V2::MetricsServiceV2::Stub.method(:new)
217
217
  )
218
218
 
219
+ @update_log_metric = Google::Gax.create_api_call(
220
+ @metrics_service_v2_stub.method(:update_log_metric),
221
+ defaults["update_log_metric"],
222
+ exception_transformer: exception_transformer,
223
+ params_extractor: proc do |request|
224
+ {'metric_name' => request.metric_name}
225
+ end
226
+ )
227
+ @delete_log_metric = Google::Gax.create_api_call(
228
+ @metrics_service_v2_stub.method(:delete_log_metric),
229
+ defaults["delete_log_metric"],
230
+ exception_transformer: exception_transformer,
231
+ params_extractor: proc do |request|
232
+ {'metric_name' => request.metric_name}
233
+ end
234
+ )
219
235
  @list_log_metrics = Google::Gax.create_api_call(
220
236
  @metrics_service_v2_stub.method(:list_log_metrics),
221
237
  defaults["list_log_metrics"],
@@ -240,26 +256,87 @@ module Google
240
256
  {'parent' => request.parent}
241
257
  end
242
258
  )
243
- @update_log_metric = Google::Gax.create_api_call(
244
- @metrics_service_v2_stub.method(:update_log_metric),
245
- defaults["update_log_metric"],
246
- exception_transformer: exception_transformer,
247
- params_extractor: proc do |request|
248
- {'metric_name' => request.metric_name}
249
- end
250
- )
251
- @delete_log_metric = Google::Gax.create_api_call(
252
- @metrics_service_v2_stub.method(:delete_log_metric),
253
- defaults["delete_log_metric"],
254
- exception_transformer: exception_transformer,
255
- params_extractor: proc do |request|
256
- {'metric_name' => request.metric_name}
257
- end
258
- )
259
259
  end
260
260
 
261
261
  # Service calls
262
262
 
263
+ # Creates or updates a logs-based metric.
264
+ #
265
+ # @param metric_name [String]
266
+ # Required. The resource name of the metric to update:
267
+ #
268
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
269
+ #
270
+ # The updated metric must be provided in the request and it's
271
+ # `name` field must be the same as `[METRIC_ID]` If the metric
272
+ # does not exist in `[PROJECT_ID]`, then a new metric is created.
273
+ # @param metric [Google::Logging::V2::LogMetric | Hash]
274
+ # Required. The updated metric.
275
+ # A hash of the same form as `Google::Logging::V2::LogMetric`
276
+ # can also be provided.
277
+ # @param options [Google::Gax::CallOptions]
278
+ # Overrides the default settings for this call, e.g, timeout,
279
+ # retries, etc.
280
+ # @yield [result, operation] Access the result along with the RPC operation
281
+ # @yieldparam result [Google::Logging::V2::LogMetric]
282
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
283
+ # @return [Google::Logging::V2::LogMetric]
284
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
285
+ # @example
286
+ # require "google/cloud/logging/v2"
287
+ #
288
+ # metrics_client = Google::Cloud::Logging::V2::MetricsServiceV2Client.new
289
+ # formatted_metric_name = Google::Cloud::Logging::V2::MetricsServiceV2Client.log_metric_path("[PROJECT]", "[METRIC]")
290
+ #
291
+ # # TODO: Initialize `metric`:
292
+ # metric = {}
293
+ # response = metrics_client.update_log_metric(formatted_metric_name, metric)
294
+
295
+ def update_log_metric \
296
+ metric_name,
297
+ metric,
298
+ options: nil,
299
+ &block
300
+ req = {
301
+ metric_name: metric_name,
302
+ metric: metric
303
+ }.delete_if { |_, v| v.nil? }
304
+ req = Google::Gax::to_proto(req, Google::Logging::V2::UpdateLogMetricRequest)
305
+ @update_log_metric.call(req, options, &block)
306
+ end
307
+
308
+ # Deletes a logs-based metric.
309
+ #
310
+ # @param metric_name [String]
311
+ # Required. The resource name of the metric to delete:
312
+ #
313
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
314
+ # @param options [Google::Gax::CallOptions]
315
+ # Overrides the default settings for this call, e.g, timeout,
316
+ # retries, etc.
317
+ # @yield [result, operation] Access the result along with the RPC operation
318
+ # @yieldparam result []
319
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
320
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
321
+ # @example
322
+ # require "google/cloud/logging/v2"
323
+ #
324
+ # metrics_client = Google::Cloud::Logging::V2::MetricsServiceV2Client.new
325
+ # formatted_metric_name = Google::Cloud::Logging::V2::MetricsServiceV2Client.log_metric_path("[PROJECT]", "[METRIC]")
326
+ # metrics_client.delete_log_metric(formatted_metric_name)
327
+
328
+ def delete_log_metric \
329
+ metric_name,
330
+ options: nil,
331
+ &block
332
+ req = {
333
+ metric_name: metric_name
334
+ }.delete_if { |_, v| v.nil? }
335
+ req = Google::Gax::to_proto(req, Google::Logging::V2::DeleteLogMetricRequest)
336
+ @delete_log_metric.call(req, options, &block)
337
+ nil
338
+ end
339
+
263
340
  # Lists logs-based metrics.
264
341
  #
265
342
  # @param parent [String]
@@ -391,83 +468,6 @@ module Google
391
468
  req = Google::Gax::to_proto(req, Google::Logging::V2::CreateLogMetricRequest)
392
469
  @create_log_metric.call(req, options, &block)
393
470
  end
394
-
395
- # Creates or updates a logs-based metric.
396
- #
397
- # @param metric_name [String]
398
- # Required. The resource name of the metric to update:
399
- #
400
- # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
401
- #
402
- # The updated metric must be provided in the request and it's
403
- # `name` field must be the same as `[METRIC_ID]` If the metric
404
- # does not exist in `[PROJECT_ID]`, then a new metric is created.
405
- # @param metric [Google::Logging::V2::LogMetric | Hash]
406
- # Required. The updated metric.
407
- # A hash of the same form as `Google::Logging::V2::LogMetric`
408
- # can also be provided.
409
- # @param options [Google::Gax::CallOptions]
410
- # Overrides the default settings for this call, e.g, timeout,
411
- # retries, etc.
412
- # @yield [result, operation] Access the result along with the RPC operation
413
- # @yieldparam result [Google::Logging::V2::LogMetric]
414
- # @yieldparam operation [GRPC::ActiveCall::Operation]
415
- # @return [Google::Logging::V2::LogMetric]
416
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
417
- # @example
418
- # require "google/cloud/logging/v2"
419
- #
420
- # metrics_client = Google::Cloud::Logging::V2::MetricsServiceV2Client.new
421
- # formatted_metric_name = Google::Cloud::Logging::V2::MetricsServiceV2Client.log_metric_path("[PROJECT]", "[METRIC]")
422
- #
423
- # # TODO: Initialize `metric`:
424
- # metric = {}
425
- # response = metrics_client.update_log_metric(formatted_metric_name, metric)
426
-
427
- def update_log_metric \
428
- metric_name,
429
- metric,
430
- options: nil,
431
- &block
432
- req = {
433
- metric_name: metric_name,
434
- metric: metric
435
- }.delete_if { |_, v| v.nil? }
436
- req = Google::Gax::to_proto(req, Google::Logging::V2::UpdateLogMetricRequest)
437
- @update_log_metric.call(req, options, &block)
438
- end
439
-
440
- # Deletes a logs-based metric.
441
- #
442
- # @param metric_name [String]
443
- # Required. The resource name of the metric to delete:
444
- #
445
- # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
446
- # @param options [Google::Gax::CallOptions]
447
- # Overrides the default settings for this call, e.g, timeout,
448
- # retries, etc.
449
- # @yield [result, operation] Access the result along with the RPC operation
450
- # @yieldparam result []
451
- # @yieldparam operation [GRPC::ActiveCall::Operation]
452
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
453
- # @example
454
- # require "google/cloud/logging/v2"
455
- #
456
- # metrics_client = Google::Cloud::Logging::V2::MetricsServiceV2Client.new
457
- # formatted_metric_name = Google::Cloud::Logging::V2::MetricsServiceV2Client.log_metric_path("[PROJECT]", "[METRIC]")
458
- # metrics_client.delete_log_metric(formatted_metric_name)
459
-
460
- def delete_log_metric \
461
- metric_name,
462
- options: nil,
463
- &block
464
- req = {
465
- metric_name: metric_name
466
- }.delete_if { |_, v| v.nil? }
467
- req = Google::Gax::to_proto(req, Google::Logging::V2::DeleteLogMetricRequest)
468
- @delete_log_metric.call(req, options, &block)
469
- nil
470
- end
471
471
  end
472
472
  end
473
473
  end
@@ -4,9 +4,14 @@
4
4
  "retry_codes": {
5
5
  "idempotent": [
6
6
  "DEADLINE_EXCEEDED",
7
+ "INTERNAL",
7
8
  "UNAVAILABLE"
8
9
  ],
9
- "non_idempotent": []
10
+ "non_idempotent": [],
11
+ "idempotent2": [
12
+ "DEADLINE_EXCEEDED",
13
+ "UNAVAILABLE"
14
+ ]
10
15
  },
11
16
  "retry_params": {
12
17
  "default": {
@@ -20,27 +25,27 @@
20
25
  }
21
26
  },
22
27
  "methods": {
23
- "ListLogMetrics": {
28
+ "UpdateLogMetric": {
24
29
  "timeout_millis": 60000,
25
30
  "retry_codes_name": "idempotent",
26
31
  "retry_params_name": "default"
27
32
  },
28
- "GetLogMetric": {
33
+ "DeleteLogMetric": {
29
34
  "timeout_millis": 60000,
30
35
  "retry_codes_name": "idempotent",
31
36
  "retry_params_name": "default"
32
37
  },
33
- "CreateLogMetric": {
38
+ "ListLogMetrics": {
34
39
  "timeout_millis": 60000,
35
- "retry_codes_name": "non_idempotent",
40
+ "retry_codes_name": "idempotent2",
36
41
  "retry_params_name": "default"
37
42
  },
38
- "UpdateLogMetric": {
43
+ "GetLogMetric": {
39
44
  "timeout_millis": 60000,
40
- "retry_codes_name": "non_idempotent",
45
+ "retry_codes_name": "idempotent2",
41
46
  "retry_params_name": "default"
42
47
  },
43
- "DeleteLogMetric": {
48
+ "CreateLogMetric": {
44
49
  "timeout_millis": 60000,
45
50
  "retry_codes_name": "non_idempotent",
46
51
  "retry_params_name": "default"
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Logging
19
- VERSION = "1.10.4".freeze
19
+ VERSION = "1.10.9".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -50,10 +50,10 @@ end
50
50
 
51
51
  module Google
52
52
  module Logging
53
- module V2
54
- LogEntry = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogEntry").msgclass
55
- LogEntryOperation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogEntryOperation").msgclass
56
- LogEntrySourceLocation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogEntrySourceLocation").msgclass
57
- end
58
53
  end
59
54
  end
55
+ module Google::Logging::V2
56
+ LogEntry = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogEntry").msgclass
57
+ LogEntryOperation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogEntryOperation").msgclass
58
+ LogEntrySourceLocation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogEntrySourceLocation").msgclass
59
+ end
@@ -142,32 +142,32 @@ end
142
142
 
143
143
  module Google
144
144
  module Logging
145
- module V2
146
- LogBucket = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogBucket").msgclass
147
- LogSink = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogSink").msgclass
148
- LogSink::VersionFormat = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogSink.VersionFormat").enummodule
149
- BigQueryOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.BigQueryOptions").msgclass
150
- ListBucketsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListBucketsRequest").msgclass
151
- ListBucketsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListBucketsResponse").msgclass
152
- UpdateBucketRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.UpdateBucketRequest").msgclass
153
- GetBucketRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.GetBucketRequest").msgclass
154
- ListSinksRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListSinksRequest").msgclass
155
- ListSinksResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListSinksResponse").msgclass
156
- GetSinkRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.GetSinkRequest").msgclass
157
- CreateSinkRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CreateSinkRequest").msgclass
158
- UpdateSinkRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.UpdateSinkRequest").msgclass
159
- DeleteSinkRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.DeleteSinkRequest").msgclass
160
- LogExclusion = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogExclusion").msgclass
161
- ListExclusionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListExclusionsRequest").msgclass
162
- ListExclusionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListExclusionsResponse").msgclass
163
- GetExclusionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.GetExclusionRequest").msgclass
164
- CreateExclusionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CreateExclusionRequest").msgclass
165
- UpdateExclusionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.UpdateExclusionRequest").msgclass
166
- DeleteExclusionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.DeleteExclusionRequest").msgclass
167
- GetCmekSettingsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.GetCmekSettingsRequest").msgclass
168
- UpdateCmekSettingsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.UpdateCmekSettingsRequest").msgclass
169
- CmekSettings = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CmekSettings").msgclass
170
- LifecycleState = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LifecycleState").enummodule
171
- end
172
145
  end
173
146
  end
147
+ module Google::Logging::V2
148
+ LogBucket = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogBucket").msgclass
149
+ LogSink = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogSink").msgclass
150
+ LogSink::VersionFormat = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogSink.VersionFormat").enummodule
151
+ BigQueryOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.BigQueryOptions").msgclass
152
+ ListBucketsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListBucketsRequest").msgclass
153
+ ListBucketsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListBucketsResponse").msgclass
154
+ UpdateBucketRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.UpdateBucketRequest").msgclass
155
+ GetBucketRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.GetBucketRequest").msgclass
156
+ ListSinksRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListSinksRequest").msgclass
157
+ ListSinksResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListSinksResponse").msgclass
158
+ GetSinkRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.GetSinkRequest").msgclass
159
+ CreateSinkRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CreateSinkRequest").msgclass
160
+ UpdateSinkRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.UpdateSinkRequest").msgclass
161
+ DeleteSinkRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.DeleteSinkRequest").msgclass
162
+ LogExclusion = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogExclusion").msgclass
163
+ ListExclusionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListExclusionsRequest").msgclass
164
+ ListExclusionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListExclusionsResponse").msgclass
165
+ GetExclusionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.GetExclusionRequest").msgclass
166
+ CreateExclusionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CreateExclusionRequest").msgclass
167
+ UpdateExclusionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.UpdateExclusionRequest").msgclass
168
+ DeleteExclusionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.DeleteExclusionRequest").msgclass
169
+ GetCmekSettingsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.GetCmekSettingsRequest").msgclass
170
+ UpdateCmekSettingsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.UpdateCmekSettingsRequest").msgclass
171
+ CmekSettings = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CmekSettings").msgclass
172
+ LifecycleState = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LifecycleState").enummodule
173
+ end
@@ -1,5 +1,5 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: google/logging/v2/logging_config.proto for package 'google.logging.v2'
2
+ # Source: google/logging/v2/logging_config.proto for package 'Google::Cloud::Logging::V2'
3
3
  # Original file comments:
4
4
  # Copyright 2020 Google LLC
5
5
  #
@@ -22,91 +22,91 @@ require 'google/logging/v2/logging_config_pb'
22
22
 
23
23
  module Google
24
24
  module Logging
25
- module V2
26
- module ConfigServiceV2
27
- # Service for configuring sinks used to route log entries.
28
- class Service
29
-
30
- include GRPC::GenericService
25
+ end
26
+ end
27
+ module Google::Logging::V2
28
+ module ConfigServiceV2
29
+ # Service for configuring sinks used to route log entries.
30
+ class Service
31
31
 
32
- self.marshal_class_method = :encode
33
- self.unmarshal_class_method = :decode
34
- self.service_name = 'google.logging.v2.ConfigServiceV2'
32
+ include GRPC::GenericService
35
33
 
36
- # Lists buckets (Beta).
37
- rpc :ListBuckets, ListBucketsRequest, ListBucketsResponse
38
- # Gets a bucket (Beta).
39
- rpc :GetBucket, GetBucketRequest, LogBucket
40
- # Updates a bucket. This method replaces the following fields in the
41
- # existing bucket with values from the new bucket: `retention_period`
42
- #
43
- # If the retention period is decreased and the bucket is locked,
44
- # FAILED_PRECONDITION will be returned.
45
- #
46
- # If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION
47
- # will be returned.
48
- #
49
- # A buckets region may not be modified after it is created.
50
- # This method is in Beta.
51
- rpc :UpdateBucket, UpdateBucketRequest, LogBucket
52
- # Lists sinks.
53
- rpc :ListSinks, ListSinksRequest, ListSinksResponse
54
- # Gets a sink.
55
- rpc :GetSink, GetSinkRequest, LogSink
56
- # Creates a sink that exports specified log entries to a destination. The
57
- # export of newly-ingested log entries begins immediately, unless the sink's
58
- # `writer_identity` is not permitted to write to the destination. A sink can
59
- # export log entries only from the resource owning the sink.
60
- rpc :CreateSink, CreateSinkRequest, LogSink
61
- # Updates a sink. This method replaces the following fields in the existing
62
- # sink with values from the new sink: `destination`, and `filter`.
63
- #
64
- # The updated sink might also have a new `writer_identity`; see the
65
- # `unique_writer_identity` field.
66
- rpc :UpdateSink, UpdateSinkRequest, LogSink
67
- # Deletes a sink. If the sink has a unique `writer_identity`, then that
68
- # service account is also deleted.
69
- rpc :DeleteSink, DeleteSinkRequest, Google::Protobuf::Empty
70
- # Lists all the exclusions in a parent resource.
71
- rpc :ListExclusions, ListExclusionsRequest, ListExclusionsResponse
72
- # Gets the description of an exclusion.
73
- rpc :GetExclusion, GetExclusionRequest, LogExclusion
74
- # Creates a new exclusion in a specified parent resource.
75
- # Only log entries belonging to that resource can be excluded.
76
- # You can have up to 10 exclusions in a resource.
77
- rpc :CreateExclusion, CreateExclusionRequest, LogExclusion
78
- # Changes one or more properties of an existing exclusion.
79
- rpc :UpdateExclusion, UpdateExclusionRequest, LogExclusion
80
- # Deletes an exclusion.
81
- rpc :DeleteExclusion, DeleteExclusionRequest, Google::Protobuf::Empty
82
- # Gets the Logs Router CMEK settings for the given resource.
83
- #
84
- # Note: CMEK for the Logs Router can currently only be configured for GCP
85
- # organizations. Once configured, it applies to all projects and folders in
86
- # the GCP organization.
87
- #
88
- # See [Enabling CMEK for Logs
89
- # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
90
- rpc :GetCmekSettings, GetCmekSettingsRequest, CmekSettings
91
- # Updates the Logs Router CMEK settings for the given resource.
92
- #
93
- # Note: CMEK for the Logs Router can currently only be configured for GCP
94
- # organizations. Once configured, it applies to all projects and folders in
95
- # the GCP organization.
96
- #
97
- # [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]
98
- # will fail if 1) `kms_key_name` is invalid, or 2) the associated service
99
- # account does not have the required
100
- # `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or
101
- # 3) access to the key is disabled.
102
- #
103
- # See [Enabling CMEK for Logs
104
- # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
105
- rpc :UpdateCmekSettings, UpdateCmekSettingsRequest, CmekSettings
106
- end
34
+ self.marshal_class_method = :encode
35
+ self.unmarshal_class_method = :decode
36
+ self.service_name = 'google.logging.v2.ConfigServiceV2'
107
37
 
108
- Stub = Service.rpc_stub_class
109
- end
38
+ # Lists buckets (Beta).
39
+ rpc :ListBuckets, ListBucketsRequest, ListBucketsResponse
40
+ # Gets a bucket (Beta).
41
+ rpc :GetBucket, GetBucketRequest, LogBucket
42
+ # Updates a bucket. This method replaces the following fields in the
43
+ # existing bucket with values from the new bucket: `retention_period`
44
+ #
45
+ # If the retention period is decreased and the bucket is locked,
46
+ # FAILED_PRECONDITION will be returned.
47
+ #
48
+ # If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION
49
+ # will be returned.
50
+ #
51
+ # A buckets region may not be modified after it is created.
52
+ # This method is in Beta.
53
+ rpc :UpdateBucket, UpdateBucketRequest, LogBucket
54
+ # Lists sinks.
55
+ rpc :ListSinks, ListSinksRequest, ListSinksResponse
56
+ # Gets a sink.
57
+ rpc :GetSink, GetSinkRequest, LogSink
58
+ # Creates a sink that exports specified log entries to a destination. The
59
+ # export of newly-ingested log entries begins immediately, unless the sink's
60
+ # `writer_identity` is not permitted to write to the destination. A sink can
61
+ # export log entries only from the resource owning the sink.
62
+ rpc :CreateSink, CreateSinkRequest, LogSink
63
+ # Updates a sink. This method replaces the following fields in the existing
64
+ # sink with values from the new sink: `destination`, and `filter`.
65
+ #
66
+ # The updated sink might also have a new `writer_identity`; see the
67
+ # `unique_writer_identity` field.
68
+ rpc :UpdateSink, UpdateSinkRequest, LogSink
69
+ # Deletes a sink. If the sink has a unique `writer_identity`, then that
70
+ # service account is also deleted.
71
+ rpc :DeleteSink, DeleteSinkRequest, Google::Protobuf::Empty
72
+ # Lists all the exclusions in a parent resource.
73
+ rpc :ListExclusions, ListExclusionsRequest, ListExclusionsResponse
74
+ # Gets the description of an exclusion.
75
+ rpc :GetExclusion, GetExclusionRequest, LogExclusion
76
+ # Creates a new exclusion in a specified parent resource.
77
+ # Only log entries belonging to that resource can be excluded.
78
+ # You can have up to 10 exclusions in a resource.
79
+ rpc :CreateExclusion, CreateExclusionRequest, LogExclusion
80
+ # Changes one or more properties of an existing exclusion.
81
+ rpc :UpdateExclusion, UpdateExclusionRequest, LogExclusion
82
+ # Deletes an exclusion.
83
+ rpc :DeleteExclusion, DeleteExclusionRequest, Google::Protobuf::Empty
84
+ # Gets the Logs Router CMEK settings for the given resource.
85
+ #
86
+ # Note: CMEK for the Logs Router can currently only be configured for GCP
87
+ # organizations. Once configured, it applies to all projects and folders in
88
+ # the GCP organization.
89
+ #
90
+ # See [Enabling CMEK for Logs
91
+ # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
92
+ rpc :GetCmekSettings, GetCmekSettingsRequest, CmekSettings
93
+ # Updates the Logs Router CMEK settings for the given resource.
94
+ #
95
+ # Note: CMEK for the Logs Router can currently only be configured for GCP
96
+ # organizations. Once configured, it applies to all projects and folders in
97
+ # the GCP organization.
98
+ #
99
+ # [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]
100
+ # will fail if 1) `kms_key_name` is invalid, or 2) the associated service
101
+ # account does not have the required
102
+ # `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or
103
+ # 3) access to the key is disabled.
104
+ #
105
+ # See [Enabling CMEK for Logs
106
+ # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
107
+ rpc :UpdateCmekSettings, UpdateCmekSettingsRequest, CmekSettings
110
108
  end
109
+
110
+ Stub = Service.rpc_stub_class
111
111
  end
112
112
  end