google-cloud-kms-v1 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -6
- data/README.md +1 -1
- data/lib/google/cloud/kms/v1.rb +1 -1
- data/lib/google/cloud/kms/v1/iam_policy.rb +1 -1
- data/lib/google/cloud/kms/v1/iam_policy/client.rb +87 -87
- data/lib/google/cloud/kms/v1/iam_policy/credentials.rb +1 -1
- data/lib/google/cloud/kms/v1/key_management_service.rb +5 -5
- data/lib/google/cloud/kms/v1/key_management_service/client.rb +574 -574
- data/lib/google/cloud/kms/v1/key_management_service/credentials.rb +1 -1
- data/lib/google/cloud/kms/v1/key_management_service/paths.rb +18 -18
- data/lib/google/cloud/kms/v1/version.rb +1 -1
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/kms/v1/resources.rb +202 -202
- data/proto_docs/google/cloud/kms/v1/service.rb +272 -272
- data/proto_docs/google/iam/v1/iam_policy.rb +15 -15
- data/proto_docs/google/iam/v1/options.rb +3 -3
- data/proto_docs/google/iam/v1/policy.rb +26 -26
- data/proto_docs/google/protobuf/duration.rb +4 -4
- data/proto_docs/google/protobuf/field_mask.rb +3 -3
- data/proto_docs/google/protobuf/timestamp.rb +4 -4
- data/proto_docs/google/type/expr.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75dc8de99c2703919b8e3e1c4d29657d6cf5626371a5330b53f3f801ae36d383
|
4
|
+
data.tar.gz: b0ffd42eeeb592d33dc3cfbc1c1559d1bfb224d2de148175966355af327ad175
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b047c92cea8c308c682a79317412a62db579eecaba13df7442358e10b965bccec293742aba8787e3267d98724d2b30810c7257a4044e3c70ecb2fb23d101ccad
|
7
|
+
data.tar.gz: d2bcef6e1c4b988386e969e4691e767b7b0962d205ea55562bdf3309767e18122b55565cea321e7e1f12b4e6092f0575ffc8ef00a22ffac68a5ada620b72cea7
|
data/AUTHENTICATION.md
CHANGED
@@ -27,7 +27,7 @@ export KMS_CREDENTIALS=path/to/keyfile.json
|
|
27
27
|
```ruby
|
28
28
|
require "google/cloud/kms/v1"
|
29
29
|
|
30
|
-
client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
30
|
+
client = ::Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
31
31
|
```
|
32
32
|
|
33
33
|
## Credential Lookup
|
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
|
|
64
64
|
|
65
65
|
The environment variables that google-cloud-kms-v1
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
|
-
{Google::Cloud::Kms::V1::KeyManagementService::Credentials}):
|
67
|
+
{::Google::Cloud::Kms::V1::KeyManagementService::Credentials}):
|
68
68
|
|
69
69
|
1. `KMS_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
70
|
2. `KMS_KEYFILE` - Path to JSON file, or JSON contents
|
@@ -77,7 +77,7 @@ require "google/cloud/kms/v1"
|
|
77
77
|
|
78
78
|
ENV["KMS_CREDENTIALS"] = "path/to/keyfile.json"
|
79
79
|
|
80
|
-
client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
80
|
+
client = ::Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
81
81
|
```
|
82
82
|
|
83
83
|
### Configuration
|
@@ -88,7 +88,7 @@ environment variables. Either on an individual client initialization:
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/kms/v1"
|
90
90
|
|
91
|
-
client = Google::Cloud::Kms::V1::KeyManagementService::Client.new do |config|
|
91
|
+
client = ::Google::Cloud::Kms::V1::KeyManagementService::Client.new do |config|
|
92
92
|
config.credentials = "path/to/keyfile.json"
|
93
93
|
end
|
94
94
|
```
|
@@ -98,11 +98,11 @@ Or configured globally for all clients:
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/kms/v1"
|
100
100
|
|
101
|
-
Google::Cloud::Kms::V1::KeyManagementService::Client.configure do |config|
|
101
|
+
::Google::Cloud::Kms::V1::KeyManagementService::Client.configure do |config|
|
102
102
|
config.credentials = "path/to/keyfile.json"
|
103
103
|
end
|
104
104
|
|
105
|
-
client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
105
|
+
client = ::Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
106
106
|
```
|
107
107
|
|
108
108
|
### Cloud SDK
|
data/README.md
CHANGED
@@ -25,7 +25,7 @@ In order to use this library, you first need to go through the following steps:
|
|
25
25
|
```ruby
|
26
26
|
require "google/cloud/kms/v1"
|
27
27
|
|
28
|
-
client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
28
|
+
client = ::Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
29
29
|
request = my_create_request
|
30
30
|
response = client.list_key_rings request
|
31
31
|
```
|
data/lib/google/cloud/kms/v1.rb
CHANGED
@@ -27,7 +27,7 @@ module Google
|
|
27
27
|
# To load this package, including all its services, and instantiate a client:
|
28
28
|
#
|
29
29
|
# require "google/cloud/kms/v1"
|
30
|
-
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
30
|
+
# client = ::Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
31
31
|
#
|
32
32
|
module V1
|
33
33
|
end
|
@@ -59,7 +59,7 @@ module Google
|
|
59
59
|
# To load this service and instantiate a client:
|
60
60
|
#
|
61
61
|
# require "google/cloud/kms/v1/iam_policy"
|
62
|
-
# client = Google::Cloud::Kms::V1::IAMPolicy::Client.new
|
62
|
+
# client = ::Google::Cloud::Kms::V1::IAMPolicy::Client.new
|
63
63
|
#
|
64
64
|
module IAMPolicy
|
65
65
|
end
|
@@ -60,15 +60,15 @@ module Google
|
|
60
60
|
##
|
61
61
|
# Configure the IAMPolicy Client class.
|
62
62
|
#
|
63
|
-
# See {Google::Cloud::Kms::V1::IAMPolicy::Client::Configuration}
|
63
|
+
# See {::Google::Cloud::Kms::V1::IAMPolicy::Client::Configuration}
|
64
64
|
# for a description of the configuration fields.
|
65
65
|
#
|
66
66
|
# ## Example
|
67
67
|
#
|
68
68
|
# To modify the configuration for all IAMPolicy clients:
|
69
69
|
#
|
70
|
-
# Google::Cloud::Kms::V1::IAMPolicy::Client.configure do |config|
|
71
|
-
# config.timeout =
|
70
|
+
# ::Google::Cloud::Kms::V1::IAMPolicy::Client.configure do |config|
|
71
|
+
# config.timeout = 10.0
|
72
72
|
# end
|
73
73
|
#
|
74
74
|
# @yield [config] Configure the Client client.
|
@@ -100,7 +100,7 @@ module Google
|
|
100
100
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
101
101
|
# should be made on {Client.configure}.
|
102
102
|
#
|
103
|
-
# See {Google::Cloud::Kms::V1::IAMPolicy::Client::Configuration}
|
103
|
+
# See {::Google::Cloud::Kms::V1::IAMPolicy::Client::Configuration}
|
104
104
|
# for a description of the configuration fields.
|
105
105
|
#
|
106
106
|
# @yield [config] Configure the Client client.
|
@@ -121,13 +121,13 @@ module Google
|
|
121
121
|
# To create a new IAMPolicy client with the default
|
122
122
|
# configuration:
|
123
123
|
#
|
124
|
-
# client = Google::Cloud::Kms::V1::IAMPolicy::Client.new
|
124
|
+
# client = ::Google::Cloud::Kms::V1::IAMPolicy::Client.new
|
125
125
|
#
|
126
126
|
# To create a new IAMPolicy client with a custom
|
127
127
|
# configuration:
|
128
128
|
#
|
129
|
-
# client = Google::Cloud::Kms::V1::IAMPolicy::Client.new do |config|
|
130
|
-
# config.timeout =
|
129
|
+
# client = ::Google::Cloud::Kms::V1::IAMPolicy::Client.new do |config|
|
130
|
+
# config.timeout = 10.0
|
131
131
|
# end
|
132
132
|
#
|
133
133
|
# @yield [config] Configure the IAMPolicy client.
|
@@ -154,8 +154,8 @@ module Google
|
|
154
154
|
end
|
155
155
|
@quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
|
156
156
|
|
157
|
-
@iam_policy_stub = Gapic::ServiceStub.new(
|
158
|
-
Google::Iam::V1::IAMPolicy::Stub,
|
157
|
+
@iam_policy_stub = ::Gapic::ServiceStub.new(
|
158
|
+
::Google::Iam::V1::IAMPolicy::Stub,
|
159
159
|
credentials: credentials,
|
160
160
|
endpoint: @config.endpoint,
|
161
161
|
channel_args: @config.channel_args,
|
@@ -171,12 +171,12 @@ module Google
|
|
171
171
|
#
|
172
172
|
# @overload set_iam_policy(request, options = nil)
|
173
173
|
# Pass arguments to `set_iam_policy` via a request object, either of type
|
174
|
-
# {Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
|
174
|
+
# {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
|
175
175
|
#
|
176
|
-
# @param request [Google::Iam::V1::SetIamPolicyRequest, Hash]
|
176
|
+
# @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
|
177
177
|
# A request object representing the call parameters. Required. To specify no
|
178
178
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
179
|
-
# @param options [Gapic::CallOptions, Hash]
|
179
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
180
180
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
181
181
|
#
|
182
182
|
# @overload set_iam_policy(resource: nil, policy: nil)
|
@@ -184,36 +184,36 @@ module Google
|
|
184
184
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
185
185
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
186
186
|
#
|
187
|
-
# @param resource [String]
|
187
|
+
# @param resource [::String]
|
188
188
|
# REQUIRED: The resource for which the policy is being specified.
|
189
189
|
# See the operation documentation for the appropriate value for this field.
|
190
|
-
# @param policy [Google::Iam::V1::Policy, Hash]
|
190
|
+
# @param policy [::Google::Iam::V1::Policy, ::Hash]
|
191
191
|
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
192
192
|
# the policy is limited to a few 10s of KB. An empty policy is a
|
193
193
|
# valid policy but certain Cloud Platform services (such as Projects)
|
194
194
|
# might reject them.
|
195
195
|
#
|
196
196
|
# @yield [response, operation] Access the result along with the RPC operation
|
197
|
-
# @yieldparam response [Google::Iam::V1::Policy]
|
198
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
197
|
+
# @yieldparam response [::Google::Iam::V1::Policy]
|
198
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
199
199
|
#
|
200
|
-
# @return [Google::Iam::V1::Policy]
|
200
|
+
# @return [::Google::Iam::V1::Policy]
|
201
201
|
#
|
202
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
202
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
203
203
|
#
|
204
204
|
def set_iam_policy request, options = nil
|
205
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
205
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
206
206
|
|
207
|
-
request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::SetIamPolicyRequest
|
207
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
|
208
208
|
|
209
209
|
# Converts hash and nil to an options object
|
210
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
210
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
211
211
|
|
212
212
|
# Customize the options with defaults
|
213
213
|
metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
214
214
|
|
215
215
|
# Set x-goog-api-client and x-goog-user-project headers
|
216
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
216
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
217
217
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
218
218
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
219
219
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -234,8 +234,8 @@ module Google
|
|
234
234
|
yield response, operation if block_given?
|
235
235
|
return response
|
236
236
|
end
|
237
|
-
rescue GRPC::BadStatus => e
|
238
|
-
raise Google::Cloud::Error.from_error(e)
|
237
|
+
rescue ::GRPC::BadStatus => e
|
238
|
+
raise ::Google::Cloud::Error.from_error(e)
|
239
239
|
end
|
240
240
|
|
241
241
|
##
|
@@ -245,12 +245,12 @@ module Google
|
|
245
245
|
#
|
246
246
|
# @overload get_iam_policy(request, options = nil)
|
247
247
|
# Pass arguments to `get_iam_policy` via a request object, either of type
|
248
|
-
# {Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
|
248
|
+
# {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
|
249
249
|
#
|
250
|
-
# @param request [Google::Iam::V1::GetIamPolicyRequest, Hash]
|
250
|
+
# @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
|
251
251
|
# A request object representing the call parameters. Required. To specify no
|
252
252
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
253
|
-
# @param options [Gapic::CallOptions, Hash]
|
253
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
254
254
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
255
255
|
#
|
256
256
|
# @overload get_iam_policy(resource: nil, options: nil)
|
@@ -258,34 +258,34 @@ module Google
|
|
258
258
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
259
259
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
260
260
|
#
|
261
|
-
# @param resource [String]
|
261
|
+
# @param resource [::String]
|
262
262
|
# REQUIRED: The resource for which the policy is being requested.
|
263
263
|
# See the operation documentation for the appropriate value for this field.
|
264
|
-
# @param options [Google::Iam::V1::GetPolicyOptions, Hash]
|
264
|
+
# @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
|
265
265
|
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
266
266
|
# `GetIamPolicy`. This field is only used by Cloud IAM.
|
267
267
|
#
|
268
268
|
# @yield [response, operation] Access the result along with the RPC operation
|
269
|
-
# @yieldparam response [Google::Iam::V1::Policy]
|
270
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
269
|
+
# @yieldparam response [::Google::Iam::V1::Policy]
|
270
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
271
271
|
#
|
272
|
-
# @return [Google::Iam::V1::Policy]
|
272
|
+
# @return [::Google::Iam::V1::Policy]
|
273
273
|
#
|
274
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
274
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
275
275
|
#
|
276
276
|
def get_iam_policy request, options = nil
|
277
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
277
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
278
278
|
|
279
|
-
request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::GetIamPolicyRequest
|
279
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
|
280
280
|
|
281
281
|
# Converts hash and nil to an options object
|
282
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
282
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
283
283
|
|
284
284
|
# Customize the options with defaults
|
285
285
|
metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
286
286
|
|
287
287
|
# Set x-goog-api-client and x-goog-user-project headers
|
288
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
288
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
289
289
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
290
290
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
291
291
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -306,8 +306,8 @@ module Google
|
|
306
306
|
yield response, operation if block_given?
|
307
307
|
return response
|
308
308
|
end
|
309
|
-
rescue GRPC::BadStatus => e
|
310
|
-
raise Google::Cloud::Error.from_error(e)
|
309
|
+
rescue ::GRPC::BadStatus => e
|
310
|
+
raise ::Google::Cloud::Error.from_error(e)
|
311
311
|
end
|
312
312
|
|
313
313
|
##
|
@@ -321,12 +321,12 @@ module Google
|
|
321
321
|
#
|
322
322
|
# @overload test_iam_permissions(request, options = nil)
|
323
323
|
# Pass arguments to `test_iam_permissions` via a request object, either of type
|
324
|
-
# {Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
|
324
|
+
# {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
|
325
325
|
#
|
326
|
-
# @param request [Google::Iam::V1::TestIamPermissionsRequest, Hash]
|
326
|
+
# @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
|
327
327
|
# A request object representing the call parameters. Required. To specify no
|
328
328
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
329
|
-
# @param options [Gapic::CallOptions, Hash]
|
329
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
330
330
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
331
331
|
#
|
332
332
|
# @overload test_iam_permissions(resource: nil, permissions: nil)
|
@@ -334,36 +334,36 @@ module Google
|
|
334
334
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
335
335
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
336
336
|
#
|
337
|
-
# @param resource [String]
|
337
|
+
# @param resource [::String]
|
338
338
|
# REQUIRED: The resource for which the policy detail is being requested.
|
339
339
|
# See the operation documentation for the appropriate value for this field.
|
340
|
-
# @param permissions [Array
|
340
|
+
# @param permissions [::Array<::String>]
|
341
341
|
# The set of permissions to check for the `resource`. Permissions with
|
342
342
|
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
343
343
|
# information see
|
344
344
|
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
345
345
|
#
|
346
346
|
# @yield [response, operation] Access the result along with the RPC operation
|
347
|
-
# @yieldparam response [Google::Iam::V1::TestIamPermissionsResponse]
|
348
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
347
|
+
# @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
|
348
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
349
349
|
#
|
350
|
-
# @return [Google::Iam::V1::TestIamPermissionsResponse]
|
350
|
+
# @return [::Google::Iam::V1::TestIamPermissionsResponse]
|
351
351
|
#
|
352
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
352
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
353
353
|
#
|
354
354
|
def test_iam_permissions request, options = nil
|
355
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
355
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
356
356
|
|
357
|
-
request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::TestIamPermissionsRequest
|
357
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
|
358
358
|
|
359
359
|
# Converts hash and nil to an options object
|
360
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
360
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
361
361
|
|
362
362
|
# Customize the options with defaults
|
363
363
|
metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
364
364
|
|
365
365
|
# Set x-goog-api-client and x-goog-user-project headers
|
366
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
366
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
367
367
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
368
368
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
369
369
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -384,8 +384,8 @@ module Google
|
|
384
384
|
yield response, operation if block_given?
|
385
385
|
return response
|
386
386
|
end
|
387
|
-
rescue GRPC::BadStatus => e
|
388
|
-
raise Google::Cloud::Error.from_error(e)
|
387
|
+
rescue ::GRPC::BadStatus => e
|
388
|
+
raise ::Google::Cloud::Error.from_error(e)
|
389
389
|
end
|
390
390
|
|
391
391
|
##
|
@@ -395,7 +395,7 @@ module Google
|
|
395
395
|
# providing control over timeouts, retry behavior, logging, transport
|
396
396
|
# parameters, and other low-level controls. Certain parameters can also be
|
397
397
|
# applied individually to specific RPCs. See
|
398
|
-
# {Google::Cloud::Kms::V1::IAMPolicy::Client::Configuration::Rpcs}
|
398
|
+
# {::Google::Cloud::Kms::V1::IAMPolicy::Client::Configuration::Rpcs}
|
399
399
|
# for a list of RPCs that can be configured independently.
|
400
400
|
#
|
401
401
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -406,22 +406,22 @@ module Google
|
|
406
406
|
# To modify the global config, setting the timeout for set_iam_policy
|
407
407
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
408
408
|
#
|
409
|
-
# Google::Cloud::Kms::V1::IAMPolicy::Client.configure do |config|
|
410
|
-
# config.timeout =
|
411
|
-
# config.rpcs.set_iam_policy.timeout =
|
409
|
+
# ::Google::Cloud::Kms::V1::IAMPolicy::Client.configure do |config|
|
410
|
+
# config.timeout = 10.0
|
411
|
+
# config.rpcs.set_iam_policy.timeout = 20.0
|
412
412
|
# end
|
413
413
|
#
|
414
414
|
# To apply the above configuration only to a new client:
|
415
415
|
#
|
416
|
-
# client = Google::Cloud::Kms::V1::IAMPolicy::Client.new do |config|
|
417
|
-
# config.timeout =
|
418
|
-
# config.rpcs.set_iam_policy.timeout =
|
416
|
+
# client = ::Google::Cloud::Kms::V1::IAMPolicy::Client.new do |config|
|
417
|
+
# config.timeout = 10.0
|
418
|
+
# config.rpcs.set_iam_policy.timeout = 20.0
|
419
419
|
# end
|
420
420
|
#
|
421
421
|
# @!attribute [rw] endpoint
|
422
422
|
# The hostname or hostname:port of the service endpoint.
|
423
423
|
# Defaults to `"cloudkms.googleapis.com"`.
|
424
|
-
# @return [String]
|
424
|
+
# @return [::String]
|
425
425
|
# @!attribute [rw] credentials
|
426
426
|
# Credentials to send with calls. You may provide any of the following types:
|
427
427
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -433,29 +433,29 @@ module Google
|
|
433
433
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
434
434
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
435
435
|
# * (`nil`) indicating no credentials
|
436
|
-
# @return [Object]
|
436
|
+
# @return [::Object]
|
437
437
|
# @!attribute [rw] scope
|
438
438
|
# The OAuth scopes
|
439
|
-
# @return [Array
|
439
|
+
# @return [::Array<::String>]
|
440
440
|
# @!attribute [rw] lib_name
|
441
441
|
# The library name as recorded in instrumentation and logging
|
442
|
-
# @return [String]
|
442
|
+
# @return [::String]
|
443
443
|
# @!attribute [rw] lib_version
|
444
444
|
# The library version as recorded in instrumentation and logging
|
445
|
-
# @return [String]
|
445
|
+
# @return [::String]
|
446
446
|
# @!attribute [rw] channel_args
|
447
447
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
448
448
|
# `GRPC::Core::Channel` object is provided as the credential.
|
449
|
-
# @return [Hash]
|
449
|
+
# @return [::Hash]
|
450
450
|
# @!attribute [rw] interceptors
|
451
451
|
# An array of interceptors that are run before calls are executed.
|
452
|
-
# @return [Array
|
452
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
453
453
|
# @!attribute [rw] timeout
|
454
|
-
# The call timeout in
|
455
|
-
# @return [Numeric]
|
454
|
+
# The call timeout in seconds.
|
455
|
+
# @return [::Numeric]
|
456
456
|
# @!attribute [rw] metadata
|
457
457
|
# Additional gRPC headers to be sent with the call.
|
458
|
-
# @return [Hash{Symbol
|
458
|
+
# @return [::Hash{::Symbol=>::String}]
|
459
459
|
# @!attribute [rw] retry_policy
|
460
460
|
# The retry policy. The value is a hash with the following keys:
|
461
461
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -463,10 +463,10 @@ module Google
|
|
463
463
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
464
464
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
465
465
|
# trigger a retry.
|
466
|
-
# @return [Hash]
|
466
|
+
# @return [::Hash]
|
467
467
|
#
|
468
468
|
class Configuration
|
469
|
-
extend Gapic::Config
|
469
|
+
extend ::Gapic::Config
|
470
470
|
|
471
471
|
config_attr :endpoint, "cloudkms.googleapis.com", String
|
472
472
|
config_attr :credentials, nil do |value|
|
@@ -474,14 +474,14 @@ module Google
|
|
474
474
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
475
475
|
allowed.any? { |klass| klass === value }
|
476
476
|
end
|
477
|
-
config_attr :scope, nil, String, Array, nil
|
478
|
-
config_attr :lib_name, nil, String, nil
|
479
|
-
config_attr :lib_version, nil, String, nil
|
480
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
|
481
|
-
config_attr :interceptors, nil, Array, nil
|
482
|
-
config_attr :timeout, nil, Numeric, nil
|
483
|
-
config_attr :metadata, nil, Hash, nil
|
484
|
-
config_attr :retry_policy, nil, Hash, Proc, nil
|
477
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
478
|
+
config_attr :lib_name, nil, ::String, nil
|
479
|
+
config_attr :lib_version, nil, ::String, nil
|
480
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
481
|
+
config_attr :interceptors, nil, ::Array, nil
|
482
|
+
config_attr :timeout, nil, ::Numeric, nil
|
483
|
+
config_attr :metadata, nil, ::Hash, nil
|
484
|
+
config_attr :retry_policy, nil, ::Hash, Proc, nil
|
485
485
|
|
486
486
|
# @private
|
487
487
|
def initialize parent_config = nil
|
@@ -522,28 +522,28 @@ module Google
|
|
522
522
|
class Rpcs
|
523
523
|
##
|
524
524
|
# RPC-specific configuration for `set_iam_policy`
|
525
|
-
# @return [Gapic::Config::Method]
|
525
|
+
# @return [::Gapic::Config::Method]
|
526
526
|
#
|
527
527
|
attr_reader :set_iam_policy
|
528
528
|
##
|
529
529
|
# RPC-specific configuration for `get_iam_policy`
|
530
|
-
# @return [Gapic::Config::Method]
|
530
|
+
# @return [::Gapic::Config::Method]
|
531
531
|
#
|
532
532
|
attr_reader :get_iam_policy
|
533
533
|
##
|
534
534
|
# RPC-specific configuration for `test_iam_permissions`
|
535
|
-
# @return [Gapic::Config::Method]
|
535
|
+
# @return [::Gapic::Config::Method]
|
536
536
|
#
|
537
537
|
attr_reader :test_iam_permissions
|
538
538
|
|
539
539
|
# @private
|
540
540
|
def initialize parent_rpcs = nil
|
541
541
|
set_iam_policy_config = parent_rpcs&.set_iam_policy if parent_rpcs&.respond_to? :set_iam_policy
|
542
|
-
@set_iam_policy = Gapic::Config::Method.new set_iam_policy_config
|
542
|
+
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
543
543
|
get_iam_policy_config = parent_rpcs&.get_iam_policy if parent_rpcs&.respond_to? :get_iam_policy
|
544
|
-
@get_iam_policy = Gapic::Config::Method.new get_iam_policy_config
|
544
|
+
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
545
545
|
test_iam_permissions_config = parent_rpcs&.test_iam_permissions if parent_rpcs&.respond_to? :test_iam_permissions
|
546
|
-
@test_iam_permissions = Gapic::Config::Method.new test_iam_permissions_config
|
546
|
+
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
547
547
|
|
548
548
|
yield self if block_given?
|
549
549
|
end
|