google-cloud-logging-v2 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +3 -3
  4. data/lib/google/cloud/logging/v2/config_service/client.rb +728 -71
  5. data/lib/google/cloud/logging/v2/config_service/operations.rb +14 -16
  6. data/lib/google/cloud/logging/v2/config_service/paths.rb +81 -0
  7. data/lib/google/cloud/logging/v2/config_service.rb +1 -1
  8. data/lib/google/cloud/logging/v2/logging_service/client.rb +47 -48
  9. data/lib/google/cloud/logging/v2/logging_service.rb +1 -1
  10. data/lib/google/cloud/logging/v2/metrics_service/client.rb +6 -8
  11. data/lib/google/cloud/logging/v2/metrics_service.rb +1 -1
  12. data/lib/google/cloud/logging/v2/version.rb +1 -1
  13. data/lib/google/cloud/logging/v2.rb +2 -2
  14. data/lib/google/logging/v2/logging_config_pb.rb +84 -5
  15. data/lib/google/logging/v2/logging_config_services_pb.rb +23 -5
  16. data/lib/google/logging/v2/logging_metrics_pb.rb +1 -0
  17. data/lib/google/logging/v2/logging_pb.rb +1 -1
  18. data/proto_docs/google/api/client.rb +381 -0
  19. data/proto_docs/google/api/distribution.rb +2 -0
  20. data/proto_docs/google/api/launch_stage.rb +3 -3
  21. data/proto_docs/google/api/metric.rb +10 -6
  22. data/proto_docs/google/api/monitored_resource.rb +30 -18
  23. data/proto_docs/google/logging/type/http_request.rb +1 -1
  24. data/proto_docs/google/logging/v2/log_entry.rb +56 -23
  25. data/proto_docs/google/logging/v2/logging.rb +36 -35
  26. data/proto_docs/google/logging/v2/logging_config.rb +350 -78
  27. data/proto_docs/google/logging/v2/logging_metrics.rb +14 -2
  28. data/proto_docs/google/rpc/status.rb +4 -2
  29. metadata +9 -8
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil
@@ -622,9 +620,9 @@ module Google
622
620
  # * (`String`) The path to a service account key file in JSON format
623
621
  # * (`Hash`) A service account key as a Hash
624
622
  # * (`Google::Auth::Credentials`) A googleauth credentials object
625
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
623
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
626
624
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
627
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
625
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
628
626
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
629
627
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
630
628
  # * (`nil`) indicating no credentials
@@ -139,6 +139,87 @@ module Google
139
139
  "folders/#{folder}/locations/#{location}"
140
140
  end
141
141
 
142
+ ##
143
+ # Create a fully-qualified Link resource string.
144
+ #
145
+ # @overload link_path(project:, location:, bucket:, link:)
146
+ # The resource will be in the following format:
147
+ #
148
+ # `projects/{project}/locations/{location}/buckets/{bucket}/links/{link}`
149
+ #
150
+ # @param project [String]
151
+ # @param location [String]
152
+ # @param bucket [String]
153
+ # @param link [String]
154
+ #
155
+ # @overload link_path(organization:, location:, bucket:, link:)
156
+ # The resource will be in the following format:
157
+ #
158
+ # `organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}`
159
+ #
160
+ # @param organization [String]
161
+ # @param location [String]
162
+ # @param bucket [String]
163
+ # @param link [String]
164
+ #
165
+ # @overload link_path(folder:, location:, bucket:, link:)
166
+ # The resource will be in the following format:
167
+ #
168
+ # `folders/{folder}/locations/{location}/buckets/{bucket}/links/{link}`
169
+ #
170
+ # @param folder [String]
171
+ # @param location [String]
172
+ # @param bucket [String]
173
+ # @param link [String]
174
+ #
175
+ # @overload link_path(billing_account:, location:, bucket:, link:)
176
+ # The resource will be in the following format:
177
+ #
178
+ # `billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}`
179
+ #
180
+ # @param billing_account [String]
181
+ # @param location [String]
182
+ # @param bucket [String]
183
+ # @param link [String]
184
+ #
185
+ # @return [::String]
186
+ def link_path **args
187
+ resources = {
188
+ "bucket:link:location:project" => (proc do |project:, location:, bucket:, link:|
189
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
190
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
191
+ raise ::ArgumentError, "bucket cannot contain /" if bucket.to_s.include? "/"
192
+
193
+ "projects/#{project}/locations/#{location}/buckets/#{bucket}/links/#{link}"
194
+ end),
195
+ "bucket:link:location:organization" => (proc do |organization:, location:, bucket:, link:|
196
+ raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
197
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
198
+ raise ::ArgumentError, "bucket cannot contain /" if bucket.to_s.include? "/"
199
+
200
+ "organizations/#{organization}/locations/#{location}/buckets/#{bucket}/links/#{link}"
201
+ end),
202
+ "bucket:folder:link:location" => (proc do |folder:, location:, bucket:, link:|
203
+ raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
204
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
205
+ raise ::ArgumentError, "bucket cannot contain /" if bucket.to_s.include? "/"
206
+
207
+ "folders/#{folder}/locations/#{location}/buckets/#{bucket}/links/#{link}"
208
+ end),
209
+ "billing_account:bucket:link:location" => (proc do |billing_account:, location:, bucket:, link:|
210
+ raise ::ArgumentError, "billing_account cannot contain /" if billing_account.to_s.include? "/"
211
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
212
+ raise ::ArgumentError, "bucket cannot contain /" if bucket.to_s.include? "/"
213
+
214
+ "billingAccounts/#{billing_account}/locations/#{location}/buckets/#{bucket}/links/#{link}"
215
+ end)
216
+ }
217
+
218
+ resource = resources[args.keys.sort.join(":")]
219
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
220
+ resource.call(**args)
221
+ end
222
+
142
223
  ##
143
224
  # Create a fully-qualified Location resource string.
144
225
  #
@@ -34,7 +34,7 @@ module Google
34
34
  ##
35
35
  # Service for configuring sinks used to route log entries.
36
36
  #
37
- # To load this service and instantiate a client:
37
+ # @example Load this service and instantiate a gRPC client
38
38
  #
39
39
  # require "google/cloud/logging/v2/config_service"
40
40
  # client = ::Google::Cloud::Logging::V2::ConfigService::Client.new
@@ -356,11 +356,13 @@ module Google
356
356
  # `entries.write`, you should try to include several log entries in this
357
357
  # list, rather than calling this method for each individual log entry.
358
358
  # @param partial_success [::Boolean]
359
- # Optional. Whether valid entries should be written even if some other
360
- # entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any
361
- # entry is not written, then the response status is the error associated
362
- # with one of the failed entries and the response includes error details
363
- # keyed by the entries' zero-based index in the `entries.write` method.
359
+ # Optional. Whether a batch's valid entries should be written even if some
360
+ # other entry failed due to a permanent error such as INVALID_ARGUMENT or
361
+ # PERMISSION_DENIED. If any entry failed, then the response status is the
362
+ # response status of one of the failed entries. The response will include
363
+ # error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by
364
+ # the entries' zero-based index in the `entries`. Failed requests for which
365
+ # no entries are written will not include per-entry errors.
364
366
  # @param dry_run [::Boolean]
365
367
  # Optional. If true, the request should expect normal response, but the
366
368
  # entries won't be persisted nor exported. Useful for checking whether the
@@ -460,14 +462,13 @@ module Google
460
462
  # * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
461
463
  #
462
464
  # Projects listed in the `project_ids` field are added to this list.
465
+ # A maximum of 100 resources may be specified in a single request.
463
466
  # @param filter [::String]
464
- # Optional. A filter that chooses which log entries to return. See [Advanced
465
- # Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries).
466
- # Only log entries that match the filter are returned. An empty filter
467
- # matches all log entries in the resources listed in `resource_names`.
467
+ # Optional. Only log entries that match the filter are returned. An empty
468
+ # filter matches all log entries in the resources listed in `resource_names`.
468
469
  # Referencing a parent resource that is not listed in `resource_names` will
469
- # cause the filter to return no results. The maximum length of the filter is
470
- # 20000 characters.
470
+ # cause the filter to return no results. The maximum length of a filter is
471
+ # 20,000 characters.
471
472
  # @param order_by [::String]
472
473
  # Optional. How the results should be sorted. Presently, the only permitted
473
474
  # values are `"timestamp asc"` (default) and `"timestamp desc"`. The first
@@ -476,10 +477,10 @@ module Google
476
477
  # in order of decreasing timestamps (newest first). Entries with equal
477
478
  # timestamps are returned in order of their `insert_id` values.
478
479
  # @param page_size [::Integer]
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.
480
+ # Optional. The maximum number of results to return from this request.
481
+ # Default is 50. If the value is negative or exceeds 1000, the request is
482
+ # rejected. The presence of `next_page_token` in the response indicates that
483
+ # more results might be available.
483
484
  # @param page_token [::String]
484
485
  # Optional. If present, then retrieve the next batch of results from the
485
486
  # preceding call to this method. `page_token` must be the value of
@@ -506,13 +507,11 @@ module Google
506
507
  # # Call the list_log_entries method.
507
508
  # result = client.list_log_entries request
508
509
  #
509
- # # The returned object is of type Gapic::PagedEnumerable. You can
510
- # # iterate over all elements by calling #each, and the enumerable
511
- # # will lazily make API calls to fetch subsequent pages. Other
512
- # # methods are also available for managing paging directly.
513
- # result.each do |response|
510
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
511
+ # # over elements, and API calls will be issued to fetch pages as needed.
512
+ # result.each do |item|
514
513
  # # Each element is of type ::Google::Cloud::Logging::V2::LogEntry.
515
- # p response
514
+ # p item
516
515
  # end
517
516
  #
518
517
  def list_log_entries request, options = nil
@@ -597,13 +596,11 @@ module Google
597
596
  # # Call the list_monitored_resource_descriptors method.
598
597
  # result = client.list_monitored_resource_descriptors request
599
598
  #
600
- # # The returned object is of type Gapic::PagedEnumerable. You can
601
- # # iterate over all elements by calling #each, and the enumerable
602
- # # will lazily make API calls to fetch subsequent pages. Other
603
- # # methods are also available for managing paging directly.
604
- # result.each do |response|
599
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
600
+ # # over elements, and API calls will be issued to fetch pages as needed.
601
+ # result.each do |item|
605
602
  # # Each element is of type ::Google::Api::MonitoredResourceDescriptor.
606
- # p response
603
+ # p item
607
604
  # end
608
605
  #
609
606
  def list_monitored_resource_descriptors request, options = nil
@@ -654,29 +651,20 @@ module Google
654
651
  # @param options [::Gapic::CallOptions, ::Hash]
655
652
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
656
653
  #
657
- # @overload list_logs(parent: nil, page_size: nil, page_token: nil, resource_names: nil)
654
+ # @overload list_logs(parent: nil, resource_names: nil, page_size: nil, page_token: nil)
658
655
  # Pass arguments to `list_logs` via keyword arguments. Note that at
659
656
  # least one keyword argument is required. To specify no parameters, or to keep all
660
657
  # the default parameter values, pass an empty Hash as a request object (see above).
661
658
  #
662
659
  # @param parent [::String]
663
- # Required. The resource name that owns the logs:
660
+ # Required. The resource name to list logs for:
664
661
  #
665
662
  # * `projects/[PROJECT_ID]`
666
663
  # * `organizations/[ORGANIZATION_ID]`
667
664
  # * `billingAccounts/[BILLING_ACCOUNT_ID]`
668
665
  # * `folders/[FOLDER_ID]`
669
- # @param page_size [::Integer]
670
- # Optional. The maximum number of results to return from this request.
671
- # Non-positive values are ignored. The presence of `nextPageToken` in the
672
- # response indicates that more results might be available.
673
- # @param page_token [::String]
674
- # Optional. If present, then retrieve the next batch of results from the
675
- # preceding call to this method. `pageToken` must be the value of
676
- # `nextPageToken` from the previous response. The values of other method
677
- # parameters should be identical to those in the previous call.
678
666
  # @param resource_names [::Array<::String>]
679
- # Optional. The resource name that owns the logs:
667
+ # Optional. List of resource names to list logs for:
680
668
  #
681
669
  # * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
682
670
  # * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
@@ -690,6 +678,17 @@ module Google
690
678
  # * `billingAccounts/[BILLING_ACCOUNT_ID]`
691
679
  # * `folders/[FOLDER_ID]`
692
680
  #
681
+ # The resource name in the `parent` field is added to this list.
682
+ # @param page_size [::Integer]
683
+ # Optional. The maximum number of results to return from this request.
684
+ # Non-positive values are ignored. The presence of `nextPageToken` in the
685
+ # response indicates that more results might be available.
686
+ # @param page_token [::String]
687
+ # Optional. If present, then retrieve the next batch of results from the
688
+ # preceding call to this method. `pageToken` must be the value of
689
+ # `nextPageToken` from the previous response. The values of other method
690
+ # parameters should be identical to those in the previous call.
691
+ #
693
692
  # @yield [response, operation] Access the result along with the RPC operation
694
693
  # @yieldparam response [::Google::Cloud::Logging::V2::ListLogsResponse]
695
694
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
@@ -777,22 +776,22 @@ module Google
777
776
  # # Create a client object. The client can be reused for multiple calls.
778
777
  # client = Google::Cloud::Logging::V2::LoggingService::Client.new
779
778
  #
780
- # # Create an input stream
779
+ # # Create an input stream.
781
780
  # input = Gapic::StreamInput.new
782
781
  #
783
782
  # # Call the tail_log_entries method to start streaming.
784
783
  # output = client.tail_log_entries input
785
784
  #
786
- # # Send requests on the stream. For each request, pass in keyword
787
- # # arguments to set fields. Be sure to close the stream when done.
785
+ # # Send requests on the stream. For each request object, set fields by
786
+ # # passing keyword arguments. Be sure to close the stream when done.
788
787
  # input << Google::Cloud::Logging::V2::TailLogEntriesRequest.new
789
788
  # input << Google::Cloud::Logging::V2::TailLogEntriesRequest.new
790
789
  # input.close
791
790
  #
792
- # # Handle streamed responses. These may be interleaved with inputs.
793
- # # Each response is of type ::Google::Cloud::Logging::V2::TailLogEntriesResponse.
794
- # output.each do |response|
795
- # p response
791
+ # # The returned object is a streamed enumerable yielding elements of type
792
+ # # ::Google::Cloud::Logging::V2::TailLogEntriesResponse
793
+ # output.each do |current_response|
794
+ # p current_response
796
795
  # end
797
796
  #
798
797
  def tail_log_entries request, options = nil
@@ -871,9 +870,9 @@ module Google
871
870
  # * (`String`) The path to a service account key file in JSON format
872
871
  # * (`Hash`) A service account key as a Hash
873
872
  # * (`Google::Auth::Credentials`) A googleauth credentials object
874
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
873
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
875
874
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
876
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
875
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
877
876
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
878
877
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
879
878
  # * (`nil`) indicating no credentials
@@ -33,7 +33,7 @@ module Google
33
33
  ##
34
34
  # Service for ingesting and querying logs.
35
35
  #
36
- # To load this service and instantiate a client:
36
+ # @example Load this service and instantiate a gRPC client
37
37
  #
38
38
  # require "google/cloud/logging/v2/logging_service"
39
39
  # client = ::Google::Cloud::Logging::V2::LoggingService::Client.new
@@ -218,13 +218,11 @@ module Google
218
218
  # # Call the list_log_metrics method.
219
219
  # result = client.list_log_metrics request
220
220
  #
221
- # # The returned object is of type Gapic::PagedEnumerable. You can
222
- # # iterate over all elements by calling #each, and the enumerable
223
- # # will lazily make API calls to fetch subsequent pages. Other
224
- # # methods are also available for managing paging directly.
225
- # result.each do |response|
221
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
222
+ # # over elements, and API calls will be issued to fetch pages as needed.
223
+ # result.each do |item|
226
224
  # # Each element is of type ::Google::Cloud::Logging::V2::LogMetric.
227
- # p response
225
+ # p item
228
226
  # end
229
227
  #
230
228
  def list_log_metrics request, options = nil
@@ -666,9 +664,9 @@ module Google
666
664
  # * (`String`) The path to a service account key file in JSON format
667
665
  # * (`Hash`) A service account key as a Hash
668
666
  # * (`Google::Auth::Credentials`) A googleauth credentials object
669
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
667
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
670
668
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
671
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
669
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
672
670
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
673
671
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
674
672
  # * (`nil`) indicating no credentials
@@ -33,7 +33,7 @@ module Google
33
33
  ##
34
34
  # Service for configuring logs-based metrics.
35
35
  #
36
- # To load this service and instantiate a client:
36
+ # @example Load this service and instantiate a gRPC client
37
37
  #
38
38
  # require "google/cloud/logging/v2/metrics_service"
39
39
  # client = ::Google::Cloud::Logging::V2::MetricsService::Client.new
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Logging
23
23
  module V2
24
- VERSION = "0.8.1"
24
+ VERSION = "0.9.0"
25
25
  end
26
26
  end
27
27
  end
@@ -25,9 +25,9 @@ module Google
25
25
  module Cloud
26
26
  module Logging
27
27
  ##
28
- # To load this package, including all its services, and instantiate a client:
28
+ # API client module.
29
29
  #
30
- # @example
30
+ # @example Load this package, including all its services, and instantiate a gRPC client
31
31
  #
32
32
  # require "google/cloud/logging/v2"
33
33
  # client = ::Google::Cloud::Logging::V2::LoggingService::Client.new
@@ -14,6 +14,11 @@ require 'google/protobuf/timestamp_pb'
14
14
 
15
15
  Google::Protobuf::DescriptorPool.generated_pool.build do
16
16
  add_file("google/logging/v2/logging_config.proto", :syntax => :proto3) do
17
+ add_message "google.logging.v2.IndexConfig" do
18
+ optional :field_path, :string, 1
19
+ optional :type, :enum, 2, "google.logging.v2.IndexType"
20
+ optional :create_time, :message, 3, "google.protobuf.Timestamp"
21
+ end
17
22
  add_message "google.logging.v2.LogBucket" do
18
23
  optional :name, :string, 1
19
24
  optional :description, :string, 3
@@ -22,7 +27,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
22
27
  optional :retention_days, :int32, 11
23
28
  optional :locked, :bool, 9
24
29
  optional :lifecycle_state, :enum, 12, "google.logging.v2.LifecycleState"
30
+ optional :analytics_enabled, :bool, 14
25
31
  repeated :restricted_fields, :string, 15
32
+ repeated :index_configs, :message, 17, "google.logging.v2.IndexConfig"
26
33
  optional :cmek_settings, :message, 19, "google.logging.v2.CmekSettings"
27
34
  end
28
35
  add_message "google.logging.v2.LogView" do
@@ -53,6 +60,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
53
60
  value :V2, 1
54
61
  value :V1, 2
55
62
  end
63
+ add_message "google.logging.v2.BigQueryDataset" do
64
+ optional :dataset_id, :string, 1
65
+ end
66
+ add_message "google.logging.v2.Link" do
67
+ optional :name, :string, 1
68
+ optional :description, :string, 2
69
+ optional :create_time, :message, 3, "google.protobuf.Timestamp"
70
+ optional :lifecycle_state, :enum, 4, "google.logging.v2.LifecycleState"
71
+ optional :bigquery_dataset, :message, 5, "google.logging.v2.BigQueryDataset"
72
+ end
56
73
  add_message "google.logging.v2.BigQueryOptions" do
57
74
  optional :use_partitioned_tables, :bool, 1
58
75
  optional :uses_timestamp_column_partitioning, :bool, 3
@@ -136,6 +153,26 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
136
153
  add_message "google.logging.v2.DeleteSinkRequest" do
137
154
  optional :sink_name, :string, 1
138
155
  end
156
+ add_message "google.logging.v2.CreateLinkRequest" do
157
+ optional :parent, :string, 1
158
+ optional :link, :message, 2, "google.logging.v2.Link"
159
+ optional :link_id, :string, 3
160
+ end
161
+ add_message "google.logging.v2.DeleteLinkRequest" do
162
+ optional :name, :string, 1
163
+ end
164
+ add_message "google.logging.v2.ListLinksRequest" do
165
+ optional :parent, :string, 1
166
+ optional :page_token, :string, 2
167
+ optional :page_size, :int32, 3
168
+ end
169
+ add_message "google.logging.v2.ListLinksResponse" do
170
+ repeated :links, :message, 1, "google.logging.v2.Link"
171
+ optional :next_page_token, :string, 2
172
+ end
173
+ add_message "google.logging.v2.GetLinkRequest" do
174
+ optional :name, :string, 1
175
+ end
139
176
  add_message "google.logging.v2.LogExclusion" do
140
177
  optional :name, :string, 1
141
178
  optional :description, :string, 2
@@ -179,6 +216,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
179
216
  add_message "google.logging.v2.CmekSettings" do
180
217
  optional :name, :string, 1
181
218
  optional :kms_key_name, :string, 2
219
+ optional :kms_key_version_name, :string, 4
182
220
  optional :service_account_id, :string, 3
183
221
  end
184
222
  add_message "google.logging.v2.GetSettingsRequest" do
@@ -213,10 +251,26 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
213
251
  add_message "google.logging.v2.CopyLogEntriesResponse" do
214
252
  optional :log_entries_copied_count, :int64, 1
215
253
  end
216
- add_enum "google.logging.v2.LifecycleState" do
217
- value :LIFECYCLE_STATE_UNSPECIFIED, 0
218
- value :ACTIVE, 1
219
- value :DELETE_REQUESTED, 2
254
+ add_message "google.logging.v2.BucketMetadata" do
255
+ optional :start_time, :message, 1, "google.protobuf.Timestamp"
256
+ optional :end_time, :message, 2, "google.protobuf.Timestamp"
257
+ optional :state, :enum, 3, "google.logging.v2.OperationState"
258
+ oneof :request do
259
+ optional :create_bucket_request, :message, 4, "google.logging.v2.CreateBucketRequest"
260
+ optional :update_bucket_request, :message, 5, "google.logging.v2.UpdateBucketRequest"
261
+ end
262
+ end
263
+ add_message "google.logging.v2.LinkMetadata" do
264
+ optional :start_time, :message, 1, "google.protobuf.Timestamp"
265
+ optional :end_time, :message, 2, "google.protobuf.Timestamp"
266
+ optional :state, :enum, 3, "google.logging.v2.OperationState"
267
+ oneof :request do
268
+ optional :create_link_request, :message, 4, "google.logging.v2.CreateLinkRequest"
269
+ optional :delete_link_request, :message, 5, "google.logging.v2.DeleteLinkRequest"
270
+ end
271
+ end
272
+ add_message "google.logging.v2.LocationMetadata" do
273
+ optional :log_analytics_enabled, :bool, 1
220
274
  end
221
275
  add_enum "google.logging.v2.OperationState" do
222
276
  value :OPERATION_STATE_UNSPECIFIED, 0
@@ -227,6 +281,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
227
281
  value :OPERATION_STATE_FAILED, 5
228
282
  value :OPERATION_STATE_CANCELLED, 6
229
283
  end
284
+ add_enum "google.logging.v2.LifecycleState" do
285
+ value :LIFECYCLE_STATE_UNSPECIFIED, 0
286
+ value :ACTIVE, 1
287
+ value :DELETE_REQUESTED, 2
288
+ value :UPDATING, 3
289
+ value :CREATING, 4
290
+ value :FAILED, 5
291
+ end
292
+ add_enum "google.logging.v2.IndexType" do
293
+ value :INDEX_TYPE_UNSPECIFIED, 0
294
+ value :INDEX_TYPE_STRING, 1
295
+ value :INDEX_TYPE_INTEGER, 2
296
+ end
230
297
  end
231
298
  end
232
299
 
@@ -234,10 +301,13 @@ module Google
234
301
  module Cloud
235
302
  module Logging
236
303
  module V2
304
+ IndexConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.IndexConfig").msgclass
237
305
  LogBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogBucket").msgclass
238
306
  LogView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogView").msgclass
239
307
  LogSink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogSink").msgclass
240
308
  LogSink::VersionFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogSink.VersionFormat").enummodule
309
+ BigQueryDataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.BigQueryDataset").msgclass
310
+ Link = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.Link").msgclass
241
311
  BigQueryOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.BigQueryOptions").msgclass
242
312
  ListBucketsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListBucketsRequest").msgclass
243
313
  ListBucketsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListBucketsResponse").msgclass
@@ -258,6 +328,11 @@ module Google
258
328
  CreateSinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CreateSinkRequest").msgclass
259
329
  UpdateSinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.UpdateSinkRequest").msgclass
260
330
  DeleteSinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.DeleteSinkRequest").msgclass
331
+ CreateLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CreateLinkRequest").msgclass
332
+ DeleteLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.DeleteLinkRequest").msgclass
333
+ ListLinksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListLinksRequest").msgclass
334
+ ListLinksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListLinksResponse").msgclass
335
+ GetLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.GetLinkRequest").msgclass
261
336
  LogExclusion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogExclusion").msgclass
262
337
  ListExclusionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListExclusionsRequest").msgclass
263
338
  ListExclusionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListExclusionsResponse").msgclass
@@ -274,8 +349,12 @@ module Google
274
349
  CopyLogEntriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CopyLogEntriesRequest").msgclass
275
350
  CopyLogEntriesMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CopyLogEntriesMetadata").msgclass
276
351
  CopyLogEntriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CopyLogEntriesResponse").msgclass
277
- LifecycleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LifecycleState").enummodule
352
+ BucketMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.BucketMetadata").msgclass
353
+ LinkMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LinkMetadata").msgclass
354
+ LocationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LocationMetadata").msgclass
278
355
  OperationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.OperationState").enummodule
356
+ LifecycleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LifecycleState").enummodule
357
+ IndexType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.IndexType").enummodule
279
358
  end
280
359
  end
281
360
  end
@@ -37,14 +37,21 @@ module Google
37
37
  rpc :ListBuckets, ::Google::Cloud::Logging::V2::ListBucketsRequest, ::Google::Cloud::Logging::V2::ListBucketsResponse
38
38
  # Gets a log bucket.
39
39
  rpc :GetBucket, ::Google::Cloud::Logging::V2::GetBucketRequest, ::Google::Cloud::Logging::V2::LogBucket
40
+ # Creates a log bucket asynchronously that can be used to store log entries.
41
+ #
42
+ # After a bucket has been created, the bucket's location cannot be changed.
43
+ rpc :CreateBucketAsync, ::Google::Cloud::Logging::V2::CreateBucketRequest, ::Google::Longrunning::Operation
44
+ # Updates a log bucket asynchronously.
45
+ #
46
+ # If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then
47
+ # `FAILED_PRECONDITION` will be returned.
48
+ #
49
+ # After a bucket has been created, the bucket's location cannot be changed.
50
+ rpc :UpdateBucketAsync, ::Google::Cloud::Logging::V2::UpdateBucketRequest, ::Google::Longrunning::Operation
40
51
  # Creates a log bucket that can be used to store log entries. After a bucket
41
52
  # has been created, the bucket's location cannot be changed.
42
53
  rpc :CreateBucket, ::Google::Cloud::Logging::V2::CreateBucketRequest, ::Google::Cloud::Logging::V2::LogBucket
43
- # Updates a log bucket. This method replaces the following fields in the
44
- # existing bucket with values from the new bucket: `retention_period`
45
- #
46
- # If the retention period is decreased and the bucket is locked,
47
- # `FAILED_PRECONDITION` will be returned.
54
+ # Updates a log bucket.
48
55
  #
49
56
  # If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then
50
57
  # `FAILED_PRECONDITION` will be returned.
@@ -96,6 +103,17 @@ module Google
96
103
  # Deletes a sink. If the sink has a unique `writer_identity`, then that
97
104
  # service account is also deleted.
98
105
  rpc :DeleteSink, ::Google::Cloud::Logging::V2::DeleteSinkRequest, ::Google::Protobuf::Empty
106
+ # Asynchronously creates a linked dataset in BigQuery which makes it possible
107
+ # to use BigQuery to read the logs stored in the log bucket. A log bucket may
108
+ # currently only contain one link.
109
+ rpc :CreateLink, ::Google::Cloud::Logging::V2::CreateLinkRequest, ::Google::Longrunning::Operation
110
+ # Deletes a link. This will also delete the corresponding BigQuery linked
111
+ # dataset.
112
+ rpc :DeleteLink, ::Google::Cloud::Logging::V2::DeleteLinkRequest, ::Google::Longrunning::Operation
113
+ # Lists links.
114
+ rpc :ListLinks, ::Google::Cloud::Logging::V2::ListLinksRequest, ::Google::Cloud::Logging::V2::ListLinksResponse
115
+ # Gets a link.
116
+ rpc :GetLink, ::Google::Cloud::Logging::V2::GetLinkRequest, ::Google::Cloud::Logging::V2::Link
99
117
  # Lists all the exclusions on the _Default sink in a parent resource.
100
118
  rpc :ListExclusions, ::Google::Cloud::Logging::V2::ListExclusionsRequest, ::Google::Cloud::Logging::V2::ListExclusionsResponse
101
119
  # Gets the description of an exclusion in the _Default sink.