google-cloud-iap-v1 1.0.1 → 1.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 +31 -21
- data/lib/google/cloud/iap/v1/identity_aware_proxy_admin_service/client.rb +35 -11
- data/lib/google/cloud/iap/v1/identity_aware_proxy_admin_service/rest/client.rb +35 -11
- data/lib/google/cloud/iap/v1/identity_aware_proxy_admin_service/rest/service_stub.rb +94 -62
- data/lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/client.rb +35 -9
- data/lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/rest/client.rb +35 -9
- data/lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/rest/service_stub.rb +78 -50
- data/lib/google/cloud/iap/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- metadata +6 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 202a2cf86212bbdddb24d2e0279778a9862e19cefafb4724bad6dc8c47e38e3c
|
|
4
|
+
data.tar.gz: b0d412145b4949dfffd42cb7796e98aefea6d5afa0b5a7ed39db2176855506bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1dec44cedae346b77d270dcf706aba8839295e95c7a85b00cdc48d322aabd245907b55a44cb102910cf275ac1f75cc9e4e4a88d6b58eac572bbea3d830066b50
|
|
7
|
+
data.tar.gz: f1deb1fc05cd0157c81d4d0704a94ba38caac1adbebef7deb843ba6bb890c161600b183487a1282035f3ad56d7a5d0676bf6733aecef5eb6eb56dfbfb5a7dbcb
|
data/README.md
CHANGED
|
@@ -43,40 +43,50 @@ for class and method documentation.
|
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/iap/)
|
|
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/iap/v1"
|
|
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::Iap::V1::IdentityAwareProxyAdminService::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).
|
|
76
86
|
|
|
77
87
|
## Supported Ruby Versions
|
|
78
88
|
|
|
79
|
-
This library is supported on Ruby
|
|
89
|
+
This library is supported on Ruby 3.0+.
|
|
80
90
|
|
|
81
91
|
Google provides official support for Ruby versions that are actively supported
|
|
82
92
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
|
@@ -159,8 +159,28 @@ module Google
|
|
|
159
159
|
universe_domain: @config.universe_domain,
|
|
160
160
|
channel_args: @config.channel_args,
|
|
161
161
|
interceptors: @config.interceptors,
|
|
162
|
-
channel_pool_config: @config.channel_pool
|
|
162
|
+
channel_pool_config: @config.channel_pool,
|
|
163
|
+
logger: @config.logger
|
|
163
164
|
)
|
|
165
|
+
|
|
166
|
+
@identity_aware_proxy_admin_service_stub.stub_logger&.info do |entry|
|
|
167
|
+
entry.set_system_name
|
|
168
|
+
entry.set_service
|
|
169
|
+
entry.message = "Created client for #{entry.service}"
|
|
170
|
+
entry.set_credentials_fields credentials
|
|
171
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
|
172
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
173
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
##
|
|
178
|
+
# The logger used for request/response debug logging.
|
|
179
|
+
#
|
|
180
|
+
# @return [Logger]
|
|
181
|
+
#
|
|
182
|
+
def logger
|
|
183
|
+
@identity_aware_proxy_admin_service_stub.logger
|
|
164
184
|
end
|
|
165
185
|
|
|
166
186
|
# Service calls
|
|
@@ -260,7 +280,6 @@ module Google
|
|
|
260
280
|
|
|
261
281
|
@identity_aware_proxy_admin_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
|
262
282
|
yield response, operation if block_given?
|
|
263
|
-
return response
|
|
264
283
|
end
|
|
265
284
|
rescue ::GRPC::BadStatus => e
|
|
266
285
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -353,7 +372,6 @@ module Google
|
|
|
353
372
|
|
|
354
373
|
@identity_aware_proxy_admin_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
|
355
374
|
yield response, operation if block_given?
|
|
356
|
-
return response
|
|
357
375
|
end
|
|
358
376
|
rescue ::GRPC::BadStatus => e
|
|
359
377
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -448,7 +466,6 @@ module Google
|
|
|
448
466
|
|
|
449
467
|
@identity_aware_proxy_admin_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
|
450
468
|
yield response, operation if block_given?
|
|
451
|
-
return response
|
|
452
469
|
end
|
|
453
470
|
rescue ::GRPC::BadStatus => e
|
|
454
471
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -536,7 +553,6 @@ module Google
|
|
|
536
553
|
|
|
537
554
|
@identity_aware_proxy_admin_service_stub.call_rpc :get_iap_settings, request, options: options do |response, operation|
|
|
538
555
|
yield response, operation if block_given?
|
|
539
|
-
return response
|
|
540
556
|
end
|
|
541
557
|
rescue ::GRPC::BadStatus => e
|
|
542
558
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -632,7 +648,6 @@ module Google
|
|
|
632
648
|
|
|
633
649
|
@identity_aware_proxy_admin_service_stub.call_rpc :update_iap_settings, request, options: options do |response, operation|
|
|
634
650
|
yield response, operation if block_given?
|
|
635
|
-
return response
|
|
636
651
|
end
|
|
637
652
|
rescue ::GRPC::BadStatus => e
|
|
638
653
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -740,7 +755,7 @@ module Google
|
|
|
740
755
|
@identity_aware_proxy_admin_service_stub.call_rpc :list_tunnel_dest_groups, request, options: options do |response, operation|
|
|
741
756
|
response = ::Gapic::PagedEnumerable.new @identity_aware_proxy_admin_service_stub, :list_tunnel_dest_groups, request, response, operation, options
|
|
742
757
|
yield response, operation if block_given?
|
|
743
|
-
|
|
758
|
+
throw :response, response
|
|
744
759
|
end
|
|
745
760
|
rescue ::GRPC::BadStatus => e
|
|
746
761
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -836,7 +851,6 @@ module Google
|
|
|
836
851
|
|
|
837
852
|
@identity_aware_proxy_admin_service_stub.call_rpc :create_tunnel_dest_group, request, options: options do |response, operation|
|
|
838
853
|
yield response, operation if block_given?
|
|
839
|
-
return response
|
|
840
854
|
end
|
|
841
855
|
rescue ::GRPC::BadStatus => e
|
|
842
856
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -924,7 +938,6 @@ module Google
|
|
|
924
938
|
|
|
925
939
|
@identity_aware_proxy_admin_service_stub.call_rpc :get_tunnel_dest_group, request, options: options do |response, operation|
|
|
926
940
|
yield response, operation if block_given?
|
|
927
|
-
return response
|
|
928
941
|
end
|
|
929
942
|
rescue ::GRPC::BadStatus => e
|
|
930
943
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -1012,7 +1025,6 @@ module Google
|
|
|
1012
1025
|
|
|
1013
1026
|
@identity_aware_proxy_admin_service_stub.call_rpc :delete_tunnel_dest_group, request, options: options do |response, operation|
|
|
1014
1027
|
yield response, operation if block_given?
|
|
1015
|
-
return response
|
|
1016
1028
|
end
|
|
1017
1029
|
rescue ::GRPC::BadStatus => e
|
|
1018
1030
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -1102,7 +1114,6 @@ module Google
|
|
|
1102
1114
|
|
|
1103
1115
|
@identity_aware_proxy_admin_service_stub.call_rpc :update_tunnel_dest_group, request, options: options do |response, operation|
|
|
1104
1116
|
yield response, operation if block_given?
|
|
1105
|
-
return response
|
|
1106
1117
|
end
|
|
1107
1118
|
rescue ::GRPC::BadStatus => e
|
|
1108
1119
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -1152,6 +1163,13 @@ module Google
|
|
|
1152
1163
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
|
1153
1164
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
1154
1165
|
# * (`nil`) indicating no credentials
|
|
1166
|
+
#
|
|
1167
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
1168
|
+
# external source for authentication to Google Cloud, you must validate it before
|
|
1169
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
|
1170
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
|
1171
|
+
# For more information, refer to [Validate credential configurations from external
|
|
1172
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
|
1155
1173
|
# @return [::Object]
|
|
1156
1174
|
# @!attribute [rw] scope
|
|
1157
1175
|
# The OAuth scopes
|
|
@@ -1191,6 +1209,11 @@ module Google
|
|
|
1191
1209
|
# default endpoint URL. The default value of nil uses the environment
|
|
1192
1210
|
# universe (usually the default "googleapis.com" universe).
|
|
1193
1211
|
# @return [::String,nil]
|
|
1212
|
+
# @!attribute [rw] logger
|
|
1213
|
+
# A custom logger to use for request/response debug logging, or the value
|
|
1214
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
|
1215
|
+
# explicitly disable logging.
|
|
1216
|
+
# @return [::Logger,:default,nil]
|
|
1194
1217
|
#
|
|
1195
1218
|
class Configuration
|
|
1196
1219
|
extend ::Gapic::Config
|
|
@@ -1215,6 +1238,7 @@ module Google
|
|
|
1215
1238
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
1216
1239
|
config_attr :quota_project, nil, ::String, nil
|
|
1217
1240
|
config_attr :universe_domain, nil, ::String, nil
|
|
1241
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
|
1218
1242
|
|
|
1219
1243
|
# @private
|
|
1220
1244
|
def initialize parent_config = nil
|
|
@@ -152,8 +152,28 @@ module Google
|
|
|
152
152
|
endpoint: @config.endpoint,
|
|
153
153
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
154
154
|
universe_domain: @config.universe_domain,
|
|
155
|
-
credentials: credentials
|
|
155
|
+
credentials: credentials,
|
|
156
|
+
logger: @config.logger
|
|
156
157
|
)
|
|
158
|
+
|
|
159
|
+
@identity_aware_proxy_admin_service_stub.logger(stub: true)&.info do |entry|
|
|
160
|
+
entry.set_system_name
|
|
161
|
+
entry.set_service
|
|
162
|
+
entry.message = "Created client for #{entry.service}"
|
|
163
|
+
entry.set_credentials_fields credentials
|
|
164
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
|
165
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
166
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
##
|
|
171
|
+
# The logger used for request/response debug logging.
|
|
172
|
+
#
|
|
173
|
+
# @return [Logger]
|
|
174
|
+
#
|
|
175
|
+
def logger
|
|
176
|
+
@identity_aware_proxy_admin_service_stub.logger
|
|
157
177
|
end
|
|
158
178
|
|
|
159
179
|
# Service calls
|
|
@@ -246,7 +266,6 @@ module Google
|
|
|
246
266
|
|
|
247
267
|
@identity_aware_proxy_admin_service_stub.set_iam_policy request, options do |result, operation|
|
|
248
268
|
yield result, operation if block_given?
|
|
249
|
-
return result
|
|
250
269
|
end
|
|
251
270
|
rescue ::Gapic::Rest::Error => e
|
|
252
271
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -332,7 +351,6 @@ module Google
|
|
|
332
351
|
|
|
333
352
|
@identity_aware_proxy_admin_service_stub.get_iam_policy request, options do |result, operation|
|
|
334
353
|
yield result, operation if block_given?
|
|
335
|
-
return result
|
|
336
354
|
end
|
|
337
355
|
rescue ::Gapic::Rest::Error => e
|
|
338
356
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -420,7 +438,6 @@ module Google
|
|
|
420
438
|
|
|
421
439
|
@identity_aware_proxy_admin_service_stub.test_iam_permissions request, options do |result, operation|
|
|
422
440
|
yield result, operation if block_given?
|
|
423
|
-
return result
|
|
424
441
|
end
|
|
425
442
|
rescue ::Gapic::Rest::Error => e
|
|
426
443
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -501,7 +518,6 @@ module Google
|
|
|
501
518
|
|
|
502
519
|
@identity_aware_proxy_admin_service_stub.get_iap_settings request, options do |result, operation|
|
|
503
520
|
yield result, operation if block_given?
|
|
504
|
-
return result
|
|
505
521
|
end
|
|
506
522
|
rescue ::Gapic::Rest::Error => e
|
|
507
523
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -590,7 +606,6 @@ module Google
|
|
|
590
606
|
|
|
591
607
|
@identity_aware_proxy_admin_service_stub.update_iap_settings request, options do |result, operation|
|
|
592
608
|
yield result, operation if block_given?
|
|
593
|
-
return result
|
|
594
609
|
end
|
|
595
610
|
rescue ::Gapic::Rest::Error => e
|
|
596
611
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -691,7 +706,7 @@ module Google
|
|
|
691
706
|
@identity_aware_proxy_admin_service_stub.list_tunnel_dest_groups request, options do |result, operation|
|
|
692
707
|
result = ::Gapic::Rest::PagedEnumerable.new @identity_aware_proxy_admin_service_stub, :list_tunnel_dest_groups, "tunnel_dest_groups", request, result, options
|
|
693
708
|
yield result, operation if block_given?
|
|
694
|
-
|
|
709
|
+
throw :response, result
|
|
695
710
|
end
|
|
696
711
|
rescue ::Gapic::Rest::Error => e
|
|
697
712
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -780,7 +795,6 @@ module Google
|
|
|
780
795
|
|
|
781
796
|
@identity_aware_proxy_admin_service_stub.create_tunnel_dest_group request, options do |result, operation|
|
|
782
797
|
yield result, operation if block_given?
|
|
783
|
-
return result
|
|
784
798
|
end
|
|
785
799
|
rescue ::Gapic::Rest::Error => e
|
|
786
800
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -861,7 +875,6 @@ module Google
|
|
|
861
875
|
|
|
862
876
|
@identity_aware_proxy_admin_service_stub.get_tunnel_dest_group request, options do |result, operation|
|
|
863
877
|
yield result, operation if block_given?
|
|
864
|
-
return result
|
|
865
878
|
end
|
|
866
879
|
rescue ::Gapic::Rest::Error => e
|
|
867
880
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -942,7 +955,6 @@ module Google
|
|
|
942
955
|
|
|
943
956
|
@identity_aware_proxy_admin_service_stub.delete_tunnel_dest_group request, options do |result, operation|
|
|
944
957
|
yield result, operation if block_given?
|
|
945
|
-
return result
|
|
946
958
|
end
|
|
947
959
|
rescue ::Gapic::Rest::Error => e
|
|
948
960
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -1025,7 +1037,6 @@ module Google
|
|
|
1025
1037
|
|
|
1026
1038
|
@identity_aware_proxy_admin_service_stub.update_tunnel_dest_group request, options do |result, operation|
|
|
1027
1039
|
yield result, operation if block_given?
|
|
1028
|
-
return result
|
|
1029
1040
|
end
|
|
1030
1041
|
rescue ::Gapic::Rest::Error => e
|
|
1031
1042
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -1073,6 +1084,13 @@ module Google
|
|
|
1073
1084
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
1074
1085
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
|
1075
1086
|
# * (`nil`) indicating no credentials
|
|
1087
|
+
#
|
|
1088
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
1089
|
+
# external source for authentication to Google Cloud, you must validate it before
|
|
1090
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
|
1091
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
|
1092
|
+
# For more information, refer to [Validate credential configurations from external
|
|
1093
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
|
1076
1094
|
# @return [::Object]
|
|
1077
1095
|
# @!attribute [rw] scope
|
|
1078
1096
|
# The OAuth scopes
|
|
@@ -1105,6 +1123,11 @@ module Google
|
|
|
1105
1123
|
# default endpoint URL. The default value of nil uses the environment
|
|
1106
1124
|
# universe (usually the default "googleapis.com" universe).
|
|
1107
1125
|
# @return [::String,nil]
|
|
1126
|
+
# @!attribute [rw] logger
|
|
1127
|
+
# A custom logger to use for request/response debug logging, or the value
|
|
1128
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
|
1129
|
+
# explicitly disable logging.
|
|
1130
|
+
# @return [::Logger,:default,nil]
|
|
1108
1131
|
#
|
|
1109
1132
|
class Configuration
|
|
1110
1133
|
extend ::Gapic::Config
|
|
@@ -1126,6 +1149,7 @@ module Google
|
|
|
1126
1149
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
1127
1150
|
config_attr :quota_project, nil, ::String, nil
|
|
1128
1151
|
config_attr :universe_domain, nil, ::String, nil
|
|
1152
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
|
1129
1153
|
|
|
1130
1154
|
# @private
|
|
1131
1155
|
def initialize parent_config = nil
|
|
@@ -30,7 +30,8 @@ module Google
|
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
|
31
31
|
#
|
|
32
32
|
class ServiceStub
|
|
33
|
-
|
|
33
|
+
# @private
|
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
|
34
35
|
# These require statements are intentionally placed here to initialize
|
|
35
36
|
# the REST modules only when it's required.
|
|
36
37
|
require "gapic/rest"
|
|
@@ -40,7 +41,9 @@ module Google
|
|
|
40
41
|
universe_domain: universe_domain,
|
|
41
42
|
credentials: credentials,
|
|
42
43
|
numeric_enums: true,
|
|
43
|
-
|
|
44
|
+
service_name: self.class,
|
|
45
|
+
raise_faraday_errors: false,
|
|
46
|
+
logger: logger
|
|
44
47
|
end
|
|
45
48
|
|
|
46
49
|
##
|
|
@@ -61,6 +64,15 @@ module Google
|
|
|
61
64
|
@client_stub.endpoint
|
|
62
65
|
end
|
|
63
66
|
|
|
67
|
+
##
|
|
68
|
+
# The logger used for request/response debug logging.
|
|
69
|
+
#
|
|
70
|
+
# @return [Logger]
|
|
71
|
+
#
|
|
72
|
+
def logger stub: false
|
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
|
74
|
+
end
|
|
75
|
+
|
|
64
76
|
##
|
|
65
77
|
# Baseline implementation for the set_iam_policy REST call
|
|
66
78
|
#
|
|
@@ -87,16 +99,18 @@ module Google
|
|
|
87
99
|
|
|
88
100
|
response = @client_stub.make_http_request(
|
|
89
101
|
verb,
|
|
90
|
-
uri:
|
|
91
|
-
body:
|
|
92
|
-
params:
|
|
102
|
+
uri: uri,
|
|
103
|
+
body: body || "",
|
|
104
|
+
params: query_string_params,
|
|
105
|
+
method_name: "set_iam_policy",
|
|
93
106
|
options: options
|
|
94
107
|
)
|
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
96
109
|
result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
110
|
+
catch :response do
|
|
111
|
+
yield result, operation if block_given?
|
|
112
|
+
result
|
|
113
|
+
end
|
|
100
114
|
end
|
|
101
115
|
|
|
102
116
|
##
|
|
@@ -125,16 +139,18 @@ module Google
|
|
|
125
139
|
|
|
126
140
|
response = @client_stub.make_http_request(
|
|
127
141
|
verb,
|
|
128
|
-
uri:
|
|
129
|
-
body:
|
|
130
|
-
params:
|
|
142
|
+
uri: uri,
|
|
143
|
+
body: body || "",
|
|
144
|
+
params: query_string_params,
|
|
145
|
+
method_name: "get_iam_policy",
|
|
131
146
|
options: options
|
|
132
147
|
)
|
|
133
148
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
134
149
|
result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
150
|
+
catch :response do
|
|
151
|
+
yield result, operation if block_given?
|
|
152
|
+
result
|
|
153
|
+
end
|
|
138
154
|
end
|
|
139
155
|
|
|
140
156
|
##
|
|
@@ -163,16 +179,18 @@ module Google
|
|
|
163
179
|
|
|
164
180
|
response = @client_stub.make_http_request(
|
|
165
181
|
verb,
|
|
166
|
-
uri:
|
|
167
|
-
body:
|
|
168
|
-
params:
|
|
182
|
+
uri: uri,
|
|
183
|
+
body: body || "",
|
|
184
|
+
params: query_string_params,
|
|
185
|
+
method_name: "test_iam_permissions",
|
|
169
186
|
options: options
|
|
170
187
|
)
|
|
171
188
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
172
189
|
result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
190
|
+
catch :response do
|
|
191
|
+
yield result, operation if block_given?
|
|
192
|
+
result
|
|
193
|
+
end
|
|
176
194
|
end
|
|
177
195
|
|
|
178
196
|
##
|
|
@@ -201,16 +219,18 @@ module Google
|
|
|
201
219
|
|
|
202
220
|
response = @client_stub.make_http_request(
|
|
203
221
|
verb,
|
|
204
|
-
uri:
|
|
205
|
-
body:
|
|
206
|
-
params:
|
|
222
|
+
uri: uri,
|
|
223
|
+
body: body || "",
|
|
224
|
+
params: query_string_params,
|
|
225
|
+
method_name: "get_iap_settings",
|
|
207
226
|
options: options
|
|
208
227
|
)
|
|
209
228
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
210
229
|
result = ::Google::Cloud::Iap::V1::IapSettings.decode_json response.body, ignore_unknown_fields: true
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
230
|
+
catch :response do
|
|
231
|
+
yield result, operation if block_given?
|
|
232
|
+
result
|
|
233
|
+
end
|
|
214
234
|
end
|
|
215
235
|
|
|
216
236
|
##
|
|
@@ -239,16 +259,18 @@ module Google
|
|
|
239
259
|
|
|
240
260
|
response = @client_stub.make_http_request(
|
|
241
261
|
verb,
|
|
242
|
-
uri:
|
|
243
|
-
body:
|
|
244
|
-
params:
|
|
262
|
+
uri: uri,
|
|
263
|
+
body: body || "",
|
|
264
|
+
params: query_string_params,
|
|
265
|
+
method_name: "update_iap_settings",
|
|
245
266
|
options: options
|
|
246
267
|
)
|
|
247
268
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
248
269
|
result = ::Google::Cloud::Iap::V1::IapSettings.decode_json response.body, ignore_unknown_fields: true
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
270
|
+
catch :response do
|
|
271
|
+
yield result, operation if block_given?
|
|
272
|
+
result
|
|
273
|
+
end
|
|
252
274
|
end
|
|
253
275
|
|
|
254
276
|
##
|
|
@@ -277,16 +299,18 @@ module Google
|
|
|
277
299
|
|
|
278
300
|
response = @client_stub.make_http_request(
|
|
279
301
|
verb,
|
|
280
|
-
uri:
|
|
281
|
-
body:
|
|
282
|
-
params:
|
|
302
|
+
uri: uri,
|
|
303
|
+
body: body || "",
|
|
304
|
+
params: query_string_params,
|
|
305
|
+
method_name: "list_tunnel_dest_groups",
|
|
283
306
|
options: options
|
|
284
307
|
)
|
|
285
308
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
286
309
|
result = ::Google::Cloud::Iap::V1::ListTunnelDestGroupsResponse.decode_json response.body, ignore_unknown_fields: true
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
310
|
+
catch :response do
|
|
311
|
+
yield result, operation if block_given?
|
|
312
|
+
result
|
|
313
|
+
end
|
|
290
314
|
end
|
|
291
315
|
|
|
292
316
|
##
|
|
@@ -315,16 +339,18 @@ module Google
|
|
|
315
339
|
|
|
316
340
|
response = @client_stub.make_http_request(
|
|
317
341
|
verb,
|
|
318
|
-
uri:
|
|
319
|
-
body:
|
|
320
|
-
params:
|
|
342
|
+
uri: uri,
|
|
343
|
+
body: body || "",
|
|
344
|
+
params: query_string_params,
|
|
345
|
+
method_name: "create_tunnel_dest_group",
|
|
321
346
|
options: options
|
|
322
347
|
)
|
|
323
348
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
324
349
|
result = ::Google::Cloud::Iap::V1::TunnelDestGroup.decode_json response.body, ignore_unknown_fields: true
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
350
|
+
catch :response do
|
|
351
|
+
yield result, operation if block_given?
|
|
352
|
+
result
|
|
353
|
+
end
|
|
328
354
|
end
|
|
329
355
|
|
|
330
356
|
##
|
|
@@ -353,16 +379,18 @@ module Google
|
|
|
353
379
|
|
|
354
380
|
response = @client_stub.make_http_request(
|
|
355
381
|
verb,
|
|
356
|
-
uri:
|
|
357
|
-
body:
|
|
358
|
-
params:
|
|
382
|
+
uri: uri,
|
|
383
|
+
body: body || "",
|
|
384
|
+
params: query_string_params,
|
|
385
|
+
method_name: "get_tunnel_dest_group",
|
|
359
386
|
options: options
|
|
360
387
|
)
|
|
361
388
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
362
389
|
result = ::Google::Cloud::Iap::V1::TunnelDestGroup.decode_json response.body, ignore_unknown_fields: true
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
390
|
+
catch :response do
|
|
391
|
+
yield result, operation if block_given?
|
|
392
|
+
result
|
|
393
|
+
end
|
|
366
394
|
end
|
|
367
395
|
|
|
368
396
|
##
|
|
@@ -391,16 +419,18 @@ module Google
|
|
|
391
419
|
|
|
392
420
|
response = @client_stub.make_http_request(
|
|
393
421
|
verb,
|
|
394
|
-
uri:
|
|
395
|
-
body:
|
|
396
|
-
params:
|
|
422
|
+
uri: uri,
|
|
423
|
+
body: body || "",
|
|
424
|
+
params: query_string_params,
|
|
425
|
+
method_name: "delete_tunnel_dest_group",
|
|
397
426
|
options: options
|
|
398
427
|
)
|
|
399
428
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
400
429
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
430
|
+
catch :response do
|
|
431
|
+
yield result, operation if block_given?
|
|
432
|
+
result
|
|
433
|
+
end
|
|
404
434
|
end
|
|
405
435
|
|
|
406
436
|
##
|
|
@@ -429,16 +459,18 @@ module Google
|
|
|
429
459
|
|
|
430
460
|
response = @client_stub.make_http_request(
|
|
431
461
|
verb,
|
|
432
|
-
uri:
|
|
433
|
-
body:
|
|
434
|
-
params:
|
|
462
|
+
uri: uri,
|
|
463
|
+
body: body || "",
|
|
464
|
+
params: query_string_params,
|
|
465
|
+
method_name: "update_tunnel_dest_group",
|
|
435
466
|
options: options
|
|
436
467
|
)
|
|
437
468
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
438
469
|
result = ::Google::Cloud::Iap::V1::TunnelDestGroup.decode_json response.body, ignore_unknown_fields: true
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
470
|
+
catch :response do
|
|
471
|
+
yield result, operation if block_given?
|
|
472
|
+
result
|
|
473
|
+
end
|
|
442
474
|
end
|
|
443
475
|
|
|
444
476
|
##
|
|
@@ -159,8 +159,28 @@ module Google
|
|
|
159
159
|
universe_domain: @config.universe_domain,
|
|
160
160
|
channel_args: @config.channel_args,
|
|
161
161
|
interceptors: @config.interceptors,
|
|
162
|
-
channel_pool_config: @config.channel_pool
|
|
162
|
+
channel_pool_config: @config.channel_pool,
|
|
163
|
+
logger: @config.logger
|
|
163
164
|
)
|
|
165
|
+
|
|
166
|
+
@identity_aware_proxy_o_auth_service_stub.stub_logger&.info do |entry|
|
|
167
|
+
entry.set_system_name
|
|
168
|
+
entry.set_service
|
|
169
|
+
entry.message = "Created client for #{entry.service}"
|
|
170
|
+
entry.set_credentials_fields credentials
|
|
171
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
|
172
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
173
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
##
|
|
178
|
+
# The logger used for request/response debug logging.
|
|
179
|
+
#
|
|
180
|
+
# @return [Logger]
|
|
181
|
+
#
|
|
182
|
+
def logger
|
|
183
|
+
@identity_aware_proxy_o_auth_service_stub.logger
|
|
164
184
|
end
|
|
165
185
|
|
|
166
186
|
# Service calls
|
|
@@ -246,7 +266,6 @@ module Google
|
|
|
246
266
|
|
|
247
267
|
@identity_aware_proxy_o_auth_service_stub.call_rpc :list_brands, request, options: options do |response, operation|
|
|
248
268
|
yield response, operation if block_given?
|
|
249
|
-
return response
|
|
250
269
|
end
|
|
251
270
|
rescue ::GRPC::BadStatus => e
|
|
252
271
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -342,7 +361,6 @@ module Google
|
|
|
342
361
|
|
|
343
362
|
@identity_aware_proxy_o_auth_service_stub.call_rpc :create_brand, request, options: options do |response, operation|
|
|
344
363
|
yield response, operation if block_given?
|
|
345
|
-
return response
|
|
346
364
|
end
|
|
347
365
|
rescue ::GRPC::BadStatus => e
|
|
348
366
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -429,7 +447,6 @@ module Google
|
|
|
429
447
|
|
|
430
448
|
@identity_aware_proxy_o_auth_service_stub.call_rpc :get_brand, request, options: options do |response, operation|
|
|
431
449
|
yield response, operation if block_given?
|
|
432
|
-
return response
|
|
433
450
|
end
|
|
434
451
|
rescue ::GRPC::BadStatus => e
|
|
435
452
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -522,7 +539,6 @@ module Google
|
|
|
522
539
|
|
|
523
540
|
@identity_aware_proxy_o_auth_service_stub.call_rpc :create_identity_aware_proxy_client, request, options: options do |response, operation|
|
|
524
541
|
yield response, operation if block_given?
|
|
525
|
-
return response
|
|
526
542
|
end
|
|
527
543
|
rescue ::GRPC::BadStatus => e
|
|
528
544
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -626,7 +642,7 @@ module Google
|
|
|
626
642
|
@identity_aware_proxy_o_auth_service_stub.call_rpc :list_identity_aware_proxy_clients, request, options: options do |response, operation|
|
|
627
643
|
response = ::Gapic::PagedEnumerable.new @identity_aware_proxy_o_auth_service_stub, :list_identity_aware_proxy_clients, request, response, operation, options
|
|
628
644
|
yield response, operation if block_given?
|
|
629
|
-
|
|
645
|
+
throw :response, response
|
|
630
646
|
end
|
|
631
647
|
rescue ::GRPC::BadStatus => e
|
|
632
648
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -715,7 +731,6 @@ module Google
|
|
|
715
731
|
|
|
716
732
|
@identity_aware_proxy_o_auth_service_stub.call_rpc :get_identity_aware_proxy_client, request, options: options do |response, operation|
|
|
717
733
|
yield response, operation if block_given?
|
|
718
|
-
return response
|
|
719
734
|
end
|
|
720
735
|
rescue ::GRPC::BadStatus => e
|
|
721
736
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -804,7 +819,6 @@ module Google
|
|
|
804
819
|
|
|
805
820
|
@identity_aware_proxy_o_auth_service_stub.call_rpc :reset_identity_aware_proxy_client_secret, request, options: options do |response, operation|
|
|
806
821
|
yield response, operation if block_given?
|
|
807
|
-
return response
|
|
808
822
|
end
|
|
809
823
|
rescue ::GRPC::BadStatus => e
|
|
810
824
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -894,7 +908,6 @@ module Google
|
|
|
894
908
|
|
|
895
909
|
@identity_aware_proxy_o_auth_service_stub.call_rpc :delete_identity_aware_proxy_client, request, options: options do |response, operation|
|
|
896
910
|
yield response, operation if block_given?
|
|
897
|
-
return response
|
|
898
911
|
end
|
|
899
912
|
rescue ::GRPC::BadStatus => e
|
|
900
913
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -944,6 +957,13 @@ module Google
|
|
|
944
957
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
|
945
958
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
946
959
|
# * (`nil`) indicating no credentials
|
|
960
|
+
#
|
|
961
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
962
|
+
# external source for authentication to Google Cloud, you must validate it before
|
|
963
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
|
964
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
|
965
|
+
# For more information, refer to [Validate credential configurations from external
|
|
966
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
|
947
967
|
# @return [::Object]
|
|
948
968
|
# @!attribute [rw] scope
|
|
949
969
|
# The OAuth scopes
|
|
@@ -983,6 +1003,11 @@ module Google
|
|
|
983
1003
|
# default endpoint URL. The default value of nil uses the environment
|
|
984
1004
|
# universe (usually the default "googleapis.com" universe).
|
|
985
1005
|
# @return [::String,nil]
|
|
1006
|
+
# @!attribute [rw] logger
|
|
1007
|
+
# A custom logger to use for request/response debug logging, or the value
|
|
1008
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
|
1009
|
+
# explicitly disable logging.
|
|
1010
|
+
# @return [::Logger,:default,nil]
|
|
986
1011
|
#
|
|
987
1012
|
class Configuration
|
|
988
1013
|
extend ::Gapic::Config
|
|
@@ -1007,6 +1032,7 @@ module Google
|
|
|
1007
1032
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
1008
1033
|
config_attr :quota_project, nil, ::String, nil
|
|
1009
1034
|
config_attr :universe_domain, nil, ::String, nil
|
|
1035
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
|
1010
1036
|
|
|
1011
1037
|
# @private
|
|
1012
1038
|
def initialize parent_config = nil
|
|
@@ -152,8 +152,28 @@ module Google
|
|
|
152
152
|
endpoint: @config.endpoint,
|
|
153
153
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
154
154
|
universe_domain: @config.universe_domain,
|
|
155
|
-
credentials: credentials
|
|
155
|
+
credentials: credentials,
|
|
156
|
+
logger: @config.logger
|
|
156
157
|
)
|
|
158
|
+
|
|
159
|
+
@identity_aware_proxy_o_auth_service_stub.logger(stub: true)&.info do |entry|
|
|
160
|
+
entry.set_system_name
|
|
161
|
+
entry.set_service
|
|
162
|
+
entry.message = "Created client for #{entry.service}"
|
|
163
|
+
entry.set_credentials_fields credentials
|
|
164
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
|
165
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
166
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
##
|
|
171
|
+
# The logger used for request/response debug logging.
|
|
172
|
+
#
|
|
173
|
+
# @return [Logger]
|
|
174
|
+
#
|
|
175
|
+
def logger
|
|
176
|
+
@identity_aware_proxy_o_auth_service_stub.logger
|
|
157
177
|
end
|
|
158
178
|
|
|
159
179
|
# Service calls
|
|
@@ -232,7 +252,6 @@ module Google
|
|
|
232
252
|
|
|
233
253
|
@identity_aware_proxy_o_auth_service_stub.list_brands request, options do |result, operation|
|
|
234
254
|
yield result, operation if block_given?
|
|
235
|
-
return result
|
|
236
255
|
end
|
|
237
256
|
rescue ::Gapic::Rest::Error => e
|
|
238
257
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -321,7 +340,6 @@ module Google
|
|
|
321
340
|
|
|
322
341
|
@identity_aware_proxy_o_auth_service_stub.create_brand request, options do |result, operation|
|
|
323
342
|
yield result, operation if block_given?
|
|
324
|
-
return result
|
|
325
343
|
end
|
|
326
344
|
rescue ::Gapic::Rest::Error => e
|
|
327
345
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -401,7 +419,6 @@ module Google
|
|
|
401
419
|
|
|
402
420
|
@identity_aware_proxy_o_auth_service_stub.get_brand request, options do |result, operation|
|
|
403
421
|
yield result, operation if block_given?
|
|
404
|
-
return result
|
|
405
422
|
end
|
|
406
423
|
rescue ::Gapic::Rest::Error => e
|
|
407
424
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -487,7 +504,6 @@ module Google
|
|
|
487
504
|
|
|
488
505
|
@identity_aware_proxy_o_auth_service_stub.create_identity_aware_proxy_client request, options do |result, operation|
|
|
489
506
|
yield result, operation if block_given?
|
|
490
|
-
return result
|
|
491
507
|
end
|
|
492
508
|
rescue ::Gapic::Rest::Error => e
|
|
493
509
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -584,7 +600,7 @@ module Google
|
|
|
584
600
|
@identity_aware_proxy_o_auth_service_stub.list_identity_aware_proxy_clients request, options do |result, operation|
|
|
585
601
|
result = ::Gapic::Rest::PagedEnumerable.new @identity_aware_proxy_o_auth_service_stub, :list_identity_aware_proxy_clients, "identity_aware_proxy_clients", request, result, options
|
|
586
602
|
yield result, operation if block_given?
|
|
587
|
-
|
|
603
|
+
throw :response, result
|
|
588
604
|
end
|
|
589
605
|
rescue ::Gapic::Rest::Error => e
|
|
590
606
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -666,7 +682,6 @@ module Google
|
|
|
666
682
|
|
|
667
683
|
@identity_aware_proxy_o_auth_service_stub.get_identity_aware_proxy_client request, options do |result, operation|
|
|
668
684
|
yield result, operation if block_given?
|
|
669
|
-
return result
|
|
670
685
|
end
|
|
671
686
|
rescue ::Gapic::Rest::Error => e
|
|
672
687
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -748,7 +763,6 @@ module Google
|
|
|
748
763
|
|
|
749
764
|
@identity_aware_proxy_o_auth_service_stub.reset_identity_aware_proxy_client_secret request, options do |result, operation|
|
|
750
765
|
yield result, operation if block_given?
|
|
751
|
-
return result
|
|
752
766
|
end
|
|
753
767
|
rescue ::Gapic::Rest::Error => e
|
|
754
768
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -831,7 +845,6 @@ module Google
|
|
|
831
845
|
|
|
832
846
|
@identity_aware_proxy_o_auth_service_stub.delete_identity_aware_proxy_client request, options do |result, operation|
|
|
833
847
|
yield result, operation if block_given?
|
|
834
|
-
return result
|
|
835
848
|
end
|
|
836
849
|
rescue ::Gapic::Rest::Error => e
|
|
837
850
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -879,6 +892,13 @@ module Google
|
|
|
879
892
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
880
893
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
|
881
894
|
# * (`nil`) indicating no credentials
|
|
895
|
+
#
|
|
896
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
897
|
+
# external source for authentication to Google Cloud, you must validate it before
|
|
898
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
|
899
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
|
900
|
+
# For more information, refer to [Validate credential configurations from external
|
|
901
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
|
882
902
|
# @return [::Object]
|
|
883
903
|
# @!attribute [rw] scope
|
|
884
904
|
# The OAuth scopes
|
|
@@ -911,6 +931,11 @@ module Google
|
|
|
911
931
|
# default endpoint URL. The default value of nil uses the environment
|
|
912
932
|
# universe (usually the default "googleapis.com" universe).
|
|
913
933
|
# @return [::String,nil]
|
|
934
|
+
# @!attribute [rw] logger
|
|
935
|
+
# A custom logger to use for request/response debug logging, or the value
|
|
936
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
|
937
|
+
# explicitly disable logging.
|
|
938
|
+
# @return [::Logger,:default,nil]
|
|
914
939
|
#
|
|
915
940
|
class Configuration
|
|
916
941
|
extend ::Gapic::Config
|
|
@@ -932,6 +957,7 @@ module Google
|
|
|
932
957
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
933
958
|
config_attr :quota_project, nil, ::String, nil
|
|
934
959
|
config_attr :universe_domain, nil, ::String, nil
|
|
960
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
|
935
961
|
|
|
936
962
|
# @private
|
|
937
963
|
def initialize parent_config = nil
|
|
@@ -30,7 +30,8 @@ module Google
|
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
|
31
31
|
#
|
|
32
32
|
class ServiceStub
|
|
33
|
-
|
|
33
|
+
# @private
|
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
|
34
35
|
# These require statements are intentionally placed here to initialize
|
|
35
36
|
# the REST modules only when it's required.
|
|
36
37
|
require "gapic/rest"
|
|
@@ -40,7 +41,9 @@ module Google
|
|
|
40
41
|
universe_domain: universe_domain,
|
|
41
42
|
credentials: credentials,
|
|
42
43
|
numeric_enums: true,
|
|
43
|
-
|
|
44
|
+
service_name: self.class,
|
|
45
|
+
raise_faraday_errors: false,
|
|
46
|
+
logger: logger
|
|
44
47
|
end
|
|
45
48
|
|
|
46
49
|
##
|
|
@@ -61,6 +64,15 @@ module Google
|
|
|
61
64
|
@client_stub.endpoint
|
|
62
65
|
end
|
|
63
66
|
|
|
67
|
+
##
|
|
68
|
+
# The logger used for request/response debug logging.
|
|
69
|
+
#
|
|
70
|
+
# @return [Logger]
|
|
71
|
+
#
|
|
72
|
+
def logger stub: false
|
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
|
74
|
+
end
|
|
75
|
+
|
|
64
76
|
##
|
|
65
77
|
# Baseline implementation for the list_brands REST call
|
|
66
78
|
#
|
|
@@ -87,16 +99,18 @@ module Google
|
|
|
87
99
|
|
|
88
100
|
response = @client_stub.make_http_request(
|
|
89
101
|
verb,
|
|
90
|
-
uri:
|
|
91
|
-
body:
|
|
92
|
-
params:
|
|
102
|
+
uri: uri,
|
|
103
|
+
body: body || "",
|
|
104
|
+
params: query_string_params,
|
|
105
|
+
method_name: "list_brands",
|
|
93
106
|
options: options
|
|
94
107
|
)
|
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
96
109
|
result = ::Google::Cloud::Iap::V1::ListBrandsResponse.decode_json response.body, ignore_unknown_fields: true
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
110
|
+
catch :response do
|
|
111
|
+
yield result, operation if block_given?
|
|
112
|
+
result
|
|
113
|
+
end
|
|
100
114
|
end
|
|
101
115
|
|
|
102
116
|
##
|
|
@@ -125,16 +139,18 @@ module Google
|
|
|
125
139
|
|
|
126
140
|
response = @client_stub.make_http_request(
|
|
127
141
|
verb,
|
|
128
|
-
uri:
|
|
129
|
-
body:
|
|
130
|
-
params:
|
|
142
|
+
uri: uri,
|
|
143
|
+
body: body || "",
|
|
144
|
+
params: query_string_params,
|
|
145
|
+
method_name: "create_brand",
|
|
131
146
|
options: options
|
|
132
147
|
)
|
|
133
148
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
134
149
|
result = ::Google::Cloud::Iap::V1::Brand.decode_json response.body, ignore_unknown_fields: true
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
150
|
+
catch :response do
|
|
151
|
+
yield result, operation if block_given?
|
|
152
|
+
result
|
|
153
|
+
end
|
|
138
154
|
end
|
|
139
155
|
|
|
140
156
|
##
|
|
@@ -163,16 +179,18 @@ module Google
|
|
|
163
179
|
|
|
164
180
|
response = @client_stub.make_http_request(
|
|
165
181
|
verb,
|
|
166
|
-
uri:
|
|
167
|
-
body:
|
|
168
|
-
params:
|
|
182
|
+
uri: uri,
|
|
183
|
+
body: body || "",
|
|
184
|
+
params: query_string_params,
|
|
185
|
+
method_name: "get_brand",
|
|
169
186
|
options: options
|
|
170
187
|
)
|
|
171
188
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
172
189
|
result = ::Google::Cloud::Iap::V1::Brand.decode_json response.body, ignore_unknown_fields: true
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
190
|
+
catch :response do
|
|
191
|
+
yield result, operation if block_given?
|
|
192
|
+
result
|
|
193
|
+
end
|
|
176
194
|
end
|
|
177
195
|
|
|
178
196
|
##
|
|
@@ -201,16 +219,18 @@ module Google
|
|
|
201
219
|
|
|
202
220
|
response = @client_stub.make_http_request(
|
|
203
221
|
verb,
|
|
204
|
-
uri:
|
|
205
|
-
body:
|
|
206
|
-
params:
|
|
222
|
+
uri: uri,
|
|
223
|
+
body: body || "",
|
|
224
|
+
params: query_string_params,
|
|
225
|
+
method_name: "create_identity_aware_proxy_client",
|
|
207
226
|
options: options
|
|
208
227
|
)
|
|
209
228
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
210
229
|
result = ::Google::Cloud::Iap::V1::IdentityAwareProxyClient.decode_json response.body, ignore_unknown_fields: true
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
230
|
+
catch :response do
|
|
231
|
+
yield result, operation if block_given?
|
|
232
|
+
result
|
|
233
|
+
end
|
|
214
234
|
end
|
|
215
235
|
|
|
216
236
|
##
|
|
@@ -239,16 +259,18 @@ module Google
|
|
|
239
259
|
|
|
240
260
|
response = @client_stub.make_http_request(
|
|
241
261
|
verb,
|
|
242
|
-
uri:
|
|
243
|
-
body:
|
|
244
|
-
params:
|
|
262
|
+
uri: uri,
|
|
263
|
+
body: body || "",
|
|
264
|
+
params: query_string_params,
|
|
265
|
+
method_name: "list_identity_aware_proxy_clients",
|
|
245
266
|
options: options
|
|
246
267
|
)
|
|
247
268
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
248
269
|
result = ::Google::Cloud::Iap::V1::ListIdentityAwareProxyClientsResponse.decode_json response.body, ignore_unknown_fields: true
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
270
|
+
catch :response do
|
|
271
|
+
yield result, operation if block_given?
|
|
272
|
+
result
|
|
273
|
+
end
|
|
252
274
|
end
|
|
253
275
|
|
|
254
276
|
##
|
|
@@ -277,16 +299,18 @@ module Google
|
|
|
277
299
|
|
|
278
300
|
response = @client_stub.make_http_request(
|
|
279
301
|
verb,
|
|
280
|
-
uri:
|
|
281
|
-
body:
|
|
282
|
-
params:
|
|
302
|
+
uri: uri,
|
|
303
|
+
body: body || "",
|
|
304
|
+
params: query_string_params,
|
|
305
|
+
method_name: "get_identity_aware_proxy_client",
|
|
283
306
|
options: options
|
|
284
307
|
)
|
|
285
308
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
286
309
|
result = ::Google::Cloud::Iap::V1::IdentityAwareProxyClient.decode_json response.body, ignore_unknown_fields: true
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
310
|
+
catch :response do
|
|
311
|
+
yield result, operation if block_given?
|
|
312
|
+
result
|
|
313
|
+
end
|
|
290
314
|
end
|
|
291
315
|
|
|
292
316
|
##
|
|
@@ -315,16 +339,18 @@ module Google
|
|
|
315
339
|
|
|
316
340
|
response = @client_stub.make_http_request(
|
|
317
341
|
verb,
|
|
318
|
-
uri:
|
|
319
|
-
body:
|
|
320
|
-
params:
|
|
342
|
+
uri: uri,
|
|
343
|
+
body: body || "",
|
|
344
|
+
params: query_string_params,
|
|
345
|
+
method_name: "reset_identity_aware_proxy_client_secret",
|
|
321
346
|
options: options
|
|
322
347
|
)
|
|
323
348
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
324
349
|
result = ::Google::Cloud::Iap::V1::IdentityAwareProxyClient.decode_json response.body, ignore_unknown_fields: true
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
350
|
+
catch :response do
|
|
351
|
+
yield result, operation if block_given?
|
|
352
|
+
result
|
|
353
|
+
end
|
|
328
354
|
end
|
|
329
355
|
|
|
330
356
|
##
|
|
@@ -353,16 +379,18 @@ module Google
|
|
|
353
379
|
|
|
354
380
|
response = @client_stub.make_http_request(
|
|
355
381
|
verb,
|
|
356
|
-
uri:
|
|
357
|
-
body:
|
|
358
|
-
params:
|
|
382
|
+
uri: uri,
|
|
383
|
+
body: body || "",
|
|
384
|
+
params: query_string_params,
|
|
385
|
+
method_name: "delete_identity_aware_proxy_client",
|
|
359
386
|
options: options
|
|
360
387
|
)
|
|
361
388
|
operation = ::Gapic::Rest::TransportOperation.new response
|
|
362
389
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
390
|
+
catch :response do
|
|
391
|
+
yield result, operation if block_given?
|
|
392
|
+
result
|
|
393
|
+
end
|
|
366
394
|
end
|
|
367
395
|
|
|
368
396
|
##
|
|
@@ -28,6 +28,9 @@ module Google
|
|
|
28
28
|
# @!attribute [rw] destinations
|
|
29
29
|
# @return [::Array<::Google::Api::ClientLibraryDestination>]
|
|
30
30
|
# The destination where API teams want this client library to be published.
|
|
31
|
+
# @!attribute [rw] selective_gapic_generation
|
|
32
|
+
# @return [::Google::Api::SelectiveGapicGeneration]
|
|
33
|
+
# Configuration for which RPCs should be generated in the GAPIC client.
|
|
31
34
|
class CommonLanguageSettings
|
|
32
35
|
include ::Google::Protobuf::MessageExts
|
|
33
36
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -212,6 +215,12 @@ module Google
|
|
|
212
215
|
# enabled. By default, asynchronous REST clients will not be generated.
|
|
213
216
|
# This feature will be enabled by default 1 month after launching the
|
|
214
217
|
# feature in preview packages.
|
|
218
|
+
# @!attribute [rw] protobuf_pythonic_types_enabled
|
|
219
|
+
# @return [::Boolean]
|
|
220
|
+
# Enables generation of protobuf code using new types that are more
|
|
221
|
+
# Pythonic which are included in `protobuf>=5.29.x`. This feature will be
|
|
222
|
+
# enabled by default 1 month after launching the feature in preview
|
|
223
|
+
# packages.
|
|
215
224
|
class ExperimentalFeatures
|
|
216
225
|
include ::Google::Protobuf::MessageExts
|
|
217
226
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -297,9 +306,28 @@ module Google
|
|
|
297
306
|
# @!attribute [rw] common
|
|
298
307
|
# @return [::Google::Api::CommonLanguageSettings]
|
|
299
308
|
# Some settings.
|
|
309
|
+
# @!attribute [rw] renamed_services
|
|
310
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
|
311
|
+
# Map of service names to renamed services. Keys are the package relative
|
|
312
|
+
# service names and values are the name to be used for the service client
|
|
313
|
+
# and call options.
|
|
314
|
+
#
|
|
315
|
+
# publishing:
|
|
316
|
+
# go_settings:
|
|
317
|
+
# renamed_services:
|
|
318
|
+
# Publisher: TopicAdmin
|
|
300
319
|
class GoSettings
|
|
301
320
|
include ::Google::Protobuf::MessageExts
|
|
302
321
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
322
|
+
|
|
323
|
+
# @!attribute [rw] key
|
|
324
|
+
# @return [::String]
|
|
325
|
+
# @!attribute [rw] value
|
|
326
|
+
# @return [::String]
|
|
327
|
+
class RenamedServicesEntry
|
|
328
|
+
include ::Google::Protobuf::MessageExts
|
|
329
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
330
|
+
end
|
|
303
331
|
end
|
|
304
332
|
|
|
305
333
|
# Describes the generator configuration for a method.
|
|
@@ -375,6 +403,17 @@ module Google
|
|
|
375
403
|
end
|
|
376
404
|
end
|
|
377
405
|
|
|
406
|
+
# This message is used to configure the generation of a subset of the RPCs in
|
|
407
|
+
# a service for client libraries.
|
|
408
|
+
# @!attribute [rw] methods
|
|
409
|
+
# @return [::Array<::String>]
|
|
410
|
+
# An allowlist of the fully qualified names of RPCs that should be included
|
|
411
|
+
# on public client surfaces.
|
|
412
|
+
class SelectiveGapicGeneration
|
|
413
|
+
include ::Google::Protobuf::MessageExts
|
|
414
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
415
|
+
end
|
|
416
|
+
|
|
378
417
|
# The organization for which the client libraries are being published.
|
|
379
418
|
# Affects the url where generated docs are published, etc.
|
|
380
419
|
module ClientLibraryOrganization
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google-cloud-iap-v1
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Google LLC
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 2025-01-29 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: gapic-common
|
|
@@ -16,7 +15,7 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - ">="
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.
|
|
18
|
+
version: 0.25.0
|
|
20
19
|
- - "<"
|
|
21
20
|
- !ruby/object:Gem::Version
|
|
22
21
|
version: 2.a
|
|
@@ -26,7 +25,7 @@ dependencies:
|
|
|
26
25
|
requirements:
|
|
27
26
|
- - ">="
|
|
28
27
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: 0.
|
|
28
|
+
version: 0.25.0
|
|
30
29
|
- - "<"
|
|
31
30
|
- !ruby/object:Gem::Version
|
|
32
31
|
version: 2.a
|
|
@@ -109,7 +108,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
|
|
|
109
108
|
licenses:
|
|
110
109
|
- Apache-2.0
|
|
111
110
|
metadata: {}
|
|
112
|
-
post_install_message:
|
|
113
111
|
rdoc_options: []
|
|
114
112
|
require_paths:
|
|
115
113
|
- lib
|
|
@@ -117,15 +115,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
117
115
|
requirements:
|
|
118
116
|
- - ">="
|
|
119
117
|
- !ruby/object:Gem::Version
|
|
120
|
-
version: '
|
|
118
|
+
version: '3.0'
|
|
121
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
120
|
requirements:
|
|
123
121
|
- - ">="
|
|
124
122
|
- !ruby/object:Gem::Version
|
|
125
123
|
version: '0'
|
|
126
124
|
requirements: []
|
|
127
|
-
rubygems_version: 3.
|
|
128
|
-
signing_key:
|
|
125
|
+
rubygems_version: 3.6.2
|
|
129
126
|
specification_version: 4
|
|
130
127
|
summary: Controls access to cloud applications running on Google Cloud Platform.
|
|
131
128
|
test_files: []
|