google-cloud-logging-v2 0.5.1 → 0.5.5
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.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/logging/v2/config_service/client.rb +590 -157
- data/lib/google/cloud/logging/v2/logging_service/client.rb +175 -73
- data/lib/google/cloud/logging/v2/metrics_service/client.rb +155 -73
- data/lib/google/cloud/logging/v2/version.rb +1 -1
- data/lib/google/logging/v2/log_entry_pb.rb +2 -2
- data/lib/google/logging/v2/logging_config_pb.rb +2 -2
- data/lib/google/logging/v2/logging_metrics_pb.rb +2 -2
- data/lib/google/logging/v2/logging_pb.rb +2 -2
- data/proto_docs/google/api/distribution.rb +2 -2
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/metric.rb +109 -36
- data/proto_docs/google/api/monitored_resource.rb +7 -6
- metadata +5 -6
- data/lib/google/logging/type/http_request_pb.rb +0 -38
- data/lib/google/logging/type/log_severity_pb.rb +0 -31
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::Logging::V2::ConfigService::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
|
-
#
|
44
|
+
# @example
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# end
|
46
|
+
# # Modify the configuration for all ConfigService clients
|
47
|
+
# ::Google::Cloud::Logging::V2::ConfigService::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
51
50
|
#
|
52
51
|
# @yield [config] Configure the Client client.
|
53
52
|
# @yieldparam config [Client::Configuration]
|
@@ -67,52 +66,34 @@ module Google
|
|
67
66
|
|
68
67
|
default_config.rpcs.list_sinks.timeout = 60.0
|
69
68
|
default_config.rpcs.list_sinks.retry_policy = {
|
70
|
-
initial_delay: 0.1,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [4, 13, 14]
|
69
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
|
74
70
|
}
|
75
71
|
|
76
72
|
default_config.rpcs.get_sink.timeout = 60.0
|
77
73
|
default_config.rpcs.get_sink.retry_policy = {
|
78
|
-
initial_delay: 0.1,
|
79
|
-
max_delay: 60.0,
|
80
|
-
multiplier: 1.3,
|
81
|
-
retry_codes: [4, 13, 14]
|
74
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
|
82
75
|
}
|
83
76
|
|
84
77
|
default_config.rpcs.create_sink.timeout = 120.0
|
85
78
|
|
86
79
|
default_config.rpcs.update_sink.timeout = 60.0
|
87
80
|
default_config.rpcs.update_sink.retry_policy = {
|
88
|
-
initial_delay: 0.1,
|
89
|
-
max_delay: 60.0,
|
90
|
-
multiplier: 1.3,
|
91
|
-
retry_codes: [4, 13, 14]
|
81
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
|
92
82
|
}
|
93
83
|
|
94
84
|
default_config.rpcs.delete_sink.timeout = 60.0
|
95
85
|
default_config.rpcs.delete_sink.retry_policy = {
|
96
|
-
initial_delay: 0.1,
|
97
|
-
max_delay: 60.0,
|
98
|
-
multiplier: 1.3,
|
99
|
-
retry_codes: [4, 13, 14]
|
86
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
|
100
87
|
}
|
101
88
|
|
102
89
|
default_config.rpcs.list_exclusions.timeout = 60.0
|
103
90
|
default_config.rpcs.list_exclusions.retry_policy = {
|
104
|
-
initial_delay: 0.1,
|
105
|
-
max_delay: 60.0,
|
106
|
-
multiplier: 1.3,
|
107
|
-
retry_codes: [4, 13, 14]
|
91
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
|
108
92
|
}
|
109
93
|
|
110
94
|
default_config.rpcs.get_exclusion.timeout = 60.0
|
111
95
|
default_config.rpcs.get_exclusion.retry_policy = {
|
112
|
-
initial_delay: 0.1,
|
113
|
-
max_delay: 60.0,
|
114
|
-
multiplier: 1.3,
|
115
|
-
retry_codes: [4, 13, 14]
|
96
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
|
116
97
|
}
|
117
98
|
|
118
99
|
default_config.rpcs.create_exclusion.timeout = 120.0
|
@@ -121,10 +102,7 @@ module Google
|
|
121
102
|
|
122
103
|
default_config.rpcs.delete_exclusion.timeout = 60.0
|
123
104
|
default_config.rpcs.delete_exclusion.retry_policy = {
|
124
|
-
initial_delay: 0.1,
|
125
|
-
max_delay: 60.0,
|
126
|
-
multiplier: 1.3,
|
127
|
-
retry_codes: [4, 13, 14]
|
105
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
|
128
106
|
}
|
129
107
|
|
130
108
|
default_config
|
@@ -156,19 +134,15 @@ module Google
|
|
156
134
|
##
|
157
135
|
# Create a new ConfigService client object.
|
158
136
|
#
|
159
|
-
#
|
160
|
-
#
|
161
|
-
# To create a new ConfigService client with the default
|
162
|
-
# configuration:
|
163
|
-
#
|
164
|
-
# client = ::Google::Cloud::Logging::V2::ConfigService::Client.new
|
137
|
+
# @example
|
165
138
|
#
|
166
|
-
#
|
167
|
-
#
|
139
|
+
# # Create a client using the default configuration
|
140
|
+
# client = ::Google::Cloud::Logging::V2::ConfigService::Client.new
|
168
141
|
#
|
169
|
-
#
|
170
|
-
#
|
171
|
-
#
|
142
|
+
# # Create a client using a custom configuration
|
143
|
+
# client = ::Google::Cloud::Logging::V2::ConfigService::Client.new do |config|
|
144
|
+
# config.timeout = 10.0
|
145
|
+
# end
|
172
146
|
#
|
173
147
|
# @yield [config] Configure the ConfigService client.
|
174
148
|
# @yieldparam config [Client::Configuration]
|
@@ -188,14 +162,13 @@ module Google
|
|
188
162
|
|
189
163
|
# Create credentials
|
190
164
|
credentials = @config.credentials
|
191
|
-
# Use self-signed JWT if the
|
165
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
192
166
|
# but only if the default endpoint does not have a region prefix.
|
193
|
-
enable_self_signed_jwt = @config.
|
194
|
-
@config.endpoint == Client.configure.endpoint &&
|
167
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
195
168
|
!@config.endpoint.split(".").first.include?("-")
|
196
169
|
credentials ||= Credentials.default scope: @config.scope,
|
197
170
|
enable_self_signed_jwt: enable_self_signed_jwt
|
198
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
171
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
199
172
|
credentials = Credentials.new credentials, scope: @config.scope
|
200
173
|
end
|
201
174
|
@quota_project_id = @config.quota_project
|
@@ -259,6 +232,27 @@ module Google
|
|
259
232
|
#
|
260
233
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
261
234
|
#
|
235
|
+
# @example Basic example
|
236
|
+
# require "google/cloud/logging/v2"
|
237
|
+
#
|
238
|
+
# # Create a client object. The client can be reused for multiple calls.
|
239
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
240
|
+
#
|
241
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
242
|
+
# request = Google::Cloud::Logging::V2::ListBucketsRequest.new
|
243
|
+
#
|
244
|
+
# # Call the list_buckets method.
|
245
|
+
# result = client.list_buckets request
|
246
|
+
#
|
247
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
248
|
+
# # iterate over all elements by calling #each, and the enumerable
|
249
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
250
|
+
# # methods are also available for managing paging directly.
|
251
|
+
# result.each do |response|
|
252
|
+
# # Each element is of type ::Google::Cloud::Logging::V2::LogBucket.
|
253
|
+
# p response
|
254
|
+
# end
|
255
|
+
#
|
262
256
|
def list_buckets request, options = nil
|
263
257
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
264
258
|
|
@@ -276,16 +270,20 @@ module Google
|
|
276
270
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
277
271
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
278
272
|
|
279
|
-
header_params = {
|
280
|
-
|
281
|
-
|
273
|
+
header_params = {}
|
274
|
+
if request.parent
|
275
|
+
header_params["parent"] = request.parent
|
276
|
+
end
|
277
|
+
|
282
278
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
283
279
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
284
280
|
|
285
281
|
options.apply_defaults timeout: @config.rpcs.list_buckets.timeout,
|
286
282
|
metadata: metadata,
|
287
283
|
retry_policy: @config.rpcs.list_buckets.retry_policy
|
288
|
-
|
284
|
+
|
285
|
+
options.apply_defaults timeout: @config.timeout,
|
286
|
+
metadata: @config.metadata,
|
289
287
|
retry_policy: @config.retry_policy
|
290
288
|
|
291
289
|
@config_service_stub.call_rpc :list_buckets, request, options: options do |response, operation|
|
@@ -334,6 +332,21 @@ module Google
|
|
334
332
|
#
|
335
333
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
336
334
|
#
|
335
|
+
# @example Basic example
|
336
|
+
# require "google/cloud/logging/v2"
|
337
|
+
#
|
338
|
+
# # Create a client object. The client can be reused for multiple calls.
|
339
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
340
|
+
#
|
341
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
342
|
+
# request = Google::Cloud::Logging::V2::GetBucketRequest.new
|
343
|
+
#
|
344
|
+
# # Call the get_bucket method.
|
345
|
+
# result = client.get_bucket request
|
346
|
+
#
|
347
|
+
# # The returned object is of type Google::Cloud::Logging::V2::LogBucket.
|
348
|
+
# p result
|
349
|
+
#
|
337
350
|
def get_bucket request, options = nil
|
338
351
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
339
352
|
|
@@ -351,16 +364,20 @@ module Google
|
|
351
364
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
352
365
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
353
366
|
|
354
|
-
header_params = {
|
355
|
-
|
356
|
-
|
367
|
+
header_params = {}
|
368
|
+
if request.name
|
369
|
+
header_params["name"] = request.name
|
370
|
+
end
|
371
|
+
|
357
372
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
358
373
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
359
374
|
|
360
375
|
options.apply_defaults timeout: @config.rpcs.get_bucket.timeout,
|
361
376
|
metadata: metadata,
|
362
377
|
retry_policy: @config.rpcs.get_bucket.retry_policy
|
363
|
-
|
378
|
+
|
379
|
+
options.apply_defaults timeout: @config.timeout,
|
380
|
+
metadata: @config.metadata,
|
364
381
|
retry_policy: @config.retry_policy
|
365
382
|
|
366
383
|
@config_service_stub.call_rpc :get_bucket, request, options: options do |response, operation|
|
@@ -413,6 +430,21 @@ module Google
|
|
413
430
|
#
|
414
431
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
415
432
|
#
|
433
|
+
# @example Basic example
|
434
|
+
# require "google/cloud/logging/v2"
|
435
|
+
#
|
436
|
+
# # Create a client object. The client can be reused for multiple calls.
|
437
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
438
|
+
#
|
439
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
440
|
+
# request = Google::Cloud::Logging::V2::CreateBucketRequest.new
|
441
|
+
#
|
442
|
+
# # Call the create_bucket method.
|
443
|
+
# result = client.create_bucket request
|
444
|
+
#
|
445
|
+
# # The returned object is of type Google::Cloud::Logging::V2::LogBucket.
|
446
|
+
# p result
|
447
|
+
#
|
416
448
|
def create_bucket request, options = nil
|
417
449
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
418
450
|
|
@@ -430,16 +462,20 @@ module Google
|
|
430
462
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
431
463
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
432
464
|
|
433
|
-
header_params = {
|
434
|
-
|
435
|
-
|
465
|
+
header_params = {}
|
466
|
+
if request.parent
|
467
|
+
header_params["parent"] = request.parent
|
468
|
+
end
|
469
|
+
|
436
470
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
437
471
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
438
472
|
|
439
473
|
options.apply_defaults timeout: @config.rpcs.create_bucket.timeout,
|
440
474
|
metadata: metadata,
|
441
475
|
retry_policy: @config.rpcs.create_bucket.retry_policy
|
442
|
-
|
476
|
+
|
477
|
+
options.apply_defaults timeout: @config.timeout,
|
478
|
+
metadata: @config.metadata,
|
443
479
|
retry_policy: @config.retry_policy
|
444
480
|
|
445
481
|
@config_service_stub.call_rpc :create_bucket, request, options: options do |response, operation|
|
@@ -509,6 +545,21 @@ module Google
|
|
509
545
|
#
|
510
546
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
511
547
|
#
|
548
|
+
# @example Basic example
|
549
|
+
# require "google/cloud/logging/v2"
|
550
|
+
#
|
551
|
+
# # Create a client object. The client can be reused for multiple calls.
|
552
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
553
|
+
#
|
554
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
555
|
+
# request = Google::Cloud::Logging::V2::UpdateBucketRequest.new
|
556
|
+
#
|
557
|
+
# # Call the update_bucket method.
|
558
|
+
# result = client.update_bucket request
|
559
|
+
#
|
560
|
+
# # The returned object is of type Google::Cloud::Logging::V2::LogBucket.
|
561
|
+
# p result
|
562
|
+
#
|
512
563
|
def update_bucket request, options = nil
|
513
564
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
514
565
|
|
@@ -526,16 +577,20 @@ module Google
|
|
526
577
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
527
578
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
528
579
|
|
529
|
-
header_params = {
|
530
|
-
|
531
|
-
|
580
|
+
header_params = {}
|
581
|
+
if request.name
|
582
|
+
header_params["name"] = request.name
|
583
|
+
end
|
584
|
+
|
532
585
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
533
586
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
534
587
|
|
535
588
|
options.apply_defaults timeout: @config.rpcs.update_bucket.timeout,
|
536
589
|
metadata: metadata,
|
537
590
|
retry_policy: @config.rpcs.update_bucket.retry_policy
|
538
|
-
|
591
|
+
|
592
|
+
options.apply_defaults timeout: @config.timeout,
|
593
|
+
metadata: @config.metadata,
|
539
594
|
retry_policy: @config.retry_policy
|
540
595
|
|
541
596
|
@config_service_stub.call_rpc :update_bucket, request, options: options do |response, operation|
|
@@ -586,6 +641,21 @@ module Google
|
|
586
641
|
#
|
587
642
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
588
643
|
#
|
644
|
+
# @example Basic example
|
645
|
+
# require "google/cloud/logging/v2"
|
646
|
+
#
|
647
|
+
# # Create a client object. The client can be reused for multiple calls.
|
648
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
649
|
+
#
|
650
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
651
|
+
# request = Google::Cloud::Logging::V2::DeleteBucketRequest.new
|
652
|
+
#
|
653
|
+
# # Call the delete_bucket method.
|
654
|
+
# result = client.delete_bucket request
|
655
|
+
#
|
656
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
657
|
+
# p result
|
658
|
+
#
|
589
659
|
def delete_bucket request, options = nil
|
590
660
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
591
661
|
|
@@ -603,16 +673,20 @@ module Google
|
|
603
673
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
604
674
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
605
675
|
|
606
|
-
header_params = {
|
607
|
-
|
608
|
-
|
676
|
+
header_params = {}
|
677
|
+
if request.name
|
678
|
+
header_params["name"] = request.name
|
679
|
+
end
|
680
|
+
|
609
681
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
610
682
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
611
683
|
|
612
684
|
options.apply_defaults timeout: @config.rpcs.delete_bucket.timeout,
|
613
685
|
metadata: metadata,
|
614
686
|
retry_policy: @config.rpcs.delete_bucket.retry_policy
|
615
|
-
|
687
|
+
|
688
|
+
options.apply_defaults timeout: @config.timeout,
|
689
|
+
metadata: @config.metadata,
|
616
690
|
retry_policy: @config.retry_policy
|
617
691
|
|
618
692
|
@config_service_stub.call_rpc :delete_bucket, request, options: options do |response, operation|
|
@@ -661,6 +735,21 @@ module Google
|
|
661
735
|
#
|
662
736
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
663
737
|
#
|
738
|
+
# @example Basic example
|
739
|
+
# require "google/cloud/logging/v2"
|
740
|
+
#
|
741
|
+
# # Create a client object. The client can be reused for multiple calls.
|
742
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
743
|
+
#
|
744
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
745
|
+
# request = Google::Cloud::Logging::V2::UndeleteBucketRequest.new
|
746
|
+
#
|
747
|
+
# # Call the undelete_bucket method.
|
748
|
+
# result = client.undelete_bucket request
|
749
|
+
#
|
750
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
751
|
+
# p result
|
752
|
+
#
|
664
753
|
def undelete_bucket request, options = nil
|
665
754
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
666
755
|
|
@@ -678,16 +767,20 @@ module Google
|
|
678
767
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
679
768
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
680
769
|
|
681
|
-
header_params = {
|
682
|
-
|
683
|
-
|
770
|
+
header_params = {}
|
771
|
+
if request.name
|
772
|
+
header_params["name"] = request.name
|
773
|
+
end
|
774
|
+
|
684
775
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
685
776
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
686
777
|
|
687
778
|
options.apply_defaults timeout: @config.rpcs.undelete_bucket.timeout,
|
688
779
|
metadata: metadata,
|
689
780
|
retry_policy: @config.rpcs.undelete_bucket.retry_policy
|
690
|
-
|
781
|
+
|
782
|
+
options.apply_defaults timeout: @config.timeout,
|
783
|
+
metadata: @config.metadata,
|
691
784
|
retry_policy: @config.retry_policy
|
692
785
|
|
693
786
|
@config_service_stub.call_rpc :undelete_bucket, request, options: options do |response, operation|
|
@@ -738,6 +831,27 @@ module Google
|
|
738
831
|
#
|
739
832
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
740
833
|
#
|
834
|
+
# @example Basic example
|
835
|
+
# require "google/cloud/logging/v2"
|
836
|
+
#
|
837
|
+
# # Create a client object. The client can be reused for multiple calls.
|
838
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
839
|
+
#
|
840
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
841
|
+
# request = Google::Cloud::Logging::V2::ListViewsRequest.new
|
842
|
+
#
|
843
|
+
# # Call the list_views method.
|
844
|
+
# result = client.list_views request
|
845
|
+
#
|
846
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
847
|
+
# # iterate over all elements by calling #each, and the enumerable
|
848
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
849
|
+
# # methods are also available for managing paging directly.
|
850
|
+
# result.each do |response|
|
851
|
+
# # Each element is of type ::Google::Cloud::Logging::V2::LogView.
|
852
|
+
# p response
|
853
|
+
# end
|
854
|
+
#
|
741
855
|
def list_views request, options = nil
|
742
856
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
743
857
|
|
@@ -755,16 +869,20 @@ module Google
|
|
755
869
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
756
870
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
757
871
|
|
758
|
-
header_params = {
|
759
|
-
|
760
|
-
|
872
|
+
header_params = {}
|
873
|
+
if request.parent
|
874
|
+
header_params["parent"] = request.parent
|
875
|
+
end
|
876
|
+
|
761
877
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
762
878
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
763
879
|
|
764
880
|
options.apply_defaults timeout: @config.rpcs.list_views.timeout,
|
765
881
|
metadata: metadata,
|
766
882
|
retry_policy: @config.rpcs.list_views.retry_policy
|
767
|
-
|
883
|
+
|
884
|
+
options.apply_defaults timeout: @config.timeout,
|
885
|
+
metadata: @config.metadata,
|
768
886
|
retry_policy: @config.retry_policy
|
769
887
|
|
770
888
|
@config_service_stub.call_rpc :list_views, request, options: options do |response, operation|
|
@@ -810,6 +928,21 @@ module Google
|
|
810
928
|
#
|
811
929
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
812
930
|
#
|
931
|
+
# @example Basic example
|
932
|
+
# require "google/cloud/logging/v2"
|
933
|
+
#
|
934
|
+
# # Create a client object. The client can be reused for multiple calls.
|
935
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
936
|
+
#
|
937
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
938
|
+
# request = Google::Cloud::Logging::V2::GetViewRequest.new
|
939
|
+
#
|
940
|
+
# # Call the get_view method.
|
941
|
+
# result = client.get_view request
|
942
|
+
#
|
943
|
+
# # The returned object is of type Google::Cloud::Logging::V2::LogView.
|
944
|
+
# p result
|
945
|
+
#
|
813
946
|
def get_view request, options = nil
|
814
947
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
815
948
|
|
@@ -827,16 +960,20 @@ module Google
|
|
827
960
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
828
961
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
829
962
|
|
830
|
-
header_params = {
|
831
|
-
|
832
|
-
|
963
|
+
header_params = {}
|
964
|
+
if request.name
|
965
|
+
header_params["name"] = request.name
|
966
|
+
end
|
967
|
+
|
833
968
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
834
969
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
835
970
|
|
836
971
|
options.apply_defaults timeout: @config.rpcs.get_view.timeout,
|
837
972
|
metadata: metadata,
|
838
973
|
retry_policy: @config.rpcs.get_view.retry_policy
|
839
|
-
|
974
|
+
|
975
|
+
options.apply_defaults timeout: @config.timeout,
|
976
|
+
metadata: @config.metadata,
|
840
977
|
retry_policy: @config.retry_policy
|
841
978
|
|
842
979
|
@config_service_stub.call_rpc :get_view, request, options: options do |response, operation|
|
@@ -886,6 +1023,21 @@ module Google
|
|
886
1023
|
#
|
887
1024
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
888
1025
|
#
|
1026
|
+
# @example Basic example
|
1027
|
+
# require "google/cloud/logging/v2"
|
1028
|
+
#
|
1029
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1030
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
1031
|
+
#
|
1032
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1033
|
+
# request = Google::Cloud::Logging::V2::CreateViewRequest.new
|
1034
|
+
#
|
1035
|
+
# # Call the create_view method.
|
1036
|
+
# result = client.create_view request
|
1037
|
+
#
|
1038
|
+
# # The returned object is of type Google::Cloud::Logging::V2::LogView.
|
1039
|
+
# p result
|
1040
|
+
#
|
889
1041
|
def create_view request, options = nil
|
890
1042
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
891
1043
|
|
@@ -903,16 +1055,20 @@ module Google
|
|
903
1055
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
904
1056
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
905
1057
|
|
906
|
-
header_params = {
|
907
|
-
|
908
|
-
|
1058
|
+
header_params = {}
|
1059
|
+
if request.parent
|
1060
|
+
header_params["parent"] = request.parent
|
1061
|
+
end
|
1062
|
+
|
909
1063
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
910
1064
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
911
1065
|
|
912
1066
|
options.apply_defaults timeout: @config.rpcs.create_view.timeout,
|
913
1067
|
metadata: metadata,
|
914
1068
|
retry_policy: @config.rpcs.create_view.retry_policy
|
915
|
-
|
1069
|
+
|
1070
|
+
options.apply_defaults timeout: @config.timeout,
|
1071
|
+
metadata: @config.metadata,
|
916
1072
|
retry_policy: @config.retry_policy
|
917
1073
|
|
918
1074
|
@config_service_stub.call_rpc :create_view, request, options: options do |response, operation|
|
@@ -969,6 +1125,21 @@ module Google
|
|
969
1125
|
#
|
970
1126
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
971
1127
|
#
|
1128
|
+
# @example Basic example
|
1129
|
+
# require "google/cloud/logging/v2"
|
1130
|
+
#
|
1131
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1132
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
1133
|
+
#
|
1134
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1135
|
+
# request = Google::Cloud::Logging::V2::UpdateViewRequest.new
|
1136
|
+
#
|
1137
|
+
# # Call the update_view method.
|
1138
|
+
# result = client.update_view request
|
1139
|
+
#
|
1140
|
+
# # The returned object is of type Google::Cloud::Logging::V2::LogView.
|
1141
|
+
# p result
|
1142
|
+
#
|
972
1143
|
def update_view request, options = nil
|
973
1144
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
974
1145
|
|
@@ -986,16 +1157,20 @@ module Google
|
|
986
1157
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
987
1158
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
988
1159
|
|
989
|
-
header_params = {
|
990
|
-
|
991
|
-
|
1160
|
+
header_params = {}
|
1161
|
+
if request.name
|
1162
|
+
header_params["name"] = request.name
|
1163
|
+
end
|
1164
|
+
|
992
1165
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
993
1166
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
994
1167
|
|
995
1168
|
options.apply_defaults timeout: @config.rpcs.update_view.timeout,
|
996
1169
|
metadata: metadata,
|
997
1170
|
retry_policy: @config.rpcs.update_view.retry_policy
|
998
|
-
|
1171
|
+
|
1172
|
+
options.apply_defaults timeout: @config.timeout,
|
1173
|
+
metadata: @config.metadata,
|
999
1174
|
retry_policy: @config.retry_policy
|
1000
1175
|
|
1001
1176
|
@config_service_stub.call_rpc :update_view, request, options: options do |response, operation|
|
@@ -1040,6 +1215,21 @@ module Google
|
|
1040
1215
|
#
|
1041
1216
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1042
1217
|
#
|
1218
|
+
# @example Basic example
|
1219
|
+
# require "google/cloud/logging/v2"
|
1220
|
+
#
|
1221
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1222
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
1223
|
+
#
|
1224
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1225
|
+
# request = Google::Cloud::Logging::V2::DeleteViewRequest.new
|
1226
|
+
#
|
1227
|
+
# # Call the delete_view method.
|
1228
|
+
# result = client.delete_view request
|
1229
|
+
#
|
1230
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1231
|
+
# p result
|
1232
|
+
#
|
1043
1233
|
def delete_view request, options = nil
|
1044
1234
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1045
1235
|
|
@@ -1057,16 +1247,20 @@ module Google
|
|
1057
1247
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
1058
1248
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1059
1249
|
|
1060
|
-
header_params = {
|
1061
|
-
|
1062
|
-
|
1250
|
+
header_params = {}
|
1251
|
+
if request.name
|
1252
|
+
header_params["name"] = request.name
|
1253
|
+
end
|
1254
|
+
|
1063
1255
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1064
1256
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1065
1257
|
|
1066
1258
|
options.apply_defaults timeout: @config.rpcs.delete_view.timeout,
|
1067
1259
|
metadata: metadata,
|
1068
1260
|
retry_policy: @config.rpcs.delete_view.retry_policy
|
1069
|
-
|
1261
|
+
|
1262
|
+
options.apply_defaults timeout: @config.timeout,
|
1263
|
+
metadata: @config.metadata,
|
1070
1264
|
retry_policy: @config.retry_policy
|
1071
1265
|
|
1072
1266
|
@config_service_stub.call_rpc :delete_view, request, options: options do |response, operation|
|
@@ -1120,6 +1314,27 @@ module Google
|
|
1120
1314
|
#
|
1121
1315
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1122
1316
|
#
|
1317
|
+
# @example Basic example
|
1318
|
+
# require "google/cloud/logging/v2"
|
1319
|
+
#
|
1320
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1321
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
1322
|
+
#
|
1323
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1324
|
+
# request = Google::Cloud::Logging::V2::ListSinksRequest.new
|
1325
|
+
#
|
1326
|
+
# # Call the list_sinks method.
|
1327
|
+
# result = client.list_sinks request
|
1328
|
+
#
|
1329
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1330
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1331
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1332
|
+
# # methods are also available for managing paging directly.
|
1333
|
+
# result.each do |response|
|
1334
|
+
# # Each element is of type ::Google::Cloud::Logging::V2::LogSink.
|
1335
|
+
# p response
|
1336
|
+
# end
|
1337
|
+
#
|
1123
1338
|
def list_sinks request, options = nil
|
1124
1339
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1125
1340
|
|
@@ -1137,16 +1352,20 @@ module Google
|
|
1137
1352
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
1138
1353
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1139
1354
|
|
1140
|
-
header_params = {
|
1141
|
-
|
1142
|
-
|
1355
|
+
header_params = {}
|
1356
|
+
if request.parent
|
1357
|
+
header_params["parent"] = request.parent
|
1358
|
+
end
|
1359
|
+
|
1143
1360
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1144
1361
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1145
1362
|
|
1146
1363
|
options.apply_defaults timeout: @config.rpcs.list_sinks.timeout,
|
1147
1364
|
metadata: metadata,
|
1148
1365
|
retry_policy: @config.rpcs.list_sinks.retry_policy
|
1149
|
-
|
1366
|
+
|
1367
|
+
options.apply_defaults timeout: @config.timeout,
|
1368
|
+
metadata: @config.metadata,
|
1150
1369
|
retry_policy: @config.retry_policy
|
1151
1370
|
|
1152
1371
|
@config_service_stub.call_rpc :list_sinks, request, options: options do |response, operation|
|
@@ -1194,6 +1413,21 @@ module Google
|
|
1194
1413
|
#
|
1195
1414
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1196
1415
|
#
|
1416
|
+
# @example Basic example
|
1417
|
+
# require "google/cloud/logging/v2"
|
1418
|
+
#
|
1419
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1420
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
1421
|
+
#
|
1422
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1423
|
+
# request = Google::Cloud::Logging::V2::GetSinkRequest.new
|
1424
|
+
#
|
1425
|
+
# # Call the get_sink method.
|
1426
|
+
# result = client.get_sink request
|
1427
|
+
#
|
1428
|
+
# # The returned object is of type Google::Cloud::Logging::V2::LogSink.
|
1429
|
+
# p result
|
1430
|
+
#
|
1197
1431
|
def get_sink request, options = nil
|
1198
1432
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1199
1433
|
|
@@ -1211,16 +1445,20 @@ module Google
|
|
1211
1445
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
1212
1446
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1213
1447
|
|
1214
|
-
header_params = {
|
1215
|
-
|
1216
|
-
|
1448
|
+
header_params = {}
|
1449
|
+
if request.sink_name
|
1450
|
+
header_params["sink_name"] = request.sink_name
|
1451
|
+
end
|
1452
|
+
|
1217
1453
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1218
1454
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1219
1455
|
|
1220
1456
|
options.apply_defaults timeout: @config.rpcs.get_sink.timeout,
|
1221
1457
|
metadata: metadata,
|
1222
1458
|
retry_policy: @config.rpcs.get_sink.retry_policy
|
1223
|
-
|
1459
|
+
|
1460
|
+
options.apply_defaults timeout: @config.timeout,
|
1461
|
+
metadata: @config.metadata,
|
1224
1462
|
retry_policy: @config.retry_policy
|
1225
1463
|
|
1226
1464
|
@config_service_stub.call_rpc :get_sink, request, options: options do |response, operation|
|
@@ -1285,6 +1523,21 @@ module Google
|
|
1285
1523
|
#
|
1286
1524
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1287
1525
|
#
|
1526
|
+
# @example Basic example
|
1527
|
+
# require "google/cloud/logging/v2"
|
1528
|
+
#
|
1529
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1530
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
1531
|
+
#
|
1532
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1533
|
+
# request = Google::Cloud::Logging::V2::CreateSinkRequest.new
|
1534
|
+
#
|
1535
|
+
# # Call the create_sink method.
|
1536
|
+
# result = client.create_sink request
|
1537
|
+
#
|
1538
|
+
# # The returned object is of type Google::Cloud::Logging::V2::LogSink.
|
1539
|
+
# p result
|
1540
|
+
#
|
1288
1541
|
def create_sink request, options = nil
|
1289
1542
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1290
1543
|
|
@@ -1302,16 +1555,20 @@ module Google
|
|
1302
1555
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
1303
1556
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1304
1557
|
|
1305
|
-
header_params = {
|
1306
|
-
|
1307
|
-
|
1558
|
+
header_params = {}
|
1559
|
+
if request.parent
|
1560
|
+
header_params["parent"] = request.parent
|
1561
|
+
end
|
1562
|
+
|
1308
1563
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1309
1564
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1310
1565
|
|
1311
1566
|
options.apply_defaults timeout: @config.rpcs.create_sink.timeout,
|
1312
1567
|
metadata: metadata,
|
1313
1568
|
retry_policy: @config.rpcs.create_sink.retry_policy
|
1314
|
-
|
1569
|
+
|
1570
|
+
options.apply_defaults timeout: @config.timeout,
|
1571
|
+
metadata: @config.metadata,
|
1315
1572
|
retry_policy: @config.retry_policy
|
1316
1573
|
|
1317
1574
|
@config_service_stub.call_rpc :create_sink, request, options: options do |response, operation|
|
@@ -1393,6 +1650,21 @@ module Google
|
|
1393
1650
|
#
|
1394
1651
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1395
1652
|
#
|
1653
|
+
# @example Basic example
|
1654
|
+
# require "google/cloud/logging/v2"
|
1655
|
+
#
|
1656
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1657
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
1658
|
+
#
|
1659
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1660
|
+
# request = Google::Cloud::Logging::V2::UpdateSinkRequest.new
|
1661
|
+
#
|
1662
|
+
# # Call the update_sink method.
|
1663
|
+
# result = client.update_sink request
|
1664
|
+
#
|
1665
|
+
# # The returned object is of type Google::Cloud::Logging::V2::LogSink.
|
1666
|
+
# p result
|
1667
|
+
#
|
1396
1668
|
def update_sink request, options = nil
|
1397
1669
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1398
1670
|
|
@@ -1410,16 +1682,20 @@ module Google
|
|
1410
1682
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
1411
1683
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1412
1684
|
|
1413
|
-
header_params = {
|
1414
|
-
|
1415
|
-
|
1685
|
+
header_params = {}
|
1686
|
+
if request.sink_name
|
1687
|
+
header_params["sink_name"] = request.sink_name
|
1688
|
+
end
|
1689
|
+
|
1416
1690
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1417
1691
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1418
1692
|
|
1419
1693
|
options.apply_defaults timeout: @config.rpcs.update_sink.timeout,
|
1420
1694
|
metadata: metadata,
|
1421
1695
|
retry_policy: @config.rpcs.update_sink.retry_policy
|
1422
|
-
|
1696
|
+
|
1697
|
+
options.apply_defaults timeout: @config.timeout,
|
1698
|
+
metadata: @config.metadata,
|
1423
1699
|
retry_policy: @config.retry_policy
|
1424
1700
|
|
1425
1701
|
@config_service_stub.call_rpc :update_sink, request, options: options do |response, operation|
|
@@ -1468,6 +1744,21 @@ module Google
|
|
1468
1744
|
#
|
1469
1745
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1470
1746
|
#
|
1747
|
+
# @example Basic example
|
1748
|
+
# require "google/cloud/logging/v2"
|
1749
|
+
#
|
1750
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1751
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
1752
|
+
#
|
1753
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1754
|
+
# request = Google::Cloud::Logging::V2::DeleteSinkRequest.new
|
1755
|
+
#
|
1756
|
+
# # Call the delete_sink method.
|
1757
|
+
# result = client.delete_sink request
|
1758
|
+
#
|
1759
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1760
|
+
# p result
|
1761
|
+
#
|
1471
1762
|
def delete_sink request, options = nil
|
1472
1763
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1473
1764
|
|
@@ -1485,16 +1776,20 @@ module Google
|
|
1485
1776
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
1486
1777
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1487
1778
|
|
1488
|
-
header_params = {
|
1489
|
-
|
1490
|
-
|
1779
|
+
header_params = {}
|
1780
|
+
if request.sink_name
|
1781
|
+
header_params["sink_name"] = request.sink_name
|
1782
|
+
end
|
1783
|
+
|
1491
1784
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1492
1785
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1493
1786
|
|
1494
1787
|
options.apply_defaults timeout: @config.rpcs.delete_sink.timeout,
|
1495
1788
|
metadata: metadata,
|
1496
1789
|
retry_policy: @config.rpcs.delete_sink.retry_policy
|
1497
|
-
|
1790
|
+
|
1791
|
+
options.apply_defaults timeout: @config.timeout,
|
1792
|
+
metadata: @config.metadata,
|
1498
1793
|
retry_policy: @config.retry_policy
|
1499
1794
|
|
1500
1795
|
@config_service_stub.call_rpc :delete_sink, request, options: options do |response, operation|
|
@@ -1548,6 +1843,27 @@ module Google
|
|
1548
1843
|
#
|
1549
1844
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1550
1845
|
#
|
1846
|
+
# @example Basic example
|
1847
|
+
# require "google/cloud/logging/v2"
|
1848
|
+
#
|
1849
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1850
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
1851
|
+
#
|
1852
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1853
|
+
# request = Google::Cloud::Logging::V2::ListExclusionsRequest.new
|
1854
|
+
#
|
1855
|
+
# # Call the list_exclusions method.
|
1856
|
+
# result = client.list_exclusions request
|
1857
|
+
#
|
1858
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1859
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1860
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1861
|
+
# # methods are also available for managing paging directly.
|
1862
|
+
# result.each do |response|
|
1863
|
+
# # Each element is of type ::Google::Cloud::Logging::V2::LogExclusion.
|
1864
|
+
# p response
|
1865
|
+
# end
|
1866
|
+
#
|
1551
1867
|
def list_exclusions request, options = nil
|
1552
1868
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1553
1869
|
|
@@ -1565,16 +1881,20 @@ module Google
|
|
1565
1881
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
1566
1882
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1567
1883
|
|
1568
|
-
header_params = {
|
1569
|
-
|
1570
|
-
|
1884
|
+
header_params = {}
|
1885
|
+
if request.parent
|
1886
|
+
header_params["parent"] = request.parent
|
1887
|
+
end
|
1888
|
+
|
1571
1889
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1572
1890
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1573
1891
|
|
1574
1892
|
options.apply_defaults timeout: @config.rpcs.list_exclusions.timeout,
|
1575
1893
|
metadata: metadata,
|
1576
1894
|
retry_policy: @config.rpcs.list_exclusions.retry_policy
|
1577
|
-
|
1895
|
+
|
1896
|
+
options.apply_defaults timeout: @config.timeout,
|
1897
|
+
metadata: @config.metadata,
|
1578
1898
|
retry_policy: @config.retry_policy
|
1579
1899
|
|
1580
1900
|
@config_service_stub.call_rpc :list_exclusions, request, options: options do |response, operation|
|
@@ -1622,6 +1942,21 @@ module Google
|
|
1622
1942
|
#
|
1623
1943
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1624
1944
|
#
|
1945
|
+
# @example Basic example
|
1946
|
+
# require "google/cloud/logging/v2"
|
1947
|
+
#
|
1948
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1949
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
1950
|
+
#
|
1951
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1952
|
+
# request = Google::Cloud::Logging::V2::GetExclusionRequest.new
|
1953
|
+
#
|
1954
|
+
# # Call the get_exclusion method.
|
1955
|
+
# result = client.get_exclusion request
|
1956
|
+
#
|
1957
|
+
# # The returned object is of type Google::Cloud::Logging::V2::LogExclusion.
|
1958
|
+
# p result
|
1959
|
+
#
|
1625
1960
|
def get_exclusion request, options = nil
|
1626
1961
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1627
1962
|
|
@@ -1639,16 +1974,20 @@ module Google
|
|
1639
1974
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
1640
1975
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1641
1976
|
|
1642
|
-
header_params = {
|
1643
|
-
|
1644
|
-
|
1977
|
+
header_params = {}
|
1978
|
+
if request.name
|
1979
|
+
header_params["name"] = request.name
|
1980
|
+
end
|
1981
|
+
|
1645
1982
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1646
1983
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1647
1984
|
|
1648
1985
|
options.apply_defaults timeout: @config.rpcs.get_exclusion.timeout,
|
1649
1986
|
metadata: metadata,
|
1650
1987
|
retry_policy: @config.rpcs.get_exclusion.retry_policy
|
1651
|
-
|
1988
|
+
|
1989
|
+
options.apply_defaults timeout: @config.timeout,
|
1990
|
+
metadata: @config.metadata,
|
1652
1991
|
retry_policy: @config.retry_policy
|
1653
1992
|
|
1654
1993
|
@config_service_stub.call_rpc :get_exclusion, request, options: options do |response, operation|
|
@@ -1700,6 +2039,21 @@ module Google
|
|
1700
2039
|
#
|
1701
2040
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1702
2041
|
#
|
2042
|
+
# @example Basic example
|
2043
|
+
# require "google/cloud/logging/v2"
|
2044
|
+
#
|
2045
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2046
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
2047
|
+
#
|
2048
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2049
|
+
# request = Google::Cloud::Logging::V2::CreateExclusionRequest.new
|
2050
|
+
#
|
2051
|
+
# # Call the create_exclusion method.
|
2052
|
+
# result = client.create_exclusion request
|
2053
|
+
#
|
2054
|
+
# # The returned object is of type Google::Cloud::Logging::V2::LogExclusion.
|
2055
|
+
# p result
|
2056
|
+
#
|
1703
2057
|
def create_exclusion request, options = nil
|
1704
2058
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1705
2059
|
|
@@ -1717,16 +2071,20 @@ module Google
|
|
1717
2071
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
1718
2072
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1719
2073
|
|
1720
|
-
header_params = {
|
1721
|
-
|
1722
|
-
|
2074
|
+
header_params = {}
|
2075
|
+
if request.parent
|
2076
|
+
header_params["parent"] = request.parent
|
2077
|
+
end
|
2078
|
+
|
1723
2079
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1724
2080
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1725
2081
|
|
1726
2082
|
options.apply_defaults timeout: @config.rpcs.create_exclusion.timeout,
|
1727
2083
|
metadata: metadata,
|
1728
2084
|
retry_policy: @config.rpcs.create_exclusion.retry_policy
|
1729
|
-
|
2085
|
+
|
2086
|
+
options.apply_defaults timeout: @config.timeout,
|
2087
|
+
metadata: @config.metadata,
|
1730
2088
|
retry_policy: @config.retry_policy
|
1731
2089
|
|
1732
2090
|
@config_service_stub.call_rpc :create_exclusion, request, options: options do |response, operation|
|
@@ -1784,6 +2142,21 @@ module Google
|
|
1784
2142
|
#
|
1785
2143
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1786
2144
|
#
|
2145
|
+
# @example Basic example
|
2146
|
+
# require "google/cloud/logging/v2"
|
2147
|
+
#
|
2148
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2149
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
2150
|
+
#
|
2151
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2152
|
+
# request = Google::Cloud::Logging::V2::UpdateExclusionRequest.new
|
2153
|
+
#
|
2154
|
+
# # Call the update_exclusion method.
|
2155
|
+
# result = client.update_exclusion request
|
2156
|
+
#
|
2157
|
+
# # The returned object is of type Google::Cloud::Logging::V2::LogExclusion.
|
2158
|
+
# p result
|
2159
|
+
#
|
1787
2160
|
def update_exclusion request, options = nil
|
1788
2161
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1789
2162
|
|
@@ -1801,16 +2174,20 @@ module Google
|
|
1801
2174
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
1802
2175
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1803
2176
|
|
1804
|
-
header_params = {
|
1805
|
-
|
1806
|
-
|
2177
|
+
header_params = {}
|
2178
|
+
if request.name
|
2179
|
+
header_params["name"] = request.name
|
2180
|
+
end
|
2181
|
+
|
1807
2182
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1808
2183
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1809
2184
|
|
1810
2185
|
options.apply_defaults timeout: @config.rpcs.update_exclusion.timeout,
|
1811
2186
|
metadata: metadata,
|
1812
2187
|
retry_policy: @config.rpcs.update_exclusion.retry_policy
|
1813
|
-
|
2188
|
+
|
2189
|
+
options.apply_defaults timeout: @config.timeout,
|
2190
|
+
metadata: @config.metadata,
|
1814
2191
|
retry_policy: @config.retry_policy
|
1815
2192
|
|
1816
2193
|
@config_service_stub.call_rpc :update_exclusion, request, options: options do |response, operation|
|
@@ -1857,6 +2234,21 @@ module Google
|
|
1857
2234
|
#
|
1858
2235
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1859
2236
|
#
|
2237
|
+
# @example Basic example
|
2238
|
+
# require "google/cloud/logging/v2"
|
2239
|
+
#
|
2240
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2241
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
2242
|
+
#
|
2243
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2244
|
+
# request = Google::Cloud::Logging::V2::DeleteExclusionRequest.new
|
2245
|
+
#
|
2246
|
+
# # Call the delete_exclusion method.
|
2247
|
+
# result = client.delete_exclusion request
|
2248
|
+
#
|
2249
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
2250
|
+
# p result
|
2251
|
+
#
|
1860
2252
|
def delete_exclusion request, options = nil
|
1861
2253
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1862
2254
|
|
@@ -1874,16 +2266,20 @@ module Google
|
|
1874
2266
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
1875
2267
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1876
2268
|
|
1877
|
-
header_params = {
|
1878
|
-
|
1879
|
-
|
2269
|
+
header_params = {}
|
2270
|
+
if request.name
|
2271
|
+
header_params["name"] = request.name
|
2272
|
+
end
|
2273
|
+
|
1880
2274
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1881
2275
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1882
2276
|
|
1883
2277
|
options.apply_defaults timeout: @config.rpcs.delete_exclusion.timeout,
|
1884
2278
|
metadata: metadata,
|
1885
2279
|
retry_policy: @config.rpcs.delete_exclusion.retry_policy
|
1886
|
-
|
2280
|
+
|
2281
|
+
options.apply_defaults timeout: @config.timeout,
|
2282
|
+
metadata: @config.metadata,
|
1887
2283
|
retry_policy: @config.retry_policy
|
1888
2284
|
|
1889
2285
|
@config_service_stub.call_rpc :delete_exclusion, request, options: options do |response, operation|
|
@@ -1942,6 +2338,21 @@ module Google
|
|
1942
2338
|
#
|
1943
2339
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1944
2340
|
#
|
2341
|
+
# @example Basic example
|
2342
|
+
# require "google/cloud/logging/v2"
|
2343
|
+
#
|
2344
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2345
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
2346
|
+
#
|
2347
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2348
|
+
# request = Google::Cloud::Logging::V2::GetCmekSettingsRequest.new
|
2349
|
+
#
|
2350
|
+
# # Call the get_cmek_settings method.
|
2351
|
+
# result = client.get_cmek_settings request
|
2352
|
+
#
|
2353
|
+
# # The returned object is of type Google::Cloud::Logging::V2::CmekSettings.
|
2354
|
+
# p result
|
2355
|
+
#
|
1945
2356
|
def get_cmek_settings request, options = nil
|
1946
2357
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1947
2358
|
|
@@ -1959,16 +2370,20 @@ module Google
|
|
1959
2370
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
1960
2371
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1961
2372
|
|
1962
|
-
header_params = {
|
1963
|
-
|
1964
|
-
|
2373
|
+
header_params = {}
|
2374
|
+
if request.name
|
2375
|
+
header_params["name"] = request.name
|
2376
|
+
end
|
2377
|
+
|
1965
2378
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1966
2379
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1967
2380
|
|
1968
2381
|
options.apply_defaults timeout: @config.rpcs.get_cmek_settings.timeout,
|
1969
2382
|
metadata: metadata,
|
1970
2383
|
retry_policy: @config.rpcs.get_cmek_settings.retry_policy
|
1971
|
-
|
2384
|
+
|
2385
|
+
options.apply_defaults timeout: @config.timeout,
|
2386
|
+
metadata: @config.metadata,
|
1972
2387
|
retry_policy: @config.retry_policy
|
1973
2388
|
|
1974
2389
|
@config_service_stub.call_rpc :get_cmek_settings, request, options: options do |response, operation|
|
@@ -2047,6 +2462,21 @@ module Google
|
|
2047
2462
|
#
|
2048
2463
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2049
2464
|
#
|
2465
|
+
# @example Basic example
|
2466
|
+
# require "google/cloud/logging/v2"
|
2467
|
+
#
|
2468
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2469
|
+
# client = Google::Cloud::Logging::V2::ConfigService::Client.new
|
2470
|
+
#
|
2471
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2472
|
+
# request = Google::Cloud::Logging::V2::UpdateCmekSettingsRequest.new
|
2473
|
+
#
|
2474
|
+
# # Call the update_cmek_settings method.
|
2475
|
+
# result = client.update_cmek_settings request
|
2476
|
+
#
|
2477
|
+
# # The returned object is of type Google::Cloud::Logging::V2::CmekSettings.
|
2478
|
+
# p result
|
2479
|
+
#
|
2050
2480
|
def update_cmek_settings request, options = nil
|
2051
2481
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2052
2482
|
|
@@ -2064,16 +2494,20 @@ module Google
|
|
2064
2494
|
gapic_version: ::Google::Cloud::Logging::V2::VERSION
|
2065
2495
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2066
2496
|
|
2067
|
-
header_params = {
|
2068
|
-
|
2069
|
-
|
2497
|
+
header_params = {}
|
2498
|
+
if request.name
|
2499
|
+
header_params["name"] = request.name
|
2500
|
+
end
|
2501
|
+
|
2070
2502
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2071
2503
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2072
2504
|
|
2073
2505
|
options.apply_defaults timeout: @config.rpcs.update_cmek_settings.timeout,
|
2074
2506
|
metadata: metadata,
|
2075
2507
|
retry_policy: @config.rpcs.update_cmek_settings.retry_policy
|
2076
|
-
|
2508
|
+
|
2509
|
+
options.apply_defaults timeout: @config.timeout,
|
2510
|
+
metadata: @config.metadata,
|
2077
2511
|
retry_policy: @config.retry_policy
|
2078
2512
|
|
2079
2513
|
@config_service_stub.call_rpc :update_cmek_settings, request, options: options do |response, operation|
|
@@ -2097,22 +2531,21 @@ module Google
|
|
2097
2531
|
# Configuration can be applied globally to all clients, or to a single client
|
2098
2532
|
# on construction.
|
2099
2533
|
#
|
2100
|
-
#
|
2101
|
-
#
|
2102
|
-
#
|
2103
|
-
# to 20 seconds,
|
2104
|
-
#
|
2105
|
-
#
|
2106
|
-
#
|
2107
|
-
#
|
2108
|
-
#
|
2109
|
-
#
|
2110
|
-
#
|
2111
|
-
#
|
2112
|
-
#
|
2113
|
-
#
|
2114
|
-
#
|
2115
|
-
# end
|
2534
|
+
# @example
|
2535
|
+
#
|
2536
|
+
# # Modify the global config, setting the timeout for
|
2537
|
+
# # list_buckets to 20 seconds,
|
2538
|
+
# # and all remaining timeouts to 10 seconds.
|
2539
|
+
# ::Google::Cloud::Logging::V2::ConfigService::Client.configure do |config|
|
2540
|
+
# config.timeout = 10.0
|
2541
|
+
# config.rpcs.list_buckets.timeout = 20.0
|
2542
|
+
# end
|
2543
|
+
#
|
2544
|
+
# # Apply the above configuration only to a new client.
|
2545
|
+
# client = ::Google::Cloud::Logging::V2::ConfigService::Client.new do |config|
|
2546
|
+
# config.timeout = 10.0
|
2547
|
+
# config.rpcs.list_buckets.timeout = 20.0
|
2548
|
+
# end
|
2116
2549
|
#
|
2117
2550
|
# @!attribute [rw] endpoint
|
2118
2551
|
# The hostname or hostname:port of the service endpoint.
|