google-cloud-container-v1beta1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +71 -0
- data/lib/google-cloud-container-v1beta1.rb +21 -0
- data/lib/google/cloud/common_resources_pb.rb +15 -0
- data/lib/google/cloud/container/v1beta1.rb +35 -0
- data/lib/google/cloud/container/v1beta1/cluster_manager.rb +48 -0
- data/lib/google/cloud/container/v1beta1/cluster_manager/client.rb +3284 -0
- data/lib/google/cloud/container/v1beta1/cluster_manager/credentials.rb +51 -0
- data/lib/google/cloud/container/v1beta1/version.rb +28 -0
- data/lib/google/container/v1beta1/cluster_service_pb.rb +798 -0
- data/lib/google/container/v1beta1/cluster_service_services_pb.rb +132 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/container/v1beta1/cluster_service.rb +2854 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- metadata +174 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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
|
+
# This gem does not autoload during Bundler.require. To load this gem,
|
20
|
+
# issue explicit require statements for the packages desired, e.g.:
|
21
|
+
# require "google/cloud/container/v1beta1"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/common_resources.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/resource_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_file("google/cloud/common_resources.proto", :syntax => :proto3) do
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module Google
|
13
|
+
module Cloud
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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/container/v1beta1/cluster_manager"
|
20
|
+
require "google/cloud/container/v1beta1/version"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Container
|
25
|
+
##
|
26
|
+
# To load this package, including all its services, and instantiate a client:
|
27
|
+
#
|
28
|
+
# require "google/cloud/container/v1beta1"
|
29
|
+
# client = ::Google::Cloud::Container::V1beta1::ClusterManager::Client.new
|
30
|
+
#
|
31
|
+
module V1beta1
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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 "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/container/v1beta1/version"
|
24
|
+
|
25
|
+
require "google/cloud/container/v1beta1/cluster_manager/credentials"
|
26
|
+
require "google/cloud/container/v1beta1/cluster_manager/client"
|
27
|
+
|
28
|
+
module Google
|
29
|
+
module Cloud
|
30
|
+
module Container
|
31
|
+
module V1beta1
|
32
|
+
##
|
33
|
+
# Google Kubernetes Engine Cluster Manager v1beta1
|
34
|
+
#
|
35
|
+
# To load this service and instantiate a client:
|
36
|
+
#
|
37
|
+
# require "google/cloud/container/v1beta1/cluster_manager"
|
38
|
+
# client = ::Google::Cloud::Container::V1beta1::ClusterManager::Client.new
|
39
|
+
#
|
40
|
+
module ClusterManager
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
helper_path = ::File.join __dir__, "cluster_manager", "helpers.rb"
|
48
|
+
require "google/cloud/container/v1beta1/cluster_manager/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,3284 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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/container/v1beta1/cluster_service_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Container
|
25
|
+
module V1beta1
|
26
|
+
module ClusterManager
|
27
|
+
##
|
28
|
+
# Client for the ClusterManager service.
|
29
|
+
#
|
30
|
+
# Google Kubernetes Engine Cluster Manager v1beta1
|
31
|
+
#
|
32
|
+
class Client
|
33
|
+
# @private
|
34
|
+
attr_reader :cluster_manager_stub
|
35
|
+
|
36
|
+
##
|
37
|
+
# Configure the ClusterManager Client class.
|
38
|
+
#
|
39
|
+
# See {::Google::Cloud::Container::V1beta1::ClusterManager::Client::Configuration}
|
40
|
+
# for a description of the configuration fields.
|
41
|
+
#
|
42
|
+
# ## Example
|
43
|
+
#
|
44
|
+
# To modify the configuration for all ClusterManager clients:
|
45
|
+
#
|
46
|
+
# ::Google::Cloud::Container::V1beta1::ClusterManager::Client.configure do |config|
|
47
|
+
# config.timeout = 10.0
|
48
|
+
# end
|
49
|
+
#
|
50
|
+
# @yield [config] Configure the Client client.
|
51
|
+
# @yieldparam config [Client::Configuration]
|
52
|
+
#
|
53
|
+
# @return [Client::Configuration]
|
54
|
+
#
|
55
|
+
def self.configure
|
56
|
+
@configure ||= begin
|
57
|
+
namespace = ["Google", "Cloud", "Container", "V1beta1"]
|
58
|
+
parent_config = while namespace.any?
|
59
|
+
parent_name = namespace.join "::"
|
60
|
+
parent_const = const_get parent_name
|
61
|
+
break parent_const.configure if parent_const&.respond_to? :configure
|
62
|
+
namespace.pop
|
63
|
+
end
|
64
|
+
default_config = Client::Configuration.new parent_config
|
65
|
+
|
66
|
+
default_config.rpcs.list_clusters.timeout = 20.0
|
67
|
+
default_config.rpcs.list_clusters.retry_policy = {
|
68
|
+
initial_delay: 0.1,
|
69
|
+
max_delay: 60.0,
|
70
|
+
multiplier: 1.3,
|
71
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
72
|
+
}
|
73
|
+
|
74
|
+
default_config.rpcs.get_cluster.timeout = 20.0
|
75
|
+
default_config.rpcs.get_cluster.retry_policy = {
|
76
|
+
initial_delay: 0.1,
|
77
|
+
max_delay: 60.0,
|
78
|
+
multiplier: 1.3,
|
79
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
80
|
+
}
|
81
|
+
|
82
|
+
default_config.rpcs.create_cluster.timeout = 45.0
|
83
|
+
|
84
|
+
default_config.rpcs.update_cluster.timeout = 45.0
|
85
|
+
|
86
|
+
default_config.rpcs.update_node_pool.timeout = 45.0
|
87
|
+
|
88
|
+
default_config.rpcs.set_node_pool_autoscaling.timeout = 45.0
|
89
|
+
|
90
|
+
default_config.rpcs.set_logging_service.timeout = 45.0
|
91
|
+
|
92
|
+
default_config.rpcs.set_monitoring_service.timeout = 45.0
|
93
|
+
|
94
|
+
default_config.rpcs.set_addons_config.timeout = 45.0
|
95
|
+
|
96
|
+
default_config.rpcs.set_locations.timeout = 45.0
|
97
|
+
|
98
|
+
default_config.rpcs.update_master.timeout = 45.0
|
99
|
+
|
100
|
+
default_config.rpcs.set_master_auth.timeout = 45.0
|
101
|
+
|
102
|
+
default_config.rpcs.delete_cluster.timeout = 20.0
|
103
|
+
default_config.rpcs.delete_cluster.retry_policy = {
|
104
|
+
initial_delay: 0.1,
|
105
|
+
max_delay: 60.0,
|
106
|
+
multiplier: 1.3,
|
107
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
108
|
+
}
|
109
|
+
|
110
|
+
default_config.rpcs.list_operations.timeout = 20.0
|
111
|
+
default_config.rpcs.list_operations.retry_policy = {
|
112
|
+
initial_delay: 0.1,
|
113
|
+
max_delay: 60.0,
|
114
|
+
multiplier: 1.3,
|
115
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
116
|
+
}
|
117
|
+
|
118
|
+
default_config.rpcs.get_operation.timeout = 20.0
|
119
|
+
default_config.rpcs.get_operation.retry_policy = {
|
120
|
+
initial_delay: 0.1,
|
121
|
+
max_delay: 60.0,
|
122
|
+
multiplier: 1.3,
|
123
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
124
|
+
}
|
125
|
+
|
126
|
+
default_config.rpcs.cancel_operation.timeout = 45.0
|
127
|
+
|
128
|
+
default_config.rpcs.get_server_config.timeout = 20.0
|
129
|
+
default_config.rpcs.get_server_config.retry_policy = {
|
130
|
+
initial_delay: 0.1,
|
131
|
+
max_delay: 60.0,
|
132
|
+
multiplier: 1.3,
|
133
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
134
|
+
}
|
135
|
+
|
136
|
+
default_config.rpcs.list_node_pools.timeout = 20.0
|
137
|
+
default_config.rpcs.list_node_pools.retry_policy = {
|
138
|
+
initial_delay: 0.1,
|
139
|
+
max_delay: 60.0,
|
140
|
+
multiplier: 1.3,
|
141
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
142
|
+
}
|
143
|
+
|
144
|
+
default_config.rpcs.get_node_pool.timeout = 20.0
|
145
|
+
default_config.rpcs.get_node_pool.retry_policy = {
|
146
|
+
initial_delay: 0.1,
|
147
|
+
max_delay: 60.0,
|
148
|
+
multiplier: 1.3,
|
149
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
150
|
+
}
|
151
|
+
|
152
|
+
default_config.rpcs.create_node_pool.timeout = 45.0
|
153
|
+
|
154
|
+
default_config.rpcs.delete_node_pool.timeout = 20.0
|
155
|
+
default_config.rpcs.delete_node_pool.retry_policy = {
|
156
|
+
initial_delay: 0.1,
|
157
|
+
max_delay: 60.0,
|
158
|
+
multiplier: 1.3,
|
159
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
160
|
+
}
|
161
|
+
|
162
|
+
default_config.rpcs.rollback_node_pool_upgrade.timeout = 45.0
|
163
|
+
|
164
|
+
default_config.rpcs.set_node_pool_management.timeout = 45.0
|
165
|
+
|
166
|
+
default_config.rpcs.set_labels.timeout = 45.0
|
167
|
+
|
168
|
+
default_config.rpcs.set_legacy_abac.timeout = 45.0
|
169
|
+
|
170
|
+
default_config.rpcs.start_ip_rotation.timeout = 45.0
|
171
|
+
|
172
|
+
default_config.rpcs.complete_ip_rotation.timeout = 45.0
|
173
|
+
|
174
|
+
default_config.rpcs.set_node_pool_size.timeout = 45.0
|
175
|
+
|
176
|
+
default_config.rpcs.set_network_policy.timeout = 45.0
|
177
|
+
|
178
|
+
default_config.rpcs.set_maintenance_policy.timeout = 45.0
|
179
|
+
|
180
|
+
default_config.rpcs.list_usable_subnetworks.timeout = 20.0
|
181
|
+
default_config.rpcs.list_usable_subnetworks.retry_policy = {
|
182
|
+
initial_delay: 0.1,
|
183
|
+
max_delay: 60.0,
|
184
|
+
multiplier: 1.3,
|
185
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
186
|
+
}
|
187
|
+
|
188
|
+
default_config.rpcs.list_locations.timeout = 20.0
|
189
|
+
default_config.rpcs.list_locations.retry_policy = {
|
190
|
+
initial_delay: 0.1,
|
191
|
+
max_delay: 60.0,
|
192
|
+
multiplier: 1.3,
|
193
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
194
|
+
}
|
195
|
+
|
196
|
+
default_config
|
197
|
+
end
|
198
|
+
yield @configure if block_given?
|
199
|
+
@configure
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# Configure the ClusterManager Client instance.
|
204
|
+
#
|
205
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
206
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
207
|
+
# should be made on {Client.configure}.
|
208
|
+
#
|
209
|
+
# See {::Google::Cloud::Container::V1beta1::ClusterManager::Client::Configuration}
|
210
|
+
# for a description of the configuration fields.
|
211
|
+
#
|
212
|
+
# @yield [config] Configure the Client client.
|
213
|
+
# @yieldparam config [Client::Configuration]
|
214
|
+
#
|
215
|
+
# @return [Client::Configuration]
|
216
|
+
#
|
217
|
+
def configure
|
218
|
+
yield @config if block_given?
|
219
|
+
@config
|
220
|
+
end
|
221
|
+
|
222
|
+
##
|
223
|
+
# Create a new ClusterManager client object.
|
224
|
+
#
|
225
|
+
# ## Examples
|
226
|
+
#
|
227
|
+
# To create a new ClusterManager client with the default
|
228
|
+
# configuration:
|
229
|
+
#
|
230
|
+
# client = ::Google::Cloud::Container::V1beta1::ClusterManager::Client.new
|
231
|
+
#
|
232
|
+
# To create a new ClusterManager client with a custom
|
233
|
+
# configuration:
|
234
|
+
#
|
235
|
+
# client = ::Google::Cloud::Container::V1beta1::ClusterManager::Client.new do |config|
|
236
|
+
# config.timeout = 10.0
|
237
|
+
# end
|
238
|
+
#
|
239
|
+
# @yield [config] Configure the ClusterManager client.
|
240
|
+
# @yieldparam config [Client::Configuration]
|
241
|
+
#
|
242
|
+
def initialize
|
243
|
+
# These require statements are intentionally placed here to initialize
|
244
|
+
# the gRPC module only when it's required.
|
245
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
246
|
+
require "gapic/grpc"
|
247
|
+
require "google/container/v1beta1/cluster_service_services_pb"
|
248
|
+
|
249
|
+
# Create the configuration object
|
250
|
+
@config = Configuration.new Client.configure
|
251
|
+
|
252
|
+
# Yield the configuration if needed
|
253
|
+
yield @config if block_given?
|
254
|
+
|
255
|
+
# Create credentials
|
256
|
+
credentials = @config.credentials
|
257
|
+
credentials ||= Credentials.default scope: @config.scope
|
258
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
259
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
260
|
+
end
|
261
|
+
@quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
|
262
|
+
|
263
|
+
@cluster_manager_stub = ::Gapic::ServiceStub.new(
|
264
|
+
::Google::Cloud::Container::V1beta1::ClusterManager::Stub,
|
265
|
+
credentials: credentials,
|
266
|
+
endpoint: @config.endpoint,
|
267
|
+
channel_args: @config.channel_args,
|
268
|
+
interceptors: @config.interceptors
|
269
|
+
)
|
270
|
+
end
|
271
|
+
|
272
|
+
# Service calls
|
273
|
+
|
274
|
+
##
|
275
|
+
# Lists all clusters owned by a project in either the specified zone or all
|
276
|
+
# zones.
|
277
|
+
#
|
278
|
+
# @overload list_clusters(request, options = nil)
|
279
|
+
# Pass arguments to `list_clusters` via a request object, either of type
|
280
|
+
# {::Google::Cloud::Container::V1beta1::ListClustersRequest} or an equivalent Hash.
|
281
|
+
#
|
282
|
+
# @param request [::Google::Cloud::Container::V1beta1::ListClustersRequest, ::Hash]
|
283
|
+
# A request object representing the call parameters. Required. To specify no
|
284
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
285
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
286
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
287
|
+
#
|
288
|
+
# @overload list_clusters(project_id: nil, zone: nil, parent: nil)
|
289
|
+
# Pass arguments to `list_clusters` via keyword arguments. Note that at
|
290
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
291
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
292
|
+
#
|
293
|
+
# @param project_id [::String]
|
294
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
295
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
296
|
+
# This field has been deprecated and replaced by the parent field.
|
297
|
+
# @param zone [::String]
|
298
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
299
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
300
|
+
# resides, or "-" for all zones.
|
301
|
+
# This field has been deprecated and replaced by the parent field.
|
302
|
+
# @param parent [::String]
|
303
|
+
# The parent (project and location) where the clusters will be listed.
|
304
|
+
# Specified in the format `projects/*/locations/*`.
|
305
|
+
# Location "-" matches all zones and all regions.
|
306
|
+
#
|
307
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
308
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::ListClustersResponse]
|
309
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
310
|
+
#
|
311
|
+
# @return [::Google::Cloud::Container::V1beta1::ListClustersResponse]
|
312
|
+
#
|
313
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
314
|
+
#
|
315
|
+
def list_clusters request, options = nil
|
316
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
317
|
+
|
318
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::ListClustersRequest
|
319
|
+
|
320
|
+
# Converts hash and nil to an options object
|
321
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
322
|
+
|
323
|
+
# Customize the options with defaults
|
324
|
+
metadata = @config.rpcs.list_clusters.metadata.to_h
|
325
|
+
|
326
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
327
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
328
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
329
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
330
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
331
|
+
|
332
|
+
header_params = {
|
333
|
+
"parent" => request.parent
|
334
|
+
}
|
335
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
336
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
337
|
+
|
338
|
+
options.apply_defaults timeout: @config.rpcs.list_clusters.timeout,
|
339
|
+
metadata: metadata,
|
340
|
+
retry_policy: @config.rpcs.list_clusters.retry_policy
|
341
|
+
options.apply_defaults metadata: @config.metadata,
|
342
|
+
retry_policy: @config.retry_policy
|
343
|
+
|
344
|
+
@cluster_manager_stub.call_rpc :list_clusters, request, options: options do |response, operation|
|
345
|
+
yield response, operation if block_given?
|
346
|
+
return response
|
347
|
+
end
|
348
|
+
rescue ::GRPC::BadStatus => e
|
349
|
+
raise ::Google::Cloud::Error.from_error(e)
|
350
|
+
end
|
351
|
+
|
352
|
+
##
|
353
|
+
# Gets the details for a specific cluster.
|
354
|
+
#
|
355
|
+
# @overload get_cluster(request, options = nil)
|
356
|
+
# Pass arguments to `get_cluster` via a request object, either of type
|
357
|
+
# {::Google::Cloud::Container::V1beta1::GetClusterRequest} or an equivalent Hash.
|
358
|
+
#
|
359
|
+
# @param request [::Google::Cloud::Container::V1beta1::GetClusterRequest, ::Hash]
|
360
|
+
# A request object representing the call parameters. Required. To specify no
|
361
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
362
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
363
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
364
|
+
#
|
365
|
+
# @overload get_cluster(project_id: nil, zone: nil, cluster_id: nil, name: nil)
|
366
|
+
# Pass arguments to `get_cluster` via keyword arguments. Note that at
|
367
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
368
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
369
|
+
#
|
370
|
+
# @param project_id [::String]
|
371
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
372
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
373
|
+
# This field has been deprecated and replaced by the name field.
|
374
|
+
# @param zone [::String]
|
375
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
376
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
377
|
+
# resides.
|
378
|
+
# This field has been deprecated and replaced by the name field.
|
379
|
+
# @param cluster_id [::String]
|
380
|
+
# Required. Deprecated. The name of the cluster to retrieve.
|
381
|
+
# This field has been deprecated and replaced by the name field.
|
382
|
+
# @param name [::String]
|
383
|
+
# The name (project, location, cluster) of the cluster to retrieve.
|
384
|
+
# Specified in the format `projects/*/locations/*/clusters/*`.
|
385
|
+
#
|
386
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
387
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Cluster]
|
388
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
389
|
+
#
|
390
|
+
# @return [::Google::Cloud::Container::V1beta1::Cluster]
|
391
|
+
#
|
392
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
393
|
+
#
|
394
|
+
def get_cluster request, options = nil
|
395
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
396
|
+
|
397
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::GetClusterRequest
|
398
|
+
|
399
|
+
# Converts hash and nil to an options object
|
400
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
401
|
+
|
402
|
+
# Customize the options with defaults
|
403
|
+
metadata = @config.rpcs.get_cluster.metadata.to_h
|
404
|
+
|
405
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
406
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
407
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
408
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
409
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
410
|
+
|
411
|
+
header_params = {
|
412
|
+
"name" => request.name
|
413
|
+
}
|
414
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
415
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
416
|
+
|
417
|
+
options.apply_defaults timeout: @config.rpcs.get_cluster.timeout,
|
418
|
+
metadata: metadata,
|
419
|
+
retry_policy: @config.rpcs.get_cluster.retry_policy
|
420
|
+
options.apply_defaults metadata: @config.metadata,
|
421
|
+
retry_policy: @config.retry_policy
|
422
|
+
|
423
|
+
@cluster_manager_stub.call_rpc :get_cluster, request, options: options do |response, operation|
|
424
|
+
yield response, operation if block_given?
|
425
|
+
return response
|
426
|
+
end
|
427
|
+
rescue ::GRPC::BadStatus => e
|
428
|
+
raise ::Google::Cloud::Error.from_error(e)
|
429
|
+
end
|
430
|
+
|
431
|
+
##
|
432
|
+
# Creates a cluster, consisting of the specified number and type of Google
|
433
|
+
# Compute Engine instances.
|
434
|
+
#
|
435
|
+
# By default, the cluster is created in the project's
|
436
|
+
# [default network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
|
437
|
+
#
|
438
|
+
# One firewall is added for the cluster. After cluster creation,
|
439
|
+
# the Kubelet creates routes for each node to allow the containers
|
440
|
+
# on that node to communicate with all other instances in the
|
441
|
+
# cluster.
|
442
|
+
#
|
443
|
+
# Finally, an entry is added to the project's global metadata indicating
|
444
|
+
# which CIDR range the cluster is using.
|
445
|
+
#
|
446
|
+
# @overload create_cluster(request, options = nil)
|
447
|
+
# Pass arguments to `create_cluster` via a request object, either of type
|
448
|
+
# {::Google::Cloud::Container::V1beta1::CreateClusterRequest} or an equivalent Hash.
|
449
|
+
#
|
450
|
+
# @param request [::Google::Cloud::Container::V1beta1::CreateClusterRequest, ::Hash]
|
451
|
+
# A request object representing the call parameters. Required. To specify no
|
452
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
453
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
454
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
455
|
+
#
|
456
|
+
# @overload create_cluster(project_id: nil, zone: nil, cluster: nil, parent: nil)
|
457
|
+
# Pass arguments to `create_cluster` via keyword arguments. Note that at
|
458
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
459
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
460
|
+
#
|
461
|
+
# @param project_id [::String]
|
462
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
463
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
464
|
+
# This field has been deprecated and replaced by the parent field.
|
465
|
+
# @param zone [::String]
|
466
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
467
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
468
|
+
# resides.
|
469
|
+
# This field has been deprecated and replaced by the parent field.
|
470
|
+
# @param cluster [::Google::Cloud::Container::V1beta1::Cluster, ::Hash]
|
471
|
+
# Required. A [cluster
|
472
|
+
# resource](https://cloud.google.com/container-engine/reference/rest/v1beta1/projects.zones.clusters)
|
473
|
+
# @param parent [::String]
|
474
|
+
# The parent (project and location) where the cluster will be created.
|
475
|
+
# Specified in the format `projects/*/locations/*`.
|
476
|
+
#
|
477
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
478
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
479
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
480
|
+
#
|
481
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
482
|
+
#
|
483
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
484
|
+
#
|
485
|
+
def create_cluster request, options = nil
|
486
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
487
|
+
|
488
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::CreateClusterRequest
|
489
|
+
|
490
|
+
# Converts hash and nil to an options object
|
491
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
492
|
+
|
493
|
+
# Customize the options with defaults
|
494
|
+
metadata = @config.rpcs.create_cluster.metadata.to_h
|
495
|
+
|
496
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
497
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
498
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
499
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
500
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
501
|
+
|
502
|
+
header_params = {
|
503
|
+
"parent" => request.parent
|
504
|
+
}
|
505
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
506
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
507
|
+
|
508
|
+
options.apply_defaults timeout: @config.rpcs.create_cluster.timeout,
|
509
|
+
metadata: metadata,
|
510
|
+
retry_policy: @config.rpcs.create_cluster.retry_policy
|
511
|
+
options.apply_defaults metadata: @config.metadata,
|
512
|
+
retry_policy: @config.retry_policy
|
513
|
+
|
514
|
+
@cluster_manager_stub.call_rpc :create_cluster, request, options: options do |response, operation|
|
515
|
+
yield response, operation if block_given?
|
516
|
+
return response
|
517
|
+
end
|
518
|
+
rescue ::GRPC::BadStatus => e
|
519
|
+
raise ::Google::Cloud::Error.from_error(e)
|
520
|
+
end
|
521
|
+
|
522
|
+
##
|
523
|
+
# Updates the settings for a specific cluster.
|
524
|
+
#
|
525
|
+
# @overload update_cluster(request, options = nil)
|
526
|
+
# Pass arguments to `update_cluster` via a request object, either of type
|
527
|
+
# {::Google::Cloud::Container::V1beta1::UpdateClusterRequest} or an equivalent Hash.
|
528
|
+
#
|
529
|
+
# @param request [::Google::Cloud::Container::V1beta1::UpdateClusterRequest, ::Hash]
|
530
|
+
# A request object representing the call parameters. Required. To specify no
|
531
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
532
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
533
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
534
|
+
#
|
535
|
+
# @overload update_cluster(project_id: nil, zone: nil, cluster_id: nil, update: nil, name: nil)
|
536
|
+
# Pass arguments to `update_cluster` via keyword arguments. Note that at
|
537
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
538
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
539
|
+
#
|
540
|
+
# @param project_id [::String]
|
541
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
542
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
543
|
+
# This field has been deprecated and replaced by the name field.
|
544
|
+
# @param zone [::String]
|
545
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
546
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
547
|
+
# resides.
|
548
|
+
# This field has been deprecated and replaced by the name field.
|
549
|
+
# @param cluster_id [::String]
|
550
|
+
# Required. Deprecated. The name of the cluster to upgrade.
|
551
|
+
# This field has been deprecated and replaced by the name field.
|
552
|
+
# @param update [::Google::Cloud::Container::V1beta1::ClusterUpdate, ::Hash]
|
553
|
+
# Required. A description of the update.
|
554
|
+
# @param name [::String]
|
555
|
+
# The name (project, location, cluster) of the cluster to update.
|
556
|
+
# Specified in the format `projects/*/locations/*/clusters/*`.
|
557
|
+
#
|
558
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
559
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
560
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
561
|
+
#
|
562
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
563
|
+
#
|
564
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
565
|
+
#
|
566
|
+
def update_cluster request, options = nil
|
567
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
568
|
+
|
569
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::UpdateClusterRequest
|
570
|
+
|
571
|
+
# Converts hash and nil to an options object
|
572
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
573
|
+
|
574
|
+
# Customize the options with defaults
|
575
|
+
metadata = @config.rpcs.update_cluster.metadata.to_h
|
576
|
+
|
577
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
578
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
579
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
580
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
581
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
582
|
+
|
583
|
+
header_params = {
|
584
|
+
"name" => request.name
|
585
|
+
}
|
586
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
587
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
588
|
+
|
589
|
+
options.apply_defaults timeout: @config.rpcs.update_cluster.timeout,
|
590
|
+
metadata: metadata,
|
591
|
+
retry_policy: @config.rpcs.update_cluster.retry_policy
|
592
|
+
options.apply_defaults metadata: @config.metadata,
|
593
|
+
retry_policy: @config.retry_policy
|
594
|
+
|
595
|
+
@cluster_manager_stub.call_rpc :update_cluster, request, options: options do |response, operation|
|
596
|
+
yield response, operation if block_given?
|
597
|
+
return response
|
598
|
+
end
|
599
|
+
rescue ::GRPC::BadStatus => e
|
600
|
+
raise ::Google::Cloud::Error.from_error(e)
|
601
|
+
end
|
602
|
+
|
603
|
+
##
|
604
|
+
# Updates the version and/or image type of a specific node pool.
|
605
|
+
#
|
606
|
+
# @overload update_node_pool(request, options = nil)
|
607
|
+
# Pass arguments to `update_node_pool` via a request object, either of type
|
608
|
+
# {::Google::Cloud::Container::V1beta1::UpdateNodePoolRequest} or an equivalent Hash.
|
609
|
+
#
|
610
|
+
# @param request [::Google::Cloud::Container::V1beta1::UpdateNodePoolRequest, ::Hash]
|
611
|
+
# A request object representing the call parameters. Required. To specify no
|
612
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
613
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
614
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
615
|
+
#
|
616
|
+
# @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, workload_metadata_config: nil, name: nil)
|
617
|
+
# Pass arguments to `update_node_pool` via keyword arguments. Note that at
|
618
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
619
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
620
|
+
#
|
621
|
+
# @param project_id [::String]
|
622
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
623
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
624
|
+
# This field has been deprecated and replaced by the name field.
|
625
|
+
# @param zone [::String]
|
626
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
627
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
628
|
+
# resides.
|
629
|
+
# This field has been deprecated and replaced by the name field.
|
630
|
+
# @param cluster_id [::String]
|
631
|
+
# Required. Deprecated. The name of the cluster to upgrade.
|
632
|
+
# This field has been deprecated and replaced by the name field.
|
633
|
+
# @param node_pool_id [::String]
|
634
|
+
# Required. Deprecated. The name of the node pool to upgrade.
|
635
|
+
# This field has been deprecated and replaced by the name field.
|
636
|
+
# @param node_version [::String]
|
637
|
+
# Required. The Kubernetes version to change the nodes to (typically an
|
638
|
+
# upgrade).
|
639
|
+
#
|
640
|
+
# Users may specify either explicit versions offered by Kubernetes Engine or
|
641
|
+
# version aliases, which have the following behavior:
|
642
|
+
#
|
643
|
+
# - "latest": picks the highest valid Kubernetes version
|
644
|
+
# - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
|
645
|
+
# - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
|
646
|
+
# - "1.X.Y-gke.N": picks an explicit Kubernetes version
|
647
|
+
# - "-": picks the Kubernetes master version
|
648
|
+
# @param image_type [::String]
|
649
|
+
# Required. The desired image type for the node pool.
|
650
|
+
# @param workload_metadata_config [::Google::Cloud::Container::V1beta1::WorkloadMetadataConfig, ::Hash]
|
651
|
+
# The desired image type for the node pool.
|
652
|
+
# @param name [::String]
|
653
|
+
# The name (project, location, cluster, node pool) of the node pool to
|
654
|
+
# update. Specified in the format
|
655
|
+
# `projects/*/locations/*/clusters/*/nodePools/*`.
|
656
|
+
#
|
657
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
658
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
659
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
660
|
+
#
|
661
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
662
|
+
#
|
663
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
664
|
+
#
|
665
|
+
def update_node_pool request, options = nil
|
666
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
667
|
+
|
668
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::UpdateNodePoolRequest
|
669
|
+
|
670
|
+
# Converts hash and nil to an options object
|
671
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
672
|
+
|
673
|
+
# Customize the options with defaults
|
674
|
+
metadata = @config.rpcs.update_node_pool.metadata.to_h
|
675
|
+
|
676
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
677
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
678
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
679
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
680
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
681
|
+
|
682
|
+
header_params = {
|
683
|
+
"name" => request.name
|
684
|
+
}
|
685
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
686
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
687
|
+
|
688
|
+
options.apply_defaults timeout: @config.rpcs.update_node_pool.timeout,
|
689
|
+
metadata: metadata,
|
690
|
+
retry_policy: @config.rpcs.update_node_pool.retry_policy
|
691
|
+
options.apply_defaults metadata: @config.metadata,
|
692
|
+
retry_policy: @config.retry_policy
|
693
|
+
|
694
|
+
@cluster_manager_stub.call_rpc :update_node_pool, request, options: options do |response, operation|
|
695
|
+
yield response, operation if block_given?
|
696
|
+
return response
|
697
|
+
end
|
698
|
+
rescue ::GRPC::BadStatus => e
|
699
|
+
raise ::Google::Cloud::Error.from_error(e)
|
700
|
+
end
|
701
|
+
|
702
|
+
##
|
703
|
+
# Sets the autoscaling settings of a specific node pool.
|
704
|
+
#
|
705
|
+
# @overload set_node_pool_autoscaling(request, options = nil)
|
706
|
+
# Pass arguments to `set_node_pool_autoscaling` via a request object, either of type
|
707
|
+
# {::Google::Cloud::Container::V1beta1::SetNodePoolAutoscalingRequest} or an equivalent Hash.
|
708
|
+
#
|
709
|
+
# @param request [::Google::Cloud::Container::V1beta1::SetNodePoolAutoscalingRequest, ::Hash]
|
710
|
+
# A request object representing the call parameters. Required. To specify no
|
711
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
712
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
713
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
714
|
+
#
|
715
|
+
# @overload set_node_pool_autoscaling(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, autoscaling: nil, name: nil)
|
716
|
+
# Pass arguments to `set_node_pool_autoscaling` via keyword arguments. Note that at
|
717
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
718
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
719
|
+
#
|
720
|
+
# @param project_id [::String]
|
721
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
722
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
723
|
+
# This field has been deprecated and replaced by the name field.
|
724
|
+
# @param zone [::String]
|
725
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
726
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
727
|
+
# resides.
|
728
|
+
# This field has been deprecated and replaced by the name field.
|
729
|
+
# @param cluster_id [::String]
|
730
|
+
# Required. Deprecated. The name of the cluster to upgrade.
|
731
|
+
# This field has been deprecated and replaced by the name field.
|
732
|
+
# @param node_pool_id [::String]
|
733
|
+
# Required. Deprecated. The name of the node pool to upgrade.
|
734
|
+
# This field has been deprecated and replaced by the name field.
|
735
|
+
# @param autoscaling [::Google::Cloud::Container::V1beta1::NodePoolAutoscaling, ::Hash]
|
736
|
+
# Required. Autoscaling configuration for the node pool.
|
737
|
+
# @param name [::String]
|
738
|
+
# The name (project, location, cluster, node pool) of the node pool to set
|
739
|
+
# autoscaler settings. Specified in the format
|
740
|
+
# `projects/*/locations/*/clusters/*/nodePools/*`.
|
741
|
+
#
|
742
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
743
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
744
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
745
|
+
#
|
746
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
747
|
+
#
|
748
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
749
|
+
#
|
750
|
+
def set_node_pool_autoscaling request, options = nil
|
751
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
752
|
+
|
753
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::SetNodePoolAutoscalingRequest
|
754
|
+
|
755
|
+
# Converts hash and nil to an options object
|
756
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
757
|
+
|
758
|
+
# Customize the options with defaults
|
759
|
+
metadata = @config.rpcs.set_node_pool_autoscaling.metadata.to_h
|
760
|
+
|
761
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
762
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
763
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
764
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
765
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
766
|
+
|
767
|
+
header_params = {
|
768
|
+
"name" => request.name
|
769
|
+
}
|
770
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
771
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
772
|
+
|
773
|
+
options.apply_defaults timeout: @config.rpcs.set_node_pool_autoscaling.timeout,
|
774
|
+
metadata: metadata,
|
775
|
+
retry_policy: @config.rpcs.set_node_pool_autoscaling.retry_policy
|
776
|
+
options.apply_defaults metadata: @config.metadata,
|
777
|
+
retry_policy: @config.retry_policy
|
778
|
+
|
779
|
+
@cluster_manager_stub.call_rpc :set_node_pool_autoscaling, request, options: options do |response, operation|
|
780
|
+
yield response, operation if block_given?
|
781
|
+
return response
|
782
|
+
end
|
783
|
+
rescue ::GRPC::BadStatus => e
|
784
|
+
raise ::Google::Cloud::Error.from_error(e)
|
785
|
+
end
|
786
|
+
|
787
|
+
##
|
788
|
+
# Sets the logging service for a specific cluster.
|
789
|
+
#
|
790
|
+
# @overload set_logging_service(request, options = nil)
|
791
|
+
# Pass arguments to `set_logging_service` via a request object, either of type
|
792
|
+
# {::Google::Cloud::Container::V1beta1::SetLoggingServiceRequest} or an equivalent Hash.
|
793
|
+
#
|
794
|
+
# @param request [::Google::Cloud::Container::V1beta1::SetLoggingServiceRequest, ::Hash]
|
795
|
+
# A request object representing the call parameters. Required. To specify no
|
796
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
797
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
798
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
799
|
+
#
|
800
|
+
# @overload set_logging_service(project_id: nil, zone: nil, cluster_id: nil, logging_service: nil, name: nil)
|
801
|
+
# Pass arguments to `set_logging_service` via keyword arguments. Note that at
|
802
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
803
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
804
|
+
#
|
805
|
+
# @param project_id [::String]
|
806
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
807
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
808
|
+
# This field has been deprecated and replaced by the name field.
|
809
|
+
# @param zone [::String]
|
810
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
811
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
812
|
+
# resides.
|
813
|
+
# This field has been deprecated and replaced by the name field.
|
814
|
+
# @param cluster_id [::String]
|
815
|
+
# Required. Deprecated. The name of the cluster to upgrade.
|
816
|
+
# This field has been deprecated and replaced by the name field.
|
817
|
+
# @param logging_service [::String]
|
818
|
+
# Required. The logging service the cluster should use to write metrics.
|
819
|
+
# Currently available options:
|
820
|
+
#
|
821
|
+
# * "logging.googleapis.com" - the Google Cloud Logging service
|
822
|
+
# * "none" - no metrics will be exported from the cluster
|
823
|
+
# @param name [::String]
|
824
|
+
# The name (project, location, cluster) of the cluster to set logging.
|
825
|
+
# Specified in the format `projects/*/locations/*/clusters/*`.
|
826
|
+
#
|
827
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
828
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
829
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
830
|
+
#
|
831
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
832
|
+
#
|
833
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
834
|
+
#
|
835
|
+
def set_logging_service request, options = nil
|
836
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
837
|
+
|
838
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::SetLoggingServiceRequest
|
839
|
+
|
840
|
+
# Converts hash and nil to an options object
|
841
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
842
|
+
|
843
|
+
# Customize the options with defaults
|
844
|
+
metadata = @config.rpcs.set_logging_service.metadata.to_h
|
845
|
+
|
846
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
847
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
848
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
849
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
850
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
851
|
+
|
852
|
+
header_params = {
|
853
|
+
"name" => request.name
|
854
|
+
}
|
855
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
856
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
857
|
+
|
858
|
+
options.apply_defaults timeout: @config.rpcs.set_logging_service.timeout,
|
859
|
+
metadata: metadata,
|
860
|
+
retry_policy: @config.rpcs.set_logging_service.retry_policy
|
861
|
+
options.apply_defaults metadata: @config.metadata,
|
862
|
+
retry_policy: @config.retry_policy
|
863
|
+
|
864
|
+
@cluster_manager_stub.call_rpc :set_logging_service, request, options: options do |response, operation|
|
865
|
+
yield response, operation if block_given?
|
866
|
+
return response
|
867
|
+
end
|
868
|
+
rescue ::GRPC::BadStatus => e
|
869
|
+
raise ::Google::Cloud::Error.from_error(e)
|
870
|
+
end
|
871
|
+
|
872
|
+
##
|
873
|
+
# Sets the monitoring service for a specific cluster.
|
874
|
+
#
|
875
|
+
# @overload set_monitoring_service(request, options = nil)
|
876
|
+
# Pass arguments to `set_monitoring_service` via a request object, either of type
|
877
|
+
# {::Google::Cloud::Container::V1beta1::SetMonitoringServiceRequest} or an equivalent Hash.
|
878
|
+
#
|
879
|
+
# @param request [::Google::Cloud::Container::V1beta1::SetMonitoringServiceRequest, ::Hash]
|
880
|
+
# A request object representing the call parameters. Required. To specify no
|
881
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
882
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
883
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
884
|
+
#
|
885
|
+
# @overload set_monitoring_service(project_id: nil, zone: nil, cluster_id: nil, monitoring_service: nil, name: nil)
|
886
|
+
# Pass arguments to `set_monitoring_service` via keyword arguments. Note that at
|
887
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
888
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
889
|
+
#
|
890
|
+
# @param project_id [::String]
|
891
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
892
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
893
|
+
# This field has been deprecated and replaced by the name field.
|
894
|
+
# @param zone [::String]
|
895
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
896
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
897
|
+
# resides.
|
898
|
+
# This field has been deprecated and replaced by the name field.
|
899
|
+
# @param cluster_id [::String]
|
900
|
+
# Required. Deprecated. The name of the cluster to upgrade.
|
901
|
+
# This field has been deprecated and replaced by the name field.
|
902
|
+
# @param monitoring_service [::String]
|
903
|
+
# Required. The monitoring service the cluster should use to write metrics.
|
904
|
+
# Currently available options:
|
905
|
+
#
|
906
|
+
# * "monitoring.googleapis.com" - the Google Cloud Monitoring service
|
907
|
+
# * "none" - no metrics will be exported from the cluster
|
908
|
+
# @param name [::String]
|
909
|
+
# The name (project, location, cluster) of the cluster to set monitoring.
|
910
|
+
# Specified in the format `projects/*/locations/*/clusters/*`.
|
911
|
+
#
|
912
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
913
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
914
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
915
|
+
#
|
916
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
917
|
+
#
|
918
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
919
|
+
#
|
920
|
+
def set_monitoring_service request, options = nil
|
921
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
922
|
+
|
923
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::SetMonitoringServiceRequest
|
924
|
+
|
925
|
+
# Converts hash and nil to an options object
|
926
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
927
|
+
|
928
|
+
# Customize the options with defaults
|
929
|
+
metadata = @config.rpcs.set_monitoring_service.metadata.to_h
|
930
|
+
|
931
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
932
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
933
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
934
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
935
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
936
|
+
|
937
|
+
header_params = {
|
938
|
+
"name" => request.name
|
939
|
+
}
|
940
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
941
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
942
|
+
|
943
|
+
options.apply_defaults timeout: @config.rpcs.set_monitoring_service.timeout,
|
944
|
+
metadata: metadata,
|
945
|
+
retry_policy: @config.rpcs.set_monitoring_service.retry_policy
|
946
|
+
options.apply_defaults metadata: @config.metadata,
|
947
|
+
retry_policy: @config.retry_policy
|
948
|
+
|
949
|
+
@cluster_manager_stub.call_rpc :set_monitoring_service, request, options: options do |response, operation|
|
950
|
+
yield response, operation if block_given?
|
951
|
+
return response
|
952
|
+
end
|
953
|
+
rescue ::GRPC::BadStatus => e
|
954
|
+
raise ::Google::Cloud::Error.from_error(e)
|
955
|
+
end
|
956
|
+
|
957
|
+
##
|
958
|
+
# Sets the addons for a specific cluster.
|
959
|
+
#
|
960
|
+
# @overload set_addons_config(request, options = nil)
|
961
|
+
# Pass arguments to `set_addons_config` via a request object, either of type
|
962
|
+
# {::Google::Cloud::Container::V1beta1::SetAddonsConfigRequest} or an equivalent Hash.
|
963
|
+
#
|
964
|
+
# @param request [::Google::Cloud::Container::V1beta1::SetAddonsConfigRequest, ::Hash]
|
965
|
+
# A request object representing the call parameters. Required. To specify no
|
966
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
967
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
968
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
969
|
+
#
|
970
|
+
# @overload set_addons_config(project_id: nil, zone: nil, cluster_id: nil, addons_config: nil, name: nil)
|
971
|
+
# Pass arguments to `set_addons_config` via keyword arguments. Note that at
|
972
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
973
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
974
|
+
#
|
975
|
+
# @param project_id [::String]
|
976
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
977
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
978
|
+
# This field has been deprecated and replaced by the name field.
|
979
|
+
# @param zone [::String]
|
980
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
981
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
982
|
+
# resides.
|
983
|
+
# This field has been deprecated and replaced by the name field.
|
984
|
+
# @param cluster_id [::String]
|
985
|
+
# Required. Deprecated. The name of the cluster to upgrade.
|
986
|
+
# This field has been deprecated and replaced by the name field.
|
987
|
+
# @param addons_config [::Google::Cloud::Container::V1beta1::AddonsConfig, ::Hash]
|
988
|
+
# Required. The desired configurations for the various addons available to run in the
|
989
|
+
# cluster.
|
990
|
+
# @param name [::String]
|
991
|
+
# The name (project, location, cluster) of the cluster to set addons.
|
992
|
+
# Specified in the format `projects/*/locations/*/clusters/*`.
|
993
|
+
#
|
994
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
995
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
996
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
997
|
+
#
|
998
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
999
|
+
#
|
1000
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1001
|
+
#
|
1002
|
+
def set_addons_config request, options = nil
|
1003
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1004
|
+
|
1005
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::SetAddonsConfigRequest
|
1006
|
+
|
1007
|
+
# Converts hash and nil to an options object
|
1008
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1009
|
+
|
1010
|
+
# Customize the options with defaults
|
1011
|
+
metadata = @config.rpcs.set_addons_config.metadata.to_h
|
1012
|
+
|
1013
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1014
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1015
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1016
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
1017
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1018
|
+
|
1019
|
+
header_params = {
|
1020
|
+
"name" => request.name
|
1021
|
+
}
|
1022
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1023
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1024
|
+
|
1025
|
+
options.apply_defaults timeout: @config.rpcs.set_addons_config.timeout,
|
1026
|
+
metadata: metadata,
|
1027
|
+
retry_policy: @config.rpcs.set_addons_config.retry_policy
|
1028
|
+
options.apply_defaults metadata: @config.metadata,
|
1029
|
+
retry_policy: @config.retry_policy
|
1030
|
+
|
1031
|
+
@cluster_manager_stub.call_rpc :set_addons_config, request, options: options do |response, operation|
|
1032
|
+
yield response, operation if block_given?
|
1033
|
+
return response
|
1034
|
+
end
|
1035
|
+
rescue ::GRPC::BadStatus => e
|
1036
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1037
|
+
end
|
1038
|
+
|
1039
|
+
##
|
1040
|
+
# Sets the locations for a specific cluster.
|
1041
|
+
#
|
1042
|
+
# @overload set_locations(request, options = nil)
|
1043
|
+
# Pass arguments to `set_locations` via a request object, either of type
|
1044
|
+
# {::Google::Cloud::Container::V1beta1::SetLocationsRequest} or an equivalent Hash.
|
1045
|
+
#
|
1046
|
+
# @param request [::Google::Cloud::Container::V1beta1::SetLocationsRequest, ::Hash]
|
1047
|
+
# A request object representing the call parameters. Required. To specify no
|
1048
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1049
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1050
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1051
|
+
#
|
1052
|
+
# @overload set_locations(project_id: nil, zone: nil, cluster_id: nil, locations: nil, name: nil)
|
1053
|
+
# Pass arguments to `set_locations` via keyword arguments. Note that at
|
1054
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1055
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1056
|
+
#
|
1057
|
+
# @param project_id [::String]
|
1058
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
1059
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
1060
|
+
# This field has been deprecated and replaced by the name field.
|
1061
|
+
# @param zone [::String]
|
1062
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
1063
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1064
|
+
# resides.
|
1065
|
+
# This field has been deprecated and replaced by the name field.
|
1066
|
+
# @param cluster_id [::String]
|
1067
|
+
# Required. Deprecated. The name of the cluster to upgrade.
|
1068
|
+
# This field has been deprecated and replaced by the name field.
|
1069
|
+
# @param locations [::Array<::String>]
|
1070
|
+
# Required. The desired list of Google Compute Engine
|
1071
|
+
# [zones](https://cloud.google.com/compute/docs/zones#available) in which the cluster's nodes
|
1072
|
+
# should be located. Changing the locations a cluster is in will result
|
1073
|
+
# in nodes being either created or removed from the cluster, depending on
|
1074
|
+
# whether locations are being added or removed.
|
1075
|
+
#
|
1076
|
+
# This list must always include the cluster's primary zone.
|
1077
|
+
# @param name [::String]
|
1078
|
+
# The name (project, location, cluster) of the cluster to set locations.
|
1079
|
+
# Specified in the format `projects/*/locations/*/clusters/*`.
|
1080
|
+
#
|
1081
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1082
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
1083
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1084
|
+
#
|
1085
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
1086
|
+
#
|
1087
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1088
|
+
#
|
1089
|
+
def set_locations request, options = nil
|
1090
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1091
|
+
|
1092
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::SetLocationsRequest
|
1093
|
+
|
1094
|
+
# Converts hash and nil to an options object
|
1095
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1096
|
+
|
1097
|
+
# Customize the options with defaults
|
1098
|
+
metadata = @config.rpcs.set_locations.metadata.to_h
|
1099
|
+
|
1100
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1101
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1102
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1103
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
1104
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1105
|
+
|
1106
|
+
header_params = {
|
1107
|
+
"name" => request.name
|
1108
|
+
}
|
1109
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1110
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1111
|
+
|
1112
|
+
options.apply_defaults timeout: @config.rpcs.set_locations.timeout,
|
1113
|
+
metadata: metadata,
|
1114
|
+
retry_policy: @config.rpcs.set_locations.retry_policy
|
1115
|
+
options.apply_defaults metadata: @config.metadata,
|
1116
|
+
retry_policy: @config.retry_policy
|
1117
|
+
|
1118
|
+
@cluster_manager_stub.call_rpc :set_locations, request, options: options do |response, operation|
|
1119
|
+
yield response, operation if block_given?
|
1120
|
+
return response
|
1121
|
+
end
|
1122
|
+
rescue ::GRPC::BadStatus => e
|
1123
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1124
|
+
end
|
1125
|
+
|
1126
|
+
##
|
1127
|
+
# Updates the master for a specific cluster.
|
1128
|
+
#
|
1129
|
+
# @overload update_master(request, options = nil)
|
1130
|
+
# Pass arguments to `update_master` via a request object, either of type
|
1131
|
+
# {::Google::Cloud::Container::V1beta1::UpdateMasterRequest} or an equivalent Hash.
|
1132
|
+
#
|
1133
|
+
# @param request [::Google::Cloud::Container::V1beta1::UpdateMasterRequest, ::Hash]
|
1134
|
+
# A request object representing the call parameters. Required. To specify no
|
1135
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1136
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1137
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1138
|
+
#
|
1139
|
+
# @overload update_master(project_id: nil, zone: nil, cluster_id: nil, master_version: nil, name: nil)
|
1140
|
+
# Pass arguments to `update_master` via keyword arguments. Note that at
|
1141
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1142
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1143
|
+
#
|
1144
|
+
# @param project_id [::String]
|
1145
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
1146
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
1147
|
+
# This field has been deprecated and replaced by the name field.
|
1148
|
+
# @param zone [::String]
|
1149
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
1150
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1151
|
+
# resides.
|
1152
|
+
# This field has been deprecated and replaced by the name field.
|
1153
|
+
# @param cluster_id [::String]
|
1154
|
+
# Required. Deprecated. The name of the cluster to upgrade.
|
1155
|
+
# This field has been deprecated and replaced by the name field.
|
1156
|
+
# @param master_version [::String]
|
1157
|
+
# Required. The Kubernetes version to change the master to.
|
1158
|
+
#
|
1159
|
+
# Users may specify either explicit versions offered by
|
1160
|
+
# Kubernetes Engine or version aliases, which have the following behavior:
|
1161
|
+
#
|
1162
|
+
# - "latest": picks the highest valid Kubernetes version
|
1163
|
+
# - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
|
1164
|
+
# - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
|
1165
|
+
# - "1.X.Y-gke.N": picks an explicit Kubernetes version
|
1166
|
+
# - "-": picks the default Kubernetes version
|
1167
|
+
# @param name [::String]
|
1168
|
+
# The name (project, location, cluster) of the cluster to update.
|
1169
|
+
# Specified in the format `projects/*/locations/*/clusters/*`.
|
1170
|
+
#
|
1171
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1172
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
1173
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1174
|
+
#
|
1175
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
1176
|
+
#
|
1177
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1178
|
+
#
|
1179
|
+
def update_master request, options = nil
|
1180
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1181
|
+
|
1182
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::UpdateMasterRequest
|
1183
|
+
|
1184
|
+
# Converts hash and nil to an options object
|
1185
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1186
|
+
|
1187
|
+
# Customize the options with defaults
|
1188
|
+
metadata = @config.rpcs.update_master.metadata.to_h
|
1189
|
+
|
1190
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1191
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1192
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1193
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
1194
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1195
|
+
|
1196
|
+
header_params = {
|
1197
|
+
"name" => request.name
|
1198
|
+
}
|
1199
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1200
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1201
|
+
|
1202
|
+
options.apply_defaults timeout: @config.rpcs.update_master.timeout,
|
1203
|
+
metadata: metadata,
|
1204
|
+
retry_policy: @config.rpcs.update_master.retry_policy
|
1205
|
+
options.apply_defaults metadata: @config.metadata,
|
1206
|
+
retry_policy: @config.retry_policy
|
1207
|
+
|
1208
|
+
@cluster_manager_stub.call_rpc :update_master, request, options: options do |response, operation|
|
1209
|
+
yield response, operation if block_given?
|
1210
|
+
return response
|
1211
|
+
end
|
1212
|
+
rescue ::GRPC::BadStatus => e
|
1213
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1214
|
+
end
|
1215
|
+
|
1216
|
+
##
|
1217
|
+
# Sets master auth materials. Currently supports changing the admin password
|
1218
|
+
# or a specific cluster, either via password generation or explicitly setting
|
1219
|
+
# the password.
|
1220
|
+
#
|
1221
|
+
# @overload set_master_auth(request, options = nil)
|
1222
|
+
# Pass arguments to `set_master_auth` via a request object, either of type
|
1223
|
+
# {::Google::Cloud::Container::V1beta1::SetMasterAuthRequest} or an equivalent Hash.
|
1224
|
+
#
|
1225
|
+
# @param request [::Google::Cloud::Container::V1beta1::SetMasterAuthRequest, ::Hash]
|
1226
|
+
# A request object representing the call parameters. Required. To specify no
|
1227
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1228
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1229
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1230
|
+
#
|
1231
|
+
# @overload set_master_auth(project_id: nil, zone: nil, cluster_id: nil, action: nil, update: nil, name: nil)
|
1232
|
+
# Pass arguments to `set_master_auth` via keyword arguments. Note that at
|
1233
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1234
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1235
|
+
#
|
1236
|
+
# @param project_id [::String]
|
1237
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
1238
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
1239
|
+
# This field has been deprecated and replaced by the name field.
|
1240
|
+
# @param zone [::String]
|
1241
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
1242
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1243
|
+
# resides.
|
1244
|
+
# This field has been deprecated and replaced by the name field.
|
1245
|
+
# @param cluster_id [::String]
|
1246
|
+
# Required. Deprecated. The name of the cluster to upgrade.
|
1247
|
+
# This field has been deprecated and replaced by the name field.
|
1248
|
+
# @param action [::Google::Cloud::Container::V1beta1::SetMasterAuthRequest::Action]
|
1249
|
+
# Required. The exact form of action to be taken on the master auth.
|
1250
|
+
# @param update [::Google::Cloud::Container::V1beta1::MasterAuth, ::Hash]
|
1251
|
+
# Required. A description of the update.
|
1252
|
+
# @param name [::String]
|
1253
|
+
# The name (project, location, cluster) of the cluster to set auth.
|
1254
|
+
# Specified in the format `projects/*/locations/*/clusters/*`.
|
1255
|
+
#
|
1256
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1257
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
1258
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1259
|
+
#
|
1260
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
1261
|
+
#
|
1262
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1263
|
+
#
|
1264
|
+
def set_master_auth request, options = nil
|
1265
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1266
|
+
|
1267
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::SetMasterAuthRequest
|
1268
|
+
|
1269
|
+
# Converts hash and nil to an options object
|
1270
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1271
|
+
|
1272
|
+
# Customize the options with defaults
|
1273
|
+
metadata = @config.rpcs.set_master_auth.metadata.to_h
|
1274
|
+
|
1275
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1276
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1277
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1278
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
1279
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1280
|
+
|
1281
|
+
header_params = {
|
1282
|
+
"name" => request.name
|
1283
|
+
}
|
1284
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1285
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1286
|
+
|
1287
|
+
options.apply_defaults timeout: @config.rpcs.set_master_auth.timeout,
|
1288
|
+
metadata: metadata,
|
1289
|
+
retry_policy: @config.rpcs.set_master_auth.retry_policy
|
1290
|
+
options.apply_defaults metadata: @config.metadata,
|
1291
|
+
retry_policy: @config.retry_policy
|
1292
|
+
|
1293
|
+
@cluster_manager_stub.call_rpc :set_master_auth, request, options: options do |response, operation|
|
1294
|
+
yield response, operation if block_given?
|
1295
|
+
return response
|
1296
|
+
end
|
1297
|
+
rescue ::GRPC::BadStatus => e
|
1298
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1299
|
+
end
|
1300
|
+
|
1301
|
+
##
|
1302
|
+
# Deletes the cluster, including the Kubernetes endpoint and all worker
|
1303
|
+
# nodes.
|
1304
|
+
#
|
1305
|
+
# Firewalls and routes that were configured during cluster creation
|
1306
|
+
# are also deleted.
|
1307
|
+
#
|
1308
|
+
# Other Google Compute Engine resources that might be in use by the cluster,
|
1309
|
+
# such as load balancer resources, are not deleted if they weren't present
|
1310
|
+
# when the cluster was initially created.
|
1311
|
+
#
|
1312
|
+
# @overload delete_cluster(request, options = nil)
|
1313
|
+
# Pass arguments to `delete_cluster` via a request object, either of type
|
1314
|
+
# {::Google::Cloud::Container::V1beta1::DeleteClusterRequest} or an equivalent Hash.
|
1315
|
+
#
|
1316
|
+
# @param request [::Google::Cloud::Container::V1beta1::DeleteClusterRequest, ::Hash]
|
1317
|
+
# A request object representing the call parameters. Required. To specify no
|
1318
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1319
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1320
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1321
|
+
#
|
1322
|
+
# @overload delete_cluster(project_id: nil, zone: nil, cluster_id: nil, name: nil)
|
1323
|
+
# Pass arguments to `delete_cluster` via keyword arguments. Note that at
|
1324
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1325
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1326
|
+
#
|
1327
|
+
# @param project_id [::String]
|
1328
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
1329
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
1330
|
+
# This field has been deprecated and replaced by the name field.
|
1331
|
+
# @param zone [::String]
|
1332
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
1333
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1334
|
+
# resides.
|
1335
|
+
# This field has been deprecated and replaced by the name field.
|
1336
|
+
# @param cluster_id [::String]
|
1337
|
+
# Required. Deprecated. The name of the cluster to delete.
|
1338
|
+
# This field has been deprecated and replaced by the name field.
|
1339
|
+
# @param name [::String]
|
1340
|
+
# The name (project, location, cluster) of the cluster to delete.
|
1341
|
+
# Specified in the format `projects/*/locations/*/clusters/*`.
|
1342
|
+
#
|
1343
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1344
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
1345
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1346
|
+
#
|
1347
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
1348
|
+
#
|
1349
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1350
|
+
#
|
1351
|
+
def delete_cluster request, options = nil
|
1352
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1353
|
+
|
1354
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::DeleteClusterRequest
|
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
|
+
metadata = @config.rpcs.delete_cluster.metadata.to_h
|
1361
|
+
|
1362
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1363
|
+
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::Container::V1beta1::VERSION
|
1366
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1367
|
+
|
1368
|
+
header_params = {
|
1369
|
+
"name" => request.name
|
1370
|
+
}
|
1371
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1372
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1373
|
+
|
1374
|
+
options.apply_defaults timeout: @config.rpcs.delete_cluster.timeout,
|
1375
|
+
metadata: metadata,
|
1376
|
+
retry_policy: @config.rpcs.delete_cluster.retry_policy
|
1377
|
+
options.apply_defaults metadata: @config.metadata,
|
1378
|
+
retry_policy: @config.retry_policy
|
1379
|
+
|
1380
|
+
@cluster_manager_stub.call_rpc :delete_cluster, request, options: options do |response, operation|
|
1381
|
+
yield response, operation if block_given?
|
1382
|
+
return response
|
1383
|
+
end
|
1384
|
+
rescue ::GRPC::BadStatus => e
|
1385
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1386
|
+
end
|
1387
|
+
|
1388
|
+
##
|
1389
|
+
# Lists all operations in a project in the specified zone or all zones.
|
1390
|
+
#
|
1391
|
+
# @overload list_operations(request, options = nil)
|
1392
|
+
# Pass arguments to `list_operations` via a request object, either of type
|
1393
|
+
# {::Google::Cloud::Container::V1beta1::ListOperationsRequest} or an equivalent Hash.
|
1394
|
+
#
|
1395
|
+
# @param request [::Google::Cloud::Container::V1beta1::ListOperationsRequest, ::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_operations(project_id: nil, zone: nil, parent: nil)
|
1402
|
+
# Pass arguments to `list_operations` 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 project_id [::String]
|
1407
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
1408
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
1409
|
+
# This field has been deprecated and replaced by the parent field.
|
1410
|
+
# @param zone [::String]
|
1411
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
1412
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) to return operations for, or `-` for
|
1413
|
+
# all zones. This field has been deprecated and replaced by the parent field.
|
1414
|
+
# @param parent [::String]
|
1415
|
+
# The parent (project and location) where the operations will be listed.
|
1416
|
+
# Specified in the format `projects/*/locations/*`.
|
1417
|
+
# Location "-" matches all zones and all regions.
|
1418
|
+
#
|
1419
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1420
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::ListOperationsResponse]
|
1421
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1422
|
+
#
|
1423
|
+
# @return [::Google::Cloud::Container::V1beta1::ListOperationsResponse]
|
1424
|
+
#
|
1425
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1426
|
+
#
|
1427
|
+
def list_operations request, options = nil
|
1428
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1429
|
+
|
1430
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::ListOperationsRequest
|
1431
|
+
|
1432
|
+
# Converts hash and nil to an options object
|
1433
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1434
|
+
|
1435
|
+
# Customize the options with defaults
|
1436
|
+
metadata = @config.rpcs.list_operations.metadata.to_h
|
1437
|
+
|
1438
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1439
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1440
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1441
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
1442
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1443
|
+
|
1444
|
+
header_params = {
|
1445
|
+
"parent" => request.parent
|
1446
|
+
}
|
1447
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1448
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1449
|
+
|
1450
|
+
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
1451
|
+
metadata: metadata,
|
1452
|
+
retry_policy: @config.rpcs.list_operations.retry_policy
|
1453
|
+
options.apply_defaults metadata: @config.metadata,
|
1454
|
+
retry_policy: @config.retry_policy
|
1455
|
+
|
1456
|
+
@cluster_manager_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
1457
|
+
yield response, operation if block_given?
|
1458
|
+
return response
|
1459
|
+
end
|
1460
|
+
rescue ::GRPC::BadStatus => e
|
1461
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1462
|
+
end
|
1463
|
+
|
1464
|
+
##
|
1465
|
+
# Gets the specified operation.
|
1466
|
+
#
|
1467
|
+
# @overload get_operation(request, options = nil)
|
1468
|
+
# Pass arguments to `get_operation` via a request object, either of type
|
1469
|
+
# {::Google::Cloud::Container::V1beta1::GetOperationRequest} or an equivalent Hash.
|
1470
|
+
#
|
1471
|
+
# @param request [::Google::Cloud::Container::V1beta1::GetOperationRequest, ::Hash]
|
1472
|
+
# A request object representing the call parameters. Required. To specify no
|
1473
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1474
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1475
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1476
|
+
#
|
1477
|
+
# @overload get_operation(project_id: nil, zone: nil, operation_id: nil, name: nil)
|
1478
|
+
# Pass arguments to `get_operation` via keyword arguments. Note that at
|
1479
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1480
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1481
|
+
#
|
1482
|
+
# @param project_id [::String]
|
1483
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
1484
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
1485
|
+
# This field has been deprecated and replaced by the name field.
|
1486
|
+
# @param zone [::String]
|
1487
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
1488
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1489
|
+
# resides.
|
1490
|
+
# This field has been deprecated and replaced by the name field.
|
1491
|
+
# @param operation_id [::String]
|
1492
|
+
# Required. Deprecated. The server-assigned `name` of the operation.
|
1493
|
+
# This field has been deprecated and replaced by the name field.
|
1494
|
+
# @param name [::String]
|
1495
|
+
# The name (project, location, operation id) of the operation to get.
|
1496
|
+
# Specified in the format `projects/*/locations/*/operations/*`.
|
1497
|
+
#
|
1498
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1499
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
1500
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1501
|
+
#
|
1502
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
1503
|
+
#
|
1504
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1505
|
+
#
|
1506
|
+
def get_operation request, options = nil
|
1507
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1508
|
+
|
1509
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::GetOperationRequest
|
1510
|
+
|
1511
|
+
# Converts hash and nil to an options object
|
1512
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1513
|
+
|
1514
|
+
# Customize the options with defaults
|
1515
|
+
metadata = @config.rpcs.get_operation.metadata.to_h
|
1516
|
+
|
1517
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1518
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1519
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1520
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
1521
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1522
|
+
|
1523
|
+
header_params = {
|
1524
|
+
"name" => request.name
|
1525
|
+
}
|
1526
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1527
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1528
|
+
|
1529
|
+
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
1530
|
+
metadata: metadata,
|
1531
|
+
retry_policy: @config.rpcs.get_operation.retry_policy
|
1532
|
+
options.apply_defaults metadata: @config.metadata,
|
1533
|
+
retry_policy: @config.retry_policy
|
1534
|
+
|
1535
|
+
@cluster_manager_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
1536
|
+
yield response, operation if block_given?
|
1537
|
+
return response
|
1538
|
+
end
|
1539
|
+
rescue ::GRPC::BadStatus => e
|
1540
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1541
|
+
end
|
1542
|
+
|
1543
|
+
##
|
1544
|
+
# Cancels the specified operation.
|
1545
|
+
#
|
1546
|
+
# @overload cancel_operation(request, options = nil)
|
1547
|
+
# Pass arguments to `cancel_operation` via a request object, either of type
|
1548
|
+
# {::Google::Cloud::Container::V1beta1::CancelOperationRequest} or an equivalent Hash.
|
1549
|
+
#
|
1550
|
+
# @param request [::Google::Cloud::Container::V1beta1::CancelOperationRequest, ::Hash]
|
1551
|
+
# A request object representing the call parameters. Required. To specify no
|
1552
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1553
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1554
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1555
|
+
#
|
1556
|
+
# @overload cancel_operation(project_id: nil, zone: nil, operation_id: nil, name: nil)
|
1557
|
+
# Pass arguments to `cancel_operation` via keyword arguments. Note that at
|
1558
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1559
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1560
|
+
#
|
1561
|
+
# @param project_id [::String]
|
1562
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
1563
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
1564
|
+
# This field has been deprecated and replaced by the name field.
|
1565
|
+
# @param zone [::String]
|
1566
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
1567
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation resides.
|
1568
|
+
# This field has been deprecated and replaced by the name field.
|
1569
|
+
# @param operation_id [::String]
|
1570
|
+
# Required. Deprecated. The server-assigned `name` of the operation.
|
1571
|
+
# This field has been deprecated and replaced by the name field.
|
1572
|
+
# @param name [::String]
|
1573
|
+
# The name (project, location, operation id) of the operation to cancel.
|
1574
|
+
# Specified in the format `projects/*/locations/*/operations/*`.
|
1575
|
+
#
|
1576
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1577
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1578
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1579
|
+
#
|
1580
|
+
# @return [::Google::Protobuf::Empty]
|
1581
|
+
#
|
1582
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1583
|
+
#
|
1584
|
+
def cancel_operation request, options = nil
|
1585
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1586
|
+
|
1587
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::CancelOperationRequest
|
1588
|
+
|
1589
|
+
# Converts hash and nil to an options object
|
1590
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1591
|
+
|
1592
|
+
# Customize the options with defaults
|
1593
|
+
metadata = @config.rpcs.cancel_operation.metadata.to_h
|
1594
|
+
|
1595
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1596
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1597
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1598
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
1599
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1600
|
+
|
1601
|
+
header_params = {
|
1602
|
+
"name" => request.name
|
1603
|
+
}
|
1604
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1605
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1606
|
+
|
1607
|
+
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
1608
|
+
metadata: metadata,
|
1609
|
+
retry_policy: @config.rpcs.cancel_operation.retry_policy
|
1610
|
+
options.apply_defaults metadata: @config.metadata,
|
1611
|
+
retry_policy: @config.retry_policy
|
1612
|
+
|
1613
|
+
@cluster_manager_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
1614
|
+
yield response, operation if block_given?
|
1615
|
+
return response
|
1616
|
+
end
|
1617
|
+
rescue ::GRPC::BadStatus => e
|
1618
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1619
|
+
end
|
1620
|
+
|
1621
|
+
##
|
1622
|
+
# Returns configuration info about the Google Kubernetes Engine service.
|
1623
|
+
#
|
1624
|
+
# @overload get_server_config(request, options = nil)
|
1625
|
+
# Pass arguments to `get_server_config` via a request object, either of type
|
1626
|
+
# {::Google::Cloud::Container::V1beta1::GetServerConfigRequest} or an equivalent Hash.
|
1627
|
+
#
|
1628
|
+
# @param request [::Google::Cloud::Container::V1beta1::GetServerConfigRequest, ::Hash]
|
1629
|
+
# A request object representing the call parameters. Required. To specify no
|
1630
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1631
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1632
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1633
|
+
#
|
1634
|
+
# @overload get_server_config(project_id: nil, zone: nil, name: nil)
|
1635
|
+
# Pass arguments to `get_server_config` via keyword arguments. Note that at
|
1636
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1637
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1638
|
+
#
|
1639
|
+
# @param project_id [::String]
|
1640
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
1641
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
1642
|
+
# This field has been deprecated and replaced by the name field.
|
1643
|
+
# @param zone [::String]
|
1644
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
1645
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) to return operations for.
|
1646
|
+
# This field has been deprecated and replaced by the name field.
|
1647
|
+
# @param name [::String]
|
1648
|
+
# The name (project and location) of the server config to get,
|
1649
|
+
# specified in the format `projects/*/locations/*`.
|
1650
|
+
#
|
1651
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1652
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::ServerConfig]
|
1653
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1654
|
+
#
|
1655
|
+
# @return [::Google::Cloud::Container::V1beta1::ServerConfig]
|
1656
|
+
#
|
1657
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1658
|
+
#
|
1659
|
+
def get_server_config request, options = nil
|
1660
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1661
|
+
|
1662
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::GetServerConfigRequest
|
1663
|
+
|
1664
|
+
# Converts hash and nil to an options object
|
1665
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1666
|
+
|
1667
|
+
# Customize the options with defaults
|
1668
|
+
metadata = @config.rpcs.get_server_config.metadata.to_h
|
1669
|
+
|
1670
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1671
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1672
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1673
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
1674
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1675
|
+
|
1676
|
+
header_params = {
|
1677
|
+
"name" => request.name
|
1678
|
+
}
|
1679
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1680
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1681
|
+
|
1682
|
+
options.apply_defaults timeout: @config.rpcs.get_server_config.timeout,
|
1683
|
+
metadata: metadata,
|
1684
|
+
retry_policy: @config.rpcs.get_server_config.retry_policy
|
1685
|
+
options.apply_defaults metadata: @config.metadata,
|
1686
|
+
retry_policy: @config.retry_policy
|
1687
|
+
|
1688
|
+
@cluster_manager_stub.call_rpc :get_server_config, request, options: options do |response, operation|
|
1689
|
+
yield response, operation if block_given?
|
1690
|
+
return response
|
1691
|
+
end
|
1692
|
+
rescue ::GRPC::BadStatus => e
|
1693
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1694
|
+
end
|
1695
|
+
|
1696
|
+
##
|
1697
|
+
# Lists the node pools for a cluster.
|
1698
|
+
#
|
1699
|
+
# @overload list_node_pools(request, options = nil)
|
1700
|
+
# Pass arguments to `list_node_pools` via a request object, either of type
|
1701
|
+
# {::Google::Cloud::Container::V1beta1::ListNodePoolsRequest} or an equivalent Hash.
|
1702
|
+
#
|
1703
|
+
# @param request [::Google::Cloud::Container::V1beta1::ListNodePoolsRequest, ::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 list_node_pools(project_id: nil, zone: nil, cluster_id: nil, parent: nil)
|
1710
|
+
# Pass arguments to `list_node_pools` 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 project_id [::String]
|
1715
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
1716
|
+
# number](https://developers.google.com/console/help/new/#projectnumber).
|
1717
|
+
# This field has been deprecated and replaced by the parent field.
|
1718
|
+
# @param zone [::String]
|
1719
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
1720
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1721
|
+
# resides.
|
1722
|
+
# This field has been deprecated and replaced by the parent field.
|
1723
|
+
# @param cluster_id [::String]
|
1724
|
+
# Required. Deprecated. The name of the cluster.
|
1725
|
+
# This field has been deprecated and replaced by the parent field.
|
1726
|
+
# @param parent [::String]
|
1727
|
+
# The parent (project, location, cluster id) where the node pools will be
|
1728
|
+
# listed. Specified in the format `projects/*/locations/*/clusters/*`.
|
1729
|
+
#
|
1730
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1731
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::ListNodePoolsResponse]
|
1732
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1733
|
+
#
|
1734
|
+
# @return [::Google::Cloud::Container::V1beta1::ListNodePoolsResponse]
|
1735
|
+
#
|
1736
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1737
|
+
#
|
1738
|
+
def list_node_pools request, options = nil
|
1739
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1740
|
+
|
1741
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::ListNodePoolsRequest
|
1742
|
+
|
1743
|
+
# Converts hash and nil to an options object
|
1744
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1745
|
+
|
1746
|
+
# Customize the options with defaults
|
1747
|
+
metadata = @config.rpcs.list_node_pools.metadata.to_h
|
1748
|
+
|
1749
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1750
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1751
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1752
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
1753
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1754
|
+
|
1755
|
+
header_params = {
|
1756
|
+
"parent" => request.parent
|
1757
|
+
}
|
1758
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1759
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1760
|
+
|
1761
|
+
options.apply_defaults timeout: @config.rpcs.list_node_pools.timeout,
|
1762
|
+
metadata: metadata,
|
1763
|
+
retry_policy: @config.rpcs.list_node_pools.retry_policy
|
1764
|
+
options.apply_defaults metadata: @config.metadata,
|
1765
|
+
retry_policy: @config.retry_policy
|
1766
|
+
|
1767
|
+
@cluster_manager_stub.call_rpc :list_node_pools, request, options: options do |response, operation|
|
1768
|
+
yield response, operation if block_given?
|
1769
|
+
return response
|
1770
|
+
end
|
1771
|
+
rescue ::GRPC::BadStatus => e
|
1772
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1773
|
+
end
|
1774
|
+
|
1775
|
+
##
|
1776
|
+
# Retrieves the requested node pool.
|
1777
|
+
#
|
1778
|
+
# @overload get_node_pool(request, options = nil)
|
1779
|
+
# Pass arguments to `get_node_pool` via a request object, either of type
|
1780
|
+
# {::Google::Cloud::Container::V1beta1::GetNodePoolRequest} or an equivalent Hash.
|
1781
|
+
#
|
1782
|
+
# @param request [::Google::Cloud::Container::V1beta1::GetNodePoolRequest, ::Hash]
|
1783
|
+
# A request object representing the call parameters. Required. To specify no
|
1784
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1785
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1786
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1787
|
+
#
|
1788
|
+
# @overload get_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, name: nil)
|
1789
|
+
# Pass arguments to `get_node_pool` via keyword arguments. Note that at
|
1790
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1791
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1792
|
+
#
|
1793
|
+
# @param project_id [::String]
|
1794
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
1795
|
+
# number](https://developers.google.com/console/help/new/#projectnumber).
|
1796
|
+
# This field has been deprecated and replaced by the name field.
|
1797
|
+
# @param zone [::String]
|
1798
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
1799
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1800
|
+
# resides.
|
1801
|
+
# This field has been deprecated and replaced by the name field.
|
1802
|
+
# @param cluster_id [::String]
|
1803
|
+
# Required. Deprecated. The name of the cluster.
|
1804
|
+
# This field has been deprecated and replaced by the name field.
|
1805
|
+
# @param node_pool_id [::String]
|
1806
|
+
# Required. Deprecated. The name of the node pool.
|
1807
|
+
# This field has been deprecated and replaced by the name field.
|
1808
|
+
# @param name [::String]
|
1809
|
+
# The name (project, location, cluster, node pool id) of the node pool to
|
1810
|
+
# get. Specified in the format
|
1811
|
+
# `projects/*/locations/*/clusters/*/nodePools/*`.
|
1812
|
+
#
|
1813
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1814
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::NodePool]
|
1815
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1816
|
+
#
|
1817
|
+
# @return [::Google::Cloud::Container::V1beta1::NodePool]
|
1818
|
+
#
|
1819
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1820
|
+
#
|
1821
|
+
def get_node_pool request, options = nil
|
1822
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1823
|
+
|
1824
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::GetNodePoolRequest
|
1825
|
+
|
1826
|
+
# Converts hash and nil to an options object
|
1827
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1828
|
+
|
1829
|
+
# Customize the options with defaults
|
1830
|
+
metadata = @config.rpcs.get_node_pool.metadata.to_h
|
1831
|
+
|
1832
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1833
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1834
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1835
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
1836
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1837
|
+
|
1838
|
+
header_params = {
|
1839
|
+
"name" => request.name
|
1840
|
+
}
|
1841
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1842
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1843
|
+
|
1844
|
+
options.apply_defaults timeout: @config.rpcs.get_node_pool.timeout,
|
1845
|
+
metadata: metadata,
|
1846
|
+
retry_policy: @config.rpcs.get_node_pool.retry_policy
|
1847
|
+
options.apply_defaults metadata: @config.metadata,
|
1848
|
+
retry_policy: @config.retry_policy
|
1849
|
+
|
1850
|
+
@cluster_manager_stub.call_rpc :get_node_pool, request, options: options do |response, operation|
|
1851
|
+
yield response, operation if block_given?
|
1852
|
+
return response
|
1853
|
+
end
|
1854
|
+
rescue ::GRPC::BadStatus => e
|
1855
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1856
|
+
end
|
1857
|
+
|
1858
|
+
##
|
1859
|
+
# Creates a node pool for a cluster.
|
1860
|
+
#
|
1861
|
+
# @overload create_node_pool(request, options = nil)
|
1862
|
+
# Pass arguments to `create_node_pool` via a request object, either of type
|
1863
|
+
# {::Google::Cloud::Container::V1beta1::CreateNodePoolRequest} or an equivalent Hash.
|
1864
|
+
#
|
1865
|
+
# @param request [::Google::Cloud::Container::V1beta1::CreateNodePoolRequest, ::Hash]
|
1866
|
+
# A request object representing the call parameters. Required. To specify no
|
1867
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1868
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1869
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1870
|
+
#
|
1871
|
+
# @overload create_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool: nil, parent: nil)
|
1872
|
+
# Pass arguments to `create_node_pool` via keyword arguments. Note that at
|
1873
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1874
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1875
|
+
#
|
1876
|
+
# @param project_id [::String]
|
1877
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
1878
|
+
# number](https://developers.google.com/console/help/new/#projectnumber).
|
1879
|
+
# This field has been deprecated and replaced by the parent field.
|
1880
|
+
# @param zone [::String]
|
1881
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
1882
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1883
|
+
# resides.
|
1884
|
+
# This field has been deprecated and replaced by the parent field.
|
1885
|
+
# @param cluster_id [::String]
|
1886
|
+
# Required. Deprecated. The name of the cluster.
|
1887
|
+
# This field has been deprecated and replaced by the parent field.
|
1888
|
+
# @param node_pool [::Google::Cloud::Container::V1beta1::NodePool, ::Hash]
|
1889
|
+
# Required. The node pool to create.
|
1890
|
+
# @param parent [::String]
|
1891
|
+
# The parent (project, location, cluster id) where the node pool will be
|
1892
|
+
# created. Specified in the format
|
1893
|
+
# `projects/*/locations/*/clusters/*`.
|
1894
|
+
#
|
1895
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1896
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
1897
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1898
|
+
#
|
1899
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
1900
|
+
#
|
1901
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1902
|
+
#
|
1903
|
+
def create_node_pool request, options = nil
|
1904
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1905
|
+
|
1906
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::CreateNodePoolRequest
|
1907
|
+
|
1908
|
+
# Converts hash and nil to an options object
|
1909
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1910
|
+
|
1911
|
+
# Customize the options with defaults
|
1912
|
+
metadata = @config.rpcs.create_node_pool.metadata.to_h
|
1913
|
+
|
1914
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1915
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1916
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1917
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
1918
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1919
|
+
|
1920
|
+
header_params = {
|
1921
|
+
"parent" => request.parent
|
1922
|
+
}
|
1923
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1924
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1925
|
+
|
1926
|
+
options.apply_defaults timeout: @config.rpcs.create_node_pool.timeout,
|
1927
|
+
metadata: metadata,
|
1928
|
+
retry_policy: @config.rpcs.create_node_pool.retry_policy
|
1929
|
+
options.apply_defaults metadata: @config.metadata,
|
1930
|
+
retry_policy: @config.retry_policy
|
1931
|
+
|
1932
|
+
@cluster_manager_stub.call_rpc :create_node_pool, request, options: options do |response, operation|
|
1933
|
+
yield response, operation if block_given?
|
1934
|
+
return response
|
1935
|
+
end
|
1936
|
+
rescue ::GRPC::BadStatus => e
|
1937
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1938
|
+
end
|
1939
|
+
|
1940
|
+
##
|
1941
|
+
# Deletes a node pool from a cluster.
|
1942
|
+
#
|
1943
|
+
# @overload delete_node_pool(request, options = nil)
|
1944
|
+
# Pass arguments to `delete_node_pool` via a request object, either of type
|
1945
|
+
# {::Google::Cloud::Container::V1beta1::DeleteNodePoolRequest} or an equivalent Hash.
|
1946
|
+
#
|
1947
|
+
# @param request [::Google::Cloud::Container::V1beta1::DeleteNodePoolRequest, ::Hash]
|
1948
|
+
# A request object representing the call parameters. Required. To specify no
|
1949
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1950
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1951
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1952
|
+
#
|
1953
|
+
# @overload delete_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, name: nil)
|
1954
|
+
# Pass arguments to `delete_node_pool` via keyword arguments. Note that at
|
1955
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1956
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1957
|
+
#
|
1958
|
+
# @param project_id [::String]
|
1959
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
1960
|
+
# number](https://developers.google.com/console/help/new/#projectnumber).
|
1961
|
+
# This field has been deprecated and replaced by the name field.
|
1962
|
+
# @param zone [::String]
|
1963
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
1964
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1965
|
+
# resides.
|
1966
|
+
# This field has been deprecated and replaced by the name field.
|
1967
|
+
# @param cluster_id [::String]
|
1968
|
+
# Required. Deprecated. The name of the cluster.
|
1969
|
+
# This field has been deprecated and replaced by the name field.
|
1970
|
+
# @param node_pool_id [::String]
|
1971
|
+
# Required. Deprecated. The name of the node pool to delete.
|
1972
|
+
# This field has been deprecated and replaced by the name field.
|
1973
|
+
# @param name [::String]
|
1974
|
+
# The name (project, location, cluster, node pool id) of the node pool to
|
1975
|
+
# delete. Specified in the format
|
1976
|
+
# `projects/*/locations/*/clusters/*/nodePools/*`.
|
1977
|
+
#
|
1978
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1979
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
1980
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1981
|
+
#
|
1982
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
1983
|
+
#
|
1984
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1985
|
+
#
|
1986
|
+
def delete_node_pool request, options = nil
|
1987
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1988
|
+
|
1989
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::DeleteNodePoolRequest
|
1990
|
+
|
1991
|
+
# Converts hash and nil to an options object
|
1992
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1993
|
+
|
1994
|
+
# Customize the options with defaults
|
1995
|
+
metadata = @config.rpcs.delete_node_pool.metadata.to_h
|
1996
|
+
|
1997
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1998
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1999
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2000
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
2001
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2002
|
+
|
2003
|
+
header_params = {
|
2004
|
+
"name" => request.name
|
2005
|
+
}
|
2006
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2007
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2008
|
+
|
2009
|
+
options.apply_defaults timeout: @config.rpcs.delete_node_pool.timeout,
|
2010
|
+
metadata: metadata,
|
2011
|
+
retry_policy: @config.rpcs.delete_node_pool.retry_policy
|
2012
|
+
options.apply_defaults metadata: @config.metadata,
|
2013
|
+
retry_policy: @config.retry_policy
|
2014
|
+
|
2015
|
+
@cluster_manager_stub.call_rpc :delete_node_pool, request, options: options do |response, operation|
|
2016
|
+
yield response, operation if block_given?
|
2017
|
+
return response
|
2018
|
+
end
|
2019
|
+
rescue ::GRPC::BadStatus => e
|
2020
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2021
|
+
end
|
2022
|
+
|
2023
|
+
##
|
2024
|
+
# Rolls back a previously Aborted or Failed NodePool upgrade.
|
2025
|
+
# This makes no changes if the last upgrade successfully completed.
|
2026
|
+
#
|
2027
|
+
# @overload rollback_node_pool_upgrade(request, options = nil)
|
2028
|
+
# Pass arguments to `rollback_node_pool_upgrade` via a request object, either of type
|
2029
|
+
# {::Google::Cloud::Container::V1beta1::RollbackNodePoolUpgradeRequest} or an equivalent Hash.
|
2030
|
+
#
|
2031
|
+
# @param request [::Google::Cloud::Container::V1beta1::RollbackNodePoolUpgradeRequest, ::Hash]
|
2032
|
+
# A request object representing the call parameters. Required. To specify no
|
2033
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2034
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2035
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2036
|
+
#
|
2037
|
+
# @overload rollback_node_pool_upgrade(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, name: nil)
|
2038
|
+
# Pass arguments to `rollback_node_pool_upgrade` via keyword arguments. Note that at
|
2039
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2040
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2041
|
+
#
|
2042
|
+
# @param project_id [::String]
|
2043
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
2044
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
2045
|
+
# This field has been deprecated and replaced by the name field.
|
2046
|
+
# @param zone [::String]
|
2047
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
2048
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
2049
|
+
# resides.
|
2050
|
+
# This field has been deprecated and replaced by the name field.
|
2051
|
+
# @param cluster_id [::String]
|
2052
|
+
# Required. Deprecated. The name of the cluster to rollback.
|
2053
|
+
# This field has been deprecated and replaced by the name field.
|
2054
|
+
# @param node_pool_id [::String]
|
2055
|
+
# Required. Deprecated. The name of the node pool to rollback.
|
2056
|
+
# This field has been deprecated and replaced by the name field.
|
2057
|
+
# @param name [::String]
|
2058
|
+
# The name (project, location, cluster, node pool id) of the node poll to
|
2059
|
+
# rollback upgrade.
|
2060
|
+
# Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
|
2061
|
+
#
|
2062
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2063
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
2064
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2065
|
+
#
|
2066
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
2067
|
+
#
|
2068
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2069
|
+
#
|
2070
|
+
def rollback_node_pool_upgrade request, options = nil
|
2071
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2072
|
+
|
2073
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::RollbackNodePoolUpgradeRequest
|
2074
|
+
|
2075
|
+
# Converts hash and nil to an options object
|
2076
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2077
|
+
|
2078
|
+
# Customize the options with defaults
|
2079
|
+
metadata = @config.rpcs.rollback_node_pool_upgrade.metadata.to_h
|
2080
|
+
|
2081
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2082
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2083
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2084
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
2085
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2086
|
+
|
2087
|
+
header_params = {
|
2088
|
+
"name" => request.name
|
2089
|
+
}
|
2090
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2091
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2092
|
+
|
2093
|
+
options.apply_defaults timeout: @config.rpcs.rollback_node_pool_upgrade.timeout,
|
2094
|
+
metadata: metadata,
|
2095
|
+
retry_policy: @config.rpcs.rollback_node_pool_upgrade.retry_policy
|
2096
|
+
options.apply_defaults metadata: @config.metadata,
|
2097
|
+
retry_policy: @config.retry_policy
|
2098
|
+
|
2099
|
+
@cluster_manager_stub.call_rpc :rollback_node_pool_upgrade, request, options: options do |response, operation|
|
2100
|
+
yield response, operation if block_given?
|
2101
|
+
return response
|
2102
|
+
end
|
2103
|
+
rescue ::GRPC::BadStatus => e
|
2104
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2105
|
+
end
|
2106
|
+
|
2107
|
+
##
|
2108
|
+
# Sets the NodeManagement options for a node pool.
|
2109
|
+
#
|
2110
|
+
# @overload set_node_pool_management(request, options = nil)
|
2111
|
+
# Pass arguments to `set_node_pool_management` via a request object, either of type
|
2112
|
+
# {::Google::Cloud::Container::V1beta1::SetNodePoolManagementRequest} or an equivalent Hash.
|
2113
|
+
#
|
2114
|
+
# @param request [::Google::Cloud::Container::V1beta1::SetNodePoolManagementRequest, ::Hash]
|
2115
|
+
# A request object representing the call parameters. Required. To specify no
|
2116
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2117
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2118
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2119
|
+
#
|
2120
|
+
# @overload set_node_pool_management(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, management: nil, name: nil)
|
2121
|
+
# Pass arguments to `set_node_pool_management` via keyword arguments. Note that at
|
2122
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2123
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2124
|
+
#
|
2125
|
+
# @param project_id [::String]
|
2126
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
2127
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
2128
|
+
# This field has been deprecated and replaced by the name field.
|
2129
|
+
# @param zone [::String]
|
2130
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
2131
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
2132
|
+
# resides.
|
2133
|
+
# This field has been deprecated and replaced by the name field.
|
2134
|
+
# @param cluster_id [::String]
|
2135
|
+
# Required. Deprecated. The name of the cluster to update.
|
2136
|
+
# This field has been deprecated and replaced by the name field.
|
2137
|
+
# @param node_pool_id [::String]
|
2138
|
+
# Required. Deprecated. The name of the node pool to update.
|
2139
|
+
# This field has been deprecated and replaced by the name field.
|
2140
|
+
# @param management [::Google::Cloud::Container::V1beta1::NodeManagement, ::Hash]
|
2141
|
+
# Required. NodeManagement configuration for the node pool.
|
2142
|
+
# @param name [::String]
|
2143
|
+
# The name (project, location, cluster, node pool id) of the node pool to set
|
2144
|
+
# management properties. Specified in the format
|
2145
|
+
# `projects/*/locations/*/clusters/*/nodePools/*`.
|
2146
|
+
#
|
2147
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2148
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
2149
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2150
|
+
#
|
2151
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
2152
|
+
#
|
2153
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2154
|
+
#
|
2155
|
+
def set_node_pool_management request, options = nil
|
2156
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2157
|
+
|
2158
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::SetNodePoolManagementRequest
|
2159
|
+
|
2160
|
+
# Converts hash and nil to an options object
|
2161
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2162
|
+
|
2163
|
+
# Customize the options with defaults
|
2164
|
+
metadata = @config.rpcs.set_node_pool_management.metadata.to_h
|
2165
|
+
|
2166
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2167
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2168
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2169
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
2170
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2171
|
+
|
2172
|
+
header_params = {
|
2173
|
+
"name" => request.name
|
2174
|
+
}
|
2175
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2176
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2177
|
+
|
2178
|
+
options.apply_defaults timeout: @config.rpcs.set_node_pool_management.timeout,
|
2179
|
+
metadata: metadata,
|
2180
|
+
retry_policy: @config.rpcs.set_node_pool_management.retry_policy
|
2181
|
+
options.apply_defaults metadata: @config.metadata,
|
2182
|
+
retry_policy: @config.retry_policy
|
2183
|
+
|
2184
|
+
@cluster_manager_stub.call_rpc :set_node_pool_management, request, options: options do |response, operation|
|
2185
|
+
yield response, operation if block_given?
|
2186
|
+
return response
|
2187
|
+
end
|
2188
|
+
rescue ::GRPC::BadStatus => e
|
2189
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2190
|
+
end
|
2191
|
+
|
2192
|
+
##
|
2193
|
+
# Sets labels on a cluster.
|
2194
|
+
#
|
2195
|
+
# @overload set_labels(request, options = nil)
|
2196
|
+
# Pass arguments to `set_labels` via a request object, either of type
|
2197
|
+
# {::Google::Cloud::Container::V1beta1::SetLabelsRequest} or an equivalent Hash.
|
2198
|
+
#
|
2199
|
+
# @param request [::Google::Cloud::Container::V1beta1::SetLabelsRequest, ::Hash]
|
2200
|
+
# A request object representing the call parameters. Required. To specify no
|
2201
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2202
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2203
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2204
|
+
#
|
2205
|
+
# @overload set_labels(project_id: nil, zone: nil, cluster_id: nil, resource_labels: nil, label_fingerprint: nil, name: nil)
|
2206
|
+
# Pass arguments to `set_labels` via keyword arguments. Note that at
|
2207
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2208
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2209
|
+
#
|
2210
|
+
# @param project_id [::String]
|
2211
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
2212
|
+
# number](https://developers.google.com/console/help/new/#projectnumber).
|
2213
|
+
# This field has been deprecated and replaced by the name field.
|
2214
|
+
# @param zone [::String]
|
2215
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
2216
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
2217
|
+
# resides.
|
2218
|
+
# This field has been deprecated and replaced by the name field.
|
2219
|
+
# @param cluster_id [::String]
|
2220
|
+
# Required. Deprecated. The name of the cluster.
|
2221
|
+
# This field has been deprecated and replaced by the name field.
|
2222
|
+
# @param resource_labels [::Hash{::String => ::String}]
|
2223
|
+
# Required. The labels to set for that cluster.
|
2224
|
+
# @param label_fingerprint [::String]
|
2225
|
+
# Required. The fingerprint of the previous set of labels for this resource,
|
2226
|
+
# used to detect conflicts. The fingerprint is initially generated by
|
2227
|
+
# Kubernetes Engine and changes after every request to modify or update
|
2228
|
+
# labels. You must always provide an up-to-date fingerprint hash when
|
2229
|
+
# updating or changing labels. Make a <code>get()</code> request to the
|
2230
|
+
# resource to get the latest fingerprint.
|
2231
|
+
# @param name [::String]
|
2232
|
+
# The name (project, location, cluster id) of the cluster to set labels.
|
2233
|
+
# Specified in the format `projects/*/locations/*/clusters/*`.
|
2234
|
+
#
|
2235
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2236
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
2237
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2238
|
+
#
|
2239
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
2240
|
+
#
|
2241
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2242
|
+
#
|
2243
|
+
def set_labels request, options = nil
|
2244
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2245
|
+
|
2246
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::SetLabelsRequest
|
2247
|
+
|
2248
|
+
# Converts hash and nil to an options object
|
2249
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2250
|
+
|
2251
|
+
# Customize the options with defaults
|
2252
|
+
metadata = @config.rpcs.set_labels.metadata.to_h
|
2253
|
+
|
2254
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2255
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2256
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2257
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
2258
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2259
|
+
|
2260
|
+
header_params = {
|
2261
|
+
"name" => request.name
|
2262
|
+
}
|
2263
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2264
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2265
|
+
|
2266
|
+
options.apply_defaults timeout: @config.rpcs.set_labels.timeout,
|
2267
|
+
metadata: metadata,
|
2268
|
+
retry_policy: @config.rpcs.set_labels.retry_policy
|
2269
|
+
options.apply_defaults metadata: @config.metadata,
|
2270
|
+
retry_policy: @config.retry_policy
|
2271
|
+
|
2272
|
+
@cluster_manager_stub.call_rpc :set_labels, request, options: options do |response, operation|
|
2273
|
+
yield response, operation if block_given?
|
2274
|
+
return response
|
2275
|
+
end
|
2276
|
+
rescue ::GRPC::BadStatus => e
|
2277
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2278
|
+
end
|
2279
|
+
|
2280
|
+
##
|
2281
|
+
# Enables or disables the ABAC authorization mechanism on a cluster.
|
2282
|
+
#
|
2283
|
+
# @overload set_legacy_abac(request, options = nil)
|
2284
|
+
# Pass arguments to `set_legacy_abac` via a request object, either of type
|
2285
|
+
# {::Google::Cloud::Container::V1beta1::SetLegacyAbacRequest} or an equivalent Hash.
|
2286
|
+
#
|
2287
|
+
# @param request [::Google::Cloud::Container::V1beta1::SetLegacyAbacRequest, ::Hash]
|
2288
|
+
# A request object representing the call parameters. Required. To specify no
|
2289
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2290
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2291
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2292
|
+
#
|
2293
|
+
# @overload set_legacy_abac(project_id: nil, zone: nil, cluster_id: nil, enabled: nil, name: nil)
|
2294
|
+
# Pass arguments to `set_legacy_abac` via keyword arguments. Note that at
|
2295
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2296
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2297
|
+
#
|
2298
|
+
# @param project_id [::String]
|
2299
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
2300
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
2301
|
+
# This field has been deprecated and replaced by the name field.
|
2302
|
+
# @param zone [::String]
|
2303
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
2304
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
2305
|
+
# resides.
|
2306
|
+
# This field has been deprecated and replaced by the name field.
|
2307
|
+
# @param cluster_id [::String]
|
2308
|
+
# Required. Deprecated. The name of the cluster to update.
|
2309
|
+
# This field has been deprecated and replaced by the name field.
|
2310
|
+
# @param enabled [::Boolean]
|
2311
|
+
# Required. Whether ABAC authorization will be enabled in the cluster.
|
2312
|
+
# @param name [::String]
|
2313
|
+
# The name (project, location, cluster id) of the cluster to set legacy abac.
|
2314
|
+
# Specified in the format `projects/*/locations/*/clusters/*`.
|
2315
|
+
#
|
2316
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2317
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
2318
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2319
|
+
#
|
2320
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
2321
|
+
#
|
2322
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2323
|
+
#
|
2324
|
+
def set_legacy_abac request, options = nil
|
2325
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2326
|
+
|
2327
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::SetLegacyAbacRequest
|
2328
|
+
|
2329
|
+
# Converts hash and nil to an options object
|
2330
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2331
|
+
|
2332
|
+
# Customize the options with defaults
|
2333
|
+
metadata = @config.rpcs.set_legacy_abac.metadata.to_h
|
2334
|
+
|
2335
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2336
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2337
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2338
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
2339
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2340
|
+
|
2341
|
+
header_params = {
|
2342
|
+
"name" => request.name
|
2343
|
+
}
|
2344
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2345
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2346
|
+
|
2347
|
+
options.apply_defaults timeout: @config.rpcs.set_legacy_abac.timeout,
|
2348
|
+
metadata: metadata,
|
2349
|
+
retry_policy: @config.rpcs.set_legacy_abac.retry_policy
|
2350
|
+
options.apply_defaults metadata: @config.metadata,
|
2351
|
+
retry_policy: @config.retry_policy
|
2352
|
+
|
2353
|
+
@cluster_manager_stub.call_rpc :set_legacy_abac, request, options: options do |response, operation|
|
2354
|
+
yield response, operation if block_given?
|
2355
|
+
return response
|
2356
|
+
end
|
2357
|
+
rescue ::GRPC::BadStatus => e
|
2358
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2359
|
+
end
|
2360
|
+
|
2361
|
+
##
|
2362
|
+
# Starts master IP rotation.
|
2363
|
+
#
|
2364
|
+
# @overload start_ip_rotation(request, options = nil)
|
2365
|
+
# Pass arguments to `start_ip_rotation` via a request object, either of type
|
2366
|
+
# {::Google::Cloud::Container::V1beta1::StartIPRotationRequest} or an equivalent Hash.
|
2367
|
+
#
|
2368
|
+
# @param request [::Google::Cloud::Container::V1beta1::StartIPRotationRequest, ::Hash]
|
2369
|
+
# A request object representing the call parameters. Required. To specify no
|
2370
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2371
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2372
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2373
|
+
#
|
2374
|
+
# @overload start_ip_rotation(project_id: nil, zone: nil, cluster_id: nil, name: nil, rotate_credentials: nil)
|
2375
|
+
# Pass arguments to `start_ip_rotation` via keyword arguments. Note that at
|
2376
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2377
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2378
|
+
#
|
2379
|
+
# @param project_id [::String]
|
2380
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
2381
|
+
# number](https://developers.google.com/console/help/new/#projectnumber).
|
2382
|
+
# This field has been deprecated and replaced by the name field.
|
2383
|
+
# @param zone [::String]
|
2384
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
2385
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
2386
|
+
# resides.
|
2387
|
+
# This field has been deprecated and replaced by the name field.
|
2388
|
+
# @param cluster_id [::String]
|
2389
|
+
# Required. Deprecated. The name of the cluster.
|
2390
|
+
# This field has been deprecated and replaced by the name field.
|
2391
|
+
# @param name [::String]
|
2392
|
+
# The name (project, location, cluster id) of the cluster to start IP
|
2393
|
+
# rotation. Specified in the format `projects/*/locations/*/clusters/*`.
|
2394
|
+
# @param rotate_credentials [::Boolean]
|
2395
|
+
# Whether to rotate credentials during IP rotation.
|
2396
|
+
#
|
2397
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2398
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
2399
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2400
|
+
#
|
2401
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
2402
|
+
#
|
2403
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2404
|
+
#
|
2405
|
+
def start_ip_rotation request, options = nil
|
2406
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2407
|
+
|
2408
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::StartIPRotationRequest
|
2409
|
+
|
2410
|
+
# Converts hash and nil to an options object
|
2411
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2412
|
+
|
2413
|
+
# Customize the options with defaults
|
2414
|
+
metadata = @config.rpcs.start_ip_rotation.metadata.to_h
|
2415
|
+
|
2416
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2417
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2418
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2419
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
2420
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2421
|
+
|
2422
|
+
header_params = {
|
2423
|
+
"name" => request.name
|
2424
|
+
}
|
2425
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2426
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2427
|
+
|
2428
|
+
options.apply_defaults timeout: @config.rpcs.start_ip_rotation.timeout,
|
2429
|
+
metadata: metadata,
|
2430
|
+
retry_policy: @config.rpcs.start_ip_rotation.retry_policy
|
2431
|
+
options.apply_defaults metadata: @config.metadata,
|
2432
|
+
retry_policy: @config.retry_policy
|
2433
|
+
|
2434
|
+
@cluster_manager_stub.call_rpc :start_ip_rotation, request, options: options do |response, operation|
|
2435
|
+
yield response, operation if block_given?
|
2436
|
+
return response
|
2437
|
+
end
|
2438
|
+
rescue ::GRPC::BadStatus => e
|
2439
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2440
|
+
end
|
2441
|
+
|
2442
|
+
##
|
2443
|
+
# Completes master IP rotation.
|
2444
|
+
#
|
2445
|
+
# @overload complete_ip_rotation(request, options = nil)
|
2446
|
+
# Pass arguments to `complete_ip_rotation` via a request object, either of type
|
2447
|
+
# {::Google::Cloud::Container::V1beta1::CompleteIPRotationRequest} or an equivalent Hash.
|
2448
|
+
#
|
2449
|
+
# @param request [::Google::Cloud::Container::V1beta1::CompleteIPRotationRequest, ::Hash]
|
2450
|
+
# A request object representing the call parameters. Required. To specify no
|
2451
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2452
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2453
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2454
|
+
#
|
2455
|
+
# @overload complete_ip_rotation(project_id: nil, zone: nil, cluster_id: nil, name: nil)
|
2456
|
+
# Pass arguments to `complete_ip_rotation` via keyword arguments. Note that at
|
2457
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2458
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2459
|
+
#
|
2460
|
+
# @param project_id [::String]
|
2461
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
2462
|
+
# number](https://developers.google.com/console/help/new/#projectnumber).
|
2463
|
+
# This field has been deprecated and replaced by the name field.
|
2464
|
+
# @param zone [::String]
|
2465
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
2466
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
2467
|
+
# resides.
|
2468
|
+
# This field has been deprecated and replaced by the name field.
|
2469
|
+
# @param cluster_id [::String]
|
2470
|
+
# Required. Deprecated. The name of the cluster.
|
2471
|
+
# This field has been deprecated and replaced by the name field.
|
2472
|
+
# @param name [::String]
|
2473
|
+
# The name (project, location, cluster id) of the cluster to complete IP
|
2474
|
+
# rotation. Specified in the format `projects/*/locations/*/clusters/*`.
|
2475
|
+
#
|
2476
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2477
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
2478
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2479
|
+
#
|
2480
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
2481
|
+
#
|
2482
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2483
|
+
#
|
2484
|
+
def complete_ip_rotation request, options = nil
|
2485
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2486
|
+
|
2487
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::CompleteIPRotationRequest
|
2488
|
+
|
2489
|
+
# Converts hash and nil to an options object
|
2490
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2491
|
+
|
2492
|
+
# Customize the options with defaults
|
2493
|
+
metadata = @config.rpcs.complete_ip_rotation.metadata.to_h
|
2494
|
+
|
2495
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2496
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2497
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2498
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
2499
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2500
|
+
|
2501
|
+
header_params = {
|
2502
|
+
"name" => request.name
|
2503
|
+
}
|
2504
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2505
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2506
|
+
|
2507
|
+
options.apply_defaults timeout: @config.rpcs.complete_ip_rotation.timeout,
|
2508
|
+
metadata: metadata,
|
2509
|
+
retry_policy: @config.rpcs.complete_ip_rotation.retry_policy
|
2510
|
+
options.apply_defaults metadata: @config.metadata,
|
2511
|
+
retry_policy: @config.retry_policy
|
2512
|
+
|
2513
|
+
@cluster_manager_stub.call_rpc :complete_ip_rotation, request, options: options do |response, operation|
|
2514
|
+
yield response, operation if block_given?
|
2515
|
+
return response
|
2516
|
+
end
|
2517
|
+
rescue ::GRPC::BadStatus => e
|
2518
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2519
|
+
end
|
2520
|
+
|
2521
|
+
##
|
2522
|
+
# Sets the size for a specific node pool.
|
2523
|
+
#
|
2524
|
+
# @overload set_node_pool_size(request, options = nil)
|
2525
|
+
# Pass arguments to `set_node_pool_size` via a request object, either of type
|
2526
|
+
# {::Google::Cloud::Container::V1beta1::SetNodePoolSizeRequest} or an equivalent Hash.
|
2527
|
+
#
|
2528
|
+
# @param request [::Google::Cloud::Container::V1beta1::SetNodePoolSizeRequest, ::Hash]
|
2529
|
+
# A request object representing the call parameters. Required. To specify no
|
2530
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2531
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2532
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2533
|
+
#
|
2534
|
+
# @overload set_node_pool_size(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_count: nil, name: nil)
|
2535
|
+
# Pass arguments to `set_node_pool_size` via keyword arguments. Note that at
|
2536
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2537
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2538
|
+
#
|
2539
|
+
# @param project_id [::String]
|
2540
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
2541
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
2542
|
+
# This field has been deprecated and replaced by the name field.
|
2543
|
+
# @param zone [::String]
|
2544
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
2545
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
2546
|
+
# resides.
|
2547
|
+
# This field has been deprecated and replaced by the name field.
|
2548
|
+
# @param cluster_id [::String]
|
2549
|
+
# Required. Deprecated. The name of the cluster to update.
|
2550
|
+
# This field has been deprecated and replaced by the name field.
|
2551
|
+
# @param node_pool_id [::String]
|
2552
|
+
# Required. Deprecated. The name of the node pool to update.
|
2553
|
+
# This field has been deprecated and replaced by the name field.
|
2554
|
+
# @param node_count [::Integer]
|
2555
|
+
# Required. The desired node count for the pool.
|
2556
|
+
# @param name [::String]
|
2557
|
+
# The name (project, location, cluster, node pool id) of the node pool to set
|
2558
|
+
# size.
|
2559
|
+
# Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
|
2560
|
+
#
|
2561
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2562
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
2563
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2564
|
+
#
|
2565
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
2566
|
+
#
|
2567
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2568
|
+
#
|
2569
|
+
def set_node_pool_size request, options = nil
|
2570
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2571
|
+
|
2572
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::SetNodePoolSizeRequest
|
2573
|
+
|
2574
|
+
# Converts hash and nil to an options object
|
2575
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2576
|
+
|
2577
|
+
# Customize the options with defaults
|
2578
|
+
metadata = @config.rpcs.set_node_pool_size.metadata.to_h
|
2579
|
+
|
2580
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2581
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2582
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2583
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
2584
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2585
|
+
|
2586
|
+
header_params = {
|
2587
|
+
"name" => request.name
|
2588
|
+
}
|
2589
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2590
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2591
|
+
|
2592
|
+
options.apply_defaults timeout: @config.rpcs.set_node_pool_size.timeout,
|
2593
|
+
metadata: metadata,
|
2594
|
+
retry_policy: @config.rpcs.set_node_pool_size.retry_policy
|
2595
|
+
options.apply_defaults metadata: @config.metadata,
|
2596
|
+
retry_policy: @config.retry_policy
|
2597
|
+
|
2598
|
+
@cluster_manager_stub.call_rpc :set_node_pool_size, request, options: options do |response, operation|
|
2599
|
+
yield response, operation if block_given?
|
2600
|
+
return response
|
2601
|
+
end
|
2602
|
+
rescue ::GRPC::BadStatus => e
|
2603
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2604
|
+
end
|
2605
|
+
|
2606
|
+
##
|
2607
|
+
# Enables or disables Network Policy for a cluster.
|
2608
|
+
#
|
2609
|
+
# @overload set_network_policy(request, options = nil)
|
2610
|
+
# Pass arguments to `set_network_policy` via a request object, either of type
|
2611
|
+
# {::Google::Cloud::Container::V1beta1::SetNetworkPolicyRequest} or an equivalent Hash.
|
2612
|
+
#
|
2613
|
+
# @param request [::Google::Cloud::Container::V1beta1::SetNetworkPolicyRequest, ::Hash]
|
2614
|
+
# A request object representing the call parameters. Required. To specify no
|
2615
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2616
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2617
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2618
|
+
#
|
2619
|
+
# @overload set_network_policy(project_id: nil, zone: nil, cluster_id: nil, network_policy: nil, name: nil)
|
2620
|
+
# Pass arguments to `set_network_policy` via keyword arguments. Note that at
|
2621
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2622
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2623
|
+
#
|
2624
|
+
# @param project_id [::String]
|
2625
|
+
# Required. Deprecated. The Google Developers Console [project ID or project
|
2626
|
+
# number](https://developers.google.com/console/help/new/#projectnumber).
|
2627
|
+
# This field has been deprecated and replaced by the name field.
|
2628
|
+
# @param zone [::String]
|
2629
|
+
# Required. Deprecated. The name of the Google Compute Engine
|
2630
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
2631
|
+
# resides.
|
2632
|
+
# This field has been deprecated and replaced by the name field.
|
2633
|
+
# @param cluster_id [::String]
|
2634
|
+
# Required. Deprecated. The name of the cluster.
|
2635
|
+
# This field has been deprecated and replaced by the name field.
|
2636
|
+
# @param network_policy [::Google::Cloud::Container::V1beta1::NetworkPolicy, ::Hash]
|
2637
|
+
# Required. Configuration options for the NetworkPolicy feature.
|
2638
|
+
# @param name [::String]
|
2639
|
+
# The name (project, location, cluster id) of the cluster to set networking
|
2640
|
+
# policy. Specified in the format `projects/*/locations/*/clusters/*`.
|
2641
|
+
#
|
2642
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2643
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
2644
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2645
|
+
#
|
2646
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
2647
|
+
#
|
2648
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2649
|
+
#
|
2650
|
+
def set_network_policy request, options = nil
|
2651
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2652
|
+
|
2653
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::SetNetworkPolicyRequest
|
2654
|
+
|
2655
|
+
# Converts hash and nil to an options object
|
2656
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2657
|
+
|
2658
|
+
# Customize the options with defaults
|
2659
|
+
metadata = @config.rpcs.set_network_policy.metadata.to_h
|
2660
|
+
|
2661
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2662
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2663
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2664
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
2665
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2666
|
+
|
2667
|
+
header_params = {
|
2668
|
+
"name" => request.name
|
2669
|
+
}
|
2670
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2671
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2672
|
+
|
2673
|
+
options.apply_defaults timeout: @config.rpcs.set_network_policy.timeout,
|
2674
|
+
metadata: metadata,
|
2675
|
+
retry_policy: @config.rpcs.set_network_policy.retry_policy
|
2676
|
+
options.apply_defaults metadata: @config.metadata,
|
2677
|
+
retry_policy: @config.retry_policy
|
2678
|
+
|
2679
|
+
@cluster_manager_stub.call_rpc :set_network_policy, request, options: options do |response, operation|
|
2680
|
+
yield response, operation if block_given?
|
2681
|
+
return response
|
2682
|
+
end
|
2683
|
+
rescue ::GRPC::BadStatus => e
|
2684
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2685
|
+
end
|
2686
|
+
|
2687
|
+
##
|
2688
|
+
# Sets the maintenance policy for a cluster.
|
2689
|
+
#
|
2690
|
+
# @overload set_maintenance_policy(request, options = nil)
|
2691
|
+
# Pass arguments to `set_maintenance_policy` via a request object, either of type
|
2692
|
+
# {::Google::Cloud::Container::V1beta1::SetMaintenancePolicyRequest} or an equivalent Hash.
|
2693
|
+
#
|
2694
|
+
# @param request [::Google::Cloud::Container::V1beta1::SetMaintenancePolicyRequest, ::Hash]
|
2695
|
+
# A request object representing the call parameters. Required. To specify no
|
2696
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2697
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2698
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2699
|
+
#
|
2700
|
+
# @overload set_maintenance_policy(project_id: nil, zone: nil, cluster_id: nil, maintenance_policy: nil, name: nil)
|
2701
|
+
# Pass arguments to `set_maintenance_policy` via keyword arguments. Note that at
|
2702
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2703
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2704
|
+
#
|
2705
|
+
# @param project_id [::String]
|
2706
|
+
# Required. The Google Developers Console [project ID or project
|
2707
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
2708
|
+
# @param zone [::String]
|
2709
|
+
# Required. The name of the Google Compute Engine
|
2710
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
2711
|
+
# resides.
|
2712
|
+
# @param cluster_id [::String]
|
2713
|
+
# Required. The name of the cluster to update.
|
2714
|
+
# @param maintenance_policy [::Google::Cloud::Container::V1beta1::MaintenancePolicy, ::Hash]
|
2715
|
+
# Required. The maintenance policy to be set for the cluster. An empty field
|
2716
|
+
# clears the existing maintenance policy.
|
2717
|
+
# @param name [::String]
|
2718
|
+
# The name (project, location, cluster id) of the cluster to set maintenance
|
2719
|
+
# policy.
|
2720
|
+
# Specified in the format `projects/*/locations/*/clusters/*`.
|
2721
|
+
#
|
2722
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2723
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
|
2724
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2725
|
+
#
|
2726
|
+
# @return [::Google::Cloud::Container::V1beta1::Operation]
|
2727
|
+
#
|
2728
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2729
|
+
#
|
2730
|
+
def set_maintenance_policy request, options = nil
|
2731
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2732
|
+
|
2733
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::SetMaintenancePolicyRequest
|
2734
|
+
|
2735
|
+
# Converts hash and nil to an options object
|
2736
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2737
|
+
|
2738
|
+
# Customize the options with defaults
|
2739
|
+
metadata = @config.rpcs.set_maintenance_policy.metadata.to_h
|
2740
|
+
|
2741
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2742
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2743
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2744
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
2745
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2746
|
+
|
2747
|
+
header_params = {
|
2748
|
+
"name" => request.name
|
2749
|
+
}
|
2750
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2751
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2752
|
+
|
2753
|
+
options.apply_defaults timeout: @config.rpcs.set_maintenance_policy.timeout,
|
2754
|
+
metadata: metadata,
|
2755
|
+
retry_policy: @config.rpcs.set_maintenance_policy.retry_policy
|
2756
|
+
options.apply_defaults metadata: @config.metadata,
|
2757
|
+
retry_policy: @config.retry_policy
|
2758
|
+
|
2759
|
+
@cluster_manager_stub.call_rpc :set_maintenance_policy, request, options: options do |response, operation|
|
2760
|
+
yield response, operation if block_given?
|
2761
|
+
return response
|
2762
|
+
end
|
2763
|
+
rescue ::GRPC::BadStatus => e
|
2764
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2765
|
+
end
|
2766
|
+
|
2767
|
+
##
|
2768
|
+
# Lists subnetworks that can be used for creating clusters in a project.
|
2769
|
+
#
|
2770
|
+
# @overload list_usable_subnetworks(request, options = nil)
|
2771
|
+
# Pass arguments to `list_usable_subnetworks` via a request object, either of type
|
2772
|
+
# {::Google::Cloud::Container::V1beta1::ListUsableSubnetworksRequest} or an equivalent Hash.
|
2773
|
+
#
|
2774
|
+
# @param request [::Google::Cloud::Container::V1beta1::ListUsableSubnetworksRequest, ::Hash]
|
2775
|
+
# A request object representing the call parameters. Required. To specify no
|
2776
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2777
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2778
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2779
|
+
#
|
2780
|
+
# @overload list_usable_subnetworks(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
2781
|
+
# Pass arguments to `list_usable_subnetworks` via keyword arguments. Note that at
|
2782
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2783
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2784
|
+
#
|
2785
|
+
# @param parent [::String]
|
2786
|
+
# Required. The parent project where subnetworks are usable.
|
2787
|
+
# Specified in the format `projects/*`.
|
2788
|
+
# @param filter [::String]
|
2789
|
+
# Filtering currently only supports equality on the networkProjectId and must
|
2790
|
+
# be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId`
|
2791
|
+
# is the project which owns the listed subnetworks. This defaults to the
|
2792
|
+
# parent project ID.
|
2793
|
+
# @param page_size [::Integer]
|
2794
|
+
# The max number of results per page that should be returned. If the number
|
2795
|
+
# of available results is larger than `page_size`, a `next_page_token` is
|
2796
|
+
# returned which can be used to get the next page of results in subsequent
|
2797
|
+
# requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
|
2798
|
+
# @param page_token [::String]
|
2799
|
+
# Specifies a page token to use. Set this to the nextPageToken returned by
|
2800
|
+
# previous list requests to get the next page of results.
|
2801
|
+
#
|
2802
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2803
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Container::V1beta1::UsableSubnetwork>]
|
2804
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2805
|
+
#
|
2806
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Container::V1beta1::UsableSubnetwork>]
|
2807
|
+
#
|
2808
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2809
|
+
#
|
2810
|
+
def list_usable_subnetworks request, options = nil
|
2811
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2812
|
+
|
2813
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::ListUsableSubnetworksRequest
|
2814
|
+
|
2815
|
+
# Converts hash and nil to an options object
|
2816
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2817
|
+
|
2818
|
+
# Customize the options with defaults
|
2819
|
+
metadata = @config.rpcs.list_usable_subnetworks.metadata.to_h
|
2820
|
+
|
2821
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2822
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2823
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2824
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
2825
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2826
|
+
|
2827
|
+
header_params = {
|
2828
|
+
"parent" => request.parent
|
2829
|
+
}
|
2830
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2831
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2832
|
+
|
2833
|
+
options.apply_defaults timeout: @config.rpcs.list_usable_subnetworks.timeout,
|
2834
|
+
metadata: metadata,
|
2835
|
+
retry_policy: @config.rpcs.list_usable_subnetworks.retry_policy
|
2836
|
+
options.apply_defaults metadata: @config.metadata,
|
2837
|
+
retry_policy: @config.retry_policy
|
2838
|
+
|
2839
|
+
@cluster_manager_stub.call_rpc :list_usable_subnetworks, request, options: options do |response, operation|
|
2840
|
+
response = ::Gapic::PagedEnumerable.new @cluster_manager_stub, :list_usable_subnetworks, request, response, operation, options
|
2841
|
+
yield response, operation if block_given?
|
2842
|
+
return response
|
2843
|
+
end
|
2844
|
+
rescue ::GRPC::BadStatus => e
|
2845
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2846
|
+
end
|
2847
|
+
|
2848
|
+
##
|
2849
|
+
# Fetches locations that offer Google Kubernetes Engine.
|
2850
|
+
#
|
2851
|
+
# @overload list_locations(request, options = nil)
|
2852
|
+
# Pass arguments to `list_locations` via a request object, either of type
|
2853
|
+
# {::Google::Cloud::Container::V1beta1::ListLocationsRequest} or an equivalent Hash.
|
2854
|
+
#
|
2855
|
+
# @param request [::Google::Cloud::Container::V1beta1::ListLocationsRequest, ::Hash]
|
2856
|
+
# A request object representing the call parameters. Required. To specify no
|
2857
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2858
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2859
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2860
|
+
#
|
2861
|
+
# @overload list_locations(parent: nil)
|
2862
|
+
# Pass arguments to `list_locations` via keyword arguments. Note that at
|
2863
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2864
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2865
|
+
#
|
2866
|
+
# @param parent [::String]
|
2867
|
+
# Required. Contains the name of the resource requested.
|
2868
|
+
# Specified in the format `projects/*`.
|
2869
|
+
#
|
2870
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2871
|
+
# @yieldparam response [::Google::Cloud::Container::V1beta1::ListLocationsResponse]
|
2872
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2873
|
+
#
|
2874
|
+
# @return [::Google::Cloud::Container::V1beta1::ListLocationsResponse]
|
2875
|
+
#
|
2876
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2877
|
+
#
|
2878
|
+
def list_locations request, options = nil
|
2879
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2880
|
+
|
2881
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::ListLocationsRequest
|
2882
|
+
|
2883
|
+
# Converts hash and nil to an options object
|
2884
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2885
|
+
|
2886
|
+
# Customize the options with defaults
|
2887
|
+
metadata = @config.rpcs.list_locations.metadata.to_h
|
2888
|
+
|
2889
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2890
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2891
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2892
|
+
gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
|
2893
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2894
|
+
|
2895
|
+
header_params = {
|
2896
|
+
"parent" => request.parent
|
2897
|
+
}
|
2898
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2899
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2900
|
+
|
2901
|
+
options.apply_defaults timeout: @config.rpcs.list_locations.timeout,
|
2902
|
+
metadata: metadata,
|
2903
|
+
retry_policy: @config.rpcs.list_locations.retry_policy
|
2904
|
+
options.apply_defaults metadata: @config.metadata,
|
2905
|
+
retry_policy: @config.retry_policy
|
2906
|
+
|
2907
|
+
@cluster_manager_stub.call_rpc :list_locations, request, options: options do |response, operation|
|
2908
|
+
yield response, operation if block_given?
|
2909
|
+
return response
|
2910
|
+
end
|
2911
|
+
rescue ::GRPC::BadStatus => e
|
2912
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2913
|
+
end
|
2914
|
+
|
2915
|
+
##
|
2916
|
+
# Configuration class for the ClusterManager API.
|
2917
|
+
#
|
2918
|
+
# This class represents the configuration for ClusterManager,
|
2919
|
+
# providing control over timeouts, retry behavior, logging, transport
|
2920
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
2921
|
+
# applied individually to specific RPCs. See
|
2922
|
+
# {::Google::Cloud::Container::V1beta1::ClusterManager::Client::Configuration::Rpcs}
|
2923
|
+
# for a list of RPCs that can be configured independently.
|
2924
|
+
#
|
2925
|
+
# Configuration can be applied globally to all clients, or to a single client
|
2926
|
+
# on construction.
|
2927
|
+
#
|
2928
|
+
# # Examples
|
2929
|
+
#
|
2930
|
+
# To modify the global config, setting the timeout for list_clusters
|
2931
|
+
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
2932
|
+
#
|
2933
|
+
# ::Google::Cloud::Container::V1beta1::ClusterManager::Client.configure do |config|
|
2934
|
+
# config.timeout = 10.0
|
2935
|
+
# config.rpcs.list_clusters.timeout = 20.0
|
2936
|
+
# end
|
2937
|
+
#
|
2938
|
+
# To apply the above configuration only to a new client:
|
2939
|
+
#
|
2940
|
+
# client = ::Google::Cloud::Container::V1beta1::ClusterManager::Client.new do |config|
|
2941
|
+
# config.timeout = 10.0
|
2942
|
+
# config.rpcs.list_clusters.timeout = 20.0
|
2943
|
+
# end
|
2944
|
+
#
|
2945
|
+
# @!attribute [rw] endpoint
|
2946
|
+
# The hostname or hostname:port of the service endpoint.
|
2947
|
+
# Defaults to `"container.googleapis.com"`.
|
2948
|
+
# @return [::String]
|
2949
|
+
# @!attribute [rw] credentials
|
2950
|
+
# Credentials to send with calls. You may provide any of the following types:
|
2951
|
+
# * (`String`) The path to a service account key file in JSON format
|
2952
|
+
# * (`Hash`) A service account key as a Hash
|
2953
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
2954
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
2955
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
2956
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
2957
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
2958
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
2959
|
+
# * (`nil`) indicating no credentials
|
2960
|
+
# @return [::Object]
|
2961
|
+
# @!attribute [rw] scope
|
2962
|
+
# The OAuth scopes
|
2963
|
+
# @return [::Array<::String>]
|
2964
|
+
# @!attribute [rw] lib_name
|
2965
|
+
# The library name as recorded in instrumentation and logging
|
2966
|
+
# @return [::String]
|
2967
|
+
# @!attribute [rw] lib_version
|
2968
|
+
# The library version as recorded in instrumentation and logging
|
2969
|
+
# @return [::String]
|
2970
|
+
# @!attribute [rw] channel_args
|
2971
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
2972
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
2973
|
+
# @return [::Hash]
|
2974
|
+
# @!attribute [rw] interceptors
|
2975
|
+
# An array of interceptors that are run before calls are executed.
|
2976
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
2977
|
+
# @!attribute [rw] timeout
|
2978
|
+
# The call timeout in seconds.
|
2979
|
+
# @return [::Numeric]
|
2980
|
+
# @!attribute [rw] metadata
|
2981
|
+
# Additional gRPC headers to be sent with the call.
|
2982
|
+
# @return [::Hash{::Symbol=>::String}]
|
2983
|
+
# @!attribute [rw] retry_policy
|
2984
|
+
# The retry policy. The value is a hash with the following keys:
|
2985
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
2986
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
2987
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
2988
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
2989
|
+
# trigger a retry.
|
2990
|
+
# @return [::Hash]
|
2991
|
+
#
|
2992
|
+
class Configuration
|
2993
|
+
extend ::Gapic::Config
|
2994
|
+
|
2995
|
+
config_attr :endpoint, "container.googleapis.com", String
|
2996
|
+
config_attr :credentials, nil do |value|
|
2997
|
+
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
2998
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
2999
|
+
allowed.any? { |klass| klass === value }
|
3000
|
+
end
|
3001
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
3002
|
+
config_attr :lib_name, nil, ::String, nil
|
3003
|
+
config_attr :lib_version, nil, ::String, nil
|
3004
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
3005
|
+
config_attr :interceptors, nil, ::Array, nil
|
3006
|
+
config_attr :timeout, nil, ::Numeric, nil
|
3007
|
+
config_attr :metadata, nil, ::Hash, nil
|
3008
|
+
config_attr :retry_policy, nil, ::Hash, Proc, nil
|
3009
|
+
|
3010
|
+
# @private
|
3011
|
+
def initialize parent_config = nil
|
3012
|
+
@parent_config = parent_config unless parent_config.nil?
|
3013
|
+
|
3014
|
+
yield self if block_given?
|
3015
|
+
end
|
3016
|
+
|
3017
|
+
##
|
3018
|
+
# Configurations for individual RPCs
|
3019
|
+
# @return [Rpcs]
|
3020
|
+
#
|
3021
|
+
def rpcs
|
3022
|
+
@rpcs ||= begin
|
3023
|
+
parent_rpcs = nil
|
3024
|
+
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
|
3025
|
+
Rpcs.new parent_rpcs
|
3026
|
+
end
|
3027
|
+
end
|
3028
|
+
|
3029
|
+
##
|
3030
|
+
# Configuration RPC class for the ClusterManager API.
|
3031
|
+
#
|
3032
|
+
# Includes fields providing the configuration for each RPC in this service.
|
3033
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
3034
|
+
# the following configuration fields:
|
3035
|
+
#
|
3036
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
|
3037
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
3038
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
3039
|
+
# include the following keys:
|
3040
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
3041
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
3042
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
3043
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
3044
|
+
# trigger a retry.
|
3045
|
+
#
|
3046
|
+
class Rpcs
|
3047
|
+
##
|
3048
|
+
# RPC-specific configuration for `list_clusters`
|
3049
|
+
# @return [::Gapic::Config::Method]
|
3050
|
+
#
|
3051
|
+
attr_reader :list_clusters
|
3052
|
+
##
|
3053
|
+
# RPC-specific configuration for `get_cluster`
|
3054
|
+
# @return [::Gapic::Config::Method]
|
3055
|
+
#
|
3056
|
+
attr_reader :get_cluster
|
3057
|
+
##
|
3058
|
+
# RPC-specific configuration for `create_cluster`
|
3059
|
+
# @return [::Gapic::Config::Method]
|
3060
|
+
#
|
3061
|
+
attr_reader :create_cluster
|
3062
|
+
##
|
3063
|
+
# RPC-specific configuration for `update_cluster`
|
3064
|
+
# @return [::Gapic::Config::Method]
|
3065
|
+
#
|
3066
|
+
attr_reader :update_cluster
|
3067
|
+
##
|
3068
|
+
# RPC-specific configuration for `update_node_pool`
|
3069
|
+
# @return [::Gapic::Config::Method]
|
3070
|
+
#
|
3071
|
+
attr_reader :update_node_pool
|
3072
|
+
##
|
3073
|
+
# RPC-specific configuration for `set_node_pool_autoscaling`
|
3074
|
+
# @return [::Gapic::Config::Method]
|
3075
|
+
#
|
3076
|
+
attr_reader :set_node_pool_autoscaling
|
3077
|
+
##
|
3078
|
+
# RPC-specific configuration for `set_logging_service`
|
3079
|
+
# @return [::Gapic::Config::Method]
|
3080
|
+
#
|
3081
|
+
attr_reader :set_logging_service
|
3082
|
+
##
|
3083
|
+
# RPC-specific configuration for `set_monitoring_service`
|
3084
|
+
# @return [::Gapic::Config::Method]
|
3085
|
+
#
|
3086
|
+
attr_reader :set_monitoring_service
|
3087
|
+
##
|
3088
|
+
# RPC-specific configuration for `set_addons_config`
|
3089
|
+
# @return [::Gapic::Config::Method]
|
3090
|
+
#
|
3091
|
+
attr_reader :set_addons_config
|
3092
|
+
##
|
3093
|
+
# RPC-specific configuration for `set_locations`
|
3094
|
+
# @return [::Gapic::Config::Method]
|
3095
|
+
#
|
3096
|
+
attr_reader :set_locations
|
3097
|
+
##
|
3098
|
+
# RPC-specific configuration for `update_master`
|
3099
|
+
# @return [::Gapic::Config::Method]
|
3100
|
+
#
|
3101
|
+
attr_reader :update_master
|
3102
|
+
##
|
3103
|
+
# RPC-specific configuration for `set_master_auth`
|
3104
|
+
# @return [::Gapic::Config::Method]
|
3105
|
+
#
|
3106
|
+
attr_reader :set_master_auth
|
3107
|
+
##
|
3108
|
+
# RPC-specific configuration for `delete_cluster`
|
3109
|
+
# @return [::Gapic::Config::Method]
|
3110
|
+
#
|
3111
|
+
attr_reader :delete_cluster
|
3112
|
+
##
|
3113
|
+
# RPC-specific configuration for `list_operations`
|
3114
|
+
# @return [::Gapic::Config::Method]
|
3115
|
+
#
|
3116
|
+
attr_reader :list_operations
|
3117
|
+
##
|
3118
|
+
# RPC-specific configuration for `get_operation`
|
3119
|
+
# @return [::Gapic::Config::Method]
|
3120
|
+
#
|
3121
|
+
attr_reader :get_operation
|
3122
|
+
##
|
3123
|
+
# RPC-specific configuration for `cancel_operation`
|
3124
|
+
# @return [::Gapic::Config::Method]
|
3125
|
+
#
|
3126
|
+
attr_reader :cancel_operation
|
3127
|
+
##
|
3128
|
+
# RPC-specific configuration for `get_server_config`
|
3129
|
+
# @return [::Gapic::Config::Method]
|
3130
|
+
#
|
3131
|
+
attr_reader :get_server_config
|
3132
|
+
##
|
3133
|
+
# RPC-specific configuration for `list_node_pools`
|
3134
|
+
# @return [::Gapic::Config::Method]
|
3135
|
+
#
|
3136
|
+
attr_reader :list_node_pools
|
3137
|
+
##
|
3138
|
+
# RPC-specific configuration for `get_node_pool`
|
3139
|
+
# @return [::Gapic::Config::Method]
|
3140
|
+
#
|
3141
|
+
attr_reader :get_node_pool
|
3142
|
+
##
|
3143
|
+
# RPC-specific configuration for `create_node_pool`
|
3144
|
+
# @return [::Gapic::Config::Method]
|
3145
|
+
#
|
3146
|
+
attr_reader :create_node_pool
|
3147
|
+
##
|
3148
|
+
# RPC-specific configuration for `delete_node_pool`
|
3149
|
+
# @return [::Gapic::Config::Method]
|
3150
|
+
#
|
3151
|
+
attr_reader :delete_node_pool
|
3152
|
+
##
|
3153
|
+
# RPC-specific configuration for `rollback_node_pool_upgrade`
|
3154
|
+
# @return [::Gapic::Config::Method]
|
3155
|
+
#
|
3156
|
+
attr_reader :rollback_node_pool_upgrade
|
3157
|
+
##
|
3158
|
+
# RPC-specific configuration for `set_node_pool_management`
|
3159
|
+
# @return [::Gapic::Config::Method]
|
3160
|
+
#
|
3161
|
+
attr_reader :set_node_pool_management
|
3162
|
+
##
|
3163
|
+
# RPC-specific configuration for `set_labels`
|
3164
|
+
# @return [::Gapic::Config::Method]
|
3165
|
+
#
|
3166
|
+
attr_reader :set_labels
|
3167
|
+
##
|
3168
|
+
# RPC-specific configuration for `set_legacy_abac`
|
3169
|
+
# @return [::Gapic::Config::Method]
|
3170
|
+
#
|
3171
|
+
attr_reader :set_legacy_abac
|
3172
|
+
##
|
3173
|
+
# RPC-specific configuration for `start_ip_rotation`
|
3174
|
+
# @return [::Gapic::Config::Method]
|
3175
|
+
#
|
3176
|
+
attr_reader :start_ip_rotation
|
3177
|
+
##
|
3178
|
+
# RPC-specific configuration for `complete_ip_rotation`
|
3179
|
+
# @return [::Gapic::Config::Method]
|
3180
|
+
#
|
3181
|
+
attr_reader :complete_ip_rotation
|
3182
|
+
##
|
3183
|
+
# RPC-specific configuration for `set_node_pool_size`
|
3184
|
+
# @return [::Gapic::Config::Method]
|
3185
|
+
#
|
3186
|
+
attr_reader :set_node_pool_size
|
3187
|
+
##
|
3188
|
+
# RPC-specific configuration for `set_network_policy`
|
3189
|
+
# @return [::Gapic::Config::Method]
|
3190
|
+
#
|
3191
|
+
attr_reader :set_network_policy
|
3192
|
+
##
|
3193
|
+
# RPC-specific configuration for `set_maintenance_policy`
|
3194
|
+
# @return [::Gapic::Config::Method]
|
3195
|
+
#
|
3196
|
+
attr_reader :set_maintenance_policy
|
3197
|
+
##
|
3198
|
+
# RPC-specific configuration for `list_usable_subnetworks`
|
3199
|
+
# @return [::Gapic::Config::Method]
|
3200
|
+
#
|
3201
|
+
attr_reader :list_usable_subnetworks
|
3202
|
+
##
|
3203
|
+
# RPC-specific configuration for `list_locations`
|
3204
|
+
# @return [::Gapic::Config::Method]
|
3205
|
+
#
|
3206
|
+
attr_reader :list_locations
|
3207
|
+
|
3208
|
+
# @private
|
3209
|
+
def initialize parent_rpcs = nil
|
3210
|
+
list_clusters_config = parent_rpcs&.list_clusters if parent_rpcs&.respond_to? :list_clusters
|
3211
|
+
@list_clusters = ::Gapic::Config::Method.new list_clusters_config
|
3212
|
+
get_cluster_config = parent_rpcs&.get_cluster if parent_rpcs&.respond_to? :get_cluster
|
3213
|
+
@get_cluster = ::Gapic::Config::Method.new get_cluster_config
|
3214
|
+
create_cluster_config = parent_rpcs&.create_cluster if parent_rpcs&.respond_to? :create_cluster
|
3215
|
+
@create_cluster = ::Gapic::Config::Method.new create_cluster_config
|
3216
|
+
update_cluster_config = parent_rpcs&.update_cluster if parent_rpcs&.respond_to? :update_cluster
|
3217
|
+
@update_cluster = ::Gapic::Config::Method.new update_cluster_config
|
3218
|
+
update_node_pool_config = parent_rpcs&.update_node_pool if parent_rpcs&.respond_to? :update_node_pool
|
3219
|
+
@update_node_pool = ::Gapic::Config::Method.new update_node_pool_config
|
3220
|
+
set_node_pool_autoscaling_config = parent_rpcs&.set_node_pool_autoscaling if parent_rpcs&.respond_to? :set_node_pool_autoscaling
|
3221
|
+
@set_node_pool_autoscaling = ::Gapic::Config::Method.new set_node_pool_autoscaling_config
|
3222
|
+
set_logging_service_config = parent_rpcs&.set_logging_service if parent_rpcs&.respond_to? :set_logging_service
|
3223
|
+
@set_logging_service = ::Gapic::Config::Method.new set_logging_service_config
|
3224
|
+
set_monitoring_service_config = parent_rpcs&.set_monitoring_service if parent_rpcs&.respond_to? :set_monitoring_service
|
3225
|
+
@set_monitoring_service = ::Gapic::Config::Method.new set_monitoring_service_config
|
3226
|
+
set_addons_config_config = parent_rpcs&.set_addons_config if parent_rpcs&.respond_to? :set_addons_config
|
3227
|
+
@set_addons_config = ::Gapic::Config::Method.new set_addons_config_config
|
3228
|
+
set_locations_config = parent_rpcs&.set_locations if parent_rpcs&.respond_to? :set_locations
|
3229
|
+
@set_locations = ::Gapic::Config::Method.new set_locations_config
|
3230
|
+
update_master_config = parent_rpcs&.update_master if parent_rpcs&.respond_to? :update_master
|
3231
|
+
@update_master = ::Gapic::Config::Method.new update_master_config
|
3232
|
+
set_master_auth_config = parent_rpcs&.set_master_auth if parent_rpcs&.respond_to? :set_master_auth
|
3233
|
+
@set_master_auth = ::Gapic::Config::Method.new set_master_auth_config
|
3234
|
+
delete_cluster_config = parent_rpcs&.delete_cluster if parent_rpcs&.respond_to? :delete_cluster
|
3235
|
+
@delete_cluster = ::Gapic::Config::Method.new delete_cluster_config
|
3236
|
+
list_operations_config = parent_rpcs&.list_operations if parent_rpcs&.respond_to? :list_operations
|
3237
|
+
@list_operations = ::Gapic::Config::Method.new list_operations_config
|
3238
|
+
get_operation_config = parent_rpcs&.get_operation if parent_rpcs&.respond_to? :get_operation
|
3239
|
+
@get_operation = ::Gapic::Config::Method.new get_operation_config
|
3240
|
+
cancel_operation_config = parent_rpcs&.cancel_operation if parent_rpcs&.respond_to? :cancel_operation
|
3241
|
+
@cancel_operation = ::Gapic::Config::Method.new cancel_operation_config
|
3242
|
+
get_server_config_config = parent_rpcs&.get_server_config if parent_rpcs&.respond_to? :get_server_config
|
3243
|
+
@get_server_config = ::Gapic::Config::Method.new get_server_config_config
|
3244
|
+
list_node_pools_config = parent_rpcs&.list_node_pools if parent_rpcs&.respond_to? :list_node_pools
|
3245
|
+
@list_node_pools = ::Gapic::Config::Method.new list_node_pools_config
|
3246
|
+
get_node_pool_config = parent_rpcs&.get_node_pool if parent_rpcs&.respond_to? :get_node_pool
|
3247
|
+
@get_node_pool = ::Gapic::Config::Method.new get_node_pool_config
|
3248
|
+
create_node_pool_config = parent_rpcs&.create_node_pool if parent_rpcs&.respond_to? :create_node_pool
|
3249
|
+
@create_node_pool = ::Gapic::Config::Method.new create_node_pool_config
|
3250
|
+
delete_node_pool_config = parent_rpcs&.delete_node_pool if parent_rpcs&.respond_to? :delete_node_pool
|
3251
|
+
@delete_node_pool = ::Gapic::Config::Method.new delete_node_pool_config
|
3252
|
+
rollback_node_pool_upgrade_config = parent_rpcs&.rollback_node_pool_upgrade if parent_rpcs&.respond_to? :rollback_node_pool_upgrade
|
3253
|
+
@rollback_node_pool_upgrade = ::Gapic::Config::Method.new rollback_node_pool_upgrade_config
|
3254
|
+
set_node_pool_management_config = parent_rpcs&.set_node_pool_management if parent_rpcs&.respond_to? :set_node_pool_management
|
3255
|
+
@set_node_pool_management = ::Gapic::Config::Method.new set_node_pool_management_config
|
3256
|
+
set_labels_config = parent_rpcs&.set_labels if parent_rpcs&.respond_to? :set_labels
|
3257
|
+
@set_labels = ::Gapic::Config::Method.new set_labels_config
|
3258
|
+
set_legacy_abac_config = parent_rpcs&.set_legacy_abac if parent_rpcs&.respond_to? :set_legacy_abac
|
3259
|
+
@set_legacy_abac = ::Gapic::Config::Method.new set_legacy_abac_config
|
3260
|
+
start_ip_rotation_config = parent_rpcs&.start_ip_rotation if parent_rpcs&.respond_to? :start_ip_rotation
|
3261
|
+
@start_ip_rotation = ::Gapic::Config::Method.new start_ip_rotation_config
|
3262
|
+
complete_ip_rotation_config = parent_rpcs&.complete_ip_rotation if parent_rpcs&.respond_to? :complete_ip_rotation
|
3263
|
+
@complete_ip_rotation = ::Gapic::Config::Method.new complete_ip_rotation_config
|
3264
|
+
set_node_pool_size_config = parent_rpcs&.set_node_pool_size if parent_rpcs&.respond_to? :set_node_pool_size
|
3265
|
+
@set_node_pool_size = ::Gapic::Config::Method.new set_node_pool_size_config
|
3266
|
+
set_network_policy_config = parent_rpcs&.set_network_policy if parent_rpcs&.respond_to? :set_network_policy
|
3267
|
+
@set_network_policy = ::Gapic::Config::Method.new set_network_policy_config
|
3268
|
+
set_maintenance_policy_config = parent_rpcs&.set_maintenance_policy if parent_rpcs&.respond_to? :set_maintenance_policy
|
3269
|
+
@set_maintenance_policy = ::Gapic::Config::Method.new set_maintenance_policy_config
|
3270
|
+
list_usable_subnetworks_config = parent_rpcs&.list_usable_subnetworks if parent_rpcs&.respond_to? :list_usable_subnetworks
|
3271
|
+
@list_usable_subnetworks = ::Gapic::Config::Method.new list_usable_subnetworks_config
|
3272
|
+
list_locations_config = parent_rpcs&.list_locations if parent_rpcs&.respond_to? :list_locations
|
3273
|
+
@list_locations = ::Gapic::Config::Method.new list_locations_config
|
3274
|
+
|
3275
|
+
yield self if block_given?
|
3276
|
+
end
|
3277
|
+
end
|
3278
|
+
end
|
3279
|
+
end
|
3280
|
+
end
|
3281
|
+
end
|
3282
|
+
end
|
3283
|
+
end
|
3284
|
+
end
|