google-iam-v1beta 0.15.0 → 0.15.2
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/.yardopts +1 -1
- data/README.md +3 -7
- data/lib/google/iam/v1beta/rest.rb +35 -0
- data/lib/google/iam/v1beta/version.rb +1 -1
- data/lib/google/iam/v1beta/workload_identity_pool_services_pb.rb +1 -1
- data/lib/google/iam/v1beta/workload_identity_pools/client.rb +1 -1
- data/lib/google/iam/v1beta/workload_identity_pools/credentials.rb +1 -1
- data/lib/google/iam/v1beta/workload_identity_pools/operations.rb +1 -1
- data/lib/google/iam/v1beta/workload_identity_pools/paths.rb +1 -1
- data/lib/google/iam/v1beta/workload_identity_pools/rest/client.rb +1593 -0
- data/lib/google/iam/v1beta/workload_identity_pools/rest/operations.rb +954 -0
- data/lib/google/iam/v1beta/workload_identity_pools/rest/service_stub.rb +817 -0
- data/lib/google/iam/v1beta/workload_identity_pools/rest.rb +51 -0
- data/lib/google/iam/v1beta/workload_identity_pools.rb +7 -1
- data/lib/google/iam/v1beta.rb +6 -1
- data/lib/google-iam-v1beta.rb +1 -1
- data/proto_docs/README.md +1 -1
- data/proto_docs/google/api/client.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +1 -1
- data/proto_docs/google/api/launch_stage.rb +1 -1
- data/proto_docs/google/api/resource.rb +1 -1
- data/proto_docs/google/iam/v1beta/workload_identity_pool.rb +1 -1
- data/proto_docs/google/longrunning/operations.rb +1 -1
- data/proto_docs/google/protobuf/any.rb +1 -1
- data/proto_docs/google/protobuf/duration.rb +1 -1
- data/proto_docs/google/protobuf/empty.rb +1 -1
- data/proto_docs/google/protobuf/field_mask.rb +1 -1
- data/proto_docs/google/rpc/status.rb +1 -1
- metadata +20 -8
|
@@ -0,0 +1,1593 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 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
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
require "google/cloud/errors"
|
|
20
|
+
require "google/iam/v1beta/workload_identity_pool_pb"
|
|
21
|
+
require "google/iam/v1beta/workload_identity_pools/rest/service_stub"
|
|
22
|
+
|
|
23
|
+
module Google
|
|
24
|
+
module Iam
|
|
25
|
+
module V1beta
|
|
26
|
+
module WorkloadIdentityPools
|
|
27
|
+
module Rest
|
|
28
|
+
##
|
|
29
|
+
# REST client for the WorkloadIdentityPools service.
|
|
30
|
+
#
|
|
31
|
+
# Manages WorkloadIdentityPools.
|
|
32
|
+
#
|
|
33
|
+
class Client
|
|
34
|
+
# @private
|
|
35
|
+
API_VERSION = ""
|
|
36
|
+
|
|
37
|
+
# @private
|
|
38
|
+
DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$"
|
|
39
|
+
|
|
40
|
+
include Paths
|
|
41
|
+
|
|
42
|
+
# @private
|
|
43
|
+
attr_reader :workload_identity_pools_stub
|
|
44
|
+
|
|
45
|
+
##
|
|
46
|
+
# Configure the WorkloadIdentityPools Client class.
|
|
47
|
+
#
|
|
48
|
+
# See {::Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client::Configuration}
|
|
49
|
+
# for a description of the configuration fields.
|
|
50
|
+
#
|
|
51
|
+
# @example
|
|
52
|
+
#
|
|
53
|
+
# # Modify the configuration for all WorkloadIdentityPools clients
|
|
54
|
+
# ::Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client.configure do |config|
|
|
55
|
+
# config.timeout = 10.0
|
|
56
|
+
# end
|
|
57
|
+
#
|
|
58
|
+
# @yield [config] Configure the Client client.
|
|
59
|
+
# @yieldparam config [Client::Configuration]
|
|
60
|
+
#
|
|
61
|
+
# @return [Client::Configuration]
|
|
62
|
+
#
|
|
63
|
+
def self.configure
|
|
64
|
+
@configure ||= begin
|
|
65
|
+
namespace = ["Google", "Iam", "V1beta"]
|
|
66
|
+
parent_config = while namespace.any?
|
|
67
|
+
parent_name = namespace.join "::"
|
|
68
|
+
parent_const = const_get parent_name
|
|
69
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
|
70
|
+
namespace.pop
|
|
71
|
+
end
|
|
72
|
+
default_config = Client::Configuration.new parent_config
|
|
73
|
+
|
|
74
|
+
default_config.rpcs.list_workload_identity_pools.timeout = 60.0
|
|
75
|
+
default_config.rpcs.list_workload_identity_pools.retry_policy = {
|
|
76
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
default_config.rpcs.get_workload_identity_pool.timeout = 60.0
|
|
80
|
+
default_config.rpcs.get_workload_identity_pool.retry_policy = {
|
|
81
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
default_config.rpcs.create_workload_identity_pool.timeout = 60.0
|
|
85
|
+
default_config.rpcs.create_workload_identity_pool.retry_policy = {
|
|
86
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
default_config.rpcs.update_workload_identity_pool.timeout = 60.0
|
|
90
|
+
default_config.rpcs.update_workload_identity_pool.retry_policy = {
|
|
91
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
default_config.rpcs.delete_workload_identity_pool.timeout = 60.0
|
|
95
|
+
default_config.rpcs.delete_workload_identity_pool.retry_policy = {
|
|
96
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
default_config.rpcs.undelete_workload_identity_pool.timeout = 60.0
|
|
100
|
+
default_config.rpcs.undelete_workload_identity_pool.retry_policy = {
|
|
101
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
default_config.rpcs.list_workload_identity_pool_providers.timeout = 60.0
|
|
105
|
+
default_config.rpcs.list_workload_identity_pool_providers.retry_policy = {
|
|
106
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
default_config.rpcs.get_workload_identity_pool_provider.timeout = 60.0
|
|
110
|
+
default_config.rpcs.get_workload_identity_pool_provider.retry_policy = {
|
|
111
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
default_config.rpcs.create_workload_identity_pool_provider.timeout = 60.0
|
|
115
|
+
default_config.rpcs.create_workload_identity_pool_provider.retry_policy = {
|
|
116
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
default_config.rpcs.update_workload_identity_pool_provider.timeout = 60.0
|
|
120
|
+
default_config.rpcs.update_workload_identity_pool_provider.retry_policy = {
|
|
121
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
default_config.rpcs.delete_workload_identity_pool_provider.timeout = 60.0
|
|
125
|
+
default_config.rpcs.delete_workload_identity_pool_provider.retry_policy = {
|
|
126
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
default_config.rpcs.undelete_workload_identity_pool_provider.timeout = 60.0
|
|
130
|
+
default_config.rpcs.undelete_workload_identity_pool_provider.retry_policy = {
|
|
131
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
default_config
|
|
135
|
+
end
|
|
136
|
+
yield @configure if block_given?
|
|
137
|
+
@configure
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
##
|
|
141
|
+
# Configure the WorkloadIdentityPools Client instance.
|
|
142
|
+
#
|
|
143
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
|
144
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
|
145
|
+
# should be made on {Client.configure}.
|
|
146
|
+
#
|
|
147
|
+
# See {::Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client::Configuration}
|
|
148
|
+
# for a description of the configuration fields.
|
|
149
|
+
#
|
|
150
|
+
# @yield [config] Configure the Client client.
|
|
151
|
+
# @yieldparam config [Client::Configuration]
|
|
152
|
+
#
|
|
153
|
+
# @return [Client::Configuration]
|
|
154
|
+
#
|
|
155
|
+
def configure
|
|
156
|
+
yield @config if block_given?
|
|
157
|
+
@config
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
##
|
|
161
|
+
# The effective universe domain
|
|
162
|
+
#
|
|
163
|
+
# @return [String]
|
|
164
|
+
#
|
|
165
|
+
def universe_domain
|
|
166
|
+
@workload_identity_pools_stub.universe_domain
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
##
|
|
170
|
+
# Create a new WorkloadIdentityPools REST client object.
|
|
171
|
+
#
|
|
172
|
+
# @example
|
|
173
|
+
#
|
|
174
|
+
# # Create a client using the default configuration
|
|
175
|
+
# client = ::Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client.new
|
|
176
|
+
#
|
|
177
|
+
# # Create a client using a custom configuration
|
|
178
|
+
# client = ::Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client.new do |config|
|
|
179
|
+
# config.timeout = 10.0
|
|
180
|
+
# end
|
|
181
|
+
#
|
|
182
|
+
# @yield [config] Configure the WorkloadIdentityPools client.
|
|
183
|
+
# @yieldparam config [Client::Configuration]
|
|
184
|
+
#
|
|
185
|
+
def initialize
|
|
186
|
+
# Create the configuration object
|
|
187
|
+
@config = Configuration.new Client.configure
|
|
188
|
+
|
|
189
|
+
# Yield the configuration if needed
|
|
190
|
+
yield @config if block_given?
|
|
191
|
+
|
|
192
|
+
# Create credentials
|
|
193
|
+
credentials = @config.credentials
|
|
194
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
195
|
+
# but only if the default endpoint does not have a region prefix.
|
|
196
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
197
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
198
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
199
|
+
credentials ||= Credentials.default scope: @config.scope,
|
|
200
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
|
201
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
202
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
@quota_project_id = @config.quota_project
|
|
206
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
207
|
+
|
|
208
|
+
@operations_client = ::Google::Iam::V1beta::WorkloadIdentityPools::Rest::Operations.new do |config|
|
|
209
|
+
config.credentials = credentials
|
|
210
|
+
config.quota_project = @quota_project_id
|
|
211
|
+
config.endpoint = @config.endpoint
|
|
212
|
+
config.universe_domain = @config.universe_domain
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
@workload_identity_pools_stub = ::Google::Iam::V1beta::WorkloadIdentityPools::Rest::ServiceStub.new(
|
|
216
|
+
endpoint: @config.endpoint,
|
|
217
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
218
|
+
universe_domain: @config.universe_domain,
|
|
219
|
+
credentials: credentials,
|
|
220
|
+
logger: @config.logger
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
@workload_identity_pools_stub.logger(stub: true)&.info do |entry|
|
|
224
|
+
entry.set_system_name
|
|
225
|
+
entry.set_service
|
|
226
|
+
entry.message = "Created client for #{entry.service}"
|
|
227
|
+
entry.set_credentials_fields credentials
|
|
228
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
|
229
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
230
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
##
|
|
235
|
+
# Get the associated client for long-running operations.
|
|
236
|
+
#
|
|
237
|
+
# @return [::Google::Iam::V1beta::WorkloadIdentityPools::Rest::Operations]
|
|
238
|
+
#
|
|
239
|
+
attr_reader :operations_client
|
|
240
|
+
|
|
241
|
+
##
|
|
242
|
+
# The logger used for request/response debug logging.
|
|
243
|
+
#
|
|
244
|
+
# @return [Logger]
|
|
245
|
+
#
|
|
246
|
+
def logger
|
|
247
|
+
@workload_identity_pools_stub.logger
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Service calls
|
|
251
|
+
|
|
252
|
+
##
|
|
253
|
+
# Lists all non-deleted
|
|
254
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPool WorkloadIdentityPool}s in a
|
|
255
|
+
# project. If `show_deleted` is set to `true`, then deleted pools are also
|
|
256
|
+
# listed.
|
|
257
|
+
#
|
|
258
|
+
# @overload list_workload_identity_pools(request, options = nil)
|
|
259
|
+
# Pass arguments to `list_workload_identity_pools` via a request object, either of type
|
|
260
|
+
# {::Google::Iam::V1beta::ListWorkloadIdentityPoolsRequest} or an equivalent Hash.
|
|
261
|
+
#
|
|
262
|
+
# @param request [::Google::Iam::V1beta::ListWorkloadIdentityPoolsRequest, ::Hash]
|
|
263
|
+
# A request object representing the call parameters. Required. To specify no
|
|
264
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
265
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
266
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
267
|
+
#
|
|
268
|
+
# @overload list_workload_identity_pools(parent: nil, page_size: nil, page_token: nil, show_deleted: nil)
|
|
269
|
+
# Pass arguments to `list_workload_identity_pools` via keyword arguments. Note that at
|
|
270
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
271
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
272
|
+
#
|
|
273
|
+
# @param parent [::String]
|
|
274
|
+
# Required. The parent resource to list pools for.
|
|
275
|
+
# @param page_size [::Integer]
|
|
276
|
+
# The maximum number of pools to return.
|
|
277
|
+
# If unspecified, at most 50 pools are returned.
|
|
278
|
+
# The maximum value is 1000; values above are 1000 truncated to 1000.
|
|
279
|
+
# @param page_token [::String]
|
|
280
|
+
# A page token, received from a previous `ListWorkloadIdentityPools`
|
|
281
|
+
# call. Provide this to retrieve the subsequent page.
|
|
282
|
+
# @param show_deleted [::Boolean]
|
|
283
|
+
# Whether to return soft-deleted pools.
|
|
284
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
285
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V1beta::WorkloadIdentityPool>]
|
|
286
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
287
|
+
#
|
|
288
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V1beta::WorkloadIdentityPool>]
|
|
289
|
+
#
|
|
290
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
291
|
+
#
|
|
292
|
+
# @example Basic example
|
|
293
|
+
# require "google/iam/v1beta"
|
|
294
|
+
#
|
|
295
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
296
|
+
# client = Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client.new
|
|
297
|
+
#
|
|
298
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
299
|
+
# request = Google::Iam::V1beta::ListWorkloadIdentityPoolsRequest.new
|
|
300
|
+
#
|
|
301
|
+
# # Call the list_workload_identity_pools method.
|
|
302
|
+
# result = client.list_workload_identity_pools request
|
|
303
|
+
#
|
|
304
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
305
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
306
|
+
# result.each do |item|
|
|
307
|
+
# # Each element is of type ::Google::Iam::V1beta::WorkloadIdentityPool.
|
|
308
|
+
# p item
|
|
309
|
+
# end
|
|
310
|
+
#
|
|
311
|
+
def list_workload_identity_pools request, options = nil
|
|
312
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
313
|
+
|
|
314
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::ListWorkloadIdentityPoolsRequest
|
|
315
|
+
|
|
316
|
+
# Converts hash and nil to an options object
|
|
317
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
318
|
+
|
|
319
|
+
# Customize the options with defaults
|
|
320
|
+
call_metadata = @config.rpcs.list_workload_identity_pools.metadata.to_h
|
|
321
|
+
|
|
322
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
323
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
324
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
325
|
+
gapic_version: ::Google::Iam::V1beta::VERSION,
|
|
326
|
+
transports_version_send: [:rest]
|
|
327
|
+
|
|
328
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
329
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
330
|
+
|
|
331
|
+
options.apply_defaults timeout: @config.rpcs.list_workload_identity_pools.timeout,
|
|
332
|
+
metadata: call_metadata,
|
|
333
|
+
retry_policy: @config.rpcs.list_workload_identity_pools.retry_policy
|
|
334
|
+
|
|
335
|
+
options.apply_defaults timeout: @config.timeout,
|
|
336
|
+
metadata: @config.metadata,
|
|
337
|
+
retry_policy: @config.retry_policy
|
|
338
|
+
|
|
339
|
+
@workload_identity_pools_stub.list_workload_identity_pools request, options do |result, operation|
|
|
340
|
+
result = ::Gapic::Rest::PagedEnumerable.new @workload_identity_pools_stub, :list_workload_identity_pools, "workload_identity_pools", request, result, options
|
|
341
|
+
yield result, operation if block_given?
|
|
342
|
+
throw :response, result
|
|
343
|
+
end
|
|
344
|
+
rescue ::Gapic::Rest::Error => e
|
|
345
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
##
|
|
349
|
+
# Gets an individual
|
|
350
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPool WorkloadIdentityPool}.
|
|
351
|
+
#
|
|
352
|
+
# @overload get_workload_identity_pool(request, options = nil)
|
|
353
|
+
# Pass arguments to `get_workload_identity_pool` via a request object, either of type
|
|
354
|
+
# {::Google::Iam::V1beta::GetWorkloadIdentityPoolRequest} or an equivalent Hash.
|
|
355
|
+
#
|
|
356
|
+
# @param request [::Google::Iam::V1beta::GetWorkloadIdentityPoolRequest, ::Hash]
|
|
357
|
+
# A request object representing the call parameters. Required. To specify no
|
|
358
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
359
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
360
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
361
|
+
#
|
|
362
|
+
# @overload get_workload_identity_pool(name: nil)
|
|
363
|
+
# Pass arguments to `get_workload_identity_pool` via keyword arguments. Note that at
|
|
364
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
365
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
366
|
+
#
|
|
367
|
+
# @param name [::String]
|
|
368
|
+
# Required. The name of the pool to retrieve.
|
|
369
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
370
|
+
# @yieldparam result [::Google::Iam::V1beta::WorkloadIdentityPool]
|
|
371
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
372
|
+
#
|
|
373
|
+
# @return [::Google::Iam::V1beta::WorkloadIdentityPool]
|
|
374
|
+
#
|
|
375
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
376
|
+
#
|
|
377
|
+
# @example Basic example
|
|
378
|
+
# require "google/iam/v1beta"
|
|
379
|
+
#
|
|
380
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
381
|
+
# client = Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client.new
|
|
382
|
+
#
|
|
383
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
384
|
+
# request = Google::Iam::V1beta::GetWorkloadIdentityPoolRequest.new
|
|
385
|
+
#
|
|
386
|
+
# # Call the get_workload_identity_pool method.
|
|
387
|
+
# result = client.get_workload_identity_pool request
|
|
388
|
+
#
|
|
389
|
+
# # The returned object is of type Google::Iam::V1beta::WorkloadIdentityPool.
|
|
390
|
+
# p result
|
|
391
|
+
#
|
|
392
|
+
def get_workload_identity_pool request, options = nil
|
|
393
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
394
|
+
|
|
395
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::GetWorkloadIdentityPoolRequest
|
|
396
|
+
|
|
397
|
+
# Converts hash and nil to an options object
|
|
398
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
399
|
+
|
|
400
|
+
# Customize the options with defaults
|
|
401
|
+
call_metadata = @config.rpcs.get_workload_identity_pool.metadata.to_h
|
|
402
|
+
|
|
403
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
404
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
405
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
406
|
+
gapic_version: ::Google::Iam::V1beta::VERSION,
|
|
407
|
+
transports_version_send: [:rest]
|
|
408
|
+
|
|
409
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
410
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
411
|
+
|
|
412
|
+
options.apply_defaults timeout: @config.rpcs.get_workload_identity_pool.timeout,
|
|
413
|
+
metadata: call_metadata,
|
|
414
|
+
retry_policy: @config.rpcs.get_workload_identity_pool.retry_policy
|
|
415
|
+
|
|
416
|
+
options.apply_defaults timeout: @config.timeout,
|
|
417
|
+
metadata: @config.metadata,
|
|
418
|
+
retry_policy: @config.retry_policy
|
|
419
|
+
|
|
420
|
+
@workload_identity_pools_stub.get_workload_identity_pool request, options do |result, operation|
|
|
421
|
+
yield result, operation if block_given?
|
|
422
|
+
end
|
|
423
|
+
rescue ::Gapic::Rest::Error => e
|
|
424
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
##
|
|
428
|
+
# Creates a new
|
|
429
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPool WorkloadIdentityPool}.
|
|
430
|
+
#
|
|
431
|
+
# You cannot reuse the name of a deleted pool until 30 days after deletion.
|
|
432
|
+
#
|
|
433
|
+
# @overload create_workload_identity_pool(request, options = nil)
|
|
434
|
+
# Pass arguments to `create_workload_identity_pool` via a request object, either of type
|
|
435
|
+
# {::Google::Iam::V1beta::CreateWorkloadIdentityPoolRequest} or an equivalent Hash.
|
|
436
|
+
#
|
|
437
|
+
# @param request [::Google::Iam::V1beta::CreateWorkloadIdentityPoolRequest, ::Hash]
|
|
438
|
+
# A request object representing the call parameters. Required. To specify no
|
|
439
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
440
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
441
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
442
|
+
#
|
|
443
|
+
# @overload create_workload_identity_pool(parent: nil, workload_identity_pool: nil, workload_identity_pool_id: nil)
|
|
444
|
+
# Pass arguments to `create_workload_identity_pool` via keyword arguments. Note that at
|
|
445
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
446
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
447
|
+
#
|
|
448
|
+
# @param parent [::String]
|
|
449
|
+
# Required. The parent resource to create the pool in. The only supported
|
|
450
|
+
# location is `global`.
|
|
451
|
+
# @param workload_identity_pool [::Google::Iam::V1beta::WorkloadIdentityPool, ::Hash]
|
|
452
|
+
# Required. The pool to create.
|
|
453
|
+
# @param workload_identity_pool_id [::String]
|
|
454
|
+
# Required. The ID to use for the pool, which becomes the
|
|
455
|
+
# final component of the resource name. This value should be 4-32 characters,
|
|
456
|
+
# and may contain the characters [a-z0-9-]. The prefix `gcp-` is
|
|
457
|
+
# reserved for use by Google, and may not be specified.
|
|
458
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
459
|
+
# @yieldparam result [::Gapic::Operation]
|
|
460
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
461
|
+
#
|
|
462
|
+
# @return [::Gapic::Operation]
|
|
463
|
+
#
|
|
464
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
465
|
+
#
|
|
466
|
+
# @example Basic example
|
|
467
|
+
# require "google/iam/v1beta"
|
|
468
|
+
#
|
|
469
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
470
|
+
# client = Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client.new
|
|
471
|
+
#
|
|
472
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
473
|
+
# request = Google::Iam::V1beta::CreateWorkloadIdentityPoolRequest.new
|
|
474
|
+
#
|
|
475
|
+
# # Call the create_workload_identity_pool method.
|
|
476
|
+
# result = client.create_workload_identity_pool request
|
|
477
|
+
#
|
|
478
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
479
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
480
|
+
# # Here is how to wait for a response.
|
|
481
|
+
# result.wait_until_done! timeout: 60
|
|
482
|
+
# if result.response?
|
|
483
|
+
# p result.response
|
|
484
|
+
# else
|
|
485
|
+
# puts "No response received."
|
|
486
|
+
# end
|
|
487
|
+
#
|
|
488
|
+
def create_workload_identity_pool request, options = nil
|
|
489
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
490
|
+
|
|
491
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::CreateWorkloadIdentityPoolRequest
|
|
492
|
+
|
|
493
|
+
# Converts hash and nil to an options object
|
|
494
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
495
|
+
|
|
496
|
+
# Customize the options with defaults
|
|
497
|
+
call_metadata = @config.rpcs.create_workload_identity_pool.metadata.to_h
|
|
498
|
+
|
|
499
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
500
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
501
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
502
|
+
gapic_version: ::Google::Iam::V1beta::VERSION,
|
|
503
|
+
transports_version_send: [:rest]
|
|
504
|
+
|
|
505
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
506
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
507
|
+
|
|
508
|
+
options.apply_defaults timeout: @config.rpcs.create_workload_identity_pool.timeout,
|
|
509
|
+
metadata: call_metadata,
|
|
510
|
+
retry_policy: @config.rpcs.create_workload_identity_pool.retry_policy
|
|
511
|
+
|
|
512
|
+
options.apply_defaults timeout: @config.timeout,
|
|
513
|
+
metadata: @config.metadata,
|
|
514
|
+
retry_policy: @config.retry_policy
|
|
515
|
+
|
|
516
|
+
@workload_identity_pools_stub.create_workload_identity_pool request, options do |result, operation|
|
|
517
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
518
|
+
yield result, operation if block_given?
|
|
519
|
+
throw :response, result
|
|
520
|
+
end
|
|
521
|
+
rescue ::Gapic::Rest::Error => e
|
|
522
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
523
|
+
end
|
|
524
|
+
|
|
525
|
+
##
|
|
526
|
+
# Updates an existing
|
|
527
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPool WorkloadIdentityPool}.
|
|
528
|
+
#
|
|
529
|
+
# @overload update_workload_identity_pool(request, options = nil)
|
|
530
|
+
# Pass arguments to `update_workload_identity_pool` via a request object, either of type
|
|
531
|
+
# {::Google::Iam::V1beta::UpdateWorkloadIdentityPoolRequest} or an equivalent Hash.
|
|
532
|
+
#
|
|
533
|
+
# @param request [::Google::Iam::V1beta::UpdateWorkloadIdentityPoolRequest, ::Hash]
|
|
534
|
+
# A request object representing the call parameters. Required. To specify no
|
|
535
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
536
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
537
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
538
|
+
#
|
|
539
|
+
# @overload update_workload_identity_pool(workload_identity_pool: nil, update_mask: nil)
|
|
540
|
+
# Pass arguments to `update_workload_identity_pool` via keyword arguments. Note that at
|
|
541
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
542
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
543
|
+
#
|
|
544
|
+
# @param workload_identity_pool [::Google::Iam::V1beta::WorkloadIdentityPool, ::Hash]
|
|
545
|
+
# Required. The pool to update. The `name` field is used to identify the pool.
|
|
546
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
547
|
+
# Required. The list of fields update.
|
|
548
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
549
|
+
# @yieldparam result [::Gapic::Operation]
|
|
550
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
551
|
+
#
|
|
552
|
+
# @return [::Gapic::Operation]
|
|
553
|
+
#
|
|
554
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
555
|
+
#
|
|
556
|
+
# @example Basic example
|
|
557
|
+
# require "google/iam/v1beta"
|
|
558
|
+
#
|
|
559
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
560
|
+
# client = Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client.new
|
|
561
|
+
#
|
|
562
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
563
|
+
# request = Google::Iam::V1beta::UpdateWorkloadIdentityPoolRequest.new
|
|
564
|
+
#
|
|
565
|
+
# # Call the update_workload_identity_pool method.
|
|
566
|
+
# result = client.update_workload_identity_pool request
|
|
567
|
+
#
|
|
568
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
569
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
570
|
+
# # Here is how to wait for a response.
|
|
571
|
+
# result.wait_until_done! timeout: 60
|
|
572
|
+
# if result.response?
|
|
573
|
+
# p result.response
|
|
574
|
+
# else
|
|
575
|
+
# puts "No response received."
|
|
576
|
+
# end
|
|
577
|
+
#
|
|
578
|
+
def update_workload_identity_pool request, options = nil
|
|
579
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
580
|
+
|
|
581
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::UpdateWorkloadIdentityPoolRequest
|
|
582
|
+
|
|
583
|
+
# Converts hash and nil to an options object
|
|
584
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
585
|
+
|
|
586
|
+
# Customize the options with defaults
|
|
587
|
+
call_metadata = @config.rpcs.update_workload_identity_pool.metadata.to_h
|
|
588
|
+
|
|
589
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
590
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
591
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
592
|
+
gapic_version: ::Google::Iam::V1beta::VERSION,
|
|
593
|
+
transports_version_send: [:rest]
|
|
594
|
+
|
|
595
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
596
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
597
|
+
|
|
598
|
+
options.apply_defaults timeout: @config.rpcs.update_workload_identity_pool.timeout,
|
|
599
|
+
metadata: call_metadata,
|
|
600
|
+
retry_policy: @config.rpcs.update_workload_identity_pool.retry_policy
|
|
601
|
+
|
|
602
|
+
options.apply_defaults timeout: @config.timeout,
|
|
603
|
+
metadata: @config.metadata,
|
|
604
|
+
retry_policy: @config.retry_policy
|
|
605
|
+
|
|
606
|
+
@workload_identity_pools_stub.update_workload_identity_pool request, options do |result, operation|
|
|
607
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
608
|
+
yield result, operation if block_given?
|
|
609
|
+
throw :response, result
|
|
610
|
+
end
|
|
611
|
+
rescue ::Gapic::Rest::Error => e
|
|
612
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
613
|
+
end
|
|
614
|
+
|
|
615
|
+
##
|
|
616
|
+
# Deletes a
|
|
617
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPool WorkloadIdentityPool}.
|
|
618
|
+
#
|
|
619
|
+
# You cannot use a deleted pool to exchange external
|
|
620
|
+
# credentials for Google Cloud credentials. However, deletion does
|
|
621
|
+
# not revoke credentials that have already been issued.
|
|
622
|
+
# Credentials issued for a deleted pool do not grant access to resources.
|
|
623
|
+
# If the pool is undeleted, and the credentials are not expired, they
|
|
624
|
+
# grant access again.
|
|
625
|
+
# You can undelete a pool for 30 days. After 30 days, deletion is
|
|
626
|
+
# permanent.
|
|
627
|
+
# You cannot update deleted pools. However, you can view and list them.
|
|
628
|
+
#
|
|
629
|
+
# @overload delete_workload_identity_pool(request, options = nil)
|
|
630
|
+
# Pass arguments to `delete_workload_identity_pool` via a request object, either of type
|
|
631
|
+
# {::Google::Iam::V1beta::DeleteWorkloadIdentityPoolRequest} or an equivalent Hash.
|
|
632
|
+
#
|
|
633
|
+
# @param request [::Google::Iam::V1beta::DeleteWorkloadIdentityPoolRequest, ::Hash]
|
|
634
|
+
# A request object representing the call parameters. Required. To specify no
|
|
635
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
636
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
637
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
638
|
+
#
|
|
639
|
+
# @overload delete_workload_identity_pool(name: nil)
|
|
640
|
+
# Pass arguments to `delete_workload_identity_pool` via keyword arguments. Note that at
|
|
641
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
642
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
643
|
+
#
|
|
644
|
+
# @param name [::String]
|
|
645
|
+
# Required. The name of the pool to delete.
|
|
646
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
647
|
+
# @yieldparam result [::Gapic::Operation]
|
|
648
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
649
|
+
#
|
|
650
|
+
# @return [::Gapic::Operation]
|
|
651
|
+
#
|
|
652
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
653
|
+
#
|
|
654
|
+
# @example Basic example
|
|
655
|
+
# require "google/iam/v1beta"
|
|
656
|
+
#
|
|
657
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
658
|
+
# client = Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client.new
|
|
659
|
+
#
|
|
660
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
661
|
+
# request = Google::Iam::V1beta::DeleteWorkloadIdentityPoolRequest.new
|
|
662
|
+
#
|
|
663
|
+
# # Call the delete_workload_identity_pool method.
|
|
664
|
+
# result = client.delete_workload_identity_pool request
|
|
665
|
+
#
|
|
666
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
667
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
668
|
+
# # Here is how to wait for a response.
|
|
669
|
+
# result.wait_until_done! timeout: 60
|
|
670
|
+
# if result.response?
|
|
671
|
+
# p result.response
|
|
672
|
+
# else
|
|
673
|
+
# puts "No response received."
|
|
674
|
+
# end
|
|
675
|
+
#
|
|
676
|
+
def delete_workload_identity_pool request, options = nil
|
|
677
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
678
|
+
|
|
679
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::DeleteWorkloadIdentityPoolRequest
|
|
680
|
+
|
|
681
|
+
# Converts hash and nil to an options object
|
|
682
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
683
|
+
|
|
684
|
+
# Customize the options with defaults
|
|
685
|
+
call_metadata = @config.rpcs.delete_workload_identity_pool.metadata.to_h
|
|
686
|
+
|
|
687
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
688
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
689
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
690
|
+
gapic_version: ::Google::Iam::V1beta::VERSION,
|
|
691
|
+
transports_version_send: [:rest]
|
|
692
|
+
|
|
693
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
694
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
695
|
+
|
|
696
|
+
options.apply_defaults timeout: @config.rpcs.delete_workload_identity_pool.timeout,
|
|
697
|
+
metadata: call_metadata,
|
|
698
|
+
retry_policy: @config.rpcs.delete_workload_identity_pool.retry_policy
|
|
699
|
+
|
|
700
|
+
options.apply_defaults timeout: @config.timeout,
|
|
701
|
+
metadata: @config.metadata,
|
|
702
|
+
retry_policy: @config.retry_policy
|
|
703
|
+
|
|
704
|
+
@workload_identity_pools_stub.delete_workload_identity_pool request, options do |result, operation|
|
|
705
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
706
|
+
yield result, operation if block_given?
|
|
707
|
+
throw :response, result
|
|
708
|
+
end
|
|
709
|
+
rescue ::Gapic::Rest::Error => e
|
|
710
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
711
|
+
end
|
|
712
|
+
|
|
713
|
+
##
|
|
714
|
+
# Undeletes a {::Google::Iam::V1beta::WorkloadIdentityPool WorkloadIdentityPool},
|
|
715
|
+
# as long as it was deleted fewer than 30 days ago.
|
|
716
|
+
#
|
|
717
|
+
# @overload undelete_workload_identity_pool(request, options = nil)
|
|
718
|
+
# Pass arguments to `undelete_workload_identity_pool` via a request object, either of type
|
|
719
|
+
# {::Google::Iam::V1beta::UndeleteWorkloadIdentityPoolRequest} or an equivalent Hash.
|
|
720
|
+
#
|
|
721
|
+
# @param request [::Google::Iam::V1beta::UndeleteWorkloadIdentityPoolRequest, ::Hash]
|
|
722
|
+
# A request object representing the call parameters. Required. To specify no
|
|
723
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
724
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
725
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
726
|
+
#
|
|
727
|
+
# @overload undelete_workload_identity_pool(name: nil)
|
|
728
|
+
# Pass arguments to `undelete_workload_identity_pool` via keyword arguments. Note that at
|
|
729
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
730
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
731
|
+
#
|
|
732
|
+
# @param name [::String]
|
|
733
|
+
# Required. The name of the pool to undelete.
|
|
734
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
735
|
+
# @yieldparam result [::Gapic::Operation]
|
|
736
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
737
|
+
#
|
|
738
|
+
# @return [::Gapic::Operation]
|
|
739
|
+
#
|
|
740
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
741
|
+
#
|
|
742
|
+
# @example Basic example
|
|
743
|
+
# require "google/iam/v1beta"
|
|
744
|
+
#
|
|
745
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
746
|
+
# client = Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client.new
|
|
747
|
+
#
|
|
748
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
749
|
+
# request = Google::Iam::V1beta::UndeleteWorkloadIdentityPoolRequest.new
|
|
750
|
+
#
|
|
751
|
+
# # Call the undelete_workload_identity_pool method.
|
|
752
|
+
# result = client.undelete_workload_identity_pool request
|
|
753
|
+
#
|
|
754
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
755
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
756
|
+
# # Here is how to wait for a response.
|
|
757
|
+
# result.wait_until_done! timeout: 60
|
|
758
|
+
# if result.response?
|
|
759
|
+
# p result.response
|
|
760
|
+
# else
|
|
761
|
+
# puts "No response received."
|
|
762
|
+
# end
|
|
763
|
+
#
|
|
764
|
+
def undelete_workload_identity_pool request, options = nil
|
|
765
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
766
|
+
|
|
767
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::UndeleteWorkloadIdentityPoolRequest
|
|
768
|
+
|
|
769
|
+
# Converts hash and nil to an options object
|
|
770
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
771
|
+
|
|
772
|
+
# Customize the options with defaults
|
|
773
|
+
call_metadata = @config.rpcs.undelete_workload_identity_pool.metadata.to_h
|
|
774
|
+
|
|
775
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
776
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
777
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
778
|
+
gapic_version: ::Google::Iam::V1beta::VERSION,
|
|
779
|
+
transports_version_send: [:rest]
|
|
780
|
+
|
|
781
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
782
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
783
|
+
|
|
784
|
+
options.apply_defaults timeout: @config.rpcs.undelete_workload_identity_pool.timeout,
|
|
785
|
+
metadata: call_metadata,
|
|
786
|
+
retry_policy: @config.rpcs.undelete_workload_identity_pool.retry_policy
|
|
787
|
+
|
|
788
|
+
options.apply_defaults timeout: @config.timeout,
|
|
789
|
+
metadata: @config.metadata,
|
|
790
|
+
retry_policy: @config.retry_policy
|
|
791
|
+
|
|
792
|
+
@workload_identity_pools_stub.undelete_workload_identity_pool request, options do |result, operation|
|
|
793
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
794
|
+
yield result, operation if block_given?
|
|
795
|
+
throw :response, result
|
|
796
|
+
end
|
|
797
|
+
rescue ::Gapic::Rest::Error => e
|
|
798
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
799
|
+
end
|
|
800
|
+
|
|
801
|
+
##
|
|
802
|
+
# Lists all non-deleted
|
|
803
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPoolProvider WorkloadIdentityPoolProvider}s
|
|
804
|
+
# in a {::Google::Iam::V1beta::WorkloadIdentityPool WorkloadIdentityPool}.
|
|
805
|
+
# If `show_deleted` is set to `true`, then deleted providers are also listed.
|
|
806
|
+
#
|
|
807
|
+
# @overload list_workload_identity_pool_providers(request, options = nil)
|
|
808
|
+
# Pass arguments to `list_workload_identity_pool_providers` via a request object, either of type
|
|
809
|
+
# {::Google::Iam::V1beta::ListWorkloadIdentityPoolProvidersRequest} or an equivalent Hash.
|
|
810
|
+
#
|
|
811
|
+
# @param request [::Google::Iam::V1beta::ListWorkloadIdentityPoolProvidersRequest, ::Hash]
|
|
812
|
+
# A request object representing the call parameters. Required. To specify no
|
|
813
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
814
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
815
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
816
|
+
#
|
|
817
|
+
# @overload list_workload_identity_pool_providers(parent: nil, page_size: nil, page_token: nil, show_deleted: nil)
|
|
818
|
+
# Pass arguments to `list_workload_identity_pool_providers` via keyword arguments. Note that at
|
|
819
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
820
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
821
|
+
#
|
|
822
|
+
# @param parent [::String]
|
|
823
|
+
# Required. The pool to list providers for.
|
|
824
|
+
# @param page_size [::Integer]
|
|
825
|
+
# The maximum number of providers to return.
|
|
826
|
+
# If unspecified, at most 50 providers are returned.
|
|
827
|
+
# The maximum value is 100; values above 100 are truncated to 100.
|
|
828
|
+
# @param page_token [::String]
|
|
829
|
+
# A page token, received from a previous
|
|
830
|
+
# `ListWorkloadIdentityPoolProviders` call. Provide this to retrieve the
|
|
831
|
+
# subsequent page.
|
|
832
|
+
# @param show_deleted [::Boolean]
|
|
833
|
+
# Whether to return soft-deleted providers.
|
|
834
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
835
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V1beta::WorkloadIdentityPoolProvider>]
|
|
836
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
837
|
+
#
|
|
838
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V1beta::WorkloadIdentityPoolProvider>]
|
|
839
|
+
#
|
|
840
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
841
|
+
#
|
|
842
|
+
# @example Basic example
|
|
843
|
+
# require "google/iam/v1beta"
|
|
844
|
+
#
|
|
845
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
846
|
+
# client = Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client.new
|
|
847
|
+
#
|
|
848
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
849
|
+
# request = Google::Iam::V1beta::ListWorkloadIdentityPoolProvidersRequest.new
|
|
850
|
+
#
|
|
851
|
+
# # Call the list_workload_identity_pool_providers method.
|
|
852
|
+
# result = client.list_workload_identity_pool_providers request
|
|
853
|
+
#
|
|
854
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
855
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
856
|
+
# result.each do |item|
|
|
857
|
+
# # Each element is of type ::Google::Iam::V1beta::WorkloadIdentityPoolProvider.
|
|
858
|
+
# p item
|
|
859
|
+
# end
|
|
860
|
+
#
|
|
861
|
+
def list_workload_identity_pool_providers request, options = nil
|
|
862
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
863
|
+
|
|
864
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::ListWorkloadIdentityPoolProvidersRequest
|
|
865
|
+
|
|
866
|
+
# Converts hash and nil to an options object
|
|
867
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
868
|
+
|
|
869
|
+
# Customize the options with defaults
|
|
870
|
+
call_metadata = @config.rpcs.list_workload_identity_pool_providers.metadata.to_h
|
|
871
|
+
|
|
872
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
873
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
874
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
875
|
+
gapic_version: ::Google::Iam::V1beta::VERSION,
|
|
876
|
+
transports_version_send: [:rest]
|
|
877
|
+
|
|
878
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
879
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
880
|
+
|
|
881
|
+
options.apply_defaults timeout: @config.rpcs.list_workload_identity_pool_providers.timeout,
|
|
882
|
+
metadata: call_metadata,
|
|
883
|
+
retry_policy: @config.rpcs.list_workload_identity_pool_providers.retry_policy
|
|
884
|
+
|
|
885
|
+
options.apply_defaults timeout: @config.timeout,
|
|
886
|
+
metadata: @config.metadata,
|
|
887
|
+
retry_policy: @config.retry_policy
|
|
888
|
+
|
|
889
|
+
@workload_identity_pools_stub.list_workload_identity_pool_providers request, options do |result, operation|
|
|
890
|
+
result = ::Gapic::Rest::PagedEnumerable.new @workload_identity_pools_stub, :list_workload_identity_pool_providers, "workload_identity_pool_providers", request, result, options
|
|
891
|
+
yield result, operation if block_given?
|
|
892
|
+
throw :response, result
|
|
893
|
+
end
|
|
894
|
+
rescue ::Gapic::Rest::Error => e
|
|
895
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
896
|
+
end
|
|
897
|
+
|
|
898
|
+
##
|
|
899
|
+
# Gets an individual
|
|
900
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPoolProvider WorkloadIdentityPoolProvider}.
|
|
901
|
+
#
|
|
902
|
+
# @overload get_workload_identity_pool_provider(request, options = nil)
|
|
903
|
+
# Pass arguments to `get_workload_identity_pool_provider` via a request object, either of type
|
|
904
|
+
# {::Google::Iam::V1beta::GetWorkloadIdentityPoolProviderRequest} or an equivalent Hash.
|
|
905
|
+
#
|
|
906
|
+
# @param request [::Google::Iam::V1beta::GetWorkloadIdentityPoolProviderRequest, ::Hash]
|
|
907
|
+
# A request object representing the call parameters. Required. To specify no
|
|
908
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
909
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
910
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
911
|
+
#
|
|
912
|
+
# @overload get_workload_identity_pool_provider(name: nil)
|
|
913
|
+
# Pass arguments to `get_workload_identity_pool_provider` via keyword arguments. Note that at
|
|
914
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
915
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
916
|
+
#
|
|
917
|
+
# @param name [::String]
|
|
918
|
+
# Required. The name of the provider to retrieve.
|
|
919
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
920
|
+
# @yieldparam result [::Google::Iam::V1beta::WorkloadIdentityPoolProvider]
|
|
921
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
922
|
+
#
|
|
923
|
+
# @return [::Google::Iam::V1beta::WorkloadIdentityPoolProvider]
|
|
924
|
+
#
|
|
925
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
926
|
+
#
|
|
927
|
+
# @example Basic example
|
|
928
|
+
# require "google/iam/v1beta"
|
|
929
|
+
#
|
|
930
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
931
|
+
# client = Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client.new
|
|
932
|
+
#
|
|
933
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
934
|
+
# request = Google::Iam::V1beta::GetWorkloadIdentityPoolProviderRequest.new
|
|
935
|
+
#
|
|
936
|
+
# # Call the get_workload_identity_pool_provider method.
|
|
937
|
+
# result = client.get_workload_identity_pool_provider request
|
|
938
|
+
#
|
|
939
|
+
# # The returned object is of type Google::Iam::V1beta::WorkloadIdentityPoolProvider.
|
|
940
|
+
# p result
|
|
941
|
+
#
|
|
942
|
+
def get_workload_identity_pool_provider request, options = nil
|
|
943
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
944
|
+
|
|
945
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::GetWorkloadIdentityPoolProviderRequest
|
|
946
|
+
|
|
947
|
+
# Converts hash and nil to an options object
|
|
948
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
949
|
+
|
|
950
|
+
# Customize the options with defaults
|
|
951
|
+
call_metadata = @config.rpcs.get_workload_identity_pool_provider.metadata.to_h
|
|
952
|
+
|
|
953
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
954
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
955
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
956
|
+
gapic_version: ::Google::Iam::V1beta::VERSION,
|
|
957
|
+
transports_version_send: [:rest]
|
|
958
|
+
|
|
959
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
960
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
961
|
+
|
|
962
|
+
options.apply_defaults timeout: @config.rpcs.get_workload_identity_pool_provider.timeout,
|
|
963
|
+
metadata: call_metadata,
|
|
964
|
+
retry_policy: @config.rpcs.get_workload_identity_pool_provider.retry_policy
|
|
965
|
+
|
|
966
|
+
options.apply_defaults timeout: @config.timeout,
|
|
967
|
+
metadata: @config.metadata,
|
|
968
|
+
retry_policy: @config.retry_policy
|
|
969
|
+
|
|
970
|
+
@workload_identity_pools_stub.get_workload_identity_pool_provider request, options do |result, operation|
|
|
971
|
+
yield result, operation if block_given?
|
|
972
|
+
end
|
|
973
|
+
rescue ::Gapic::Rest::Error => e
|
|
974
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
975
|
+
end
|
|
976
|
+
|
|
977
|
+
##
|
|
978
|
+
# Creates a new
|
|
979
|
+
# [WorkloadIdentityPoolProvider][google.iam.v1beta.WorkloadIdentityProvider]
|
|
980
|
+
# in a {::Google::Iam::V1beta::WorkloadIdentityPool WorkloadIdentityPool}.
|
|
981
|
+
#
|
|
982
|
+
# You cannot reuse the name of a deleted provider until 30 days after
|
|
983
|
+
# deletion.
|
|
984
|
+
#
|
|
985
|
+
# @overload create_workload_identity_pool_provider(request, options = nil)
|
|
986
|
+
# Pass arguments to `create_workload_identity_pool_provider` via a request object, either of type
|
|
987
|
+
# {::Google::Iam::V1beta::CreateWorkloadIdentityPoolProviderRequest} or an equivalent Hash.
|
|
988
|
+
#
|
|
989
|
+
# @param request [::Google::Iam::V1beta::CreateWorkloadIdentityPoolProviderRequest, ::Hash]
|
|
990
|
+
# A request object representing the call parameters. Required. To specify no
|
|
991
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
992
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
993
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
994
|
+
#
|
|
995
|
+
# @overload create_workload_identity_pool_provider(parent: nil, workload_identity_pool_provider: nil, workload_identity_pool_provider_id: nil)
|
|
996
|
+
# Pass arguments to `create_workload_identity_pool_provider` via keyword arguments. Note that at
|
|
997
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
998
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
999
|
+
#
|
|
1000
|
+
# @param parent [::String]
|
|
1001
|
+
# Required. The pool to create this provider in.
|
|
1002
|
+
# @param workload_identity_pool_provider [::Google::Iam::V1beta::WorkloadIdentityPoolProvider, ::Hash]
|
|
1003
|
+
# Required. The provider to create.
|
|
1004
|
+
# @param workload_identity_pool_provider_id [::String]
|
|
1005
|
+
# Required. The ID for the provider, which becomes the
|
|
1006
|
+
# final component of the resource name. This value must be 4-32 characters,
|
|
1007
|
+
# and may contain the characters [a-z0-9-]. The prefix `gcp-` is
|
|
1008
|
+
# reserved for use by Google, and may not be specified.
|
|
1009
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1010
|
+
# @yieldparam result [::Gapic::Operation]
|
|
1011
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1012
|
+
#
|
|
1013
|
+
# @return [::Gapic::Operation]
|
|
1014
|
+
#
|
|
1015
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1016
|
+
#
|
|
1017
|
+
# @example Basic example
|
|
1018
|
+
# require "google/iam/v1beta"
|
|
1019
|
+
#
|
|
1020
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1021
|
+
# client = Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client.new
|
|
1022
|
+
#
|
|
1023
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1024
|
+
# request = Google::Iam::V1beta::CreateWorkloadIdentityPoolProviderRequest.new
|
|
1025
|
+
#
|
|
1026
|
+
# # Call the create_workload_identity_pool_provider method.
|
|
1027
|
+
# result = client.create_workload_identity_pool_provider request
|
|
1028
|
+
#
|
|
1029
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1030
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1031
|
+
# # Here is how to wait for a response.
|
|
1032
|
+
# result.wait_until_done! timeout: 60
|
|
1033
|
+
# if result.response?
|
|
1034
|
+
# p result.response
|
|
1035
|
+
# else
|
|
1036
|
+
# puts "No response received."
|
|
1037
|
+
# end
|
|
1038
|
+
#
|
|
1039
|
+
def create_workload_identity_pool_provider request, options = nil
|
|
1040
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1041
|
+
|
|
1042
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::CreateWorkloadIdentityPoolProviderRequest
|
|
1043
|
+
|
|
1044
|
+
# Converts hash and nil to an options object
|
|
1045
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1046
|
+
|
|
1047
|
+
# Customize the options with defaults
|
|
1048
|
+
call_metadata = @config.rpcs.create_workload_identity_pool_provider.metadata.to_h
|
|
1049
|
+
|
|
1050
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1051
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1052
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1053
|
+
gapic_version: ::Google::Iam::V1beta::VERSION,
|
|
1054
|
+
transports_version_send: [:rest]
|
|
1055
|
+
|
|
1056
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1057
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1058
|
+
|
|
1059
|
+
options.apply_defaults timeout: @config.rpcs.create_workload_identity_pool_provider.timeout,
|
|
1060
|
+
metadata: call_metadata,
|
|
1061
|
+
retry_policy: @config.rpcs.create_workload_identity_pool_provider.retry_policy
|
|
1062
|
+
|
|
1063
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1064
|
+
metadata: @config.metadata,
|
|
1065
|
+
retry_policy: @config.retry_policy
|
|
1066
|
+
|
|
1067
|
+
@workload_identity_pools_stub.create_workload_identity_pool_provider request, options do |result, operation|
|
|
1068
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
1069
|
+
yield result, operation if block_given?
|
|
1070
|
+
throw :response, result
|
|
1071
|
+
end
|
|
1072
|
+
rescue ::Gapic::Rest::Error => e
|
|
1073
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1074
|
+
end
|
|
1075
|
+
|
|
1076
|
+
##
|
|
1077
|
+
# Updates an existing
|
|
1078
|
+
# [WorkloadIdentityPoolProvider][google.iam.v1beta.WorkloadIdentityProvider].
|
|
1079
|
+
#
|
|
1080
|
+
# @overload update_workload_identity_pool_provider(request, options = nil)
|
|
1081
|
+
# Pass arguments to `update_workload_identity_pool_provider` via a request object, either of type
|
|
1082
|
+
# {::Google::Iam::V1beta::UpdateWorkloadIdentityPoolProviderRequest} or an equivalent Hash.
|
|
1083
|
+
#
|
|
1084
|
+
# @param request [::Google::Iam::V1beta::UpdateWorkloadIdentityPoolProviderRequest, ::Hash]
|
|
1085
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1086
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1087
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1088
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1089
|
+
#
|
|
1090
|
+
# @overload update_workload_identity_pool_provider(workload_identity_pool_provider: nil, update_mask: nil)
|
|
1091
|
+
# Pass arguments to `update_workload_identity_pool_provider` via keyword arguments. Note that at
|
|
1092
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1093
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1094
|
+
#
|
|
1095
|
+
# @param workload_identity_pool_provider [::Google::Iam::V1beta::WorkloadIdentityPoolProvider, ::Hash]
|
|
1096
|
+
# Required. The provider to update.
|
|
1097
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
1098
|
+
# Required. The list of fields to update.
|
|
1099
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1100
|
+
# @yieldparam result [::Gapic::Operation]
|
|
1101
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1102
|
+
#
|
|
1103
|
+
# @return [::Gapic::Operation]
|
|
1104
|
+
#
|
|
1105
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1106
|
+
#
|
|
1107
|
+
# @example Basic example
|
|
1108
|
+
# require "google/iam/v1beta"
|
|
1109
|
+
#
|
|
1110
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1111
|
+
# client = Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client.new
|
|
1112
|
+
#
|
|
1113
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1114
|
+
# request = Google::Iam::V1beta::UpdateWorkloadIdentityPoolProviderRequest.new
|
|
1115
|
+
#
|
|
1116
|
+
# # Call the update_workload_identity_pool_provider method.
|
|
1117
|
+
# result = client.update_workload_identity_pool_provider request
|
|
1118
|
+
#
|
|
1119
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1120
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1121
|
+
# # Here is how to wait for a response.
|
|
1122
|
+
# result.wait_until_done! timeout: 60
|
|
1123
|
+
# if result.response?
|
|
1124
|
+
# p result.response
|
|
1125
|
+
# else
|
|
1126
|
+
# puts "No response received."
|
|
1127
|
+
# end
|
|
1128
|
+
#
|
|
1129
|
+
def update_workload_identity_pool_provider request, options = nil
|
|
1130
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1131
|
+
|
|
1132
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::UpdateWorkloadIdentityPoolProviderRequest
|
|
1133
|
+
|
|
1134
|
+
# Converts hash and nil to an options object
|
|
1135
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1136
|
+
|
|
1137
|
+
# Customize the options with defaults
|
|
1138
|
+
call_metadata = @config.rpcs.update_workload_identity_pool_provider.metadata.to_h
|
|
1139
|
+
|
|
1140
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1141
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1142
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1143
|
+
gapic_version: ::Google::Iam::V1beta::VERSION,
|
|
1144
|
+
transports_version_send: [:rest]
|
|
1145
|
+
|
|
1146
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1147
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1148
|
+
|
|
1149
|
+
options.apply_defaults timeout: @config.rpcs.update_workload_identity_pool_provider.timeout,
|
|
1150
|
+
metadata: call_metadata,
|
|
1151
|
+
retry_policy: @config.rpcs.update_workload_identity_pool_provider.retry_policy
|
|
1152
|
+
|
|
1153
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1154
|
+
metadata: @config.metadata,
|
|
1155
|
+
retry_policy: @config.retry_policy
|
|
1156
|
+
|
|
1157
|
+
@workload_identity_pools_stub.update_workload_identity_pool_provider request, options do |result, operation|
|
|
1158
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
1159
|
+
yield result, operation if block_given?
|
|
1160
|
+
throw :response, result
|
|
1161
|
+
end
|
|
1162
|
+
rescue ::Gapic::Rest::Error => e
|
|
1163
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1164
|
+
end
|
|
1165
|
+
|
|
1166
|
+
##
|
|
1167
|
+
# Deletes a
|
|
1168
|
+
# [WorkloadIdentityPoolProvider][google.iam.v1beta.WorkloadIdentityProvider].
|
|
1169
|
+
# Deleting a provider does not revoke credentials that have already been
|
|
1170
|
+
# issued; they continue to grant access.
|
|
1171
|
+
# You can undelete a provider for 30 days. After 30 days, deletion is
|
|
1172
|
+
# permanent.
|
|
1173
|
+
# You cannot update deleted providers. However, you can view and list them.
|
|
1174
|
+
#
|
|
1175
|
+
# @overload delete_workload_identity_pool_provider(request, options = nil)
|
|
1176
|
+
# Pass arguments to `delete_workload_identity_pool_provider` via a request object, either of type
|
|
1177
|
+
# {::Google::Iam::V1beta::DeleteWorkloadIdentityPoolProviderRequest} or an equivalent Hash.
|
|
1178
|
+
#
|
|
1179
|
+
# @param request [::Google::Iam::V1beta::DeleteWorkloadIdentityPoolProviderRequest, ::Hash]
|
|
1180
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1181
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1182
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1183
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1184
|
+
#
|
|
1185
|
+
# @overload delete_workload_identity_pool_provider(name: nil)
|
|
1186
|
+
# Pass arguments to `delete_workload_identity_pool_provider` via keyword arguments. Note that at
|
|
1187
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1188
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1189
|
+
#
|
|
1190
|
+
# @param name [::String]
|
|
1191
|
+
# Required. The name of the provider to delete.
|
|
1192
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1193
|
+
# @yieldparam result [::Gapic::Operation]
|
|
1194
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1195
|
+
#
|
|
1196
|
+
# @return [::Gapic::Operation]
|
|
1197
|
+
#
|
|
1198
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1199
|
+
#
|
|
1200
|
+
# @example Basic example
|
|
1201
|
+
# require "google/iam/v1beta"
|
|
1202
|
+
#
|
|
1203
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1204
|
+
# client = Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client.new
|
|
1205
|
+
#
|
|
1206
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1207
|
+
# request = Google::Iam::V1beta::DeleteWorkloadIdentityPoolProviderRequest.new
|
|
1208
|
+
#
|
|
1209
|
+
# # Call the delete_workload_identity_pool_provider method.
|
|
1210
|
+
# result = client.delete_workload_identity_pool_provider request
|
|
1211
|
+
#
|
|
1212
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1213
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1214
|
+
# # Here is how to wait for a response.
|
|
1215
|
+
# result.wait_until_done! timeout: 60
|
|
1216
|
+
# if result.response?
|
|
1217
|
+
# p result.response
|
|
1218
|
+
# else
|
|
1219
|
+
# puts "No response received."
|
|
1220
|
+
# end
|
|
1221
|
+
#
|
|
1222
|
+
def delete_workload_identity_pool_provider request, options = nil
|
|
1223
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1224
|
+
|
|
1225
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::DeleteWorkloadIdentityPoolProviderRequest
|
|
1226
|
+
|
|
1227
|
+
# Converts hash and nil to an options object
|
|
1228
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1229
|
+
|
|
1230
|
+
# Customize the options with defaults
|
|
1231
|
+
call_metadata = @config.rpcs.delete_workload_identity_pool_provider.metadata.to_h
|
|
1232
|
+
|
|
1233
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1234
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1235
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1236
|
+
gapic_version: ::Google::Iam::V1beta::VERSION,
|
|
1237
|
+
transports_version_send: [:rest]
|
|
1238
|
+
|
|
1239
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1240
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1241
|
+
|
|
1242
|
+
options.apply_defaults timeout: @config.rpcs.delete_workload_identity_pool_provider.timeout,
|
|
1243
|
+
metadata: call_metadata,
|
|
1244
|
+
retry_policy: @config.rpcs.delete_workload_identity_pool_provider.retry_policy
|
|
1245
|
+
|
|
1246
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1247
|
+
metadata: @config.metadata,
|
|
1248
|
+
retry_policy: @config.retry_policy
|
|
1249
|
+
|
|
1250
|
+
@workload_identity_pools_stub.delete_workload_identity_pool_provider request, options do |result, operation|
|
|
1251
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
1252
|
+
yield result, operation if block_given?
|
|
1253
|
+
throw :response, result
|
|
1254
|
+
end
|
|
1255
|
+
rescue ::Gapic::Rest::Error => e
|
|
1256
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1257
|
+
end
|
|
1258
|
+
|
|
1259
|
+
##
|
|
1260
|
+
# Undeletes a
|
|
1261
|
+
# [WorkloadIdentityPoolProvider][google.iam.v1beta.WorkloadIdentityProvider],
|
|
1262
|
+
# as long as it was deleted fewer than 30 days ago.
|
|
1263
|
+
#
|
|
1264
|
+
# @overload undelete_workload_identity_pool_provider(request, options = nil)
|
|
1265
|
+
# Pass arguments to `undelete_workload_identity_pool_provider` via a request object, either of type
|
|
1266
|
+
# {::Google::Iam::V1beta::UndeleteWorkloadIdentityPoolProviderRequest} or an equivalent Hash.
|
|
1267
|
+
#
|
|
1268
|
+
# @param request [::Google::Iam::V1beta::UndeleteWorkloadIdentityPoolProviderRequest, ::Hash]
|
|
1269
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1270
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1271
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1272
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1273
|
+
#
|
|
1274
|
+
# @overload undelete_workload_identity_pool_provider(name: nil)
|
|
1275
|
+
# Pass arguments to `undelete_workload_identity_pool_provider` via keyword arguments. Note that at
|
|
1276
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1277
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1278
|
+
#
|
|
1279
|
+
# @param name [::String]
|
|
1280
|
+
# Required. The name of the provider to undelete.
|
|
1281
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1282
|
+
# @yieldparam result [::Gapic::Operation]
|
|
1283
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1284
|
+
#
|
|
1285
|
+
# @return [::Gapic::Operation]
|
|
1286
|
+
#
|
|
1287
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1288
|
+
#
|
|
1289
|
+
# @example Basic example
|
|
1290
|
+
# require "google/iam/v1beta"
|
|
1291
|
+
#
|
|
1292
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1293
|
+
# client = Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client.new
|
|
1294
|
+
#
|
|
1295
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1296
|
+
# request = Google::Iam::V1beta::UndeleteWorkloadIdentityPoolProviderRequest.new
|
|
1297
|
+
#
|
|
1298
|
+
# # Call the undelete_workload_identity_pool_provider method.
|
|
1299
|
+
# result = client.undelete_workload_identity_pool_provider request
|
|
1300
|
+
#
|
|
1301
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1302
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1303
|
+
# # Here is how to wait for a response.
|
|
1304
|
+
# result.wait_until_done! timeout: 60
|
|
1305
|
+
# if result.response?
|
|
1306
|
+
# p result.response
|
|
1307
|
+
# else
|
|
1308
|
+
# puts "No response received."
|
|
1309
|
+
# end
|
|
1310
|
+
#
|
|
1311
|
+
def undelete_workload_identity_pool_provider request, options = nil
|
|
1312
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1313
|
+
|
|
1314
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::UndeleteWorkloadIdentityPoolProviderRequest
|
|
1315
|
+
|
|
1316
|
+
# Converts hash and nil to an options object
|
|
1317
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1318
|
+
|
|
1319
|
+
# Customize the options with defaults
|
|
1320
|
+
call_metadata = @config.rpcs.undelete_workload_identity_pool_provider.metadata.to_h
|
|
1321
|
+
|
|
1322
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1323
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1324
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1325
|
+
gapic_version: ::Google::Iam::V1beta::VERSION,
|
|
1326
|
+
transports_version_send: [:rest]
|
|
1327
|
+
|
|
1328
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1329
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1330
|
+
|
|
1331
|
+
options.apply_defaults timeout: @config.rpcs.undelete_workload_identity_pool_provider.timeout,
|
|
1332
|
+
metadata: call_metadata,
|
|
1333
|
+
retry_policy: @config.rpcs.undelete_workload_identity_pool_provider.retry_policy
|
|
1334
|
+
|
|
1335
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1336
|
+
metadata: @config.metadata,
|
|
1337
|
+
retry_policy: @config.retry_policy
|
|
1338
|
+
|
|
1339
|
+
@workload_identity_pools_stub.undelete_workload_identity_pool_provider request, options do |result, operation|
|
|
1340
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
1341
|
+
yield result, operation if block_given?
|
|
1342
|
+
throw :response, result
|
|
1343
|
+
end
|
|
1344
|
+
rescue ::Gapic::Rest::Error => e
|
|
1345
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1346
|
+
end
|
|
1347
|
+
|
|
1348
|
+
##
|
|
1349
|
+
# Configuration class for the WorkloadIdentityPools REST API.
|
|
1350
|
+
#
|
|
1351
|
+
# This class represents the configuration for WorkloadIdentityPools REST,
|
|
1352
|
+
# providing control over timeouts, retry behavior, logging, transport
|
|
1353
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
|
1354
|
+
# applied individually to specific RPCs. See
|
|
1355
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client::Configuration::Rpcs}
|
|
1356
|
+
# for a list of RPCs that can be configured independently.
|
|
1357
|
+
#
|
|
1358
|
+
# Configuration can be applied globally to all clients, or to a single client
|
|
1359
|
+
# on construction.
|
|
1360
|
+
#
|
|
1361
|
+
# @example
|
|
1362
|
+
#
|
|
1363
|
+
# # Modify the global config, setting the timeout for
|
|
1364
|
+
# # list_workload_identity_pools to 20 seconds,
|
|
1365
|
+
# # and all remaining timeouts to 10 seconds.
|
|
1366
|
+
# ::Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client.configure do |config|
|
|
1367
|
+
# config.timeout = 10.0
|
|
1368
|
+
# config.rpcs.list_workload_identity_pools.timeout = 20.0
|
|
1369
|
+
# end
|
|
1370
|
+
#
|
|
1371
|
+
# # Apply the above configuration only to a new client.
|
|
1372
|
+
# client = ::Google::Iam::V1beta::WorkloadIdentityPools::Rest::Client.new do |config|
|
|
1373
|
+
# config.timeout = 10.0
|
|
1374
|
+
# config.rpcs.list_workload_identity_pools.timeout = 20.0
|
|
1375
|
+
# end
|
|
1376
|
+
#
|
|
1377
|
+
# @!attribute [rw] endpoint
|
|
1378
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
1379
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
1380
|
+
# @return [::String,nil]
|
|
1381
|
+
# @!attribute [rw] credentials
|
|
1382
|
+
# Credentials to send with calls. You may provide any of the following types:
|
|
1383
|
+
# * (`String`) The path to a service account key file in JSON format
|
|
1384
|
+
# * (`Hash`) A service account key as a Hash
|
|
1385
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
1386
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
1387
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
1388
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
|
1389
|
+
# * (`nil`) indicating no credentials
|
|
1390
|
+
#
|
|
1391
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
1392
|
+
# external source for authentication to Google Cloud, you must validate it before
|
|
1393
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
|
1394
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
|
1395
|
+
# For more information, refer to [Validate credential configurations from external
|
|
1396
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
|
1397
|
+
# @return [::Object]
|
|
1398
|
+
# @!attribute [rw] scope
|
|
1399
|
+
# The OAuth scopes
|
|
1400
|
+
# @return [::Array<::String>]
|
|
1401
|
+
# @!attribute [rw] lib_name
|
|
1402
|
+
# The library name as recorded in instrumentation and logging
|
|
1403
|
+
# @return [::String]
|
|
1404
|
+
# @!attribute [rw] lib_version
|
|
1405
|
+
# The library version as recorded in instrumentation and logging
|
|
1406
|
+
# @return [::String]
|
|
1407
|
+
# @!attribute [rw] timeout
|
|
1408
|
+
# The call timeout in seconds.
|
|
1409
|
+
# @return [::Numeric]
|
|
1410
|
+
# @!attribute [rw] metadata
|
|
1411
|
+
# Additional headers to be sent with the call.
|
|
1412
|
+
# @return [::Hash{::Symbol=>::String}]
|
|
1413
|
+
# @!attribute [rw] retry_policy
|
|
1414
|
+
# The retry policy. The value is a hash with the following keys:
|
|
1415
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1416
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1417
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1418
|
+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
|
|
1419
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1420
|
+
# trigger a retry.
|
|
1421
|
+
# @return [::Hash]
|
|
1422
|
+
# @!attribute [rw] quota_project
|
|
1423
|
+
# A separate project against which to charge quota.
|
|
1424
|
+
# @return [::String]
|
|
1425
|
+
# @!attribute [rw] universe_domain
|
|
1426
|
+
# The universe domain within which to make requests. This determines the
|
|
1427
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
1428
|
+
# universe (usually the default "googleapis.com" universe).
|
|
1429
|
+
# @return [::String,nil]
|
|
1430
|
+
# @!attribute [rw] logger
|
|
1431
|
+
# A custom logger to use for request/response debug logging, or the value
|
|
1432
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
|
1433
|
+
# explicitly disable logging.
|
|
1434
|
+
# @return [::Logger,:default,nil]
|
|
1435
|
+
#
|
|
1436
|
+
class Configuration
|
|
1437
|
+
extend ::Gapic::Config
|
|
1438
|
+
|
|
1439
|
+
# @private
|
|
1440
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
1441
|
+
DEFAULT_ENDPOINT = "iam.googleapis.com"
|
|
1442
|
+
|
|
1443
|
+
config_attr :endpoint, nil, ::String, nil
|
|
1444
|
+
config_attr :credentials, nil do |value|
|
|
1445
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
|
1446
|
+
allowed.any? { |klass| klass === value }
|
|
1447
|
+
end
|
|
1448
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
|
1449
|
+
config_attr :lib_name, nil, ::String, nil
|
|
1450
|
+
config_attr :lib_version, nil, ::String, nil
|
|
1451
|
+
config_attr :timeout, nil, ::Numeric, nil
|
|
1452
|
+
config_attr :metadata, nil, ::Hash, nil
|
|
1453
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
1454
|
+
config_attr :quota_project, nil, ::String, nil
|
|
1455
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
1456
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
|
1457
|
+
|
|
1458
|
+
# @private
|
|
1459
|
+
def initialize parent_config = nil
|
|
1460
|
+
@parent_config = parent_config unless parent_config.nil?
|
|
1461
|
+
|
|
1462
|
+
yield self if block_given?
|
|
1463
|
+
end
|
|
1464
|
+
|
|
1465
|
+
##
|
|
1466
|
+
# Configurations for individual RPCs
|
|
1467
|
+
# @return [Rpcs]
|
|
1468
|
+
#
|
|
1469
|
+
def rpcs
|
|
1470
|
+
@rpcs ||= begin
|
|
1471
|
+
parent_rpcs = nil
|
|
1472
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
|
1473
|
+
Rpcs.new parent_rpcs
|
|
1474
|
+
end
|
|
1475
|
+
end
|
|
1476
|
+
|
|
1477
|
+
##
|
|
1478
|
+
# Configuration RPC class for the WorkloadIdentityPools API.
|
|
1479
|
+
#
|
|
1480
|
+
# Includes fields providing the configuration for each RPC in this service.
|
|
1481
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
|
1482
|
+
# the following configuration fields:
|
|
1483
|
+
#
|
|
1484
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
|
1485
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
|
1486
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
|
1487
|
+
# include the following keys:
|
|
1488
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1489
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1490
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1491
|
+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
|
|
1492
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1493
|
+
# trigger a retry.
|
|
1494
|
+
#
|
|
1495
|
+
class Rpcs
|
|
1496
|
+
##
|
|
1497
|
+
# RPC-specific configuration for `list_workload_identity_pools`
|
|
1498
|
+
# @return [::Gapic::Config::Method]
|
|
1499
|
+
#
|
|
1500
|
+
attr_reader :list_workload_identity_pools
|
|
1501
|
+
##
|
|
1502
|
+
# RPC-specific configuration for `get_workload_identity_pool`
|
|
1503
|
+
# @return [::Gapic::Config::Method]
|
|
1504
|
+
#
|
|
1505
|
+
attr_reader :get_workload_identity_pool
|
|
1506
|
+
##
|
|
1507
|
+
# RPC-specific configuration for `create_workload_identity_pool`
|
|
1508
|
+
# @return [::Gapic::Config::Method]
|
|
1509
|
+
#
|
|
1510
|
+
attr_reader :create_workload_identity_pool
|
|
1511
|
+
##
|
|
1512
|
+
# RPC-specific configuration for `update_workload_identity_pool`
|
|
1513
|
+
# @return [::Gapic::Config::Method]
|
|
1514
|
+
#
|
|
1515
|
+
attr_reader :update_workload_identity_pool
|
|
1516
|
+
##
|
|
1517
|
+
# RPC-specific configuration for `delete_workload_identity_pool`
|
|
1518
|
+
# @return [::Gapic::Config::Method]
|
|
1519
|
+
#
|
|
1520
|
+
attr_reader :delete_workload_identity_pool
|
|
1521
|
+
##
|
|
1522
|
+
# RPC-specific configuration for `undelete_workload_identity_pool`
|
|
1523
|
+
# @return [::Gapic::Config::Method]
|
|
1524
|
+
#
|
|
1525
|
+
attr_reader :undelete_workload_identity_pool
|
|
1526
|
+
##
|
|
1527
|
+
# RPC-specific configuration for `list_workload_identity_pool_providers`
|
|
1528
|
+
# @return [::Gapic::Config::Method]
|
|
1529
|
+
#
|
|
1530
|
+
attr_reader :list_workload_identity_pool_providers
|
|
1531
|
+
##
|
|
1532
|
+
# RPC-specific configuration for `get_workload_identity_pool_provider`
|
|
1533
|
+
# @return [::Gapic::Config::Method]
|
|
1534
|
+
#
|
|
1535
|
+
attr_reader :get_workload_identity_pool_provider
|
|
1536
|
+
##
|
|
1537
|
+
# RPC-specific configuration for `create_workload_identity_pool_provider`
|
|
1538
|
+
# @return [::Gapic::Config::Method]
|
|
1539
|
+
#
|
|
1540
|
+
attr_reader :create_workload_identity_pool_provider
|
|
1541
|
+
##
|
|
1542
|
+
# RPC-specific configuration for `update_workload_identity_pool_provider`
|
|
1543
|
+
# @return [::Gapic::Config::Method]
|
|
1544
|
+
#
|
|
1545
|
+
attr_reader :update_workload_identity_pool_provider
|
|
1546
|
+
##
|
|
1547
|
+
# RPC-specific configuration for `delete_workload_identity_pool_provider`
|
|
1548
|
+
# @return [::Gapic::Config::Method]
|
|
1549
|
+
#
|
|
1550
|
+
attr_reader :delete_workload_identity_pool_provider
|
|
1551
|
+
##
|
|
1552
|
+
# RPC-specific configuration for `undelete_workload_identity_pool_provider`
|
|
1553
|
+
# @return [::Gapic::Config::Method]
|
|
1554
|
+
#
|
|
1555
|
+
attr_reader :undelete_workload_identity_pool_provider
|
|
1556
|
+
|
|
1557
|
+
# @private
|
|
1558
|
+
def initialize parent_rpcs = nil
|
|
1559
|
+
list_workload_identity_pools_config = parent_rpcs.list_workload_identity_pools if parent_rpcs.respond_to? :list_workload_identity_pools
|
|
1560
|
+
@list_workload_identity_pools = ::Gapic::Config::Method.new list_workload_identity_pools_config
|
|
1561
|
+
get_workload_identity_pool_config = parent_rpcs.get_workload_identity_pool if parent_rpcs.respond_to? :get_workload_identity_pool
|
|
1562
|
+
@get_workload_identity_pool = ::Gapic::Config::Method.new get_workload_identity_pool_config
|
|
1563
|
+
create_workload_identity_pool_config = parent_rpcs.create_workload_identity_pool if parent_rpcs.respond_to? :create_workload_identity_pool
|
|
1564
|
+
@create_workload_identity_pool = ::Gapic::Config::Method.new create_workload_identity_pool_config
|
|
1565
|
+
update_workload_identity_pool_config = parent_rpcs.update_workload_identity_pool if parent_rpcs.respond_to? :update_workload_identity_pool
|
|
1566
|
+
@update_workload_identity_pool = ::Gapic::Config::Method.new update_workload_identity_pool_config
|
|
1567
|
+
delete_workload_identity_pool_config = parent_rpcs.delete_workload_identity_pool if parent_rpcs.respond_to? :delete_workload_identity_pool
|
|
1568
|
+
@delete_workload_identity_pool = ::Gapic::Config::Method.new delete_workload_identity_pool_config
|
|
1569
|
+
undelete_workload_identity_pool_config = parent_rpcs.undelete_workload_identity_pool if parent_rpcs.respond_to? :undelete_workload_identity_pool
|
|
1570
|
+
@undelete_workload_identity_pool = ::Gapic::Config::Method.new undelete_workload_identity_pool_config
|
|
1571
|
+
list_workload_identity_pool_providers_config = parent_rpcs.list_workload_identity_pool_providers if parent_rpcs.respond_to? :list_workload_identity_pool_providers
|
|
1572
|
+
@list_workload_identity_pool_providers = ::Gapic::Config::Method.new list_workload_identity_pool_providers_config
|
|
1573
|
+
get_workload_identity_pool_provider_config = parent_rpcs.get_workload_identity_pool_provider if parent_rpcs.respond_to? :get_workload_identity_pool_provider
|
|
1574
|
+
@get_workload_identity_pool_provider = ::Gapic::Config::Method.new get_workload_identity_pool_provider_config
|
|
1575
|
+
create_workload_identity_pool_provider_config = parent_rpcs.create_workload_identity_pool_provider if parent_rpcs.respond_to? :create_workload_identity_pool_provider
|
|
1576
|
+
@create_workload_identity_pool_provider = ::Gapic::Config::Method.new create_workload_identity_pool_provider_config
|
|
1577
|
+
update_workload_identity_pool_provider_config = parent_rpcs.update_workload_identity_pool_provider if parent_rpcs.respond_to? :update_workload_identity_pool_provider
|
|
1578
|
+
@update_workload_identity_pool_provider = ::Gapic::Config::Method.new update_workload_identity_pool_provider_config
|
|
1579
|
+
delete_workload_identity_pool_provider_config = parent_rpcs.delete_workload_identity_pool_provider if parent_rpcs.respond_to? :delete_workload_identity_pool_provider
|
|
1580
|
+
@delete_workload_identity_pool_provider = ::Gapic::Config::Method.new delete_workload_identity_pool_provider_config
|
|
1581
|
+
undelete_workload_identity_pool_provider_config = parent_rpcs.undelete_workload_identity_pool_provider if parent_rpcs.respond_to? :undelete_workload_identity_pool_provider
|
|
1582
|
+
@undelete_workload_identity_pool_provider = ::Gapic::Config::Method.new undelete_workload_identity_pool_provider_config
|
|
1583
|
+
|
|
1584
|
+
yield self if block_given?
|
|
1585
|
+
end
|
|
1586
|
+
end
|
|
1587
|
+
end
|
|
1588
|
+
end
|
|
1589
|
+
end
|
|
1590
|
+
end
|
|
1591
|
+
end
|
|
1592
|
+
end
|
|
1593
|
+
end
|