google-cloud-secret_manager-v1beta1 0.15.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/client.rb +62 -31
- data/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/client.rb +62 -31
- data/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/service_stub.rb +134 -92
- data/lib/google/cloud/secret_manager/v1beta1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +74 -10
- data/proto_docs/google/api/resource.rb +7 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8fd3620add37cea2fd9df86984a15d2a7a4cf864a3173615dc0d9acda89d495
|
4
|
+
data.tar.gz: afa6a4c3bc9ee0f939a7c514fa7e48060673d8f62f2def1abf49c526e6f4f6bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3f8b725ed5c524f4d2a912ac3b87f65dfbfa85c502e0ce8ac7f551e5970891062457b0de69e34123c13df5b6a0bef69b755d736cfe5df1e577d4913aba1a726
|
7
|
+
data.tar.gz: 4c79b50f1c02a1b016a9324886559d0fc11bde5f6e1c531ed425229c48ea5a32a4c650e07b5b77dcda6fcd3f66bc03865f73143aa9a7b9a2f761c6ed0836b99c
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/secret-manager)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
You can customize logging by modifying the `logger` configuration when
|
72
|
+
constructing a client object. For example:
|
55
73
|
|
56
74
|
```ruby
|
75
|
+
require "google/cloud/secret_manager/v1beta1"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
78
|
+
client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config|
|
79
|
+
config.logger = Logger.new "my-app.log"
|
69
80
|
end
|
70
81
|
```
|
71
82
|
|
72
|
-
|
73
83
|
## Google Cloud Samples
|
74
84
|
|
75
85
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
@@ -36,6 +36,9 @@ module Google
|
|
36
36
|
# * {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}
|
37
37
|
#
|
38
38
|
class Client
|
39
|
+
# @private
|
40
|
+
API_VERSION = ""
|
41
|
+
|
39
42
|
# @private
|
40
43
|
DEFAULT_ENDPOINT_TEMPLATE = "secretmanager.$UNIVERSE_DOMAIN$"
|
41
44
|
|
@@ -193,8 +196,28 @@ module Google
|
|
193
196
|
universe_domain: @config.universe_domain,
|
194
197
|
channel_args: @config.channel_args,
|
195
198
|
interceptors: @config.interceptors,
|
196
|
-
channel_pool_config: @config.channel_pool
|
199
|
+
channel_pool_config: @config.channel_pool,
|
200
|
+
logger: @config.logger
|
197
201
|
)
|
202
|
+
|
203
|
+
@secret_manager_service_stub.stub_logger&.info do |entry|
|
204
|
+
entry.set_system_name
|
205
|
+
entry.set_service
|
206
|
+
entry.message = "Created client for #{entry.service}"
|
207
|
+
entry.set_credentials_fields credentials
|
208
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
209
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
210
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
##
|
215
|
+
# The logger used for request/response debug logging.
|
216
|
+
#
|
217
|
+
# @return [Logger]
|
218
|
+
#
|
219
|
+
def logger
|
220
|
+
@secret_manager_service_stub.logger
|
198
221
|
end
|
199
222
|
|
200
223
|
# Service calls
|
@@ -266,10 +289,11 @@ module Google
|
|
266
289
|
# Customize the options with defaults
|
267
290
|
metadata = @config.rpcs.list_secrets.metadata.to_h
|
268
291
|
|
269
|
-
# Set x-goog-api-client
|
292
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
270
293
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
271
294
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
272
295
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
296
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
273
297
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
274
298
|
|
275
299
|
header_params = {}
|
@@ -291,7 +315,7 @@ module Google
|
|
291
315
|
@secret_manager_service_stub.call_rpc :list_secrets, request, options: options do |response, operation|
|
292
316
|
response = ::Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secrets, request, response, operation, options
|
293
317
|
yield response, operation if block_given?
|
294
|
-
|
318
|
+
throw :response, response
|
295
319
|
end
|
296
320
|
rescue ::GRPC::BadStatus => e
|
297
321
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -361,10 +385,11 @@ module Google
|
|
361
385
|
# Customize the options with defaults
|
362
386
|
metadata = @config.rpcs.create_secret.metadata.to_h
|
363
387
|
|
364
|
-
# Set x-goog-api-client
|
388
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
365
389
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
366
390
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
367
391
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
392
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
368
393
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
369
394
|
|
370
395
|
header_params = {}
|
@@ -385,7 +410,6 @@ module Google
|
|
385
410
|
|
386
411
|
@secret_manager_service_stub.call_rpc :create_secret, request, options: options do |response, operation|
|
387
412
|
yield response, operation if block_given?
|
388
|
-
return response
|
389
413
|
end
|
390
414
|
rescue ::GRPC::BadStatus => e
|
391
415
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -450,10 +474,11 @@ module Google
|
|
450
474
|
# Customize the options with defaults
|
451
475
|
metadata = @config.rpcs.add_secret_version.metadata.to_h
|
452
476
|
|
453
|
-
# Set x-goog-api-client
|
477
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
454
478
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
455
479
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
456
480
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
481
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
457
482
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
458
483
|
|
459
484
|
header_params = {}
|
@@ -474,7 +499,6 @@ module Google
|
|
474
499
|
|
475
500
|
@secret_manager_service_stub.call_rpc :add_secret_version, request, options: options do |response, operation|
|
476
501
|
yield response, operation if block_given?
|
477
|
-
return response
|
478
502
|
end
|
479
503
|
rescue ::GRPC::BadStatus => e
|
480
504
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -535,10 +559,11 @@ module Google
|
|
535
559
|
# Customize the options with defaults
|
536
560
|
metadata = @config.rpcs.get_secret.metadata.to_h
|
537
561
|
|
538
|
-
# Set x-goog-api-client
|
562
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
539
563
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
540
564
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
541
565
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
566
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
542
567
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
543
568
|
|
544
569
|
header_params = {}
|
@@ -559,7 +584,6 @@ module Google
|
|
559
584
|
|
560
585
|
@secret_manager_service_stub.call_rpc :get_secret, request, options: options do |response, operation|
|
561
586
|
yield response, operation if block_given?
|
562
|
-
return response
|
563
587
|
end
|
564
588
|
rescue ::GRPC::BadStatus => e
|
565
589
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -622,10 +646,11 @@ module Google
|
|
622
646
|
# Customize the options with defaults
|
623
647
|
metadata = @config.rpcs.update_secret.metadata.to_h
|
624
648
|
|
625
|
-
# Set x-goog-api-client
|
649
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
626
650
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
627
651
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
628
652
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
653
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
629
654
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
630
655
|
|
631
656
|
header_params = {}
|
@@ -646,7 +671,6 @@ module Google
|
|
646
671
|
|
647
672
|
@secret_manager_service_stub.call_rpc :update_secret, request, options: options do |response, operation|
|
648
673
|
yield response, operation if block_given?
|
649
|
-
return response
|
650
674
|
end
|
651
675
|
rescue ::GRPC::BadStatus => e
|
652
676
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -708,10 +732,11 @@ module Google
|
|
708
732
|
# Customize the options with defaults
|
709
733
|
metadata = @config.rpcs.delete_secret.metadata.to_h
|
710
734
|
|
711
|
-
# Set x-goog-api-client
|
735
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
712
736
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
713
737
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
714
738
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
739
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
715
740
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
716
741
|
|
717
742
|
header_params = {}
|
@@ -732,7 +757,6 @@ module Google
|
|
732
757
|
|
733
758
|
@secret_manager_service_stub.call_rpc :delete_secret, request, options: options do |response, operation|
|
734
759
|
yield response, operation if block_given?
|
735
|
-
return response
|
736
760
|
end
|
737
761
|
rescue ::GRPC::BadStatus => e
|
738
762
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -807,10 +831,11 @@ module Google
|
|
807
831
|
# Customize the options with defaults
|
808
832
|
metadata = @config.rpcs.list_secret_versions.metadata.to_h
|
809
833
|
|
810
|
-
# Set x-goog-api-client
|
834
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
811
835
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
812
836
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
813
837
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
838
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
814
839
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
815
840
|
|
816
841
|
header_params = {}
|
@@ -832,7 +857,7 @@ module Google
|
|
832
857
|
@secret_manager_service_stub.call_rpc :list_secret_versions, request, options: options do |response, operation|
|
833
858
|
response = ::Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secret_versions, request, response, operation, options
|
834
859
|
yield response, operation if block_given?
|
835
|
-
|
860
|
+
throw :response, response
|
836
861
|
end
|
837
862
|
rescue ::GRPC::BadStatus => e
|
838
863
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -899,10 +924,11 @@ module Google
|
|
899
924
|
# Customize the options with defaults
|
900
925
|
metadata = @config.rpcs.get_secret_version.metadata.to_h
|
901
926
|
|
902
|
-
# Set x-goog-api-client
|
927
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
903
928
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
904
929
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
905
930
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
931
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
906
932
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
907
933
|
|
908
934
|
header_params = {}
|
@@ -923,7 +949,6 @@ module Google
|
|
923
949
|
|
924
950
|
@secret_manager_service_stub.call_rpc :get_secret_version, request, options: options do |response, operation|
|
925
951
|
yield response, operation if block_given?
|
926
|
-
return response
|
927
952
|
end
|
928
953
|
rescue ::GRPC::BadStatus => e
|
929
954
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -988,10 +1013,11 @@ module Google
|
|
988
1013
|
# Customize the options with defaults
|
989
1014
|
metadata = @config.rpcs.access_secret_version.metadata.to_h
|
990
1015
|
|
991
|
-
# Set x-goog-api-client
|
1016
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
992
1017
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
993
1018
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
994
1019
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
1020
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
995
1021
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
996
1022
|
|
997
1023
|
header_params = {}
|
@@ -1012,7 +1038,6 @@ module Google
|
|
1012
1038
|
|
1013
1039
|
@secret_manager_service_stub.call_rpc :access_secret_version, request, options: options do |response, operation|
|
1014
1040
|
yield response, operation if block_given?
|
1015
|
-
return response
|
1016
1041
|
end
|
1017
1042
|
rescue ::GRPC::BadStatus => e
|
1018
1043
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1077,10 +1102,11 @@ module Google
|
|
1077
1102
|
# Customize the options with defaults
|
1078
1103
|
metadata = @config.rpcs.disable_secret_version.metadata.to_h
|
1079
1104
|
|
1080
|
-
# Set x-goog-api-client
|
1105
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1081
1106
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1082
1107
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1083
1108
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
1109
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1084
1110
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1085
1111
|
|
1086
1112
|
header_params = {}
|
@@ -1101,7 +1127,6 @@ module Google
|
|
1101
1127
|
|
1102
1128
|
@secret_manager_service_stub.call_rpc :disable_secret_version, request, options: options do |response, operation|
|
1103
1129
|
yield response, operation if block_given?
|
1104
|
-
return response
|
1105
1130
|
end
|
1106
1131
|
rescue ::GRPC::BadStatus => e
|
1107
1132
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1166,10 +1191,11 @@ module Google
|
|
1166
1191
|
# Customize the options with defaults
|
1167
1192
|
metadata = @config.rpcs.enable_secret_version.metadata.to_h
|
1168
1193
|
|
1169
|
-
# Set x-goog-api-client
|
1194
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1170
1195
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1171
1196
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1172
1197
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
1198
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1173
1199
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1174
1200
|
|
1175
1201
|
header_params = {}
|
@@ -1190,7 +1216,6 @@ module Google
|
|
1190
1216
|
|
1191
1217
|
@secret_manager_service_stub.call_rpc :enable_secret_version, request, options: options do |response, operation|
|
1192
1218
|
yield response, operation if block_given?
|
1193
|
-
return response
|
1194
1219
|
end
|
1195
1220
|
rescue ::GRPC::BadStatus => e
|
1196
1221
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1256,10 +1281,11 @@ module Google
|
|
1256
1281
|
# Customize the options with defaults
|
1257
1282
|
metadata = @config.rpcs.destroy_secret_version.metadata.to_h
|
1258
1283
|
|
1259
|
-
# Set x-goog-api-client
|
1284
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1260
1285
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1261
1286
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1262
1287
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
1288
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1263
1289
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1264
1290
|
|
1265
1291
|
header_params = {}
|
@@ -1280,7 +1306,6 @@ module Google
|
|
1280
1306
|
|
1281
1307
|
@secret_manager_service_stub.call_rpc :destroy_secret_version, request, options: options do |response, operation|
|
1282
1308
|
yield response, operation if block_given?
|
1283
|
-
return response
|
1284
1309
|
end
|
1285
1310
|
rescue ::GRPC::BadStatus => e
|
1286
1311
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1357,10 +1382,11 @@ module Google
|
|
1357
1382
|
# Customize the options with defaults
|
1358
1383
|
metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
1359
1384
|
|
1360
|
-
# Set x-goog-api-client
|
1385
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1361
1386
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1362
1387
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1363
1388
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
1389
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1364
1390
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1365
1391
|
|
1366
1392
|
header_params = {}
|
@@ -1381,7 +1407,6 @@ module Google
|
|
1381
1407
|
|
1382
1408
|
@secret_manager_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
1383
1409
|
yield response, operation if block_given?
|
1384
|
-
return response
|
1385
1410
|
end
|
1386
1411
|
rescue ::GRPC::BadStatus => e
|
1387
1412
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1447,10 +1472,11 @@ module Google
|
|
1447
1472
|
# Customize the options with defaults
|
1448
1473
|
metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
1449
1474
|
|
1450
|
-
# Set x-goog-api-client
|
1475
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1451
1476
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1452
1477
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1453
1478
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
1479
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1454
1480
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1455
1481
|
|
1456
1482
|
header_params = {}
|
@@ -1471,7 +1497,6 @@ module Google
|
|
1471
1497
|
|
1472
1498
|
@secret_manager_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
1473
1499
|
yield response, operation if block_given?
|
1474
|
-
return response
|
1475
1500
|
end
|
1476
1501
|
rescue ::GRPC::BadStatus => e
|
1477
1502
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1544,10 +1569,11 @@ module Google
|
|
1544
1569
|
# Customize the options with defaults
|
1545
1570
|
metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
1546
1571
|
|
1547
|
-
# Set x-goog-api-client
|
1572
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1548
1573
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1549
1574
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1550
1575
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
1576
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1551
1577
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1552
1578
|
|
1553
1579
|
header_params = {}
|
@@ -1568,7 +1594,6 @@ module Google
|
|
1568
1594
|
|
1569
1595
|
@secret_manager_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
1570
1596
|
yield response, operation if block_given?
|
1571
|
-
return response
|
1572
1597
|
end
|
1573
1598
|
rescue ::GRPC::BadStatus => e
|
1574
1599
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1657,6 +1682,11 @@ module Google
|
|
1657
1682
|
# default endpoint URL. The default value of nil uses the environment
|
1658
1683
|
# universe (usually the default "googleapis.com" universe).
|
1659
1684
|
# @return [::String,nil]
|
1685
|
+
# @!attribute [rw] logger
|
1686
|
+
# A custom logger to use for request/response debug logging, or the value
|
1687
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1688
|
+
# explicitly disable logging.
|
1689
|
+
# @return [::Logger,:default,nil]
|
1660
1690
|
#
|
1661
1691
|
class Configuration
|
1662
1692
|
extend ::Gapic::Config
|
@@ -1681,6 +1711,7 @@ module Google
|
|
1681
1711
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1682
1712
|
config_attr :quota_project, nil, ::String, nil
|
1683
1713
|
config_attr :universe_domain, nil, ::String, nil
|
1714
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1684
1715
|
|
1685
1716
|
# @private
|
1686
1717
|
def initialize parent_config = nil
|