google-iam-credentials-v1 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba1c2265f108a3b4c4c4fc7fe152c8c710f898eef227b9112169fd050905a961
4
- data.tar.gz: 8846283261b2ad64ea933239f679dbdd4ab75b72bba20378658e34cde0c7a35f
3
+ metadata.gz: cdf3593be310d601478b76e17a7dd1cb3f7a48a1f48603a845b7b0d25997e33a
4
+ data.tar.gz: cb29d02595087e8ebb14bbfedc7e013938e4d234dcdfd9527e2686915cde26b8
5
5
  SHA512:
6
- metadata.gz: e84740ebee8230ee5d43bfda5d5b7f65fb3a9f49ee245411c79e6ac182d0a4aebb62fa9835e21cfdd6d005d2c523181649045726129e1b381ebb35b0a4bb3dc9
7
- data.tar.gz: 220b7ef8e4e5ddcf175cd729e114fb1759fe17a53c759363fc9a38adfc905a69cd1bd527a77561a07bb4d9eef639f4c19211f9931ef6b0bd8e592805d0494b75
6
+ metadata.gz: dcc4952080c188b49a6135f2b972920bbaf181478f6cf4b79b31b7b39732138a0cbe44af50811fa93509a832b1fc22454cf83e6550145ed0a0d258ffa003d7cf
7
+ data.tar.gz: ab61eb785532aafbce41006df457b0c96944c26a30bb33ea277b4e99cea4cde89169474cf61a8f516d0ec0914974519e5c365639131ebf99cc0ddb166e7962a4
@@ -151,7 +151,7 @@ module Google
151
151
  credentials = @config.credentials
152
152
  # Use self-signed JWT if the endpoint is unchanged from default,
153
153
  # but only if the default endpoint does not have a region prefix.
154
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
154
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
155
155
  !@config.endpoint.split(".").first.include?("-")
156
156
  credentials ||= Credentials.default scope: @config.scope,
157
157
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -166,7 +166,8 @@ module Google
166
166
  credentials: credentials,
167
167
  endpoint: @config.endpoint,
168
168
  channel_args: @config.channel_args,
169
- interceptors: @config.interceptors
169
+ interceptors: @config.interceptors,
170
+ channel_pool_config: @config.channel_pool
170
171
  )
171
172
  end
172
173
 
@@ -670,7 +671,9 @@ module Google
670
671
  class Configuration
671
672
  extend ::Gapic::Config
672
673
 
673
- config_attr :endpoint, "iamcredentials.googleapis.com", ::String
674
+ DEFAULT_ENDPOINT = "iamcredentials.googleapis.com"
675
+
676
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
674
677
  config_attr :credentials, nil do |value|
675
678
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
676
679
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -705,6 +708,14 @@ module Google
705
708
  end
706
709
  end
707
710
 
711
+ ##
712
+ # Configuration for the channel pool
713
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
714
+ #
715
+ def channel_pool
716
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
717
+ end
718
+
708
719
  ##
709
720
  # Configuration RPC class for the IAMCredentials API.
710
721
  #
@@ -147,7 +147,7 @@ module Google
147
147
  credentials = @config.credentials
148
148
  # Use self-signed JWT if the endpoint is unchanged from default,
149
149
  # but only if the default endpoint does not have a region prefix.
150
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
150
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
151
151
  !@config.endpoint.split(".").first.include?("-")
152
152
  credentials ||= Credentials.default scope: @config.scope,
153
153
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -214,6 +214,22 @@ module Google
214
214
  # @return [::Google::Iam::Credentials::V1::GenerateAccessTokenResponse]
215
215
  #
216
216
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
217
+ #
218
+ # @example Basic example
219
+ # require "google/iam/credentials/v1"
220
+ #
221
+ # # Create a client object. The client can be reused for multiple calls.
222
+ # client = Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new
223
+ #
224
+ # # Create a request. To set request fields, pass in keyword arguments.
225
+ # request = Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new
226
+ #
227
+ # # Call the generate_access_token method.
228
+ # result = client.generate_access_token request
229
+ #
230
+ # # The returned object is of type Google::Iam::Credentials::V1::GenerateAccessTokenResponse.
231
+ # p result
232
+ #
217
233
  def generate_access_token request, options = nil
218
234
  raise ::ArgumentError, "request must be provided" if request.nil?
219
235
 
@@ -296,6 +312,22 @@ module Google
296
312
  # @return [::Google::Iam::Credentials::V1::GenerateIdTokenResponse]
297
313
  #
298
314
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
315
+ #
316
+ # @example Basic example
317
+ # require "google/iam/credentials/v1"
318
+ #
319
+ # # Create a client object. The client can be reused for multiple calls.
320
+ # client = Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new
321
+ #
322
+ # # Create a request. To set request fields, pass in keyword arguments.
323
+ # request = Google::Iam::Credentials::V1::GenerateIdTokenRequest.new
324
+ #
325
+ # # Call the generate_id_token method.
326
+ # result = client.generate_id_token request
327
+ #
328
+ # # The returned object is of type Google::Iam::Credentials::V1::GenerateIdTokenResponse.
329
+ # p result
330
+ #
299
331
  def generate_id_token request, options = nil
300
332
  raise ::ArgumentError, "request must be provided" if request.nil?
301
333
 
@@ -374,6 +406,22 @@ module Google
374
406
  # @return [::Google::Iam::Credentials::V1::SignBlobResponse]
375
407
  #
376
408
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
409
+ #
410
+ # @example Basic example
411
+ # require "google/iam/credentials/v1"
412
+ #
413
+ # # Create a client object. The client can be reused for multiple calls.
414
+ # client = Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new
415
+ #
416
+ # # Create a request. To set request fields, pass in keyword arguments.
417
+ # request = Google::Iam::Credentials::V1::SignBlobRequest.new
418
+ #
419
+ # # Call the sign_blob method.
420
+ # result = client.sign_blob request
421
+ #
422
+ # # The returned object is of type Google::Iam::Credentials::V1::SignBlobResponse.
423
+ # p result
424
+ #
377
425
  def sign_blob request, options = nil
378
426
  raise ::ArgumentError, "request must be provided" if request.nil?
379
427
 
@@ -452,6 +500,22 @@ module Google
452
500
  # @return [::Google::Iam::Credentials::V1::SignJwtResponse]
453
501
  #
454
502
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
503
+ #
504
+ # @example Basic example
505
+ # require "google/iam/credentials/v1"
506
+ #
507
+ # # Create a client object. The client can be reused for multiple calls.
508
+ # client = Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new
509
+ #
510
+ # # Create a request. To set request fields, pass in keyword arguments.
511
+ # request = Google::Iam::Credentials::V1::SignJwtRequest.new
512
+ #
513
+ # # Call the sign_jwt method.
514
+ # result = client.sign_jwt request
515
+ #
516
+ # # The returned object is of type Google::Iam::Credentials::V1::SignJwtResponse.
517
+ # p result
518
+ #
455
519
  def sign_jwt request, options = nil
456
520
  raise ::ArgumentError, "request must be provided" if request.nil?
457
521
 
@@ -560,7 +624,9 @@ module Google
560
624
  class Configuration
561
625
  extend ::Gapic::Config
562
626
 
563
- config_attr :endpoint, "iamcredentials.googleapis.com", ::String
627
+ DEFAULT_ENDPOINT = "iamcredentials.googleapis.com"
628
+
629
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
564
630
  config_attr :credentials, nil do |value|
565
631
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
566
632
  allowed.any? { |klass| klass === value }
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_generate_access_token_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_generate_id_token_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -135,7 +135,7 @@ module Google
135
135
 
136
136
  verb, uri, query_string_params, body = ServiceStub.transcode_sign_blob_request request_pb
137
137
  query_string_params = if query_string_params.any?
138
- query_string_params.to_h { |p| p.split("=", 2) }
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
139
  else
140
140
  {}
141
141
  end
@@ -173,7 +173,7 @@ module Google
173
173
 
174
174
  verb, uri, query_string_params, body = ServiceStub.transcode_sign_jwt_request request_pb
175
175
  query_string_params = if query_string_params.any?
176
- query_string_params.to_h { |p| p.split("=", 2) }
176
+ query_string_params.to_h { |p| p.split "=", 2 }
177
177
  else
178
178
  {}
179
179
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Iam
22
22
  module Credentials
23
23
  module V1
24
- VERSION = "0.6.0"
24
+ VERSION = "0.7.0"
25
25
  end
26
26
  end
27
27
  end
@@ -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-credentials-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.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: 2023-05-31 00:00:00.000000000 Z
11
+ date: 2023-09-12 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.0
19
+ version: 0.20.0
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.19.0
29
+ version: 0.20.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -212,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  - !ruby/object:Gem::Version
213
213
  version: '0'
214
214
  requirements: []
215
- rubygems_version: 3.4.2
215
+ rubygems_version: 3.4.19
216
216
  signing_key:
217
217
  specification_version: 4
218
218
  summary: Creates short-lived, limited-privilege credentials for IAM service accounts.