google-cloud-logging-v2 0.5.6 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -485,6 +485,59 @@ module Google
485
485
  "projects/#{project}"
486
486
  end
487
487
 
488
+ ##
489
+ # Create a fully-qualified Settings resource string.
490
+ #
491
+ # @overload settings_path(project:)
492
+ # The resource will be in the following format:
493
+ #
494
+ # `projects/{project}/settings`
495
+ #
496
+ # @param project [String]
497
+ #
498
+ # @overload settings_path(organization:)
499
+ # The resource will be in the following format:
500
+ #
501
+ # `organizations/{organization}/settings`
502
+ #
503
+ # @param organization [String]
504
+ #
505
+ # @overload settings_path(folder:)
506
+ # The resource will be in the following format:
507
+ #
508
+ # `folders/{folder}/settings`
509
+ #
510
+ # @param folder [String]
511
+ #
512
+ # @overload settings_path(billing_account:)
513
+ # The resource will be in the following format:
514
+ #
515
+ # `billingAccounts/{billing_account}/settings`
516
+ #
517
+ # @param billing_account [String]
518
+ #
519
+ # @return [::String]
520
+ def settings_path **args
521
+ resources = {
522
+ "project" => (proc do |project:|
523
+ "projects/#{project}/settings"
524
+ end),
525
+ "organization" => (proc do |organization:|
526
+ "organizations/#{organization}/settings"
527
+ end),
528
+ "folder" => (proc do |folder:|
529
+ "folders/#{folder}/settings"
530
+ end),
531
+ "billing_account" => (proc do |billing_account:|
532
+ "billingAccounts/#{billing_account}/settings"
533
+ end)
534
+ }
535
+
536
+ resource = resources[args.keys.sort.join(":")]
537
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
538
+ resource.call(**args)
539
+ end
540
+
488
541
  extend self
489
542
  end
490
543
  end
@@ -24,6 +24,7 @@ require "google/cloud/logging/v2/version"
24
24
 
25
25
  require "google/cloud/logging/v2/config_service/credentials"
26
26
  require "google/cloud/logging/v2/config_service/paths"
27
+ require "google/cloud/logging/v2/config_service/operations"
27
28
  require "google/cloud/logging/v2/config_service/client"
28
29
 
29
30
  module Google
@@ -175,10 +175,10 @@ module Google
175
175
  # Service calls
176
176
 
177
177
  ##
178
- # Deletes all the log entries in a log. The log reappears if it receives new
179
- # entries. Log entries written shortly before the delete operation might not
180
- # be deleted. Entries received after the delete operation with a timestamp
181
- # before the operation will be deleted.
178
+ # Deletes all the log entries in a log for the _Default Log Bucket. The log
179
+ # reappears if it receives new entries. Log entries written shortly before
180
+ # the delete operation might not be deleted. Entries received after the
181
+ # delete operation with a timestamp before the operation will be deleted.
182
182
  #
183
183
  # @overload delete_log(request, options = nil)
184
184
  # Pass arguments to `delete_log` via a request object, either of type
@@ -198,14 +198,15 @@ module Google
198
198
  # @param log_name [::String]
199
199
  # Required. The resource name of the log to delete:
200
200
  #
201
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
202
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
203
- # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
204
- # "folders/[FOLDER_ID]/logs/[LOG_ID]"
201
+ # * `projects/[PROJECT_ID]/logs/[LOG_ID]`
202
+ # * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`
203
+ # * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`
204
+ # * `folders/[FOLDER_ID]/logs/[LOG_ID]`
205
205
  #
206
206
  # `[LOG_ID]` must be URL-encoded. For example,
207
207
  # `"projects/my-project-id/logs/syslog"`,
208
- # `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`.
208
+ # `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`.
209
+ #
209
210
  # For more information about log names, see
210
211
  # {::Google::Cloud::Logging::V2::LogEntry LogEntry}.
211
212
  #
@@ -301,15 +302,15 @@ module Google
301
302
  # Optional. A default log resource name that is assigned to all log entries
302
303
  # in `entries` that do not specify a value for `log_name`:
303
304
  #
304
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
305
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
306
- # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
307
- # "folders/[FOLDER_ID]/logs/[LOG_ID]"
305
+ # * `projects/[PROJECT_ID]/logs/[LOG_ID]`
306
+ # * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`
307
+ # * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`
308
+ # * `folders/[FOLDER_ID]/logs/[LOG_ID]`
308
309
  #
309
310
  # `[LOG_ID]` must be URL-encoded. For example:
310
311
  #
311
312
  # "projects/my-project-id/logs/syslog"
312
- # "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"
313
+ # "organizations/123/logs/cloudaudit.googleapis.com%2Factivity"
313
314
  #
314
315
  # The permission `logging.logEntries.create` is needed on each project,
315
316
  # organization, billing account, or folder that is receiving new log
@@ -344,14 +345,14 @@ module Google
344
345
  # the entries later in the list. See the `entries.list` method.
345
346
  #
346
347
  # Log entries with timestamps that are more than the
347
- # [logs retention period](https://cloud.google.com/logging/quota-policy) in
348
+ # [logs retention period](https://cloud.google.com/logging/quotas) in
348
349
  # the past or more than 24 hours in the future will not be available when
349
350
  # calling `entries.list`. However, those log entries can still be [exported
350
351
  # with
351
352
  # LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
352
353
  #
353
354
  # To improve throughput and to avoid exceeding the
354
- # [quota limit](https://cloud.google.com/logging/quota-policy) for calls to
355
+ # [quota limit](https://cloud.google.com/logging/quotas) for calls to
355
356
  # `entries.write`, you should try to include several log entries in this
356
357
  # list, rather than calling this method for each individual log entry.
357
358
  # @param partial_success [::Boolean]
@@ -446,16 +447,17 @@ module Google
446
447
  # Required. Names of one or more parent resources from which to
447
448
  # retrieve log entries:
448
449
  #
449
- # "projects/[PROJECT_ID]"
450
- # "organizations/[ORGANIZATION_ID]"
451
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
452
- # "folders/[FOLDER_ID]"
450
+ # * `projects/[PROJECT_ID]`
451
+ # * `organizations/[ORGANIZATION_ID]`
452
+ # * `billingAccounts/[BILLING_ACCOUNT_ID]`
453
+ # * `folders/[FOLDER_ID]`
454
+ #
455
+ # May alternatively be one or more views:
453
456
  #
454
- # May alternatively be one or more views
455
- # projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
456
- # organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
457
- # billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
458
- # folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
457
+ # * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
458
+ # * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
459
+ # * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
460
+ # * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
459
461
  #
460
462
  # Projects listed in the `project_ids` field are added to this list.
461
463
  # @param filter [::String]
@@ -474,10 +476,10 @@ module Google
474
476
  # in order of decreasing timestamps (newest first). Entries with equal
475
477
  # timestamps are returned in order of their `insert_id` values.
476
478
  # @param page_size [::Integer]
477
- # Optional. The maximum number of results to return from this request.
478
- # Default is 50. If the value is negative or exceeds 1000,
479
- # the request is rejected. The presence of `next_page_token` in the
480
- # response indicates that more results might be available.
479
+ # Optional. The maximum number of results to return from this request. Default is 50.
480
+ # If the value is negative or exceeds 1000, the request is rejected. The
481
+ # presence of `next_page_token` in the response indicates that more results
482
+ # might be available.
481
483
  # @param page_token [::String]
482
484
  # Optional. If present, then retrieve the next batch of results from the
483
485
  # preceding call to this method. `page_token` must be the value of
@@ -660,10 +662,10 @@ module Google
660
662
  # @param parent [::String]
661
663
  # Required. The resource name that owns the logs:
662
664
  #
663
- # "projects/[PROJECT_ID]"
664
- # "organizations/[ORGANIZATION_ID]"
665
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
666
- # "folders/[FOLDER_ID]"
665
+ # * `projects/[PROJECT_ID]`
666
+ # * `organizations/[ORGANIZATION_ID]`
667
+ # * `billingAccounts/[BILLING_ACCOUNT_ID]`
668
+ # * `folders/[FOLDER_ID]`
667
669
  # @param page_size [::Integer]
668
670
  # Optional. The maximum number of results to return from this request.
669
671
  # Non-positive values are ignored. The presence of `nextPageToken` in the
@@ -675,16 +677,18 @@ module Google
675
677
  # parameters should be identical to those in the previous call.
676
678
  # @param resource_names [::Array<::String>]
677
679
  # Optional. The resource name that owns the logs:
678
- # projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
679
- # organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
680
- # billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
681
- # folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
680
+ #
681
+ # * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
682
+ # * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
683
+ # * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
684
+ # * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
682
685
  #
683
686
  # To support legacy queries, it could also be:
684
- # "projects/[PROJECT_ID]"
685
- # "organizations/[ORGANIZATION_ID]"
686
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
687
- # "folders/[FOLDER_ID]"
687
+ #
688
+ # * `projects/[PROJECT_ID]`
689
+ # * `organizations/[ORGANIZATION_ID]`
690
+ # * `billingAccounts/[BILLING_ACCOUNT_ID]`
691
+ # * `folders/[FOLDER_ID]`
688
692
  #
689
693
  # @yield [response, operation] Access the result along with the RPC operation
690
694
  # @yieldparam response [::Google::Cloud::Logging::V2::ListLogsResponse]
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Logging
23
23
  module V2
24
- VERSION = "0.5.6"
24
+ VERSION = "0.8.0"
25
25
  end
26
26
  end
27
27
  end
@@ -16,8 +16,8 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
- require "google/cloud/logging/v2/config_service"
20
19
  require "google/cloud/logging/v2/logging_service"
20
+ require "google/cloud/logging/v2/config_service"
21
21
  require "google/cloud/logging/v2/metrics_service"
22
22
  require "google/cloud/logging/v2/version"
23
23
 
@@ -27,8 +27,10 @@ module Google
27
27
  ##
28
28
  # To load this package, including all its services, and instantiate a client:
29
29
  #
30
+ # @example
31
+ #
30
32
  # require "google/cloud/logging/v2"
31
- # client = ::Google::Cloud::Logging::V2::ConfigService::Client.new
33
+ # client = ::Google::Cloud::Logging::V2::LoggingService::Client.new
32
34
  #
33
35
  module V2
34
36
  end
@@ -1,6 +1,8 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/logging/v2/log_entry.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/field_behavior_pb'
5
7
  require 'google/api/monitored_resource_pb'
6
8
  require 'google/api/resource_pb'
@@ -9,9 +11,6 @@ require 'google/logging/type/log_severity_pb'
9
11
  require 'google/protobuf/any_pb'
10
12
  require 'google/protobuf/struct_pb'
11
13
  require 'google/protobuf/timestamp_pb'
12
- require 'google/rpc/status_pb'
13
- require 'google/api/annotations_pb'
14
- require 'google/protobuf'
15
14
 
16
15
  Google::Protobuf::DescriptorPool.generated_pool.build do
17
16
  add_file("google/logging/v2/log_entry.proto", :syntax => :proto3) do
@@ -29,6 +28,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
29
28
  optional :span_id, :string, 27
30
29
  optional :trace_sampled, :bool, 30
31
30
  optional :source_location, :message, 23, "google.logging.v2.LogEntrySourceLocation"
31
+ optional :split, :message, 35, "google.logging.v2.LogSplit"
32
32
  oneof :payload do
33
33
  optional :proto_payload, :message, 2, "google.protobuf.Any"
34
34
  optional :text_payload, :string, 3
@@ -46,6 +46,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
46
46
  optional :line, :int64, 2
47
47
  optional :function, :string, 3
48
48
  end
49
+ add_message "google.logging.v2.LogSplit" do
50
+ optional :uid, :string, 1
51
+ optional :index, :int32, 2
52
+ optional :total_splits, :int32, 3
53
+ end
49
54
  end
50
55
  end
51
56
 
@@ -56,6 +61,7 @@ module Google
56
61
  LogEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogEntry").msgclass
57
62
  LogEntryOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogEntryOperation").msgclass
58
63
  LogEntrySourceLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogEntrySourceLocation").msgclass
64
+ LogSplit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogSplit").msgclass
59
65
  end
60
66
  end
61
67
  end
@@ -1,15 +1,16 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/logging/v2/logging_config.proto
3
3
 
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
4
7
  require 'google/api/client_pb'
5
8
  require 'google/api/field_behavior_pb'
6
9
  require 'google/api/resource_pb'
7
- require 'google/protobuf/duration_pb'
10
+ require 'google/longrunning/operations_pb'
8
11
  require 'google/protobuf/empty_pb'
9
12
  require 'google/protobuf/field_mask_pb'
10
13
  require 'google/protobuf/timestamp_pb'
11
- require 'google/api/annotations_pb'
12
- require 'google/protobuf'
13
14
 
14
15
  Google::Protobuf::DescriptorPool.generated_pool.build do
15
16
  add_file("google/logging/v2/logging_config.proto", :syntax => :proto3) do
@@ -21,6 +22,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
21
22
  optional :retention_days, :int32, 11
22
23
  optional :locked, :bool, 9
23
24
  optional :lifecycle_state, :enum, 12, "google.logging.v2.LifecycleState"
25
+ repeated :restricted_fields, :string, 15
26
+ optional :cmek_settings, :message, 19, "google.logging.v2.CmekSettings"
24
27
  end
25
28
  add_message "google.logging.v2.LogView" do
26
29
  optional :name, :string, 1
@@ -178,11 +181,52 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
178
181
  optional :kms_key_name, :string, 2
179
182
  optional :service_account_id, :string, 3
180
183
  end
184
+ add_message "google.logging.v2.GetSettingsRequest" do
185
+ optional :name, :string, 1
186
+ end
187
+ add_message "google.logging.v2.UpdateSettingsRequest" do
188
+ optional :name, :string, 1
189
+ optional :settings, :message, 2, "google.logging.v2.Settings"
190
+ optional :update_mask, :message, 3, "google.protobuf.FieldMask"
191
+ end
192
+ add_message "google.logging.v2.Settings" do
193
+ optional :name, :string, 1
194
+ optional :kms_key_name, :string, 2
195
+ optional :kms_service_account_id, :string, 3
196
+ optional :storage_location, :string, 4
197
+ optional :disable_default_sink, :bool, 5
198
+ end
199
+ add_message "google.logging.v2.CopyLogEntriesRequest" do
200
+ optional :name, :string, 1
201
+ optional :filter, :string, 3
202
+ optional :destination, :string, 4
203
+ end
204
+ add_message "google.logging.v2.CopyLogEntriesMetadata" do
205
+ optional :start_time, :message, 1, "google.protobuf.Timestamp"
206
+ optional :end_time, :message, 2, "google.protobuf.Timestamp"
207
+ optional :state, :enum, 3, "google.logging.v2.OperationState"
208
+ optional :cancellation_requested, :bool, 4
209
+ optional :request, :message, 5, "google.logging.v2.CopyLogEntriesRequest"
210
+ optional :progress, :int32, 6
211
+ optional :writer_identity, :string, 7
212
+ end
213
+ add_message "google.logging.v2.CopyLogEntriesResponse" do
214
+ optional :log_entries_copied_count, :int64, 1
215
+ end
181
216
  add_enum "google.logging.v2.LifecycleState" do
182
217
  value :LIFECYCLE_STATE_UNSPECIFIED, 0
183
218
  value :ACTIVE, 1
184
219
  value :DELETE_REQUESTED, 2
185
220
  end
221
+ add_enum "google.logging.v2.OperationState" do
222
+ value :OPERATION_STATE_UNSPECIFIED, 0
223
+ value :OPERATION_STATE_SCHEDULED, 1
224
+ value :OPERATION_STATE_WAITING_FOR_PERMISSIONS, 2
225
+ value :OPERATION_STATE_RUNNING, 3
226
+ value :OPERATION_STATE_SUCCEEDED, 4
227
+ value :OPERATION_STATE_FAILED, 5
228
+ value :OPERATION_STATE_CANCELLED, 6
229
+ end
186
230
  end
187
231
  end
188
232
 
@@ -224,7 +268,14 @@ module Google
224
268
  GetCmekSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.GetCmekSettingsRequest").msgclass
225
269
  UpdateCmekSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.UpdateCmekSettingsRequest").msgclass
226
270
  CmekSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CmekSettings").msgclass
271
+ GetSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.GetSettingsRequest").msgclass
272
+ UpdateSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.UpdateSettingsRequest").msgclass
273
+ Settings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.Settings").msgclass
274
+ CopyLogEntriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CopyLogEntriesRequest").msgclass
275
+ CopyLogEntriesMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CopyLogEntriesMetadata").msgclass
276
+ CopyLogEntriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CopyLogEntriesResponse").msgclass
227
277
  LifecycleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LifecycleState").enummodule
278
+ OperationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.OperationState").enummodule
228
279
  end
229
280
  end
230
281
  end
@@ -33,43 +33,50 @@ module Google
33
33
  self.unmarshal_class_method = :decode
34
34
  self.service_name = 'google.logging.v2.ConfigServiceV2'
35
35
 
36
- # Lists buckets.
36
+ # Lists log buckets.
37
37
  rpc :ListBuckets, ::Google::Cloud::Logging::V2::ListBucketsRequest, ::Google::Cloud::Logging::V2::ListBucketsResponse
38
- # Gets a bucket.
38
+ # Gets a log bucket.
39
39
  rpc :GetBucket, ::Google::Cloud::Logging::V2::GetBucketRequest, ::Google::Cloud::Logging::V2::LogBucket
40
- # Creates a bucket that can be used to store log entries. Once a bucket has
41
- # been created, the region cannot be changed.
40
+ # Creates a log bucket that can be used to store log entries. After a bucket
41
+ # has been created, the bucket's location cannot be changed.
42
42
  rpc :CreateBucket, ::Google::Cloud::Logging::V2::CreateBucketRequest, ::Google::Cloud::Logging::V2::LogBucket
43
- # Updates a bucket. This method replaces the following fields in the
43
+ # Updates a log bucket. This method replaces the following fields in the
44
44
  # existing bucket with values from the new bucket: `retention_period`
45
45
  #
46
46
  # If the retention period is decreased and the bucket is locked,
47
- # FAILED_PRECONDITION will be returned.
47
+ # `FAILED_PRECONDITION` will be returned.
48
48
  #
49
- # If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION
50
- # will be returned.
49
+ # If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then
50
+ # `FAILED_PRECONDITION` will be returned.
51
51
  #
52
- # A buckets region may not be modified after it is created.
52
+ # After a bucket has been created, the bucket's location cannot be changed.
53
53
  rpc :UpdateBucket, ::Google::Cloud::Logging::V2::UpdateBucketRequest, ::Google::Cloud::Logging::V2::LogBucket
54
- # Deletes a bucket.
55
- # Moves the bucket to the DELETE_REQUESTED state. After 7 days, the
56
- # bucket will be purged and all logs in the bucket will be permanently
57
- # deleted.
54
+ # Deletes a log bucket.
55
+ #
56
+ # Changes the bucket's `lifecycle_state` to the `DELETE_REQUESTED` state.
57
+ # After 7 days, the bucket will be purged and all log entries in the bucket
58
+ # will be permanently deleted.
58
59
  rpc :DeleteBucket, ::Google::Cloud::Logging::V2::DeleteBucketRequest, ::Google::Protobuf::Empty
59
- # Undeletes a bucket. A bucket that has been deleted may be undeleted within
60
- # the grace period of 7 days.
60
+ # Undeletes a log bucket. A bucket that has been deleted can be undeleted
61
+ # within the grace period of 7 days.
61
62
  rpc :UndeleteBucket, ::Google::Cloud::Logging::V2::UndeleteBucketRequest, ::Google::Protobuf::Empty
62
- # Lists views on a bucket.
63
+ # Lists views on a log bucket.
63
64
  rpc :ListViews, ::Google::Cloud::Logging::V2::ListViewsRequest, ::Google::Cloud::Logging::V2::ListViewsResponse
64
- # Gets a view.
65
+ # Gets a view on a log bucket..
65
66
  rpc :GetView, ::Google::Cloud::Logging::V2::GetViewRequest, ::Google::Cloud::Logging::V2::LogView
66
- # Creates a view over logs in a bucket. A bucket may contain a maximum of
67
- # 50 views.
67
+ # Creates a view over log entries in a log bucket. A bucket may contain a
68
+ # maximum of 30 views.
68
69
  rpc :CreateView, ::Google::Cloud::Logging::V2::CreateViewRequest, ::Google::Cloud::Logging::V2::LogView
69
- # Updates a view. This method replaces the following fields in the existing
70
- # view with values from the new view: `filter`.
70
+ # Updates a view on a log bucket. This method replaces the following fields
71
+ # in the existing view with values from the new view: `filter`.
72
+ # If an `UNAVAILABLE` error is returned, this indicates that system is not in
73
+ # a state where it can update the view. If this occurs, please try again in a
74
+ # few minutes.
71
75
  rpc :UpdateView, ::Google::Cloud::Logging::V2::UpdateViewRequest, ::Google::Cloud::Logging::V2::LogView
72
- # Deletes a view from a bucket.
76
+ # Deletes a view on a log bucket.
77
+ # If an `UNAVAILABLE` error is returned, this indicates that system is not in
78
+ # a state where it can delete the view. If this occurs, please try again in a
79
+ # few minutes.
73
80
  rpc :DeleteView, ::Google::Cloud::Logging::V2::DeleteViewRequest, ::Google::Protobuf::Empty
74
81
  # Lists sinks.
75
82
  rpc :ListSinks, ::Google::Cloud::Logging::V2::ListSinksRequest, ::Google::Cloud::Logging::V2::ListSinksResponse
@@ -89,33 +96,35 @@ module Google
89
96
  # Deletes a sink. If the sink has a unique `writer_identity`, then that
90
97
  # service account is also deleted.
91
98
  rpc :DeleteSink, ::Google::Cloud::Logging::V2::DeleteSinkRequest, ::Google::Protobuf::Empty
92
- # Lists all the exclusions in a parent resource.
99
+ # Lists all the exclusions on the _Default sink in a parent resource.
93
100
  rpc :ListExclusions, ::Google::Cloud::Logging::V2::ListExclusionsRequest, ::Google::Cloud::Logging::V2::ListExclusionsResponse
94
- # Gets the description of an exclusion.
101
+ # Gets the description of an exclusion in the _Default sink.
95
102
  rpc :GetExclusion, ::Google::Cloud::Logging::V2::GetExclusionRequest, ::Google::Cloud::Logging::V2::LogExclusion
96
- # Creates a new exclusion in a specified parent resource.
97
- # Only log entries belonging to that resource can be excluded.
98
- # You can have up to 10 exclusions in a resource.
103
+ # Creates a new exclusion in the _Default sink in a specified parent
104
+ # resource. Only log entries belonging to that resource can be excluded. You
105
+ # can have up to 10 exclusions in a resource.
99
106
  rpc :CreateExclusion, ::Google::Cloud::Logging::V2::CreateExclusionRequest, ::Google::Cloud::Logging::V2::LogExclusion
100
- # Changes one or more properties of an existing exclusion.
107
+ # Changes one or more properties of an existing exclusion in the _Default
108
+ # sink.
101
109
  rpc :UpdateExclusion, ::Google::Cloud::Logging::V2::UpdateExclusionRequest, ::Google::Cloud::Logging::V2::LogExclusion
102
- # Deletes an exclusion.
110
+ # Deletes an exclusion in the _Default sink.
103
111
  rpc :DeleteExclusion, ::Google::Cloud::Logging::V2::DeleteExclusionRequest, ::Google::Protobuf::Empty
104
- # Gets the Logs Router CMEK settings for the given resource.
112
+ # Gets the Logging CMEK settings for the given resource.
105
113
  #
106
- # Note: CMEK for the Logs Router can currently only be configured for GCP
107
- # organizations. Once configured, it applies to all projects and folders in
108
- # the GCP organization.
114
+ # Note: CMEK for the Log Router can be configured for Google Cloud projects,
115
+ # folders, organizations and billing accounts. Once configured for an
116
+ # organization, it applies to all projects and folders in the Google Cloud
117
+ # organization.
109
118
  #
110
- # See [Enabling CMEK for Logs
119
+ # See [Enabling CMEK for Log
111
120
  # Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
112
121
  # for more information.
113
122
  rpc :GetCmekSettings, ::Google::Cloud::Logging::V2::GetCmekSettingsRequest, ::Google::Cloud::Logging::V2::CmekSettings
114
- # Updates the Logs Router CMEK settings for the given resource.
123
+ # Updates the Log Router CMEK settings for the given resource.
115
124
  #
116
- # Note: CMEK for the Logs Router can currently only be configured for GCP
117
- # organizations. Once configured, it applies to all projects and folders in
118
- # the GCP organization.
125
+ # Note: CMEK for the Log Router can currently only be configured for Google
126
+ # Cloud organizations. Once configured, it applies to all projects and
127
+ # folders in the Google Cloud organization.
119
128
  #
120
129
  # [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]
121
130
  # will fail if 1) `kms_key_name` is invalid, or 2) the associated service
@@ -123,10 +132,40 @@ module Google
123
132
  # `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or
124
133
  # 3) access to the key is disabled.
125
134
  #
126
- # See [Enabling CMEK for Logs
135
+ # See [Enabling CMEK for Log
127
136
  # Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
128
137
  # for more information.
129
138
  rpc :UpdateCmekSettings, ::Google::Cloud::Logging::V2::UpdateCmekSettingsRequest, ::Google::Cloud::Logging::V2::CmekSettings
139
+ # Gets the Log Router settings for the given resource.
140
+ #
141
+ # Note: Settings for the Log Router can be get for Google Cloud projects,
142
+ # folders, organizations and billing accounts. Currently it can only be
143
+ # configured for organizations. Once configured for an organization, it
144
+ # applies to all projects and folders in the Google Cloud organization.
145
+ #
146
+ # See [Enabling CMEK for Log
147
+ # Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
148
+ # for more information.
149
+ rpc :GetSettings, ::Google::Cloud::Logging::V2::GetSettingsRequest, ::Google::Cloud::Logging::V2::Settings
150
+ # Updates the Log Router settings for the given resource.
151
+ #
152
+ # Note: Settings for the Log Router can currently only be configured for
153
+ # Google Cloud organizations. Once configured, it applies to all projects and
154
+ # folders in the Google Cloud organization.
155
+ #
156
+ # [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings]
157
+ # will fail if 1) `kms_key_name` is invalid, or 2) the associated service
158
+ # account does not have the required
159
+ # `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or
160
+ # 3) access to the key is disabled. 4) `location_id` is not supported by
161
+ # Logging. 5) `location_id` violate OrgPolicy.
162
+ #
163
+ # See [Enabling CMEK for Log
164
+ # Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
165
+ # for more information.
166
+ rpc :UpdateSettings, ::Google::Cloud::Logging::V2::UpdateSettingsRequest, ::Google::Cloud::Logging::V2::Settings
167
+ # Copies a set of log entries from a log bucket to a Cloud Storage bucket.
168
+ rpc :CopyLogEntries, ::Google::Cloud::Logging::V2::CopyLogEntriesRequest, ::Google::Longrunning::Operation
130
169
  end
131
170
 
132
171
  Stub = Service.rpc_stub_class
@@ -1,17 +1,16 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/logging/v2/logging_metrics.proto
3
3
 
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
4
7
  require 'google/api/client_pb'
5
8
  require 'google/api/distribution_pb'
6
9
  require 'google/api/field_behavior_pb'
7
10
  require 'google/api/metric_pb'
8
11
  require 'google/api/resource_pb'
9
- require 'google/protobuf/duration_pb'
10
12
  require 'google/protobuf/empty_pb'
11
- require 'google/protobuf/field_mask_pb'
12
13
  require 'google/protobuf/timestamp_pb'
13
- require 'google/api/annotations_pb'
14
- require 'google/protobuf'
15
14
 
16
15
  Google::Protobuf::DescriptorPool.generated_pool.build do
17
16
  add_file("google/logging/v2/logging_metrics.proto", :syntax => :proto3) do
@@ -19,6 +18,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
19
18
  optional :name, :string, 1
20
19
  optional :description, :string, 2
21
20
  optional :filter, :string, 3
21
+ optional :disabled, :bool, 12
22
22
  optional :metric_descriptor, :message, 5, "google.api.MetricDescriptor"
23
23
  optional :value_extractor, :string, 6
24
24
  map :label_extractors, :string, :string, 7
@@ -1,19 +1,17 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/logging/v2/logging.proto
3
3
 
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
4
7
  require 'google/api/client_pb'
5
8
  require 'google/api/field_behavior_pb'
6
9
  require 'google/api/monitored_resource_pb'
7
10
  require 'google/api/resource_pb'
8
11
  require 'google/logging/v2/log_entry_pb'
9
- require 'google/logging/v2/logging_config_pb'
10
12
  require 'google/protobuf/duration_pb'
11
13
  require 'google/protobuf/empty_pb'
12
- require 'google/protobuf/field_mask_pb'
13
- require 'google/protobuf/timestamp_pb'
14
14
  require 'google/rpc/status_pb'
15
- require 'google/api/annotations_pb'
16
- require 'google/protobuf'
17
15
 
18
16
  Google::Protobuf::DescriptorPool.generated_pool.build do
19
17
  add_file("google/logging/v2/logging.proto", :syntax => :proto3) do
@@ -33,10 +33,10 @@ module Google
33
33
  self.unmarshal_class_method = :decode
34
34
  self.service_name = 'google.logging.v2.LoggingServiceV2'
35
35
 
36
- # Deletes all the log entries in a log. The log reappears if it receives new
37
- # entries. Log entries written shortly before the delete operation might not
38
- # be deleted. Entries received after the delete operation with a timestamp
39
- # before the operation will be deleted.
36
+ # Deletes all the log entries in a log for the _Default Log Bucket. The log
37
+ # reappears if it receives new entries. Log entries written shortly before
38
+ # the delete operation might not be deleted. Entries received after the
39
+ # delete operation with a timestamp before the operation will be deleted.
40
40
  rpc :DeleteLog, ::Google::Cloud::Logging::V2::DeleteLogRequest, ::Google::Protobuf::Empty
41
41
  # Writes log entries to Logging. This API method is the
42
42
  # only way to send log entries to Logging. This method