google-cloud-gke_multi_cloud-v1 0.6.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +72 -99
- data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/client.rb +157 -12
- data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/operations.rb +28 -6
- data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/rest/client.rb +1354 -0
- data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/rest/operations.rb +895 -0
- data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/rest/service_stub.rb +595 -0
- data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/rest.rb +55 -0
- data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters.rb +6 -0
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb +492 -10
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/operations.rb +28 -6
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/rest/client.rb +2122 -0
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/rest/operations.rb +895 -0
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/rest/service_stub.rb +1010 -0
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/rest.rb +54 -0
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters.rb +6 -0
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb +356 -10
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/operations.rb +28 -6
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/rest/client.rb +2430 -0
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/rest/operations.rb +895 -0
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/rest/service_stub.rb +1187 -0
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/rest.rb +54 -0
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters.rb +6 -0
- data/lib/google/cloud/gke_multi_cloud/v1/rest.rb +39 -0
- data/lib/google/cloud/gke_multi_cloud/v1/version.rb +1 -1
- data/lib/google/cloud/gke_multi_cloud/v1.rb +5 -0
- data/lib/google/cloud/gkemulticloud/v1/attached_resources_pb.rb +4 -1
- data/lib/google/cloud/gkemulticloud/v1/attached_service_pb.rb +6 -2
- data/lib/google/cloud/gkemulticloud/v1/attached_service_services_pb.rb +2 -0
- data/lib/google/cloud/gkemulticloud/v1/aws_resources_pb.rb +10 -1
- data/lib/google/cloud/gkemulticloud/v1/aws_service_pb.rb +8 -1
- data/lib/google/cloud/gkemulticloud/v1/aws_service_services_pb.rb +18 -0
- data/lib/google/cloud/gkemulticloud/v1/azure_resources_pb.rb +7 -1
- data/lib/google/cloud/gkemulticloud/v1/azure_service_pb.rb +7 -1
- data/lib/google/cloud/gkemulticloud/v1/azure_service_services_pb.rb +11 -0
- data/lib/google/cloud/gkemulticloud/v1/common_resources_pb.rb +4 -1
- data/proto_docs/google/api/client.rb +14 -0
- data/proto_docs/google/cloud/gkemulticloud/v1/attached_resources.rb +48 -2
- data/proto_docs/google/cloud/gkemulticloud/v1/attached_service.rb +55 -2
- data/proto_docs/google/cloud/gkemulticloud/v1/aws_resources.rb +181 -6
- data/proto_docs/google/cloud/gkemulticloud/v1/aws_service.rb +117 -0
- data/proto_docs/google/cloud/gkemulticloud/v1/azure_resources.rb +103 -6
- data/proto_docs/google/cloud/gkemulticloud/v1/azure_service.rb +80 -4
- data/proto_docs/google/cloud/gkemulticloud/v1/common_resources.rb +56 -0
- data/proto_docs/google/type/date.rb +53 -0
- metadata +19 -5
@@ -0,0 +1,1354 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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/gkemulticloud/v1/attached_service_pb"
|
21
|
+
require "google/cloud/gke_multi_cloud/v1/attached_clusters/rest/service_stub"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module GkeMultiCloud
|
26
|
+
module V1
|
27
|
+
module AttachedClusters
|
28
|
+
module Rest
|
29
|
+
##
|
30
|
+
# REST client for the AttachedClusters service.
|
31
|
+
#
|
32
|
+
# The AttachedClusters API provides a single centrally managed service
|
33
|
+
# to register and manage Anthos attached clusters that run on customer's owned
|
34
|
+
# infrastructure.
|
35
|
+
#
|
36
|
+
class Client
|
37
|
+
# @private
|
38
|
+
DEFAULT_ENDPOINT_TEMPLATE = "gkemulticloud.$UNIVERSE_DOMAIN$"
|
39
|
+
|
40
|
+
include Paths
|
41
|
+
|
42
|
+
# @private
|
43
|
+
attr_reader :attached_clusters_stub
|
44
|
+
|
45
|
+
##
|
46
|
+
# Configure the AttachedClusters Client class.
|
47
|
+
#
|
48
|
+
# See {::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client::Configuration}
|
49
|
+
# for a description of the configuration fields.
|
50
|
+
#
|
51
|
+
# @example
|
52
|
+
#
|
53
|
+
# # Modify the configuration for all AttachedClusters clients
|
54
|
+
# ::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::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", "Cloud", "GkeMultiCloud", "V1"]
|
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.create_attached_cluster.timeout = 60.0
|
75
|
+
|
76
|
+
default_config.rpcs.update_attached_cluster.timeout = 60.0
|
77
|
+
|
78
|
+
default_config.rpcs.import_attached_cluster.timeout = 60.0
|
79
|
+
|
80
|
+
default_config.rpcs.get_attached_cluster.timeout = 60.0
|
81
|
+
default_config.rpcs.get_attached_cluster.retry_policy = {
|
82
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
83
|
+
}
|
84
|
+
|
85
|
+
default_config.rpcs.list_attached_clusters.timeout = 60.0
|
86
|
+
default_config.rpcs.list_attached_clusters.retry_policy = {
|
87
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
88
|
+
}
|
89
|
+
|
90
|
+
default_config.rpcs.delete_attached_cluster.timeout = 60.0
|
91
|
+
|
92
|
+
default_config.rpcs.get_attached_server_config.timeout = 60.0
|
93
|
+
default_config.rpcs.get_attached_server_config.retry_policy = {
|
94
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
95
|
+
}
|
96
|
+
|
97
|
+
default_config.rpcs.generate_attached_cluster_install_manifest.timeout = 60.0
|
98
|
+
default_config.rpcs.generate_attached_cluster_install_manifest.retry_policy = {
|
99
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
100
|
+
}
|
101
|
+
|
102
|
+
default_config.rpcs.generate_attached_cluster_agent_token.timeout = 60.0
|
103
|
+
default_config.rpcs.generate_attached_cluster_agent_token.retry_policy = {
|
104
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
105
|
+
}
|
106
|
+
|
107
|
+
default_config
|
108
|
+
end
|
109
|
+
yield @configure if block_given?
|
110
|
+
@configure
|
111
|
+
end
|
112
|
+
|
113
|
+
##
|
114
|
+
# Configure the AttachedClusters Client instance.
|
115
|
+
#
|
116
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
117
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
118
|
+
# should be made on {Client.configure}.
|
119
|
+
#
|
120
|
+
# See {::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client::Configuration}
|
121
|
+
# for a description of the configuration fields.
|
122
|
+
#
|
123
|
+
# @yield [config] Configure the Client client.
|
124
|
+
# @yieldparam config [Client::Configuration]
|
125
|
+
#
|
126
|
+
# @return [Client::Configuration]
|
127
|
+
#
|
128
|
+
def configure
|
129
|
+
yield @config if block_given?
|
130
|
+
@config
|
131
|
+
end
|
132
|
+
|
133
|
+
##
|
134
|
+
# The effective universe domain
|
135
|
+
#
|
136
|
+
# @return [String]
|
137
|
+
#
|
138
|
+
def universe_domain
|
139
|
+
@attached_clusters_stub.universe_domain
|
140
|
+
end
|
141
|
+
|
142
|
+
##
|
143
|
+
# Create a new AttachedClusters REST client object.
|
144
|
+
#
|
145
|
+
# @example
|
146
|
+
#
|
147
|
+
# # Create a client using the default configuration
|
148
|
+
# client = ::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client.new
|
149
|
+
#
|
150
|
+
# # Create a client using a custom configuration
|
151
|
+
# client = ::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client.new do |config|
|
152
|
+
# config.timeout = 10.0
|
153
|
+
# end
|
154
|
+
#
|
155
|
+
# @yield [config] Configure the AttachedClusters client.
|
156
|
+
# @yieldparam config [Client::Configuration]
|
157
|
+
#
|
158
|
+
def initialize
|
159
|
+
# Create the configuration object
|
160
|
+
@config = Configuration.new Client.configure
|
161
|
+
|
162
|
+
# Yield the configuration if needed
|
163
|
+
yield @config if block_given?
|
164
|
+
|
165
|
+
# Create credentials
|
166
|
+
credentials = @config.credentials
|
167
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
168
|
+
# but only if the default endpoint does not have a region prefix.
|
169
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
170
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
171
|
+
!@config.endpoint.split(".").first.include?("-"))
|
172
|
+
credentials ||= Credentials.default scope: @config.scope,
|
173
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
174
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
175
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
176
|
+
end
|
177
|
+
|
178
|
+
@quota_project_id = @config.quota_project
|
179
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
180
|
+
|
181
|
+
@operations_client = ::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Operations.new do |config|
|
182
|
+
config.credentials = credentials
|
183
|
+
config.quota_project = @quota_project_id
|
184
|
+
config.endpoint = @config.endpoint
|
185
|
+
config.universe_domain = @config.universe_domain
|
186
|
+
end
|
187
|
+
|
188
|
+
@attached_clusters_stub = ::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::ServiceStub.new(
|
189
|
+
endpoint: @config.endpoint,
|
190
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
191
|
+
universe_domain: @config.universe_domain,
|
192
|
+
credentials: credentials
|
193
|
+
)
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# Get the associated client for long-running operations.
|
198
|
+
#
|
199
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Operations]
|
200
|
+
#
|
201
|
+
attr_reader :operations_client
|
202
|
+
|
203
|
+
# Service calls
|
204
|
+
|
205
|
+
##
|
206
|
+
# Creates a new
|
207
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster} resource
|
208
|
+
# on a given Google Cloud Platform project and region.
|
209
|
+
#
|
210
|
+
# If successful, the response contains a newly created
|
211
|
+
# {::Google::Longrunning::Operation Operation} resource that can be
|
212
|
+
# described to track the status of the operation.
|
213
|
+
#
|
214
|
+
# @overload create_attached_cluster(request, options = nil)
|
215
|
+
# Pass arguments to `create_attached_cluster` via a request object, either of type
|
216
|
+
# {::Google::Cloud::GkeMultiCloud::V1::CreateAttachedClusterRequest} or an equivalent Hash.
|
217
|
+
#
|
218
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::CreateAttachedClusterRequest, ::Hash]
|
219
|
+
# A request object representing the call parameters. Required. To specify no
|
220
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
221
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
222
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
223
|
+
#
|
224
|
+
# @overload create_attached_cluster(parent: nil, attached_cluster: nil, attached_cluster_id: nil, validate_only: nil)
|
225
|
+
# Pass arguments to `create_attached_cluster` via keyword arguments. Note that at
|
226
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
227
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
228
|
+
#
|
229
|
+
# @param parent [::String]
|
230
|
+
# Required. The parent location where this
|
231
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster} resource
|
232
|
+
# will be created.
|
233
|
+
#
|
234
|
+
# Location names are formatted as `projects/<project-id>/locations/<region>`.
|
235
|
+
#
|
236
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
237
|
+
# for more details on Google Cloud resource names.
|
238
|
+
# @param attached_cluster [::Google::Cloud::GkeMultiCloud::V1::AttachedCluster, ::Hash]
|
239
|
+
# Required. The specification of the
|
240
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster} to create.
|
241
|
+
# @param attached_cluster_id [::String]
|
242
|
+
# Required. A client provided ID the resource. Must be unique within the
|
243
|
+
# parent resource.
|
244
|
+
#
|
245
|
+
# The provided ID will be part of the
|
246
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster} resource
|
247
|
+
# name formatted as
|
248
|
+
# `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
|
249
|
+
#
|
250
|
+
# Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
|
251
|
+
# @param validate_only [::Boolean]
|
252
|
+
# If set, only validate the request, but do not actually create the cluster.
|
253
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
254
|
+
# @yieldparam result [::Gapic::Operation]
|
255
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
256
|
+
#
|
257
|
+
# @return [::Gapic::Operation]
|
258
|
+
#
|
259
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
260
|
+
#
|
261
|
+
# @example Basic example
|
262
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
263
|
+
#
|
264
|
+
# # Create a client object. The client can be reused for multiple calls.
|
265
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client.new
|
266
|
+
#
|
267
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
268
|
+
# request = Google::Cloud::GkeMultiCloud::V1::CreateAttachedClusterRequest.new
|
269
|
+
#
|
270
|
+
# # Call the create_attached_cluster method.
|
271
|
+
# result = client.create_attached_cluster request
|
272
|
+
#
|
273
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
274
|
+
# # check the status of an operation, cancel it, or wait for results.
|
275
|
+
# # Here is how to wait for a response.
|
276
|
+
# result.wait_until_done! timeout: 60
|
277
|
+
# if result.response?
|
278
|
+
# p result.response
|
279
|
+
# else
|
280
|
+
# puts "No response received."
|
281
|
+
# end
|
282
|
+
#
|
283
|
+
def create_attached_cluster request, options = nil
|
284
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
285
|
+
|
286
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::CreateAttachedClusterRequest
|
287
|
+
|
288
|
+
# Converts hash and nil to an options object
|
289
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
290
|
+
|
291
|
+
# Customize the options with defaults
|
292
|
+
call_metadata = @config.rpcs.create_attached_cluster.metadata.to_h
|
293
|
+
|
294
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
295
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
296
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
297
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
298
|
+
transports_version_send: [:rest]
|
299
|
+
|
300
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
301
|
+
|
302
|
+
options.apply_defaults timeout: @config.rpcs.create_attached_cluster.timeout,
|
303
|
+
metadata: call_metadata,
|
304
|
+
retry_policy: @config.rpcs.create_attached_cluster.retry_policy
|
305
|
+
|
306
|
+
options.apply_defaults timeout: @config.timeout,
|
307
|
+
metadata: @config.metadata,
|
308
|
+
retry_policy: @config.retry_policy
|
309
|
+
|
310
|
+
@attached_clusters_stub.create_attached_cluster request, options do |result, operation|
|
311
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
312
|
+
yield result, operation if block_given?
|
313
|
+
return result
|
314
|
+
end
|
315
|
+
rescue ::Gapic::Rest::Error => e
|
316
|
+
raise ::Google::Cloud::Error.from_error(e)
|
317
|
+
end
|
318
|
+
|
319
|
+
##
|
320
|
+
# Updates an
|
321
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster}.
|
322
|
+
#
|
323
|
+
# @overload update_attached_cluster(request, options = nil)
|
324
|
+
# Pass arguments to `update_attached_cluster` via a request object, either of type
|
325
|
+
# {::Google::Cloud::GkeMultiCloud::V1::UpdateAttachedClusterRequest} or an equivalent Hash.
|
326
|
+
#
|
327
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::UpdateAttachedClusterRequest, ::Hash]
|
328
|
+
# A request object representing the call parameters. Required. To specify no
|
329
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
330
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
331
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
332
|
+
#
|
333
|
+
# @overload update_attached_cluster(attached_cluster: nil, validate_only: nil, update_mask: nil)
|
334
|
+
# Pass arguments to `update_attached_cluster` via keyword arguments. Note that at
|
335
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
336
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
337
|
+
#
|
338
|
+
# @param attached_cluster [::Google::Cloud::GkeMultiCloud::V1::AttachedCluster, ::Hash]
|
339
|
+
# Required. The
|
340
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster} resource
|
341
|
+
# to update.
|
342
|
+
# @param validate_only [::Boolean]
|
343
|
+
# If set, only validate the request, but do not actually update the cluster.
|
344
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
345
|
+
# Required. Mask of fields to update. At least one path must be supplied in
|
346
|
+
# this field. The elements of the repeated paths field can only include these
|
347
|
+
# fields from
|
348
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster}:
|
349
|
+
#
|
350
|
+
# * `annotations`.
|
351
|
+
# * `authorization.admin_groups`.
|
352
|
+
# * `authorization.admin_users`.
|
353
|
+
# * `binary_authorization.evaluation_mode`.
|
354
|
+
# * `description`.
|
355
|
+
# * `logging_config.component_config.enable_components`.
|
356
|
+
# * `monitoring_config.managed_prometheus_config.enabled`.
|
357
|
+
# * `platform_version`.
|
358
|
+
# * `proxy_config.kubernetes_secret.name`.
|
359
|
+
# * `proxy_config.kubernetes_secret.namespace`.
|
360
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
361
|
+
# @yieldparam result [::Gapic::Operation]
|
362
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
363
|
+
#
|
364
|
+
# @return [::Gapic::Operation]
|
365
|
+
#
|
366
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
367
|
+
#
|
368
|
+
# @example Basic example
|
369
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
370
|
+
#
|
371
|
+
# # Create a client object. The client can be reused for multiple calls.
|
372
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client.new
|
373
|
+
#
|
374
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
375
|
+
# request = Google::Cloud::GkeMultiCloud::V1::UpdateAttachedClusterRequest.new
|
376
|
+
#
|
377
|
+
# # Call the update_attached_cluster method.
|
378
|
+
# result = client.update_attached_cluster request
|
379
|
+
#
|
380
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
381
|
+
# # check the status of an operation, cancel it, or wait for results.
|
382
|
+
# # Here is how to wait for a response.
|
383
|
+
# result.wait_until_done! timeout: 60
|
384
|
+
# if result.response?
|
385
|
+
# p result.response
|
386
|
+
# else
|
387
|
+
# puts "No response received."
|
388
|
+
# end
|
389
|
+
#
|
390
|
+
def update_attached_cluster request, options = nil
|
391
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
392
|
+
|
393
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::UpdateAttachedClusterRequest
|
394
|
+
|
395
|
+
# Converts hash and nil to an options object
|
396
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
397
|
+
|
398
|
+
# Customize the options with defaults
|
399
|
+
call_metadata = @config.rpcs.update_attached_cluster.metadata.to_h
|
400
|
+
|
401
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
402
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
403
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
404
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
405
|
+
transports_version_send: [:rest]
|
406
|
+
|
407
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
408
|
+
|
409
|
+
options.apply_defaults timeout: @config.rpcs.update_attached_cluster.timeout,
|
410
|
+
metadata: call_metadata,
|
411
|
+
retry_policy: @config.rpcs.update_attached_cluster.retry_policy
|
412
|
+
|
413
|
+
options.apply_defaults timeout: @config.timeout,
|
414
|
+
metadata: @config.metadata,
|
415
|
+
retry_policy: @config.retry_policy
|
416
|
+
|
417
|
+
@attached_clusters_stub.update_attached_cluster request, options do |result, operation|
|
418
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
419
|
+
yield result, operation if block_given?
|
420
|
+
return result
|
421
|
+
end
|
422
|
+
rescue ::Gapic::Rest::Error => e
|
423
|
+
raise ::Google::Cloud::Error.from_error(e)
|
424
|
+
end
|
425
|
+
|
426
|
+
##
|
427
|
+
# Imports creates a new
|
428
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster} resource
|
429
|
+
# by importing an existing Fleet Membership resource.
|
430
|
+
#
|
431
|
+
# Attached Clusters created before the introduction of the Anthos Multi-Cloud
|
432
|
+
# API can be imported through this method.
|
433
|
+
#
|
434
|
+
# If successful, the response contains a newly created
|
435
|
+
# {::Google::Longrunning::Operation Operation} resource that can be
|
436
|
+
# described to track the status of the operation.
|
437
|
+
#
|
438
|
+
# @overload import_attached_cluster(request, options = nil)
|
439
|
+
# Pass arguments to `import_attached_cluster` via a request object, either of type
|
440
|
+
# {::Google::Cloud::GkeMultiCloud::V1::ImportAttachedClusterRequest} or an equivalent Hash.
|
441
|
+
#
|
442
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::ImportAttachedClusterRequest, ::Hash]
|
443
|
+
# A request object representing the call parameters. Required. To specify no
|
444
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
445
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
446
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
447
|
+
#
|
448
|
+
# @overload import_attached_cluster(parent: nil, validate_only: nil, fleet_membership: nil, platform_version: nil, distribution: nil, proxy_config: nil)
|
449
|
+
# Pass arguments to `import_attached_cluster` via keyword arguments. Note that at
|
450
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
451
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
452
|
+
#
|
453
|
+
# @param parent [::String]
|
454
|
+
# Required. The parent location where this
|
455
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster} resource
|
456
|
+
# will be created.
|
457
|
+
#
|
458
|
+
# Location names are formatted as `projects/<project-id>/locations/<region>`.
|
459
|
+
#
|
460
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
461
|
+
# for more details on Google Cloud resource names.
|
462
|
+
# @param validate_only [::Boolean]
|
463
|
+
# If set, only validate the request, but do not actually import the cluster.
|
464
|
+
# @param fleet_membership [::String]
|
465
|
+
# Required. The name of the fleet membership resource to import.
|
466
|
+
# @param platform_version [::String]
|
467
|
+
# Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`).
|
468
|
+
#
|
469
|
+
# You can list all supported versions on a given Google Cloud region by
|
470
|
+
# calling
|
471
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client#get_attached_server_config GetAttachedServerConfig}.
|
472
|
+
# @param distribution [::String]
|
473
|
+
# Required. The Kubernetes distribution of the underlying attached cluster.
|
474
|
+
#
|
475
|
+
# Supported values: ["eks", "aks"].
|
476
|
+
# @param proxy_config [::Google::Cloud::GkeMultiCloud::V1::AttachedProxyConfig, ::Hash]
|
477
|
+
# Optional. Proxy configuration for outbound HTTP(S) traffic.
|
478
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
479
|
+
# @yieldparam result [::Gapic::Operation]
|
480
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
481
|
+
#
|
482
|
+
# @return [::Gapic::Operation]
|
483
|
+
#
|
484
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
485
|
+
#
|
486
|
+
# @example Basic example
|
487
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
488
|
+
#
|
489
|
+
# # Create a client object. The client can be reused for multiple calls.
|
490
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client.new
|
491
|
+
#
|
492
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
493
|
+
# request = Google::Cloud::GkeMultiCloud::V1::ImportAttachedClusterRequest.new
|
494
|
+
#
|
495
|
+
# # Call the import_attached_cluster method.
|
496
|
+
# result = client.import_attached_cluster request
|
497
|
+
#
|
498
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
499
|
+
# # check the status of an operation, cancel it, or wait for results.
|
500
|
+
# # Here is how to wait for a response.
|
501
|
+
# result.wait_until_done! timeout: 60
|
502
|
+
# if result.response?
|
503
|
+
# p result.response
|
504
|
+
# else
|
505
|
+
# puts "No response received."
|
506
|
+
# end
|
507
|
+
#
|
508
|
+
def import_attached_cluster request, options = nil
|
509
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
510
|
+
|
511
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::ImportAttachedClusterRequest
|
512
|
+
|
513
|
+
# Converts hash and nil to an options object
|
514
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
515
|
+
|
516
|
+
# Customize the options with defaults
|
517
|
+
call_metadata = @config.rpcs.import_attached_cluster.metadata.to_h
|
518
|
+
|
519
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
520
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
521
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
522
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
523
|
+
transports_version_send: [:rest]
|
524
|
+
|
525
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
526
|
+
|
527
|
+
options.apply_defaults timeout: @config.rpcs.import_attached_cluster.timeout,
|
528
|
+
metadata: call_metadata,
|
529
|
+
retry_policy: @config.rpcs.import_attached_cluster.retry_policy
|
530
|
+
|
531
|
+
options.apply_defaults timeout: @config.timeout,
|
532
|
+
metadata: @config.metadata,
|
533
|
+
retry_policy: @config.retry_policy
|
534
|
+
|
535
|
+
@attached_clusters_stub.import_attached_cluster request, options do |result, operation|
|
536
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
537
|
+
yield result, operation if block_given?
|
538
|
+
return result
|
539
|
+
end
|
540
|
+
rescue ::Gapic::Rest::Error => e
|
541
|
+
raise ::Google::Cloud::Error.from_error(e)
|
542
|
+
end
|
543
|
+
|
544
|
+
##
|
545
|
+
# Describes a specific
|
546
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster} resource.
|
547
|
+
#
|
548
|
+
# @overload get_attached_cluster(request, options = nil)
|
549
|
+
# Pass arguments to `get_attached_cluster` via a request object, either of type
|
550
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GetAttachedClusterRequest} or an equivalent Hash.
|
551
|
+
#
|
552
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GetAttachedClusterRequest, ::Hash]
|
553
|
+
# A request object representing the call parameters. Required. To specify no
|
554
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
555
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
556
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
557
|
+
#
|
558
|
+
# @overload get_attached_cluster(name: nil)
|
559
|
+
# Pass arguments to `get_attached_cluster` via keyword arguments. Note that at
|
560
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
561
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
562
|
+
#
|
563
|
+
# @param name [::String]
|
564
|
+
# Required. The name of the
|
565
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster} resource
|
566
|
+
# to describe.
|
567
|
+
#
|
568
|
+
# `AttachedCluster` names are formatted as
|
569
|
+
# `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
|
570
|
+
#
|
571
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
572
|
+
# for more details on Google Cloud Platform resource names.
|
573
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
574
|
+
# @yieldparam result [::Google::Cloud::GkeMultiCloud::V1::AttachedCluster]
|
575
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
576
|
+
#
|
577
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::AttachedCluster]
|
578
|
+
#
|
579
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
580
|
+
#
|
581
|
+
# @example Basic example
|
582
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
583
|
+
#
|
584
|
+
# # Create a client object. The client can be reused for multiple calls.
|
585
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client.new
|
586
|
+
#
|
587
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
588
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GetAttachedClusterRequest.new
|
589
|
+
#
|
590
|
+
# # Call the get_attached_cluster method.
|
591
|
+
# result = client.get_attached_cluster request
|
592
|
+
#
|
593
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::AttachedCluster.
|
594
|
+
# p result
|
595
|
+
#
|
596
|
+
def get_attached_cluster request, options = nil
|
597
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
598
|
+
|
599
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAttachedClusterRequest
|
600
|
+
|
601
|
+
# Converts hash and nil to an options object
|
602
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
603
|
+
|
604
|
+
# Customize the options with defaults
|
605
|
+
call_metadata = @config.rpcs.get_attached_cluster.metadata.to_h
|
606
|
+
|
607
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
608
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
609
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
610
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
611
|
+
transports_version_send: [:rest]
|
612
|
+
|
613
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
614
|
+
|
615
|
+
options.apply_defaults timeout: @config.rpcs.get_attached_cluster.timeout,
|
616
|
+
metadata: call_metadata,
|
617
|
+
retry_policy: @config.rpcs.get_attached_cluster.retry_policy
|
618
|
+
|
619
|
+
options.apply_defaults timeout: @config.timeout,
|
620
|
+
metadata: @config.metadata,
|
621
|
+
retry_policy: @config.retry_policy
|
622
|
+
|
623
|
+
@attached_clusters_stub.get_attached_cluster request, options do |result, operation|
|
624
|
+
yield result, operation if block_given?
|
625
|
+
return result
|
626
|
+
end
|
627
|
+
rescue ::Gapic::Rest::Error => e
|
628
|
+
raise ::Google::Cloud::Error.from_error(e)
|
629
|
+
end
|
630
|
+
|
631
|
+
##
|
632
|
+
# Lists all {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster}
|
633
|
+
# resources on a given Google Cloud project and region.
|
634
|
+
#
|
635
|
+
# @overload list_attached_clusters(request, options = nil)
|
636
|
+
# Pass arguments to `list_attached_clusters` via a request object, either of type
|
637
|
+
# {::Google::Cloud::GkeMultiCloud::V1::ListAttachedClustersRequest} or an equivalent Hash.
|
638
|
+
#
|
639
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::ListAttachedClustersRequest, ::Hash]
|
640
|
+
# A request object representing the call parameters. Required. To specify no
|
641
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
642
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
643
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
644
|
+
#
|
645
|
+
# @overload list_attached_clusters(parent: nil, page_size: nil, page_token: nil)
|
646
|
+
# Pass arguments to `list_attached_clusters` via keyword arguments. Note that at
|
647
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
648
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
649
|
+
#
|
650
|
+
# @param parent [::String]
|
651
|
+
# Required. The parent location which owns this collection of
|
652
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster} resources.
|
653
|
+
#
|
654
|
+
# Location names are formatted as `projects/<project-id>/locations/<region>`.
|
655
|
+
#
|
656
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
657
|
+
# for more details on Google Cloud Platform resource names.
|
658
|
+
# @param page_size [::Integer]
|
659
|
+
# The maximum number of items to return.
|
660
|
+
#
|
661
|
+
# If not specified, a default value of 50 will be used by the service.
|
662
|
+
# Regardless of the pageSize value, the response can include a partial list
|
663
|
+
# and a caller should only rely on response's
|
664
|
+
# {::Google::Cloud::GkeMultiCloud::V1::ListAttachedClustersResponse#next_page_token nextPageToken}
|
665
|
+
# to determine if there are more instances left to be queried.
|
666
|
+
# @param page_token [::String]
|
667
|
+
# The `nextPageToken` value returned from a previous
|
668
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client#list_attached_clusters attachedClusters.list}
|
669
|
+
# request, if any.
|
670
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
671
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AttachedCluster>]
|
672
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
673
|
+
#
|
674
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AttachedCluster>]
|
675
|
+
#
|
676
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
677
|
+
#
|
678
|
+
# @example Basic example
|
679
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
680
|
+
#
|
681
|
+
# # Create a client object. The client can be reused for multiple calls.
|
682
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client.new
|
683
|
+
#
|
684
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
685
|
+
# request = Google::Cloud::GkeMultiCloud::V1::ListAttachedClustersRequest.new
|
686
|
+
#
|
687
|
+
# # Call the list_attached_clusters method.
|
688
|
+
# result = client.list_attached_clusters request
|
689
|
+
#
|
690
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
691
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
692
|
+
# result.each do |item|
|
693
|
+
# # Each element is of type ::Google::Cloud::GkeMultiCloud::V1::AttachedCluster.
|
694
|
+
# p item
|
695
|
+
# end
|
696
|
+
#
|
697
|
+
def list_attached_clusters request, options = nil
|
698
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
699
|
+
|
700
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::ListAttachedClustersRequest
|
701
|
+
|
702
|
+
# Converts hash and nil to an options object
|
703
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
704
|
+
|
705
|
+
# Customize the options with defaults
|
706
|
+
call_metadata = @config.rpcs.list_attached_clusters.metadata.to_h
|
707
|
+
|
708
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
709
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
710
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
711
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
712
|
+
transports_version_send: [:rest]
|
713
|
+
|
714
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
715
|
+
|
716
|
+
options.apply_defaults timeout: @config.rpcs.list_attached_clusters.timeout,
|
717
|
+
metadata: call_metadata,
|
718
|
+
retry_policy: @config.rpcs.list_attached_clusters.retry_policy
|
719
|
+
|
720
|
+
options.apply_defaults timeout: @config.timeout,
|
721
|
+
metadata: @config.metadata,
|
722
|
+
retry_policy: @config.retry_policy
|
723
|
+
|
724
|
+
@attached_clusters_stub.list_attached_clusters request, options do |result, operation|
|
725
|
+
result = ::Gapic::Rest::PagedEnumerable.new @attached_clusters_stub, :list_attached_clusters, "attached_clusters", request, result, options
|
726
|
+
yield result, operation if block_given?
|
727
|
+
return result
|
728
|
+
end
|
729
|
+
rescue ::Gapic::Rest::Error => e
|
730
|
+
raise ::Google::Cloud::Error.from_error(e)
|
731
|
+
end
|
732
|
+
|
733
|
+
##
|
734
|
+
# Deletes a specific
|
735
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster} resource.
|
736
|
+
#
|
737
|
+
# If successful, the response contains a newly created
|
738
|
+
# {::Google::Longrunning::Operation Operation} resource that can be
|
739
|
+
# described to track the status of the operation.
|
740
|
+
#
|
741
|
+
# @overload delete_attached_cluster(request, options = nil)
|
742
|
+
# Pass arguments to `delete_attached_cluster` via a request object, either of type
|
743
|
+
# {::Google::Cloud::GkeMultiCloud::V1::DeleteAttachedClusterRequest} or an equivalent Hash.
|
744
|
+
#
|
745
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::DeleteAttachedClusterRequest, ::Hash]
|
746
|
+
# A request object representing the call parameters. Required. To specify no
|
747
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
748
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
749
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
750
|
+
#
|
751
|
+
# @overload delete_attached_cluster(name: nil, validate_only: nil, allow_missing: nil, ignore_errors: nil, etag: nil)
|
752
|
+
# Pass arguments to `delete_attached_cluster` via keyword arguments. Note that at
|
753
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
754
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
755
|
+
#
|
756
|
+
# @param name [::String]
|
757
|
+
# Required. The resource name the
|
758
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster} to delete.
|
759
|
+
#
|
760
|
+
# `AttachedCluster` names are formatted as
|
761
|
+
# `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
|
762
|
+
#
|
763
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
764
|
+
# for more details on Google Cloud Platform resource names.
|
765
|
+
# @param validate_only [::Boolean]
|
766
|
+
# If set, only validate the request, but do not actually delete the resource.
|
767
|
+
# @param allow_missing [::Boolean]
|
768
|
+
# If set to true, and the
|
769
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster} resource
|
770
|
+
# is not found, the request will succeed but no action will be taken on the
|
771
|
+
# server and a completed {::Google::Longrunning::Operation Operation} will be
|
772
|
+
# returned.
|
773
|
+
#
|
774
|
+
# Useful for idempotent deletion.
|
775
|
+
# @param ignore_errors [::Boolean]
|
776
|
+
# If set to true, the deletion of
|
777
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster} resource
|
778
|
+
# will succeed even if errors occur during deleting in cluster resources.
|
779
|
+
# Using this parameter may result in orphaned resources in the cluster.
|
780
|
+
# @param etag [::String]
|
781
|
+
# The current etag of the
|
782
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster}.
|
783
|
+
#
|
784
|
+
# Allows clients to perform deletions through optimistic concurrency control.
|
785
|
+
#
|
786
|
+
# If the provided etag does not match the current etag of the cluster,
|
787
|
+
# the request will fail and an ABORTED error will be returned.
|
788
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
789
|
+
# @yieldparam result [::Gapic::Operation]
|
790
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
791
|
+
#
|
792
|
+
# @return [::Gapic::Operation]
|
793
|
+
#
|
794
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
795
|
+
#
|
796
|
+
# @example Basic example
|
797
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
798
|
+
#
|
799
|
+
# # Create a client object. The client can be reused for multiple calls.
|
800
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client.new
|
801
|
+
#
|
802
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
803
|
+
# request = Google::Cloud::GkeMultiCloud::V1::DeleteAttachedClusterRequest.new
|
804
|
+
#
|
805
|
+
# # Call the delete_attached_cluster method.
|
806
|
+
# result = client.delete_attached_cluster request
|
807
|
+
#
|
808
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
809
|
+
# # check the status of an operation, cancel it, or wait for results.
|
810
|
+
# # Here is how to wait for a response.
|
811
|
+
# result.wait_until_done! timeout: 60
|
812
|
+
# if result.response?
|
813
|
+
# p result.response
|
814
|
+
# else
|
815
|
+
# puts "No response received."
|
816
|
+
# end
|
817
|
+
#
|
818
|
+
def delete_attached_cluster request, options = nil
|
819
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
820
|
+
|
821
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::DeleteAttachedClusterRequest
|
822
|
+
|
823
|
+
# Converts hash and nil to an options object
|
824
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
825
|
+
|
826
|
+
# Customize the options with defaults
|
827
|
+
call_metadata = @config.rpcs.delete_attached_cluster.metadata.to_h
|
828
|
+
|
829
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
830
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
831
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
832
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
833
|
+
transports_version_send: [:rest]
|
834
|
+
|
835
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
836
|
+
|
837
|
+
options.apply_defaults timeout: @config.rpcs.delete_attached_cluster.timeout,
|
838
|
+
metadata: call_metadata,
|
839
|
+
retry_policy: @config.rpcs.delete_attached_cluster.retry_policy
|
840
|
+
|
841
|
+
options.apply_defaults timeout: @config.timeout,
|
842
|
+
metadata: @config.metadata,
|
843
|
+
retry_policy: @config.retry_policy
|
844
|
+
|
845
|
+
@attached_clusters_stub.delete_attached_cluster request, options do |result, operation|
|
846
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
847
|
+
yield result, operation if block_given?
|
848
|
+
return result
|
849
|
+
end
|
850
|
+
rescue ::Gapic::Rest::Error => e
|
851
|
+
raise ::Google::Cloud::Error.from_error(e)
|
852
|
+
end
|
853
|
+
|
854
|
+
##
|
855
|
+
# Returns information, such as supported Kubernetes versions, on a given
|
856
|
+
# Google Cloud location.
|
857
|
+
#
|
858
|
+
# @overload get_attached_server_config(request, options = nil)
|
859
|
+
# Pass arguments to `get_attached_server_config` via a request object, either of type
|
860
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GetAttachedServerConfigRequest} or an equivalent Hash.
|
861
|
+
#
|
862
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GetAttachedServerConfigRequest, ::Hash]
|
863
|
+
# A request object representing the call parameters. Required. To specify no
|
864
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
865
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
866
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
867
|
+
#
|
868
|
+
# @overload get_attached_server_config(name: nil)
|
869
|
+
# Pass arguments to `get_attached_server_config` via keyword arguments. Note that at
|
870
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
871
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
872
|
+
#
|
873
|
+
# @param name [::String]
|
874
|
+
# Required. The name of the
|
875
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedServerConfig AttachedServerConfig}
|
876
|
+
# resource to describe.
|
877
|
+
#
|
878
|
+
# `AttachedServerConfig` names are formatted as
|
879
|
+
# `projects/<project-id>/locations/<region>/attachedServerConfig`.
|
880
|
+
#
|
881
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
882
|
+
# for more details on Google Cloud resource names.
|
883
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
884
|
+
# @yieldparam result [::Google::Cloud::GkeMultiCloud::V1::AttachedServerConfig]
|
885
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
886
|
+
#
|
887
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::AttachedServerConfig]
|
888
|
+
#
|
889
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
890
|
+
#
|
891
|
+
# @example Basic example
|
892
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
893
|
+
#
|
894
|
+
# # Create a client object. The client can be reused for multiple calls.
|
895
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client.new
|
896
|
+
#
|
897
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
898
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GetAttachedServerConfigRequest.new
|
899
|
+
#
|
900
|
+
# # Call the get_attached_server_config method.
|
901
|
+
# result = client.get_attached_server_config request
|
902
|
+
#
|
903
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::AttachedServerConfig.
|
904
|
+
# p result
|
905
|
+
#
|
906
|
+
def get_attached_server_config request, options = nil
|
907
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
908
|
+
|
909
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAttachedServerConfigRequest
|
910
|
+
|
911
|
+
# Converts hash and nil to an options object
|
912
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
913
|
+
|
914
|
+
# Customize the options with defaults
|
915
|
+
call_metadata = @config.rpcs.get_attached_server_config.metadata.to_h
|
916
|
+
|
917
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
918
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
919
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
920
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
921
|
+
transports_version_send: [:rest]
|
922
|
+
|
923
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
924
|
+
|
925
|
+
options.apply_defaults timeout: @config.rpcs.get_attached_server_config.timeout,
|
926
|
+
metadata: call_metadata,
|
927
|
+
retry_policy: @config.rpcs.get_attached_server_config.retry_policy
|
928
|
+
|
929
|
+
options.apply_defaults timeout: @config.timeout,
|
930
|
+
metadata: @config.metadata,
|
931
|
+
retry_policy: @config.retry_policy
|
932
|
+
|
933
|
+
@attached_clusters_stub.get_attached_server_config request, options do |result, operation|
|
934
|
+
yield result, operation if block_given?
|
935
|
+
return result
|
936
|
+
end
|
937
|
+
rescue ::Gapic::Rest::Error => e
|
938
|
+
raise ::Google::Cloud::Error.from_error(e)
|
939
|
+
end
|
940
|
+
|
941
|
+
##
|
942
|
+
# Generates the install manifest to be installed on the target cluster.
|
943
|
+
#
|
944
|
+
# @overload generate_attached_cluster_install_manifest(request, options = nil)
|
945
|
+
# Pass arguments to `generate_attached_cluster_install_manifest` via a request object, either of type
|
946
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterInstallManifestRequest} or an equivalent Hash.
|
947
|
+
#
|
948
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterInstallManifestRequest, ::Hash]
|
949
|
+
# A request object representing the call parameters. Required. To specify no
|
950
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
951
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
952
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
953
|
+
#
|
954
|
+
# @overload generate_attached_cluster_install_manifest(parent: nil, attached_cluster_id: nil, platform_version: nil, proxy_config: nil)
|
955
|
+
# Pass arguments to `generate_attached_cluster_install_manifest` via keyword arguments. Note that at
|
956
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
957
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
958
|
+
#
|
959
|
+
# @param parent [::String]
|
960
|
+
# Required. The parent location where this
|
961
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster} resource
|
962
|
+
# will be created.
|
963
|
+
#
|
964
|
+
# Location names are formatted as `projects/<project-id>/locations/<region>`.
|
965
|
+
#
|
966
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
967
|
+
# for more details on Google Cloud resource names.
|
968
|
+
# @param attached_cluster_id [::String]
|
969
|
+
# Required. A client provided ID of the resource. Must be unique within the
|
970
|
+
# parent resource.
|
971
|
+
#
|
972
|
+
# The provided ID will be part of the
|
973
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedCluster AttachedCluster} resource
|
974
|
+
# name formatted as
|
975
|
+
# `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
|
976
|
+
#
|
977
|
+
# Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
|
978
|
+
#
|
979
|
+
# When generating an install manifest for importing an existing Membership
|
980
|
+
# resource, the attached_cluster_id field must be the Membership id.
|
981
|
+
#
|
982
|
+
# Membership names are formatted as
|
983
|
+
# `projects/<project-id>/locations/<region>/memberships/<membership-id>`.
|
984
|
+
# @param platform_version [::String]
|
985
|
+
# Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`).
|
986
|
+
#
|
987
|
+
# You can list all supported versions on a given Google Cloud region by
|
988
|
+
# calling
|
989
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client#get_attached_server_config GetAttachedServerConfig}.
|
990
|
+
# @param proxy_config [::Google::Cloud::GkeMultiCloud::V1::AttachedProxyConfig, ::Hash]
|
991
|
+
# Optional. Proxy configuration for outbound HTTP(S) traffic.
|
992
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
993
|
+
# @yieldparam result [::Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterInstallManifestResponse]
|
994
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
995
|
+
#
|
996
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterInstallManifestResponse]
|
997
|
+
#
|
998
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
999
|
+
#
|
1000
|
+
# @example Basic example
|
1001
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1002
|
+
#
|
1003
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1004
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client.new
|
1005
|
+
#
|
1006
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1007
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterInstallManifestRequest.new
|
1008
|
+
#
|
1009
|
+
# # Call the generate_attached_cluster_install_manifest method.
|
1010
|
+
# result = client.generate_attached_cluster_install_manifest request
|
1011
|
+
#
|
1012
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterInstallManifestResponse.
|
1013
|
+
# p result
|
1014
|
+
#
|
1015
|
+
def generate_attached_cluster_install_manifest request, options = nil
|
1016
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1017
|
+
|
1018
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterInstallManifestRequest
|
1019
|
+
|
1020
|
+
# Converts hash and nil to an options object
|
1021
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1022
|
+
|
1023
|
+
# Customize the options with defaults
|
1024
|
+
call_metadata = @config.rpcs.generate_attached_cluster_install_manifest.metadata.to_h
|
1025
|
+
|
1026
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1027
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1028
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1029
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
1030
|
+
transports_version_send: [:rest]
|
1031
|
+
|
1032
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1033
|
+
|
1034
|
+
options.apply_defaults timeout: @config.rpcs.generate_attached_cluster_install_manifest.timeout,
|
1035
|
+
metadata: call_metadata,
|
1036
|
+
retry_policy: @config.rpcs.generate_attached_cluster_install_manifest.retry_policy
|
1037
|
+
|
1038
|
+
options.apply_defaults timeout: @config.timeout,
|
1039
|
+
metadata: @config.metadata,
|
1040
|
+
retry_policy: @config.retry_policy
|
1041
|
+
|
1042
|
+
@attached_clusters_stub.generate_attached_cluster_install_manifest request, options do |result, operation|
|
1043
|
+
yield result, operation if block_given?
|
1044
|
+
return result
|
1045
|
+
end
|
1046
|
+
rescue ::Gapic::Rest::Error => e
|
1047
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1048
|
+
end
|
1049
|
+
|
1050
|
+
##
|
1051
|
+
# Generates an access token for a cluster agent.
|
1052
|
+
#
|
1053
|
+
# @overload generate_attached_cluster_agent_token(request, options = nil)
|
1054
|
+
# Pass arguments to `generate_attached_cluster_agent_token` via a request object, either of type
|
1055
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterAgentTokenRequest} or an equivalent Hash.
|
1056
|
+
#
|
1057
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterAgentTokenRequest, ::Hash]
|
1058
|
+
# A request object representing the call parameters. Required. To specify no
|
1059
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1060
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1061
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1062
|
+
#
|
1063
|
+
# @overload generate_attached_cluster_agent_token(attached_cluster: nil, subject_token: nil, subject_token_type: nil, version: nil, grant_type: nil, audience: nil, scope: nil, requested_token_type: nil, options: nil)
|
1064
|
+
# Pass arguments to `generate_attached_cluster_agent_token` via keyword arguments. Note that at
|
1065
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1066
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1067
|
+
#
|
1068
|
+
# @param attached_cluster [::String]
|
1069
|
+
# Required.
|
1070
|
+
# @param subject_token [::String]
|
1071
|
+
# Required.
|
1072
|
+
# @param subject_token_type [::String]
|
1073
|
+
# Required.
|
1074
|
+
# @param version [::String]
|
1075
|
+
# Required.
|
1076
|
+
# @param grant_type [::String]
|
1077
|
+
# Optional.
|
1078
|
+
# @param audience [::String]
|
1079
|
+
# Optional.
|
1080
|
+
# @param scope [::String]
|
1081
|
+
# Optional.
|
1082
|
+
# @param requested_token_type [::String]
|
1083
|
+
# Optional.
|
1084
|
+
# @param options [::String]
|
1085
|
+
# Optional.
|
1086
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1087
|
+
# @yieldparam result [::Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterAgentTokenResponse]
|
1088
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1089
|
+
#
|
1090
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterAgentTokenResponse]
|
1091
|
+
#
|
1092
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1093
|
+
#
|
1094
|
+
# @example Basic example
|
1095
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1096
|
+
#
|
1097
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1098
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client.new
|
1099
|
+
#
|
1100
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1101
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterAgentTokenRequest.new
|
1102
|
+
#
|
1103
|
+
# # Call the generate_attached_cluster_agent_token method.
|
1104
|
+
# result = client.generate_attached_cluster_agent_token request
|
1105
|
+
#
|
1106
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterAgentTokenResponse.
|
1107
|
+
# p result
|
1108
|
+
#
|
1109
|
+
def generate_attached_cluster_agent_token request, options = nil
|
1110
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1111
|
+
|
1112
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterAgentTokenRequest
|
1113
|
+
|
1114
|
+
# Converts hash and nil to an options object
|
1115
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1116
|
+
|
1117
|
+
# Customize the options with defaults
|
1118
|
+
call_metadata = @config.rpcs.generate_attached_cluster_agent_token.metadata.to_h
|
1119
|
+
|
1120
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1121
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1122
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1123
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
1124
|
+
transports_version_send: [:rest]
|
1125
|
+
|
1126
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1127
|
+
|
1128
|
+
options.apply_defaults timeout: @config.rpcs.generate_attached_cluster_agent_token.timeout,
|
1129
|
+
metadata: call_metadata,
|
1130
|
+
retry_policy: @config.rpcs.generate_attached_cluster_agent_token.retry_policy
|
1131
|
+
|
1132
|
+
options.apply_defaults timeout: @config.timeout,
|
1133
|
+
metadata: @config.metadata,
|
1134
|
+
retry_policy: @config.retry_policy
|
1135
|
+
|
1136
|
+
@attached_clusters_stub.generate_attached_cluster_agent_token request, options do |result, operation|
|
1137
|
+
yield result, operation if block_given?
|
1138
|
+
return result
|
1139
|
+
end
|
1140
|
+
rescue ::Gapic::Rest::Error => e
|
1141
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1142
|
+
end
|
1143
|
+
|
1144
|
+
##
|
1145
|
+
# Configuration class for the AttachedClusters REST API.
|
1146
|
+
#
|
1147
|
+
# This class represents the configuration for AttachedClusters REST,
|
1148
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1149
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1150
|
+
# applied individually to specific RPCs. See
|
1151
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client::Configuration::Rpcs}
|
1152
|
+
# for a list of RPCs that can be configured independently.
|
1153
|
+
#
|
1154
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1155
|
+
# on construction.
|
1156
|
+
#
|
1157
|
+
# @example
|
1158
|
+
#
|
1159
|
+
# # Modify the global config, setting the timeout for
|
1160
|
+
# # create_attached_cluster to 20 seconds,
|
1161
|
+
# # and all remaining timeouts to 10 seconds.
|
1162
|
+
# ::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client.configure do |config|
|
1163
|
+
# config.timeout = 10.0
|
1164
|
+
# config.rpcs.create_attached_cluster.timeout = 20.0
|
1165
|
+
# end
|
1166
|
+
#
|
1167
|
+
# # Apply the above configuration only to a new client.
|
1168
|
+
# client = ::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client.new do |config|
|
1169
|
+
# config.timeout = 10.0
|
1170
|
+
# config.rpcs.create_attached_cluster.timeout = 20.0
|
1171
|
+
# end
|
1172
|
+
#
|
1173
|
+
# @!attribute [rw] endpoint
|
1174
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
1175
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
1176
|
+
# @return [::String,nil]
|
1177
|
+
# @!attribute [rw] credentials
|
1178
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1179
|
+
# * (`String`) The path to a service account key file in JSON format
|
1180
|
+
# * (`Hash`) A service account key as a Hash
|
1181
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1182
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1183
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1184
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1185
|
+
# * (`nil`) indicating no credentials
|
1186
|
+
# @return [::Object]
|
1187
|
+
# @!attribute [rw] scope
|
1188
|
+
# The OAuth scopes
|
1189
|
+
# @return [::Array<::String>]
|
1190
|
+
# @!attribute [rw] lib_name
|
1191
|
+
# The library name as recorded in instrumentation and logging
|
1192
|
+
# @return [::String]
|
1193
|
+
# @!attribute [rw] lib_version
|
1194
|
+
# The library version as recorded in instrumentation and logging
|
1195
|
+
# @return [::String]
|
1196
|
+
# @!attribute [rw] timeout
|
1197
|
+
# The call timeout in seconds.
|
1198
|
+
# @return [::Numeric]
|
1199
|
+
# @!attribute [rw] metadata
|
1200
|
+
# Additional headers to be sent with the call.
|
1201
|
+
# @return [::Hash{::Symbol=>::String}]
|
1202
|
+
# @!attribute [rw] retry_policy
|
1203
|
+
# The retry policy. The value is a hash with the following keys:
|
1204
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1205
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1206
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1207
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1208
|
+
# trigger a retry.
|
1209
|
+
# @return [::Hash]
|
1210
|
+
# @!attribute [rw] quota_project
|
1211
|
+
# A separate project against which to charge quota.
|
1212
|
+
# @return [::String]
|
1213
|
+
# @!attribute [rw] universe_domain
|
1214
|
+
# The universe domain within which to make requests. This determines the
|
1215
|
+
# default endpoint URL. The default value of nil uses the environment
|
1216
|
+
# universe (usually the default "googleapis.com" universe).
|
1217
|
+
# @return [::String,nil]
|
1218
|
+
#
|
1219
|
+
class Configuration
|
1220
|
+
extend ::Gapic::Config
|
1221
|
+
|
1222
|
+
# @private
|
1223
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
1224
|
+
DEFAULT_ENDPOINT = "gkemulticloud.googleapis.com"
|
1225
|
+
|
1226
|
+
config_attr :endpoint, nil, ::String, nil
|
1227
|
+
config_attr :credentials, nil do |value|
|
1228
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1229
|
+
allowed.any? { |klass| klass === value }
|
1230
|
+
end
|
1231
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1232
|
+
config_attr :lib_name, nil, ::String, nil
|
1233
|
+
config_attr :lib_version, nil, ::String, nil
|
1234
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1235
|
+
config_attr :metadata, nil, ::Hash, nil
|
1236
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1237
|
+
config_attr :quota_project, nil, ::String, nil
|
1238
|
+
config_attr :universe_domain, nil, ::String, nil
|
1239
|
+
|
1240
|
+
# @private
|
1241
|
+
def initialize parent_config = nil
|
1242
|
+
@parent_config = parent_config unless parent_config.nil?
|
1243
|
+
|
1244
|
+
yield self if block_given?
|
1245
|
+
end
|
1246
|
+
|
1247
|
+
##
|
1248
|
+
# Configurations for individual RPCs
|
1249
|
+
# @return [Rpcs]
|
1250
|
+
#
|
1251
|
+
def rpcs
|
1252
|
+
@rpcs ||= begin
|
1253
|
+
parent_rpcs = nil
|
1254
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1255
|
+
Rpcs.new parent_rpcs
|
1256
|
+
end
|
1257
|
+
end
|
1258
|
+
|
1259
|
+
##
|
1260
|
+
# Configuration RPC class for the AttachedClusters API.
|
1261
|
+
#
|
1262
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1263
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1264
|
+
# the following configuration fields:
|
1265
|
+
#
|
1266
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1267
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
1268
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1269
|
+
# include the following keys:
|
1270
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1271
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1272
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1273
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1274
|
+
# trigger a retry.
|
1275
|
+
#
|
1276
|
+
class Rpcs
|
1277
|
+
##
|
1278
|
+
# RPC-specific configuration for `create_attached_cluster`
|
1279
|
+
# @return [::Gapic::Config::Method]
|
1280
|
+
#
|
1281
|
+
attr_reader :create_attached_cluster
|
1282
|
+
##
|
1283
|
+
# RPC-specific configuration for `update_attached_cluster`
|
1284
|
+
# @return [::Gapic::Config::Method]
|
1285
|
+
#
|
1286
|
+
attr_reader :update_attached_cluster
|
1287
|
+
##
|
1288
|
+
# RPC-specific configuration for `import_attached_cluster`
|
1289
|
+
# @return [::Gapic::Config::Method]
|
1290
|
+
#
|
1291
|
+
attr_reader :import_attached_cluster
|
1292
|
+
##
|
1293
|
+
# RPC-specific configuration for `get_attached_cluster`
|
1294
|
+
# @return [::Gapic::Config::Method]
|
1295
|
+
#
|
1296
|
+
attr_reader :get_attached_cluster
|
1297
|
+
##
|
1298
|
+
# RPC-specific configuration for `list_attached_clusters`
|
1299
|
+
# @return [::Gapic::Config::Method]
|
1300
|
+
#
|
1301
|
+
attr_reader :list_attached_clusters
|
1302
|
+
##
|
1303
|
+
# RPC-specific configuration for `delete_attached_cluster`
|
1304
|
+
# @return [::Gapic::Config::Method]
|
1305
|
+
#
|
1306
|
+
attr_reader :delete_attached_cluster
|
1307
|
+
##
|
1308
|
+
# RPC-specific configuration for `get_attached_server_config`
|
1309
|
+
# @return [::Gapic::Config::Method]
|
1310
|
+
#
|
1311
|
+
attr_reader :get_attached_server_config
|
1312
|
+
##
|
1313
|
+
# RPC-specific configuration for `generate_attached_cluster_install_manifest`
|
1314
|
+
# @return [::Gapic::Config::Method]
|
1315
|
+
#
|
1316
|
+
attr_reader :generate_attached_cluster_install_manifest
|
1317
|
+
##
|
1318
|
+
# RPC-specific configuration for `generate_attached_cluster_agent_token`
|
1319
|
+
# @return [::Gapic::Config::Method]
|
1320
|
+
#
|
1321
|
+
attr_reader :generate_attached_cluster_agent_token
|
1322
|
+
|
1323
|
+
# @private
|
1324
|
+
def initialize parent_rpcs = nil
|
1325
|
+
create_attached_cluster_config = parent_rpcs.create_attached_cluster if parent_rpcs.respond_to? :create_attached_cluster
|
1326
|
+
@create_attached_cluster = ::Gapic::Config::Method.new create_attached_cluster_config
|
1327
|
+
update_attached_cluster_config = parent_rpcs.update_attached_cluster if parent_rpcs.respond_to? :update_attached_cluster
|
1328
|
+
@update_attached_cluster = ::Gapic::Config::Method.new update_attached_cluster_config
|
1329
|
+
import_attached_cluster_config = parent_rpcs.import_attached_cluster if parent_rpcs.respond_to? :import_attached_cluster
|
1330
|
+
@import_attached_cluster = ::Gapic::Config::Method.new import_attached_cluster_config
|
1331
|
+
get_attached_cluster_config = parent_rpcs.get_attached_cluster if parent_rpcs.respond_to? :get_attached_cluster
|
1332
|
+
@get_attached_cluster = ::Gapic::Config::Method.new get_attached_cluster_config
|
1333
|
+
list_attached_clusters_config = parent_rpcs.list_attached_clusters if parent_rpcs.respond_to? :list_attached_clusters
|
1334
|
+
@list_attached_clusters = ::Gapic::Config::Method.new list_attached_clusters_config
|
1335
|
+
delete_attached_cluster_config = parent_rpcs.delete_attached_cluster if parent_rpcs.respond_to? :delete_attached_cluster
|
1336
|
+
@delete_attached_cluster = ::Gapic::Config::Method.new delete_attached_cluster_config
|
1337
|
+
get_attached_server_config_config = parent_rpcs.get_attached_server_config if parent_rpcs.respond_to? :get_attached_server_config
|
1338
|
+
@get_attached_server_config = ::Gapic::Config::Method.new get_attached_server_config_config
|
1339
|
+
generate_attached_cluster_install_manifest_config = parent_rpcs.generate_attached_cluster_install_manifest if parent_rpcs.respond_to? :generate_attached_cluster_install_manifest
|
1340
|
+
@generate_attached_cluster_install_manifest = ::Gapic::Config::Method.new generate_attached_cluster_install_manifest_config
|
1341
|
+
generate_attached_cluster_agent_token_config = parent_rpcs.generate_attached_cluster_agent_token if parent_rpcs.respond_to? :generate_attached_cluster_agent_token
|
1342
|
+
@generate_attached_cluster_agent_token = ::Gapic::Config::Method.new generate_attached_cluster_agent_token_config
|
1343
|
+
|
1344
|
+
yield self if block_given?
|
1345
|
+
end
|
1346
|
+
end
|
1347
|
+
end
|
1348
|
+
end
|
1349
|
+
end
|
1350
|
+
end
|
1351
|
+
end
|
1352
|
+
end
|
1353
|
+
end
|
1354
|
+
end
|