google-cloud-container 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/container.rb +1 -1
- data/lib/google/cloud/container/v1.rb +1 -1
- data/lib/google/cloud/container/v1/cluster_manager_client.rb +1 -1
- data/lib/google/cloud/container/v1/credentials.rb +1 -1
- data/lib/google/cloud/container/v1/doc/google/container/v1/cluster_service.rb +1 -1
- data/lib/google/cloud/container/v1/doc/google/protobuf/empty.rb +1 -1
- data/lib/google/cloud/container/v1beta1.rb +149 -0
- data/lib/google/cloud/container/v1beta1/cluster_manager_client.rb +2404 -0
- data/lib/google/cloud/container/v1beta1/cluster_manager_client_config.json +186 -0
- data/lib/google/cloud/container/v1beta1/credentials.rb +41 -0
- data/lib/google/cloud/container/v1beta1/doc/google/container/v1beta1/cluster_service.rb +2338 -0
- data/lib/google/cloud/container/v1beta1/doc/google/protobuf/empty.rb +29 -0
- data/lib/google/container/v1beta1/cluster_service_pb.rb +734 -0
- data/lib/google/container/v1beta1/cluster_service_services_pb.rb +132 -0
- metadata +13 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc38e9352fcf4315cadd3852c1986606a8c7f2ae2f36c71e0d9a2b1f373671c4
|
4
|
+
data.tar.gz: '087ffd9e3464633852e42ecbc2799a5bf24f6da7af10dd2391606b8a18f5e671'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba8c035b4d7fd8c8898128e35df2e8d0790a7b9d17dbd6441c0f3bbf105e0ecce7f48c490abf0fc3fdc4d38486390f45fb11630d6227fe0fa87b7c30443d907a
|
7
|
+
data.tar.gz: 96a7c9df583f6d7531913e64a2efe3c10a07ecc6abc5edba1010a87ca6a09095ae7ba2aa77dad2e3878046f2c5dc803403e3f337451149a53674cb96acaf27d2
|
@@ -0,0 +1,149 @@
|
|
1
|
+
# Copyright 2019 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
|
16
|
+
require "google/cloud/container/v1beta1/cluster_manager_client"
|
17
|
+
|
18
|
+
module Google
|
19
|
+
module Cloud
|
20
|
+
module Container
|
21
|
+
# rubocop:disable LineLength
|
22
|
+
|
23
|
+
##
|
24
|
+
# # Ruby Client for Kubernetes Engine API ([Beta](https://github.com/googleapis/google-cloud-ruby#versioning))
|
25
|
+
#
|
26
|
+
# [Kubernetes Engine API][Product Documentation]:
|
27
|
+
# Builds and manages container-based applications, powered by the open source
|
28
|
+
# Kubernetes technology.
|
29
|
+
# - [Product Documentation][]
|
30
|
+
#
|
31
|
+
# ## Quick Start
|
32
|
+
# In order to use this library, you first need to go through the following
|
33
|
+
# steps:
|
34
|
+
#
|
35
|
+
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
36
|
+
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
37
|
+
# 3. [Enable the Kubernetes Engine API.](https://console.cloud.google.com/apis/library/container.googleapis.com)
|
38
|
+
# 4. [Setup Authentication.](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
39
|
+
#
|
40
|
+
# ### Installation
|
41
|
+
# ```
|
42
|
+
# $ gem install google-cloud-container
|
43
|
+
# ```
|
44
|
+
#
|
45
|
+
# ### Preview
|
46
|
+
# #### ClusterManagerClient
|
47
|
+
# ```rb
|
48
|
+
# require "google/cloud/container"
|
49
|
+
#
|
50
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
51
|
+
# project_id_2 = project_id
|
52
|
+
# zone = "us-central1-a"
|
53
|
+
# response = cluster_manager_client.list_clusters(project_id_2, zone)
|
54
|
+
# ```
|
55
|
+
#
|
56
|
+
# ### Next Steps
|
57
|
+
# - Read the [Kubernetes Engine API Product documentation][Product Documentation]
|
58
|
+
# to learn more about the product and see How-to Guides.
|
59
|
+
# - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
|
60
|
+
# to see the full list of Cloud APIs that we cover.
|
61
|
+
#
|
62
|
+
# [Product Documentation]: https://cloud.google.com/container
|
63
|
+
#
|
64
|
+
# ## Enabling Logging
|
65
|
+
#
|
66
|
+
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
67
|
+
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
68
|
+
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
69
|
+
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
70
|
+
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
71
|
+
#
|
72
|
+
# Configuring a Ruby stdlib logger:
|
73
|
+
#
|
74
|
+
# ```ruby
|
75
|
+
# require "logger"
|
76
|
+
#
|
77
|
+
# module MyLogger
|
78
|
+
# LOGGER = Logger.new $stderr, level: Logger::WARN
|
79
|
+
# def logger
|
80
|
+
# LOGGER
|
81
|
+
# end
|
82
|
+
# end
|
83
|
+
#
|
84
|
+
# # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
85
|
+
# module GRPC
|
86
|
+
# extend MyLogger
|
87
|
+
# end
|
88
|
+
# ```
|
89
|
+
#
|
90
|
+
module V1beta1
|
91
|
+
# rubocop:enable LineLength
|
92
|
+
|
93
|
+
##
|
94
|
+
# Google Kubernetes Engine Cluster Manager v1beta1
|
95
|
+
#
|
96
|
+
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
97
|
+
# Provides the means for authenticating requests made by the client. This parameter can
|
98
|
+
# be many types.
|
99
|
+
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
100
|
+
# authenticating requests made by this client.
|
101
|
+
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
102
|
+
# credentials for this client.
|
103
|
+
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
104
|
+
# credentials for this client.
|
105
|
+
# A `GRPC::Core::Channel` will be used to make calls through.
|
106
|
+
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
107
|
+
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
108
|
+
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
109
|
+
# metadata for requests, generally, to give OAuth credentials.
|
110
|
+
# @param scopes [Array<String>]
|
111
|
+
# The OAuth scopes for this service. This parameter is ignored if
|
112
|
+
# an updater_proc is supplied.
|
113
|
+
# @param client_config [Hash]
|
114
|
+
# A Hash for call options for each method. See
|
115
|
+
# Google::Gax#construct_settings for the structure of
|
116
|
+
# this data. Falls back to the default config if not specified
|
117
|
+
# or the specified config is missing data points.
|
118
|
+
# @param timeout [Numeric]
|
119
|
+
# The default timeout, in seconds, for calls made through this client.
|
120
|
+
# @param metadata [Hash]
|
121
|
+
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
122
|
+
# @param exception_transformer [Proc]
|
123
|
+
# An optional proc that intercepts any exceptions raised during an API call to inject
|
124
|
+
# custom error handling.
|
125
|
+
def self.new \
|
126
|
+
credentials: nil,
|
127
|
+
scopes: nil,
|
128
|
+
client_config: nil,
|
129
|
+
timeout: nil,
|
130
|
+
metadata: nil,
|
131
|
+
exception_transformer: nil,
|
132
|
+
lib_name: nil,
|
133
|
+
lib_version: nil
|
134
|
+
kwargs = {
|
135
|
+
credentials: credentials,
|
136
|
+
scopes: scopes,
|
137
|
+
client_config: client_config,
|
138
|
+
timeout: timeout,
|
139
|
+
metadata: metadata,
|
140
|
+
exception_transformer: exception_transformer,
|
141
|
+
lib_name: lib_name,
|
142
|
+
lib_version: lib_version
|
143
|
+
}.select { |_, v| v != nil }
|
144
|
+
Google::Cloud::Container::V1beta1::ClusterManagerClient.new(**kwargs)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
@@ -0,0 +1,2404 @@
|
|
1
|
+
# Copyright 2019 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
#
|
15
|
+
# EDITING INSTRUCTIONS
|
16
|
+
# This file was generated from the file
|
17
|
+
# https://github.com/googleapis/googleapis/blob/master/google/container/v1beta1/cluster_service.proto,
|
18
|
+
# and updates to that file get reflected here through a refresh process.
|
19
|
+
# For the short term, the refresh process will only be runnable by Google
|
20
|
+
# engineers.
|
21
|
+
|
22
|
+
|
23
|
+
require "json"
|
24
|
+
require "pathname"
|
25
|
+
|
26
|
+
require "google/gax"
|
27
|
+
|
28
|
+
require "google/container/v1beta1/cluster_service_pb"
|
29
|
+
require "google/cloud/container/v1beta1/credentials"
|
30
|
+
|
31
|
+
module Google
|
32
|
+
module Cloud
|
33
|
+
module Container
|
34
|
+
module V1beta1
|
35
|
+
# Google Kubernetes Engine Cluster Manager v1beta1
|
36
|
+
#
|
37
|
+
# @!attribute [r] cluster_manager_stub
|
38
|
+
# @return [Google::Container::V1beta1::ClusterManager::Stub]
|
39
|
+
class ClusterManagerClient
|
40
|
+
# @private
|
41
|
+
attr_reader :cluster_manager_stub
|
42
|
+
|
43
|
+
# The default address of the service.
|
44
|
+
SERVICE_ADDRESS = "container.googleapis.com".freeze
|
45
|
+
|
46
|
+
# The default port of the service.
|
47
|
+
DEFAULT_SERVICE_PORT = 443
|
48
|
+
|
49
|
+
# The default set of gRPC interceptors.
|
50
|
+
GRPC_INTERCEPTORS = []
|
51
|
+
|
52
|
+
DEFAULT_TIMEOUT = 30
|
53
|
+
|
54
|
+
PAGE_DESCRIPTORS = {
|
55
|
+
"list_usable_subnetworks" => Google::Gax::PageDescriptor.new(
|
56
|
+
"page_token",
|
57
|
+
"next_page_token",
|
58
|
+
"subnetworks")
|
59
|
+
}.freeze
|
60
|
+
|
61
|
+
private_constant :PAGE_DESCRIPTORS
|
62
|
+
|
63
|
+
# The scopes needed to make gRPC calls to all of the methods defined in
|
64
|
+
# this service.
|
65
|
+
ALL_SCOPES = [
|
66
|
+
"https://www.googleapis.com/auth/cloud-platform"
|
67
|
+
].freeze
|
68
|
+
|
69
|
+
|
70
|
+
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
71
|
+
# Provides the means for authenticating requests made by the client. This parameter can
|
72
|
+
# be many types.
|
73
|
+
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
74
|
+
# authenticating requests made by this client.
|
75
|
+
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
76
|
+
# credentials for this client.
|
77
|
+
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
78
|
+
# credentials for this client.
|
79
|
+
# A `GRPC::Core::Channel` will be used to make calls through.
|
80
|
+
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
81
|
+
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
82
|
+
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
83
|
+
# metadata for requests, generally, to give OAuth credentials.
|
84
|
+
# @param scopes [Array<String>]
|
85
|
+
# The OAuth scopes for this service. This parameter is ignored if
|
86
|
+
# an updater_proc is supplied.
|
87
|
+
# @param client_config [Hash]
|
88
|
+
# A Hash for call options for each method. See
|
89
|
+
# Google::Gax#construct_settings for the structure of
|
90
|
+
# this data. Falls back to the default config if not specified
|
91
|
+
# or the specified config is missing data points.
|
92
|
+
# @param timeout [Numeric]
|
93
|
+
# The default timeout, in seconds, for calls made through this client.
|
94
|
+
# @param metadata [Hash]
|
95
|
+
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
96
|
+
# @param exception_transformer [Proc]
|
97
|
+
# An optional proc that intercepts any exceptions raised during an API call to inject
|
98
|
+
# custom error handling.
|
99
|
+
def initialize \
|
100
|
+
credentials: nil,
|
101
|
+
scopes: ALL_SCOPES,
|
102
|
+
client_config: {},
|
103
|
+
timeout: DEFAULT_TIMEOUT,
|
104
|
+
metadata: nil,
|
105
|
+
exception_transformer: nil,
|
106
|
+
lib_name: nil,
|
107
|
+
lib_version: ""
|
108
|
+
# These require statements are intentionally placed here to initialize
|
109
|
+
# the gRPC module only when it's required.
|
110
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
111
|
+
require "google/gax/grpc"
|
112
|
+
require "google/container/v1beta1/cluster_service_services_pb"
|
113
|
+
|
114
|
+
credentials ||= Google::Cloud::Container::V1beta1::Credentials.default
|
115
|
+
|
116
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
117
|
+
updater_proc = Google::Cloud::Container::V1beta1::Credentials.new(credentials).updater_proc
|
118
|
+
end
|
119
|
+
if credentials.is_a?(GRPC::Core::Channel)
|
120
|
+
channel = credentials
|
121
|
+
end
|
122
|
+
if credentials.is_a?(GRPC::Core::ChannelCredentials)
|
123
|
+
chan_creds = credentials
|
124
|
+
end
|
125
|
+
if credentials.is_a?(Proc)
|
126
|
+
updater_proc = credentials
|
127
|
+
end
|
128
|
+
if credentials.is_a?(Google::Auth::Credentials)
|
129
|
+
updater_proc = credentials.updater_proc
|
130
|
+
end
|
131
|
+
|
132
|
+
package_version = Gem.loaded_specs['google-cloud-container'].version.version
|
133
|
+
|
134
|
+
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
135
|
+
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
136
|
+
google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
|
137
|
+
google_api_client << " grpc/#{GRPC::VERSION}"
|
138
|
+
google_api_client.freeze
|
139
|
+
|
140
|
+
headers = { :"x-goog-api-client" => google_api_client }
|
141
|
+
headers.merge!(metadata) unless metadata.nil?
|
142
|
+
client_config_file = Pathname.new(__dir__).join(
|
143
|
+
"cluster_manager_client_config.json"
|
144
|
+
)
|
145
|
+
defaults = client_config_file.open do |f|
|
146
|
+
Google::Gax.construct_settings(
|
147
|
+
"google.container.v1beta1.ClusterManager",
|
148
|
+
JSON.parse(f.read),
|
149
|
+
client_config,
|
150
|
+
Google::Gax::Grpc::STATUS_CODE_NAMES,
|
151
|
+
timeout,
|
152
|
+
page_descriptors: PAGE_DESCRIPTORS,
|
153
|
+
errors: Google::Gax::Grpc::API_ERRORS,
|
154
|
+
metadata: headers
|
155
|
+
)
|
156
|
+
end
|
157
|
+
|
158
|
+
# Allow overriding the service path/port in subclasses.
|
159
|
+
service_path = self.class::SERVICE_ADDRESS
|
160
|
+
port = self.class::DEFAULT_SERVICE_PORT
|
161
|
+
interceptors = self.class::GRPC_INTERCEPTORS
|
162
|
+
@cluster_manager_stub = Google::Gax::Grpc.create_stub(
|
163
|
+
service_path,
|
164
|
+
port,
|
165
|
+
chan_creds: chan_creds,
|
166
|
+
channel: channel,
|
167
|
+
updater_proc: updater_proc,
|
168
|
+
scopes: scopes,
|
169
|
+
interceptors: interceptors,
|
170
|
+
&Google::Container::V1beta1::ClusterManager::Stub.method(:new)
|
171
|
+
)
|
172
|
+
|
173
|
+
@list_clusters = Google::Gax.create_api_call(
|
174
|
+
@cluster_manager_stub.method(:list_clusters),
|
175
|
+
defaults["list_clusters"],
|
176
|
+
exception_transformer: exception_transformer
|
177
|
+
)
|
178
|
+
@get_cluster = Google::Gax.create_api_call(
|
179
|
+
@cluster_manager_stub.method(:get_cluster),
|
180
|
+
defaults["get_cluster"],
|
181
|
+
exception_transformer: exception_transformer
|
182
|
+
)
|
183
|
+
@create_cluster = Google::Gax.create_api_call(
|
184
|
+
@cluster_manager_stub.method(:create_cluster),
|
185
|
+
defaults["create_cluster"],
|
186
|
+
exception_transformer: exception_transformer
|
187
|
+
)
|
188
|
+
@update_cluster = Google::Gax.create_api_call(
|
189
|
+
@cluster_manager_stub.method(:update_cluster),
|
190
|
+
defaults["update_cluster"],
|
191
|
+
exception_transformer: exception_transformer
|
192
|
+
)
|
193
|
+
@update_node_pool = Google::Gax.create_api_call(
|
194
|
+
@cluster_manager_stub.method(:update_node_pool),
|
195
|
+
defaults["update_node_pool"],
|
196
|
+
exception_transformer: exception_transformer
|
197
|
+
)
|
198
|
+
@set_node_pool_autoscaling = Google::Gax.create_api_call(
|
199
|
+
@cluster_manager_stub.method(:set_node_pool_autoscaling),
|
200
|
+
defaults["set_node_pool_autoscaling"],
|
201
|
+
exception_transformer: exception_transformer
|
202
|
+
)
|
203
|
+
@set_logging_service = Google::Gax.create_api_call(
|
204
|
+
@cluster_manager_stub.method(:set_logging_service),
|
205
|
+
defaults["set_logging_service"],
|
206
|
+
exception_transformer: exception_transformer
|
207
|
+
)
|
208
|
+
@set_monitoring_service = Google::Gax.create_api_call(
|
209
|
+
@cluster_manager_stub.method(:set_monitoring_service),
|
210
|
+
defaults["set_monitoring_service"],
|
211
|
+
exception_transformer: exception_transformer
|
212
|
+
)
|
213
|
+
@set_addons_config = Google::Gax.create_api_call(
|
214
|
+
@cluster_manager_stub.method(:set_addons_config),
|
215
|
+
defaults["set_addons_config"],
|
216
|
+
exception_transformer: exception_transformer
|
217
|
+
)
|
218
|
+
@set_locations = Google::Gax.create_api_call(
|
219
|
+
@cluster_manager_stub.method(:set_locations),
|
220
|
+
defaults["set_locations"],
|
221
|
+
exception_transformer: exception_transformer
|
222
|
+
)
|
223
|
+
@update_master = Google::Gax.create_api_call(
|
224
|
+
@cluster_manager_stub.method(:update_master),
|
225
|
+
defaults["update_master"],
|
226
|
+
exception_transformer: exception_transformer
|
227
|
+
)
|
228
|
+
@set_master_auth = Google::Gax.create_api_call(
|
229
|
+
@cluster_manager_stub.method(:set_master_auth),
|
230
|
+
defaults["set_master_auth"],
|
231
|
+
exception_transformer: exception_transformer
|
232
|
+
)
|
233
|
+
@delete_cluster = Google::Gax.create_api_call(
|
234
|
+
@cluster_manager_stub.method(:delete_cluster),
|
235
|
+
defaults["delete_cluster"],
|
236
|
+
exception_transformer: exception_transformer
|
237
|
+
)
|
238
|
+
@list_operations = Google::Gax.create_api_call(
|
239
|
+
@cluster_manager_stub.method(:list_operations),
|
240
|
+
defaults["list_operations"],
|
241
|
+
exception_transformer: exception_transformer
|
242
|
+
)
|
243
|
+
@get_operation = Google::Gax.create_api_call(
|
244
|
+
@cluster_manager_stub.method(:get_operation),
|
245
|
+
defaults["get_operation"],
|
246
|
+
exception_transformer: exception_transformer
|
247
|
+
)
|
248
|
+
@cancel_operation = Google::Gax.create_api_call(
|
249
|
+
@cluster_manager_stub.method(:cancel_operation),
|
250
|
+
defaults["cancel_operation"],
|
251
|
+
exception_transformer: exception_transformer
|
252
|
+
)
|
253
|
+
@get_server_config = Google::Gax.create_api_call(
|
254
|
+
@cluster_manager_stub.method(:get_server_config),
|
255
|
+
defaults["get_server_config"],
|
256
|
+
exception_transformer: exception_transformer
|
257
|
+
)
|
258
|
+
@list_node_pools = Google::Gax.create_api_call(
|
259
|
+
@cluster_manager_stub.method(:list_node_pools),
|
260
|
+
defaults["list_node_pools"],
|
261
|
+
exception_transformer: exception_transformer
|
262
|
+
)
|
263
|
+
@get_node_pool = Google::Gax.create_api_call(
|
264
|
+
@cluster_manager_stub.method(:get_node_pool),
|
265
|
+
defaults["get_node_pool"],
|
266
|
+
exception_transformer: exception_transformer
|
267
|
+
)
|
268
|
+
@create_node_pool = Google::Gax.create_api_call(
|
269
|
+
@cluster_manager_stub.method(:create_node_pool),
|
270
|
+
defaults["create_node_pool"],
|
271
|
+
exception_transformer: exception_transformer
|
272
|
+
)
|
273
|
+
@delete_node_pool = Google::Gax.create_api_call(
|
274
|
+
@cluster_manager_stub.method(:delete_node_pool),
|
275
|
+
defaults["delete_node_pool"],
|
276
|
+
exception_transformer: exception_transformer
|
277
|
+
)
|
278
|
+
@rollback_node_pool_upgrade = Google::Gax.create_api_call(
|
279
|
+
@cluster_manager_stub.method(:rollback_node_pool_upgrade),
|
280
|
+
defaults["rollback_node_pool_upgrade"],
|
281
|
+
exception_transformer: exception_transformer
|
282
|
+
)
|
283
|
+
@set_node_pool_management = Google::Gax.create_api_call(
|
284
|
+
@cluster_manager_stub.method(:set_node_pool_management),
|
285
|
+
defaults["set_node_pool_management"],
|
286
|
+
exception_transformer: exception_transformer
|
287
|
+
)
|
288
|
+
@set_labels = Google::Gax.create_api_call(
|
289
|
+
@cluster_manager_stub.method(:set_labels),
|
290
|
+
defaults["set_labels"],
|
291
|
+
exception_transformer: exception_transformer
|
292
|
+
)
|
293
|
+
@set_legacy_abac = Google::Gax.create_api_call(
|
294
|
+
@cluster_manager_stub.method(:set_legacy_abac),
|
295
|
+
defaults["set_legacy_abac"],
|
296
|
+
exception_transformer: exception_transformer
|
297
|
+
)
|
298
|
+
@start_ip_rotation = Google::Gax.create_api_call(
|
299
|
+
@cluster_manager_stub.method(:start_ip_rotation),
|
300
|
+
defaults["start_ip_rotation"],
|
301
|
+
exception_transformer: exception_transformer
|
302
|
+
)
|
303
|
+
@complete_ip_rotation = Google::Gax.create_api_call(
|
304
|
+
@cluster_manager_stub.method(:complete_ip_rotation),
|
305
|
+
defaults["complete_ip_rotation"],
|
306
|
+
exception_transformer: exception_transformer
|
307
|
+
)
|
308
|
+
@set_node_pool_size = Google::Gax.create_api_call(
|
309
|
+
@cluster_manager_stub.method(:set_node_pool_size),
|
310
|
+
defaults["set_node_pool_size"],
|
311
|
+
exception_transformer: exception_transformer
|
312
|
+
)
|
313
|
+
@set_network_policy = Google::Gax.create_api_call(
|
314
|
+
@cluster_manager_stub.method(:set_network_policy),
|
315
|
+
defaults["set_network_policy"],
|
316
|
+
exception_transformer: exception_transformer
|
317
|
+
)
|
318
|
+
@set_maintenance_policy = Google::Gax.create_api_call(
|
319
|
+
@cluster_manager_stub.method(:set_maintenance_policy),
|
320
|
+
defaults["set_maintenance_policy"],
|
321
|
+
exception_transformer: exception_transformer
|
322
|
+
)
|
323
|
+
@list_usable_subnetworks = Google::Gax.create_api_call(
|
324
|
+
@cluster_manager_stub.method(:list_usable_subnetworks),
|
325
|
+
defaults["list_usable_subnetworks"],
|
326
|
+
exception_transformer: exception_transformer
|
327
|
+
)
|
328
|
+
@list_locations = Google::Gax.create_api_call(
|
329
|
+
@cluster_manager_stub.method(:list_locations),
|
330
|
+
defaults["list_locations"],
|
331
|
+
exception_transformer: exception_transformer
|
332
|
+
)
|
333
|
+
end
|
334
|
+
|
335
|
+
# Service calls
|
336
|
+
|
337
|
+
# Lists all clusters owned by a project in either the specified zone or all
|
338
|
+
# zones.
|
339
|
+
#
|
340
|
+
# @param project_id [String]
|
341
|
+
# Deprecated. The Google Developers Console [project ID or project
|
342
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
343
|
+
# This field has been deprecated and replaced by the parent field.
|
344
|
+
# @param zone [String]
|
345
|
+
# Deprecated. The name of the Google Compute Engine
|
346
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
347
|
+
# resides, or "-" for all zones.
|
348
|
+
# This field has been deprecated and replaced by the parent field.
|
349
|
+
# @param parent [String]
|
350
|
+
# The parent (project and location) where the clusters will be listed.
|
351
|
+
# Specified in the format 'projects/*/locations/*'.
|
352
|
+
# Location "-" matches all zones and all regions.
|
353
|
+
# @param options [Google::Gax::CallOptions]
|
354
|
+
# Overrides the default settings for this call, e.g, timeout,
|
355
|
+
# retries, etc.
|
356
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
357
|
+
# @yieldparam result [Google::Container::V1beta1::ListClustersResponse]
|
358
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
359
|
+
# @return [Google::Container::V1beta1::ListClustersResponse]
|
360
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
361
|
+
# @example
|
362
|
+
# require "google/cloud/container"
|
363
|
+
#
|
364
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
365
|
+
#
|
366
|
+
# # TODO: Initialize `project_id`:
|
367
|
+
# project_id = ''
|
368
|
+
#
|
369
|
+
# # TODO: Initialize `zone`:
|
370
|
+
# zone = ''
|
371
|
+
# response = cluster_manager_client.list_clusters(project_id, zone)
|
372
|
+
|
373
|
+
def list_clusters \
|
374
|
+
project_id,
|
375
|
+
zone,
|
376
|
+
parent: nil,
|
377
|
+
options: nil,
|
378
|
+
&block
|
379
|
+
req = {
|
380
|
+
project_id: project_id,
|
381
|
+
zone: zone,
|
382
|
+
parent: parent
|
383
|
+
}.delete_if { |_, v| v.nil? }
|
384
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::ListClustersRequest)
|
385
|
+
@list_clusters.call(req, options, &block)
|
386
|
+
end
|
387
|
+
|
388
|
+
# Gets the details for a specific cluster.
|
389
|
+
#
|
390
|
+
# @param project_id [String]
|
391
|
+
# Deprecated. The Google Developers Console [project ID or project
|
392
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
393
|
+
# This field has been deprecated and replaced by the name field.
|
394
|
+
# @param zone [String]
|
395
|
+
# Deprecated. The name of the Google Compute Engine
|
396
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
397
|
+
# resides.
|
398
|
+
# This field has been deprecated and replaced by the name field.
|
399
|
+
# @param cluster_id [String]
|
400
|
+
# Deprecated. The name of the cluster to retrieve.
|
401
|
+
# This field has been deprecated and replaced by the name field.
|
402
|
+
# @param name [String]
|
403
|
+
# The name (project, location, cluster) of the cluster to retrieve.
|
404
|
+
# Specified in the format 'projects/*/locations/*/clusters/*'.
|
405
|
+
# @param options [Google::Gax::CallOptions]
|
406
|
+
# Overrides the default settings for this call, e.g, timeout,
|
407
|
+
# retries, etc.
|
408
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
409
|
+
# @yieldparam result [Google::Container::V1beta1::Cluster]
|
410
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
411
|
+
# @return [Google::Container::V1beta1::Cluster]
|
412
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
413
|
+
# @example
|
414
|
+
# require "google/cloud/container"
|
415
|
+
#
|
416
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
417
|
+
#
|
418
|
+
# # TODO: Initialize `project_id`:
|
419
|
+
# project_id = ''
|
420
|
+
#
|
421
|
+
# # TODO: Initialize `zone`:
|
422
|
+
# zone = ''
|
423
|
+
#
|
424
|
+
# # TODO: Initialize `cluster_id`:
|
425
|
+
# cluster_id = ''
|
426
|
+
# response = cluster_manager_client.get_cluster(project_id, zone, cluster_id)
|
427
|
+
|
428
|
+
def get_cluster \
|
429
|
+
project_id,
|
430
|
+
zone,
|
431
|
+
cluster_id,
|
432
|
+
name: nil,
|
433
|
+
options: nil,
|
434
|
+
&block
|
435
|
+
req = {
|
436
|
+
project_id: project_id,
|
437
|
+
zone: zone,
|
438
|
+
cluster_id: cluster_id,
|
439
|
+
name: name
|
440
|
+
}.delete_if { |_, v| v.nil? }
|
441
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::GetClusterRequest)
|
442
|
+
@get_cluster.call(req, options, &block)
|
443
|
+
end
|
444
|
+
|
445
|
+
# Creates a cluster, consisting of the specified number and type of Google
|
446
|
+
# Compute Engine instances.
|
447
|
+
#
|
448
|
+
# By default, the cluster is created in the project's
|
449
|
+
# [default network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
|
450
|
+
#
|
451
|
+
# One firewall is added for the cluster. After cluster creation,
|
452
|
+
# the cluster creates routes for each node to allow the containers
|
453
|
+
# on that node to communicate with all other instances in the
|
454
|
+
# cluster.
|
455
|
+
#
|
456
|
+
# Finally, an entry is added to the project's global metadata indicating
|
457
|
+
# which CIDR range is being used by the cluster.
|
458
|
+
#
|
459
|
+
# @param project_id [String]
|
460
|
+
# Deprecated. The Google Developers Console [project ID or project
|
461
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
462
|
+
# This field has been deprecated and replaced by the parent field.
|
463
|
+
# @param zone [String]
|
464
|
+
# Deprecated. The name of the Google Compute Engine
|
465
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
466
|
+
# resides.
|
467
|
+
# This field has been deprecated and replaced by the parent field.
|
468
|
+
# @param cluster [Google::Container::V1beta1::Cluster | Hash]
|
469
|
+
# A [cluster
|
470
|
+
# resource](/container-engine/reference/rest/v1beta1/projects.zones.clusters)
|
471
|
+
# A hash of the same form as `Google::Container::V1beta1::Cluster`
|
472
|
+
# can also be provided.
|
473
|
+
# @param parent [String]
|
474
|
+
# The parent (project and location) where the cluster will be created.
|
475
|
+
# Specified in the format 'projects/*/locations/*'.
|
476
|
+
# @param options [Google::Gax::CallOptions]
|
477
|
+
# Overrides the default settings for this call, e.g, timeout,
|
478
|
+
# retries, etc.
|
479
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
480
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
481
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
482
|
+
# @return [Google::Container::V1beta1::Operation]
|
483
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
484
|
+
# @example
|
485
|
+
# require "google/cloud/container"
|
486
|
+
#
|
487
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
488
|
+
#
|
489
|
+
# # TODO: Initialize `project_id`:
|
490
|
+
# project_id = ''
|
491
|
+
#
|
492
|
+
# # TODO: Initialize `zone`:
|
493
|
+
# zone = ''
|
494
|
+
#
|
495
|
+
# # TODO: Initialize `cluster`:
|
496
|
+
# cluster = {}
|
497
|
+
# response = cluster_manager_client.create_cluster(project_id, zone, cluster)
|
498
|
+
|
499
|
+
def create_cluster \
|
500
|
+
project_id,
|
501
|
+
zone,
|
502
|
+
cluster,
|
503
|
+
parent: nil,
|
504
|
+
options: nil,
|
505
|
+
&block
|
506
|
+
req = {
|
507
|
+
project_id: project_id,
|
508
|
+
zone: zone,
|
509
|
+
cluster: cluster,
|
510
|
+
parent: parent
|
511
|
+
}.delete_if { |_, v| v.nil? }
|
512
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::CreateClusterRequest)
|
513
|
+
@create_cluster.call(req, options, &block)
|
514
|
+
end
|
515
|
+
|
516
|
+
# Updates the settings for a specific cluster.
|
517
|
+
#
|
518
|
+
# @param project_id [String]
|
519
|
+
# Deprecated. The Google Developers Console [project ID or project
|
520
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
521
|
+
# This field has been deprecated and replaced by the name field.
|
522
|
+
# @param zone [String]
|
523
|
+
# Deprecated. The name of the Google Compute Engine
|
524
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
525
|
+
# resides.
|
526
|
+
# This field has been deprecated and replaced by the name field.
|
527
|
+
# @param cluster_id [String]
|
528
|
+
# Deprecated. The name of the cluster to upgrade.
|
529
|
+
# This field has been deprecated and replaced by the name field.
|
530
|
+
# @param update [Google::Container::V1beta1::ClusterUpdate | Hash]
|
531
|
+
# A description of the update.
|
532
|
+
# A hash of the same form as `Google::Container::V1beta1::ClusterUpdate`
|
533
|
+
# can also be provided.
|
534
|
+
# @param name [String]
|
535
|
+
# The name (project, location, cluster) of the cluster to update.
|
536
|
+
# Specified in the format 'projects/*/locations/*/clusters/*'.
|
537
|
+
# @param options [Google::Gax::CallOptions]
|
538
|
+
# Overrides the default settings for this call, e.g, timeout,
|
539
|
+
# retries, etc.
|
540
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
541
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
542
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
543
|
+
# @return [Google::Container::V1beta1::Operation]
|
544
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
545
|
+
# @example
|
546
|
+
# require "google/cloud/container"
|
547
|
+
#
|
548
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
549
|
+
#
|
550
|
+
# # TODO: Initialize `project_id`:
|
551
|
+
# project_id = ''
|
552
|
+
#
|
553
|
+
# # TODO: Initialize `zone`:
|
554
|
+
# zone = ''
|
555
|
+
#
|
556
|
+
# # TODO: Initialize `cluster_id`:
|
557
|
+
# cluster_id = ''
|
558
|
+
#
|
559
|
+
# # TODO: Initialize `update`:
|
560
|
+
# update = {}
|
561
|
+
# response = cluster_manager_client.update_cluster(project_id, zone, cluster_id, update)
|
562
|
+
|
563
|
+
def update_cluster \
|
564
|
+
project_id,
|
565
|
+
zone,
|
566
|
+
cluster_id,
|
567
|
+
update,
|
568
|
+
name: nil,
|
569
|
+
options: nil,
|
570
|
+
&block
|
571
|
+
req = {
|
572
|
+
project_id: project_id,
|
573
|
+
zone: zone,
|
574
|
+
cluster_id: cluster_id,
|
575
|
+
update: update,
|
576
|
+
name: name
|
577
|
+
}.delete_if { |_, v| v.nil? }
|
578
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::UpdateClusterRequest)
|
579
|
+
@update_cluster.call(req, options, &block)
|
580
|
+
end
|
581
|
+
|
582
|
+
# Updates the version and/or image type of a specific node pool.
|
583
|
+
#
|
584
|
+
# @param project_id [String]
|
585
|
+
# Deprecated. The Google Developers Console [project ID or project
|
586
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
587
|
+
# This field has been deprecated and replaced by the name field.
|
588
|
+
# @param zone [String]
|
589
|
+
# Deprecated. The name of the Google Compute Engine
|
590
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
591
|
+
# resides.
|
592
|
+
# This field has been deprecated and replaced by the name field.
|
593
|
+
# @param cluster_id [String]
|
594
|
+
# Deprecated. The name of the cluster to upgrade.
|
595
|
+
# This field has been deprecated and replaced by the name field.
|
596
|
+
# @param node_pool_id [String]
|
597
|
+
# Deprecated. The name of the node pool to upgrade.
|
598
|
+
# This field has been deprecated and replaced by the name field.
|
599
|
+
# @param node_version [String]
|
600
|
+
# The Kubernetes version to change the nodes to (typically an
|
601
|
+
# upgrade).
|
602
|
+
#
|
603
|
+
# Users may specify either explicit versions offered by Kubernetes Engine or
|
604
|
+
# version aliases, which have the following behavior:
|
605
|
+
#
|
606
|
+
# * "latest": picks the highest valid Kubernetes version
|
607
|
+
# * "1.X": picks the highest valid patch+gke.N patch in the 1.X version
|
608
|
+
# * "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
|
609
|
+
# * "1.X.Y-gke.N": picks an explicit Kubernetes version
|
610
|
+
# * "-": picks the Kubernetes master version
|
611
|
+
# @param image_type [String]
|
612
|
+
# The desired image type for the node pool.
|
613
|
+
# @param name [String]
|
614
|
+
# The name (project, location, cluster, node pool) of the node pool to
|
615
|
+
# update. Specified in the format
|
616
|
+
# 'projects/*/locations/*/clusters/*/nodePools/*'.
|
617
|
+
# @param options [Google::Gax::CallOptions]
|
618
|
+
# Overrides the default settings for this call, e.g, timeout,
|
619
|
+
# retries, etc.
|
620
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
621
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
622
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
623
|
+
# @return [Google::Container::V1beta1::Operation]
|
624
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
625
|
+
# @example
|
626
|
+
# require "google/cloud/container"
|
627
|
+
#
|
628
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
629
|
+
#
|
630
|
+
# # TODO: Initialize `project_id`:
|
631
|
+
# project_id = ''
|
632
|
+
#
|
633
|
+
# # TODO: Initialize `zone`:
|
634
|
+
# zone = ''
|
635
|
+
#
|
636
|
+
# # TODO: Initialize `cluster_id`:
|
637
|
+
# cluster_id = ''
|
638
|
+
#
|
639
|
+
# # TODO: Initialize `node_pool_id`:
|
640
|
+
# node_pool_id = ''
|
641
|
+
#
|
642
|
+
# # TODO: Initialize `node_version`:
|
643
|
+
# node_version = ''
|
644
|
+
#
|
645
|
+
# # TODO: Initialize `image_type`:
|
646
|
+
# image_type = ''
|
647
|
+
# response = cluster_manager_client.update_node_pool(project_id, zone, cluster_id, node_pool_id, node_version, image_type)
|
648
|
+
|
649
|
+
def update_node_pool \
|
650
|
+
project_id,
|
651
|
+
zone,
|
652
|
+
cluster_id,
|
653
|
+
node_pool_id,
|
654
|
+
node_version,
|
655
|
+
image_type,
|
656
|
+
name: nil,
|
657
|
+
options: nil,
|
658
|
+
&block
|
659
|
+
req = {
|
660
|
+
project_id: project_id,
|
661
|
+
zone: zone,
|
662
|
+
cluster_id: cluster_id,
|
663
|
+
node_pool_id: node_pool_id,
|
664
|
+
node_version: node_version,
|
665
|
+
image_type: image_type,
|
666
|
+
name: name
|
667
|
+
}.delete_if { |_, v| v.nil? }
|
668
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::UpdateNodePoolRequest)
|
669
|
+
@update_node_pool.call(req, options, &block)
|
670
|
+
end
|
671
|
+
|
672
|
+
# Sets the autoscaling settings of a specific node pool.
|
673
|
+
#
|
674
|
+
# @param project_id [String]
|
675
|
+
# Deprecated. The Google Developers Console [project ID or project
|
676
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
677
|
+
# This field has been deprecated and replaced by the name field.
|
678
|
+
# @param zone [String]
|
679
|
+
# Deprecated. The name of the Google Compute Engine
|
680
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
681
|
+
# resides.
|
682
|
+
# This field has been deprecated and replaced by the name field.
|
683
|
+
# @param cluster_id [String]
|
684
|
+
# Deprecated. The name of the cluster to upgrade.
|
685
|
+
# This field has been deprecated and replaced by the name field.
|
686
|
+
# @param node_pool_id [String]
|
687
|
+
# Deprecated. The name of the node pool to upgrade.
|
688
|
+
# This field has been deprecated and replaced by the name field.
|
689
|
+
# @param autoscaling [Google::Container::V1beta1::NodePoolAutoscaling | Hash]
|
690
|
+
# Autoscaling configuration for the node pool.
|
691
|
+
# A hash of the same form as `Google::Container::V1beta1::NodePoolAutoscaling`
|
692
|
+
# can also be provided.
|
693
|
+
# @param name [String]
|
694
|
+
# The name (project, location, cluster, node pool) of the node pool to set
|
695
|
+
# autoscaler settings. Specified in the format
|
696
|
+
# 'projects/*/locations/*/clusters/*/nodePools/*'.
|
697
|
+
# @param options [Google::Gax::CallOptions]
|
698
|
+
# Overrides the default settings for this call, e.g, timeout,
|
699
|
+
# retries, etc.
|
700
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
701
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
702
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
703
|
+
# @return [Google::Container::V1beta1::Operation]
|
704
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
705
|
+
# @example
|
706
|
+
# require "google/cloud/container"
|
707
|
+
#
|
708
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
709
|
+
#
|
710
|
+
# # TODO: Initialize `project_id`:
|
711
|
+
# project_id = ''
|
712
|
+
#
|
713
|
+
# # TODO: Initialize `zone`:
|
714
|
+
# zone = ''
|
715
|
+
#
|
716
|
+
# # TODO: Initialize `cluster_id`:
|
717
|
+
# cluster_id = ''
|
718
|
+
#
|
719
|
+
# # TODO: Initialize `node_pool_id`:
|
720
|
+
# node_pool_id = ''
|
721
|
+
#
|
722
|
+
# # TODO: Initialize `autoscaling`:
|
723
|
+
# autoscaling = {}
|
724
|
+
# response = cluster_manager_client.set_node_pool_autoscaling(project_id, zone, cluster_id, node_pool_id, autoscaling)
|
725
|
+
|
726
|
+
def set_node_pool_autoscaling \
|
727
|
+
project_id,
|
728
|
+
zone,
|
729
|
+
cluster_id,
|
730
|
+
node_pool_id,
|
731
|
+
autoscaling,
|
732
|
+
name: nil,
|
733
|
+
options: nil,
|
734
|
+
&block
|
735
|
+
req = {
|
736
|
+
project_id: project_id,
|
737
|
+
zone: zone,
|
738
|
+
cluster_id: cluster_id,
|
739
|
+
node_pool_id: node_pool_id,
|
740
|
+
autoscaling: autoscaling,
|
741
|
+
name: name
|
742
|
+
}.delete_if { |_, v| v.nil? }
|
743
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::SetNodePoolAutoscalingRequest)
|
744
|
+
@set_node_pool_autoscaling.call(req, options, &block)
|
745
|
+
end
|
746
|
+
|
747
|
+
# Sets the logging service for a specific cluster.
|
748
|
+
#
|
749
|
+
# @param project_id [String]
|
750
|
+
# Deprecated. The Google Developers Console [project ID or project
|
751
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
752
|
+
# This field has been deprecated and replaced by the name field.
|
753
|
+
# @param zone [String]
|
754
|
+
# Deprecated. The name of the Google Compute Engine
|
755
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
756
|
+
# resides.
|
757
|
+
# This field has been deprecated and replaced by the name field.
|
758
|
+
# @param cluster_id [String]
|
759
|
+
# Deprecated. The name of the cluster to upgrade.
|
760
|
+
# This field has been deprecated and replaced by the name field.
|
761
|
+
# @param logging_service [String]
|
762
|
+
# The logging service the cluster should use to write metrics.
|
763
|
+
# Currently available options:
|
764
|
+
#
|
765
|
+
# * "logging.googleapis.com" - the Google Cloud Logging service
|
766
|
+
# * "none" - no metrics will be exported from the cluster
|
767
|
+
# @param name [String]
|
768
|
+
# The name (project, location, cluster) of the cluster to set logging.
|
769
|
+
# Specified in the format 'projects/*/locations/*/clusters/*'.
|
770
|
+
# @param options [Google::Gax::CallOptions]
|
771
|
+
# Overrides the default settings for this call, e.g, timeout,
|
772
|
+
# retries, etc.
|
773
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
774
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
775
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
776
|
+
# @return [Google::Container::V1beta1::Operation]
|
777
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
778
|
+
# @example
|
779
|
+
# require "google/cloud/container"
|
780
|
+
#
|
781
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
782
|
+
#
|
783
|
+
# # TODO: Initialize `project_id`:
|
784
|
+
# project_id = ''
|
785
|
+
#
|
786
|
+
# # TODO: Initialize `zone`:
|
787
|
+
# zone = ''
|
788
|
+
#
|
789
|
+
# # TODO: Initialize `cluster_id`:
|
790
|
+
# cluster_id = ''
|
791
|
+
#
|
792
|
+
# # TODO: Initialize `logging_service`:
|
793
|
+
# logging_service = ''
|
794
|
+
# response = cluster_manager_client.set_logging_service(project_id, zone, cluster_id, logging_service)
|
795
|
+
|
796
|
+
def set_logging_service \
|
797
|
+
project_id,
|
798
|
+
zone,
|
799
|
+
cluster_id,
|
800
|
+
logging_service,
|
801
|
+
name: nil,
|
802
|
+
options: nil,
|
803
|
+
&block
|
804
|
+
req = {
|
805
|
+
project_id: project_id,
|
806
|
+
zone: zone,
|
807
|
+
cluster_id: cluster_id,
|
808
|
+
logging_service: logging_service,
|
809
|
+
name: name
|
810
|
+
}.delete_if { |_, v| v.nil? }
|
811
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::SetLoggingServiceRequest)
|
812
|
+
@set_logging_service.call(req, options, &block)
|
813
|
+
end
|
814
|
+
|
815
|
+
# Sets the monitoring service for a specific cluster.
|
816
|
+
#
|
817
|
+
# @param project_id [String]
|
818
|
+
# Deprecated. The Google Developers Console [project ID or project
|
819
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
820
|
+
# This field has been deprecated and replaced by the name field.
|
821
|
+
# @param zone [String]
|
822
|
+
# Deprecated. The name of the Google Compute Engine
|
823
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
824
|
+
# resides.
|
825
|
+
# This field has been deprecated and replaced by the name field.
|
826
|
+
# @param cluster_id [String]
|
827
|
+
# Deprecated. The name of the cluster to upgrade.
|
828
|
+
# This field has been deprecated and replaced by the name field.
|
829
|
+
# @param monitoring_service [String]
|
830
|
+
# The monitoring service the cluster should use to write metrics.
|
831
|
+
# Currently available options:
|
832
|
+
#
|
833
|
+
# * "monitoring.googleapis.com" - the Google Cloud Monitoring service
|
834
|
+
# * "none" - no metrics will be exported from the cluster
|
835
|
+
# @param name [String]
|
836
|
+
# The name (project, location, cluster) of the cluster to set monitoring.
|
837
|
+
# Specified in the format 'projects/*/locations/*/clusters/*'.
|
838
|
+
# @param options [Google::Gax::CallOptions]
|
839
|
+
# Overrides the default settings for this call, e.g, timeout,
|
840
|
+
# retries, etc.
|
841
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
842
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
843
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
844
|
+
# @return [Google::Container::V1beta1::Operation]
|
845
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
846
|
+
# @example
|
847
|
+
# require "google/cloud/container"
|
848
|
+
#
|
849
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
850
|
+
#
|
851
|
+
# # TODO: Initialize `project_id`:
|
852
|
+
# project_id = ''
|
853
|
+
#
|
854
|
+
# # TODO: Initialize `zone`:
|
855
|
+
# zone = ''
|
856
|
+
#
|
857
|
+
# # TODO: Initialize `cluster_id`:
|
858
|
+
# cluster_id = ''
|
859
|
+
#
|
860
|
+
# # TODO: Initialize `monitoring_service`:
|
861
|
+
# monitoring_service = ''
|
862
|
+
# response = cluster_manager_client.set_monitoring_service(project_id, zone, cluster_id, monitoring_service)
|
863
|
+
|
864
|
+
def set_monitoring_service \
|
865
|
+
project_id,
|
866
|
+
zone,
|
867
|
+
cluster_id,
|
868
|
+
monitoring_service,
|
869
|
+
name: nil,
|
870
|
+
options: nil,
|
871
|
+
&block
|
872
|
+
req = {
|
873
|
+
project_id: project_id,
|
874
|
+
zone: zone,
|
875
|
+
cluster_id: cluster_id,
|
876
|
+
monitoring_service: monitoring_service,
|
877
|
+
name: name
|
878
|
+
}.delete_if { |_, v| v.nil? }
|
879
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::SetMonitoringServiceRequest)
|
880
|
+
@set_monitoring_service.call(req, options, &block)
|
881
|
+
end
|
882
|
+
|
883
|
+
# Sets the addons for a specific cluster.
|
884
|
+
#
|
885
|
+
# @param project_id [String]
|
886
|
+
# Deprecated. The Google Developers Console [project ID or project
|
887
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
888
|
+
# This field has been deprecated and replaced by the name field.
|
889
|
+
# @param zone [String]
|
890
|
+
# Deprecated. The name of the Google Compute Engine
|
891
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
892
|
+
# resides.
|
893
|
+
# This field has been deprecated and replaced by the name field.
|
894
|
+
# @param cluster_id [String]
|
895
|
+
# Deprecated. The name of the cluster to upgrade.
|
896
|
+
# This field has been deprecated and replaced by the name field.
|
897
|
+
# @param addons_config [Google::Container::V1beta1::AddonsConfig | Hash]
|
898
|
+
# The desired configurations for the various addons available to run in the
|
899
|
+
# cluster.
|
900
|
+
# A hash of the same form as `Google::Container::V1beta1::AddonsConfig`
|
901
|
+
# can also be provided.
|
902
|
+
# @param name [String]
|
903
|
+
# The name (project, location, cluster) of the cluster to set addons.
|
904
|
+
# Specified in the format 'projects/*/locations/*/clusters/*'.
|
905
|
+
# @param options [Google::Gax::CallOptions]
|
906
|
+
# Overrides the default settings for this call, e.g, timeout,
|
907
|
+
# retries, etc.
|
908
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
909
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
910
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
911
|
+
# @return [Google::Container::V1beta1::Operation]
|
912
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
913
|
+
# @example
|
914
|
+
# require "google/cloud/container"
|
915
|
+
#
|
916
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
917
|
+
#
|
918
|
+
# # TODO: Initialize `project_id`:
|
919
|
+
# project_id = ''
|
920
|
+
#
|
921
|
+
# # TODO: Initialize `zone`:
|
922
|
+
# zone = ''
|
923
|
+
#
|
924
|
+
# # TODO: Initialize `cluster_id`:
|
925
|
+
# cluster_id = ''
|
926
|
+
#
|
927
|
+
# # TODO: Initialize `addons_config`:
|
928
|
+
# addons_config = {}
|
929
|
+
# response = cluster_manager_client.set_addons_config(project_id, zone, cluster_id, addons_config)
|
930
|
+
|
931
|
+
def set_addons_config \
|
932
|
+
project_id,
|
933
|
+
zone,
|
934
|
+
cluster_id,
|
935
|
+
addons_config,
|
936
|
+
name: nil,
|
937
|
+
options: nil,
|
938
|
+
&block
|
939
|
+
req = {
|
940
|
+
project_id: project_id,
|
941
|
+
zone: zone,
|
942
|
+
cluster_id: cluster_id,
|
943
|
+
addons_config: addons_config,
|
944
|
+
name: name
|
945
|
+
}.delete_if { |_, v| v.nil? }
|
946
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::SetAddonsConfigRequest)
|
947
|
+
@set_addons_config.call(req, options, &block)
|
948
|
+
end
|
949
|
+
|
950
|
+
# Sets the locations for a specific cluster.
|
951
|
+
#
|
952
|
+
# @param project_id [String]
|
953
|
+
# Deprecated. The Google Developers Console [project ID or project
|
954
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
955
|
+
# This field has been deprecated and replaced by the name field.
|
956
|
+
# @param zone [String]
|
957
|
+
# Deprecated. The name of the Google Compute Engine
|
958
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
959
|
+
# resides.
|
960
|
+
# This field has been deprecated and replaced by the name field.
|
961
|
+
# @param cluster_id [String]
|
962
|
+
# Deprecated. The name of the cluster to upgrade.
|
963
|
+
# This field has been deprecated and replaced by the name field.
|
964
|
+
# @param locations [Array<String>]
|
965
|
+
# The desired list of Google Compute Engine
|
966
|
+
# [zones](https://cloud.google.com/compute/docs/zones#available) in which the cluster's nodes
|
967
|
+
# should be located. Changing the locations a cluster is in will result
|
968
|
+
# in nodes being either created or removed from the cluster, depending on
|
969
|
+
# whether locations are being added or removed.
|
970
|
+
#
|
971
|
+
# This list must always include the cluster's primary zone.
|
972
|
+
# @param name [String]
|
973
|
+
# The name (project, location, cluster) of the cluster to set locations.
|
974
|
+
# Specified in the format 'projects/*/locations/*/clusters/*'.
|
975
|
+
# @param options [Google::Gax::CallOptions]
|
976
|
+
# Overrides the default settings for this call, e.g, timeout,
|
977
|
+
# retries, etc.
|
978
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
979
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
980
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
981
|
+
# @return [Google::Container::V1beta1::Operation]
|
982
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
983
|
+
# @example
|
984
|
+
# require "google/cloud/container"
|
985
|
+
#
|
986
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
987
|
+
#
|
988
|
+
# # TODO: Initialize `project_id`:
|
989
|
+
# project_id = ''
|
990
|
+
#
|
991
|
+
# # TODO: Initialize `zone`:
|
992
|
+
# zone = ''
|
993
|
+
#
|
994
|
+
# # TODO: Initialize `cluster_id`:
|
995
|
+
# cluster_id = ''
|
996
|
+
#
|
997
|
+
# # TODO: Initialize `locations`:
|
998
|
+
# locations = []
|
999
|
+
# response = cluster_manager_client.set_locations(project_id, zone, cluster_id, locations)
|
1000
|
+
|
1001
|
+
def set_locations \
|
1002
|
+
project_id,
|
1003
|
+
zone,
|
1004
|
+
cluster_id,
|
1005
|
+
locations,
|
1006
|
+
name: nil,
|
1007
|
+
options: nil,
|
1008
|
+
&block
|
1009
|
+
req = {
|
1010
|
+
project_id: project_id,
|
1011
|
+
zone: zone,
|
1012
|
+
cluster_id: cluster_id,
|
1013
|
+
locations: locations,
|
1014
|
+
name: name
|
1015
|
+
}.delete_if { |_, v| v.nil? }
|
1016
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::SetLocationsRequest)
|
1017
|
+
@set_locations.call(req, options, &block)
|
1018
|
+
end
|
1019
|
+
|
1020
|
+
# Updates the master for a specific cluster.
|
1021
|
+
#
|
1022
|
+
# @param project_id [String]
|
1023
|
+
# Deprecated. The Google Developers Console [project ID or project
|
1024
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
1025
|
+
# This field has been deprecated and replaced by the name field.
|
1026
|
+
# @param zone [String]
|
1027
|
+
# Deprecated. The name of the Google Compute Engine
|
1028
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1029
|
+
# resides.
|
1030
|
+
# This field has been deprecated and replaced by the name field.
|
1031
|
+
# @param cluster_id [String]
|
1032
|
+
# Deprecated. The name of the cluster to upgrade.
|
1033
|
+
# This field has been deprecated and replaced by the name field.
|
1034
|
+
# @param master_version [String]
|
1035
|
+
# The Kubernetes version to change the master to.
|
1036
|
+
#
|
1037
|
+
# Users may specify either explicit versions offered by
|
1038
|
+
# Kubernetes Engine or version aliases, which have the following behavior:
|
1039
|
+
#
|
1040
|
+
# * "latest": picks the highest valid Kubernetes version
|
1041
|
+
# * "1.X": picks the highest valid patch+gke.N patch in the 1.X version
|
1042
|
+
# * "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
|
1043
|
+
# * "1.X.Y-gke.N": picks an explicit Kubernetes version
|
1044
|
+
# * "-": picks the default Kubernetes version
|
1045
|
+
# @param name [String]
|
1046
|
+
# The name (project, location, cluster) of the cluster to update.
|
1047
|
+
# Specified in the format 'projects/*/locations/*/clusters/*'.
|
1048
|
+
# @param options [Google::Gax::CallOptions]
|
1049
|
+
# Overrides the default settings for this call, e.g, timeout,
|
1050
|
+
# retries, etc.
|
1051
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1052
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
1053
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1054
|
+
# @return [Google::Container::V1beta1::Operation]
|
1055
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1056
|
+
# @example
|
1057
|
+
# require "google/cloud/container"
|
1058
|
+
#
|
1059
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
1060
|
+
#
|
1061
|
+
# # TODO: Initialize `project_id`:
|
1062
|
+
# project_id = ''
|
1063
|
+
#
|
1064
|
+
# # TODO: Initialize `zone`:
|
1065
|
+
# zone = ''
|
1066
|
+
#
|
1067
|
+
# # TODO: Initialize `cluster_id`:
|
1068
|
+
# cluster_id = ''
|
1069
|
+
#
|
1070
|
+
# # TODO: Initialize `master_version`:
|
1071
|
+
# master_version = ''
|
1072
|
+
# response = cluster_manager_client.update_master(project_id, zone, cluster_id, master_version)
|
1073
|
+
|
1074
|
+
def update_master \
|
1075
|
+
project_id,
|
1076
|
+
zone,
|
1077
|
+
cluster_id,
|
1078
|
+
master_version,
|
1079
|
+
name: nil,
|
1080
|
+
options: nil,
|
1081
|
+
&block
|
1082
|
+
req = {
|
1083
|
+
project_id: project_id,
|
1084
|
+
zone: zone,
|
1085
|
+
cluster_id: cluster_id,
|
1086
|
+
master_version: master_version,
|
1087
|
+
name: name
|
1088
|
+
}.delete_if { |_, v| v.nil? }
|
1089
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::UpdateMasterRequest)
|
1090
|
+
@update_master.call(req, options, &block)
|
1091
|
+
end
|
1092
|
+
|
1093
|
+
# Used to set master auth materials. Currently supports :-
|
1094
|
+
# Changing the admin password for a specific cluster.
|
1095
|
+
# This can be either via password generation or explicitly set.
|
1096
|
+
# Modify basic_auth.csv and reset the K8S API server.
|
1097
|
+
#
|
1098
|
+
# @param project_id [String]
|
1099
|
+
# Deprecated. The Google Developers Console [project ID or project
|
1100
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
1101
|
+
# This field has been deprecated and replaced by the name field.
|
1102
|
+
# @param zone [String]
|
1103
|
+
# Deprecated. The name of the Google Compute Engine
|
1104
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1105
|
+
# resides.
|
1106
|
+
# This field has been deprecated and replaced by the name field.
|
1107
|
+
# @param cluster_id [String]
|
1108
|
+
# Deprecated. The name of the cluster to upgrade.
|
1109
|
+
# This field has been deprecated and replaced by the name field.
|
1110
|
+
# @param action [Google::Container::V1beta1::SetMasterAuthRequest::Action]
|
1111
|
+
# The exact form of action to be taken on the master auth.
|
1112
|
+
# @param update [Google::Container::V1beta1::MasterAuth | Hash]
|
1113
|
+
# A description of the update.
|
1114
|
+
# A hash of the same form as `Google::Container::V1beta1::MasterAuth`
|
1115
|
+
# can also be provided.
|
1116
|
+
# @param name [String]
|
1117
|
+
# The name (project, location, cluster) of the cluster to set auth.
|
1118
|
+
# Specified in the format 'projects/*/locations/*/clusters/*'.
|
1119
|
+
# @param options [Google::Gax::CallOptions]
|
1120
|
+
# Overrides the default settings for this call, e.g, timeout,
|
1121
|
+
# retries, etc.
|
1122
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1123
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
1124
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1125
|
+
# @return [Google::Container::V1beta1::Operation]
|
1126
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1127
|
+
# @example
|
1128
|
+
# require "google/cloud/container"
|
1129
|
+
#
|
1130
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
1131
|
+
#
|
1132
|
+
# # TODO: Initialize `project_id`:
|
1133
|
+
# project_id = ''
|
1134
|
+
#
|
1135
|
+
# # TODO: Initialize `zone`:
|
1136
|
+
# zone = ''
|
1137
|
+
#
|
1138
|
+
# # TODO: Initialize `cluster_id`:
|
1139
|
+
# cluster_id = ''
|
1140
|
+
#
|
1141
|
+
# # TODO: Initialize `action`:
|
1142
|
+
# action = :UNKNOWN
|
1143
|
+
#
|
1144
|
+
# # TODO: Initialize `update`:
|
1145
|
+
# update = {}
|
1146
|
+
# response = cluster_manager_client.set_master_auth(project_id, zone, cluster_id, action, update)
|
1147
|
+
|
1148
|
+
def set_master_auth \
|
1149
|
+
project_id,
|
1150
|
+
zone,
|
1151
|
+
cluster_id,
|
1152
|
+
action,
|
1153
|
+
update,
|
1154
|
+
name: nil,
|
1155
|
+
options: nil,
|
1156
|
+
&block
|
1157
|
+
req = {
|
1158
|
+
project_id: project_id,
|
1159
|
+
zone: zone,
|
1160
|
+
cluster_id: cluster_id,
|
1161
|
+
action: action,
|
1162
|
+
update: update,
|
1163
|
+
name: name
|
1164
|
+
}.delete_if { |_, v| v.nil? }
|
1165
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::SetMasterAuthRequest)
|
1166
|
+
@set_master_auth.call(req, options, &block)
|
1167
|
+
end
|
1168
|
+
|
1169
|
+
# Deletes the cluster, including the Kubernetes endpoint and all worker
|
1170
|
+
# nodes.
|
1171
|
+
#
|
1172
|
+
# Firewalls and routes that were configured during cluster creation
|
1173
|
+
# are also deleted.
|
1174
|
+
#
|
1175
|
+
# Other Google Compute Engine resources that might be in use by the cluster
|
1176
|
+
# (e.g. load balancer resources) will not be deleted if they weren't present
|
1177
|
+
# at the initial create time.
|
1178
|
+
#
|
1179
|
+
# @param project_id [String]
|
1180
|
+
# Deprecated. The Google Developers Console [project ID or project
|
1181
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
1182
|
+
# This field has been deprecated and replaced by the name field.
|
1183
|
+
# @param zone [String]
|
1184
|
+
# Deprecated. The name of the Google Compute Engine
|
1185
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1186
|
+
# resides.
|
1187
|
+
# This field has been deprecated and replaced by the name field.
|
1188
|
+
# @param cluster_id [String]
|
1189
|
+
# Deprecated. The name of the cluster to delete.
|
1190
|
+
# This field has been deprecated and replaced by the name field.
|
1191
|
+
# @param name [String]
|
1192
|
+
# The name (project, location, cluster) of the cluster to delete.
|
1193
|
+
# Specified in the format 'projects/*/locations/*/clusters/*'.
|
1194
|
+
# @param options [Google::Gax::CallOptions]
|
1195
|
+
# Overrides the default settings for this call, e.g, timeout,
|
1196
|
+
# retries, etc.
|
1197
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1198
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
1199
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1200
|
+
# @return [Google::Container::V1beta1::Operation]
|
1201
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1202
|
+
# @example
|
1203
|
+
# require "google/cloud/container"
|
1204
|
+
#
|
1205
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
1206
|
+
#
|
1207
|
+
# # TODO: Initialize `project_id`:
|
1208
|
+
# project_id = ''
|
1209
|
+
#
|
1210
|
+
# # TODO: Initialize `zone`:
|
1211
|
+
# zone = ''
|
1212
|
+
#
|
1213
|
+
# # TODO: Initialize `cluster_id`:
|
1214
|
+
# cluster_id = ''
|
1215
|
+
# response = cluster_manager_client.delete_cluster(project_id, zone, cluster_id)
|
1216
|
+
|
1217
|
+
def delete_cluster \
|
1218
|
+
project_id,
|
1219
|
+
zone,
|
1220
|
+
cluster_id,
|
1221
|
+
name: nil,
|
1222
|
+
options: nil,
|
1223
|
+
&block
|
1224
|
+
req = {
|
1225
|
+
project_id: project_id,
|
1226
|
+
zone: zone,
|
1227
|
+
cluster_id: cluster_id,
|
1228
|
+
name: name
|
1229
|
+
}.delete_if { |_, v| v.nil? }
|
1230
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::DeleteClusterRequest)
|
1231
|
+
@delete_cluster.call(req, options, &block)
|
1232
|
+
end
|
1233
|
+
|
1234
|
+
# Lists all operations in a project in a specific zone or all zones.
|
1235
|
+
#
|
1236
|
+
# @param project_id [String]
|
1237
|
+
# 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 parent field.
|
1240
|
+
# @param zone [String]
|
1241
|
+
# Deprecated. The name of the Google Compute Engine
|
1242
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) to return operations for, or `-` for
|
1243
|
+
# all zones. This field has been deprecated and replaced by the parent field.
|
1244
|
+
# @param parent [String]
|
1245
|
+
# The parent (project and location) where the operations will be listed.
|
1246
|
+
# Specified in the format 'projects/*/locations/*'.
|
1247
|
+
# Location "-" matches all zones and all regions.
|
1248
|
+
# @param options [Google::Gax::CallOptions]
|
1249
|
+
# Overrides the default settings for this call, e.g, timeout,
|
1250
|
+
# retries, etc.
|
1251
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1252
|
+
# @yieldparam result [Google::Container::V1beta1::ListOperationsResponse]
|
1253
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1254
|
+
# @return [Google::Container::V1beta1::ListOperationsResponse]
|
1255
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1256
|
+
# @example
|
1257
|
+
# require "google/cloud/container"
|
1258
|
+
#
|
1259
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
1260
|
+
#
|
1261
|
+
# # TODO: Initialize `project_id`:
|
1262
|
+
# project_id = ''
|
1263
|
+
#
|
1264
|
+
# # TODO: Initialize `zone`:
|
1265
|
+
# zone = ''
|
1266
|
+
# response = cluster_manager_client.list_operations(project_id, zone)
|
1267
|
+
|
1268
|
+
def list_operations \
|
1269
|
+
project_id,
|
1270
|
+
zone,
|
1271
|
+
parent: nil,
|
1272
|
+
options: nil,
|
1273
|
+
&block
|
1274
|
+
req = {
|
1275
|
+
project_id: project_id,
|
1276
|
+
zone: zone,
|
1277
|
+
parent: parent
|
1278
|
+
}.delete_if { |_, v| v.nil? }
|
1279
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::ListOperationsRequest)
|
1280
|
+
@list_operations.call(req, options, &block)
|
1281
|
+
end
|
1282
|
+
|
1283
|
+
# Gets the specified operation.
|
1284
|
+
#
|
1285
|
+
# @param project_id [String]
|
1286
|
+
# Deprecated. The Google Developers Console [project ID or project
|
1287
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
1288
|
+
# This field has been deprecated and replaced by the name field.
|
1289
|
+
# @param zone [String]
|
1290
|
+
# Deprecated. The name of the Google Compute Engine
|
1291
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1292
|
+
# resides.
|
1293
|
+
# This field has been deprecated and replaced by the name field.
|
1294
|
+
# @param operation_id [String]
|
1295
|
+
# Deprecated. The server-assigned `name` of the operation.
|
1296
|
+
# This field has been deprecated and replaced by the name field.
|
1297
|
+
# @param name [String]
|
1298
|
+
# The name (project, location, operation id) of the operation to get.
|
1299
|
+
# Specified in the format 'projects/*/locations/*/operations/*'.
|
1300
|
+
# @param options [Google::Gax::CallOptions]
|
1301
|
+
# Overrides the default settings for this call, e.g, timeout,
|
1302
|
+
# retries, etc.
|
1303
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1304
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
1305
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1306
|
+
# @return [Google::Container::V1beta1::Operation]
|
1307
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1308
|
+
# @example
|
1309
|
+
# require "google/cloud/container"
|
1310
|
+
#
|
1311
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
1312
|
+
#
|
1313
|
+
# # TODO: Initialize `project_id`:
|
1314
|
+
# project_id = ''
|
1315
|
+
#
|
1316
|
+
# # TODO: Initialize `zone`:
|
1317
|
+
# zone = ''
|
1318
|
+
#
|
1319
|
+
# # TODO: Initialize `operation_id`:
|
1320
|
+
# operation_id = ''
|
1321
|
+
# response = cluster_manager_client.get_operation(project_id, zone, operation_id)
|
1322
|
+
|
1323
|
+
def get_operation \
|
1324
|
+
project_id,
|
1325
|
+
zone,
|
1326
|
+
operation_id,
|
1327
|
+
name: nil,
|
1328
|
+
options: nil,
|
1329
|
+
&block
|
1330
|
+
req = {
|
1331
|
+
project_id: project_id,
|
1332
|
+
zone: zone,
|
1333
|
+
operation_id: operation_id,
|
1334
|
+
name: name
|
1335
|
+
}.delete_if { |_, v| v.nil? }
|
1336
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::GetOperationRequest)
|
1337
|
+
@get_operation.call(req, options, &block)
|
1338
|
+
end
|
1339
|
+
|
1340
|
+
# Cancels the specified operation.
|
1341
|
+
#
|
1342
|
+
# @param project_id [String]
|
1343
|
+
# Deprecated. The Google Developers Console [project ID or project
|
1344
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
1345
|
+
# This field has been deprecated and replaced by the name field.
|
1346
|
+
# @param zone [String]
|
1347
|
+
# Deprecated. The name of the Google Compute Engine
|
1348
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation resides.
|
1349
|
+
# This field has been deprecated and replaced by the name field.
|
1350
|
+
# @param operation_id [String]
|
1351
|
+
# Deprecated. The server-assigned `name` of the operation.
|
1352
|
+
# This field has been deprecated and replaced by the name field.
|
1353
|
+
# @param name [String]
|
1354
|
+
# The name (project, location, operation id) of the operation to cancel.
|
1355
|
+
# Specified in the format 'projects/*/locations/*/operations/*'.
|
1356
|
+
# @param options [Google::Gax::CallOptions]
|
1357
|
+
# Overrides the default settings for this call, e.g, timeout,
|
1358
|
+
# retries, etc.
|
1359
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1360
|
+
# @yieldparam result []
|
1361
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1362
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1363
|
+
# @example
|
1364
|
+
# require "google/cloud/container"
|
1365
|
+
#
|
1366
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
1367
|
+
#
|
1368
|
+
# # TODO: Initialize `project_id`:
|
1369
|
+
# project_id = ''
|
1370
|
+
#
|
1371
|
+
# # TODO: Initialize `zone`:
|
1372
|
+
# zone = ''
|
1373
|
+
#
|
1374
|
+
# # TODO: Initialize `operation_id`:
|
1375
|
+
# operation_id = ''
|
1376
|
+
# cluster_manager_client.cancel_operation(project_id, zone, operation_id)
|
1377
|
+
|
1378
|
+
def cancel_operation \
|
1379
|
+
project_id,
|
1380
|
+
zone,
|
1381
|
+
operation_id,
|
1382
|
+
name: nil,
|
1383
|
+
options: nil,
|
1384
|
+
&block
|
1385
|
+
req = {
|
1386
|
+
project_id: project_id,
|
1387
|
+
zone: zone,
|
1388
|
+
operation_id: operation_id,
|
1389
|
+
name: name
|
1390
|
+
}.delete_if { |_, v| v.nil? }
|
1391
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::CancelOperationRequest)
|
1392
|
+
@cancel_operation.call(req, options, &block)
|
1393
|
+
nil
|
1394
|
+
end
|
1395
|
+
|
1396
|
+
# Returns configuration info about the Kubernetes Engine service.
|
1397
|
+
#
|
1398
|
+
# @param project_id [String]
|
1399
|
+
# Deprecated. The Google Developers Console [project ID or project
|
1400
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
1401
|
+
# This field has been deprecated and replaced by the name field.
|
1402
|
+
# @param zone [String]
|
1403
|
+
# Deprecated. The name of the Google Compute Engine
|
1404
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) to return operations for.
|
1405
|
+
# This field has been deprecated and replaced by the name field.
|
1406
|
+
# @param name [String]
|
1407
|
+
# The name (project and location) of the server config to get
|
1408
|
+
# Specified in the format 'projects/*/locations/*'.
|
1409
|
+
# @param options [Google::Gax::CallOptions]
|
1410
|
+
# Overrides the default settings for this call, e.g, timeout,
|
1411
|
+
# retries, etc.
|
1412
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1413
|
+
# @yieldparam result [Google::Container::V1beta1::ServerConfig]
|
1414
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1415
|
+
# @return [Google::Container::V1beta1::ServerConfig]
|
1416
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1417
|
+
# @example
|
1418
|
+
# require "google/cloud/container"
|
1419
|
+
#
|
1420
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
1421
|
+
#
|
1422
|
+
# # TODO: Initialize `project_id`:
|
1423
|
+
# project_id = ''
|
1424
|
+
#
|
1425
|
+
# # TODO: Initialize `zone`:
|
1426
|
+
# zone = ''
|
1427
|
+
# response = cluster_manager_client.get_server_config(project_id, zone)
|
1428
|
+
|
1429
|
+
def get_server_config \
|
1430
|
+
project_id,
|
1431
|
+
zone,
|
1432
|
+
name: nil,
|
1433
|
+
options: nil,
|
1434
|
+
&block
|
1435
|
+
req = {
|
1436
|
+
project_id: project_id,
|
1437
|
+
zone: zone,
|
1438
|
+
name: name
|
1439
|
+
}.delete_if { |_, v| v.nil? }
|
1440
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::GetServerConfigRequest)
|
1441
|
+
@get_server_config.call(req, options, &block)
|
1442
|
+
end
|
1443
|
+
|
1444
|
+
# Lists the node pools for a cluster.
|
1445
|
+
#
|
1446
|
+
# @param project_id [String]
|
1447
|
+
# Deprecated. The Google Developers Console [project ID or project
|
1448
|
+
# number](https://developers.google.com/console/help/new/#projectnumber).
|
1449
|
+
# This field has been deprecated and replaced by the parent field.
|
1450
|
+
# @param zone [String]
|
1451
|
+
# Deprecated. The name of the Google Compute Engine
|
1452
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1453
|
+
# resides.
|
1454
|
+
# This field has been deprecated and replaced by the parent field.
|
1455
|
+
# @param cluster_id [String]
|
1456
|
+
# Deprecated. The name of the cluster.
|
1457
|
+
# This field has been deprecated and replaced by the parent field.
|
1458
|
+
# @param parent [String]
|
1459
|
+
# The parent (project, location, cluster id) where the node pools will be
|
1460
|
+
# listed. Specified in the format 'projects/*/locations/*/clusters/*'.
|
1461
|
+
# @param options [Google::Gax::CallOptions]
|
1462
|
+
# Overrides the default settings for this call, e.g, timeout,
|
1463
|
+
# retries, etc.
|
1464
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1465
|
+
# @yieldparam result [Google::Container::V1beta1::ListNodePoolsResponse]
|
1466
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1467
|
+
# @return [Google::Container::V1beta1::ListNodePoolsResponse]
|
1468
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1469
|
+
# @example
|
1470
|
+
# require "google/cloud/container"
|
1471
|
+
#
|
1472
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
1473
|
+
#
|
1474
|
+
# # TODO: Initialize `project_id`:
|
1475
|
+
# project_id = ''
|
1476
|
+
#
|
1477
|
+
# # TODO: Initialize `zone`:
|
1478
|
+
# zone = ''
|
1479
|
+
#
|
1480
|
+
# # TODO: Initialize `cluster_id`:
|
1481
|
+
# cluster_id = ''
|
1482
|
+
# response = cluster_manager_client.list_node_pools(project_id, zone, cluster_id)
|
1483
|
+
|
1484
|
+
def list_node_pools \
|
1485
|
+
project_id,
|
1486
|
+
zone,
|
1487
|
+
cluster_id,
|
1488
|
+
parent: nil,
|
1489
|
+
options: nil,
|
1490
|
+
&block
|
1491
|
+
req = {
|
1492
|
+
project_id: project_id,
|
1493
|
+
zone: zone,
|
1494
|
+
cluster_id: cluster_id,
|
1495
|
+
parent: parent
|
1496
|
+
}.delete_if { |_, v| v.nil? }
|
1497
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::ListNodePoolsRequest)
|
1498
|
+
@list_node_pools.call(req, options, &block)
|
1499
|
+
end
|
1500
|
+
|
1501
|
+
# Retrieves the node pool requested.
|
1502
|
+
#
|
1503
|
+
# @param project_id [String]
|
1504
|
+
# Deprecated. The Google Developers Console [project ID or project
|
1505
|
+
# number](https://developers.google.com/console/help/new/#projectnumber).
|
1506
|
+
# This field has been deprecated and replaced by the name field.
|
1507
|
+
# @param zone [String]
|
1508
|
+
# Deprecated. The name of the Google Compute Engine
|
1509
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1510
|
+
# resides.
|
1511
|
+
# This field has been deprecated and replaced by the name field.
|
1512
|
+
# @param cluster_id [String]
|
1513
|
+
# Deprecated. The name of the cluster.
|
1514
|
+
# This field has been deprecated and replaced by the name field.
|
1515
|
+
# @param node_pool_id [String]
|
1516
|
+
# Deprecated. The name of the node pool.
|
1517
|
+
# This field has been deprecated and replaced by the name field.
|
1518
|
+
# @param name [String]
|
1519
|
+
# The name (project, location, cluster, node pool id) of the node pool to
|
1520
|
+
# get. Specified in the format
|
1521
|
+
# 'projects/*/locations/*/clusters/*/nodePools/*'.
|
1522
|
+
# @param options [Google::Gax::CallOptions]
|
1523
|
+
# Overrides the default settings for this call, e.g, timeout,
|
1524
|
+
# retries, etc.
|
1525
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1526
|
+
# @yieldparam result [Google::Container::V1beta1::NodePool]
|
1527
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1528
|
+
# @return [Google::Container::V1beta1::NodePool]
|
1529
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1530
|
+
# @example
|
1531
|
+
# require "google/cloud/container"
|
1532
|
+
#
|
1533
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
1534
|
+
#
|
1535
|
+
# # TODO: Initialize `project_id`:
|
1536
|
+
# project_id = ''
|
1537
|
+
#
|
1538
|
+
# # TODO: Initialize `zone`:
|
1539
|
+
# zone = ''
|
1540
|
+
#
|
1541
|
+
# # TODO: Initialize `cluster_id`:
|
1542
|
+
# cluster_id = ''
|
1543
|
+
#
|
1544
|
+
# # TODO: Initialize `node_pool_id`:
|
1545
|
+
# node_pool_id = ''
|
1546
|
+
# response = cluster_manager_client.get_node_pool(project_id, zone, cluster_id, node_pool_id)
|
1547
|
+
|
1548
|
+
def get_node_pool \
|
1549
|
+
project_id,
|
1550
|
+
zone,
|
1551
|
+
cluster_id,
|
1552
|
+
node_pool_id,
|
1553
|
+
name: nil,
|
1554
|
+
options: nil,
|
1555
|
+
&block
|
1556
|
+
req = {
|
1557
|
+
project_id: project_id,
|
1558
|
+
zone: zone,
|
1559
|
+
cluster_id: cluster_id,
|
1560
|
+
node_pool_id: node_pool_id,
|
1561
|
+
name: name
|
1562
|
+
}.delete_if { |_, v| v.nil? }
|
1563
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::GetNodePoolRequest)
|
1564
|
+
@get_node_pool.call(req, options, &block)
|
1565
|
+
end
|
1566
|
+
|
1567
|
+
# Creates a node pool for a cluster.
|
1568
|
+
#
|
1569
|
+
# @param project_id [String]
|
1570
|
+
# Deprecated. The Google Developers Console [project ID or project
|
1571
|
+
# number](https://developers.google.com/console/help/new/#projectnumber).
|
1572
|
+
# This field has been deprecated and replaced by the parent field.
|
1573
|
+
# @param zone [String]
|
1574
|
+
# Deprecated. The name of the Google Compute Engine
|
1575
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1576
|
+
# resides.
|
1577
|
+
# This field has been deprecated and replaced by the parent field.
|
1578
|
+
# @param cluster_id [String]
|
1579
|
+
# Deprecated. The name of the cluster.
|
1580
|
+
# This field has been deprecated and replaced by the parent field.
|
1581
|
+
# @param node_pool [Google::Container::V1beta1::NodePool | Hash]
|
1582
|
+
# The node pool to create.
|
1583
|
+
# A hash of the same form as `Google::Container::V1beta1::NodePool`
|
1584
|
+
# can also be provided.
|
1585
|
+
# @param parent [String]
|
1586
|
+
# The parent (project, location, cluster id) where the node pool will be
|
1587
|
+
# created. Specified in the format
|
1588
|
+
# 'projects/*/locations/*/clusters/*'.
|
1589
|
+
# @param options [Google::Gax::CallOptions]
|
1590
|
+
# Overrides the default settings for this call, e.g, timeout,
|
1591
|
+
# retries, etc.
|
1592
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1593
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
1594
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1595
|
+
# @return [Google::Container::V1beta1::Operation]
|
1596
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1597
|
+
# @example
|
1598
|
+
# require "google/cloud/container"
|
1599
|
+
#
|
1600
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
1601
|
+
#
|
1602
|
+
# # TODO: Initialize `project_id`:
|
1603
|
+
# project_id = ''
|
1604
|
+
#
|
1605
|
+
# # TODO: Initialize `zone`:
|
1606
|
+
# zone = ''
|
1607
|
+
#
|
1608
|
+
# # TODO: Initialize `cluster_id`:
|
1609
|
+
# cluster_id = ''
|
1610
|
+
#
|
1611
|
+
# # TODO: Initialize `node_pool`:
|
1612
|
+
# node_pool = {}
|
1613
|
+
# response = cluster_manager_client.create_node_pool(project_id, zone, cluster_id, node_pool)
|
1614
|
+
|
1615
|
+
def create_node_pool \
|
1616
|
+
project_id,
|
1617
|
+
zone,
|
1618
|
+
cluster_id,
|
1619
|
+
node_pool,
|
1620
|
+
parent: nil,
|
1621
|
+
options: nil,
|
1622
|
+
&block
|
1623
|
+
req = {
|
1624
|
+
project_id: project_id,
|
1625
|
+
zone: zone,
|
1626
|
+
cluster_id: cluster_id,
|
1627
|
+
node_pool: node_pool,
|
1628
|
+
parent: parent
|
1629
|
+
}.delete_if { |_, v| v.nil? }
|
1630
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::CreateNodePoolRequest)
|
1631
|
+
@create_node_pool.call(req, options, &block)
|
1632
|
+
end
|
1633
|
+
|
1634
|
+
# Deletes a node pool from a cluster.
|
1635
|
+
#
|
1636
|
+
# @param project_id [String]
|
1637
|
+
# Deprecated. The Google Developers Console [project ID or project
|
1638
|
+
# number](https://developers.google.com/console/help/new/#projectnumber).
|
1639
|
+
# This field has been deprecated and replaced by the name field.
|
1640
|
+
# @param zone [String]
|
1641
|
+
# Deprecated. The name of the Google Compute Engine
|
1642
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1643
|
+
# resides.
|
1644
|
+
# This field has been deprecated and replaced by the name field.
|
1645
|
+
# @param cluster_id [String]
|
1646
|
+
# Deprecated. The name of the cluster.
|
1647
|
+
# This field has been deprecated and replaced by the name field.
|
1648
|
+
# @param node_pool_id [String]
|
1649
|
+
# Deprecated. The name of the node pool to delete.
|
1650
|
+
# This field has been deprecated and replaced by the name field.
|
1651
|
+
# @param name [String]
|
1652
|
+
# The name (project, location, cluster, node pool id) of the node pool to
|
1653
|
+
# delete. Specified in the format
|
1654
|
+
# 'projects/*/locations/*/clusters/*/nodePools/*'.
|
1655
|
+
# @param options [Google::Gax::CallOptions]
|
1656
|
+
# Overrides the default settings for this call, e.g, timeout,
|
1657
|
+
# retries, etc.
|
1658
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1659
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
1660
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1661
|
+
# @return [Google::Container::V1beta1::Operation]
|
1662
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1663
|
+
# @example
|
1664
|
+
# require "google/cloud/container"
|
1665
|
+
#
|
1666
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
1667
|
+
#
|
1668
|
+
# # TODO: Initialize `project_id`:
|
1669
|
+
# project_id = ''
|
1670
|
+
#
|
1671
|
+
# # TODO: Initialize `zone`:
|
1672
|
+
# zone = ''
|
1673
|
+
#
|
1674
|
+
# # TODO: Initialize `cluster_id`:
|
1675
|
+
# cluster_id = ''
|
1676
|
+
#
|
1677
|
+
# # TODO: Initialize `node_pool_id`:
|
1678
|
+
# node_pool_id = ''
|
1679
|
+
# response = cluster_manager_client.delete_node_pool(project_id, zone, cluster_id, node_pool_id)
|
1680
|
+
|
1681
|
+
def delete_node_pool \
|
1682
|
+
project_id,
|
1683
|
+
zone,
|
1684
|
+
cluster_id,
|
1685
|
+
node_pool_id,
|
1686
|
+
name: nil,
|
1687
|
+
options: nil,
|
1688
|
+
&block
|
1689
|
+
req = {
|
1690
|
+
project_id: project_id,
|
1691
|
+
zone: zone,
|
1692
|
+
cluster_id: cluster_id,
|
1693
|
+
node_pool_id: node_pool_id,
|
1694
|
+
name: name
|
1695
|
+
}.delete_if { |_, v| v.nil? }
|
1696
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::DeleteNodePoolRequest)
|
1697
|
+
@delete_node_pool.call(req, options, &block)
|
1698
|
+
end
|
1699
|
+
|
1700
|
+
# Roll back the previously Aborted or Failed NodePool upgrade.
|
1701
|
+
# This will be an no-op if the last upgrade successfully completed.
|
1702
|
+
#
|
1703
|
+
# @param project_id [String]
|
1704
|
+
# Deprecated. The Google Developers Console [project ID or project
|
1705
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
1706
|
+
# This field has been deprecated and replaced by the name field.
|
1707
|
+
# @param zone [String]
|
1708
|
+
# Deprecated. The name of the Google Compute Engine
|
1709
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1710
|
+
# resides.
|
1711
|
+
# This field has been deprecated and replaced by the name field.
|
1712
|
+
# @param cluster_id [String]
|
1713
|
+
# Deprecated. The name of the cluster to rollback.
|
1714
|
+
# This field has been deprecated and replaced by the name field.
|
1715
|
+
# @param node_pool_id [String]
|
1716
|
+
# Deprecated. The name of the node pool to rollback.
|
1717
|
+
# This field has been deprecated and replaced by the name field.
|
1718
|
+
# @param name [String]
|
1719
|
+
# The name (project, location, cluster, node pool id) of the node poll to
|
1720
|
+
# rollback upgrade.
|
1721
|
+
# Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.
|
1722
|
+
# @param options [Google::Gax::CallOptions]
|
1723
|
+
# Overrides the default settings for this call, e.g, timeout,
|
1724
|
+
# retries, etc.
|
1725
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1726
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
1727
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1728
|
+
# @return [Google::Container::V1beta1::Operation]
|
1729
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1730
|
+
# @example
|
1731
|
+
# require "google/cloud/container"
|
1732
|
+
#
|
1733
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
1734
|
+
#
|
1735
|
+
# # TODO: Initialize `project_id`:
|
1736
|
+
# project_id = ''
|
1737
|
+
#
|
1738
|
+
# # TODO: Initialize `zone`:
|
1739
|
+
# zone = ''
|
1740
|
+
#
|
1741
|
+
# # TODO: Initialize `cluster_id`:
|
1742
|
+
# cluster_id = ''
|
1743
|
+
#
|
1744
|
+
# # TODO: Initialize `node_pool_id`:
|
1745
|
+
# node_pool_id = ''
|
1746
|
+
# response = cluster_manager_client.rollback_node_pool_upgrade(project_id, zone, cluster_id, node_pool_id)
|
1747
|
+
|
1748
|
+
def rollback_node_pool_upgrade \
|
1749
|
+
project_id,
|
1750
|
+
zone,
|
1751
|
+
cluster_id,
|
1752
|
+
node_pool_id,
|
1753
|
+
name: nil,
|
1754
|
+
options: nil,
|
1755
|
+
&block
|
1756
|
+
req = {
|
1757
|
+
project_id: project_id,
|
1758
|
+
zone: zone,
|
1759
|
+
cluster_id: cluster_id,
|
1760
|
+
node_pool_id: node_pool_id,
|
1761
|
+
name: name
|
1762
|
+
}.delete_if { |_, v| v.nil? }
|
1763
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::RollbackNodePoolUpgradeRequest)
|
1764
|
+
@rollback_node_pool_upgrade.call(req, options, &block)
|
1765
|
+
end
|
1766
|
+
|
1767
|
+
# Sets the NodeManagement options for a node pool.
|
1768
|
+
#
|
1769
|
+
# @param project_id [String]
|
1770
|
+
# Deprecated. The Google Developers Console [project ID or project
|
1771
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
1772
|
+
# This field has been deprecated and replaced by the name field.
|
1773
|
+
# @param zone [String]
|
1774
|
+
# Deprecated. The name of the Google Compute Engine
|
1775
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1776
|
+
# resides.
|
1777
|
+
# This field has been deprecated and replaced by the name field.
|
1778
|
+
# @param cluster_id [String]
|
1779
|
+
# Deprecated. The name of the cluster to update.
|
1780
|
+
# This field has been deprecated and replaced by the name field.
|
1781
|
+
# @param node_pool_id [String]
|
1782
|
+
# Deprecated. The name of the node pool to update.
|
1783
|
+
# This field has been deprecated and replaced by the name field.
|
1784
|
+
# @param management [Google::Container::V1beta1::NodeManagement | Hash]
|
1785
|
+
# NodeManagement configuration for the node pool.
|
1786
|
+
# A hash of the same form as `Google::Container::V1beta1::NodeManagement`
|
1787
|
+
# can also be provided.
|
1788
|
+
# @param name [String]
|
1789
|
+
# The name (project, location, cluster, node pool id) of the node pool to set
|
1790
|
+
# management properties. Specified in the format
|
1791
|
+
# 'projects/*/locations/*/clusters/*/nodePools/*'.
|
1792
|
+
# @param options [Google::Gax::CallOptions]
|
1793
|
+
# Overrides the default settings for this call, e.g, timeout,
|
1794
|
+
# retries, etc.
|
1795
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1796
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
1797
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1798
|
+
# @return [Google::Container::V1beta1::Operation]
|
1799
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1800
|
+
# @example
|
1801
|
+
# require "google/cloud/container"
|
1802
|
+
#
|
1803
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
1804
|
+
#
|
1805
|
+
# # TODO: Initialize `project_id`:
|
1806
|
+
# project_id = ''
|
1807
|
+
#
|
1808
|
+
# # TODO: Initialize `zone`:
|
1809
|
+
# zone = ''
|
1810
|
+
#
|
1811
|
+
# # TODO: Initialize `cluster_id`:
|
1812
|
+
# cluster_id = ''
|
1813
|
+
#
|
1814
|
+
# # TODO: Initialize `node_pool_id`:
|
1815
|
+
# node_pool_id = ''
|
1816
|
+
#
|
1817
|
+
# # TODO: Initialize `management`:
|
1818
|
+
# management = {}
|
1819
|
+
# response = cluster_manager_client.set_node_pool_management(project_id, zone, cluster_id, node_pool_id, management)
|
1820
|
+
|
1821
|
+
def set_node_pool_management \
|
1822
|
+
project_id,
|
1823
|
+
zone,
|
1824
|
+
cluster_id,
|
1825
|
+
node_pool_id,
|
1826
|
+
management,
|
1827
|
+
name: nil,
|
1828
|
+
options: nil,
|
1829
|
+
&block
|
1830
|
+
req = {
|
1831
|
+
project_id: project_id,
|
1832
|
+
zone: zone,
|
1833
|
+
cluster_id: cluster_id,
|
1834
|
+
node_pool_id: node_pool_id,
|
1835
|
+
management: management,
|
1836
|
+
name: name
|
1837
|
+
}.delete_if { |_, v| v.nil? }
|
1838
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::SetNodePoolManagementRequest)
|
1839
|
+
@set_node_pool_management.call(req, options, &block)
|
1840
|
+
end
|
1841
|
+
|
1842
|
+
# Sets labels on a cluster.
|
1843
|
+
#
|
1844
|
+
# @param project_id [String]
|
1845
|
+
# Deprecated. The Google Developers Console [project ID or project
|
1846
|
+
# number](https://developers.google.com/console/help/new/#projectnumber).
|
1847
|
+
# This field has been deprecated and replaced by the name field.
|
1848
|
+
# @param zone [String]
|
1849
|
+
# Deprecated. The name of the Google Compute Engine
|
1850
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1851
|
+
# resides.
|
1852
|
+
# This field has been deprecated and replaced by the name field.
|
1853
|
+
# @param cluster_id [String]
|
1854
|
+
# Deprecated. The name of the cluster.
|
1855
|
+
# This field has been deprecated and replaced by the name field.
|
1856
|
+
# @param resource_labels [Hash{String => String}]
|
1857
|
+
# The labels to set for that cluster.
|
1858
|
+
# @param label_fingerprint [String]
|
1859
|
+
# The fingerprint of the previous set of labels for this resource,
|
1860
|
+
# used to detect conflicts. The fingerprint is initially generated by
|
1861
|
+
# Kubernetes Engine and changes after every request to modify or update
|
1862
|
+
# labels. You must always provide an up-to-date fingerprint hash when
|
1863
|
+
# updating or changing labels. Make a <code>get()</code> request to the
|
1864
|
+
# resource to get the latest fingerprint.
|
1865
|
+
# @param name [String]
|
1866
|
+
# The name (project, location, cluster id) of the cluster to set labels.
|
1867
|
+
# Specified in the format 'projects/*/locations/*/clusters/*'.
|
1868
|
+
# @param options [Google::Gax::CallOptions]
|
1869
|
+
# Overrides the default settings for this call, e.g, timeout,
|
1870
|
+
# retries, etc.
|
1871
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1872
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
1873
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1874
|
+
# @return [Google::Container::V1beta1::Operation]
|
1875
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1876
|
+
# @example
|
1877
|
+
# require "google/cloud/container"
|
1878
|
+
#
|
1879
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
1880
|
+
#
|
1881
|
+
# # TODO: Initialize `project_id`:
|
1882
|
+
# project_id = ''
|
1883
|
+
#
|
1884
|
+
# # TODO: Initialize `zone`:
|
1885
|
+
# zone = ''
|
1886
|
+
#
|
1887
|
+
# # TODO: Initialize `cluster_id`:
|
1888
|
+
# cluster_id = ''
|
1889
|
+
#
|
1890
|
+
# # TODO: Initialize `resource_labels`:
|
1891
|
+
# resource_labels = {}
|
1892
|
+
#
|
1893
|
+
# # TODO: Initialize `label_fingerprint`:
|
1894
|
+
# label_fingerprint = ''
|
1895
|
+
# response = cluster_manager_client.set_labels(project_id, zone, cluster_id, resource_labels, label_fingerprint)
|
1896
|
+
|
1897
|
+
def set_labels \
|
1898
|
+
project_id,
|
1899
|
+
zone,
|
1900
|
+
cluster_id,
|
1901
|
+
resource_labels,
|
1902
|
+
label_fingerprint,
|
1903
|
+
name: nil,
|
1904
|
+
options: nil,
|
1905
|
+
&block
|
1906
|
+
req = {
|
1907
|
+
project_id: project_id,
|
1908
|
+
zone: zone,
|
1909
|
+
cluster_id: cluster_id,
|
1910
|
+
resource_labels: resource_labels,
|
1911
|
+
label_fingerprint: label_fingerprint,
|
1912
|
+
name: name
|
1913
|
+
}.delete_if { |_, v| v.nil? }
|
1914
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::SetLabelsRequest)
|
1915
|
+
@set_labels.call(req, options, &block)
|
1916
|
+
end
|
1917
|
+
|
1918
|
+
# Enables or disables the ABAC authorization mechanism on a cluster.
|
1919
|
+
#
|
1920
|
+
# @param project_id [String]
|
1921
|
+
# Deprecated. The Google Developers Console [project ID or project
|
1922
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
1923
|
+
# This field has been deprecated and replaced by the name field.
|
1924
|
+
# @param zone [String]
|
1925
|
+
# Deprecated. The name of the Google Compute Engine
|
1926
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1927
|
+
# resides.
|
1928
|
+
# This field has been deprecated and replaced by the name field.
|
1929
|
+
# @param cluster_id [String]
|
1930
|
+
# Deprecated. The name of the cluster to update.
|
1931
|
+
# This field has been deprecated and replaced by the name field.
|
1932
|
+
# @param enabled [true, false]
|
1933
|
+
# Whether ABAC authorization will be enabled in the cluster.
|
1934
|
+
# @param name [String]
|
1935
|
+
# The name (project, location, cluster id) of the cluster to set legacy abac.
|
1936
|
+
# Specified in the format 'projects/*/locations/*/clusters/*'.
|
1937
|
+
# @param options [Google::Gax::CallOptions]
|
1938
|
+
# Overrides the default settings for this call, e.g, timeout,
|
1939
|
+
# retries, etc.
|
1940
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1941
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
1942
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1943
|
+
# @return [Google::Container::V1beta1::Operation]
|
1944
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1945
|
+
# @example
|
1946
|
+
# require "google/cloud/container"
|
1947
|
+
#
|
1948
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
1949
|
+
#
|
1950
|
+
# # TODO: Initialize `project_id`:
|
1951
|
+
# project_id = ''
|
1952
|
+
#
|
1953
|
+
# # TODO: Initialize `zone`:
|
1954
|
+
# zone = ''
|
1955
|
+
#
|
1956
|
+
# # TODO: Initialize `cluster_id`:
|
1957
|
+
# cluster_id = ''
|
1958
|
+
#
|
1959
|
+
# # TODO: Initialize `enabled`:
|
1960
|
+
# enabled = false
|
1961
|
+
# response = cluster_manager_client.set_legacy_abac(project_id, zone, cluster_id, enabled)
|
1962
|
+
|
1963
|
+
def set_legacy_abac \
|
1964
|
+
project_id,
|
1965
|
+
zone,
|
1966
|
+
cluster_id,
|
1967
|
+
enabled,
|
1968
|
+
name: nil,
|
1969
|
+
options: nil,
|
1970
|
+
&block
|
1971
|
+
req = {
|
1972
|
+
project_id: project_id,
|
1973
|
+
zone: zone,
|
1974
|
+
cluster_id: cluster_id,
|
1975
|
+
enabled: enabled,
|
1976
|
+
name: name
|
1977
|
+
}.delete_if { |_, v| v.nil? }
|
1978
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::SetLegacyAbacRequest)
|
1979
|
+
@set_legacy_abac.call(req, options, &block)
|
1980
|
+
end
|
1981
|
+
|
1982
|
+
# Start master IP rotation.
|
1983
|
+
#
|
1984
|
+
# @param project_id [String]
|
1985
|
+
# Deprecated. The Google Developers Console [project ID or project
|
1986
|
+
# number](https://developers.google.com/console/help/new/#projectnumber).
|
1987
|
+
# This field has been deprecated and replaced by the name field.
|
1988
|
+
# @param zone [String]
|
1989
|
+
# Deprecated. The name of the Google Compute Engine
|
1990
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
1991
|
+
# resides.
|
1992
|
+
# This field has been deprecated and replaced by the name field.
|
1993
|
+
# @param cluster_id [String]
|
1994
|
+
# Deprecated. The name of the cluster.
|
1995
|
+
# This field has been deprecated and replaced by the name field.
|
1996
|
+
# @param name [String]
|
1997
|
+
# The name (project, location, cluster id) of the cluster to start IP
|
1998
|
+
# rotation. Specified in the format 'projects/*/locations/*/clusters/*'.
|
1999
|
+
# @param rotate_credentials [true, false]
|
2000
|
+
# Whether to rotate credentials during IP rotation.
|
2001
|
+
# @param options [Google::Gax::CallOptions]
|
2002
|
+
# Overrides the default settings for this call, e.g, timeout,
|
2003
|
+
# retries, etc.
|
2004
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
2005
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
2006
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2007
|
+
# @return [Google::Container::V1beta1::Operation]
|
2008
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
2009
|
+
# @example
|
2010
|
+
# require "google/cloud/container"
|
2011
|
+
#
|
2012
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
2013
|
+
#
|
2014
|
+
# # TODO: Initialize `project_id`:
|
2015
|
+
# project_id = ''
|
2016
|
+
#
|
2017
|
+
# # TODO: Initialize `zone`:
|
2018
|
+
# zone = ''
|
2019
|
+
#
|
2020
|
+
# # TODO: Initialize `cluster_id`:
|
2021
|
+
# cluster_id = ''
|
2022
|
+
# response = cluster_manager_client.start_ip_rotation(project_id, zone, cluster_id)
|
2023
|
+
|
2024
|
+
def start_ip_rotation \
|
2025
|
+
project_id,
|
2026
|
+
zone,
|
2027
|
+
cluster_id,
|
2028
|
+
name: nil,
|
2029
|
+
rotate_credentials: nil,
|
2030
|
+
options: nil,
|
2031
|
+
&block
|
2032
|
+
req = {
|
2033
|
+
project_id: project_id,
|
2034
|
+
zone: zone,
|
2035
|
+
cluster_id: cluster_id,
|
2036
|
+
name: name,
|
2037
|
+
rotate_credentials: rotate_credentials
|
2038
|
+
}.delete_if { |_, v| v.nil? }
|
2039
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::StartIPRotationRequest)
|
2040
|
+
@start_ip_rotation.call(req, options, &block)
|
2041
|
+
end
|
2042
|
+
|
2043
|
+
# Completes master IP rotation.
|
2044
|
+
#
|
2045
|
+
# @param project_id [String]
|
2046
|
+
# Deprecated. The Google Developers Console [project ID or project
|
2047
|
+
# number](https://developers.google.com/console/help/new/#projectnumber).
|
2048
|
+
# This field has been deprecated and replaced by the name field.
|
2049
|
+
# @param zone [String]
|
2050
|
+
# Deprecated. The name of the Google Compute Engine
|
2051
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
2052
|
+
# resides.
|
2053
|
+
# This field has been deprecated and replaced by the name field.
|
2054
|
+
# @param cluster_id [String]
|
2055
|
+
# Deprecated. The name of the cluster.
|
2056
|
+
# This field has been deprecated and replaced by the name field.
|
2057
|
+
# @param name [String]
|
2058
|
+
# The name (project, location, cluster id) of the cluster to complete IP
|
2059
|
+
# rotation. Specified in the format 'projects/*/locations/*/clusters/*'.
|
2060
|
+
# @param options [Google::Gax::CallOptions]
|
2061
|
+
# Overrides the default settings for this call, e.g, timeout,
|
2062
|
+
# retries, etc.
|
2063
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
2064
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
2065
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2066
|
+
# @return [Google::Container::V1beta1::Operation]
|
2067
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
2068
|
+
# @example
|
2069
|
+
# require "google/cloud/container"
|
2070
|
+
#
|
2071
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
2072
|
+
#
|
2073
|
+
# # TODO: Initialize `project_id`:
|
2074
|
+
# project_id = ''
|
2075
|
+
#
|
2076
|
+
# # TODO: Initialize `zone`:
|
2077
|
+
# zone = ''
|
2078
|
+
#
|
2079
|
+
# # TODO: Initialize `cluster_id`:
|
2080
|
+
# cluster_id = ''
|
2081
|
+
# response = cluster_manager_client.complete_ip_rotation(project_id, zone, cluster_id)
|
2082
|
+
|
2083
|
+
def complete_ip_rotation \
|
2084
|
+
project_id,
|
2085
|
+
zone,
|
2086
|
+
cluster_id,
|
2087
|
+
name: nil,
|
2088
|
+
options: nil,
|
2089
|
+
&block
|
2090
|
+
req = {
|
2091
|
+
project_id: project_id,
|
2092
|
+
zone: zone,
|
2093
|
+
cluster_id: cluster_id,
|
2094
|
+
name: name
|
2095
|
+
}.delete_if { |_, v| v.nil? }
|
2096
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::CompleteIPRotationRequest)
|
2097
|
+
@complete_ip_rotation.call(req, options, &block)
|
2098
|
+
end
|
2099
|
+
|
2100
|
+
# Sets the size for a specific node pool.
|
2101
|
+
#
|
2102
|
+
# @param project_id [String]
|
2103
|
+
# Deprecated. The Google Developers Console [project ID or project
|
2104
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
2105
|
+
# This field has been deprecated and replaced by the name field.
|
2106
|
+
# @param zone [String]
|
2107
|
+
# Deprecated. The name of the Google Compute Engine
|
2108
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
2109
|
+
# resides.
|
2110
|
+
# This field has been deprecated and replaced by the name field.
|
2111
|
+
# @param cluster_id [String]
|
2112
|
+
# Deprecated. The name of the cluster to update.
|
2113
|
+
# This field has been deprecated and replaced by the name field.
|
2114
|
+
# @param node_pool_id [String]
|
2115
|
+
# Deprecated. The name of the node pool to update.
|
2116
|
+
# This field has been deprecated and replaced by the name field.
|
2117
|
+
# @param node_count [Integer]
|
2118
|
+
# The desired node count for the pool.
|
2119
|
+
# @param name [String]
|
2120
|
+
# The name (project, location, cluster, node pool id) of the node pool to set
|
2121
|
+
# size.
|
2122
|
+
# Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.
|
2123
|
+
# @param options [Google::Gax::CallOptions]
|
2124
|
+
# Overrides the default settings for this call, e.g, timeout,
|
2125
|
+
# retries, etc.
|
2126
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
2127
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
2128
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2129
|
+
# @return [Google::Container::V1beta1::Operation]
|
2130
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
2131
|
+
# @example
|
2132
|
+
# require "google/cloud/container"
|
2133
|
+
#
|
2134
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
2135
|
+
#
|
2136
|
+
# # TODO: Initialize `project_id`:
|
2137
|
+
# project_id = ''
|
2138
|
+
#
|
2139
|
+
# # TODO: Initialize `zone`:
|
2140
|
+
# zone = ''
|
2141
|
+
#
|
2142
|
+
# # TODO: Initialize `cluster_id`:
|
2143
|
+
# cluster_id = ''
|
2144
|
+
#
|
2145
|
+
# # TODO: Initialize `node_pool_id`:
|
2146
|
+
# node_pool_id = ''
|
2147
|
+
#
|
2148
|
+
# # TODO: Initialize `node_count`:
|
2149
|
+
# node_count = 0
|
2150
|
+
# response = cluster_manager_client.set_node_pool_size(project_id, zone, cluster_id, node_pool_id, node_count)
|
2151
|
+
|
2152
|
+
def set_node_pool_size \
|
2153
|
+
project_id,
|
2154
|
+
zone,
|
2155
|
+
cluster_id,
|
2156
|
+
node_pool_id,
|
2157
|
+
node_count,
|
2158
|
+
name: nil,
|
2159
|
+
options: nil,
|
2160
|
+
&block
|
2161
|
+
req = {
|
2162
|
+
project_id: project_id,
|
2163
|
+
zone: zone,
|
2164
|
+
cluster_id: cluster_id,
|
2165
|
+
node_pool_id: node_pool_id,
|
2166
|
+
node_count: node_count,
|
2167
|
+
name: name
|
2168
|
+
}.delete_if { |_, v| v.nil? }
|
2169
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::SetNodePoolSizeRequest)
|
2170
|
+
@set_node_pool_size.call(req, options, &block)
|
2171
|
+
end
|
2172
|
+
|
2173
|
+
# Enables/Disables Network Policy for a cluster.
|
2174
|
+
#
|
2175
|
+
# @param project_id [String]
|
2176
|
+
# Deprecated. The Google Developers Console [project ID or project
|
2177
|
+
# number](https://developers.google.com/console/help/new/#projectnumber).
|
2178
|
+
# This field has been deprecated and replaced by the name field.
|
2179
|
+
# @param zone [String]
|
2180
|
+
# Deprecated. The name of the Google Compute Engine
|
2181
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
2182
|
+
# resides.
|
2183
|
+
# This field has been deprecated and replaced by the name field.
|
2184
|
+
# @param cluster_id [String]
|
2185
|
+
# Deprecated. The name of the cluster.
|
2186
|
+
# This field has been deprecated and replaced by the name field.
|
2187
|
+
# @param network_policy [Google::Container::V1beta1::NetworkPolicy | Hash]
|
2188
|
+
# Configuration options for the NetworkPolicy feature.
|
2189
|
+
# A hash of the same form as `Google::Container::V1beta1::NetworkPolicy`
|
2190
|
+
# can also be provided.
|
2191
|
+
# @param name [String]
|
2192
|
+
# The name (project, location, cluster id) of the cluster to set networking
|
2193
|
+
# policy. Specified in the format 'projects/*/locations/*/clusters/*'.
|
2194
|
+
# @param options [Google::Gax::CallOptions]
|
2195
|
+
# Overrides the default settings for this call, e.g, timeout,
|
2196
|
+
# retries, etc.
|
2197
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
2198
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
2199
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2200
|
+
# @return [Google::Container::V1beta1::Operation]
|
2201
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
2202
|
+
# @example
|
2203
|
+
# require "google/cloud/container"
|
2204
|
+
#
|
2205
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
2206
|
+
#
|
2207
|
+
# # TODO: Initialize `project_id`:
|
2208
|
+
# project_id = ''
|
2209
|
+
#
|
2210
|
+
# # TODO: Initialize `zone`:
|
2211
|
+
# zone = ''
|
2212
|
+
#
|
2213
|
+
# # TODO: Initialize `cluster_id`:
|
2214
|
+
# cluster_id = ''
|
2215
|
+
#
|
2216
|
+
# # TODO: Initialize `network_policy`:
|
2217
|
+
# network_policy = {}
|
2218
|
+
# response = cluster_manager_client.set_network_policy(project_id, zone, cluster_id, network_policy)
|
2219
|
+
|
2220
|
+
def set_network_policy \
|
2221
|
+
project_id,
|
2222
|
+
zone,
|
2223
|
+
cluster_id,
|
2224
|
+
network_policy,
|
2225
|
+
name: nil,
|
2226
|
+
options: nil,
|
2227
|
+
&block
|
2228
|
+
req = {
|
2229
|
+
project_id: project_id,
|
2230
|
+
zone: zone,
|
2231
|
+
cluster_id: cluster_id,
|
2232
|
+
network_policy: network_policy,
|
2233
|
+
name: name
|
2234
|
+
}.delete_if { |_, v| v.nil? }
|
2235
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::SetNetworkPolicyRequest)
|
2236
|
+
@set_network_policy.call(req, options, &block)
|
2237
|
+
end
|
2238
|
+
|
2239
|
+
# Sets the maintenance policy for a cluster.
|
2240
|
+
#
|
2241
|
+
# @param project_id [String]
|
2242
|
+
# The Google Developers Console [project ID or project
|
2243
|
+
# number](https://support.google.com/cloud/answer/6158840).
|
2244
|
+
# @param zone [String]
|
2245
|
+
# The name of the Google Compute Engine
|
2246
|
+
# [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster
|
2247
|
+
# resides.
|
2248
|
+
# @param cluster_id [String]
|
2249
|
+
# The name of the cluster to update.
|
2250
|
+
# @param maintenance_policy [Google::Container::V1beta1::MaintenancePolicy | Hash]
|
2251
|
+
# The maintenance policy to be set for the cluster. An empty field
|
2252
|
+
# clears the existing maintenance policy.
|
2253
|
+
# A hash of the same form as `Google::Container::V1beta1::MaintenancePolicy`
|
2254
|
+
# can also be provided.
|
2255
|
+
# @param name [String]
|
2256
|
+
# The name (project, location, cluster id) of the cluster to set maintenance
|
2257
|
+
# policy.
|
2258
|
+
# Specified in the format 'projects/*/locations/*/clusters/*'.
|
2259
|
+
# @param options [Google::Gax::CallOptions]
|
2260
|
+
# Overrides the default settings for this call, e.g, timeout,
|
2261
|
+
# retries, etc.
|
2262
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
2263
|
+
# @yieldparam result [Google::Container::V1beta1::Operation]
|
2264
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2265
|
+
# @return [Google::Container::V1beta1::Operation]
|
2266
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
2267
|
+
# @example
|
2268
|
+
# require "google/cloud/container"
|
2269
|
+
#
|
2270
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
2271
|
+
#
|
2272
|
+
# # TODO: Initialize `project_id`:
|
2273
|
+
# project_id = ''
|
2274
|
+
#
|
2275
|
+
# # TODO: Initialize `zone`:
|
2276
|
+
# zone = ''
|
2277
|
+
#
|
2278
|
+
# # TODO: Initialize `cluster_id`:
|
2279
|
+
# cluster_id = ''
|
2280
|
+
#
|
2281
|
+
# # TODO: Initialize `maintenance_policy`:
|
2282
|
+
# maintenance_policy = {}
|
2283
|
+
# response = cluster_manager_client.set_maintenance_policy(project_id, zone, cluster_id, maintenance_policy)
|
2284
|
+
|
2285
|
+
def set_maintenance_policy \
|
2286
|
+
project_id,
|
2287
|
+
zone,
|
2288
|
+
cluster_id,
|
2289
|
+
maintenance_policy,
|
2290
|
+
name: nil,
|
2291
|
+
options: nil,
|
2292
|
+
&block
|
2293
|
+
req = {
|
2294
|
+
project_id: project_id,
|
2295
|
+
zone: zone,
|
2296
|
+
cluster_id: cluster_id,
|
2297
|
+
maintenance_policy: maintenance_policy,
|
2298
|
+
name: name
|
2299
|
+
}.delete_if { |_, v| v.nil? }
|
2300
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::SetMaintenancePolicyRequest)
|
2301
|
+
@set_maintenance_policy.call(req, options, &block)
|
2302
|
+
end
|
2303
|
+
|
2304
|
+
# Lists subnetworks that are usable for creating clusters in a project.
|
2305
|
+
#
|
2306
|
+
# @param parent [String]
|
2307
|
+
# The parent project where subnetworks are usable.
|
2308
|
+
# Specified in the format 'projects/*'.
|
2309
|
+
# @param filter [String]
|
2310
|
+
# Filtering currently only supports equality on the networkProjectId and must
|
2311
|
+
# be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId`
|
2312
|
+
# is the project which owns the listed subnetworks. This defaults to the
|
2313
|
+
# parent project ID.
|
2314
|
+
# @param page_size [Integer]
|
2315
|
+
# The maximum number of resources contained in the underlying API
|
2316
|
+
# response. If page streaming is performed per-resource, this
|
2317
|
+
# parameter does not affect the return value. If page streaming is
|
2318
|
+
# performed per-page, this determines the maximum number of
|
2319
|
+
# resources in a page.
|
2320
|
+
# @param options [Google::Gax::CallOptions]
|
2321
|
+
# Overrides the default settings for this call, e.g, timeout,
|
2322
|
+
# retries, etc.
|
2323
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
2324
|
+
# @yieldparam result [Google::Gax::PagedEnumerable<Google::Container::V1beta1::UsableSubnetwork>]
|
2325
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2326
|
+
# @return [Google::Gax::PagedEnumerable<Google::Container::V1beta1::UsableSubnetwork>]
|
2327
|
+
# An enumerable of Google::Container::V1beta1::UsableSubnetwork instances.
|
2328
|
+
# See Google::Gax::PagedEnumerable documentation for other
|
2329
|
+
# operations such as per-page iteration or access to the response
|
2330
|
+
# object.
|
2331
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
2332
|
+
# @example
|
2333
|
+
# require "google/cloud/container"
|
2334
|
+
#
|
2335
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
2336
|
+
#
|
2337
|
+
# # TODO: Initialize `parent`:
|
2338
|
+
# parent = ''
|
2339
|
+
#
|
2340
|
+
# # Iterate over all results.
|
2341
|
+
# cluster_manager_client.list_usable_subnetworks(parent).each do |element|
|
2342
|
+
# # Process element.
|
2343
|
+
# end
|
2344
|
+
#
|
2345
|
+
# # Or iterate over results one page at a time.
|
2346
|
+
# cluster_manager_client.list_usable_subnetworks(parent).each_page do |page|
|
2347
|
+
# # Process each page at a time.
|
2348
|
+
# page.each do |element|
|
2349
|
+
# # Process element.
|
2350
|
+
# end
|
2351
|
+
# end
|
2352
|
+
|
2353
|
+
def list_usable_subnetworks \
|
2354
|
+
parent,
|
2355
|
+
filter: nil,
|
2356
|
+
page_size: nil,
|
2357
|
+
options: nil,
|
2358
|
+
&block
|
2359
|
+
req = {
|
2360
|
+
parent: parent,
|
2361
|
+
filter: filter,
|
2362
|
+
page_size: page_size
|
2363
|
+
}.delete_if { |_, v| v.nil? }
|
2364
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::ListUsableSubnetworksRequest)
|
2365
|
+
@list_usable_subnetworks.call(req, options, &block)
|
2366
|
+
end
|
2367
|
+
|
2368
|
+
# Used to fetch locations that offer GKE.
|
2369
|
+
#
|
2370
|
+
# @param parent [String]
|
2371
|
+
# Contains the name of the resource requested.
|
2372
|
+
# Specified in the format 'projects/*'.
|
2373
|
+
# @param options [Google::Gax::CallOptions]
|
2374
|
+
# Overrides the default settings for this call, e.g, timeout,
|
2375
|
+
# retries, etc.
|
2376
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
2377
|
+
# @yieldparam result [Google::Container::V1beta1::ListLocationsResponse]
|
2378
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2379
|
+
# @return [Google::Container::V1beta1::ListLocationsResponse]
|
2380
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
2381
|
+
# @example
|
2382
|
+
# require "google/cloud/container"
|
2383
|
+
#
|
2384
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1beta1)
|
2385
|
+
#
|
2386
|
+
# # TODO: Initialize `parent`:
|
2387
|
+
# parent = ''
|
2388
|
+
# response = cluster_manager_client.list_locations(parent)
|
2389
|
+
|
2390
|
+
def list_locations \
|
2391
|
+
parent,
|
2392
|
+
options: nil,
|
2393
|
+
&block
|
2394
|
+
req = {
|
2395
|
+
parent: parent
|
2396
|
+
}.delete_if { |_, v| v.nil? }
|
2397
|
+
req = Google::Gax::to_proto(req, Google::Container::V1beta1::ListLocationsRequest)
|
2398
|
+
@list_locations.call(req, options, &block)
|
2399
|
+
end
|
2400
|
+
end
|
2401
|
+
end
|
2402
|
+
end
|
2403
|
+
end
|
2404
|
+
end
|