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