google-cloud-secret_manager-v1beta2 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/client.rb +63 -31
- data/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/client.rb +63 -31
- data/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/service_stub.rb +134 -92
- data/lib/google/cloud/secret_manager/v1beta2/version.rb +1 -1
- data/proto_docs/google/api/client.rb +70 -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: 4aadb91d4e4ab3fbf9d0d23a630a4de353dc37258b4b2fde3034f4470333fd72
|
4
|
+
data.tar.gz: fa391bb06bc75e157637cdbbd4c3367b8979484a7eee0663993b22d8d23a74b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ba98fae6635a5509591931a95f5f16e0de3016e13aa31c33a0b49863493c0d8dbcbfa85c7c75dac4ce812799be443ec500b8ae739964c4027c5427c793d5c04
|
7
|
+
data.tar.gz: 3aa8a718f6eeec96deb11ec4441f563dc0c0ea481e7e13ef6fc20eafd0d6b66160cf285ce3421810cee34b1a4e6ccab418863defc8806bd802a38f9851086d8c
|
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/v1beta2"
|
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::V1beta2::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).
|
@@ -37,6 +37,9 @@ module Google
|
|
37
37
|
# * {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}
|
38
38
|
#
|
39
39
|
class Client
|
40
|
+
# @private
|
41
|
+
API_VERSION = ""
|
42
|
+
|
40
43
|
# @private
|
41
44
|
DEFAULT_ENDPOINT_TEMPLATE = "secretmanager.$UNIVERSE_DOMAIN$"
|
42
45
|
|
@@ -194,14 +197,26 @@ module Google
|
|
194
197
|
universe_domain: @config.universe_domain,
|
195
198
|
channel_args: @config.channel_args,
|
196
199
|
interceptors: @config.interceptors,
|
197
|
-
channel_pool_config: @config.channel_pool
|
200
|
+
channel_pool_config: @config.channel_pool,
|
201
|
+
logger: @config.logger
|
198
202
|
)
|
199
203
|
|
204
|
+
@secret_manager_service_stub.stub_logger&.info do |entry|
|
205
|
+
entry.set_system_name
|
206
|
+
entry.set_service
|
207
|
+
entry.message = "Created client for #{entry.service}"
|
208
|
+
entry.set_credentials_fields credentials
|
209
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
210
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
211
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
212
|
+
end
|
213
|
+
|
200
214
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
201
215
|
config.credentials = credentials
|
202
216
|
config.quota_project = @quota_project_id
|
203
217
|
config.endpoint = @secret_manager_service_stub.endpoint
|
204
218
|
config.universe_domain = @secret_manager_service_stub.universe_domain
|
219
|
+
config.logger = @secret_manager_service_stub.logger if config.respond_to? :logger=
|
205
220
|
end
|
206
221
|
end
|
207
222
|
|
@@ -212,6 +227,15 @@ module Google
|
|
212
227
|
#
|
213
228
|
attr_reader :location_client
|
214
229
|
|
230
|
+
##
|
231
|
+
# The logger used for request/response debug logging.
|
232
|
+
#
|
233
|
+
# @return [Logger]
|
234
|
+
#
|
235
|
+
def logger
|
236
|
+
@secret_manager_service_stub.logger
|
237
|
+
end
|
238
|
+
|
215
239
|
# Service calls
|
216
240
|
|
217
241
|
##
|
@@ -288,10 +312,11 @@ module Google
|
|
288
312
|
# Customize the options with defaults
|
289
313
|
metadata = @config.rpcs.list_secrets.metadata.to_h
|
290
314
|
|
291
|
-
# Set x-goog-api-client
|
315
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
292
316
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
293
317
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
294
318
|
gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION
|
319
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
295
320
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
296
321
|
|
297
322
|
header_params = {}
|
@@ -313,7 +338,7 @@ module Google
|
|
313
338
|
@secret_manager_service_stub.call_rpc :list_secrets, request, options: options do |response, operation|
|
314
339
|
response = ::Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secrets, request, response, operation, options
|
315
340
|
yield response, operation if block_given?
|
316
|
-
|
341
|
+
throw :response, response
|
317
342
|
end
|
318
343
|
rescue ::GRPC::BadStatus => e
|
319
344
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -387,10 +412,11 @@ module Google
|
|
387
412
|
# Customize the options with defaults
|
388
413
|
metadata = @config.rpcs.create_secret.metadata.to_h
|
389
414
|
|
390
|
-
# Set x-goog-api-client
|
415
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
391
416
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
392
417
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
393
418
|
gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION
|
419
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
394
420
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
395
421
|
|
396
422
|
header_params = {}
|
@@ -411,7 +437,6 @@ module Google
|
|
411
437
|
|
412
438
|
@secret_manager_service_stub.call_rpc :create_secret, request, options: options do |response, operation|
|
413
439
|
yield response, operation if block_given?
|
414
|
-
return response
|
415
440
|
end
|
416
441
|
rescue ::GRPC::BadStatus => e
|
417
442
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -481,10 +506,11 @@ module Google
|
|
481
506
|
# Customize the options with defaults
|
482
507
|
metadata = @config.rpcs.add_secret_version.metadata.to_h
|
483
508
|
|
484
|
-
# Set x-goog-api-client
|
509
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
485
510
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
486
511
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
487
512
|
gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION
|
513
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
488
514
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
489
515
|
|
490
516
|
header_params = {}
|
@@ -505,7 +531,6 @@ module Google
|
|
505
531
|
|
506
532
|
@secret_manager_service_stub.call_rpc :add_secret_version, request, options: options do |response, operation|
|
507
533
|
yield response, operation if block_given?
|
508
|
-
return response
|
509
534
|
end
|
510
535
|
rescue ::GRPC::BadStatus => e
|
511
536
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -569,10 +594,11 @@ module Google
|
|
569
594
|
# Customize the options with defaults
|
570
595
|
metadata = @config.rpcs.get_secret.metadata.to_h
|
571
596
|
|
572
|
-
# Set x-goog-api-client
|
597
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
573
598
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
574
599
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
575
600
|
gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION
|
601
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
576
602
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
577
603
|
|
578
604
|
header_params = {}
|
@@ -593,7 +619,6 @@ module Google
|
|
593
619
|
|
594
620
|
@secret_manager_service_stub.call_rpc :get_secret, request, options: options do |response, operation|
|
595
621
|
yield response, operation if block_given?
|
596
|
-
return response
|
597
622
|
end
|
598
623
|
rescue ::GRPC::BadStatus => e
|
599
624
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -658,10 +683,11 @@ module Google
|
|
658
683
|
# Customize the options with defaults
|
659
684
|
metadata = @config.rpcs.update_secret.metadata.to_h
|
660
685
|
|
661
|
-
# Set x-goog-api-client
|
686
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
662
687
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
663
688
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
664
689
|
gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION
|
690
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
665
691
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
666
692
|
|
667
693
|
header_params = {}
|
@@ -682,7 +708,6 @@ module Google
|
|
682
708
|
|
683
709
|
@secret_manager_service_stub.call_rpc :update_secret, request, options: options do |response, operation|
|
684
710
|
yield response, operation if block_given?
|
685
|
-
return response
|
686
711
|
end
|
687
712
|
rescue ::GRPC::BadStatus => e
|
688
713
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -749,10 +774,11 @@ module Google
|
|
749
774
|
# Customize the options with defaults
|
750
775
|
metadata = @config.rpcs.delete_secret.metadata.to_h
|
751
776
|
|
752
|
-
# Set x-goog-api-client
|
777
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
753
778
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
754
779
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
755
780
|
gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION
|
781
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
756
782
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
757
783
|
|
758
784
|
header_params = {}
|
@@ -773,7 +799,6 @@ module Google
|
|
773
799
|
|
774
800
|
@secret_manager_service_stub.call_rpc :delete_secret, request, options: options do |response, operation|
|
775
801
|
yield response, operation if block_given?
|
776
|
-
return response
|
777
802
|
end
|
778
803
|
rescue ::GRPC::BadStatus => e
|
779
804
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -855,10 +880,11 @@ module Google
|
|
855
880
|
# Customize the options with defaults
|
856
881
|
metadata = @config.rpcs.list_secret_versions.metadata.to_h
|
857
882
|
|
858
|
-
# Set x-goog-api-client
|
883
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
859
884
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
860
885
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
861
886
|
gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION
|
887
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
862
888
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
863
889
|
|
864
890
|
header_params = {}
|
@@ -880,7 +906,7 @@ module Google
|
|
880
906
|
@secret_manager_service_stub.call_rpc :list_secret_versions, request, options: options do |response, operation|
|
881
907
|
response = ::Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secret_versions, request, response, operation, options
|
882
908
|
yield response, operation if block_given?
|
883
|
-
|
909
|
+
throw :response, response
|
884
910
|
end
|
885
911
|
rescue ::GRPC::BadStatus => e
|
886
912
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -953,10 +979,11 @@ module Google
|
|
953
979
|
# Customize the options with defaults
|
954
980
|
metadata = @config.rpcs.get_secret_version.metadata.to_h
|
955
981
|
|
956
|
-
# Set x-goog-api-client
|
982
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
957
983
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
958
984
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
959
985
|
gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION
|
986
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
960
987
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
961
988
|
|
962
989
|
header_params = {}
|
@@ -977,7 +1004,6 @@ module Google
|
|
977
1004
|
|
978
1005
|
@secret_manager_service_stub.call_rpc :get_secret_version, request, options: options do |response, operation|
|
979
1006
|
yield response, operation if block_given?
|
980
|
-
return response
|
981
1007
|
end
|
982
1008
|
rescue ::GRPC::BadStatus => e
|
983
1009
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1051,10 +1077,11 @@ module Google
|
|
1051
1077
|
# Customize the options with defaults
|
1052
1078
|
metadata = @config.rpcs.access_secret_version.metadata.to_h
|
1053
1079
|
|
1054
|
-
# Set x-goog-api-client
|
1080
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1055
1081
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1056
1082
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1057
1083
|
gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION
|
1084
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1058
1085
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1059
1086
|
|
1060
1087
|
header_params = {}
|
@@ -1075,7 +1102,6 @@ module Google
|
|
1075
1102
|
|
1076
1103
|
@secret_manager_service_stub.call_rpc :access_secret_version, request, options: options do |response, operation|
|
1077
1104
|
yield response, operation if block_given?
|
1078
|
-
return response
|
1079
1105
|
end
|
1080
1106
|
rescue ::GRPC::BadStatus => e
|
1081
1107
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1149,10 +1175,11 @@ module Google
|
|
1149
1175
|
# Customize the options with defaults
|
1150
1176
|
metadata = @config.rpcs.disable_secret_version.metadata.to_h
|
1151
1177
|
|
1152
|
-
# Set x-goog-api-client
|
1178
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1153
1179
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1154
1180
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1155
1181
|
gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION
|
1182
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1156
1183
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1157
1184
|
|
1158
1185
|
header_params = {}
|
@@ -1173,7 +1200,6 @@ module Google
|
|
1173
1200
|
|
1174
1201
|
@secret_manager_service_stub.call_rpc :disable_secret_version, request, options: options do |response, operation|
|
1175
1202
|
yield response, operation if block_given?
|
1176
|
-
return response
|
1177
1203
|
end
|
1178
1204
|
rescue ::GRPC::BadStatus => e
|
1179
1205
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1247,10 +1273,11 @@ module Google
|
|
1247
1273
|
# Customize the options with defaults
|
1248
1274
|
metadata = @config.rpcs.enable_secret_version.metadata.to_h
|
1249
1275
|
|
1250
|
-
# Set x-goog-api-client
|
1276
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1251
1277
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1252
1278
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1253
1279
|
gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION
|
1280
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1254
1281
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1255
1282
|
|
1256
1283
|
header_params = {}
|
@@ -1271,7 +1298,6 @@ module Google
|
|
1271
1298
|
|
1272
1299
|
@secret_manager_service_stub.call_rpc :enable_secret_version, request, options: options do |response, operation|
|
1273
1300
|
yield response, operation if block_given?
|
1274
|
-
return response
|
1275
1301
|
end
|
1276
1302
|
rescue ::GRPC::BadStatus => e
|
1277
1303
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1346,10 +1372,11 @@ module Google
|
|
1346
1372
|
# Customize the options with defaults
|
1347
1373
|
metadata = @config.rpcs.destroy_secret_version.metadata.to_h
|
1348
1374
|
|
1349
|
-
# Set x-goog-api-client
|
1375
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1350
1376
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1351
1377
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1352
1378
|
gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION
|
1379
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1353
1380
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1354
1381
|
|
1355
1382
|
header_params = {}
|
@@ -1370,7 +1397,6 @@ module Google
|
|
1370
1397
|
|
1371
1398
|
@secret_manager_service_stub.call_rpc :destroy_secret_version, request, options: options do |response, operation|
|
1372
1399
|
yield response, operation if block_given?
|
1373
|
-
return response
|
1374
1400
|
end
|
1375
1401
|
rescue ::GRPC::BadStatus => e
|
1376
1402
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1449,10 +1475,11 @@ module Google
|
|
1449
1475
|
# Customize the options with defaults
|
1450
1476
|
metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
1451
1477
|
|
1452
|
-
# Set x-goog-api-client
|
1478
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1453
1479
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1454
1480
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1455
1481
|
gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION
|
1482
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1456
1483
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1457
1484
|
|
1458
1485
|
header_params = {}
|
@@ -1473,7 +1500,6 @@ module Google
|
|
1473
1500
|
|
1474
1501
|
@secret_manager_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
1475
1502
|
yield response, operation if block_given?
|
1476
|
-
return response
|
1477
1503
|
end
|
1478
1504
|
rescue ::GRPC::BadStatus => e
|
1479
1505
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1539,10 +1565,11 @@ module Google
|
|
1539
1565
|
# Customize the options with defaults
|
1540
1566
|
metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
1541
1567
|
|
1542
|
-
# Set x-goog-api-client
|
1568
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1543
1569
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1544
1570
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1545
1571
|
gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION
|
1572
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1546
1573
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1547
1574
|
|
1548
1575
|
header_params = {}
|
@@ -1563,7 +1590,6 @@ module Google
|
|
1563
1590
|
|
1564
1591
|
@secret_manager_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
1565
1592
|
yield response, operation if block_given?
|
1566
|
-
return response
|
1567
1593
|
end
|
1568
1594
|
rescue ::GRPC::BadStatus => e
|
1569
1595
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1636,10 +1662,11 @@ module Google
|
|
1636
1662
|
# Customize the options with defaults
|
1637
1663
|
metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
1638
1664
|
|
1639
|
-
# Set x-goog-api-client
|
1665
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1640
1666
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1641
1667
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1642
1668
|
gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION
|
1669
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1643
1670
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1644
1671
|
|
1645
1672
|
header_params = {}
|
@@ -1660,7 +1687,6 @@ module Google
|
|
1660
1687
|
|
1661
1688
|
@secret_manager_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
1662
1689
|
yield response, operation if block_given?
|
1663
|
-
return response
|
1664
1690
|
end
|
1665
1691
|
rescue ::GRPC::BadStatus => e
|
1666
1692
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1749,6 +1775,11 @@ module Google
|
|
1749
1775
|
# default endpoint URL. The default value of nil uses the environment
|
1750
1776
|
# universe (usually the default "googleapis.com" universe).
|
1751
1777
|
# @return [::String,nil]
|
1778
|
+
# @!attribute [rw] logger
|
1779
|
+
# A custom logger to use for request/response debug logging, or the value
|
1780
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1781
|
+
# explicitly disable logging.
|
1782
|
+
# @return [::Logger,:default,nil]
|
1752
1783
|
#
|
1753
1784
|
class Configuration
|
1754
1785
|
extend ::Gapic::Config
|
@@ -1773,6 +1804,7 @@ module Google
|
|
1773
1804
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1774
1805
|
config_attr :quota_project, nil, ::String, nil
|
1775
1806
|
config_attr :universe_domain, nil, ::String, nil
|
1807
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1776
1808
|
|
1777
1809
|
# @private
|
1778
1810
|
def initialize parent_config = nil
|