google-cloud-beyond_corp-app_connections-v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +149 -0
- data/LICENSE.md +201 -0
- data/README.md +144 -0
- data/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb +1048 -0
- data/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb +49 -0
- data/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb +772 -0
- data/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb +109 -0
- data/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb +65 -0
- data/lib/google/cloud/beyond_corp/app_connections/v1/version.rb +30 -0
- data/lib/google/cloud/beyond_corp/app_connections/v1.rb +42 -0
- data/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb.rb +141 -0
- data/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb +72 -0
- data/lib/google-cloud-beyond_corp-app_connections-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb +411 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/type/expr.rb +75 -0
- metadata +260 -0
@@ -0,0 +1,1048 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb"
|
21
|
+
require "google/cloud/location"
|
22
|
+
require "google/iam/v1"
|
23
|
+
|
24
|
+
module Google
|
25
|
+
module Cloud
|
26
|
+
module BeyondCorp
|
27
|
+
module AppConnections
|
28
|
+
module V1
|
29
|
+
module AppConnectionsService
|
30
|
+
##
|
31
|
+
# Client for the AppConnectionsService service.
|
32
|
+
#
|
33
|
+
# ## API Overview
|
34
|
+
#
|
35
|
+
# The `beyondcorp.googleapis.com` service implements the Google Cloud
|
36
|
+
# BeyondCorp API.
|
37
|
+
#
|
38
|
+
# ## Data Model
|
39
|
+
#
|
40
|
+
# The AppConnectionsService exposes the following resources:
|
41
|
+
#
|
42
|
+
# * AppConnections, named as follows:
|
43
|
+
# `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`.
|
44
|
+
#
|
45
|
+
# The AppConnectionsService service provides methods to manage
|
46
|
+
# (create/read/update/delete) BeyondCorp AppConnections.
|
47
|
+
#
|
48
|
+
class Client
|
49
|
+
include Paths
|
50
|
+
|
51
|
+
# @private
|
52
|
+
attr_reader :app_connections_service_stub
|
53
|
+
|
54
|
+
##
|
55
|
+
# Configure the AppConnectionsService Client class.
|
56
|
+
#
|
57
|
+
# See {::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client::Configuration}
|
58
|
+
# for a description of the configuration fields.
|
59
|
+
#
|
60
|
+
# @example
|
61
|
+
#
|
62
|
+
# # Modify the configuration for all AppConnectionsService clients
|
63
|
+
# ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.configure do |config|
|
64
|
+
# config.timeout = 10.0
|
65
|
+
# end
|
66
|
+
#
|
67
|
+
# @yield [config] Configure the Client client.
|
68
|
+
# @yieldparam config [Client::Configuration]
|
69
|
+
#
|
70
|
+
# @return [Client::Configuration]
|
71
|
+
#
|
72
|
+
def self.configure
|
73
|
+
@configure ||= begin
|
74
|
+
namespace = ["Google", "Cloud", "BeyondCorp", "AppConnections", "V1"]
|
75
|
+
parent_config = while namespace.any?
|
76
|
+
parent_name = namespace.join "::"
|
77
|
+
parent_const = const_get parent_name
|
78
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
79
|
+
namespace.pop
|
80
|
+
end
|
81
|
+
default_config = Client::Configuration.new parent_config
|
82
|
+
|
83
|
+
default_config
|
84
|
+
end
|
85
|
+
yield @configure if block_given?
|
86
|
+
@configure
|
87
|
+
end
|
88
|
+
|
89
|
+
##
|
90
|
+
# Configure the AppConnectionsService Client instance.
|
91
|
+
#
|
92
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
93
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
94
|
+
# should be made on {Client.configure}.
|
95
|
+
#
|
96
|
+
# See {::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client::Configuration}
|
97
|
+
# for a description of the configuration fields.
|
98
|
+
#
|
99
|
+
# @yield [config] Configure the Client client.
|
100
|
+
# @yieldparam config [Client::Configuration]
|
101
|
+
#
|
102
|
+
# @return [Client::Configuration]
|
103
|
+
#
|
104
|
+
def configure
|
105
|
+
yield @config if block_given?
|
106
|
+
@config
|
107
|
+
end
|
108
|
+
|
109
|
+
##
|
110
|
+
# Create a new AppConnectionsService client object.
|
111
|
+
#
|
112
|
+
# @example
|
113
|
+
#
|
114
|
+
# # Create a client using the default configuration
|
115
|
+
# client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new
|
116
|
+
#
|
117
|
+
# # Create a client using a custom configuration
|
118
|
+
# client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config|
|
119
|
+
# config.timeout = 10.0
|
120
|
+
# end
|
121
|
+
#
|
122
|
+
# @yield [config] Configure the AppConnectionsService client.
|
123
|
+
# @yieldparam config [Client::Configuration]
|
124
|
+
#
|
125
|
+
def initialize
|
126
|
+
# These require statements are intentionally placed here to initialize
|
127
|
+
# the gRPC module only when it's required.
|
128
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
129
|
+
require "gapic/grpc"
|
130
|
+
require "google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb"
|
131
|
+
|
132
|
+
# Create the configuration object
|
133
|
+
@config = Configuration.new Client.configure
|
134
|
+
|
135
|
+
# Yield the configuration if needed
|
136
|
+
yield @config if block_given?
|
137
|
+
|
138
|
+
# Create credentials
|
139
|
+
credentials = @config.credentials
|
140
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
141
|
+
# but only if the default endpoint does not have a region prefix.
|
142
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
143
|
+
!@config.endpoint.split(".").first.include?("-")
|
144
|
+
credentials ||= Credentials.default scope: @config.scope,
|
145
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
146
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
147
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
148
|
+
end
|
149
|
+
@quota_project_id = @config.quota_project
|
150
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
151
|
+
|
152
|
+
@operations_client = Operations.new do |config|
|
153
|
+
config.credentials = credentials
|
154
|
+
config.quota_project = @quota_project_id
|
155
|
+
config.endpoint = @config.endpoint
|
156
|
+
end
|
157
|
+
|
158
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
159
|
+
config.credentials = credentials
|
160
|
+
config.quota_project = @quota_project_id
|
161
|
+
config.endpoint = @config.endpoint
|
162
|
+
end
|
163
|
+
|
164
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
165
|
+
config.credentials = credentials
|
166
|
+
config.quota_project = @quota_project_id
|
167
|
+
config.endpoint = @config.endpoint
|
168
|
+
end
|
169
|
+
|
170
|
+
@app_connections_service_stub = ::Gapic::ServiceStub.new(
|
171
|
+
::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Stub,
|
172
|
+
credentials: credentials,
|
173
|
+
endpoint: @config.endpoint,
|
174
|
+
channel_args: @config.channel_args,
|
175
|
+
interceptors: @config.interceptors
|
176
|
+
)
|
177
|
+
end
|
178
|
+
|
179
|
+
##
|
180
|
+
# Get the associated client for long-running operations.
|
181
|
+
#
|
182
|
+
# @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations]
|
183
|
+
#
|
184
|
+
attr_reader :operations_client
|
185
|
+
|
186
|
+
##
|
187
|
+
# Get the associated client for mix-in of the Locations.
|
188
|
+
#
|
189
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
190
|
+
#
|
191
|
+
attr_reader :location_client
|
192
|
+
|
193
|
+
##
|
194
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
195
|
+
#
|
196
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
197
|
+
#
|
198
|
+
attr_reader :iam_policy_client
|
199
|
+
|
200
|
+
# Service calls
|
201
|
+
|
202
|
+
##
|
203
|
+
# Lists AppConnections in a given project and location.
|
204
|
+
#
|
205
|
+
# @overload list_app_connections(request, options = nil)
|
206
|
+
# Pass arguments to `list_app_connections` via a request object, either of type
|
207
|
+
# {::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest} or an equivalent Hash.
|
208
|
+
#
|
209
|
+
# @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest, ::Hash]
|
210
|
+
# A request object representing the call parameters. Required. To specify no
|
211
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
212
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
213
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
214
|
+
#
|
215
|
+
# @overload list_app_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
216
|
+
# Pass arguments to `list_app_connections` via keyword arguments. Note that at
|
217
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
218
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
219
|
+
#
|
220
|
+
# @param parent [::String]
|
221
|
+
# Required. The resource name of the AppConnection location using the form:
|
222
|
+
# `projects/{project_id}/locations/{location_id}`
|
223
|
+
# @param page_size [::Integer]
|
224
|
+
# Optional. The maximum number of items to return.
|
225
|
+
# If not specified, a default value of 50 will be used by the service.
|
226
|
+
# Regardless of the page_size value, the response may include a partial list
|
227
|
+
# and a caller should only rely on response's
|
228
|
+
# [next_page_token][BeyondCorp.ListAppConnectionsResponse.next_page_token] to
|
229
|
+
# determine if there are more instances left to be queried.
|
230
|
+
# @param page_token [::String]
|
231
|
+
# Optional. The next_page_token value returned from a previous
|
232
|
+
# ListAppConnectionsRequest, if any.
|
233
|
+
# @param filter [::String]
|
234
|
+
# Optional. A filter specifying constraints of a list operation.
|
235
|
+
# @param order_by [::String]
|
236
|
+
# Optional. Specifies the ordering of results. See
|
237
|
+
# [Sorting
|
238
|
+
# order](https://cloud.google.com/apis/design/design_patterns#sorting_order)
|
239
|
+
# for more information.
|
240
|
+
#
|
241
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
242
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>]
|
243
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
244
|
+
#
|
245
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>]
|
246
|
+
#
|
247
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
248
|
+
#
|
249
|
+
# @example Basic example
|
250
|
+
# require "google/cloud/beyond_corp/app_connections/v1"
|
251
|
+
#
|
252
|
+
# # Create a client object. The client can be reused for multiple calls.
|
253
|
+
# client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new
|
254
|
+
#
|
255
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
256
|
+
# request = Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new
|
257
|
+
#
|
258
|
+
# # Call the list_app_connections method.
|
259
|
+
# result = client.list_app_connections request
|
260
|
+
#
|
261
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
262
|
+
# # iterate over all elements by calling #each, and the enumerable
|
263
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
264
|
+
# # methods are also available for managing paging directly.
|
265
|
+
# result.each do |response|
|
266
|
+
# # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection.
|
267
|
+
# p response
|
268
|
+
# end
|
269
|
+
#
|
270
|
+
def list_app_connections request, options = nil
|
271
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
272
|
+
|
273
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest
|
274
|
+
|
275
|
+
# Converts hash and nil to an options object
|
276
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
277
|
+
|
278
|
+
# Customize the options with defaults
|
279
|
+
metadata = @config.rpcs.list_app_connections.metadata.to_h
|
280
|
+
|
281
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
282
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
283
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
284
|
+
gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION
|
285
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
286
|
+
|
287
|
+
header_params = {}
|
288
|
+
if request.parent
|
289
|
+
header_params["parent"] = request.parent
|
290
|
+
end
|
291
|
+
|
292
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
293
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
294
|
+
|
295
|
+
options.apply_defaults timeout: @config.rpcs.list_app_connections.timeout,
|
296
|
+
metadata: metadata,
|
297
|
+
retry_policy: @config.rpcs.list_app_connections.retry_policy
|
298
|
+
|
299
|
+
options.apply_defaults timeout: @config.timeout,
|
300
|
+
metadata: @config.metadata,
|
301
|
+
retry_policy: @config.retry_policy
|
302
|
+
|
303
|
+
@app_connections_service_stub.call_rpc :list_app_connections, request, options: options do |response, operation|
|
304
|
+
response = ::Gapic::PagedEnumerable.new @app_connections_service_stub, :list_app_connections, request, response, operation, options
|
305
|
+
yield response, operation if block_given?
|
306
|
+
return response
|
307
|
+
end
|
308
|
+
rescue ::GRPC::BadStatus => e
|
309
|
+
raise ::Google::Cloud::Error.from_error(e)
|
310
|
+
end
|
311
|
+
|
312
|
+
##
|
313
|
+
# Gets details of a single AppConnection.
|
314
|
+
#
|
315
|
+
# @overload get_app_connection(request, options = nil)
|
316
|
+
# Pass arguments to `get_app_connection` via a request object, either of type
|
317
|
+
# {::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest} or an equivalent Hash.
|
318
|
+
#
|
319
|
+
# @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest, ::Hash]
|
320
|
+
# A request object representing the call parameters. Required. To specify no
|
321
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
322
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
323
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
324
|
+
#
|
325
|
+
# @overload get_app_connection(name: nil)
|
326
|
+
# Pass arguments to `get_app_connection` via keyword arguments. Note that at
|
327
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
328
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
329
|
+
#
|
330
|
+
# @param name [::String]
|
331
|
+
# Required. BeyondCorp AppConnection name using the form:
|
332
|
+
# `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`
|
333
|
+
#
|
334
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
335
|
+
# @yieldparam response [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection]
|
336
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
337
|
+
#
|
338
|
+
# @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection]
|
339
|
+
#
|
340
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
341
|
+
#
|
342
|
+
# @example Basic example
|
343
|
+
# require "google/cloud/beyond_corp/app_connections/v1"
|
344
|
+
#
|
345
|
+
# # Create a client object. The client can be reused for multiple calls.
|
346
|
+
# client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new
|
347
|
+
#
|
348
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
349
|
+
# request = Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new
|
350
|
+
#
|
351
|
+
# # Call the get_app_connection method.
|
352
|
+
# result = client.get_app_connection request
|
353
|
+
#
|
354
|
+
# # The returned object is of type Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection.
|
355
|
+
# p result
|
356
|
+
#
|
357
|
+
def get_app_connection request, options = nil
|
358
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
359
|
+
|
360
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest
|
361
|
+
|
362
|
+
# Converts hash and nil to an options object
|
363
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
364
|
+
|
365
|
+
# Customize the options with defaults
|
366
|
+
metadata = @config.rpcs.get_app_connection.metadata.to_h
|
367
|
+
|
368
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
369
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
370
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
371
|
+
gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION
|
372
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
373
|
+
|
374
|
+
header_params = {}
|
375
|
+
if request.name
|
376
|
+
header_params["name"] = request.name
|
377
|
+
end
|
378
|
+
|
379
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
380
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
381
|
+
|
382
|
+
options.apply_defaults timeout: @config.rpcs.get_app_connection.timeout,
|
383
|
+
metadata: metadata,
|
384
|
+
retry_policy: @config.rpcs.get_app_connection.retry_policy
|
385
|
+
|
386
|
+
options.apply_defaults timeout: @config.timeout,
|
387
|
+
metadata: @config.metadata,
|
388
|
+
retry_policy: @config.retry_policy
|
389
|
+
|
390
|
+
@app_connections_service_stub.call_rpc :get_app_connection, request, options: options do |response, operation|
|
391
|
+
yield response, operation if block_given?
|
392
|
+
return response
|
393
|
+
end
|
394
|
+
rescue ::GRPC::BadStatus => e
|
395
|
+
raise ::Google::Cloud::Error.from_error(e)
|
396
|
+
end
|
397
|
+
|
398
|
+
##
|
399
|
+
# Creates a new AppConnection in a given project and location.
|
400
|
+
#
|
401
|
+
# @overload create_app_connection(request, options = nil)
|
402
|
+
# Pass arguments to `create_app_connection` via a request object, either of type
|
403
|
+
# {::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest} or an equivalent Hash.
|
404
|
+
#
|
405
|
+
# @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest, ::Hash]
|
406
|
+
# A request object representing the call parameters. Required. To specify no
|
407
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
408
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
409
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
410
|
+
#
|
411
|
+
# @overload create_app_connection(parent: nil, app_connection_id: nil, app_connection: nil, request_id: nil, validate_only: nil)
|
412
|
+
# Pass arguments to `create_app_connection` via keyword arguments. Note that at
|
413
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
414
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
415
|
+
#
|
416
|
+
# @param parent [::String]
|
417
|
+
# Required. The resource project name of the AppConnection location using the
|
418
|
+
# form: `projects/{project_id}/locations/{location_id}`
|
419
|
+
# @param app_connection_id [::String]
|
420
|
+
# Optional. User-settable AppConnection resource ID.
|
421
|
+
# * Must start with a letter.
|
422
|
+
# * Must contain between 4-63 characters from `/[a-z][0-9]-/`.
|
423
|
+
# * Must end with a number or a letter.
|
424
|
+
# @param app_connection [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection, ::Hash]
|
425
|
+
# Required. A BeyondCorp AppConnection resource.
|
426
|
+
# @param request_id [::String]
|
427
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
428
|
+
# request ID so that if you must retry your request, the server will know to
|
429
|
+
# ignore the request if it has already been completed. The server will
|
430
|
+
# guarantee that for at least 60 minutes since the first request.
|
431
|
+
#
|
432
|
+
# For example, consider a situation where you make an initial request and t
|
433
|
+
# he request times out. If you make the request again with the same request
|
434
|
+
# ID, the server can check if original operation with the same request ID
|
435
|
+
# was received, and if so, will ignore the second request. This prevents
|
436
|
+
# clients from accidentally creating duplicate commitments.
|
437
|
+
#
|
438
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
439
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
440
|
+
# @param validate_only [::Boolean]
|
441
|
+
# Optional. If set, validates request by executing a dry-run which would not
|
442
|
+
# alter the resource in any way.
|
443
|
+
#
|
444
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
445
|
+
# @yieldparam response [::Gapic::Operation]
|
446
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
447
|
+
#
|
448
|
+
# @return [::Gapic::Operation]
|
449
|
+
#
|
450
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
451
|
+
#
|
452
|
+
# @example Basic example
|
453
|
+
# require "google/cloud/beyond_corp/app_connections/v1"
|
454
|
+
#
|
455
|
+
# # Create a client object. The client can be reused for multiple calls.
|
456
|
+
# client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new
|
457
|
+
#
|
458
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
459
|
+
# request = Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new
|
460
|
+
#
|
461
|
+
# # Call the create_app_connection method.
|
462
|
+
# result = client.create_app_connection request
|
463
|
+
#
|
464
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
465
|
+
# # object to check the status of an operation, cancel it, or wait
|
466
|
+
# # for results. Here is how to block until completion:
|
467
|
+
# result.wait_until_done! timeout: 60
|
468
|
+
# if result.response?
|
469
|
+
# p result.response
|
470
|
+
# else
|
471
|
+
# puts "Error!"
|
472
|
+
# end
|
473
|
+
#
|
474
|
+
def create_app_connection request, options = nil
|
475
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
476
|
+
|
477
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest
|
478
|
+
|
479
|
+
# Converts hash and nil to an options object
|
480
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
481
|
+
|
482
|
+
# Customize the options with defaults
|
483
|
+
metadata = @config.rpcs.create_app_connection.metadata.to_h
|
484
|
+
|
485
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
486
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
487
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
488
|
+
gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION
|
489
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
490
|
+
|
491
|
+
header_params = {}
|
492
|
+
if request.parent
|
493
|
+
header_params["parent"] = request.parent
|
494
|
+
end
|
495
|
+
|
496
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
497
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
498
|
+
|
499
|
+
options.apply_defaults timeout: @config.rpcs.create_app_connection.timeout,
|
500
|
+
metadata: metadata,
|
501
|
+
retry_policy: @config.rpcs.create_app_connection.retry_policy
|
502
|
+
|
503
|
+
options.apply_defaults timeout: @config.timeout,
|
504
|
+
metadata: @config.metadata,
|
505
|
+
retry_policy: @config.retry_policy
|
506
|
+
|
507
|
+
@app_connections_service_stub.call_rpc :create_app_connection, request, options: options do |response, operation|
|
508
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
509
|
+
yield response, operation if block_given?
|
510
|
+
return response
|
511
|
+
end
|
512
|
+
rescue ::GRPC::BadStatus => e
|
513
|
+
raise ::Google::Cloud::Error.from_error(e)
|
514
|
+
end
|
515
|
+
|
516
|
+
##
|
517
|
+
# Updates the parameters of a single AppConnection.
|
518
|
+
#
|
519
|
+
# @overload update_app_connection(request, options = nil)
|
520
|
+
# Pass arguments to `update_app_connection` via a request object, either of type
|
521
|
+
# {::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest} or an equivalent Hash.
|
522
|
+
#
|
523
|
+
# @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest, ::Hash]
|
524
|
+
# A request object representing the call parameters. Required. To specify no
|
525
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
526
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
527
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
528
|
+
#
|
529
|
+
# @overload update_app_connection(update_mask: nil, app_connection: nil, request_id: nil, validate_only: nil, allow_missing: nil)
|
530
|
+
# Pass arguments to `update_app_connection` via keyword arguments. Note that at
|
531
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
532
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
533
|
+
#
|
534
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
535
|
+
# Required. Mask of fields to update. At least one path must be supplied in
|
536
|
+
# this field. The elements of the repeated paths field may only include these
|
537
|
+
# fields from [BeyondCorp.AppConnection]:
|
538
|
+
# * `labels`
|
539
|
+
# * `display_name`
|
540
|
+
# * `application_endpoint`
|
541
|
+
# * `connectors`
|
542
|
+
# @param app_connection [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection, ::Hash]
|
543
|
+
# Required. AppConnection message with updated fields. Only supported fields
|
544
|
+
# specified in update_mask are updated.
|
545
|
+
# @param request_id [::String]
|
546
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
547
|
+
# request ID so that if you must retry your request, the server will know to
|
548
|
+
# ignore the request if it has already been completed. The server will
|
549
|
+
# guarantee that for at least 60 minutes since the first request.
|
550
|
+
#
|
551
|
+
# For example, consider a situation where you make an initial request and t
|
552
|
+
# he request times out. If you make the request again with the same request
|
553
|
+
# ID, the server can check if original operation with the same request ID
|
554
|
+
# was received, and if so, will ignore the second request. This prevents
|
555
|
+
# clients from accidentally creating duplicate commitments.
|
556
|
+
#
|
557
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
558
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
559
|
+
# @param validate_only [::Boolean]
|
560
|
+
# Optional. If set, validates request by executing a dry-run which would not
|
561
|
+
# alter the resource in any way.
|
562
|
+
# @param allow_missing [::Boolean]
|
563
|
+
# Optional. If set as true, will create the resource if it is not found.
|
564
|
+
#
|
565
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
566
|
+
# @yieldparam response [::Gapic::Operation]
|
567
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
568
|
+
#
|
569
|
+
# @return [::Gapic::Operation]
|
570
|
+
#
|
571
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
572
|
+
#
|
573
|
+
# @example Basic example
|
574
|
+
# require "google/cloud/beyond_corp/app_connections/v1"
|
575
|
+
#
|
576
|
+
# # Create a client object. The client can be reused for multiple calls.
|
577
|
+
# client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new
|
578
|
+
#
|
579
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
580
|
+
# request = Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new
|
581
|
+
#
|
582
|
+
# # Call the update_app_connection method.
|
583
|
+
# result = client.update_app_connection request
|
584
|
+
#
|
585
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
586
|
+
# # object to check the status of an operation, cancel it, or wait
|
587
|
+
# # for results. Here is how to block until completion:
|
588
|
+
# result.wait_until_done! timeout: 60
|
589
|
+
# if result.response?
|
590
|
+
# p result.response
|
591
|
+
# else
|
592
|
+
# puts "Error!"
|
593
|
+
# end
|
594
|
+
#
|
595
|
+
def update_app_connection request, options = nil
|
596
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
597
|
+
|
598
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest
|
599
|
+
|
600
|
+
# Converts hash and nil to an options object
|
601
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
602
|
+
|
603
|
+
# Customize the options with defaults
|
604
|
+
metadata = @config.rpcs.update_app_connection.metadata.to_h
|
605
|
+
|
606
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
607
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
608
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
609
|
+
gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION
|
610
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
611
|
+
|
612
|
+
header_params = {}
|
613
|
+
if request.app_connection&.name
|
614
|
+
header_params["app_connection.name"] = request.app_connection.name
|
615
|
+
end
|
616
|
+
|
617
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
618
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
619
|
+
|
620
|
+
options.apply_defaults timeout: @config.rpcs.update_app_connection.timeout,
|
621
|
+
metadata: metadata,
|
622
|
+
retry_policy: @config.rpcs.update_app_connection.retry_policy
|
623
|
+
|
624
|
+
options.apply_defaults timeout: @config.timeout,
|
625
|
+
metadata: @config.metadata,
|
626
|
+
retry_policy: @config.retry_policy
|
627
|
+
|
628
|
+
@app_connections_service_stub.call_rpc :update_app_connection, request, options: options do |response, operation|
|
629
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
630
|
+
yield response, operation if block_given?
|
631
|
+
return response
|
632
|
+
end
|
633
|
+
rescue ::GRPC::BadStatus => e
|
634
|
+
raise ::Google::Cloud::Error.from_error(e)
|
635
|
+
end
|
636
|
+
|
637
|
+
##
|
638
|
+
# Deletes a single AppConnection.
|
639
|
+
#
|
640
|
+
# @overload delete_app_connection(request, options = nil)
|
641
|
+
# Pass arguments to `delete_app_connection` via a request object, either of type
|
642
|
+
# {::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest} or an equivalent Hash.
|
643
|
+
#
|
644
|
+
# @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest, ::Hash]
|
645
|
+
# A request object representing the call parameters. Required. To specify no
|
646
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
647
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
648
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
649
|
+
#
|
650
|
+
# @overload delete_app_connection(name: nil, request_id: nil, validate_only: nil)
|
651
|
+
# Pass arguments to `delete_app_connection` via keyword arguments. Note that at
|
652
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
653
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
654
|
+
#
|
655
|
+
# @param name [::String]
|
656
|
+
# Required. BeyondCorp Connector name using the form:
|
657
|
+
# `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`
|
658
|
+
# @param request_id [::String]
|
659
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
660
|
+
# request ID so that if you must retry your request, the server will know to
|
661
|
+
# ignore the request if it has already been completed. The server will
|
662
|
+
# guarantee that for at least 60 minutes after the first request.
|
663
|
+
#
|
664
|
+
# For example, consider a situation where you make an initial request and t
|
665
|
+
# he request times out. If you make the request again with the same request
|
666
|
+
# ID, the server can check if original operation with the same request ID
|
667
|
+
# was received, and if so, will ignore the second request. This prevents
|
668
|
+
# clients from accidentally creating duplicate commitments.
|
669
|
+
#
|
670
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
671
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
672
|
+
# @param validate_only [::Boolean]
|
673
|
+
# Optional. If set, validates request by executing a dry-run which would not
|
674
|
+
# alter the resource in any way.
|
675
|
+
#
|
676
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
677
|
+
# @yieldparam response [::Gapic::Operation]
|
678
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
679
|
+
#
|
680
|
+
# @return [::Gapic::Operation]
|
681
|
+
#
|
682
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
683
|
+
#
|
684
|
+
# @example Basic example
|
685
|
+
# require "google/cloud/beyond_corp/app_connections/v1"
|
686
|
+
#
|
687
|
+
# # Create a client object. The client can be reused for multiple calls.
|
688
|
+
# client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new
|
689
|
+
#
|
690
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
691
|
+
# request = Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new
|
692
|
+
#
|
693
|
+
# # Call the delete_app_connection method.
|
694
|
+
# result = client.delete_app_connection request
|
695
|
+
#
|
696
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
697
|
+
# # object to check the status of an operation, cancel it, or wait
|
698
|
+
# # for results. Here is how to block until completion:
|
699
|
+
# result.wait_until_done! timeout: 60
|
700
|
+
# if result.response?
|
701
|
+
# p result.response
|
702
|
+
# else
|
703
|
+
# puts "Error!"
|
704
|
+
# end
|
705
|
+
#
|
706
|
+
def delete_app_connection request, options = nil
|
707
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
708
|
+
|
709
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest
|
710
|
+
|
711
|
+
# Converts hash and nil to an options object
|
712
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
713
|
+
|
714
|
+
# Customize the options with defaults
|
715
|
+
metadata = @config.rpcs.delete_app_connection.metadata.to_h
|
716
|
+
|
717
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
718
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
719
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
720
|
+
gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION
|
721
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
722
|
+
|
723
|
+
header_params = {}
|
724
|
+
if request.name
|
725
|
+
header_params["name"] = request.name
|
726
|
+
end
|
727
|
+
|
728
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
729
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
730
|
+
|
731
|
+
options.apply_defaults timeout: @config.rpcs.delete_app_connection.timeout,
|
732
|
+
metadata: metadata,
|
733
|
+
retry_policy: @config.rpcs.delete_app_connection.retry_policy
|
734
|
+
|
735
|
+
options.apply_defaults timeout: @config.timeout,
|
736
|
+
metadata: @config.metadata,
|
737
|
+
retry_policy: @config.retry_policy
|
738
|
+
|
739
|
+
@app_connections_service_stub.call_rpc :delete_app_connection, request, options: options do |response, operation|
|
740
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
741
|
+
yield response, operation if block_given?
|
742
|
+
return response
|
743
|
+
end
|
744
|
+
rescue ::GRPC::BadStatus => e
|
745
|
+
raise ::Google::Cloud::Error.from_error(e)
|
746
|
+
end
|
747
|
+
|
748
|
+
##
|
749
|
+
# Resolves AppConnections details for a given AppConnector.
|
750
|
+
# An internal method called by a connector to find AppConnections to connect
|
751
|
+
# to.
|
752
|
+
#
|
753
|
+
# @overload resolve_app_connections(request, options = nil)
|
754
|
+
# Pass arguments to `resolve_app_connections` via a request object, either of type
|
755
|
+
# {::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest} or an equivalent Hash.
|
756
|
+
#
|
757
|
+
# @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest, ::Hash]
|
758
|
+
# A request object representing the call parameters. Required. To specify no
|
759
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
760
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
761
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
762
|
+
#
|
763
|
+
# @overload resolve_app_connections(parent: nil, app_connector_id: nil, page_size: nil, page_token: nil)
|
764
|
+
# Pass arguments to `resolve_app_connections` via keyword arguments. Note that at
|
765
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
766
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
767
|
+
#
|
768
|
+
# @param parent [::String]
|
769
|
+
# Required. The resource name of the AppConnection location using the form:
|
770
|
+
# `projects/{project_id}/locations/{location_id}`
|
771
|
+
# @param app_connector_id [::String]
|
772
|
+
# Required. BeyondCorp Connector name of the connector associated with those
|
773
|
+
# AppConnections using the form:
|
774
|
+
# `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`
|
775
|
+
# @param page_size [::Integer]
|
776
|
+
# Optional. The maximum number of items to return.
|
777
|
+
# If not specified, a default value of 50 will be used by the service.
|
778
|
+
# Regardless of the page_size value, the response may include a partial list
|
779
|
+
# and a caller should only rely on response's
|
780
|
+
# [next_page_token][BeyondCorp.ResolveAppConnectionsResponse.next_page_token]
|
781
|
+
# to determine if there are more instances left to be queried.
|
782
|
+
# @param page_token [::String]
|
783
|
+
# Optional. The next_page_token value returned from a previous
|
784
|
+
# ResolveAppConnectionsResponse, if any.
|
785
|
+
#
|
786
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
787
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>]
|
788
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
789
|
+
#
|
790
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>]
|
791
|
+
#
|
792
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
793
|
+
#
|
794
|
+
# @example Basic example
|
795
|
+
# require "google/cloud/beyond_corp/app_connections/v1"
|
796
|
+
#
|
797
|
+
# # Create a client object. The client can be reused for multiple calls.
|
798
|
+
# client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new
|
799
|
+
#
|
800
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
801
|
+
# request = Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new
|
802
|
+
#
|
803
|
+
# # Call the resolve_app_connections method.
|
804
|
+
# result = client.resolve_app_connections request
|
805
|
+
#
|
806
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
807
|
+
# # iterate over all elements by calling #each, and the enumerable
|
808
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
809
|
+
# # methods are also available for managing paging directly.
|
810
|
+
# result.each do |response|
|
811
|
+
# # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails.
|
812
|
+
# p response
|
813
|
+
# end
|
814
|
+
#
|
815
|
+
def resolve_app_connections request, options = nil
|
816
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
817
|
+
|
818
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest
|
819
|
+
|
820
|
+
# Converts hash and nil to an options object
|
821
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
822
|
+
|
823
|
+
# Customize the options with defaults
|
824
|
+
metadata = @config.rpcs.resolve_app_connections.metadata.to_h
|
825
|
+
|
826
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
827
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
828
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
829
|
+
gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION
|
830
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
831
|
+
|
832
|
+
header_params = {}
|
833
|
+
if request.parent
|
834
|
+
header_params["parent"] = request.parent
|
835
|
+
end
|
836
|
+
|
837
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
838
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
839
|
+
|
840
|
+
options.apply_defaults timeout: @config.rpcs.resolve_app_connections.timeout,
|
841
|
+
metadata: metadata,
|
842
|
+
retry_policy: @config.rpcs.resolve_app_connections.retry_policy
|
843
|
+
|
844
|
+
options.apply_defaults timeout: @config.timeout,
|
845
|
+
metadata: @config.metadata,
|
846
|
+
retry_policy: @config.retry_policy
|
847
|
+
|
848
|
+
@app_connections_service_stub.call_rpc :resolve_app_connections, request, options: options do |response, operation|
|
849
|
+
response = ::Gapic::PagedEnumerable.new @app_connections_service_stub, :resolve_app_connections, request, response, operation, options
|
850
|
+
yield response, operation if block_given?
|
851
|
+
return response
|
852
|
+
end
|
853
|
+
rescue ::GRPC::BadStatus => e
|
854
|
+
raise ::Google::Cloud::Error.from_error(e)
|
855
|
+
end
|
856
|
+
|
857
|
+
##
|
858
|
+
# Configuration class for the AppConnectionsService API.
|
859
|
+
#
|
860
|
+
# This class represents the configuration for AppConnectionsService,
|
861
|
+
# providing control over timeouts, retry behavior, logging, transport
|
862
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
863
|
+
# applied individually to specific RPCs. See
|
864
|
+
# {::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client::Configuration::Rpcs}
|
865
|
+
# for a list of RPCs that can be configured independently.
|
866
|
+
#
|
867
|
+
# Configuration can be applied globally to all clients, or to a single client
|
868
|
+
# on construction.
|
869
|
+
#
|
870
|
+
# @example
|
871
|
+
#
|
872
|
+
# # Modify the global config, setting the timeout for
|
873
|
+
# # list_app_connections to 20 seconds,
|
874
|
+
# # and all remaining timeouts to 10 seconds.
|
875
|
+
# ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.configure do |config|
|
876
|
+
# config.timeout = 10.0
|
877
|
+
# config.rpcs.list_app_connections.timeout = 20.0
|
878
|
+
# end
|
879
|
+
#
|
880
|
+
# # Apply the above configuration only to a new client.
|
881
|
+
# client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config|
|
882
|
+
# config.timeout = 10.0
|
883
|
+
# config.rpcs.list_app_connections.timeout = 20.0
|
884
|
+
# end
|
885
|
+
#
|
886
|
+
# @!attribute [rw] endpoint
|
887
|
+
# The hostname or hostname:port of the service endpoint.
|
888
|
+
# Defaults to `"beyondcorp.googleapis.com"`.
|
889
|
+
# @return [::String]
|
890
|
+
# @!attribute [rw] credentials
|
891
|
+
# Credentials to send with calls. You may provide any of the following types:
|
892
|
+
# * (`String`) The path to a service account key file in JSON format
|
893
|
+
# * (`Hash`) A service account key as a Hash
|
894
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
895
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
896
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
897
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
898
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
899
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
900
|
+
# * (`nil`) indicating no credentials
|
901
|
+
# @return [::Object]
|
902
|
+
# @!attribute [rw] scope
|
903
|
+
# The OAuth scopes
|
904
|
+
# @return [::Array<::String>]
|
905
|
+
# @!attribute [rw] lib_name
|
906
|
+
# The library name as recorded in instrumentation and logging
|
907
|
+
# @return [::String]
|
908
|
+
# @!attribute [rw] lib_version
|
909
|
+
# The library version as recorded in instrumentation and logging
|
910
|
+
# @return [::String]
|
911
|
+
# @!attribute [rw] channel_args
|
912
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
913
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
914
|
+
# @return [::Hash]
|
915
|
+
# @!attribute [rw] interceptors
|
916
|
+
# An array of interceptors that are run before calls are executed.
|
917
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
918
|
+
# @!attribute [rw] timeout
|
919
|
+
# The call timeout in seconds.
|
920
|
+
# @return [::Numeric]
|
921
|
+
# @!attribute [rw] metadata
|
922
|
+
# Additional gRPC headers to be sent with the call.
|
923
|
+
# @return [::Hash{::Symbol=>::String}]
|
924
|
+
# @!attribute [rw] retry_policy
|
925
|
+
# The retry policy. The value is a hash with the following keys:
|
926
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
927
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
928
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
929
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
930
|
+
# trigger a retry.
|
931
|
+
# @return [::Hash]
|
932
|
+
# @!attribute [rw] quota_project
|
933
|
+
# A separate project against which to charge quota.
|
934
|
+
# @return [::String]
|
935
|
+
#
|
936
|
+
class Configuration
|
937
|
+
extend ::Gapic::Config
|
938
|
+
|
939
|
+
config_attr :endpoint, "beyondcorp.googleapis.com", ::String
|
940
|
+
config_attr :credentials, nil do |value|
|
941
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
942
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
943
|
+
allowed.any? { |klass| klass === value }
|
944
|
+
end
|
945
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
946
|
+
config_attr :lib_name, nil, ::String, nil
|
947
|
+
config_attr :lib_version, nil, ::String, nil
|
948
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
949
|
+
config_attr :interceptors, nil, ::Array, nil
|
950
|
+
config_attr :timeout, nil, ::Numeric, nil
|
951
|
+
config_attr :metadata, nil, ::Hash, nil
|
952
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
953
|
+
config_attr :quota_project, nil, ::String, nil
|
954
|
+
|
955
|
+
# @private
|
956
|
+
def initialize parent_config = nil
|
957
|
+
@parent_config = parent_config unless parent_config.nil?
|
958
|
+
|
959
|
+
yield self if block_given?
|
960
|
+
end
|
961
|
+
|
962
|
+
##
|
963
|
+
# Configurations for individual RPCs
|
964
|
+
# @return [Rpcs]
|
965
|
+
#
|
966
|
+
def rpcs
|
967
|
+
@rpcs ||= begin
|
968
|
+
parent_rpcs = nil
|
969
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
970
|
+
Rpcs.new parent_rpcs
|
971
|
+
end
|
972
|
+
end
|
973
|
+
|
974
|
+
##
|
975
|
+
# Configuration RPC class for the AppConnectionsService API.
|
976
|
+
#
|
977
|
+
# Includes fields providing the configuration for each RPC in this service.
|
978
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
979
|
+
# the following configuration fields:
|
980
|
+
#
|
981
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
982
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
983
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
984
|
+
# include the following keys:
|
985
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
986
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
987
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
988
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
989
|
+
# trigger a retry.
|
990
|
+
#
|
991
|
+
class Rpcs
|
992
|
+
##
|
993
|
+
# RPC-specific configuration for `list_app_connections`
|
994
|
+
# @return [::Gapic::Config::Method]
|
995
|
+
#
|
996
|
+
attr_reader :list_app_connections
|
997
|
+
##
|
998
|
+
# RPC-specific configuration for `get_app_connection`
|
999
|
+
# @return [::Gapic::Config::Method]
|
1000
|
+
#
|
1001
|
+
attr_reader :get_app_connection
|
1002
|
+
##
|
1003
|
+
# RPC-specific configuration for `create_app_connection`
|
1004
|
+
# @return [::Gapic::Config::Method]
|
1005
|
+
#
|
1006
|
+
attr_reader :create_app_connection
|
1007
|
+
##
|
1008
|
+
# RPC-specific configuration for `update_app_connection`
|
1009
|
+
# @return [::Gapic::Config::Method]
|
1010
|
+
#
|
1011
|
+
attr_reader :update_app_connection
|
1012
|
+
##
|
1013
|
+
# RPC-specific configuration for `delete_app_connection`
|
1014
|
+
# @return [::Gapic::Config::Method]
|
1015
|
+
#
|
1016
|
+
attr_reader :delete_app_connection
|
1017
|
+
##
|
1018
|
+
# RPC-specific configuration for `resolve_app_connections`
|
1019
|
+
# @return [::Gapic::Config::Method]
|
1020
|
+
#
|
1021
|
+
attr_reader :resolve_app_connections
|
1022
|
+
|
1023
|
+
# @private
|
1024
|
+
def initialize parent_rpcs = nil
|
1025
|
+
list_app_connections_config = parent_rpcs.list_app_connections if parent_rpcs.respond_to? :list_app_connections
|
1026
|
+
@list_app_connections = ::Gapic::Config::Method.new list_app_connections_config
|
1027
|
+
get_app_connection_config = parent_rpcs.get_app_connection if parent_rpcs.respond_to? :get_app_connection
|
1028
|
+
@get_app_connection = ::Gapic::Config::Method.new get_app_connection_config
|
1029
|
+
create_app_connection_config = parent_rpcs.create_app_connection if parent_rpcs.respond_to? :create_app_connection
|
1030
|
+
@create_app_connection = ::Gapic::Config::Method.new create_app_connection_config
|
1031
|
+
update_app_connection_config = parent_rpcs.update_app_connection if parent_rpcs.respond_to? :update_app_connection
|
1032
|
+
@update_app_connection = ::Gapic::Config::Method.new update_app_connection_config
|
1033
|
+
delete_app_connection_config = parent_rpcs.delete_app_connection if parent_rpcs.respond_to? :delete_app_connection
|
1034
|
+
@delete_app_connection = ::Gapic::Config::Method.new delete_app_connection_config
|
1035
|
+
resolve_app_connections_config = parent_rpcs.resolve_app_connections if parent_rpcs.respond_to? :resolve_app_connections
|
1036
|
+
@resolve_app_connections = ::Gapic::Config::Method.new resolve_app_connections_config
|
1037
|
+
|
1038
|
+
yield self if block_given?
|
1039
|
+
end
|
1040
|
+
end
|
1041
|
+
end
|
1042
|
+
end
|
1043
|
+
end
|
1044
|
+
end
|
1045
|
+
end
|
1046
|
+
end
|
1047
|
+
end
|
1048
|
+
end
|