google-iam-v1 0.5.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/iam/v1/iam_policy/client.rb +41 -9
- data/lib/google/iam/v1/iam_policy/rest/client.rb +81 -7
- data/lib/google/iam/v1/iam_policy/rest/service_stub.rb +14 -2
- data/lib/google/iam/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +14 -0
- data/proto_docs/google/api/field_behavior.rb +14 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c1aa60d20b9bcdcbd93ef1691e434b0a5ff9417259670d309aca6772527ac7e
|
4
|
+
data.tar.gz: 856264752c37948694d3b1f5ccc11615d51ae30c2c80bbe757fb847f65d76ee8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ee7d93f54a5d64a20928f5148d51530e4c30f98e59980959cfd03761c1a5a297dbc12020676358fe467e5bfc0a084da08ac474bb14326f9ac75ca558d2424ab
|
7
|
+
data.tar.gz: '096d35acc2c9625891942dc3562eeaebbb14c544eddc6c17ddde1186afdb919b3b20fa52bf2932380b7d8e5cac280cc8e4b2f040e88aebf576ed2999cf89312f'
|
@@ -54,6 +54,9 @@ module Google
|
|
54
54
|
# attached.
|
55
55
|
#
|
56
56
|
class Client
|
57
|
+
# @private
|
58
|
+
DEFAULT_ENDPOINT_TEMPLATE = "iam-meta-api.$UNIVERSE_DOMAIN$"
|
59
|
+
|
57
60
|
# @private
|
58
61
|
attr_reader :iam_policy_stub
|
59
62
|
|
@@ -112,6 +115,15 @@ module Google
|
|
112
115
|
@config
|
113
116
|
end
|
114
117
|
|
118
|
+
##
|
119
|
+
# The effective universe domain
|
120
|
+
#
|
121
|
+
# @return [String]
|
122
|
+
#
|
123
|
+
def universe_domain
|
124
|
+
@iam_policy_stub.universe_domain
|
125
|
+
end
|
126
|
+
|
115
127
|
##
|
116
128
|
# Create a new IAMPolicy client object.
|
117
129
|
#
|
@@ -145,8 +157,9 @@ module Google
|
|
145
157
|
credentials = @config.credentials
|
146
158
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
147
159
|
# but only if the default endpoint does not have a region prefix.
|
148
|
-
enable_self_signed_jwt = @config.endpoint
|
149
|
-
|
160
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
161
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
162
|
+
!@config.endpoint.split(".").first.include?("-"))
|
150
163
|
credentials ||= Credentials.default scope: @config.scope,
|
151
164
|
enable_self_signed_jwt: enable_self_signed_jwt
|
152
165
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -157,10 +170,13 @@ module Google
|
|
157
170
|
|
158
171
|
@iam_policy_stub = ::Gapic::ServiceStub.new(
|
159
172
|
::Google::Iam::V1::IAMPolicy::Stub,
|
160
|
-
credentials:
|
161
|
-
endpoint:
|
173
|
+
credentials: credentials,
|
174
|
+
endpoint: @config.endpoint,
|
175
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
176
|
+
universe_domain: @config.universe_domain,
|
162
177
|
channel_args: @config.channel_args,
|
163
|
-
interceptors: @config.interceptors
|
178
|
+
interceptors: @config.interceptors,
|
179
|
+
channel_pool_config: @config.channel_pool
|
164
180
|
)
|
165
181
|
end
|
166
182
|
|
@@ -484,9 +500,9 @@ module Google
|
|
484
500
|
# end
|
485
501
|
#
|
486
502
|
# @!attribute [rw] endpoint
|
487
|
-
#
|
488
|
-
#
|
489
|
-
# @return [::String]
|
503
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
504
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
505
|
+
# @return [::String,nil]
|
490
506
|
# @!attribute [rw] credentials
|
491
507
|
# Credentials to send with calls. You may provide any of the following types:
|
492
508
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -532,13 +548,20 @@ module Google
|
|
532
548
|
# @!attribute [rw] quota_project
|
533
549
|
# A separate project against which to charge quota.
|
534
550
|
# @return [::String]
|
551
|
+
# @!attribute [rw] universe_domain
|
552
|
+
# The universe domain within which to make requests. This determines the
|
553
|
+
# default endpoint URL. The default value of nil uses the environment
|
554
|
+
# universe (usually the default "googleapis.com" universe).
|
555
|
+
# @return [::String,nil]
|
535
556
|
#
|
536
557
|
class Configuration
|
537
558
|
extend ::Gapic::Config
|
538
559
|
|
560
|
+
# @private
|
561
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
539
562
|
DEFAULT_ENDPOINT = "iam-meta-api.googleapis.com"
|
540
563
|
|
541
|
-
config_attr :endpoint,
|
564
|
+
config_attr :endpoint, nil, ::String, nil
|
542
565
|
config_attr :credentials, nil do |value|
|
543
566
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
544
567
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -553,6 +576,7 @@ module Google
|
|
553
576
|
config_attr :metadata, nil, ::Hash, nil
|
554
577
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
555
578
|
config_attr :quota_project, nil, ::String, nil
|
579
|
+
config_attr :universe_domain, nil, ::String, nil
|
556
580
|
|
557
581
|
# @private
|
558
582
|
def initialize parent_config = nil
|
@@ -573,6 +597,14 @@ module Google
|
|
573
597
|
end
|
574
598
|
end
|
575
599
|
|
600
|
+
##
|
601
|
+
# Configuration for the channel pool
|
602
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
603
|
+
#
|
604
|
+
def channel_pool
|
605
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
606
|
+
end
|
607
|
+
|
576
608
|
##
|
577
609
|
# Configuration RPC class for the IAMPolicy API.
|
578
610
|
#
|
@@ -56,6 +56,9 @@ module Google
|
|
56
56
|
# attached.
|
57
57
|
#
|
58
58
|
class Client
|
59
|
+
# @private
|
60
|
+
DEFAULT_ENDPOINT_TEMPLATE = "iam-meta-api.$UNIVERSE_DOMAIN$"
|
61
|
+
|
59
62
|
# @private
|
60
63
|
attr_reader :iam_policy_stub
|
61
64
|
|
@@ -114,6 +117,15 @@ module Google
|
|
114
117
|
@config
|
115
118
|
end
|
116
119
|
|
120
|
+
##
|
121
|
+
# The effective universe domain
|
122
|
+
#
|
123
|
+
# @return [String]
|
124
|
+
#
|
125
|
+
def universe_domain
|
126
|
+
@iam_policy_stub.universe_domain
|
127
|
+
end
|
128
|
+
|
117
129
|
##
|
118
130
|
# Create a new IAMPolicy REST client object.
|
119
131
|
#
|
@@ -141,8 +153,9 @@ module Google
|
|
141
153
|
credentials = @config.credentials
|
142
154
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
143
155
|
# but only if the default endpoint does not have a region prefix.
|
144
|
-
enable_self_signed_jwt = @config.endpoint
|
145
|
-
|
156
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
157
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
158
|
+
!@config.endpoint.split(".").first.include?("-"))
|
146
159
|
credentials ||= Credentials.default scope: @config.scope,
|
147
160
|
enable_self_signed_jwt: enable_self_signed_jwt
|
148
161
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -152,7 +165,12 @@ module Google
|
|
152
165
|
@quota_project_id = @config.quota_project
|
153
166
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
154
167
|
|
155
|
-
@iam_policy_stub = ::Google::Iam::V1::IAMPolicy::Rest::ServiceStub.new
|
168
|
+
@iam_policy_stub = ::Google::Iam::V1::IAMPolicy::Rest::ServiceStub.new(
|
169
|
+
endpoint: @config.endpoint,
|
170
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
171
|
+
universe_domain: @config.universe_domain,
|
172
|
+
credentials: credentials
|
173
|
+
)
|
156
174
|
end
|
157
175
|
|
158
176
|
# Service calls
|
@@ -199,6 +217,22 @@ module Google
|
|
199
217
|
# @return [::Google::Iam::V1::Policy]
|
200
218
|
#
|
201
219
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
220
|
+
#
|
221
|
+
# @example Basic example
|
222
|
+
# require "google/iam/v1"
|
223
|
+
#
|
224
|
+
# # Create a client object. The client can be reused for multiple calls.
|
225
|
+
# client = Google::Iam::V1::IAMPolicy::Rest::Client.new
|
226
|
+
#
|
227
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
228
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
229
|
+
#
|
230
|
+
# # Call the set_iam_policy method.
|
231
|
+
# result = client.set_iam_policy request
|
232
|
+
#
|
233
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
234
|
+
# p result
|
235
|
+
#
|
202
236
|
def set_iam_policy request, options = nil
|
203
237
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
204
238
|
|
@@ -269,6 +303,22 @@ module Google
|
|
269
303
|
# @return [::Google::Iam::V1::Policy]
|
270
304
|
#
|
271
305
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
306
|
+
#
|
307
|
+
# @example Basic example
|
308
|
+
# require "google/iam/v1"
|
309
|
+
#
|
310
|
+
# # Create a client object. The client can be reused for multiple calls.
|
311
|
+
# client = Google::Iam::V1::IAMPolicy::Rest::Client.new
|
312
|
+
#
|
313
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
314
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
315
|
+
#
|
316
|
+
# # Call the get_iam_policy method.
|
317
|
+
# result = client.get_iam_policy request
|
318
|
+
#
|
319
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
320
|
+
# p result
|
321
|
+
#
|
272
322
|
def get_iam_policy request, options = nil
|
273
323
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
274
324
|
|
@@ -345,6 +395,22 @@ module Google
|
|
345
395
|
# @return [::Google::Iam::V1::TestIamPermissionsResponse]
|
346
396
|
#
|
347
397
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
398
|
+
#
|
399
|
+
# @example Basic example
|
400
|
+
# require "google/iam/v1"
|
401
|
+
#
|
402
|
+
# # Create a client object. The client can be reused for multiple calls.
|
403
|
+
# client = Google::Iam::V1::IAMPolicy::Rest::Client.new
|
404
|
+
#
|
405
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
406
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
407
|
+
#
|
408
|
+
# # Call the test_iam_permissions method.
|
409
|
+
# result = client.test_iam_permissions request
|
410
|
+
#
|
411
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
412
|
+
# p result
|
413
|
+
#
|
348
414
|
def test_iam_permissions request, options = nil
|
349
415
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
350
416
|
|
@@ -412,9 +478,9 @@ module Google
|
|
412
478
|
# end
|
413
479
|
#
|
414
480
|
# @!attribute [rw] endpoint
|
415
|
-
#
|
416
|
-
#
|
417
|
-
# @return [::String]
|
481
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
482
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
483
|
+
# @return [::String,nil]
|
418
484
|
# @!attribute [rw] credentials
|
419
485
|
# Credentials to send with calls. You may provide any of the following types:
|
420
486
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -451,13 +517,20 @@ module Google
|
|
451
517
|
# @!attribute [rw] quota_project
|
452
518
|
# A separate project against which to charge quota.
|
453
519
|
# @return [::String]
|
520
|
+
# @!attribute [rw] universe_domain
|
521
|
+
# The universe domain within which to make requests. This determines the
|
522
|
+
# default endpoint URL. The default value of nil uses the environment
|
523
|
+
# universe (usually the default "googleapis.com" universe).
|
524
|
+
# @return [::String,nil]
|
454
525
|
#
|
455
526
|
class Configuration
|
456
527
|
extend ::Gapic::Config
|
457
528
|
|
529
|
+
# @private
|
530
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
458
531
|
DEFAULT_ENDPOINT = "iam-meta-api.googleapis.com"
|
459
532
|
|
460
|
-
config_attr :endpoint,
|
533
|
+
config_attr :endpoint, nil, ::String, nil
|
461
534
|
config_attr :credentials, nil do |value|
|
462
535
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
463
536
|
allowed.any? { |klass| klass === value }
|
@@ -469,6 +542,7 @@ module Google
|
|
469
542
|
config_attr :metadata, nil, ::Hash, nil
|
470
543
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
471
544
|
config_attr :quota_project, nil, ::String, nil
|
545
|
+
config_attr :universe_domain, nil, ::String, nil
|
472
546
|
|
473
547
|
# @private
|
474
548
|
# Overrides for http bindings for the RPCs of this service
|
@@ -29,16 +29,28 @@ module Google
|
|
29
29
|
# including transcoding, making the REST call, and deserialing the response.
|
30
30
|
#
|
31
31
|
class ServiceStub
|
32
|
-
def initialize endpoint:, credentials:
|
32
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
33
33
|
# These require statements are intentionally placed here to initialize
|
34
34
|
# the REST modules only when it's required.
|
35
35
|
require "gapic/rest"
|
36
36
|
|
37
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
37
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
38
|
+
endpoint_template: endpoint_template,
|
39
|
+
universe_domain: universe_domain,
|
40
|
+
credentials: credentials,
|
38
41
|
numeric_enums: false,
|
39
42
|
raise_faraday_errors: false
|
40
43
|
end
|
41
44
|
|
45
|
+
##
|
46
|
+
# The effective universe domain
|
47
|
+
#
|
48
|
+
# @return [String]
|
49
|
+
#
|
50
|
+
def universe_domain
|
51
|
+
@client_stub.universe_domain
|
52
|
+
end
|
53
|
+
|
42
54
|
##
|
43
55
|
# Baseline implementation for the set_iam_policy REST call
|
44
56
|
#
|
@@ -21,6 +21,7 @@ module Google
|
|
21
21
|
module Api
|
22
22
|
# Required information for every language.
|
23
23
|
# @!attribute [rw] reference_docs_uri
|
24
|
+
# @deprecated This field is deprecated and may be removed in the next major version update.
|
24
25
|
# @return [::String]
|
25
26
|
# Link to automatically generated reference documentation. Example:
|
26
27
|
# https://cloud.google.com/nodejs/docs/reference/asset/latest
|
@@ -304,6 +305,19 @@ module Google
|
|
304
305
|
# seconds: 360 # 6 minutes
|
305
306
|
# total_poll_timeout:
|
306
307
|
# seconds: 54000 # 90 minutes
|
308
|
+
# @!attribute [rw] auto_populated_fields
|
309
|
+
# @return [::Array<::String>]
|
310
|
+
# List of top-level fields of the request message, that should be
|
311
|
+
# automatically populated by the client libraries based on their
|
312
|
+
# (google.api.field_info).format. Currently supported format: UUID4.
|
313
|
+
#
|
314
|
+
# Example of a YAML configuration:
|
315
|
+
#
|
316
|
+
# publishing:
|
317
|
+
# method_settings:
|
318
|
+
# - selector: google.example.v1.ExampleService.CreateExample
|
319
|
+
# auto_populated_fields:
|
320
|
+
# - request_id
|
307
321
|
class MethodSettings
|
308
322
|
include ::Google::Protobuf::MessageExts
|
309
323
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -66,6 +66,20 @@ module Google
|
|
66
66
|
# a non-empty value will be returned. The user will not be aware of what
|
67
67
|
# non-empty value to expect.
|
68
68
|
NON_EMPTY_DEFAULT = 7
|
69
|
+
|
70
|
+
# Denotes that the field in a resource (a message annotated with
|
71
|
+
# google.api.resource) is used in the resource name to uniquely identify the
|
72
|
+
# resource. For AIP-compliant APIs, this should only be applied to the
|
73
|
+
# `name` field on the resource.
|
74
|
+
#
|
75
|
+
# This behavior should not be applied to references to other resources within
|
76
|
+
# the message.
|
77
|
+
#
|
78
|
+
# The identifier field of resources often have different field behavior
|
79
|
+
# depending on the request it is embedded in (e.g. for Create methods name
|
80
|
+
# is optional and unused, while for Update methods it is required). Instead
|
81
|
+
# of method-specific annotations, only `IDENTIFIER` is required.
|
82
|
+
IDENTIFIER = 8
|
69
83
|
end
|
70
84
|
end
|
71
85
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-iam-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.21.1
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.21.1
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -227,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
227
227
|
- !ruby/object:Gem::Version
|
228
228
|
version: '0'
|
229
229
|
requirements: []
|
230
|
-
rubygems_version: 3.
|
230
|
+
rubygems_version: 3.5.3
|
231
231
|
signing_key:
|
232
232
|
specification_version: 4
|
233
233
|
summary: Manages access control for Google Cloud Platform resources.
|