google-cloud-logging-v2 0.1.1 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/logging/v2.rb +3 -0
- data/lib/google/cloud/logging/v2/config_service/client.rb +677 -12
- data/lib/google/cloud/logging/v2/config_service/paths.rb +81 -0
- data/lib/google/cloud/logging/v2/logging_service/client.rb +93 -8
- data/lib/google/cloud/logging/v2/metrics_service/client.rb +6 -6
- data/lib/google/cloud/logging/v2/version.rb +1 -1
- data/lib/google/logging/v2/logging_config_pb.rb +55 -0
- data/lib/google/logging/v2/logging_config_services_pb.rb +40 -18
- data/lib/google/logging/v2/logging_metrics_services_pb.rb +5 -5
- data/lib/google/logging/v2/logging_pb.rb +23 -0
- data/lib/google/logging/v2/logging_services_pb.rb +8 -5
- data/proto_docs/google/api/resource.rb +50 -14
- data/proto_docs/google/logging/type/http_request.rb +4 -2
- data/proto_docs/google/logging/v2/logging.rb +99 -0
- data/proto_docs/google/logging/v2/logging_config.rb +215 -8
- data/proto_docs/google/logging/v2/logging_metrics.rb +2 -2
- metadata +3 -3
@@ -359,6 +359,87 @@ module Google
|
|
359
359
|
resource.call(**args)
|
360
360
|
end
|
361
361
|
|
362
|
+
##
|
363
|
+
# Create a fully-qualified LogView resource string.
|
364
|
+
#
|
365
|
+
# @overload log_view_path(project:, location:, bucket:, view:)
|
366
|
+
# The resource will be in the following format:
|
367
|
+
#
|
368
|
+
# `projects/{project}/locations/{location}/buckets/{bucket}/views/{view}`
|
369
|
+
#
|
370
|
+
# @param project [String]
|
371
|
+
# @param location [String]
|
372
|
+
# @param bucket [String]
|
373
|
+
# @param view [String]
|
374
|
+
#
|
375
|
+
# @overload log_view_path(organization:, location:, bucket:, view:)
|
376
|
+
# The resource will be in the following format:
|
377
|
+
#
|
378
|
+
# `organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}`
|
379
|
+
#
|
380
|
+
# @param organization [String]
|
381
|
+
# @param location [String]
|
382
|
+
# @param bucket [String]
|
383
|
+
# @param view [String]
|
384
|
+
#
|
385
|
+
# @overload log_view_path(folder:, location:, bucket:, view:)
|
386
|
+
# The resource will be in the following format:
|
387
|
+
#
|
388
|
+
# `folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}`
|
389
|
+
#
|
390
|
+
# @param folder [String]
|
391
|
+
# @param location [String]
|
392
|
+
# @param bucket [String]
|
393
|
+
# @param view [String]
|
394
|
+
#
|
395
|
+
# @overload log_view_path(billing_account:, location:, bucket:, view:)
|
396
|
+
# The resource will be in the following format:
|
397
|
+
#
|
398
|
+
# `billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}`
|
399
|
+
#
|
400
|
+
# @param billing_account [String]
|
401
|
+
# @param location [String]
|
402
|
+
# @param bucket [String]
|
403
|
+
# @param view [String]
|
404
|
+
#
|
405
|
+
# @return [::String]
|
406
|
+
def log_view_path **args
|
407
|
+
resources = {
|
408
|
+
"bucket:location:project:view" => (proc do |project:, location:, bucket:, view:|
|
409
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
410
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
411
|
+
raise ::ArgumentError, "bucket cannot contain /" if bucket.to_s.include? "/"
|
412
|
+
|
413
|
+
"projects/#{project}/locations/#{location}/buckets/#{bucket}/views/#{view}"
|
414
|
+
end),
|
415
|
+
"bucket:location:organization:view" => (proc do |organization:, location:, bucket:, view:|
|
416
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
417
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
418
|
+
raise ::ArgumentError, "bucket cannot contain /" if bucket.to_s.include? "/"
|
419
|
+
|
420
|
+
"organizations/#{organization}/locations/#{location}/buckets/#{bucket}/views/#{view}"
|
421
|
+
end),
|
422
|
+
"bucket:folder:location:view" => (proc do |folder:, location:, bucket:, view:|
|
423
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
424
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
425
|
+
raise ::ArgumentError, "bucket cannot contain /" if bucket.to_s.include? "/"
|
426
|
+
|
427
|
+
"folders/#{folder}/locations/#{location}/buckets/#{bucket}/views/#{view}"
|
428
|
+
end),
|
429
|
+
"billing_account:bucket:location:view" => (proc do |billing_account:, location:, bucket:, view:|
|
430
|
+
raise ::ArgumentError, "billing_account cannot contain /" if billing_account.to_s.include? "/"
|
431
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
432
|
+
raise ::ArgumentError, "bucket cannot contain /" if bucket.to_s.include? "/"
|
433
|
+
|
434
|
+
"billingAccounts/#{billing_account}/locations/#{location}/buckets/#{bucket}/views/#{view}"
|
435
|
+
end)
|
436
|
+
}
|
437
|
+
|
438
|
+
resource = resources[args.keys.sort.join(":")]
|
439
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
440
|
+
resource.call(**args)
|
441
|
+
end
|
442
|
+
|
362
443
|
##
|
363
444
|
# Create a fully-qualified Organization resource string.
|
364
445
|
#
|
@@ -70,7 +70,7 @@ module Google
|
|
70
70
|
initial_delay: 0.1,
|
71
71
|
max_delay: 60.0,
|
72
72
|
multiplier: 1.3,
|
73
|
-
retry_codes: [
|
73
|
+
retry_codes: [4, 13, 14]
|
74
74
|
}
|
75
75
|
|
76
76
|
default_config.rpcs.write_log_entries.timeout = 60.0
|
@@ -78,7 +78,7 @@ module Google
|
|
78
78
|
initial_delay: 0.1,
|
79
79
|
max_delay: 60.0,
|
80
80
|
multiplier: 1.3,
|
81
|
-
retry_codes: [
|
81
|
+
retry_codes: [4, 13, 14]
|
82
82
|
}
|
83
83
|
|
84
84
|
default_config.rpcs.list_log_entries.timeout = 60.0
|
@@ -86,7 +86,7 @@ module Google
|
|
86
86
|
initial_delay: 0.1,
|
87
87
|
max_delay: 60.0,
|
88
88
|
multiplier: 1.3,
|
89
|
-
retry_codes: [
|
89
|
+
retry_codes: [4, 13, 14]
|
90
90
|
}
|
91
91
|
|
92
92
|
default_config.rpcs.list_monitored_resource_descriptors.timeout = 60.0
|
@@ -94,7 +94,7 @@ module Google
|
|
94
94
|
initial_delay: 0.1,
|
95
95
|
max_delay: 60.0,
|
96
96
|
multiplier: 1.3,
|
97
|
-
retry_codes: [
|
97
|
+
retry_codes: [4, 13, 14]
|
98
98
|
}
|
99
99
|
|
100
100
|
default_config.rpcs.list_logs.timeout = 60.0
|
@@ -102,7 +102,15 @@ module Google
|
|
102
102
|
initial_delay: 0.1,
|
103
103
|
max_delay: 60.0,
|
104
104
|
multiplier: 1.3,
|
105
|
-
retry_codes: [
|
105
|
+
retry_codes: [4, 13, 14]
|
106
|
+
}
|
107
|
+
|
108
|
+
default_config.rpcs.tail_log_entries.timeout = 3600.0
|
109
|
+
default_config.rpcs.tail_log_entries.retry_policy = {
|
110
|
+
initial_delay: 0.1,
|
111
|
+
max_delay: 60.0,
|
112
|
+
multiplier: 1.3,
|
113
|
+
retry_codes: [4, 13, 14]
|
106
114
|
}
|
107
115
|
|
108
116
|
default_config
|
@@ -425,6 +433,11 @@ module Google
|
|
425
433
|
# "billingAccounts/[BILLING_ACCOUNT_ID]"
|
426
434
|
# "folders/[FOLDER_ID]"
|
427
435
|
#
|
436
|
+
# May alternatively be one or more views
|
437
|
+
# projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
|
438
|
+
# organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
|
439
|
+
# billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
|
440
|
+
# folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
|
428
441
|
#
|
429
442
|
# Projects listed in the `project_ids` field are added to this list.
|
430
443
|
# @param filter [::String]
|
@@ -575,7 +588,7 @@ module Google
|
|
575
588
|
# @param options [::Gapic::CallOptions, ::Hash]
|
576
589
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
577
590
|
#
|
578
|
-
# @overload list_logs(parent: nil, page_size: nil, page_token: nil)
|
591
|
+
# @overload list_logs(parent: nil, page_size: nil, page_token: nil, resource_names: nil)
|
579
592
|
# Pass arguments to `list_logs` via keyword arguments. Note that at
|
580
593
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
581
594
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -596,6 +609,18 @@ module Google
|
|
596
609
|
# preceding call to this method. `pageToken` must be the value of
|
597
610
|
# `nextPageToken` from the previous response. The values of other method
|
598
611
|
# parameters should be identical to those in the previous call.
|
612
|
+
# @param resource_names [::Array<::String>]
|
613
|
+
# Optional. The resource name that owns the logs:
|
614
|
+
# projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
|
615
|
+
# organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
|
616
|
+
# billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
|
617
|
+
# folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
|
618
|
+
#
|
619
|
+
# To support legacy queries, it could also be:
|
620
|
+
# "projects/[PROJECT_ID]"
|
621
|
+
# "organizations/[ORGANIZATION_ID]"
|
622
|
+
# "billingAccounts/[BILLING_ACCOUNT_ID]"
|
623
|
+
# "folders/[FOLDER_ID]"
|
599
624
|
#
|
600
625
|
# @yield [response, operation] Access the result along with the RPC operation
|
601
626
|
# @yieldparam response [::Google::Cloud::Logging::V2::ListLogsResponse]
|
@@ -642,6 +667,59 @@ module Google
|
|
642
667
|
raise ::Google::Cloud::Error.from_error(e)
|
643
668
|
end
|
644
669
|
|
670
|
+
##
|
671
|
+
# Streaming read of log entries as they are ingested. Until the stream is
|
672
|
+
# terminated, it will continue reading logs.
|
673
|
+
#
|
674
|
+
# @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Logging::V2::TailLogEntriesRequest, ::Hash>]
|
675
|
+
# An enumerable of {::Google::Cloud::Logging::V2::TailLogEntriesRequest} instances.
|
676
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
677
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
678
|
+
#
|
679
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
680
|
+
# @yieldparam response [::Enumerable<::Google::Cloud::Logging::V2::TailLogEntriesResponse>]
|
681
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
682
|
+
#
|
683
|
+
# @return [::Enumerable<::Google::Cloud::Logging::V2::TailLogEntriesResponse>]
|
684
|
+
#
|
685
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
686
|
+
#
|
687
|
+
def tail_log_entries request, options = nil
|
688
|
+
unless request.is_a? ::Enumerable
|
689
|
+
raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum
|
690
|
+
request = request.to_enum
|
691
|
+
end
|
692
|
+
|
693
|
+
request = request.lazy.map do |req|
|
694
|
+
::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Logging::V2::TailLogEntriesRequest
|
695
|
+
end
|
696
|
+
|
697
|
+
# Converts hash and nil to an options object
|
698
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
699
|
+
|
700
|
+
# Customize the options with defaults
|
701
|
+
metadata = @config.rpcs.tail_log_entries.metadata.to_h
|
702
|
+
|
703
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
704
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
705
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
706
|
+
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
707
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
708
|
+
|
709
|
+
options.apply_defaults timeout: @config.rpcs.tail_log_entries.timeout,
|
710
|
+
metadata: metadata,
|
711
|
+
retry_policy: @config.rpcs.tail_log_entries.retry_policy
|
712
|
+
options.apply_defaults metadata: @config.metadata,
|
713
|
+
retry_policy: @config.retry_policy
|
714
|
+
|
715
|
+
@logging_service_stub.call_rpc :tail_log_entries, request, options: options do |response, operation|
|
716
|
+
yield response, operation if block_given?
|
717
|
+
return response
|
718
|
+
end
|
719
|
+
rescue ::GRPC::BadStatus => e
|
720
|
+
raise ::Google::Cloud::Error.from_error(e)
|
721
|
+
end
|
722
|
+
|
645
723
|
##
|
646
724
|
# Configuration class for the LoggingService API.
|
647
725
|
#
|
@@ -727,7 +805,7 @@ module Google
|
|
727
805
|
|
728
806
|
config_attr :endpoint, "logging.googleapis.com", ::String
|
729
807
|
config_attr :credentials, nil do |value|
|
730
|
-
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
808
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
731
809
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
732
810
|
allowed.any? { |klass| klass === value }
|
733
811
|
end
|
@@ -767,7 +845,7 @@ module Google
|
|
767
845
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
768
846
|
# the following configuration fields:
|
769
847
|
#
|
770
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
848
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
771
849
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
772
850
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
773
851
|
# include the following keys:
|
@@ -803,6 +881,11 @@ module Google
|
|
803
881
|
# @return [::Gapic::Config::Method]
|
804
882
|
#
|
805
883
|
attr_reader :list_logs
|
884
|
+
##
|
885
|
+
# RPC-specific configuration for `tail_log_entries`
|
886
|
+
# @return [::Gapic::Config::Method]
|
887
|
+
#
|
888
|
+
attr_reader :tail_log_entries
|
806
889
|
|
807
890
|
# @private
|
808
891
|
def initialize parent_rpcs = nil
|
@@ -816,6 +899,8 @@ module Google
|
|
816
899
|
@list_monitored_resource_descriptors = ::Gapic::Config::Method.new list_monitored_resource_descriptors_config
|
817
900
|
list_logs_config = parent_rpcs&.list_logs if parent_rpcs&.respond_to? :list_logs
|
818
901
|
@list_logs = ::Gapic::Config::Method.new list_logs_config
|
902
|
+
tail_log_entries_config = parent_rpcs&.tail_log_entries if parent_rpcs&.respond_to? :tail_log_entries
|
903
|
+
@tail_log_entries = ::Gapic::Config::Method.new tail_log_entries_config
|
819
904
|
|
820
905
|
yield self if block_given?
|
821
906
|
end
|
@@ -70,7 +70,7 @@ module Google
|
|
70
70
|
initial_delay: 0.1,
|
71
71
|
max_delay: 60.0,
|
72
72
|
multiplier: 1.3,
|
73
|
-
retry_codes: [
|
73
|
+
retry_codes: [4, 13, 14]
|
74
74
|
}
|
75
75
|
|
76
76
|
default_config.rpcs.get_log_metric.timeout = 60.0
|
@@ -78,7 +78,7 @@ module Google
|
|
78
78
|
initial_delay: 0.1,
|
79
79
|
max_delay: 60.0,
|
80
80
|
multiplier: 1.3,
|
81
|
-
retry_codes: [
|
81
|
+
retry_codes: [4, 13, 14]
|
82
82
|
}
|
83
83
|
|
84
84
|
default_config.rpcs.create_log_metric.timeout = 60.0
|
@@ -88,7 +88,7 @@ module Google
|
|
88
88
|
initial_delay: 0.1,
|
89
89
|
max_delay: 60.0,
|
90
90
|
multiplier: 1.3,
|
91
|
-
retry_codes: [
|
91
|
+
retry_codes: [4, 13, 14]
|
92
92
|
}
|
93
93
|
|
94
94
|
default_config.rpcs.delete_log_metric.timeout = 60.0
|
@@ -96,7 +96,7 @@ module Google
|
|
96
96
|
initial_delay: 0.1,
|
97
97
|
max_delay: 60.0,
|
98
98
|
multiplier: 1.3,
|
99
|
-
retry_codes: [
|
99
|
+
retry_codes: [4, 13, 14]
|
100
100
|
}
|
101
101
|
|
102
102
|
default_config
|
@@ -624,7 +624,7 @@ module Google
|
|
624
624
|
|
625
625
|
config_attr :endpoint, "logging.googleapis.com", ::String
|
626
626
|
config_attr :credentials, nil do |value|
|
627
|
-
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
627
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
628
628
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
629
629
|
allowed.any? { |klass| klass === value }
|
630
630
|
end
|
@@ -664,7 +664,7 @@ module Google
|
|
664
664
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
665
665
|
# the following configuration fields:
|
666
666
|
#
|
667
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
667
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
668
668
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
669
669
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
670
670
|
# include the following keys:
|
@@ -19,14 +19,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
19
19
|
optional :create_time, :message, 4, "google.protobuf.Timestamp"
|
20
20
|
optional :update_time, :message, 5, "google.protobuf.Timestamp"
|
21
21
|
optional :retention_days, :int32, 11
|
22
|
+
optional :locked, :bool, 9
|
22
23
|
optional :lifecycle_state, :enum, 12, "google.logging.v2.LifecycleState"
|
23
24
|
end
|
25
|
+
add_message "google.logging.v2.LogView" do
|
26
|
+
optional :name, :string, 1
|
27
|
+
optional :description, :string, 3
|
28
|
+
optional :create_time, :message, 4, "google.protobuf.Timestamp"
|
29
|
+
optional :update_time, :message, 5, "google.protobuf.Timestamp"
|
30
|
+
optional :filter, :string, 7
|
31
|
+
end
|
24
32
|
add_message "google.logging.v2.LogSink" do
|
25
33
|
optional :name, :string, 1
|
26
34
|
optional :destination, :string, 3
|
27
35
|
optional :filter, :string, 5
|
28
36
|
optional :description, :string, 18
|
29
37
|
optional :disabled, :bool, 19
|
38
|
+
repeated :exclusions, :message, 16, "google.logging.v2.LogExclusion"
|
30
39
|
optional :output_version_format, :enum, 6, "google.logging.v2.LogSink.VersionFormat"
|
31
40
|
optional :writer_identity, :string, 8
|
32
41
|
optional :include_children, :bool, 9
|
@@ -54,6 +63,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
54
63
|
repeated :buckets, :message, 1, "google.logging.v2.LogBucket"
|
55
64
|
optional :next_page_token, :string, 2
|
56
65
|
end
|
66
|
+
add_message "google.logging.v2.CreateBucketRequest" do
|
67
|
+
optional :parent, :string, 1
|
68
|
+
optional :bucket_id, :string, 2
|
69
|
+
optional :bucket, :message, 3, "google.logging.v2.LogBucket"
|
70
|
+
end
|
57
71
|
add_message "google.logging.v2.UpdateBucketRequest" do
|
58
72
|
optional :name, :string, 1
|
59
73
|
optional :bucket, :message, 2, "google.logging.v2.LogBucket"
|
@@ -62,6 +76,37 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
62
76
|
add_message "google.logging.v2.GetBucketRequest" do
|
63
77
|
optional :name, :string, 1
|
64
78
|
end
|
79
|
+
add_message "google.logging.v2.DeleteBucketRequest" do
|
80
|
+
optional :name, :string, 1
|
81
|
+
end
|
82
|
+
add_message "google.logging.v2.UndeleteBucketRequest" do
|
83
|
+
optional :name, :string, 1
|
84
|
+
end
|
85
|
+
add_message "google.logging.v2.ListViewsRequest" do
|
86
|
+
optional :parent, :string, 1
|
87
|
+
optional :page_token, :string, 2
|
88
|
+
optional :page_size, :int32, 3
|
89
|
+
end
|
90
|
+
add_message "google.logging.v2.ListViewsResponse" do
|
91
|
+
repeated :views, :message, 1, "google.logging.v2.LogView"
|
92
|
+
optional :next_page_token, :string, 2
|
93
|
+
end
|
94
|
+
add_message "google.logging.v2.CreateViewRequest" do
|
95
|
+
optional :parent, :string, 1
|
96
|
+
optional :view_id, :string, 2
|
97
|
+
optional :view, :message, 3, "google.logging.v2.LogView"
|
98
|
+
end
|
99
|
+
add_message "google.logging.v2.UpdateViewRequest" do
|
100
|
+
optional :name, :string, 1
|
101
|
+
optional :view, :message, 2, "google.logging.v2.LogView"
|
102
|
+
optional :update_mask, :message, 4, "google.protobuf.FieldMask"
|
103
|
+
end
|
104
|
+
add_message "google.logging.v2.GetViewRequest" do
|
105
|
+
optional :name, :string, 1
|
106
|
+
end
|
107
|
+
add_message "google.logging.v2.DeleteViewRequest" do
|
108
|
+
optional :name, :string, 1
|
109
|
+
end
|
65
110
|
add_message "google.logging.v2.ListSinksRequest" do
|
66
111
|
optional :parent, :string, 1
|
67
112
|
optional :page_token, :string, 2
|
@@ -146,13 +191,23 @@ module Google
|
|
146
191
|
module Logging
|
147
192
|
module V2
|
148
193
|
LogBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogBucket").msgclass
|
194
|
+
LogView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogView").msgclass
|
149
195
|
LogSink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogSink").msgclass
|
150
196
|
LogSink::VersionFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogSink.VersionFormat").enummodule
|
151
197
|
BigQueryOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.BigQueryOptions").msgclass
|
152
198
|
ListBucketsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListBucketsRequest").msgclass
|
153
199
|
ListBucketsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListBucketsResponse").msgclass
|
200
|
+
CreateBucketRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CreateBucketRequest").msgclass
|
154
201
|
UpdateBucketRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.UpdateBucketRequest").msgclass
|
155
202
|
GetBucketRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.GetBucketRequest").msgclass
|
203
|
+
DeleteBucketRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.DeleteBucketRequest").msgclass
|
204
|
+
UndeleteBucketRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.UndeleteBucketRequest").msgclass
|
205
|
+
ListViewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListViewsRequest").msgclass
|
206
|
+
ListViewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListViewsResponse").msgclass
|
207
|
+
CreateViewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CreateViewRequest").msgclass
|
208
|
+
UpdateViewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.UpdateViewRequest").msgclass
|
209
|
+
GetViewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.GetViewRequest").msgclass
|
210
|
+
DeleteViewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.DeleteViewRequest").msgclass
|
156
211
|
ListSinksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListSinksRequest").msgclass
|
157
212
|
ListSinksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListSinksResponse").msgclass
|
158
213
|
GetSinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.GetSinkRequest").msgclass
|
@@ -33,10 +33,13 @@ module Google
|
|
33
33
|
self.unmarshal_class_method = :decode
|
34
34
|
self.service_name = 'google.logging.v2.ConfigServiceV2'
|
35
35
|
|
36
|
-
# Lists buckets
|
37
|
-
rpc :ListBuckets, Google::Cloud::Logging::V2::ListBucketsRequest, Google::Cloud::Logging::V2::ListBucketsResponse
|
38
|
-
# Gets a bucket
|
39
|
-
rpc :GetBucket, Google::Cloud::Logging::V2::GetBucketRequest, Google::Cloud::Logging::V2::LogBucket
|
36
|
+
# Lists buckets.
|
37
|
+
rpc :ListBuckets, ::Google::Cloud::Logging::V2::ListBucketsRequest, ::Google::Cloud::Logging::V2::ListBucketsResponse
|
38
|
+
# Gets a bucket.
|
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.
|
42
|
+
rpc :CreateBucket, ::Google::Cloud::Logging::V2::CreateBucketRequest, ::Google::Cloud::Logging::V2::LogBucket
|
40
43
|
# Updates a bucket. This method replaces the following fields in the
|
41
44
|
# existing bucket with values from the new bucket: `retention_period`
|
42
45
|
#
|
@@ -47,38 +50,57 @@ module Google
|
|
47
50
|
# will be returned.
|
48
51
|
#
|
49
52
|
# A buckets region may not be modified after it is created.
|
50
|
-
|
51
|
-
|
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.
|
58
|
+
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.
|
61
|
+
rpc :UndeleteBucket, ::Google::Cloud::Logging::V2::UndeleteBucketRequest, ::Google::Protobuf::Empty
|
62
|
+
# Lists views on a bucket.
|
63
|
+
rpc :ListViews, ::Google::Cloud::Logging::V2::ListViewsRequest, ::Google::Cloud::Logging::V2::ListViewsResponse
|
64
|
+
# Gets a view.
|
65
|
+
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.
|
68
|
+
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`.
|
71
|
+
rpc :UpdateView, ::Google::Cloud::Logging::V2::UpdateViewRequest, ::Google::Cloud::Logging::V2::LogView
|
72
|
+
# Deletes a view from a bucket.
|
73
|
+
rpc :DeleteView, ::Google::Cloud::Logging::V2::DeleteViewRequest, ::Google::Protobuf::Empty
|
52
74
|
# Lists sinks.
|
53
|
-
rpc :ListSinks, Google::Cloud::Logging::V2::ListSinksRequest, Google::Cloud::Logging::V2::ListSinksResponse
|
75
|
+
rpc :ListSinks, ::Google::Cloud::Logging::V2::ListSinksRequest, ::Google::Cloud::Logging::V2::ListSinksResponse
|
54
76
|
# Gets a sink.
|
55
|
-
rpc :GetSink, Google::Cloud::Logging::V2::GetSinkRequest, Google::Cloud::Logging::V2::LogSink
|
77
|
+
rpc :GetSink, ::Google::Cloud::Logging::V2::GetSinkRequest, ::Google::Cloud::Logging::V2::LogSink
|
56
78
|
# Creates a sink that exports specified log entries to a destination. The
|
57
79
|
# export of newly-ingested log entries begins immediately, unless the sink's
|
58
80
|
# `writer_identity` is not permitted to write to the destination. A sink can
|
59
81
|
# export log entries only from the resource owning the sink.
|
60
|
-
rpc :CreateSink, Google::Cloud::Logging::V2::CreateSinkRequest, Google::Cloud::Logging::V2::LogSink
|
82
|
+
rpc :CreateSink, ::Google::Cloud::Logging::V2::CreateSinkRequest, ::Google::Cloud::Logging::V2::LogSink
|
61
83
|
# Updates a sink. This method replaces the following fields in the existing
|
62
84
|
# sink with values from the new sink: `destination`, and `filter`.
|
63
85
|
#
|
64
86
|
# The updated sink might also have a new `writer_identity`; see the
|
65
87
|
# `unique_writer_identity` field.
|
66
|
-
rpc :UpdateSink, Google::Cloud::Logging::V2::UpdateSinkRequest, Google::Cloud::Logging::V2::LogSink
|
88
|
+
rpc :UpdateSink, ::Google::Cloud::Logging::V2::UpdateSinkRequest, ::Google::Cloud::Logging::V2::LogSink
|
67
89
|
# Deletes a sink. If the sink has a unique `writer_identity`, then that
|
68
90
|
# service account is also deleted.
|
69
|
-
rpc :DeleteSink, Google::Cloud::Logging::V2::DeleteSinkRequest, Google::Protobuf::Empty
|
91
|
+
rpc :DeleteSink, ::Google::Cloud::Logging::V2::DeleteSinkRequest, ::Google::Protobuf::Empty
|
70
92
|
# Lists all the exclusions in a parent resource.
|
71
|
-
rpc :ListExclusions, Google::Cloud::Logging::V2::ListExclusionsRequest, Google::Cloud::Logging::V2::ListExclusionsResponse
|
93
|
+
rpc :ListExclusions, ::Google::Cloud::Logging::V2::ListExclusionsRequest, ::Google::Cloud::Logging::V2::ListExclusionsResponse
|
72
94
|
# Gets the description of an exclusion.
|
73
|
-
rpc :GetExclusion, Google::Cloud::Logging::V2::GetExclusionRequest, Google::Cloud::Logging::V2::LogExclusion
|
95
|
+
rpc :GetExclusion, ::Google::Cloud::Logging::V2::GetExclusionRequest, ::Google::Cloud::Logging::V2::LogExclusion
|
74
96
|
# Creates a new exclusion in a specified parent resource.
|
75
97
|
# Only log entries belonging to that resource can be excluded.
|
76
98
|
# You can have up to 10 exclusions in a resource.
|
77
|
-
rpc :CreateExclusion, Google::Cloud::Logging::V2::CreateExclusionRequest, Google::Cloud::Logging::V2::LogExclusion
|
99
|
+
rpc :CreateExclusion, ::Google::Cloud::Logging::V2::CreateExclusionRequest, ::Google::Cloud::Logging::V2::LogExclusion
|
78
100
|
# Changes one or more properties of an existing exclusion.
|
79
|
-
rpc :UpdateExclusion, Google::Cloud::Logging::V2::UpdateExclusionRequest, Google::Cloud::Logging::V2::LogExclusion
|
101
|
+
rpc :UpdateExclusion, ::Google::Cloud::Logging::V2::UpdateExclusionRequest, ::Google::Cloud::Logging::V2::LogExclusion
|
80
102
|
# Deletes an exclusion.
|
81
|
-
rpc :DeleteExclusion, Google::Cloud::Logging::V2::DeleteExclusionRequest, Google::Protobuf::Empty
|
103
|
+
rpc :DeleteExclusion, ::Google::Cloud::Logging::V2::DeleteExclusionRequest, ::Google::Protobuf::Empty
|
82
104
|
# Gets the Logs Router CMEK settings for the given resource.
|
83
105
|
#
|
84
106
|
# Note: CMEK for the Logs Router can currently only be configured for GCP
|
@@ -88,7 +110,7 @@ module Google
|
|
88
110
|
# See [Enabling CMEK for Logs
|
89
111
|
# Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
|
90
112
|
# for more information.
|
91
|
-
rpc :GetCmekSettings, Google::Cloud::Logging::V2::GetCmekSettingsRequest, Google::Cloud::Logging::V2::CmekSettings
|
113
|
+
rpc :GetCmekSettings, ::Google::Cloud::Logging::V2::GetCmekSettingsRequest, ::Google::Cloud::Logging::V2::CmekSettings
|
92
114
|
# Updates the Logs Router CMEK settings for the given resource.
|
93
115
|
#
|
94
116
|
# Note: CMEK for the Logs Router can currently only be configured for GCP
|
@@ -104,7 +126,7 @@ module Google
|
|
104
126
|
# See [Enabling CMEK for Logs
|
105
127
|
# Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
|
106
128
|
# for more information.
|
107
|
-
rpc :UpdateCmekSettings, Google::Cloud::Logging::V2::UpdateCmekSettingsRequest, Google::Cloud::Logging::V2::CmekSettings
|
129
|
+
rpc :UpdateCmekSettings, ::Google::Cloud::Logging::V2::UpdateCmekSettingsRequest, ::Google::Cloud::Logging::V2::CmekSettings
|
108
130
|
end
|
109
131
|
|
110
132
|
Stub = Service.rpc_stub_class
|