google-cloud-kms-v1 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/lib/google/cloud/kms/v1/_helpers.rb +19 -0
- data/lib/google/cloud/kms/v1/ekm_service/client.rb +28 -0
- data/lib/google/cloud/kms/v1/iam_policy/client.rb +21 -332
- data/lib/google/cloud/kms/v1/iam_policy/credentials.rb +6 -2
- data/lib/google/cloud/kms/v1/iam_policy.rb +5 -31
- data/lib/google/cloud/kms/v1/key_management_service/client.rb +28 -0
- data/lib/google/cloud/kms/v1/version.rb +1 -1
- data/lib/google/cloud/kms/v1.rb +0 -1
- data/proto_docs/google/cloud/kms/v1/service.rb +1 -1
- data/proto_docs/google/protobuf/any.rb +141 -0
- metadata +37 -12
- data/proto_docs/google/iam/v1/iam_policy.rb +0 -87
- data/proto_docs/google/iam/v1/options.rb +0 -50
- data/proto_docs/google/iam/v1/policy.rb +0 -418
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b97af8383dd8f5fe6af2b2c709d433be4f6fc494f3af192186ab3f175ef0dc01
|
4
|
+
data.tar.gz: 82b337641b4c0f579971797f901b82db52ad268ca6f8429b3a66cf0aa3b92332
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54f4de5518f911b9c5b076c96297b5d1f9ca5884019d5209afabcaa6d40d5add4c5492b0a50578186514fe1b6e7b60521c2145bb9302339bc8ea379bc877a7cc
|
7
|
+
data.tar.gz: a3ec3fdf9aadd418993c548d30527c7716b5e1e9e4adc9eff0e344448d93eeb4288c770bc7c1d73117e551cdba4dfae82d926a4c453c82b7c67b7e9082ef3a10
|
data/AUTHENTICATION.md
CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
|
|
114
114
|
To configure your system for this, simply:
|
115
115
|
|
116
116
|
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
|
117
|
-
2. Authenticate using OAuth 2.0 `$ gcloud auth login`
|
117
|
+
2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
|
118
118
|
3. Write code as if already authenticated.
|
119
119
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Legacy IAM Policy client
|
18
|
+
# No longer generated, but kept around for backward compatibility.
|
19
|
+
require "google/cloud/kms/v1/iam_policy"
|
@@ -18,6 +18,8 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/kms/v1/ekm_service_pb"
|
21
|
+
require "google/cloud/location"
|
22
|
+
require "google/iam/v1"
|
21
23
|
|
22
24
|
module Google
|
23
25
|
module Cloud
|
@@ -157,6 +159,18 @@ module Google
|
|
157
159
|
@quota_project_id = @config.quota_project
|
158
160
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
159
161
|
|
162
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
163
|
+
config.credentials = credentials
|
164
|
+
config.quota_project = @quota_project_id
|
165
|
+
config.endpoint = @config.endpoint
|
166
|
+
end
|
167
|
+
|
168
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
169
|
+
config.credentials = credentials
|
170
|
+
config.quota_project = @quota_project_id
|
171
|
+
config.endpoint = @config.endpoint
|
172
|
+
end
|
173
|
+
|
160
174
|
@ekm_service_stub = ::Gapic::ServiceStub.new(
|
161
175
|
::Google::Cloud::Kms::V1::EkmService::Stub,
|
162
176
|
credentials: credentials,
|
@@ -166,6 +180,20 @@ module Google
|
|
166
180
|
)
|
167
181
|
end
|
168
182
|
|
183
|
+
##
|
184
|
+
# Get the associated client for mix-in of the Locations.
|
185
|
+
#
|
186
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
187
|
+
#
|
188
|
+
attr_reader :location_client
|
189
|
+
|
190
|
+
##
|
191
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
192
|
+
#
|
193
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
194
|
+
#
|
195
|
+
attr_reader :iam_policy_client
|
196
|
+
|
169
197
|
# Service calls
|
170
198
|
|
171
199
|
##
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
|
-
#
|
17
|
+
# Originally auto-generated by gapic-generator-ruby.
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/iam/v1/iam_policy_pb"
|
@@ -25,56 +25,18 @@ module Google
|
|
25
25
|
module V1
|
26
26
|
module IAMPolicy
|
27
27
|
##
|
28
|
-
#
|
28
|
+
# Legacy IAM Policy client class.
|
29
29
|
#
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
# Manages Identity and Access Management (IAM) policies.
|
34
|
-
#
|
35
|
-
# Any implementation of an API that offers access control features
|
36
|
-
# implements the google.iam.v1.IAMPolicy interface.
|
37
|
-
#
|
38
|
-
# ## Data model
|
39
|
-
#
|
40
|
-
# Access control is applied when a principal (user or service account), takes
|
41
|
-
# some action on a resource exposed by a service. Resources, identified by
|
42
|
-
# URI-like names, are the unit of access control specification. Service
|
43
|
-
# implementations can choose the granularity of access control and the
|
44
|
-
# supported permissions for their resources.
|
45
|
-
# For example one database service may allow access control to be
|
46
|
-
# specified only at the Table level, whereas another might allow access control
|
47
|
-
# to also be specified at the Column level.
|
48
|
-
#
|
49
|
-
# ## Policy Structure
|
50
|
-
#
|
51
|
-
# See google.iam.v1.Policy
|
52
|
-
#
|
53
|
-
# This is intentionally not a CRUD style API because access control policies
|
54
|
-
# are created and deleted implicitly with the resources to which they are
|
55
|
-
# attached.
|
30
|
+
# @deprecated Call `iam_policy_client` on any of the other client
|
31
|
+
# objects to get a client for IAM policies instead of using this
|
32
|
+
# legacy class.
|
56
33
|
#
|
57
34
|
class Client
|
58
35
|
# @private
|
59
36
|
attr_reader :iam_policy_stub
|
60
37
|
|
61
38
|
##
|
62
|
-
#
|
63
|
-
#
|
64
|
-
# See {::Google::Cloud::Kms::V1::IAMPolicy::Client::Configuration}
|
65
|
-
# for a description of the configuration fields.
|
66
|
-
#
|
67
|
-
# @example
|
68
|
-
#
|
69
|
-
# # Modify the configuration for all IAMPolicy clients
|
70
|
-
# ::Google::Cloud::Kms::V1::IAMPolicy::Client.configure do |config|
|
71
|
-
# config.timeout = 10.0
|
72
|
-
# end
|
73
|
-
#
|
74
|
-
# @yield [config] Configure the Client client.
|
75
|
-
# @yieldparam config [Client::Configuration]
|
76
|
-
#
|
77
|
-
# @return [Client::Configuration]
|
39
|
+
# @deprecated
|
78
40
|
#
|
79
41
|
def self.configure
|
80
42
|
@configure ||= begin
|
@@ -94,19 +56,7 @@ module Google
|
|
94
56
|
end
|
95
57
|
|
96
58
|
##
|
97
|
-
#
|
98
|
-
#
|
99
|
-
# The configuration is set to the derived mode, meaning that values can be changed,
|
100
|
-
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
101
|
-
# should be made on {Client.configure}.
|
102
|
-
#
|
103
|
-
# See {::Google::Cloud::Kms::V1::IAMPolicy::Client::Configuration}
|
104
|
-
# for a description of the configuration fields.
|
105
|
-
#
|
106
|
-
# @yield [config] Configure the Client client.
|
107
|
-
# @yieldparam config [Client::Configuration]
|
108
|
-
#
|
109
|
-
# @return [Client::Configuration]
|
59
|
+
# @deprecated
|
110
60
|
#
|
111
61
|
def configure
|
112
62
|
yield @config if block_given?
|
@@ -114,20 +64,7 @@ module Google
|
|
114
64
|
end
|
115
65
|
|
116
66
|
##
|
117
|
-
#
|
118
|
-
#
|
119
|
-
# @example
|
120
|
-
#
|
121
|
-
# # Create a client using the default configuration
|
122
|
-
# client = ::Google::Cloud::Kms::V1::IAMPolicy::Client.new
|
123
|
-
#
|
124
|
-
# # Create a client using a custom configuration
|
125
|
-
# client = ::Google::Cloud::Kms::V1::IAMPolicy::Client.new do |config|
|
126
|
-
# config.timeout = 10.0
|
127
|
-
# end
|
128
|
-
#
|
129
|
-
# @yield [config] Configure the IAMPolicy client.
|
130
|
-
# @yieldparam config [Client::Configuration]
|
67
|
+
# @deprecated
|
131
68
|
#
|
132
69
|
def initialize
|
133
70
|
# These require statements are intentionally placed here to initialize
|
@@ -165,66 +102,8 @@ module Google
|
|
165
102
|
)
|
166
103
|
end
|
167
104
|
|
168
|
-
# Service calls
|
169
|
-
|
170
105
|
##
|
171
|
-
#
|
172
|
-
# existing policy.
|
173
|
-
#
|
174
|
-
# Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
|
175
|
-
#
|
176
|
-
# @overload set_iam_policy(request, options = nil)
|
177
|
-
# Pass arguments to `set_iam_policy` via a request object, either of type
|
178
|
-
# {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
|
179
|
-
#
|
180
|
-
# @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
|
181
|
-
# A request object representing the call parameters. Required. To specify no
|
182
|
-
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
183
|
-
# @param options [::Gapic::CallOptions, ::Hash]
|
184
|
-
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
185
|
-
#
|
186
|
-
# @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
|
187
|
-
# Pass arguments to `set_iam_policy` via keyword arguments. Note that at
|
188
|
-
# least one keyword argument is required. To specify no parameters, or to keep all
|
189
|
-
# the default parameter values, pass an empty Hash as a request object (see above).
|
190
|
-
#
|
191
|
-
# @param resource [::String]
|
192
|
-
# REQUIRED: The resource for which the policy is being specified.
|
193
|
-
# See the operation documentation for the appropriate value for this field.
|
194
|
-
# @param policy [::Google::Iam::V1::Policy, ::Hash]
|
195
|
-
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
196
|
-
# the policy is limited to a few 10s of KB. An empty policy is a
|
197
|
-
# valid policy but certain Cloud Platform services (such as Projects)
|
198
|
-
# might reject them.
|
199
|
-
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
200
|
-
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
201
|
-
# the fields in the mask will be modified. If no mask is provided, the
|
202
|
-
# following default mask is used:
|
203
|
-
#
|
204
|
-
# `paths: "bindings, etag"`
|
205
|
-
#
|
206
|
-
# @yield [response, operation] Access the result along with the RPC operation
|
207
|
-
# @yieldparam response [::Google::Iam::V1::Policy]
|
208
|
-
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
209
|
-
#
|
210
|
-
# @return [::Google::Iam::V1::Policy]
|
211
|
-
#
|
212
|
-
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
213
|
-
#
|
214
|
-
# @example Basic example
|
215
|
-
# require "google/iam/v1"
|
216
|
-
#
|
217
|
-
# # Create a client object. The client can be reused for multiple calls.
|
218
|
-
# client = Google::Cloud::Kms::V1::IAMPolicy::Client.new
|
219
|
-
#
|
220
|
-
# # Create a request. To set request fields, pass in keyword arguments.
|
221
|
-
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
222
|
-
#
|
223
|
-
# # Call the set_iam_policy method.
|
224
|
-
# result = client.set_iam_policy request
|
225
|
-
#
|
226
|
-
# # The returned object is of type Google::Iam::V1::Policy.
|
227
|
-
# p result
|
106
|
+
# @deprecated
|
228
107
|
#
|
229
108
|
def set_iam_policy request, options = nil
|
230
109
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
@@ -268,54 +147,7 @@ module Google
|
|
268
147
|
end
|
269
148
|
|
270
149
|
##
|
271
|
-
#
|
272
|
-
# Returns an empty policy if the resource exists and does not have a policy
|
273
|
-
# set.
|
274
|
-
#
|
275
|
-
# @overload get_iam_policy(request, options = nil)
|
276
|
-
# Pass arguments to `get_iam_policy` via a request object, either of type
|
277
|
-
# {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
|
278
|
-
#
|
279
|
-
# @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
|
280
|
-
# A request object representing the call parameters. Required. To specify no
|
281
|
-
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
282
|
-
# @param options [::Gapic::CallOptions, ::Hash]
|
283
|
-
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
284
|
-
#
|
285
|
-
# @overload get_iam_policy(resource: nil, options: nil)
|
286
|
-
# Pass arguments to `get_iam_policy` via keyword arguments. Note that at
|
287
|
-
# least one keyword argument is required. To specify no parameters, or to keep all
|
288
|
-
# the default parameter values, pass an empty Hash as a request object (see above).
|
289
|
-
#
|
290
|
-
# @param resource [::String]
|
291
|
-
# REQUIRED: The resource for which the policy is being requested.
|
292
|
-
# See the operation documentation for the appropriate value for this field.
|
293
|
-
# @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
|
294
|
-
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
295
|
-
# `GetIamPolicy`.
|
296
|
-
#
|
297
|
-
# @yield [response, operation] Access the result along with the RPC operation
|
298
|
-
# @yieldparam response [::Google::Iam::V1::Policy]
|
299
|
-
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
300
|
-
#
|
301
|
-
# @return [::Google::Iam::V1::Policy]
|
302
|
-
#
|
303
|
-
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
304
|
-
#
|
305
|
-
# @example Basic example
|
306
|
-
# require "google/iam/v1"
|
307
|
-
#
|
308
|
-
# # Create a client object. The client can be reused for multiple calls.
|
309
|
-
# client = Google::Cloud::Kms::V1::IAMPolicy::Client.new
|
310
|
-
#
|
311
|
-
# # Create a request. To set request fields, pass in keyword arguments.
|
312
|
-
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
313
|
-
#
|
314
|
-
# # Call the get_iam_policy method.
|
315
|
-
# result = client.get_iam_policy request
|
316
|
-
#
|
317
|
-
# # The returned object is of type Google::Iam::V1::Policy.
|
318
|
-
# p result
|
150
|
+
# @deprecated
|
319
151
|
#
|
320
152
|
def get_iam_policy request, options = nil
|
321
153
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
@@ -359,60 +191,7 @@ module Google
|
|
359
191
|
end
|
360
192
|
|
361
193
|
##
|
362
|
-
#
|
363
|
-
# If the resource does not exist, this will return an empty set of
|
364
|
-
# permissions, not a `NOT_FOUND` error.
|
365
|
-
#
|
366
|
-
# Note: This operation is designed to be used for building permission-aware
|
367
|
-
# UIs and command-line tools, not for authorization checking. This operation
|
368
|
-
# may "fail open" without warning.
|
369
|
-
#
|
370
|
-
# @overload test_iam_permissions(request, options = nil)
|
371
|
-
# Pass arguments to `test_iam_permissions` via a request object, either of type
|
372
|
-
# {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
|
373
|
-
#
|
374
|
-
# @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
|
375
|
-
# A request object representing the call parameters. Required. To specify no
|
376
|
-
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
377
|
-
# @param options [::Gapic::CallOptions, ::Hash]
|
378
|
-
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
379
|
-
#
|
380
|
-
# @overload test_iam_permissions(resource: nil, permissions: nil)
|
381
|
-
# Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
|
382
|
-
# least one keyword argument is required. To specify no parameters, or to keep all
|
383
|
-
# the default parameter values, pass an empty Hash as a request object (see above).
|
384
|
-
#
|
385
|
-
# @param resource [::String]
|
386
|
-
# REQUIRED: The resource for which the policy detail is being requested.
|
387
|
-
# See the operation documentation for the appropriate value for this field.
|
388
|
-
# @param permissions [::Array<::String>]
|
389
|
-
# The set of permissions to check for the `resource`. Permissions with
|
390
|
-
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
391
|
-
# information see
|
392
|
-
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
393
|
-
#
|
394
|
-
# @yield [response, operation] Access the result along with the RPC operation
|
395
|
-
# @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
|
396
|
-
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
397
|
-
#
|
398
|
-
# @return [::Google::Iam::V1::TestIamPermissionsResponse]
|
399
|
-
#
|
400
|
-
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
401
|
-
#
|
402
|
-
# @example Basic example
|
403
|
-
# require "google/iam/v1"
|
404
|
-
#
|
405
|
-
# # Create a client object. The client can be reused for multiple calls.
|
406
|
-
# client = Google::Cloud::Kms::V1::IAMPolicy::Client.new
|
407
|
-
#
|
408
|
-
# # Create a request. To set request fields, pass in keyword arguments.
|
409
|
-
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
410
|
-
#
|
411
|
-
# # Call the test_iam_permissions method.
|
412
|
-
# result = client.test_iam_permissions request
|
413
|
-
#
|
414
|
-
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
415
|
-
# p result
|
194
|
+
# @deprecated
|
416
195
|
#
|
417
196
|
def test_iam_permissions request, options = nil
|
418
197
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
@@ -456,83 +235,9 @@ module Google
|
|
456
235
|
end
|
457
236
|
|
458
237
|
##
|
459
|
-
#
|
460
|
-
#
|
461
|
-
#
|
462
|
-
# providing control over timeouts, retry behavior, logging, transport
|
463
|
-
# parameters, and other low-level controls. Certain parameters can also be
|
464
|
-
# applied individually to specific RPCs. See
|
465
|
-
# {::Google::Cloud::Kms::V1::IAMPolicy::Client::Configuration::Rpcs}
|
466
|
-
# for a list of RPCs that can be configured independently.
|
467
|
-
#
|
468
|
-
# Configuration can be applied globally to all clients, or to a single client
|
469
|
-
# on construction.
|
470
|
-
#
|
471
|
-
# @example
|
472
|
-
#
|
473
|
-
# # Modify the global config, setting the timeout for
|
474
|
-
# # set_iam_policy to 20 seconds,
|
475
|
-
# # and all remaining timeouts to 10 seconds.
|
476
|
-
# ::Google::Cloud::Kms::V1::IAMPolicy::Client.configure do |config|
|
477
|
-
# config.timeout = 10.0
|
478
|
-
# config.rpcs.set_iam_policy.timeout = 20.0
|
479
|
-
# end
|
480
|
-
#
|
481
|
-
# # Apply the above configuration only to a new client.
|
482
|
-
# client = ::Google::Cloud::Kms::V1::IAMPolicy::Client.new do |config|
|
483
|
-
# config.timeout = 10.0
|
484
|
-
# config.rpcs.set_iam_policy.timeout = 20.0
|
485
|
-
# end
|
486
|
-
#
|
487
|
-
# @!attribute [rw] endpoint
|
488
|
-
# The hostname or hostname:port of the service endpoint.
|
489
|
-
# Defaults to `"cloudkms.googleapis.com"`.
|
490
|
-
# @return [::String]
|
491
|
-
# @!attribute [rw] credentials
|
492
|
-
# Credentials to send with calls. You may provide any of the following types:
|
493
|
-
# * (`String`) The path to a service account key file in JSON format
|
494
|
-
# * (`Hash`) A service account key as a Hash
|
495
|
-
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
496
|
-
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
497
|
-
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
498
|
-
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
499
|
-
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
500
|
-
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
501
|
-
# * (`nil`) indicating no credentials
|
502
|
-
# @return [::Object]
|
503
|
-
# @!attribute [rw] scope
|
504
|
-
# The OAuth scopes
|
505
|
-
# @return [::Array<::String>]
|
506
|
-
# @!attribute [rw] lib_name
|
507
|
-
# The library name as recorded in instrumentation and logging
|
508
|
-
# @return [::String]
|
509
|
-
# @!attribute [rw] lib_version
|
510
|
-
# The library version as recorded in instrumentation and logging
|
511
|
-
# @return [::String]
|
512
|
-
# @!attribute [rw] channel_args
|
513
|
-
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
514
|
-
# `GRPC::Core::Channel` object is provided as the credential.
|
515
|
-
# @return [::Hash]
|
516
|
-
# @!attribute [rw] interceptors
|
517
|
-
# An array of interceptors that are run before calls are executed.
|
518
|
-
# @return [::Array<::GRPC::ClientInterceptor>]
|
519
|
-
# @!attribute [rw] timeout
|
520
|
-
# The call timeout in seconds.
|
521
|
-
# @return [::Numeric]
|
522
|
-
# @!attribute [rw] metadata
|
523
|
-
# Additional gRPC headers to be sent with the call.
|
524
|
-
# @return [::Hash{::Symbol=>::String}]
|
525
|
-
# @!attribute [rw] retry_policy
|
526
|
-
# The retry policy. The value is a hash with the following keys:
|
527
|
-
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
528
|
-
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
529
|
-
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
530
|
-
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
531
|
-
# trigger a retry.
|
532
|
-
# @return [::Hash]
|
533
|
-
# @!attribute [rw] quota_project
|
534
|
-
# A separate project against which to charge quota.
|
535
|
-
# @return [::String]
|
238
|
+
# @deprecated Call `iam_policy_client` on any of the other client
|
239
|
+
# objects to get a client for IAM policies instead of using this
|
240
|
+
# legacy class.
|
536
241
|
#
|
537
242
|
class Configuration
|
538
243
|
extend ::Gapic::Config
|
@@ -561,8 +266,7 @@ module Google
|
|
561
266
|
end
|
562
267
|
|
563
268
|
##
|
564
|
-
#
|
565
|
-
# @return [Rpcs]
|
269
|
+
# @deprecated
|
566
270
|
#
|
567
271
|
def rpcs
|
568
272
|
@rpcs ||= begin
|
@@ -573,36 +277,21 @@ module Google
|
|
573
277
|
end
|
574
278
|
|
575
279
|
##
|
576
|
-
#
|
577
|
-
#
|
578
|
-
#
|
579
|
-
# Each configuration object is of type `Gapic::Config::Method` and includes
|
580
|
-
# the following configuration fields:
|
581
|
-
#
|
582
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
583
|
-
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
584
|
-
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
585
|
-
# include the following keys:
|
586
|
-
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
587
|
-
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
588
|
-
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
589
|
-
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
590
|
-
# trigger a retry.
|
280
|
+
# @deprecated Call `iam_policy_client` on any of the other client
|
281
|
+
# objects to get a client for IAM policies instead of using this
|
282
|
+
# legacy class.
|
591
283
|
#
|
592
284
|
class Rpcs
|
593
285
|
##
|
594
|
-
#
|
595
|
-
# @return [::Gapic::Config::Method]
|
286
|
+
# @deprecated
|
596
287
|
#
|
597
288
|
attr_reader :set_iam_policy
|
598
289
|
##
|
599
|
-
#
|
600
|
-
# @return [::Gapic::Config::Method]
|
290
|
+
# @deprecated
|
601
291
|
#
|
602
292
|
attr_reader :get_iam_policy
|
603
293
|
##
|
604
|
-
#
|
605
|
-
# @return [::Gapic::Config::Method]
|
294
|
+
# @deprecated
|
606
295
|
#
|
607
296
|
attr_reader :test_iam_permissions
|
608
297
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
|
-
#
|
17
|
+
# Originally auto-generated by gapic-generator-ruby.
|
18
18
|
|
19
19
|
require "googleauth"
|
20
20
|
|
@@ -23,7 +23,11 @@ module Google
|
|
23
23
|
module Kms
|
24
24
|
module V1
|
25
25
|
module IAMPolicy
|
26
|
-
|
26
|
+
##
|
27
|
+
# @deprecated Call `iam_policy_client` on any of the other client
|
28
|
+
# objects to get a client for IAM policies instead of using this
|
29
|
+
# legacy class.
|
30
|
+
#
|
27
31
|
class Credentials < ::Google::Auth::Credentials
|
28
32
|
self.scope = [
|
29
33
|
"https://www.googleapis.com/auth/cloud-platform",
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
|
-
#
|
17
|
+
# Originally auto-generated by gapic-generator-ruby.
|
18
18
|
|
19
19
|
require "gapic/common"
|
20
20
|
require "gapic/config"
|
@@ -30,37 +30,11 @@ module Google
|
|
30
30
|
module Kms
|
31
31
|
module V1
|
32
32
|
##
|
33
|
-
#
|
33
|
+
# This module contains the legacy IAM Policy client.
|
34
34
|
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
# Any implementation of an API that offers access control features
|
39
|
-
# implements the google.iam.v1.IAMPolicy interface.
|
40
|
-
#
|
41
|
-
# ## Data model
|
42
|
-
#
|
43
|
-
# Access control is applied when a principal (user or service account), takes
|
44
|
-
# some action on a resource exposed by a service. Resources, identified by
|
45
|
-
# URI-like names, are the unit of access control specification. Service
|
46
|
-
# implementations can choose the granularity of access control and the
|
47
|
-
# supported permissions for their resources.
|
48
|
-
# For example one database service may allow access control to be
|
49
|
-
# specified only at the Table level, whereas another might allow access control
|
50
|
-
# to also be specified at the Column level.
|
51
|
-
#
|
52
|
-
# ## Policy Structure
|
53
|
-
#
|
54
|
-
# See google.iam.v1.Policy
|
55
|
-
#
|
56
|
-
# This is intentionally not a CRUD style API because access control policies
|
57
|
-
# are created and deleted implicitly with the resources to which they are
|
58
|
-
# attached.
|
59
|
-
#
|
60
|
-
# To load this service and instantiate a client:
|
61
|
-
#
|
62
|
-
# require "google/cloud/kms/v1/iam_policy"
|
63
|
-
# client = ::Google::Cloud::Kms::V1::IAMPolicy::Client.new
|
35
|
+
# @deprecated Call `iam_policy_client` on any of the other client
|
36
|
+
# objects to get a client for IAM policies instead of using this
|
37
|
+
# legacy class.
|
64
38
|
#
|
65
39
|
module IAMPolicy
|
66
40
|
end
|
@@ -18,6 +18,8 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/kms/v1/service_pb"
|
21
|
+
require "google/cloud/location"
|
22
|
+
require "google/iam/v1"
|
21
23
|
|
22
24
|
module Google
|
23
25
|
module Cloud
|
@@ -268,6 +270,18 @@ module Google
|
|
268
270
|
@quota_project_id = @config.quota_project
|
269
271
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
270
272
|
|
273
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
274
|
+
config.credentials = credentials
|
275
|
+
config.quota_project = @quota_project_id
|
276
|
+
config.endpoint = @config.endpoint
|
277
|
+
end
|
278
|
+
|
279
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
280
|
+
config.credentials = credentials
|
281
|
+
config.quota_project = @quota_project_id
|
282
|
+
config.endpoint = @config.endpoint
|
283
|
+
end
|
284
|
+
|
271
285
|
@key_management_service_stub = ::Gapic::ServiceStub.new(
|
272
286
|
::Google::Cloud::Kms::V1::KeyManagementService::Stub,
|
273
287
|
credentials: credentials,
|
@@ -277,6 +291,20 @@ module Google
|
|
277
291
|
)
|
278
292
|
end
|
279
293
|
|
294
|
+
##
|
295
|
+
# Get the associated client for mix-in of the Locations.
|
296
|
+
#
|
297
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
298
|
+
#
|
299
|
+
attr_reader :location_client
|
300
|
+
|
301
|
+
##
|
302
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
303
|
+
#
|
304
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
305
|
+
#
|
306
|
+
attr_reader :iam_policy_client
|
307
|
+
|
280
308
|
# Service calls
|
281
309
|
|
282
310
|
##
|