google-cloud-gke_multi_cloud-v1 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/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,2122 @@
|
|
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/aws_service_pb"
|
21
|
+
require "google/cloud/gke_multi_cloud/v1/aws_clusters/rest/service_stub"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module GkeMultiCloud
|
26
|
+
module V1
|
27
|
+
module AwsClusters
|
28
|
+
module Rest
|
29
|
+
##
|
30
|
+
# REST client for the AwsClusters service.
|
31
|
+
#
|
32
|
+
# The AwsClusters API provides a single centrally managed service
|
33
|
+
# to create and manage Anthos clusters that run on AWS infrastructure.
|
34
|
+
#
|
35
|
+
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "gkemulticloud.$UNIVERSE_DOMAIN$"
|
38
|
+
|
39
|
+
include Paths
|
40
|
+
|
41
|
+
# @private
|
42
|
+
attr_reader :aws_clusters_stub
|
43
|
+
|
44
|
+
##
|
45
|
+
# Configure the AwsClusters Client class.
|
46
|
+
#
|
47
|
+
# See {::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client::Configuration}
|
48
|
+
# for a description of the configuration fields.
|
49
|
+
#
|
50
|
+
# @example
|
51
|
+
#
|
52
|
+
# # Modify the configuration for all AwsClusters clients
|
53
|
+
# ::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.configure do |config|
|
54
|
+
# config.timeout = 10.0
|
55
|
+
# end
|
56
|
+
#
|
57
|
+
# @yield [config] Configure the Client client.
|
58
|
+
# @yieldparam config [Client::Configuration]
|
59
|
+
#
|
60
|
+
# @return [Client::Configuration]
|
61
|
+
#
|
62
|
+
def self.configure
|
63
|
+
@configure ||= begin
|
64
|
+
namespace = ["Google", "Cloud", "GkeMultiCloud", "V1"]
|
65
|
+
parent_config = while namespace.any?
|
66
|
+
parent_name = namespace.join "::"
|
67
|
+
parent_const = const_get parent_name
|
68
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
69
|
+
namespace.pop
|
70
|
+
end
|
71
|
+
default_config = Client::Configuration.new parent_config
|
72
|
+
|
73
|
+
default_config.rpcs.create_aws_cluster.timeout = 60.0
|
74
|
+
|
75
|
+
default_config.rpcs.update_aws_cluster.timeout = 60.0
|
76
|
+
|
77
|
+
default_config.rpcs.get_aws_cluster.timeout = 60.0
|
78
|
+
default_config.rpcs.get_aws_cluster.retry_policy = {
|
79
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
80
|
+
}
|
81
|
+
|
82
|
+
default_config.rpcs.list_aws_clusters.timeout = 60.0
|
83
|
+
default_config.rpcs.list_aws_clusters.retry_policy = {
|
84
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
85
|
+
}
|
86
|
+
|
87
|
+
default_config.rpcs.delete_aws_cluster.timeout = 60.0
|
88
|
+
|
89
|
+
default_config.rpcs.generate_aws_cluster_agent_token.timeout = 60.0
|
90
|
+
default_config.rpcs.generate_aws_cluster_agent_token.retry_policy = {
|
91
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
92
|
+
}
|
93
|
+
|
94
|
+
default_config.rpcs.generate_aws_access_token.timeout = 60.0
|
95
|
+
default_config.rpcs.generate_aws_access_token.retry_policy = {
|
96
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
97
|
+
}
|
98
|
+
|
99
|
+
default_config.rpcs.create_aws_node_pool.timeout = 60.0
|
100
|
+
|
101
|
+
default_config.rpcs.update_aws_node_pool.timeout = 60.0
|
102
|
+
|
103
|
+
default_config.rpcs.rollback_aws_node_pool_update.timeout = 60.0
|
104
|
+
|
105
|
+
default_config.rpcs.get_aws_node_pool.timeout = 60.0
|
106
|
+
default_config.rpcs.get_aws_node_pool.retry_policy = {
|
107
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
108
|
+
}
|
109
|
+
|
110
|
+
default_config.rpcs.list_aws_node_pools.timeout = 60.0
|
111
|
+
default_config.rpcs.list_aws_node_pools.retry_policy = {
|
112
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
113
|
+
}
|
114
|
+
|
115
|
+
default_config.rpcs.delete_aws_node_pool.timeout = 60.0
|
116
|
+
|
117
|
+
default_config.rpcs.get_aws_open_id_config.timeout = 60.0
|
118
|
+
default_config.rpcs.get_aws_open_id_config.retry_policy = {
|
119
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
120
|
+
}
|
121
|
+
|
122
|
+
default_config.rpcs.get_aws_json_web_keys.timeout = 60.0
|
123
|
+
default_config.rpcs.get_aws_json_web_keys.retry_policy = {
|
124
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
125
|
+
}
|
126
|
+
|
127
|
+
default_config.rpcs.get_aws_server_config.timeout = 60.0
|
128
|
+
default_config.rpcs.get_aws_server_config.retry_policy = {
|
129
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
130
|
+
}
|
131
|
+
|
132
|
+
default_config
|
133
|
+
end
|
134
|
+
yield @configure if block_given?
|
135
|
+
@configure
|
136
|
+
end
|
137
|
+
|
138
|
+
##
|
139
|
+
# Configure the AwsClusters Client instance.
|
140
|
+
#
|
141
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
142
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
143
|
+
# should be made on {Client.configure}.
|
144
|
+
#
|
145
|
+
# See {::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client::Configuration}
|
146
|
+
# for a description of the configuration fields.
|
147
|
+
#
|
148
|
+
# @yield [config] Configure the Client client.
|
149
|
+
# @yieldparam config [Client::Configuration]
|
150
|
+
#
|
151
|
+
# @return [Client::Configuration]
|
152
|
+
#
|
153
|
+
def configure
|
154
|
+
yield @config if block_given?
|
155
|
+
@config
|
156
|
+
end
|
157
|
+
|
158
|
+
##
|
159
|
+
# The effective universe domain
|
160
|
+
#
|
161
|
+
# @return [String]
|
162
|
+
#
|
163
|
+
def universe_domain
|
164
|
+
@aws_clusters_stub.universe_domain
|
165
|
+
end
|
166
|
+
|
167
|
+
##
|
168
|
+
# Create a new AwsClusters REST client object.
|
169
|
+
#
|
170
|
+
# @example
|
171
|
+
#
|
172
|
+
# # Create a client using the default configuration
|
173
|
+
# client = ::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
174
|
+
#
|
175
|
+
# # Create a client using a custom configuration
|
176
|
+
# client = ::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new do |config|
|
177
|
+
# config.timeout = 10.0
|
178
|
+
# end
|
179
|
+
#
|
180
|
+
# @yield [config] Configure the AwsClusters client.
|
181
|
+
# @yieldparam config [Client::Configuration]
|
182
|
+
#
|
183
|
+
def initialize
|
184
|
+
# Create the configuration object
|
185
|
+
@config = Configuration.new Client.configure
|
186
|
+
|
187
|
+
# Yield the configuration if needed
|
188
|
+
yield @config if block_given?
|
189
|
+
|
190
|
+
# Create credentials
|
191
|
+
credentials = @config.credentials
|
192
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
193
|
+
# but only if the default endpoint does not have a region prefix.
|
194
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
195
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
196
|
+
!@config.endpoint.split(".").first.include?("-"))
|
197
|
+
credentials ||= Credentials.default scope: @config.scope,
|
198
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
199
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
200
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
201
|
+
end
|
202
|
+
|
203
|
+
@quota_project_id = @config.quota_project
|
204
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
205
|
+
|
206
|
+
@operations_client = ::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Operations.new do |config|
|
207
|
+
config.credentials = credentials
|
208
|
+
config.quota_project = @quota_project_id
|
209
|
+
config.endpoint = @config.endpoint
|
210
|
+
config.universe_domain = @config.universe_domain
|
211
|
+
end
|
212
|
+
|
213
|
+
@aws_clusters_stub = ::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::ServiceStub.new(
|
214
|
+
endpoint: @config.endpoint,
|
215
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
216
|
+
universe_domain: @config.universe_domain,
|
217
|
+
credentials: credentials
|
218
|
+
)
|
219
|
+
end
|
220
|
+
|
221
|
+
##
|
222
|
+
# Get the associated client for long-running operations.
|
223
|
+
#
|
224
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Operations]
|
225
|
+
#
|
226
|
+
attr_reader :operations_client
|
227
|
+
|
228
|
+
# Service calls
|
229
|
+
|
230
|
+
##
|
231
|
+
# Creates a new {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster}
|
232
|
+
# resource on a given Google Cloud Platform project and region.
|
233
|
+
#
|
234
|
+
# If successful, the response contains a newly created
|
235
|
+
# {::Google::Longrunning::Operation Operation} resource that can be
|
236
|
+
# described to track the status of the operation.
|
237
|
+
#
|
238
|
+
# @overload create_aws_cluster(request, options = nil)
|
239
|
+
# Pass arguments to `create_aws_cluster` via a request object, either of type
|
240
|
+
# {::Google::Cloud::GkeMultiCloud::V1::CreateAwsClusterRequest} or an equivalent Hash.
|
241
|
+
#
|
242
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::CreateAwsClusterRequest, ::Hash]
|
243
|
+
# A request object representing the call parameters. Required. To specify no
|
244
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
245
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
246
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
247
|
+
#
|
248
|
+
# @overload create_aws_cluster(parent: nil, aws_cluster: nil, aws_cluster_id: nil, validate_only: nil)
|
249
|
+
# Pass arguments to `create_aws_cluster` via keyword arguments. Note that at
|
250
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
251
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
252
|
+
#
|
253
|
+
# @param parent [::String]
|
254
|
+
# Required. The parent location where this
|
255
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster} resource will be
|
256
|
+
# created.
|
257
|
+
#
|
258
|
+
# Location names are formatted as `projects/<project-id>/locations/<region>`.
|
259
|
+
#
|
260
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
261
|
+
# for more details on Google Cloud resource names.
|
262
|
+
# @param aws_cluster [::Google::Cloud::GkeMultiCloud::V1::AwsCluster, ::Hash]
|
263
|
+
# Required. The specification of the
|
264
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster} to create.
|
265
|
+
# @param aws_cluster_id [::String]
|
266
|
+
# Required. A client provided ID the resource. Must be unique within the
|
267
|
+
# parent resource.
|
268
|
+
#
|
269
|
+
# The provided ID will be part of the
|
270
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster} resource name
|
271
|
+
# formatted as
|
272
|
+
# `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
|
273
|
+
#
|
274
|
+
# Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
|
275
|
+
# @param validate_only [::Boolean]
|
276
|
+
# If set, only validate the request, but do not actually create the cluster.
|
277
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
278
|
+
# @yieldparam result [::Gapic::Operation]
|
279
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
280
|
+
#
|
281
|
+
# @return [::Gapic::Operation]
|
282
|
+
#
|
283
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
284
|
+
#
|
285
|
+
# @example Basic example
|
286
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
287
|
+
#
|
288
|
+
# # Create a client object. The client can be reused for multiple calls.
|
289
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
290
|
+
#
|
291
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
292
|
+
# request = Google::Cloud::GkeMultiCloud::V1::CreateAwsClusterRequest.new
|
293
|
+
#
|
294
|
+
# # Call the create_aws_cluster method.
|
295
|
+
# result = client.create_aws_cluster request
|
296
|
+
#
|
297
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
298
|
+
# # check the status of an operation, cancel it, or wait for results.
|
299
|
+
# # Here is how to wait for a response.
|
300
|
+
# result.wait_until_done! timeout: 60
|
301
|
+
# if result.response?
|
302
|
+
# p result.response
|
303
|
+
# else
|
304
|
+
# puts "No response received."
|
305
|
+
# end
|
306
|
+
#
|
307
|
+
def create_aws_cluster request, options = nil
|
308
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
309
|
+
|
310
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::CreateAwsClusterRequest
|
311
|
+
|
312
|
+
# Converts hash and nil to an options object
|
313
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
314
|
+
|
315
|
+
# Customize the options with defaults
|
316
|
+
call_metadata = @config.rpcs.create_aws_cluster.metadata.to_h
|
317
|
+
|
318
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
319
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
320
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
321
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
322
|
+
transports_version_send: [:rest]
|
323
|
+
|
324
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
325
|
+
|
326
|
+
options.apply_defaults timeout: @config.rpcs.create_aws_cluster.timeout,
|
327
|
+
metadata: call_metadata,
|
328
|
+
retry_policy: @config.rpcs.create_aws_cluster.retry_policy
|
329
|
+
|
330
|
+
options.apply_defaults timeout: @config.timeout,
|
331
|
+
metadata: @config.metadata,
|
332
|
+
retry_policy: @config.retry_policy
|
333
|
+
|
334
|
+
@aws_clusters_stub.create_aws_cluster request, options do |result, operation|
|
335
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
336
|
+
yield result, operation if block_given?
|
337
|
+
return result
|
338
|
+
end
|
339
|
+
rescue ::Gapic::Rest::Error => e
|
340
|
+
raise ::Google::Cloud::Error.from_error(e)
|
341
|
+
end
|
342
|
+
|
343
|
+
##
|
344
|
+
# Updates an {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster}.
|
345
|
+
#
|
346
|
+
# @overload update_aws_cluster(request, options = nil)
|
347
|
+
# Pass arguments to `update_aws_cluster` via a request object, either of type
|
348
|
+
# {::Google::Cloud::GkeMultiCloud::V1::UpdateAwsClusterRequest} or an equivalent Hash.
|
349
|
+
#
|
350
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::UpdateAwsClusterRequest, ::Hash]
|
351
|
+
# A request object representing the call parameters. Required. To specify no
|
352
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
353
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
354
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
355
|
+
#
|
356
|
+
# @overload update_aws_cluster(aws_cluster: nil, validate_only: nil, update_mask: nil)
|
357
|
+
# Pass arguments to `update_aws_cluster` via keyword arguments. Note that at
|
358
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
359
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
360
|
+
#
|
361
|
+
# @param aws_cluster [::Google::Cloud::GkeMultiCloud::V1::AwsCluster, ::Hash]
|
362
|
+
# Required. The {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster}
|
363
|
+
# resource to update.
|
364
|
+
# @param validate_only [::Boolean]
|
365
|
+
# If set, only validate the request, but do not actually update the cluster.
|
366
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
367
|
+
# Required. Mask of fields to update. At least one path must be supplied in
|
368
|
+
# this field. The elements of the repeated paths field can only include these
|
369
|
+
# fields from {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster}:
|
370
|
+
#
|
371
|
+
# * `description`.
|
372
|
+
# * `annotations`.
|
373
|
+
# * `control_plane.version`.
|
374
|
+
# * `authorization.admin_users`.
|
375
|
+
# * `authorization.admin_groups`.
|
376
|
+
# * `binary_authorization.evaluation_mode`.
|
377
|
+
# * `control_plane.aws_services_authentication.role_arn`.
|
378
|
+
# * `control_plane.aws_services_authentication.role_session_name`.
|
379
|
+
# * `control_plane.config_encryption.kms_key_arn`.
|
380
|
+
# * `control_plane.instance_type`.
|
381
|
+
# * `control_plane.security_group_ids`.
|
382
|
+
# * `control_plane.proxy_config`.
|
383
|
+
# * `control_plane.proxy_config.secret_arn`.
|
384
|
+
# * `control_plane.proxy_config.secret_version`.
|
385
|
+
# * `control_plane.root_volume.size_gib`.
|
386
|
+
# * `control_plane.root_volume.volume_type`.
|
387
|
+
# * `control_plane.root_volume.iops`.
|
388
|
+
# * `control_plane.root_volume.throughput`.
|
389
|
+
# * `control_plane.root_volume.kms_key_arn`.
|
390
|
+
# * `control_plane.ssh_config`.
|
391
|
+
# * `control_plane.ssh_config.ec2_key_pair`.
|
392
|
+
# * `control_plane.instance_placement.tenancy`.
|
393
|
+
# * `control_plane.iam_instance_profile`.
|
394
|
+
# * `logging_config.component_config.enable_components`.
|
395
|
+
# * `control_plane.tags`.
|
396
|
+
# * `monitoring_config.managed_prometheus_config.enabled`.
|
397
|
+
# * `networking.per_node_pool_sg_rules_disabled`.
|
398
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
399
|
+
# @yieldparam result [::Gapic::Operation]
|
400
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
401
|
+
#
|
402
|
+
# @return [::Gapic::Operation]
|
403
|
+
#
|
404
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
405
|
+
#
|
406
|
+
# @example Basic example
|
407
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
408
|
+
#
|
409
|
+
# # Create a client object. The client can be reused for multiple calls.
|
410
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
411
|
+
#
|
412
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
413
|
+
# request = Google::Cloud::GkeMultiCloud::V1::UpdateAwsClusterRequest.new
|
414
|
+
#
|
415
|
+
# # Call the update_aws_cluster method.
|
416
|
+
# result = client.update_aws_cluster request
|
417
|
+
#
|
418
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
419
|
+
# # check the status of an operation, cancel it, or wait for results.
|
420
|
+
# # Here is how to wait for a response.
|
421
|
+
# result.wait_until_done! timeout: 60
|
422
|
+
# if result.response?
|
423
|
+
# p result.response
|
424
|
+
# else
|
425
|
+
# puts "No response received."
|
426
|
+
# end
|
427
|
+
#
|
428
|
+
def update_aws_cluster request, options = nil
|
429
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
430
|
+
|
431
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::UpdateAwsClusterRequest
|
432
|
+
|
433
|
+
# Converts hash and nil to an options object
|
434
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
435
|
+
|
436
|
+
# Customize the options with defaults
|
437
|
+
call_metadata = @config.rpcs.update_aws_cluster.metadata.to_h
|
438
|
+
|
439
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
440
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
441
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
442
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
443
|
+
transports_version_send: [:rest]
|
444
|
+
|
445
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
446
|
+
|
447
|
+
options.apply_defaults timeout: @config.rpcs.update_aws_cluster.timeout,
|
448
|
+
metadata: call_metadata,
|
449
|
+
retry_policy: @config.rpcs.update_aws_cluster.retry_policy
|
450
|
+
|
451
|
+
options.apply_defaults timeout: @config.timeout,
|
452
|
+
metadata: @config.metadata,
|
453
|
+
retry_policy: @config.retry_policy
|
454
|
+
|
455
|
+
@aws_clusters_stub.update_aws_cluster request, options do |result, operation|
|
456
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
457
|
+
yield result, operation if block_given?
|
458
|
+
return result
|
459
|
+
end
|
460
|
+
rescue ::Gapic::Rest::Error => e
|
461
|
+
raise ::Google::Cloud::Error.from_error(e)
|
462
|
+
end
|
463
|
+
|
464
|
+
##
|
465
|
+
# Describes a specific {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster}
|
466
|
+
# resource.
|
467
|
+
#
|
468
|
+
# @overload get_aws_cluster(request, options = nil)
|
469
|
+
# Pass arguments to `get_aws_cluster` via a request object, either of type
|
470
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GetAwsClusterRequest} or an equivalent Hash.
|
471
|
+
#
|
472
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GetAwsClusterRequest, ::Hash]
|
473
|
+
# A request object representing the call parameters. Required. To specify no
|
474
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
475
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
476
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
477
|
+
#
|
478
|
+
# @overload get_aws_cluster(name: nil)
|
479
|
+
# Pass arguments to `get_aws_cluster` via keyword arguments. Note that at
|
480
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
481
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
482
|
+
#
|
483
|
+
# @param name [::String]
|
484
|
+
# Required. The name of the
|
485
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster} resource to
|
486
|
+
# describe.
|
487
|
+
#
|
488
|
+
# `AwsCluster` names are formatted as
|
489
|
+
# `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
|
490
|
+
#
|
491
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
492
|
+
# for more details on Google Cloud Platform resource names.
|
493
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
494
|
+
# @yieldparam result [::Google::Cloud::GkeMultiCloud::V1::AwsCluster]
|
495
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
496
|
+
#
|
497
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::AwsCluster]
|
498
|
+
#
|
499
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
500
|
+
#
|
501
|
+
# @example Basic example
|
502
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
503
|
+
#
|
504
|
+
# # Create a client object. The client can be reused for multiple calls.
|
505
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
506
|
+
#
|
507
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
508
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GetAwsClusterRequest.new
|
509
|
+
#
|
510
|
+
# # Call the get_aws_cluster method.
|
511
|
+
# result = client.get_aws_cluster request
|
512
|
+
#
|
513
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::AwsCluster.
|
514
|
+
# p result
|
515
|
+
#
|
516
|
+
def get_aws_cluster request, options = nil
|
517
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
518
|
+
|
519
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAwsClusterRequest
|
520
|
+
|
521
|
+
# Converts hash and nil to an options object
|
522
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
523
|
+
|
524
|
+
# Customize the options with defaults
|
525
|
+
call_metadata = @config.rpcs.get_aws_cluster.metadata.to_h
|
526
|
+
|
527
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
528
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
529
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
530
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
531
|
+
transports_version_send: [:rest]
|
532
|
+
|
533
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
534
|
+
|
535
|
+
options.apply_defaults timeout: @config.rpcs.get_aws_cluster.timeout,
|
536
|
+
metadata: call_metadata,
|
537
|
+
retry_policy: @config.rpcs.get_aws_cluster.retry_policy
|
538
|
+
|
539
|
+
options.apply_defaults timeout: @config.timeout,
|
540
|
+
metadata: @config.metadata,
|
541
|
+
retry_policy: @config.retry_policy
|
542
|
+
|
543
|
+
@aws_clusters_stub.get_aws_cluster request, options do |result, operation|
|
544
|
+
yield result, operation if block_given?
|
545
|
+
return result
|
546
|
+
end
|
547
|
+
rescue ::Gapic::Rest::Error => e
|
548
|
+
raise ::Google::Cloud::Error.from_error(e)
|
549
|
+
end
|
550
|
+
|
551
|
+
##
|
552
|
+
# Lists all {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster} resources
|
553
|
+
# on a given Google Cloud project and region.
|
554
|
+
#
|
555
|
+
# @overload list_aws_clusters(request, options = nil)
|
556
|
+
# Pass arguments to `list_aws_clusters` via a request object, either of type
|
557
|
+
# {::Google::Cloud::GkeMultiCloud::V1::ListAwsClustersRequest} or an equivalent Hash.
|
558
|
+
#
|
559
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::ListAwsClustersRequest, ::Hash]
|
560
|
+
# A request object representing the call parameters. Required. To specify no
|
561
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
562
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
563
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
564
|
+
#
|
565
|
+
# @overload list_aws_clusters(parent: nil, page_size: nil, page_token: nil)
|
566
|
+
# Pass arguments to `list_aws_clusters` via keyword arguments. Note that at
|
567
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
568
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
569
|
+
#
|
570
|
+
# @param parent [::String]
|
571
|
+
# Required. The parent location which owns this collection of
|
572
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster} resources.
|
573
|
+
#
|
574
|
+
# Location names are formatted as `projects/<project-id>/locations/<region>`.
|
575
|
+
#
|
576
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
577
|
+
# for more details on Google Cloud Platform resource names.
|
578
|
+
# @param page_size [::Integer]
|
579
|
+
# The maximum number of items to return.
|
580
|
+
#
|
581
|
+
# If not specified, a default value of 50 will be used by the service.
|
582
|
+
# Regardless of the pageSize value, the response can include a partial list
|
583
|
+
# and a caller should only rely on response's
|
584
|
+
# {::Google::Cloud::GkeMultiCloud::V1::ListAwsClustersResponse#next_page_token nextPageToken}
|
585
|
+
# to determine if there are more instances left to be queried.
|
586
|
+
# @param page_token [::String]
|
587
|
+
# The `nextPageToken` value returned from a previous
|
588
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client#list_aws_clusters awsClusters.list}
|
589
|
+
# request, if any.
|
590
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
591
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsCluster>]
|
592
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
593
|
+
#
|
594
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsCluster>]
|
595
|
+
#
|
596
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
597
|
+
#
|
598
|
+
# @example Basic example
|
599
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
600
|
+
#
|
601
|
+
# # Create a client object. The client can be reused for multiple calls.
|
602
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
603
|
+
#
|
604
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
605
|
+
# request = Google::Cloud::GkeMultiCloud::V1::ListAwsClustersRequest.new
|
606
|
+
#
|
607
|
+
# # Call the list_aws_clusters method.
|
608
|
+
# result = client.list_aws_clusters request
|
609
|
+
#
|
610
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
611
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
612
|
+
# result.each do |item|
|
613
|
+
# # Each element is of type ::Google::Cloud::GkeMultiCloud::V1::AwsCluster.
|
614
|
+
# p item
|
615
|
+
# end
|
616
|
+
#
|
617
|
+
def list_aws_clusters request, options = nil
|
618
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
619
|
+
|
620
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::ListAwsClustersRequest
|
621
|
+
|
622
|
+
# Converts hash and nil to an options object
|
623
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
624
|
+
|
625
|
+
# Customize the options with defaults
|
626
|
+
call_metadata = @config.rpcs.list_aws_clusters.metadata.to_h
|
627
|
+
|
628
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
629
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
630
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
631
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
632
|
+
transports_version_send: [:rest]
|
633
|
+
|
634
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
635
|
+
|
636
|
+
options.apply_defaults timeout: @config.rpcs.list_aws_clusters.timeout,
|
637
|
+
metadata: call_metadata,
|
638
|
+
retry_policy: @config.rpcs.list_aws_clusters.retry_policy
|
639
|
+
|
640
|
+
options.apply_defaults timeout: @config.timeout,
|
641
|
+
metadata: @config.metadata,
|
642
|
+
retry_policy: @config.retry_policy
|
643
|
+
|
644
|
+
@aws_clusters_stub.list_aws_clusters request, options do |result, operation|
|
645
|
+
result = ::Gapic::Rest::PagedEnumerable.new @aws_clusters_stub, :list_aws_clusters, "aws_clusters", request, result, options
|
646
|
+
yield result, operation if block_given?
|
647
|
+
return result
|
648
|
+
end
|
649
|
+
rescue ::Gapic::Rest::Error => e
|
650
|
+
raise ::Google::Cloud::Error.from_error(e)
|
651
|
+
end
|
652
|
+
|
653
|
+
##
|
654
|
+
# Deletes a specific {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster}
|
655
|
+
# resource.
|
656
|
+
#
|
657
|
+
# Fails if the cluster has one or more associated
|
658
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool} resources.
|
659
|
+
#
|
660
|
+
# If successful, the response contains a newly created
|
661
|
+
# {::Google::Longrunning::Operation Operation} resource that can be
|
662
|
+
# described to track the status of the operation.
|
663
|
+
#
|
664
|
+
# @overload delete_aws_cluster(request, options = nil)
|
665
|
+
# Pass arguments to `delete_aws_cluster` via a request object, either of type
|
666
|
+
# {::Google::Cloud::GkeMultiCloud::V1::DeleteAwsClusterRequest} or an equivalent Hash.
|
667
|
+
#
|
668
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::DeleteAwsClusterRequest, ::Hash]
|
669
|
+
# A request object representing the call parameters. Required. To specify no
|
670
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
671
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
672
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
673
|
+
#
|
674
|
+
# @overload delete_aws_cluster(name: nil, validate_only: nil, allow_missing: nil, ignore_errors: nil, etag: nil)
|
675
|
+
# Pass arguments to `delete_aws_cluster` via keyword arguments. Note that at
|
676
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
677
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
678
|
+
#
|
679
|
+
# @param name [::String]
|
680
|
+
# Required. The resource name the
|
681
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster} to delete.
|
682
|
+
#
|
683
|
+
# `AwsCluster` names are formatted as
|
684
|
+
# `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
|
685
|
+
#
|
686
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
687
|
+
# for more details on Google Cloud Platform resource names.
|
688
|
+
# @param validate_only [::Boolean]
|
689
|
+
# If set, only validate the request, but do not actually delete the resource.
|
690
|
+
# @param allow_missing [::Boolean]
|
691
|
+
# If set to true, and the
|
692
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster} resource is not
|
693
|
+
# found, the request will succeed but no action will be taken on the server
|
694
|
+
# and a completed {::Google::Longrunning::Operation Operation} will be returned.
|
695
|
+
#
|
696
|
+
# Useful for idempotent deletion.
|
697
|
+
# @param ignore_errors [::Boolean]
|
698
|
+
# Optional. If set to true, the deletion of
|
699
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster} resource will
|
700
|
+
# succeed even if errors occur during deleting in cluster resources. Using
|
701
|
+
# this parameter may result in orphaned resources in the cluster.
|
702
|
+
# @param etag [::String]
|
703
|
+
# The current etag of the
|
704
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster}.
|
705
|
+
#
|
706
|
+
# Allows clients to perform deletions through optimistic concurrency control.
|
707
|
+
#
|
708
|
+
# If the provided etag does not match the current etag of the cluster,
|
709
|
+
# the request will fail and an ABORTED error will be returned.
|
710
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
711
|
+
# @yieldparam result [::Gapic::Operation]
|
712
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
713
|
+
#
|
714
|
+
# @return [::Gapic::Operation]
|
715
|
+
#
|
716
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
717
|
+
#
|
718
|
+
# @example Basic example
|
719
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
720
|
+
#
|
721
|
+
# # Create a client object. The client can be reused for multiple calls.
|
722
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
723
|
+
#
|
724
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
725
|
+
# request = Google::Cloud::GkeMultiCloud::V1::DeleteAwsClusterRequest.new
|
726
|
+
#
|
727
|
+
# # Call the delete_aws_cluster method.
|
728
|
+
# result = client.delete_aws_cluster request
|
729
|
+
#
|
730
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
731
|
+
# # check the status of an operation, cancel it, or wait for results.
|
732
|
+
# # Here is how to wait for a response.
|
733
|
+
# result.wait_until_done! timeout: 60
|
734
|
+
# if result.response?
|
735
|
+
# p result.response
|
736
|
+
# else
|
737
|
+
# puts "No response received."
|
738
|
+
# end
|
739
|
+
#
|
740
|
+
def delete_aws_cluster request, options = nil
|
741
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
742
|
+
|
743
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::DeleteAwsClusterRequest
|
744
|
+
|
745
|
+
# Converts hash and nil to an options object
|
746
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
747
|
+
|
748
|
+
# Customize the options with defaults
|
749
|
+
call_metadata = @config.rpcs.delete_aws_cluster.metadata.to_h
|
750
|
+
|
751
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
752
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
753
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
754
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
755
|
+
transports_version_send: [:rest]
|
756
|
+
|
757
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
758
|
+
|
759
|
+
options.apply_defaults timeout: @config.rpcs.delete_aws_cluster.timeout,
|
760
|
+
metadata: call_metadata,
|
761
|
+
retry_policy: @config.rpcs.delete_aws_cluster.retry_policy
|
762
|
+
|
763
|
+
options.apply_defaults timeout: @config.timeout,
|
764
|
+
metadata: @config.metadata,
|
765
|
+
retry_policy: @config.retry_policy
|
766
|
+
|
767
|
+
@aws_clusters_stub.delete_aws_cluster request, options do |result, operation|
|
768
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
769
|
+
yield result, operation if block_given?
|
770
|
+
return result
|
771
|
+
end
|
772
|
+
rescue ::Gapic::Rest::Error => e
|
773
|
+
raise ::Google::Cloud::Error.from_error(e)
|
774
|
+
end
|
775
|
+
|
776
|
+
##
|
777
|
+
# Generates an access token for a cluster agent.
|
778
|
+
#
|
779
|
+
# @overload generate_aws_cluster_agent_token(request, options = nil)
|
780
|
+
# Pass arguments to `generate_aws_cluster_agent_token` via a request object, either of type
|
781
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenRequest} or an equivalent Hash.
|
782
|
+
#
|
783
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenRequest, ::Hash]
|
784
|
+
# A request object representing the call parameters. Required. To specify no
|
785
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
786
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
787
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
788
|
+
#
|
789
|
+
# @overload generate_aws_cluster_agent_token(aws_cluster: nil, subject_token: nil, subject_token_type: nil, version: nil, node_pool_id: nil, grant_type: nil, audience: nil, scope: nil, requested_token_type: nil, options: nil)
|
790
|
+
# Pass arguments to `generate_aws_cluster_agent_token` via keyword arguments. Note that at
|
791
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
792
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
793
|
+
#
|
794
|
+
# @param aws_cluster [::String]
|
795
|
+
# Required.
|
796
|
+
# @param subject_token [::String]
|
797
|
+
# Required.
|
798
|
+
# @param subject_token_type [::String]
|
799
|
+
# Required.
|
800
|
+
# @param version [::String]
|
801
|
+
# Required.
|
802
|
+
# @param node_pool_id [::String]
|
803
|
+
# Optional.
|
804
|
+
# @param grant_type [::String]
|
805
|
+
# Optional.
|
806
|
+
# @param audience [::String]
|
807
|
+
# Optional.
|
808
|
+
# @param scope [::String]
|
809
|
+
# Optional.
|
810
|
+
# @param requested_token_type [::String]
|
811
|
+
# Optional.
|
812
|
+
# @param options [::String]
|
813
|
+
# Optional.
|
814
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
815
|
+
# @yieldparam result [::Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenResponse]
|
816
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
817
|
+
#
|
818
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenResponse]
|
819
|
+
#
|
820
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
821
|
+
#
|
822
|
+
# @example Basic example
|
823
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
824
|
+
#
|
825
|
+
# # Create a client object. The client can be reused for multiple calls.
|
826
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
827
|
+
#
|
828
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
829
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenRequest.new
|
830
|
+
#
|
831
|
+
# # Call the generate_aws_cluster_agent_token method.
|
832
|
+
# result = client.generate_aws_cluster_agent_token request
|
833
|
+
#
|
834
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenResponse.
|
835
|
+
# p result
|
836
|
+
#
|
837
|
+
def generate_aws_cluster_agent_token request, options = nil
|
838
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
839
|
+
|
840
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenRequest
|
841
|
+
|
842
|
+
# Converts hash and nil to an options object
|
843
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
844
|
+
|
845
|
+
# Customize the options with defaults
|
846
|
+
call_metadata = @config.rpcs.generate_aws_cluster_agent_token.metadata.to_h
|
847
|
+
|
848
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
849
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
850
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
851
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
852
|
+
transports_version_send: [:rest]
|
853
|
+
|
854
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
855
|
+
|
856
|
+
options.apply_defaults timeout: @config.rpcs.generate_aws_cluster_agent_token.timeout,
|
857
|
+
metadata: call_metadata,
|
858
|
+
retry_policy: @config.rpcs.generate_aws_cluster_agent_token.retry_policy
|
859
|
+
|
860
|
+
options.apply_defaults timeout: @config.timeout,
|
861
|
+
metadata: @config.metadata,
|
862
|
+
retry_policy: @config.retry_policy
|
863
|
+
|
864
|
+
@aws_clusters_stub.generate_aws_cluster_agent_token request, options do |result, operation|
|
865
|
+
yield result, operation if block_given?
|
866
|
+
return result
|
867
|
+
end
|
868
|
+
rescue ::Gapic::Rest::Error => e
|
869
|
+
raise ::Google::Cloud::Error.from_error(e)
|
870
|
+
end
|
871
|
+
|
872
|
+
##
|
873
|
+
# Generates a short-lived access token to authenticate to a given
|
874
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster} resource.
|
875
|
+
#
|
876
|
+
# @overload generate_aws_access_token(request, options = nil)
|
877
|
+
# Pass arguments to `generate_aws_access_token` via a request object, either of type
|
878
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenRequest} or an equivalent Hash.
|
879
|
+
#
|
880
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenRequest, ::Hash]
|
881
|
+
# A request object representing the call parameters. Required. To specify no
|
882
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
883
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
884
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
885
|
+
#
|
886
|
+
# @overload generate_aws_access_token(aws_cluster: nil)
|
887
|
+
# Pass arguments to `generate_aws_access_token` via keyword arguments. Note that at
|
888
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
889
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
890
|
+
#
|
891
|
+
# @param aws_cluster [::String]
|
892
|
+
# Required. The name of the
|
893
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster} resource to
|
894
|
+
# authenticate to.
|
895
|
+
#
|
896
|
+
# `AwsCluster` names are formatted as
|
897
|
+
# `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
|
898
|
+
#
|
899
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
900
|
+
# for more details on Google Cloud resource names.
|
901
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
902
|
+
# @yieldparam result [::Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenResponse]
|
903
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
904
|
+
#
|
905
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenResponse]
|
906
|
+
#
|
907
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
908
|
+
#
|
909
|
+
# @example Basic example
|
910
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
911
|
+
#
|
912
|
+
# # Create a client object. The client can be reused for multiple calls.
|
913
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
914
|
+
#
|
915
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
916
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenRequest.new
|
917
|
+
#
|
918
|
+
# # Call the generate_aws_access_token method.
|
919
|
+
# result = client.generate_aws_access_token request
|
920
|
+
#
|
921
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenResponse.
|
922
|
+
# p result
|
923
|
+
#
|
924
|
+
def generate_aws_access_token request, options = nil
|
925
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
926
|
+
|
927
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenRequest
|
928
|
+
|
929
|
+
# Converts hash and nil to an options object
|
930
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
931
|
+
|
932
|
+
# Customize the options with defaults
|
933
|
+
call_metadata = @config.rpcs.generate_aws_access_token.metadata.to_h
|
934
|
+
|
935
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
936
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
937
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
938
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
939
|
+
transports_version_send: [:rest]
|
940
|
+
|
941
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
942
|
+
|
943
|
+
options.apply_defaults timeout: @config.rpcs.generate_aws_access_token.timeout,
|
944
|
+
metadata: call_metadata,
|
945
|
+
retry_policy: @config.rpcs.generate_aws_access_token.retry_policy
|
946
|
+
|
947
|
+
options.apply_defaults timeout: @config.timeout,
|
948
|
+
metadata: @config.metadata,
|
949
|
+
retry_policy: @config.retry_policy
|
950
|
+
|
951
|
+
@aws_clusters_stub.generate_aws_access_token request, options do |result, operation|
|
952
|
+
yield result, operation if block_given?
|
953
|
+
return result
|
954
|
+
end
|
955
|
+
rescue ::Gapic::Rest::Error => e
|
956
|
+
raise ::Google::Cloud::Error.from_error(e)
|
957
|
+
end
|
958
|
+
|
959
|
+
##
|
960
|
+
# Creates a new {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool},
|
961
|
+
# attached to a given {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster}.
|
962
|
+
#
|
963
|
+
# If successful, the response contains a newly created
|
964
|
+
# {::Google::Longrunning::Operation Operation} resource that can be
|
965
|
+
# described to track the status of the operation.
|
966
|
+
#
|
967
|
+
# @overload create_aws_node_pool(request, options = nil)
|
968
|
+
# Pass arguments to `create_aws_node_pool` via a request object, either of type
|
969
|
+
# {::Google::Cloud::GkeMultiCloud::V1::CreateAwsNodePoolRequest} or an equivalent Hash.
|
970
|
+
#
|
971
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::CreateAwsNodePoolRequest, ::Hash]
|
972
|
+
# A request object representing the call parameters. Required. To specify no
|
973
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
974
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
975
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
976
|
+
#
|
977
|
+
# @overload create_aws_node_pool(parent: nil, aws_node_pool: nil, aws_node_pool_id: nil, validate_only: nil)
|
978
|
+
# Pass arguments to `create_aws_node_pool` via keyword arguments. Note that at
|
979
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
980
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
981
|
+
#
|
982
|
+
# @param parent [::String]
|
983
|
+
# Required. The {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster}
|
984
|
+
# resource where this node pool will be created.
|
985
|
+
#
|
986
|
+
# `AwsCluster` names are formatted as
|
987
|
+
# `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
|
988
|
+
#
|
989
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
990
|
+
# for more details on Google Cloud resource names.
|
991
|
+
# @param aws_node_pool [::Google::Cloud::GkeMultiCloud::V1::AwsNodePool, ::Hash]
|
992
|
+
# Required. The specification of the
|
993
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool} to create.
|
994
|
+
# @param aws_node_pool_id [::String]
|
995
|
+
# Required. A client provided ID the resource. Must be unique within the
|
996
|
+
# parent resource.
|
997
|
+
#
|
998
|
+
# The provided ID will be part of the
|
999
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool} resource name
|
1000
|
+
# formatted as
|
1001
|
+
# `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
|
1002
|
+
#
|
1003
|
+
# Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
|
1004
|
+
# @param validate_only [::Boolean]
|
1005
|
+
# If set, only validate the request, but do not actually create the node
|
1006
|
+
# pool.
|
1007
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1008
|
+
# @yieldparam result [::Gapic::Operation]
|
1009
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1010
|
+
#
|
1011
|
+
# @return [::Gapic::Operation]
|
1012
|
+
#
|
1013
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1014
|
+
#
|
1015
|
+
# @example Basic example
|
1016
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1017
|
+
#
|
1018
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1019
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
1020
|
+
#
|
1021
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1022
|
+
# request = Google::Cloud::GkeMultiCloud::V1::CreateAwsNodePoolRequest.new
|
1023
|
+
#
|
1024
|
+
# # Call the create_aws_node_pool method.
|
1025
|
+
# result = client.create_aws_node_pool request
|
1026
|
+
#
|
1027
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1028
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1029
|
+
# # Here is how to wait for a response.
|
1030
|
+
# result.wait_until_done! timeout: 60
|
1031
|
+
# if result.response?
|
1032
|
+
# p result.response
|
1033
|
+
# else
|
1034
|
+
# puts "No response received."
|
1035
|
+
# end
|
1036
|
+
#
|
1037
|
+
def create_aws_node_pool request, options = nil
|
1038
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1039
|
+
|
1040
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::CreateAwsNodePoolRequest
|
1041
|
+
|
1042
|
+
# Converts hash and nil to an options object
|
1043
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1044
|
+
|
1045
|
+
# Customize the options with defaults
|
1046
|
+
call_metadata = @config.rpcs.create_aws_node_pool.metadata.to_h
|
1047
|
+
|
1048
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1049
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1050
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1051
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
1052
|
+
transports_version_send: [:rest]
|
1053
|
+
|
1054
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1055
|
+
|
1056
|
+
options.apply_defaults timeout: @config.rpcs.create_aws_node_pool.timeout,
|
1057
|
+
metadata: call_metadata,
|
1058
|
+
retry_policy: @config.rpcs.create_aws_node_pool.retry_policy
|
1059
|
+
|
1060
|
+
options.apply_defaults timeout: @config.timeout,
|
1061
|
+
metadata: @config.metadata,
|
1062
|
+
retry_policy: @config.retry_policy
|
1063
|
+
|
1064
|
+
@aws_clusters_stub.create_aws_node_pool request, options do |result, operation|
|
1065
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1066
|
+
yield result, operation if block_given?
|
1067
|
+
return result
|
1068
|
+
end
|
1069
|
+
rescue ::Gapic::Rest::Error => e
|
1070
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1071
|
+
end
|
1072
|
+
|
1073
|
+
##
|
1074
|
+
# Updates an {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool}.
|
1075
|
+
#
|
1076
|
+
# @overload update_aws_node_pool(request, options = nil)
|
1077
|
+
# Pass arguments to `update_aws_node_pool` via a request object, either of type
|
1078
|
+
# {::Google::Cloud::GkeMultiCloud::V1::UpdateAwsNodePoolRequest} or an equivalent Hash.
|
1079
|
+
#
|
1080
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::UpdateAwsNodePoolRequest, ::Hash]
|
1081
|
+
# A request object representing the call parameters. Required. To specify no
|
1082
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1083
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1084
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1085
|
+
#
|
1086
|
+
# @overload update_aws_node_pool(aws_node_pool: nil, validate_only: nil, update_mask: nil)
|
1087
|
+
# Pass arguments to `update_aws_node_pool` via keyword arguments. Note that at
|
1088
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1089
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1090
|
+
#
|
1091
|
+
# @param aws_node_pool [::Google::Cloud::GkeMultiCloud::V1::AwsNodePool, ::Hash]
|
1092
|
+
# Required. The {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool}
|
1093
|
+
# resource to update.
|
1094
|
+
# @param validate_only [::Boolean]
|
1095
|
+
# If set, only validate the request, but don't actually update the node pool.
|
1096
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1097
|
+
# Required. Mask of fields to update. At least one path must be supplied in
|
1098
|
+
# this field. The elements of the repeated paths field can only include these
|
1099
|
+
# fields from {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool}:
|
1100
|
+
#
|
1101
|
+
# * `annotations`.
|
1102
|
+
# * `version`.
|
1103
|
+
# * `autoscaling.min_node_count`.
|
1104
|
+
# * `autoscaling.max_node_count`.
|
1105
|
+
# * `config.config_encryption.kms_key_arn`.
|
1106
|
+
# * `config.security_group_ids`.
|
1107
|
+
# * `config.root_volume.iops`.
|
1108
|
+
# * `config.root_volume.throughput`.
|
1109
|
+
# * `config.root_volume.kms_key_arn`.
|
1110
|
+
# * `config.root_volume.volume_type`.
|
1111
|
+
# * `config.root_volume.size_gib`.
|
1112
|
+
# * `config.proxy_config`.
|
1113
|
+
# * `config.proxy_config.secret_arn`.
|
1114
|
+
# * `config.proxy_config.secret_version`.
|
1115
|
+
# * `config.ssh_config`.
|
1116
|
+
# * `config.ssh_config.ec2_key_pair`.
|
1117
|
+
# * `config.instance_placement.tenancy`.
|
1118
|
+
# * `config.iam_instance_profile`.
|
1119
|
+
# * `config.labels`.
|
1120
|
+
# * `config.tags`.
|
1121
|
+
# * `config.autoscaling_metrics_collection`.
|
1122
|
+
# * `config.autoscaling_metrics_collection.granularity`.
|
1123
|
+
# * `config.autoscaling_metrics_collection.metrics`.
|
1124
|
+
# * `config.instance_type`.
|
1125
|
+
# * `management.auto_repair`.
|
1126
|
+
# * `management`.
|
1127
|
+
# * `update_settings`.
|
1128
|
+
# * `update_settings.surge_settings`.
|
1129
|
+
# * `update_settings.surge_settings.max_surge`.
|
1130
|
+
# * `update_settings.surge_settings.max_unavailable`.
|
1131
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1132
|
+
# @yieldparam result [::Gapic::Operation]
|
1133
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1134
|
+
#
|
1135
|
+
# @return [::Gapic::Operation]
|
1136
|
+
#
|
1137
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1138
|
+
#
|
1139
|
+
# @example Basic example
|
1140
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1141
|
+
#
|
1142
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1143
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
1144
|
+
#
|
1145
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1146
|
+
# request = Google::Cloud::GkeMultiCloud::V1::UpdateAwsNodePoolRequest.new
|
1147
|
+
#
|
1148
|
+
# # Call the update_aws_node_pool method.
|
1149
|
+
# result = client.update_aws_node_pool request
|
1150
|
+
#
|
1151
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1152
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1153
|
+
# # Here is how to wait for a response.
|
1154
|
+
# result.wait_until_done! timeout: 60
|
1155
|
+
# if result.response?
|
1156
|
+
# p result.response
|
1157
|
+
# else
|
1158
|
+
# puts "No response received."
|
1159
|
+
# end
|
1160
|
+
#
|
1161
|
+
def update_aws_node_pool request, options = nil
|
1162
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1163
|
+
|
1164
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::UpdateAwsNodePoolRequest
|
1165
|
+
|
1166
|
+
# Converts hash and nil to an options object
|
1167
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1168
|
+
|
1169
|
+
# Customize the options with defaults
|
1170
|
+
call_metadata = @config.rpcs.update_aws_node_pool.metadata.to_h
|
1171
|
+
|
1172
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1173
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1174
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1175
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
1176
|
+
transports_version_send: [:rest]
|
1177
|
+
|
1178
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1179
|
+
|
1180
|
+
options.apply_defaults timeout: @config.rpcs.update_aws_node_pool.timeout,
|
1181
|
+
metadata: call_metadata,
|
1182
|
+
retry_policy: @config.rpcs.update_aws_node_pool.retry_policy
|
1183
|
+
|
1184
|
+
options.apply_defaults timeout: @config.timeout,
|
1185
|
+
metadata: @config.metadata,
|
1186
|
+
retry_policy: @config.retry_policy
|
1187
|
+
|
1188
|
+
@aws_clusters_stub.update_aws_node_pool request, options do |result, operation|
|
1189
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1190
|
+
yield result, operation if block_given?
|
1191
|
+
return result
|
1192
|
+
end
|
1193
|
+
rescue ::Gapic::Rest::Error => e
|
1194
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1195
|
+
end
|
1196
|
+
|
1197
|
+
##
|
1198
|
+
# Rolls back a previously aborted or failed
|
1199
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool} update request.
|
1200
|
+
# Makes no changes if the last update request successfully finished.
|
1201
|
+
# If an update request is in progress, you cannot rollback the update.
|
1202
|
+
# You must first cancel or let it finish unsuccessfully before you can
|
1203
|
+
# rollback.
|
1204
|
+
#
|
1205
|
+
# @overload rollback_aws_node_pool_update(request, options = nil)
|
1206
|
+
# Pass arguments to `rollback_aws_node_pool_update` via a request object, either of type
|
1207
|
+
# {::Google::Cloud::GkeMultiCloud::V1::RollbackAwsNodePoolUpdateRequest} or an equivalent Hash.
|
1208
|
+
#
|
1209
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::RollbackAwsNodePoolUpdateRequest, ::Hash]
|
1210
|
+
# A request object representing the call parameters. Required. To specify no
|
1211
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1212
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1213
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1214
|
+
#
|
1215
|
+
# @overload rollback_aws_node_pool_update(name: nil, respect_pdb: nil)
|
1216
|
+
# Pass arguments to `rollback_aws_node_pool_update` via keyword arguments. Note that at
|
1217
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1218
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1219
|
+
#
|
1220
|
+
# @param name [::String]
|
1221
|
+
# Required. The name of the
|
1222
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool} resource to
|
1223
|
+
# rollback.
|
1224
|
+
#
|
1225
|
+
# `AwsNodePool` names are formatted as
|
1226
|
+
# `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
|
1227
|
+
#
|
1228
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
1229
|
+
# for more details on Google Cloud resource names.
|
1230
|
+
# @param respect_pdb [::Boolean]
|
1231
|
+
# Optional. Option for rollback to ignore the PodDisruptionBudget when
|
1232
|
+
# draining the node pool nodes. Default value is false.
|
1233
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1234
|
+
# @yieldparam result [::Gapic::Operation]
|
1235
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1236
|
+
#
|
1237
|
+
# @return [::Gapic::Operation]
|
1238
|
+
#
|
1239
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1240
|
+
#
|
1241
|
+
# @example Basic example
|
1242
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1243
|
+
#
|
1244
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1245
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
1246
|
+
#
|
1247
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1248
|
+
# request = Google::Cloud::GkeMultiCloud::V1::RollbackAwsNodePoolUpdateRequest.new
|
1249
|
+
#
|
1250
|
+
# # Call the rollback_aws_node_pool_update method.
|
1251
|
+
# result = client.rollback_aws_node_pool_update request
|
1252
|
+
#
|
1253
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1254
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1255
|
+
# # Here is how to wait for a response.
|
1256
|
+
# result.wait_until_done! timeout: 60
|
1257
|
+
# if result.response?
|
1258
|
+
# p result.response
|
1259
|
+
# else
|
1260
|
+
# puts "No response received."
|
1261
|
+
# end
|
1262
|
+
#
|
1263
|
+
def rollback_aws_node_pool_update request, options = nil
|
1264
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1265
|
+
|
1266
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::RollbackAwsNodePoolUpdateRequest
|
1267
|
+
|
1268
|
+
# Converts hash and nil to an options object
|
1269
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1270
|
+
|
1271
|
+
# Customize the options with defaults
|
1272
|
+
call_metadata = @config.rpcs.rollback_aws_node_pool_update.metadata.to_h
|
1273
|
+
|
1274
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1275
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1276
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1277
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
1278
|
+
transports_version_send: [:rest]
|
1279
|
+
|
1280
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1281
|
+
|
1282
|
+
options.apply_defaults timeout: @config.rpcs.rollback_aws_node_pool_update.timeout,
|
1283
|
+
metadata: call_metadata,
|
1284
|
+
retry_policy: @config.rpcs.rollback_aws_node_pool_update.retry_policy
|
1285
|
+
|
1286
|
+
options.apply_defaults timeout: @config.timeout,
|
1287
|
+
metadata: @config.metadata,
|
1288
|
+
retry_policy: @config.retry_policy
|
1289
|
+
|
1290
|
+
@aws_clusters_stub.rollback_aws_node_pool_update request, options do |result, operation|
|
1291
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1292
|
+
yield result, operation if block_given?
|
1293
|
+
return result
|
1294
|
+
end
|
1295
|
+
rescue ::Gapic::Rest::Error => e
|
1296
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1297
|
+
end
|
1298
|
+
|
1299
|
+
##
|
1300
|
+
# Describes a specific
|
1301
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool} resource.
|
1302
|
+
#
|
1303
|
+
# @overload get_aws_node_pool(request, options = nil)
|
1304
|
+
# Pass arguments to `get_aws_node_pool` via a request object, either of type
|
1305
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GetAwsNodePoolRequest} or an equivalent Hash.
|
1306
|
+
#
|
1307
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GetAwsNodePoolRequest, ::Hash]
|
1308
|
+
# A request object representing the call parameters. Required. To specify no
|
1309
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1310
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1311
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1312
|
+
#
|
1313
|
+
# @overload get_aws_node_pool(name: nil)
|
1314
|
+
# Pass arguments to `get_aws_node_pool` via keyword arguments. Note that at
|
1315
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1316
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1317
|
+
#
|
1318
|
+
# @param name [::String]
|
1319
|
+
# Required. The name of the
|
1320
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool} resource to
|
1321
|
+
# describe.
|
1322
|
+
#
|
1323
|
+
# `AwsNodePool` names are formatted as
|
1324
|
+
# `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
|
1325
|
+
#
|
1326
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
1327
|
+
# for more details on Google Cloud resource names.
|
1328
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1329
|
+
# @yieldparam result [::Google::Cloud::GkeMultiCloud::V1::AwsNodePool]
|
1330
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1331
|
+
#
|
1332
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::AwsNodePool]
|
1333
|
+
#
|
1334
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1335
|
+
#
|
1336
|
+
# @example Basic example
|
1337
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1338
|
+
#
|
1339
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1340
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
1341
|
+
#
|
1342
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1343
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GetAwsNodePoolRequest.new
|
1344
|
+
#
|
1345
|
+
# # Call the get_aws_node_pool method.
|
1346
|
+
# result = client.get_aws_node_pool request
|
1347
|
+
#
|
1348
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::AwsNodePool.
|
1349
|
+
# p result
|
1350
|
+
#
|
1351
|
+
def get_aws_node_pool request, options = nil
|
1352
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1353
|
+
|
1354
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAwsNodePoolRequest
|
1355
|
+
|
1356
|
+
# Converts hash and nil to an options object
|
1357
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1358
|
+
|
1359
|
+
# Customize the options with defaults
|
1360
|
+
call_metadata = @config.rpcs.get_aws_node_pool.metadata.to_h
|
1361
|
+
|
1362
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1363
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1364
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1365
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
1366
|
+
transports_version_send: [:rest]
|
1367
|
+
|
1368
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1369
|
+
|
1370
|
+
options.apply_defaults timeout: @config.rpcs.get_aws_node_pool.timeout,
|
1371
|
+
metadata: call_metadata,
|
1372
|
+
retry_policy: @config.rpcs.get_aws_node_pool.retry_policy
|
1373
|
+
|
1374
|
+
options.apply_defaults timeout: @config.timeout,
|
1375
|
+
metadata: @config.metadata,
|
1376
|
+
retry_policy: @config.retry_policy
|
1377
|
+
|
1378
|
+
@aws_clusters_stub.get_aws_node_pool request, options do |result, operation|
|
1379
|
+
yield result, operation if block_given?
|
1380
|
+
return result
|
1381
|
+
end
|
1382
|
+
rescue ::Gapic::Rest::Error => e
|
1383
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1384
|
+
end
|
1385
|
+
|
1386
|
+
##
|
1387
|
+
# Lists all {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool}
|
1388
|
+
# resources on a given
|
1389
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsCluster AwsCluster}.
|
1390
|
+
#
|
1391
|
+
# @overload list_aws_node_pools(request, options = nil)
|
1392
|
+
# Pass arguments to `list_aws_node_pools` via a request object, either of type
|
1393
|
+
# {::Google::Cloud::GkeMultiCloud::V1::ListAwsNodePoolsRequest} or an equivalent Hash.
|
1394
|
+
#
|
1395
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::ListAwsNodePoolsRequest, ::Hash]
|
1396
|
+
# A request object representing the call parameters. Required. To specify no
|
1397
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1398
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1399
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1400
|
+
#
|
1401
|
+
# @overload list_aws_node_pools(parent: nil, page_size: nil, page_token: nil)
|
1402
|
+
# Pass arguments to `list_aws_node_pools` via keyword arguments. Note that at
|
1403
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1404
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1405
|
+
#
|
1406
|
+
# @param parent [::String]
|
1407
|
+
# Required. The parent `AwsCluster` which owns this collection of
|
1408
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool} resources.
|
1409
|
+
#
|
1410
|
+
# `AwsCluster` names are formatted as
|
1411
|
+
# `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
|
1412
|
+
#
|
1413
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
1414
|
+
# for more details on Google Cloud resource names.
|
1415
|
+
# @param page_size [::Integer]
|
1416
|
+
# The maximum number of items to return.
|
1417
|
+
#
|
1418
|
+
# If not specified, a default value of 50 will be used by the service.
|
1419
|
+
# Regardless of the pageSize value, the response can include a partial list
|
1420
|
+
# and a caller should only rely on response's
|
1421
|
+
# {::Google::Cloud::GkeMultiCloud::V1::ListAwsNodePoolsResponse#next_page_token nextPageToken}
|
1422
|
+
# to determine if there are more instances left to be queried.
|
1423
|
+
# @param page_token [::String]
|
1424
|
+
# The `nextPageToken` value returned from a previous
|
1425
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client#list_aws_node_pools awsNodePools.list}
|
1426
|
+
# request, if any.
|
1427
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1428
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsNodePool>]
|
1429
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1430
|
+
#
|
1431
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsNodePool>]
|
1432
|
+
#
|
1433
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1434
|
+
#
|
1435
|
+
# @example Basic example
|
1436
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1437
|
+
#
|
1438
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1439
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
1440
|
+
#
|
1441
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1442
|
+
# request = Google::Cloud::GkeMultiCloud::V1::ListAwsNodePoolsRequest.new
|
1443
|
+
#
|
1444
|
+
# # Call the list_aws_node_pools method.
|
1445
|
+
# result = client.list_aws_node_pools request
|
1446
|
+
#
|
1447
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1448
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1449
|
+
# result.each do |item|
|
1450
|
+
# # Each element is of type ::Google::Cloud::GkeMultiCloud::V1::AwsNodePool.
|
1451
|
+
# p item
|
1452
|
+
# end
|
1453
|
+
#
|
1454
|
+
def list_aws_node_pools request, options = nil
|
1455
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1456
|
+
|
1457
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::ListAwsNodePoolsRequest
|
1458
|
+
|
1459
|
+
# Converts hash and nil to an options object
|
1460
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1461
|
+
|
1462
|
+
# Customize the options with defaults
|
1463
|
+
call_metadata = @config.rpcs.list_aws_node_pools.metadata.to_h
|
1464
|
+
|
1465
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1466
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1467
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1468
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
1469
|
+
transports_version_send: [:rest]
|
1470
|
+
|
1471
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1472
|
+
|
1473
|
+
options.apply_defaults timeout: @config.rpcs.list_aws_node_pools.timeout,
|
1474
|
+
metadata: call_metadata,
|
1475
|
+
retry_policy: @config.rpcs.list_aws_node_pools.retry_policy
|
1476
|
+
|
1477
|
+
options.apply_defaults timeout: @config.timeout,
|
1478
|
+
metadata: @config.metadata,
|
1479
|
+
retry_policy: @config.retry_policy
|
1480
|
+
|
1481
|
+
@aws_clusters_stub.list_aws_node_pools request, options do |result, operation|
|
1482
|
+
result = ::Gapic::Rest::PagedEnumerable.new @aws_clusters_stub, :list_aws_node_pools, "aws_node_pools", request, result, options
|
1483
|
+
yield result, operation if block_given?
|
1484
|
+
return result
|
1485
|
+
end
|
1486
|
+
rescue ::Gapic::Rest::Error => e
|
1487
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1488
|
+
end
|
1489
|
+
|
1490
|
+
##
|
1491
|
+
# Deletes a specific {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool}
|
1492
|
+
# resource.
|
1493
|
+
#
|
1494
|
+
# If successful, the response contains a newly created
|
1495
|
+
# {::Google::Longrunning::Operation Operation} resource that can be
|
1496
|
+
# described to track the status of the operation.
|
1497
|
+
#
|
1498
|
+
# @overload delete_aws_node_pool(request, options = nil)
|
1499
|
+
# Pass arguments to `delete_aws_node_pool` via a request object, either of type
|
1500
|
+
# {::Google::Cloud::GkeMultiCloud::V1::DeleteAwsNodePoolRequest} or an equivalent Hash.
|
1501
|
+
#
|
1502
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::DeleteAwsNodePoolRequest, ::Hash]
|
1503
|
+
# A request object representing the call parameters. Required. To specify no
|
1504
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1505
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1506
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1507
|
+
#
|
1508
|
+
# @overload delete_aws_node_pool(name: nil, validate_only: nil, allow_missing: nil, ignore_errors: nil, etag: nil)
|
1509
|
+
# Pass arguments to `delete_aws_node_pool` via keyword arguments. Note that at
|
1510
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1511
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1512
|
+
#
|
1513
|
+
# @param name [::String]
|
1514
|
+
# Required. The resource name the
|
1515
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool} to delete.
|
1516
|
+
#
|
1517
|
+
# `AwsNodePool` names are formatted as
|
1518
|
+
# `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
|
1519
|
+
#
|
1520
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
1521
|
+
# for more details on Google Cloud resource names.
|
1522
|
+
# @param validate_only [::Boolean]
|
1523
|
+
# If set, only validate the request, but do not actually delete the node
|
1524
|
+
# pool.
|
1525
|
+
# @param allow_missing [::Boolean]
|
1526
|
+
# If set to true, and the
|
1527
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool} resource is not
|
1528
|
+
# found, the request will succeed but no action will be taken on the server
|
1529
|
+
# and a completed {::Google::Longrunning::Operation Operation} will be returned.
|
1530
|
+
#
|
1531
|
+
# Useful for idempotent deletion.
|
1532
|
+
# @param ignore_errors [::Boolean]
|
1533
|
+
# Optional. If set to true, the deletion of
|
1534
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool} resource will
|
1535
|
+
# succeed even if errors occur during deleting in node pool resources. Using
|
1536
|
+
# this parameter may result in orphaned resources in the node pool.
|
1537
|
+
# @param etag [::String]
|
1538
|
+
# The current ETag of the
|
1539
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsNodePool AwsNodePool}.
|
1540
|
+
#
|
1541
|
+
# Allows clients to perform deletions through optimistic concurrency control.
|
1542
|
+
#
|
1543
|
+
# If the provided ETag does not match the current etag of the node pool,
|
1544
|
+
# the request will fail and an ABORTED error will be returned.
|
1545
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1546
|
+
# @yieldparam result [::Gapic::Operation]
|
1547
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1548
|
+
#
|
1549
|
+
# @return [::Gapic::Operation]
|
1550
|
+
#
|
1551
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1552
|
+
#
|
1553
|
+
# @example Basic example
|
1554
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1555
|
+
#
|
1556
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1557
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
1558
|
+
#
|
1559
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1560
|
+
# request = Google::Cloud::GkeMultiCloud::V1::DeleteAwsNodePoolRequest.new
|
1561
|
+
#
|
1562
|
+
# # Call the delete_aws_node_pool method.
|
1563
|
+
# result = client.delete_aws_node_pool request
|
1564
|
+
#
|
1565
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1566
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1567
|
+
# # Here is how to wait for a response.
|
1568
|
+
# result.wait_until_done! timeout: 60
|
1569
|
+
# if result.response?
|
1570
|
+
# p result.response
|
1571
|
+
# else
|
1572
|
+
# puts "No response received."
|
1573
|
+
# end
|
1574
|
+
#
|
1575
|
+
def delete_aws_node_pool request, options = nil
|
1576
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1577
|
+
|
1578
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::DeleteAwsNodePoolRequest
|
1579
|
+
|
1580
|
+
# Converts hash and nil to an options object
|
1581
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1582
|
+
|
1583
|
+
# Customize the options with defaults
|
1584
|
+
call_metadata = @config.rpcs.delete_aws_node_pool.metadata.to_h
|
1585
|
+
|
1586
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1587
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1588
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1589
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
1590
|
+
transports_version_send: [:rest]
|
1591
|
+
|
1592
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1593
|
+
|
1594
|
+
options.apply_defaults timeout: @config.rpcs.delete_aws_node_pool.timeout,
|
1595
|
+
metadata: call_metadata,
|
1596
|
+
retry_policy: @config.rpcs.delete_aws_node_pool.retry_policy
|
1597
|
+
|
1598
|
+
options.apply_defaults timeout: @config.timeout,
|
1599
|
+
metadata: @config.metadata,
|
1600
|
+
retry_policy: @config.retry_policy
|
1601
|
+
|
1602
|
+
@aws_clusters_stub.delete_aws_node_pool request, options do |result, operation|
|
1603
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1604
|
+
yield result, operation if block_given?
|
1605
|
+
return result
|
1606
|
+
end
|
1607
|
+
rescue ::Gapic::Rest::Error => e
|
1608
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1609
|
+
end
|
1610
|
+
|
1611
|
+
##
|
1612
|
+
# Gets the OIDC discovery document for the cluster.
|
1613
|
+
# See the
|
1614
|
+
# [OpenID Connect Discovery 1.0
|
1615
|
+
# specification](https://openid.net/specs/openid-connect-discovery-1_0.html)
|
1616
|
+
# for details.
|
1617
|
+
#
|
1618
|
+
# @overload get_aws_open_id_config(request, options = nil)
|
1619
|
+
# Pass arguments to `get_aws_open_id_config` via a request object, either of type
|
1620
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GetAwsOpenIdConfigRequest} or an equivalent Hash.
|
1621
|
+
#
|
1622
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GetAwsOpenIdConfigRequest, ::Hash]
|
1623
|
+
# A request object representing the call parameters. Required. To specify no
|
1624
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1625
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1626
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1627
|
+
#
|
1628
|
+
# @overload get_aws_open_id_config(aws_cluster: nil)
|
1629
|
+
# Pass arguments to `get_aws_open_id_config` via keyword arguments. Note that at
|
1630
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1631
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1632
|
+
#
|
1633
|
+
# @param aws_cluster [::String]
|
1634
|
+
# Required. The AwsCluster, which owns the OIDC discovery document.
|
1635
|
+
# Format:
|
1636
|
+
# projects/\\{project}/locations/\\{location}/awsClusters/\\{cluster}
|
1637
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1638
|
+
# @yieldparam result [::Google::Cloud::GkeMultiCloud::V1::AwsOpenIdConfig]
|
1639
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1640
|
+
#
|
1641
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::AwsOpenIdConfig]
|
1642
|
+
#
|
1643
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1644
|
+
#
|
1645
|
+
# @example Basic example
|
1646
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1647
|
+
#
|
1648
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1649
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
1650
|
+
#
|
1651
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1652
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GetAwsOpenIdConfigRequest.new
|
1653
|
+
#
|
1654
|
+
# # Call the get_aws_open_id_config method.
|
1655
|
+
# result = client.get_aws_open_id_config request
|
1656
|
+
#
|
1657
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::AwsOpenIdConfig.
|
1658
|
+
# p result
|
1659
|
+
#
|
1660
|
+
def get_aws_open_id_config request, options = nil
|
1661
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1662
|
+
|
1663
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAwsOpenIdConfigRequest
|
1664
|
+
|
1665
|
+
# Converts hash and nil to an options object
|
1666
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1667
|
+
|
1668
|
+
# Customize the options with defaults
|
1669
|
+
call_metadata = @config.rpcs.get_aws_open_id_config.metadata.to_h
|
1670
|
+
|
1671
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1672
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1673
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1674
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
1675
|
+
transports_version_send: [:rest]
|
1676
|
+
|
1677
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1678
|
+
|
1679
|
+
options.apply_defaults timeout: @config.rpcs.get_aws_open_id_config.timeout,
|
1680
|
+
metadata: call_metadata,
|
1681
|
+
retry_policy: @config.rpcs.get_aws_open_id_config.retry_policy
|
1682
|
+
|
1683
|
+
options.apply_defaults timeout: @config.timeout,
|
1684
|
+
metadata: @config.metadata,
|
1685
|
+
retry_policy: @config.retry_policy
|
1686
|
+
|
1687
|
+
@aws_clusters_stub.get_aws_open_id_config request, options do |result, operation|
|
1688
|
+
yield result, operation if block_given?
|
1689
|
+
return result
|
1690
|
+
end
|
1691
|
+
rescue ::Gapic::Rest::Error => e
|
1692
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1693
|
+
end
|
1694
|
+
|
1695
|
+
##
|
1696
|
+
# Gets the public component of the cluster signing keys in
|
1697
|
+
# JSON Web Key format.
|
1698
|
+
#
|
1699
|
+
# @overload get_aws_json_web_keys(request, options = nil)
|
1700
|
+
# Pass arguments to `get_aws_json_web_keys` via a request object, either of type
|
1701
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GetAwsJsonWebKeysRequest} or an equivalent Hash.
|
1702
|
+
#
|
1703
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GetAwsJsonWebKeysRequest, ::Hash]
|
1704
|
+
# A request object representing the call parameters. Required. To specify no
|
1705
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1706
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1707
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1708
|
+
#
|
1709
|
+
# @overload get_aws_json_web_keys(aws_cluster: nil)
|
1710
|
+
# Pass arguments to `get_aws_json_web_keys` via keyword arguments. Note that at
|
1711
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1712
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1713
|
+
#
|
1714
|
+
# @param aws_cluster [::String]
|
1715
|
+
# Required. The AwsCluster, which owns the JsonWebKeys.
|
1716
|
+
# Format:
|
1717
|
+
# projects/\\{project}/locations/\\{location}/awsClusters/\\{cluster}
|
1718
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1719
|
+
# @yieldparam result [::Google::Cloud::GkeMultiCloud::V1::AwsJsonWebKeys]
|
1720
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1721
|
+
#
|
1722
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::AwsJsonWebKeys]
|
1723
|
+
#
|
1724
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1725
|
+
#
|
1726
|
+
# @example Basic example
|
1727
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1728
|
+
#
|
1729
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1730
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
1731
|
+
#
|
1732
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1733
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GetAwsJsonWebKeysRequest.new
|
1734
|
+
#
|
1735
|
+
# # Call the get_aws_json_web_keys method.
|
1736
|
+
# result = client.get_aws_json_web_keys request
|
1737
|
+
#
|
1738
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::AwsJsonWebKeys.
|
1739
|
+
# p result
|
1740
|
+
#
|
1741
|
+
def get_aws_json_web_keys request, options = nil
|
1742
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1743
|
+
|
1744
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAwsJsonWebKeysRequest
|
1745
|
+
|
1746
|
+
# Converts hash and nil to an options object
|
1747
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1748
|
+
|
1749
|
+
# Customize the options with defaults
|
1750
|
+
call_metadata = @config.rpcs.get_aws_json_web_keys.metadata.to_h
|
1751
|
+
|
1752
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1753
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1754
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1755
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
1756
|
+
transports_version_send: [:rest]
|
1757
|
+
|
1758
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1759
|
+
|
1760
|
+
options.apply_defaults timeout: @config.rpcs.get_aws_json_web_keys.timeout,
|
1761
|
+
metadata: call_metadata,
|
1762
|
+
retry_policy: @config.rpcs.get_aws_json_web_keys.retry_policy
|
1763
|
+
|
1764
|
+
options.apply_defaults timeout: @config.timeout,
|
1765
|
+
metadata: @config.metadata,
|
1766
|
+
retry_policy: @config.retry_policy
|
1767
|
+
|
1768
|
+
@aws_clusters_stub.get_aws_json_web_keys request, options do |result, operation|
|
1769
|
+
yield result, operation if block_given?
|
1770
|
+
return result
|
1771
|
+
end
|
1772
|
+
rescue ::Gapic::Rest::Error => e
|
1773
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1774
|
+
end
|
1775
|
+
|
1776
|
+
##
|
1777
|
+
# Returns information, such as supported AWS regions and Kubernetes
|
1778
|
+
# versions, on a given Google Cloud location.
|
1779
|
+
#
|
1780
|
+
# @overload get_aws_server_config(request, options = nil)
|
1781
|
+
# Pass arguments to `get_aws_server_config` via a request object, either of type
|
1782
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GetAwsServerConfigRequest} or an equivalent Hash.
|
1783
|
+
#
|
1784
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GetAwsServerConfigRequest, ::Hash]
|
1785
|
+
# A request object representing the call parameters. Required. To specify no
|
1786
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1787
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1788
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1789
|
+
#
|
1790
|
+
# @overload get_aws_server_config(name: nil)
|
1791
|
+
# Pass arguments to `get_aws_server_config` via keyword arguments. Note that at
|
1792
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1793
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1794
|
+
#
|
1795
|
+
# @param name [::String]
|
1796
|
+
# Required. The name of the
|
1797
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsServerConfig AwsServerConfig} resource
|
1798
|
+
# to describe.
|
1799
|
+
#
|
1800
|
+
# `AwsServerConfig` names are formatted as
|
1801
|
+
# `projects/<project-id>/locations/<region>/awsServerConfig`.
|
1802
|
+
#
|
1803
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
1804
|
+
# for more details on Google Cloud resource names.
|
1805
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1806
|
+
# @yieldparam result [::Google::Cloud::GkeMultiCloud::V1::AwsServerConfig]
|
1807
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1808
|
+
#
|
1809
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::AwsServerConfig]
|
1810
|
+
#
|
1811
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1812
|
+
#
|
1813
|
+
# @example Basic example
|
1814
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1815
|
+
#
|
1816
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1817
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
1818
|
+
#
|
1819
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1820
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GetAwsServerConfigRequest.new
|
1821
|
+
#
|
1822
|
+
# # Call the get_aws_server_config method.
|
1823
|
+
# result = client.get_aws_server_config request
|
1824
|
+
#
|
1825
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::AwsServerConfig.
|
1826
|
+
# p result
|
1827
|
+
#
|
1828
|
+
def get_aws_server_config request, options = nil
|
1829
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1830
|
+
|
1831
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAwsServerConfigRequest
|
1832
|
+
|
1833
|
+
# Converts hash and nil to an options object
|
1834
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1835
|
+
|
1836
|
+
# Customize the options with defaults
|
1837
|
+
call_metadata = @config.rpcs.get_aws_server_config.metadata.to_h
|
1838
|
+
|
1839
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1840
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1841
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1842
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION,
|
1843
|
+
transports_version_send: [:rest]
|
1844
|
+
|
1845
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1846
|
+
|
1847
|
+
options.apply_defaults timeout: @config.rpcs.get_aws_server_config.timeout,
|
1848
|
+
metadata: call_metadata,
|
1849
|
+
retry_policy: @config.rpcs.get_aws_server_config.retry_policy
|
1850
|
+
|
1851
|
+
options.apply_defaults timeout: @config.timeout,
|
1852
|
+
metadata: @config.metadata,
|
1853
|
+
retry_policy: @config.retry_policy
|
1854
|
+
|
1855
|
+
@aws_clusters_stub.get_aws_server_config request, options do |result, operation|
|
1856
|
+
yield result, operation if block_given?
|
1857
|
+
return result
|
1858
|
+
end
|
1859
|
+
rescue ::Gapic::Rest::Error => e
|
1860
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1861
|
+
end
|
1862
|
+
|
1863
|
+
##
|
1864
|
+
# Configuration class for the AwsClusters REST API.
|
1865
|
+
#
|
1866
|
+
# This class represents the configuration for AwsClusters REST,
|
1867
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1868
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1869
|
+
# applied individually to specific RPCs. See
|
1870
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client::Configuration::Rpcs}
|
1871
|
+
# for a list of RPCs that can be configured independently.
|
1872
|
+
#
|
1873
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1874
|
+
# on construction.
|
1875
|
+
#
|
1876
|
+
# @example
|
1877
|
+
#
|
1878
|
+
# # Modify the global config, setting the timeout for
|
1879
|
+
# # create_aws_cluster to 20 seconds,
|
1880
|
+
# # and all remaining timeouts to 10 seconds.
|
1881
|
+
# ::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.configure do |config|
|
1882
|
+
# config.timeout = 10.0
|
1883
|
+
# config.rpcs.create_aws_cluster.timeout = 20.0
|
1884
|
+
# end
|
1885
|
+
#
|
1886
|
+
# # Apply the above configuration only to a new client.
|
1887
|
+
# client = ::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new do |config|
|
1888
|
+
# config.timeout = 10.0
|
1889
|
+
# config.rpcs.create_aws_cluster.timeout = 20.0
|
1890
|
+
# end
|
1891
|
+
#
|
1892
|
+
# @!attribute [rw] endpoint
|
1893
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
1894
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
1895
|
+
# @return [::String,nil]
|
1896
|
+
# @!attribute [rw] credentials
|
1897
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1898
|
+
# * (`String`) The path to a service account key file in JSON format
|
1899
|
+
# * (`Hash`) A service account key as a Hash
|
1900
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1901
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1902
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1903
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1904
|
+
# * (`nil`) indicating no credentials
|
1905
|
+
# @return [::Object]
|
1906
|
+
# @!attribute [rw] scope
|
1907
|
+
# The OAuth scopes
|
1908
|
+
# @return [::Array<::String>]
|
1909
|
+
# @!attribute [rw] lib_name
|
1910
|
+
# The library name as recorded in instrumentation and logging
|
1911
|
+
# @return [::String]
|
1912
|
+
# @!attribute [rw] lib_version
|
1913
|
+
# The library version as recorded in instrumentation and logging
|
1914
|
+
# @return [::String]
|
1915
|
+
# @!attribute [rw] timeout
|
1916
|
+
# The call timeout in seconds.
|
1917
|
+
# @return [::Numeric]
|
1918
|
+
# @!attribute [rw] metadata
|
1919
|
+
# Additional headers to be sent with the call.
|
1920
|
+
# @return [::Hash{::Symbol=>::String}]
|
1921
|
+
# @!attribute [rw] retry_policy
|
1922
|
+
# The retry policy. The value is a hash with the following keys:
|
1923
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1924
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1925
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1926
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1927
|
+
# trigger a retry.
|
1928
|
+
# @return [::Hash]
|
1929
|
+
# @!attribute [rw] quota_project
|
1930
|
+
# A separate project against which to charge quota.
|
1931
|
+
# @return [::String]
|
1932
|
+
# @!attribute [rw] universe_domain
|
1933
|
+
# The universe domain within which to make requests. This determines the
|
1934
|
+
# default endpoint URL. The default value of nil uses the environment
|
1935
|
+
# universe (usually the default "googleapis.com" universe).
|
1936
|
+
# @return [::String,nil]
|
1937
|
+
#
|
1938
|
+
class Configuration
|
1939
|
+
extend ::Gapic::Config
|
1940
|
+
|
1941
|
+
# @private
|
1942
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
1943
|
+
DEFAULT_ENDPOINT = "gkemulticloud.googleapis.com"
|
1944
|
+
|
1945
|
+
config_attr :endpoint, nil, ::String, nil
|
1946
|
+
config_attr :credentials, nil do |value|
|
1947
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1948
|
+
allowed.any? { |klass| klass === value }
|
1949
|
+
end
|
1950
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1951
|
+
config_attr :lib_name, nil, ::String, nil
|
1952
|
+
config_attr :lib_version, nil, ::String, nil
|
1953
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1954
|
+
config_attr :metadata, nil, ::Hash, nil
|
1955
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1956
|
+
config_attr :quota_project, nil, ::String, nil
|
1957
|
+
config_attr :universe_domain, nil, ::String, nil
|
1958
|
+
|
1959
|
+
# @private
|
1960
|
+
def initialize parent_config = nil
|
1961
|
+
@parent_config = parent_config unless parent_config.nil?
|
1962
|
+
|
1963
|
+
yield self if block_given?
|
1964
|
+
end
|
1965
|
+
|
1966
|
+
##
|
1967
|
+
# Configurations for individual RPCs
|
1968
|
+
# @return [Rpcs]
|
1969
|
+
#
|
1970
|
+
def rpcs
|
1971
|
+
@rpcs ||= begin
|
1972
|
+
parent_rpcs = nil
|
1973
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1974
|
+
Rpcs.new parent_rpcs
|
1975
|
+
end
|
1976
|
+
end
|
1977
|
+
|
1978
|
+
##
|
1979
|
+
# Configuration RPC class for the AwsClusters API.
|
1980
|
+
#
|
1981
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1982
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1983
|
+
# the following configuration fields:
|
1984
|
+
#
|
1985
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1986
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
1987
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1988
|
+
# include the following keys:
|
1989
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1990
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1991
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1992
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1993
|
+
# trigger a retry.
|
1994
|
+
#
|
1995
|
+
class Rpcs
|
1996
|
+
##
|
1997
|
+
# RPC-specific configuration for `create_aws_cluster`
|
1998
|
+
# @return [::Gapic::Config::Method]
|
1999
|
+
#
|
2000
|
+
attr_reader :create_aws_cluster
|
2001
|
+
##
|
2002
|
+
# RPC-specific configuration for `update_aws_cluster`
|
2003
|
+
# @return [::Gapic::Config::Method]
|
2004
|
+
#
|
2005
|
+
attr_reader :update_aws_cluster
|
2006
|
+
##
|
2007
|
+
# RPC-specific configuration for `get_aws_cluster`
|
2008
|
+
# @return [::Gapic::Config::Method]
|
2009
|
+
#
|
2010
|
+
attr_reader :get_aws_cluster
|
2011
|
+
##
|
2012
|
+
# RPC-specific configuration for `list_aws_clusters`
|
2013
|
+
# @return [::Gapic::Config::Method]
|
2014
|
+
#
|
2015
|
+
attr_reader :list_aws_clusters
|
2016
|
+
##
|
2017
|
+
# RPC-specific configuration for `delete_aws_cluster`
|
2018
|
+
# @return [::Gapic::Config::Method]
|
2019
|
+
#
|
2020
|
+
attr_reader :delete_aws_cluster
|
2021
|
+
##
|
2022
|
+
# RPC-specific configuration for `generate_aws_cluster_agent_token`
|
2023
|
+
# @return [::Gapic::Config::Method]
|
2024
|
+
#
|
2025
|
+
attr_reader :generate_aws_cluster_agent_token
|
2026
|
+
##
|
2027
|
+
# RPC-specific configuration for `generate_aws_access_token`
|
2028
|
+
# @return [::Gapic::Config::Method]
|
2029
|
+
#
|
2030
|
+
attr_reader :generate_aws_access_token
|
2031
|
+
##
|
2032
|
+
# RPC-specific configuration for `create_aws_node_pool`
|
2033
|
+
# @return [::Gapic::Config::Method]
|
2034
|
+
#
|
2035
|
+
attr_reader :create_aws_node_pool
|
2036
|
+
##
|
2037
|
+
# RPC-specific configuration for `update_aws_node_pool`
|
2038
|
+
# @return [::Gapic::Config::Method]
|
2039
|
+
#
|
2040
|
+
attr_reader :update_aws_node_pool
|
2041
|
+
##
|
2042
|
+
# RPC-specific configuration for `rollback_aws_node_pool_update`
|
2043
|
+
# @return [::Gapic::Config::Method]
|
2044
|
+
#
|
2045
|
+
attr_reader :rollback_aws_node_pool_update
|
2046
|
+
##
|
2047
|
+
# RPC-specific configuration for `get_aws_node_pool`
|
2048
|
+
# @return [::Gapic::Config::Method]
|
2049
|
+
#
|
2050
|
+
attr_reader :get_aws_node_pool
|
2051
|
+
##
|
2052
|
+
# RPC-specific configuration for `list_aws_node_pools`
|
2053
|
+
# @return [::Gapic::Config::Method]
|
2054
|
+
#
|
2055
|
+
attr_reader :list_aws_node_pools
|
2056
|
+
##
|
2057
|
+
# RPC-specific configuration for `delete_aws_node_pool`
|
2058
|
+
# @return [::Gapic::Config::Method]
|
2059
|
+
#
|
2060
|
+
attr_reader :delete_aws_node_pool
|
2061
|
+
##
|
2062
|
+
# RPC-specific configuration for `get_aws_open_id_config`
|
2063
|
+
# @return [::Gapic::Config::Method]
|
2064
|
+
#
|
2065
|
+
attr_reader :get_aws_open_id_config
|
2066
|
+
##
|
2067
|
+
# RPC-specific configuration for `get_aws_json_web_keys`
|
2068
|
+
# @return [::Gapic::Config::Method]
|
2069
|
+
#
|
2070
|
+
attr_reader :get_aws_json_web_keys
|
2071
|
+
##
|
2072
|
+
# RPC-specific configuration for `get_aws_server_config`
|
2073
|
+
# @return [::Gapic::Config::Method]
|
2074
|
+
#
|
2075
|
+
attr_reader :get_aws_server_config
|
2076
|
+
|
2077
|
+
# @private
|
2078
|
+
def initialize parent_rpcs = nil
|
2079
|
+
create_aws_cluster_config = parent_rpcs.create_aws_cluster if parent_rpcs.respond_to? :create_aws_cluster
|
2080
|
+
@create_aws_cluster = ::Gapic::Config::Method.new create_aws_cluster_config
|
2081
|
+
update_aws_cluster_config = parent_rpcs.update_aws_cluster if parent_rpcs.respond_to? :update_aws_cluster
|
2082
|
+
@update_aws_cluster = ::Gapic::Config::Method.new update_aws_cluster_config
|
2083
|
+
get_aws_cluster_config = parent_rpcs.get_aws_cluster if parent_rpcs.respond_to? :get_aws_cluster
|
2084
|
+
@get_aws_cluster = ::Gapic::Config::Method.new get_aws_cluster_config
|
2085
|
+
list_aws_clusters_config = parent_rpcs.list_aws_clusters if parent_rpcs.respond_to? :list_aws_clusters
|
2086
|
+
@list_aws_clusters = ::Gapic::Config::Method.new list_aws_clusters_config
|
2087
|
+
delete_aws_cluster_config = parent_rpcs.delete_aws_cluster if parent_rpcs.respond_to? :delete_aws_cluster
|
2088
|
+
@delete_aws_cluster = ::Gapic::Config::Method.new delete_aws_cluster_config
|
2089
|
+
generate_aws_cluster_agent_token_config = parent_rpcs.generate_aws_cluster_agent_token if parent_rpcs.respond_to? :generate_aws_cluster_agent_token
|
2090
|
+
@generate_aws_cluster_agent_token = ::Gapic::Config::Method.new generate_aws_cluster_agent_token_config
|
2091
|
+
generate_aws_access_token_config = parent_rpcs.generate_aws_access_token if parent_rpcs.respond_to? :generate_aws_access_token
|
2092
|
+
@generate_aws_access_token = ::Gapic::Config::Method.new generate_aws_access_token_config
|
2093
|
+
create_aws_node_pool_config = parent_rpcs.create_aws_node_pool if parent_rpcs.respond_to? :create_aws_node_pool
|
2094
|
+
@create_aws_node_pool = ::Gapic::Config::Method.new create_aws_node_pool_config
|
2095
|
+
update_aws_node_pool_config = parent_rpcs.update_aws_node_pool if parent_rpcs.respond_to? :update_aws_node_pool
|
2096
|
+
@update_aws_node_pool = ::Gapic::Config::Method.new update_aws_node_pool_config
|
2097
|
+
rollback_aws_node_pool_update_config = parent_rpcs.rollback_aws_node_pool_update if parent_rpcs.respond_to? :rollback_aws_node_pool_update
|
2098
|
+
@rollback_aws_node_pool_update = ::Gapic::Config::Method.new rollback_aws_node_pool_update_config
|
2099
|
+
get_aws_node_pool_config = parent_rpcs.get_aws_node_pool if parent_rpcs.respond_to? :get_aws_node_pool
|
2100
|
+
@get_aws_node_pool = ::Gapic::Config::Method.new get_aws_node_pool_config
|
2101
|
+
list_aws_node_pools_config = parent_rpcs.list_aws_node_pools if parent_rpcs.respond_to? :list_aws_node_pools
|
2102
|
+
@list_aws_node_pools = ::Gapic::Config::Method.new list_aws_node_pools_config
|
2103
|
+
delete_aws_node_pool_config = parent_rpcs.delete_aws_node_pool if parent_rpcs.respond_to? :delete_aws_node_pool
|
2104
|
+
@delete_aws_node_pool = ::Gapic::Config::Method.new delete_aws_node_pool_config
|
2105
|
+
get_aws_open_id_config_config = parent_rpcs.get_aws_open_id_config if parent_rpcs.respond_to? :get_aws_open_id_config
|
2106
|
+
@get_aws_open_id_config = ::Gapic::Config::Method.new get_aws_open_id_config_config
|
2107
|
+
get_aws_json_web_keys_config = parent_rpcs.get_aws_json_web_keys if parent_rpcs.respond_to? :get_aws_json_web_keys
|
2108
|
+
@get_aws_json_web_keys = ::Gapic::Config::Method.new get_aws_json_web_keys_config
|
2109
|
+
get_aws_server_config_config = parent_rpcs.get_aws_server_config if parent_rpcs.respond_to? :get_aws_server_config
|
2110
|
+
@get_aws_server_config = ::Gapic::Config::Method.new get_aws_server_config_config
|
2111
|
+
|
2112
|
+
yield self if block_given?
|
2113
|
+
end
|
2114
|
+
end
|
2115
|
+
end
|
2116
|
+
end
|
2117
|
+
end
|
2118
|
+
end
|
2119
|
+
end
|
2120
|
+
end
|
2121
|
+
end
|
2122
|
+
end
|