google-cloud-container 2.56.1__py3-none-any.whl

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.
Files changed (40) hide show
  1. google/cloud/container/__init__.py +393 -0
  2. google/cloud/container/gapic_version.py +16 -0
  3. google/cloud/container/py.typed +2 -0
  4. google/cloud/container_v1/__init__.py +388 -0
  5. google/cloud/container_v1/gapic_metadata.json +538 -0
  6. google/cloud/container_v1/gapic_version.py +16 -0
  7. google/cloud/container_v1/py.typed +2 -0
  8. google/cloud/container_v1/services/__init__.py +15 -0
  9. google/cloud/container_v1/services/cluster_manager/__init__.py +22 -0
  10. google/cloud/container_v1/services/cluster_manager/async_client.py +4985 -0
  11. google/cloud/container_v1/services/cluster_manager/client.py +5367 -0
  12. google/cloud/container_v1/services/cluster_manager/pagers.py +199 -0
  13. google/cloud/container_v1/services/cluster_manager/transports/__init__.py +36 -0
  14. google/cloud/container_v1/services/cluster_manager/transports/base.py +732 -0
  15. google/cloud/container_v1/services/cluster_manager/transports/grpc.py +1293 -0
  16. google/cloud/container_v1/services/cluster_manager/transports/grpc_asyncio.py +1619 -0
  17. google/cloud/container_v1/services/cluster_manager/transports/rest.py +7531 -0
  18. google/cloud/container_v1/services/cluster_manager/transports/rest_base.py +1796 -0
  19. google/cloud/container_v1/types/__init__.py +380 -0
  20. google/cloud/container_v1/types/cluster_service.py +10647 -0
  21. google/cloud/container_v1beta1/__init__.py +408 -0
  22. google/cloud/container_v1beta1/gapic_metadata.json +373 -0
  23. google/cloud/container_v1beta1/gapic_version.py +16 -0
  24. google/cloud/container_v1beta1/py.typed +2 -0
  25. google/cloud/container_v1beta1/services/__init__.py +15 -0
  26. google/cloud/container_v1beta1/services/cluster_manager/__init__.py +22 -0
  27. google/cloud/container_v1beta1/services/cluster_manager/async_client.py +5127 -0
  28. google/cloud/container_v1beta1/services/cluster_manager/client.py +5458 -0
  29. google/cloud/container_v1beta1/services/cluster_manager/pagers.py +199 -0
  30. google/cloud/container_v1beta1/services/cluster_manager/transports/__init__.py +32 -0
  31. google/cloud/container_v1beta1/services/cluster_manager/transports/base.py +769 -0
  32. google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py +1322 -0
  33. google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py +1674 -0
  34. google/cloud/container_v1beta1/types/__init__.py +400 -0
  35. google/cloud/container_v1beta1/types/cluster_service.py +11054 -0
  36. google_cloud_container-2.56.1.dist-info/LICENSE +202 -0
  37. google_cloud_container-2.56.1.dist-info/METADATA +228 -0
  38. google_cloud_container-2.56.1.dist-info/RECORD +40 -0
  39. google_cloud_container-2.56.1.dist-info/WHEEL +5 -0
  40. google_cloud_container-2.56.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1293 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2024 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ import json
17
+ import logging as std_logging
18
+ import pickle
19
+ from typing import Callable, Dict, Optional, Sequence, Tuple, Union
20
+ import warnings
21
+
22
+ from google.api_core import gapic_v1, grpc_helpers
23
+ import google.auth # type: ignore
24
+ from google.auth import credentials as ga_credentials # type: ignore
25
+ from google.auth.transport.grpc import SslCredentials # type: ignore
26
+ from google.protobuf import empty_pb2 # type: ignore
27
+ from google.protobuf.json_format import MessageToJson
28
+ import google.protobuf.message
29
+ import grpc # type: ignore
30
+ import proto # type: ignore
31
+
32
+ from google.cloud.container_v1.types import cluster_service
33
+
34
+ from .base import DEFAULT_CLIENT_INFO, ClusterManagerTransport
35
+
36
+ try:
37
+ from google.api_core import client_logging # type: ignore
38
+
39
+ CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER
40
+ except ImportError: # pragma: NO COVER
41
+ CLIENT_LOGGING_SUPPORTED = False
42
+
43
+ _LOGGER = std_logging.getLogger(__name__)
44
+
45
+
46
+ class _LoggingClientInterceptor(grpc.UnaryUnaryClientInterceptor): # pragma: NO COVER
47
+ def intercept_unary_unary(self, continuation, client_call_details, request):
48
+ logging_enabled = CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor(
49
+ std_logging.DEBUG
50
+ )
51
+ if logging_enabled: # pragma: NO COVER
52
+ request_metadata = client_call_details.metadata
53
+ if isinstance(request, proto.Message):
54
+ request_payload = type(request).to_json(request)
55
+ elif isinstance(request, google.protobuf.message.Message):
56
+ request_payload = MessageToJson(request)
57
+ else:
58
+ request_payload = f"{type(request).__name__}: {pickle.dumps(request)}"
59
+
60
+ request_metadata = {
61
+ key: value.decode("utf-8") if isinstance(value, bytes) else value
62
+ for key, value in request_metadata
63
+ }
64
+ grpc_request = {
65
+ "payload": request_payload,
66
+ "requestMethod": "grpc",
67
+ "metadata": dict(request_metadata),
68
+ }
69
+ _LOGGER.debug(
70
+ f"Sending request for {client_call_details.method}",
71
+ extra={
72
+ "serviceName": "google.container.v1.ClusterManager",
73
+ "rpcName": client_call_details.method,
74
+ "request": grpc_request,
75
+ "metadata": grpc_request["metadata"],
76
+ },
77
+ )
78
+
79
+ response = continuation(client_call_details, request)
80
+ if logging_enabled: # pragma: NO COVER
81
+ response_metadata = response.trailing_metadata()
82
+ # Convert gRPC metadata `<class 'grpc.aio._metadata.Metadata'>` to list of tuples
83
+ metadata = (
84
+ dict([(k, str(v)) for k, v in response_metadata])
85
+ if response_metadata
86
+ else None
87
+ )
88
+ result = response.result()
89
+ if isinstance(result, proto.Message):
90
+ response_payload = type(result).to_json(result)
91
+ elif isinstance(result, google.protobuf.message.Message):
92
+ response_payload = MessageToJson(result)
93
+ else:
94
+ response_payload = f"{type(result).__name__}: {pickle.dumps(result)}"
95
+ grpc_response = {
96
+ "payload": response_payload,
97
+ "metadata": metadata,
98
+ "status": "OK",
99
+ }
100
+ _LOGGER.debug(
101
+ f"Received response for {client_call_details.method}.",
102
+ extra={
103
+ "serviceName": "google.container.v1.ClusterManager",
104
+ "rpcName": client_call_details.method,
105
+ "response": grpc_response,
106
+ "metadata": grpc_response["metadata"],
107
+ },
108
+ )
109
+ return response
110
+
111
+
112
+ class ClusterManagerGrpcTransport(ClusterManagerTransport):
113
+ """gRPC backend transport for ClusterManager.
114
+
115
+ Google Kubernetes Engine Cluster Manager v1
116
+
117
+ This class defines the same methods as the primary client, so the
118
+ primary client can load the underlying transport implementation
119
+ and call it.
120
+
121
+ It sends protocol buffers over the wire using gRPC (which is built on
122
+ top of HTTP/2); the ``grpcio`` package must be installed.
123
+ """
124
+
125
+ _stubs: Dict[str, Callable]
126
+
127
+ def __init__(
128
+ self,
129
+ *,
130
+ host: str = "container.googleapis.com",
131
+ credentials: Optional[ga_credentials.Credentials] = None,
132
+ credentials_file: Optional[str] = None,
133
+ scopes: Optional[Sequence[str]] = None,
134
+ channel: Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]] = None,
135
+ api_mtls_endpoint: Optional[str] = None,
136
+ client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
137
+ ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
138
+ client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
139
+ quota_project_id: Optional[str] = None,
140
+ client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
141
+ always_use_jwt_access: Optional[bool] = False,
142
+ api_audience: Optional[str] = None,
143
+ ) -> None:
144
+ """Instantiate the transport.
145
+
146
+ Args:
147
+ host (Optional[str]):
148
+ The hostname to connect to (default: 'container.googleapis.com').
149
+ credentials (Optional[google.auth.credentials.Credentials]): The
150
+ authorization credentials to attach to requests. These
151
+ credentials identify the application to the service; if none
152
+ are specified, the client will attempt to ascertain the
153
+ credentials from the environment.
154
+ This argument is ignored if a ``channel`` instance is provided.
155
+ credentials_file (Optional[str]): A file with credentials that can
156
+ be loaded with :func:`google.auth.load_credentials_from_file`.
157
+ This argument is ignored if a ``channel`` instance is provided.
158
+ scopes (Optional(Sequence[str])): A list of scopes. This argument is
159
+ ignored if a ``channel`` instance is provided.
160
+ channel (Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]]):
161
+ A ``Channel`` instance through which to make calls, or a Callable
162
+ that constructs and returns one. If set to None, ``self.create_channel``
163
+ is used to create the channel. If a Callable is given, it will be called
164
+ with the same arguments as used in ``self.create_channel``.
165
+ api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
166
+ If provided, it overrides the ``host`` argument and tries to create
167
+ a mutual TLS channel with client SSL credentials from
168
+ ``client_cert_source`` or application default SSL credentials.
169
+ client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
170
+ Deprecated. A callback to provide client SSL certificate bytes and
171
+ private key bytes, both in PEM format. It is ignored if
172
+ ``api_mtls_endpoint`` is None.
173
+ ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
174
+ for the grpc channel. It is ignored if a ``channel`` instance is provided.
175
+ client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
176
+ A callback to provide client certificate bytes and private key bytes,
177
+ both in PEM format. It is used to configure a mutual TLS channel. It is
178
+ ignored if a ``channel`` instance or ``ssl_channel_credentials`` is provided.
179
+ quota_project_id (Optional[str]): An optional project to use for billing
180
+ and quota.
181
+ client_info (google.api_core.gapic_v1.client_info.ClientInfo):
182
+ The client info used to send a user-agent string along with
183
+ API requests. If ``None``, then default info will be used.
184
+ Generally, you only need to set this if you're developing
185
+ your own client library.
186
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
187
+ be used for service account credentials.
188
+
189
+ Raises:
190
+ google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
191
+ creation failed for any reason.
192
+ google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials``
193
+ and ``credentials_file`` are passed.
194
+ """
195
+ self._grpc_channel = None
196
+ self._ssl_channel_credentials = ssl_channel_credentials
197
+ self._stubs: Dict[str, Callable] = {}
198
+
199
+ if api_mtls_endpoint:
200
+ warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning)
201
+ if client_cert_source:
202
+ warnings.warn("client_cert_source is deprecated", DeprecationWarning)
203
+
204
+ if isinstance(channel, grpc.Channel):
205
+ # Ignore credentials if a channel was passed.
206
+ credentials = None
207
+ self._ignore_credentials = True
208
+ # If a channel was explicitly provided, set it.
209
+ self._grpc_channel = channel
210
+ self._ssl_channel_credentials = None
211
+
212
+ else:
213
+ if api_mtls_endpoint:
214
+ host = api_mtls_endpoint
215
+
216
+ # Create SSL credentials with client_cert_source or application
217
+ # default SSL credentials.
218
+ if client_cert_source:
219
+ cert, key = client_cert_source()
220
+ self._ssl_channel_credentials = grpc.ssl_channel_credentials(
221
+ certificate_chain=cert, private_key=key
222
+ )
223
+ else:
224
+ self._ssl_channel_credentials = SslCredentials().ssl_credentials
225
+
226
+ else:
227
+ if client_cert_source_for_mtls and not ssl_channel_credentials:
228
+ cert, key = client_cert_source_for_mtls()
229
+ self._ssl_channel_credentials = grpc.ssl_channel_credentials(
230
+ certificate_chain=cert, private_key=key
231
+ )
232
+
233
+ # The base transport sets the host, credentials and scopes
234
+ super().__init__(
235
+ host=host,
236
+ credentials=credentials,
237
+ credentials_file=credentials_file,
238
+ scopes=scopes,
239
+ quota_project_id=quota_project_id,
240
+ client_info=client_info,
241
+ always_use_jwt_access=always_use_jwt_access,
242
+ api_audience=api_audience,
243
+ )
244
+
245
+ if not self._grpc_channel:
246
+ # initialize with the provided callable or the default channel
247
+ channel_init = channel or type(self).create_channel
248
+ self._grpc_channel = channel_init(
249
+ self._host,
250
+ # use the credentials which are saved
251
+ credentials=self._credentials,
252
+ # Set ``credentials_file`` to ``None`` here as
253
+ # the credentials that we saved earlier should be used.
254
+ credentials_file=None,
255
+ scopes=self._scopes,
256
+ ssl_credentials=self._ssl_channel_credentials,
257
+ quota_project_id=quota_project_id,
258
+ options=[
259
+ ("grpc.max_send_message_length", -1),
260
+ ("grpc.max_receive_message_length", -1),
261
+ ],
262
+ )
263
+
264
+ self._interceptor = _LoggingClientInterceptor()
265
+ self._logged_channel = grpc.intercept_channel(
266
+ self._grpc_channel, self._interceptor
267
+ )
268
+
269
+ # Wrap messages. This must be done after self._logged_channel exists
270
+ self._prep_wrapped_messages(client_info)
271
+
272
+ @classmethod
273
+ def create_channel(
274
+ cls,
275
+ host: str = "container.googleapis.com",
276
+ credentials: Optional[ga_credentials.Credentials] = None,
277
+ credentials_file: Optional[str] = None,
278
+ scopes: Optional[Sequence[str]] = None,
279
+ quota_project_id: Optional[str] = None,
280
+ **kwargs,
281
+ ) -> grpc.Channel:
282
+ """Create and return a gRPC channel object.
283
+ Args:
284
+ host (Optional[str]): The host for the channel to use.
285
+ credentials (Optional[~.Credentials]): The
286
+ authorization credentials to attach to requests. These
287
+ credentials identify this application to the service. If
288
+ none are specified, the client will attempt to ascertain
289
+ the credentials from the environment.
290
+ credentials_file (Optional[str]): A file with credentials that can
291
+ be loaded with :func:`google.auth.load_credentials_from_file`.
292
+ This argument is mutually exclusive with credentials.
293
+ scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
294
+ service. These are only used when credentials are not specified and
295
+ are passed to :func:`google.auth.default`.
296
+ quota_project_id (Optional[str]): An optional project to use for billing
297
+ and quota.
298
+ kwargs (Optional[dict]): Keyword arguments, which are passed to the
299
+ channel creation.
300
+ Returns:
301
+ grpc.Channel: A gRPC channel object.
302
+
303
+ Raises:
304
+ google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials``
305
+ and ``credentials_file`` are passed.
306
+ """
307
+
308
+ return grpc_helpers.create_channel(
309
+ host,
310
+ credentials=credentials,
311
+ credentials_file=credentials_file,
312
+ quota_project_id=quota_project_id,
313
+ default_scopes=cls.AUTH_SCOPES,
314
+ scopes=scopes,
315
+ default_host=cls.DEFAULT_HOST,
316
+ **kwargs,
317
+ )
318
+
319
+ @property
320
+ def grpc_channel(self) -> grpc.Channel:
321
+ """Return the channel designed to connect to this service."""
322
+ return self._grpc_channel
323
+
324
+ @property
325
+ def list_clusters(
326
+ self,
327
+ ) -> Callable[
328
+ [cluster_service.ListClustersRequest], cluster_service.ListClustersResponse
329
+ ]:
330
+ r"""Return a callable for the list clusters method over gRPC.
331
+
332
+ Lists all clusters owned by a project in either the
333
+ specified zone or all zones.
334
+
335
+ Returns:
336
+ Callable[[~.ListClustersRequest],
337
+ ~.ListClustersResponse]:
338
+ A function that, when called, will call the underlying RPC
339
+ on the server.
340
+ """
341
+ # Generate a "stub function" on-the-fly which will actually make
342
+ # the request.
343
+ # gRPC handles serialization and deserialization, so we just need
344
+ # to pass in the functions for each.
345
+ if "list_clusters" not in self._stubs:
346
+ self._stubs["list_clusters"] = self._logged_channel.unary_unary(
347
+ "/google.container.v1.ClusterManager/ListClusters",
348
+ request_serializer=cluster_service.ListClustersRequest.serialize,
349
+ response_deserializer=cluster_service.ListClustersResponse.deserialize,
350
+ )
351
+ return self._stubs["list_clusters"]
352
+
353
+ @property
354
+ def get_cluster(
355
+ self,
356
+ ) -> Callable[[cluster_service.GetClusterRequest], cluster_service.Cluster]:
357
+ r"""Return a callable for the get cluster method over gRPC.
358
+
359
+ Gets the details of a specific cluster.
360
+
361
+ Returns:
362
+ Callable[[~.GetClusterRequest],
363
+ ~.Cluster]:
364
+ A function that, when called, will call the underlying RPC
365
+ on the server.
366
+ """
367
+ # Generate a "stub function" on-the-fly which will actually make
368
+ # the request.
369
+ # gRPC handles serialization and deserialization, so we just need
370
+ # to pass in the functions for each.
371
+ if "get_cluster" not in self._stubs:
372
+ self._stubs["get_cluster"] = self._logged_channel.unary_unary(
373
+ "/google.container.v1.ClusterManager/GetCluster",
374
+ request_serializer=cluster_service.GetClusterRequest.serialize,
375
+ response_deserializer=cluster_service.Cluster.deserialize,
376
+ )
377
+ return self._stubs["get_cluster"]
378
+
379
+ @property
380
+ def create_cluster(
381
+ self,
382
+ ) -> Callable[[cluster_service.CreateClusterRequest], cluster_service.Operation]:
383
+ r"""Return a callable for the create cluster method over gRPC.
384
+
385
+ Creates a cluster, consisting of the specified number and type
386
+ of Google Compute Engine instances.
387
+
388
+ By default, the cluster is created in the project's `default
389
+ network <https://cloud.google.com/compute/docs/networks-and-firewalls#networks>`__.
390
+
391
+ One firewall is added for the cluster. After cluster creation,
392
+ the Kubelet creates routes for each node to allow the containers
393
+ on that node to communicate with all other instances in the
394
+ cluster.
395
+
396
+ Finally, an entry is added to the project's global metadata
397
+ indicating which CIDR range the cluster is using.
398
+
399
+ Returns:
400
+ Callable[[~.CreateClusterRequest],
401
+ ~.Operation]:
402
+ A function that, when called, will call the underlying RPC
403
+ on the server.
404
+ """
405
+ # Generate a "stub function" on-the-fly which will actually make
406
+ # the request.
407
+ # gRPC handles serialization and deserialization, so we just need
408
+ # to pass in the functions for each.
409
+ if "create_cluster" not in self._stubs:
410
+ self._stubs["create_cluster"] = self._logged_channel.unary_unary(
411
+ "/google.container.v1.ClusterManager/CreateCluster",
412
+ request_serializer=cluster_service.CreateClusterRequest.serialize,
413
+ response_deserializer=cluster_service.Operation.deserialize,
414
+ )
415
+ return self._stubs["create_cluster"]
416
+
417
+ @property
418
+ def update_cluster(
419
+ self,
420
+ ) -> Callable[[cluster_service.UpdateClusterRequest], cluster_service.Operation]:
421
+ r"""Return a callable for the update cluster method over gRPC.
422
+
423
+ Updates the settings of a specific cluster.
424
+
425
+ Returns:
426
+ Callable[[~.UpdateClusterRequest],
427
+ ~.Operation]:
428
+ A function that, when called, will call the underlying RPC
429
+ on the server.
430
+ """
431
+ # Generate a "stub function" on-the-fly which will actually make
432
+ # the request.
433
+ # gRPC handles serialization and deserialization, so we just need
434
+ # to pass in the functions for each.
435
+ if "update_cluster" not in self._stubs:
436
+ self._stubs["update_cluster"] = self._logged_channel.unary_unary(
437
+ "/google.container.v1.ClusterManager/UpdateCluster",
438
+ request_serializer=cluster_service.UpdateClusterRequest.serialize,
439
+ response_deserializer=cluster_service.Operation.deserialize,
440
+ )
441
+ return self._stubs["update_cluster"]
442
+
443
+ @property
444
+ def update_node_pool(
445
+ self,
446
+ ) -> Callable[[cluster_service.UpdateNodePoolRequest], cluster_service.Operation]:
447
+ r"""Return a callable for the update node pool method over gRPC.
448
+
449
+ Updates the version and/or image type for the
450
+ specified node pool.
451
+
452
+ Returns:
453
+ Callable[[~.UpdateNodePoolRequest],
454
+ ~.Operation]:
455
+ A function that, when called, will call the underlying RPC
456
+ on the server.
457
+ """
458
+ # Generate a "stub function" on-the-fly which will actually make
459
+ # the request.
460
+ # gRPC handles serialization and deserialization, so we just need
461
+ # to pass in the functions for each.
462
+ if "update_node_pool" not in self._stubs:
463
+ self._stubs["update_node_pool"] = self._logged_channel.unary_unary(
464
+ "/google.container.v1.ClusterManager/UpdateNodePool",
465
+ request_serializer=cluster_service.UpdateNodePoolRequest.serialize,
466
+ response_deserializer=cluster_service.Operation.deserialize,
467
+ )
468
+ return self._stubs["update_node_pool"]
469
+
470
+ @property
471
+ def set_node_pool_autoscaling(
472
+ self,
473
+ ) -> Callable[
474
+ [cluster_service.SetNodePoolAutoscalingRequest], cluster_service.Operation
475
+ ]:
476
+ r"""Return a callable for the set node pool autoscaling method over gRPC.
477
+
478
+ Sets the autoscaling settings for the specified node
479
+ pool.
480
+
481
+ Returns:
482
+ Callable[[~.SetNodePoolAutoscalingRequest],
483
+ ~.Operation]:
484
+ A function that, when called, will call the underlying RPC
485
+ on the server.
486
+ """
487
+ # Generate a "stub function" on-the-fly which will actually make
488
+ # the request.
489
+ # gRPC handles serialization and deserialization, so we just need
490
+ # to pass in the functions for each.
491
+ if "set_node_pool_autoscaling" not in self._stubs:
492
+ self._stubs["set_node_pool_autoscaling"] = self._logged_channel.unary_unary(
493
+ "/google.container.v1.ClusterManager/SetNodePoolAutoscaling",
494
+ request_serializer=cluster_service.SetNodePoolAutoscalingRequest.serialize,
495
+ response_deserializer=cluster_service.Operation.deserialize,
496
+ )
497
+ return self._stubs["set_node_pool_autoscaling"]
498
+
499
+ @property
500
+ def set_logging_service(
501
+ self,
502
+ ) -> Callable[
503
+ [cluster_service.SetLoggingServiceRequest], cluster_service.Operation
504
+ ]:
505
+ r"""Return a callable for the set logging service method over gRPC.
506
+
507
+ Sets the logging service for a specific cluster.
508
+
509
+ Returns:
510
+ Callable[[~.SetLoggingServiceRequest],
511
+ ~.Operation]:
512
+ A function that, when called, will call the underlying RPC
513
+ on the server.
514
+ """
515
+ # Generate a "stub function" on-the-fly which will actually make
516
+ # the request.
517
+ # gRPC handles serialization and deserialization, so we just need
518
+ # to pass in the functions for each.
519
+ if "set_logging_service" not in self._stubs:
520
+ self._stubs["set_logging_service"] = self._logged_channel.unary_unary(
521
+ "/google.container.v1.ClusterManager/SetLoggingService",
522
+ request_serializer=cluster_service.SetLoggingServiceRequest.serialize,
523
+ response_deserializer=cluster_service.Operation.deserialize,
524
+ )
525
+ return self._stubs["set_logging_service"]
526
+
527
+ @property
528
+ def set_monitoring_service(
529
+ self,
530
+ ) -> Callable[
531
+ [cluster_service.SetMonitoringServiceRequest], cluster_service.Operation
532
+ ]:
533
+ r"""Return a callable for the set monitoring service method over gRPC.
534
+
535
+ Sets the monitoring service for a specific cluster.
536
+
537
+ Returns:
538
+ Callable[[~.SetMonitoringServiceRequest],
539
+ ~.Operation]:
540
+ A function that, when called, will call the underlying RPC
541
+ on the server.
542
+ """
543
+ # Generate a "stub function" on-the-fly which will actually make
544
+ # the request.
545
+ # gRPC handles serialization and deserialization, so we just need
546
+ # to pass in the functions for each.
547
+ if "set_monitoring_service" not in self._stubs:
548
+ self._stubs["set_monitoring_service"] = self._logged_channel.unary_unary(
549
+ "/google.container.v1.ClusterManager/SetMonitoringService",
550
+ request_serializer=cluster_service.SetMonitoringServiceRequest.serialize,
551
+ response_deserializer=cluster_service.Operation.deserialize,
552
+ )
553
+ return self._stubs["set_monitoring_service"]
554
+
555
+ @property
556
+ def set_addons_config(
557
+ self,
558
+ ) -> Callable[[cluster_service.SetAddonsConfigRequest], cluster_service.Operation]:
559
+ r"""Return a callable for the set addons config method over gRPC.
560
+
561
+ Sets the addons for a specific cluster.
562
+
563
+ Returns:
564
+ Callable[[~.SetAddonsConfigRequest],
565
+ ~.Operation]:
566
+ A function that, when called, will call the underlying RPC
567
+ on the server.
568
+ """
569
+ # Generate a "stub function" on-the-fly which will actually make
570
+ # the request.
571
+ # gRPC handles serialization and deserialization, so we just need
572
+ # to pass in the functions for each.
573
+ if "set_addons_config" not in self._stubs:
574
+ self._stubs["set_addons_config"] = self._logged_channel.unary_unary(
575
+ "/google.container.v1.ClusterManager/SetAddonsConfig",
576
+ request_serializer=cluster_service.SetAddonsConfigRequest.serialize,
577
+ response_deserializer=cluster_service.Operation.deserialize,
578
+ )
579
+ return self._stubs["set_addons_config"]
580
+
581
+ @property
582
+ def set_locations(
583
+ self,
584
+ ) -> Callable[[cluster_service.SetLocationsRequest], cluster_service.Operation]:
585
+ r"""Return a callable for the set locations method over gRPC.
586
+
587
+ Sets the locations for a specific cluster. Deprecated. Use
588
+ `projects.locations.clusters.update <https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update>`__
589
+ instead.
590
+
591
+ Returns:
592
+ Callable[[~.SetLocationsRequest],
593
+ ~.Operation]:
594
+ A function that, when called, will call the underlying RPC
595
+ on the server.
596
+ """
597
+ # Generate a "stub function" on-the-fly which will actually make
598
+ # the request.
599
+ # gRPC handles serialization and deserialization, so we just need
600
+ # to pass in the functions for each.
601
+ if "set_locations" not in self._stubs:
602
+ self._stubs["set_locations"] = self._logged_channel.unary_unary(
603
+ "/google.container.v1.ClusterManager/SetLocations",
604
+ request_serializer=cluster_service.SetLocationsRequest.serialize,
605
+ response_deserializer=cluster_service.Operation.deserialize,
606
+ )
607
+ return self._stubs["set_locations"]
608
+
609
+ @property
610
+ def update_master(
611
+ self,
612
+ ) -> Callable[[cluster_service.UpdateMasterRequest], cluster_service.Operation]:
613
+ r"""Return a callable for the update master method over gRPC.
614
+
615
+ Updates the master for a specific cluster.
616
+
617
+ Returns:
618
+ Callable[[~.UpdateMasterRequest],
619
+ ~.Operation]:
620
+ A function that, when called, will call the underlying RPC
621
+ on the server.
622
+ """
623
+ # Generate a "stub function" on-the-fly which will actually make
624
+ # the request.
625
+ # gRPC handles serialization and deserialization, so we just need
626
+ # to pass in the functions for each.
627
+ if "update_master" not in self._stubs:
628
+ self._stubs["update_master"] = self._logged_channel.unary_unary(
629
+ "/google.container.v1.ClusterManager/UpdateMaster",
630
+ request_serializer=cluster_service.UpdateMasterRequest.serialize,
631
+ response_deserializer=cluster_service.Operation.deserialize,
632
+ )
633
+ return self._stubs["update_master"]
634
+
635
+ @property
636
+ def set_master_auth(
637
+ self,
638
+ ) -> Callable[[cluster_service.SetMasterAuthRequest], cluster_service.Operation]:
639
+ r"""Return a callable for the set master auth method over gRPC.
640
+
641
+ Sets master auth materials. Currently supports
642
+ changing the admin password or a specific cluster,
643
+ either via password generation or explicitly setting the
644
+ password.
645
+
646
+ Returns:
647
+ Callable[[~.SetMasterAuthRequest],
648
+ ~.Operation]:
649
+ A function that, when called, will call the underlying RPC
650
+ on the server.
651
+ """
652
+ # Generate a "stub function" on-the-fly which will actually make
653
+ # the request.
654
+ # gRPC handles serialization and deserialization, so we just need
655
+ # to pass in the functions for each.
656
+ if "set_master_auth" not in self._stubs:
657
+ self._stubs["set_master_auth"] = self._logged_channel.unary_unary(
658
+ "/google.container.v1.ClusterManager/SetMasterAuth",
659
+ request_serializer=cluster_service.SetMasterAuthRequest.serialize,
660
+ response_deserializer=cluster_service.Operation.deserialize,
661
+ )
662
+ return self._stubs["set_master_auth"]
663
+
664
+ @property
665
+ def delete_cluster(
666
+ self,
667
+ ) -> Callable[[cluster_service.DeleteClusterRequest], cluster_service.Operation]:
668
+ r"""Return a callable for the delete cluster method over gRPC.
669
+
670
+ Deletes the cluster, including the Kubernetes
671
+ endpoint and all worker nodes.
672
+
673
+ Firewalls and routes that were configured during cluster
674
+ creation are also deleted.
675
+
676
+ Other Google Compute Engine resources that might be in
677
+ use by the cluster, such as load balancer resources, are
678
+ not deleted if they weren't present when the cluster was
679
+ initially created.
680
+
681
+ Returns:
682
+ Callable[[~.DeleteClusterRequest],
683
+ ~.Operation]:
684
+ A function that, when called, will call the underlying RPC
685
+ on the server.
686
+ """
687
+ # Generate a "stub function" on-the-fly which will actually make
688
+ # the request.
689
+ # gRPC handles serialization and deserialization, so we just need
690
+ # to pass in the functions for each.
691
+ if "delete_cluster" not in self._stubs:
692
+ self._stubs["delete_cluster"] = self._logged_channel.unary_unary(
693
+ "/google.container.v1.ClusterManager/DeleteCluster",
694
+ request_serializer=cluster_service.DeleteClusterRequest.serialize,
695
+ response_deserializer=cluster_service.Operation.deserialize,
696
+ )
697
+ return self._stubs["delete_cluster"]
698
+
699
+ @property
700
+ def list_operations(
701
+ self,
702
+ ) -> Callable[
703
+ [cluster_service.ListOperationsRequest], cluster_service.ListOperationsResponse
704
+ ]:
705
+ r"""Return a callable for the list operations method over gRPC.
706
+
707
+ Lists all operations in a project in a specific zone
708
+ or all zones.
709
+
710
+ Returns:
711
+ Callable[[~.ListOperationsRequest],
712
+ ~.ListOperationsResponse]:
713
+ A function that, when called, will call the underlying RPC
714
+ on the server.
715
+ """
716
+ # Generate a "stub function" on-the-fly which will actually make
717
+ # the request.
718
+ # gRPC handles serialization and deserialization, so we just need
719
+ # to pass in the functions for each.
720
+ if "list_operations" not in self._stubs:
721
+ self._stubs["list_operations"] = self._logged_channel.unary_unary(
722
+ "/google.container.v1.ClusterManager/ListOperations",
723
+ request_serializer=cluster_service.ListOperationsRequest.serialize,
724
+ response_deserializer=cluster_service.ListOperationsResponse.deserialize,
725
+ )
726
+ return self._stubs["list_operations"]
727
+
728
+ @property
729
+ def get_operation(
730
+ self,
731
+ ) -> Callable[[cluster_service.GetOperationRequest], cluster_service.Operation]:
732
+ r"""Return a callable for the get operation method over gRPC.
733
+
734
+ Gets the specified operation.
735
+
736
+ Returns:
737
+ Callable[[~.GetOperationRequest],
738
+ ~.Operation]:
739
+ A function that, when called, will call the underlying RPC
740
+ on the server.
741
+ """
742
+ # Generate a "stub function" on-the-fly which will actually make
743
+ # the request.
744
+ # gRPC handles serialization and deserialization, so we just need
745
+ # to pass in the functions for each.
746
+ if "get_operation" not in self._stubs:
747
+ self._stubs["get_operation"] = self._logged_channel.unary_unary(
748
+ "/google.container.v1.ClusterManager/GetOperation",
749
+ request_serializer=cluster_service.GetOperationRequest.serialize,
750
+ response_deserializer=cluster_service.Operation.deserialize,
751
+ )
752
+ return self._stubs["get_operation"]
753
+
754
+ @property
755
+ def cancel_operation(
756
+ self,
757
+ ) -> Callable[[cluster_service.CancelOperationRequest], empty_pb2.Empty]:
758
+ r"""Return a callable for the cancel operation method over gRPC.
759
+
760
+ Cancels the specified operation.
761
+
762
+ Returns:
763
+ Callable[[~.CancelOperationRequest],
764
+ ~.Empty]:
765
+ A function that, when called, will call the underlying RPC
766
+ on the server.
767
+ """
768
+ # Generate a "stub function" on-the-fly which will actually make
769
+ # the request.
770
+ # gRPC handles serialization and deserialization, so we just need
771
+ # to pass in the functions for each.
772
+ if "cancel_operation" not in self._stubs:
773
+ self._stubs["cancel_operation"] = self._logged_channel.unary_unary(
774
+ "/google.container.v1.ClusterManager/CancelOperation",
775
+ request_serializer=cluster_service.CancelOperationRequest.serialize,
776
+ response_deserializer=empty_pb2.Empty.FromString,
777
+ )
778
+ return self._stubs["cancel_operation"]
779
+
780
+ @property
781
+ def get_server_config(
782
+ self,
783
+ ) -> Callable[
784
+ [cluster_service.GetServerConfigRequest], cluster_service.ServerConfig
785
+ ]:
786
+ r"""Return a callable for the get server config method over gRPC.
787
+
788
+ Returns configuration info about the Google
789
+ Kubernetes Engine service.
790
+
791
+ Returns:
792
+ Callable[[~.GetServerConfigRequest],
793
+ ~.ServerConfig]:
794
+ A function that, when called, will call the underlying RPC
795
+ on the server.
796
+ """
797
+ # Generate a "stub function" on-the-fly which will actually make
798
+ # the request.
799
+ # gRPC handles serialization and deserialization, so we just need
800
+ # to pass in the functions for each.
801
+ if "get_server_config" not in self._stubs:
802
+ self._stubs["get_server_config"] = self._logged_channel.unary_unary(
803
+ "/google.container.v1.ClusterManager/GetServerConfig",
804
+ request_serializer=cluster_service.GetServerConfigRequest.serialize,
805
+ response_deserializer=cluster_service.ServerConfig.deserialize,
806
+ )
807
+ return self._stubs["get_server_config"]
808
+
809
+ @property
810
+ def get_json_web_keys(
811
+ self,
812
+ ) -> Callable[
813
+ [cluster_service.GetJSONWebKeysRequest], cluster_service.GetJSONWebKeysResponse
814
+ ]:
815
+ r"""Return a callable for the get json web keys method over gRPC.
816
+
817
+ Gets the public component of the cluster signing keys
818
+ in JSON Web Key format.
819
+
820
+ Returns:
821
+ Callable[[~.GetJSONWebKeysRequest],
822
+ ~.GetJSONWebKeysResponse]:
823
+ A function that, when called, will call the underlying RPC
824
+ on the server.
825
+ """
826
+ # Generate a "stub function" on-the-fly which will actually make
827
+ # the request.
828
+ # gRPC handles serialization and deserialization, so we just need
829
+ # to pass in the functions for each.
830
+ if "get_json_web_keys" not in self._stubs:
831
+ self._stubs["get_json_web_keys"] = self._logged_channel.unary_unary(
832
+ "/google.container.v1.ClusterManager/GetJSONWebKeys",
833
+ request_serializer=cluster_service.GetJSONWebKeysRequest.serialize,
834
+ response_deserializer=cluster_service.GetJSONWebKeysResponse.deserialize,
835
+ )
836
+ return self._stubs["get_json_web_keys"]
837
+
838
+ @property
839
+ def list_node_pools(
840
+ self,
841
+ ) -> Callable[
842
+ [cluster_service.ListNodePoolsRequest], cluster_service.ListNodePoolsResponse
843
+ ]:
844
+ r"""Return a callable for the list node pools method over gRPC.
845
+
846
+ Lists the node pools for a cluster.
847
+
848
+ Returns:
849
+ Callable[[~.ListNodePoolsRequest],
850
+ ~.ListNodePoolsResponse]:
851
+ A function that, when called, will call the underlying RPC
852
+ on the server.
853
+ """
854
+ # Generate a "stub function" on-the-fly which will actually make
855
+ # the request.
856
+ # gRPC handles serialization and deserialization, so we just need
857
+ # to pass in the functions for each.
858
+ if "list_node_pools" not in self._stubs:
859
+ self._stubs["list_node_pools"] = self._logged_channel.unary_unary(
860
+ "/google.container.v1.ClusterManager/ListNodePools",
861
+ request_serializer=cluster_service.ListNodePoolsRequest.serialize,
862
+ response_deserializer=cluster_service.ListNodePoolsResponse.deserialize,
863
+ )
864
+ return self._stubs["list_node_pools"]
865
+
866
+ @property
867
+ def get_node_pool(
868
+ self,
869
+ ) -> Callable[[cluster_service.GetNodePoolRequest], cluster_service.NodePool]:
870
+ r"""Return a callable for the get node pool method over gRPC.
871
+
872
+ Retrieves the requested node pool.
873
+
874
+ Returns:
875
+ Callable[[~.GetNodePoolRequest],
876
+ ~.NodePool]:
877
+ A function that, when called, will call the underlying RPC
878
+ on the server.
879
+ """
880
+ # Generate a "stub function" on-the-fly which will actually make
881
+ # the request.
882
+ # gRPC handles serialization and deserialization, so we just need
883
+ # to pass in the functions for each.
884
+ if "get_node_pool" not in self._stubs:
885
+ self._stubs["get_node_pool"] = self._logged_channel.unary_unary(
886
+ "/google.container.v1.ClusterManager/GetNodePool",
887
+ request_serializer=cluster_service.GetNodePoolRequest.serialize,
888
+ response_deserializer=cluster_service.NodePool.deserialize,
889
+ )
890
+ return self._stubs["get_node_pool"]
891
+
892
+ @property
893
+ def create_node_pool(
894
+ self,
895
+ ) -> Callable[[cluster_service.CreateNodePoolRequest], cluster_service.Operation]:
896
+ r"""Return a callable for the create node pool method over gRPC.
897
+
898
+ Creates a node pool for a cluster.
899
+
900
+ Returns:
901
+ Callable[[~.CreateNodePoolRequest],
902
+ ~.Operation]:
903
+ A function that, when called, will call the underlying RPC
904
+ on the server.
905
+ """
906
+ # Generate a "stub function" on-the-fly which will actually make
907
+ # the request.
908
+ # gRPC handles serialization and deserialization, so we just need
909
+ # to pass in the functions for each.
910
+ if "create_node_pool" not in self._stubs:
911
+ self._stubs["create_node_pool"] = self._logged_channel.unary_unary(
912
+ "/google.container.v1.ClusterManager/CreateNodePool",
913
+ request_serializer=cluster_service.CreateNodePoolRequest.serialize,
914
+ response_deserializer=cluster_service.Operation.deserialize,
915
+ )
916
+ return self._stubs["create_node_pool"]
917
+
918
+ @property
919
+ def delete_node_pool(
920
+ self,
921
+ ) -> Callable[[cluster_service.DeleteNodePoolRequest], cluster_service.Operation]:
922
+ r"""Return a callable for the delete node pool method over gRPC.
923
+
924
+ Deletes a node pool from a cluster.
925
+
926
+ Returns:
927
+ Callable[[~.DeleteNodePoolRequest],
928
+ ~.Operation]:
929
+ A function that, when called, will call the underlying RPC
930
+ on the server.
931
+ """
932
+ # Generate a "stub function" on-the-fly which will actually make
933
+ # the request.
934
+ # gRPC handles serialization and deserialization, so we just need
935
+ # to pass in the functions for each.
936
+ if "delete_node_pool" not in self._stubs:
937
+ self._stubs["delete_node_pool"] = self._logged_channel.unary_unary(
938
+ "/google.container.v1.ClusterManager/DeleteNodePool",
939
+ request_serializer=cluster_service.DeleteNodePoolRequest.serialize,
940
+ response_deserializer=cluster_service.Operation.deserialize,
941
+ )
942
+ return self._stubs["delete_node_pool"]
943
+
944
+ @property
945
+ def complete_node_pool_upgrade(
946
+ self,
947
+ ) -> Callable[[cluster_service.CompleteNodePoolUpgradeRequest], empty_pb2.Empty]:
948
+ r"""Return a callable for the complete node pool upgrade method over gRPC.
949
+
950
+ CompleteNodePoolUpgrade will signal an on-going node
951
+ pool upgrade to complete.
952
+
953
+ Returns:
954
+ Callable[[~.CompleteNodePoolUpgradeRequest],
955
+ ~.Empty]:
956
+ A function that, when called, will call the underlying RPC
957
+ on the server.
958
+ """
959
+ # Generate a "stub function" on-the-fly which will actually make
960
+ # the request.
961
+ # gRPC handles serialization and deserialization, so we just need
962
+ # to pass in the functions for each.
963
+ if "complete_node_pool_upgrade" not in self._stubs:
964
+ self._stubs[
965
+ "complete_node_pool_upgrade"
966
+ ] = self._logged_channel.unary_unary(
967
+ "/google.container.v1.ClusterManager/CompleteNodePoolUpgrade",
968
+ request_serializer=cluster_service.CompleteNodePoolUpgradeRequest.serialize,
969
+ response_deserializer=empty_pb2.Empty.FromString,
970
+ )
971
+ return self._stubs["complete_node_pool_upgrade"]
972
+
973
+ @property
974
+ def rollback_node_pool_upgrade(
975
+ self,
976
+ ) -> Callable[
977
+ [cluster_service.RollbackNodePoolUpgradeRequest], cluster_service.Operation
978
+ ]:
979
+ r"""Return a callable for the rollback node pool upgrade method over gRPC.
980
+
981
+ Rolls back a previously Aborted or Failed NodePool
982
+ upgrade. This makes no changes if the last upgrade
983
+ successfully completed.
984
+
985
+ Returns:
986
+ Callable[[~.RollbackNodePoolUpgradeRequest],
987
+ ~.Operation]:
988
+ A function that, when called, will call the underlying RPC
989
+ on the server.
990
+ """
991
+ # Generate a "stub function" on-the-fly which will actually make
992
+ # the request.
993
+ # gRPC handles serialization and deserialization, so we just need
994
+ # to pass in the functions for each.
995
+ if "rollback_node_pool_upgrade" not in self._stubs:
996
+ self._stubs[
997
+ "rollback_node_pool_upgrade"
998
+ ] = self._logged_channel.unary_unary(
999
+ "/google.container.v1.ClusterManager/RollbackNodePoolUpgrade",
1000
+ request_serializer=cluster_service.RollbackNodePoolUpgradeRequest.serialize,
1001
+ response_deserializer=cluster_service.Operation.deserialize,
1002
+ )
1003
+ return self._stubs["rollback_node_pool_upgrade"]
1004
+
1005
+ @property
1006
+ def set_node_pool_management(
1007
+ self,
1008
+ ) -> Callable[
1009
+ [cluster_service.SetNodePoolManagementRequest], cluster_service.Operation
1010
+ ]:
1011
+ r"""Return a callable for the set node pool management method over gRPC.
1012
+
1013
+ Sets the NodeManagement options for a node pool.
1014
+
1015
+ Returns:
1016
+ Callable[[~.SetNodePoolManagementRequest],
1017
+ ~.Operation]:
1018
+ A function that, when called, will call the underlying RPC
1019
+ on the server.
1020
+ """
1021
+ # Generate a "stub function" on-the-fly which will actually make
1022
+ # the request.
1023
+ # gRPC handles serialization and deserialization, so we just need
1024
+ # to pass in the functions for each.
1025
+ if "set_node_pool_management" not in self._stubs:
1026
+ self._stubs["set_node_pool_management"] = self._logged_channel.unary_unary(
1027
+ "/google.container.v1.ClusterManager/SetNodePoolManagement",
1028
+ request_serializer=cluster_service.SetNodePoolManagementRequest.serialize,
1029
+ response_deserializer=cluster_service.Operation.deserialize,
1030
+ )
1031
+ return self._stubs["set_node_pool_management"]
1032
+
1033
+ @property
1034
+ def set_labels(
1035
+ self,
1036
+ ) -> Callable[[cluster_service.SetLabelsRequest], cluster_service.Operation]:
1037
+ r"""Return a callable for the set labels method over gRPC.
1038
+
1039
+ Sets labels on a cluster.
1040
+
1041
+ Returns:
1042
+ Callable[[~.SetLabelsRequest],
1043
+ ~.Operation]:
1044
+ A function that, when called, will call the underlying RPC
1045
+ on the server.
1046
+ """
1047
+ # Generate a "stub function" on-the-fly which will actually make
1048
+ # the request.
1049
+ # gRPC handles serialization and deserialization, so we just need
1050
+ # to pass in the functions for each.
1051
+ if "set_labels" not in self._stubs:
1052
+ self._stubs["set_labels"] = self._logged_channel.unary_unary(
1053
+ "/google.container.v1.ClusterManager/SetLabels",
1054
+ request_serializer=cluster_service.SetLabelsRequest.serialize,
1055
+ response_deserializer=cluster_service.Operation.deserialize,
1056
+ )
1057
+ return self._stubs["set_labels"]
1058
+
1059
+ @property
1060
+ def set_legacy_abac(
1061
+ self,
1062
+ ) -> Callable[[cluster_service.SetLegacyAbacRequest], cluster_service.Operation]:
1063
+ r"""Return a callable for the set legacy abac method over gRPC.
1064
+
1065
+ Enables or disables the ABAC authorization mechanism
1066
+ on a cluster.
1067
+
1068
+ Returns:
1069
+ Callable[[~.SetLegacyAbacRequest],
1070
+ ~.Operation]:
1071
+ A function that, when called, will call the underlying RPC
1072
+ on the server.
1073
+ """
1074
+ # Generate a "stub function" on-the-fly which will actually make
1075
+ # the request.
1076
+ # gRPC handles serialization and deserialization, so we just need
1077
+ # to pass in the functions for each.
1078
+ if "set_legacy_abac" not in self._stubs:
1079
+ self._stubs["set_legacy_abac"] = self._logged_channel.unary_unary(
1080
+ "/google.container.v1.ClusterManager/SetLegacyAbac",
1081
+ request_serializer=cluster_service.SetLegacyAbacRequest.serialize,
1082
+ response_deserializer=cluster_service.Operation.deserialize,
1083
+ )
1084
+ return self._stubs["set_legacy_abac"]
1085
+
1086
+ @property
1087
+ def start_ip_rotation(
1088
+ self,
1089
+ ) -> Callable[[cluster_service.StartIPRotationRequest], cluster_service.Operation]:
1090
+ r"""Return a callable for the start ip rotation method over gRPC.
1091
+
1092
+ Starts master IP rotation.
1093
+
1094
+ Returns:
1095
+ Callable[[~.StartIPRotationRequest],
1096
+ ~.Operation]:
1097
+ A function that, when called, will call the underlying RPC
1098
+ on the server.
1099
+ """
1100
+ # Generate a "stub function" on-the-fly which will actually make
1101
+ # the request.
1102
+ # gRPC handles serialization and deserialization, so we just need
1103
+ # to pass in the functions for each.
1104
+ if "start_ip_rotation" not in self._stubs:
1105
+ self._stubs["start_ip_rotation"] = self._logged_channel.unary_unary(
1106
+ "/google.container.v1.ClusterManager/StartIPRotation",
1107
+ request_serializer=cluster_service.StartIPRotationRequest.serialize,
1108
+ response_deserializer=cluster_service.Operation.deserialize,
1109
+ )
1110
+ return self._stubs["start_ip_rotation"]
1111
+
1112
+ @property
1113
+ def complete_ip_rotation(
1114
+ self,
1115
+ ) -> Callable[
1116
+ [cluster_service.CompleteIPRotationRequest], cluster_service.Operation
1117
+ ]:
1118
+ r"""Return a callable for the complete ip rotation method over gRPC.
1119
+
1120
+ Completes master IP rotation.
1121
+
1122
+ Returns:
1123
+ Callable[[~.CompleteIPRotationRequest],
1124
+ ~.Operation]:
1125
+ A function that, when called, will call the underlying RPC
1126
+ on the server.
1127
+ """
1128
+ # Generate a "stub function" on-the-fly which will actually make
1129
+ # the request.
1130
+ # gRPC handles serialization and deserialization, so we just need
1131
+ # to pass in the functions for each.
1132
+ if "complete_ip_rotation" not in self._stubs:
1133
+ self._stubs["complete_ip_rotation"] = self._logged_channel.unary_unary(
1134
+ "/google.container.v1.ClusterManager/CompleteIPRotation",
1135
+ request_serializer=cluster_service.CompleteIPRotationRequest.serialize,
1136
+ response_deserializer=cluster_service.Operation.deserialize,
1137
+ )
1138
+ return self._stubs["complete_ip_rotation"]
1139
+
1140
+ @property
1141
+ def set_node_pool_size(
1142
+ self,
1143
+ ) -> Callable[[cluster_service.SetNodePoolSizeRequest], cluster_service.Operation]:
1144
+ r"""Return a callable for the set node pool size method over gRPC.
1145
+
1146
+ Sets the size for a specific node pool. The new size will be
1147
+ used for all replicas, including future replicas created by
1148
+ modifying
1149
+ [NodePool.locations][google.container.v1.NodePool.locations].
1150
+
1151
+ Returns:
1152
+ Callable[[~.SetNodePoolSizeRequest],
1153
+ ~.Operation]:
1154
+ A function that, when called, will call the underlying RPC
1155
+ on the server.
1156
+ """
1157
+ # Generate a "stub function" on-the-fly which will actually make
1158
+ # the request.
1159
+ # gRPC handles serialization and deserialization, so we just need
1160
+ # to pass in the functions for each.
1161
+ if "set_node_pool_size" not in self._stubs:
1162
+ self._stubs["set_node_pool_size"] = self._logged_channel.unary_unary(
1163
+ "/google.container.v1.ClusterManager/SetNodePoolSize",
1164
+ request_serializer=cluster_service.SetNodePoolSizeRequest.serialize,
1165
+ response_deserializer=cluster_service.Operation.deserialize,
1166
+ )
1167
+ return self._stubs["set_node_pool_size"]
1168
+
1169
+ @property
1170
+ def set_network_policy(
1171
+ self,
1172
+ ) -> Callable[[cluster_service.SetNetworkPolicyRequest], cluster_service.Operation]:
1173
+ r"""Return a callable for the set network policy method over gRPC.
1174
+
1175
+ Enables or disables Network Policy for a cluster.
1176
+
1177
+ Returns:
1178
+ Callable[[~.SetNetworkPolicyRequest],
1179
+ ~.Operation]:
1180
+ A function that, when called, will call the underlying RPC
1181
+ on the server.
1182
+ """
1183
+ # Generate a "stub function" on-the-fly which will actually make
1184
+ # the request.
1185
+ # gRPC handles serialization and deserialization, so we just need
1186
+ # to pass in the functions for each.
1187
+ if "set_network_policy" not in self._stubs:
1188
+ self._stubs["set_network_policy"] = self._logged_channel.unary_unary(
1189
+ "/google.container.v1.ClusterManager/SetNetworkPolicy",
1190
+ request_serializer=cluster_service.SetNetworkPolicyRequest.serialize,
1191
+ response_deserializer=cluster_service.Operation.deserialize,
1192
+ )
1193
+ return self._stubs["set_network_policy"]
1194
+
1195
+ @property
1196
+ def set_maintenance_policy(
1197
+ self,
1198
+ ) -> Callable[
1199
+ [cluster_service.SetMaintenancePolicyRequest], cluster_service.Operation
1200
+ ]:
1201
+ r"""Return a callable for the set maintenance policy method over gRPC.
1202
+
1203
+ Sets the maintenance policy for a cluster.
1204
+
1205
+ Returns:
1206
+ Callable[[~.SetMaintenancePolicyRequest],
1207
+ ~.Operation]:
1208
+ A function that, when called, will call the underlying RPC
1209
+ on the server.
1210
+ """
1211
+ # Generate a "stub function" on-the-fly which will actually make
1212
+ # the request.
1213
+ # gRPC handles serialization and deserialization, so we just need
1214
+ # to pass in the functions for each.
1215
+ if "set_maintenance_policy" not in self._stubs:
1216
+ self._stubs["set_maintenance_policy"] = self._logged_channel.unary_unary(
1217
+ "/google.container.v1.ClusterManager/SetMaintenancePolicy",
1218
+ request_serializer=cluster_service.SetMaintenancePolicyRequest.serialize,
1219
+ response_deserializer=cluster_service.Operation.deserialize,
1220
+ )
1221
+ return self._stubs["set_maintenance_policy"]
1222
+
1223
+ @property
1224
+ def list_usable_subnetworks(
1225
+ self,
1226
+ ) -> Callable[
1227
+ [cluster_service.ListUsableSubnetworksRequest],
1228
+ cluster_service.ListUsableSubnetworksResponse,
1229
+ ]:
1230
+ r"""Return a callable for the list usable subnetworks method over gRPC.
1231
+
1232
+ Lists subnetworks that are usable for creating
1233
+ clusters in a project.
1234
+
1235
+ Returns:
1236
+ Callable[[~.ListUsableSubnetworksRequest],
1237
+ ~.ListUsableSubnetworksResponse]:
1238
+ A function that, when called, will call the underlying RPC
1239
+ on the server.
1240
+ """
1241
+ # Generate a "stub function" on-the-fly which will actually make
1242
+ # the request.
1243
+ # gRPC handles serialization and deserialization, so we just need
1244
+ # to pass in the functions for each.
1245
+ if "list_usable_subnetworks" not in self._stubs:
1246
+ self._stubs["list_usable_subnetworks"] = self._logged_channel.unary_unary(
1247
+ "/google.container.v1.ClusterManager/ListUsableSubnetworks",
1248
+ request_serializer=cluster_service.ListUsableSubnetworksRequest.serialize,
1249
+ response_deserializer=cluster_service.ListUsableSubnetworksResponse.deserialize,
1250
+ )
1251
+ return self._stubs["list_usable_subnetworks"]
1252
+
1253
+ @property
1254
+ def check_autopilot_compatibility(
1255
+ self,
1256
+ ) -> Callable[
1257
+ [cluster_service.CheckAutopilotCompatibilityRequest],
1258
+ cluster_service.CheckAutopilotCompatibilityResponse,
1259
+ ]:
1260
+ r"""Return a callable for the check autopilot compatibility method over gRPC.
1261
+
1262
+ Checks the cluster compatibility with Autopilot mode,
1263
+ and returns a list of compatibility issues.
1264
+
1265
+ Returns:
1266
+ Callable[[~.CheckAutopilotCompatibilityRequest],
1267
+ ~.CheckAutopilotCompatibilityResponse]:
1268
+ A function that, when called, will call the underlying RPC
1269
+ on the server.
1270
+ """
1271
+ # Generate a "stub function" on-the-fly which will actually make
1272
+ # the request.
1273
+ # gRPC handles serialization and deserialization, so we just need
1274
+ # to pass in the functions for each.
1275
+ if "check_autopilot_compatibility" not in self._stubs:
1276
+ self._stubs[
1277
+ "check_autopilot_compatibility"
1278
+ ] = self._logged_channel.unary_unary(
1279
+ "/google.container.v1.ClusterManager/CheckAutopilotCompatibility",
1280
+ request_serializer=cluster_service.CheckAutopilotCompatibilityRequest.serialize,
1281
+ response_deserializer=cluster_service.CheckAutopilotCompatibilityResponse.deserialize,
1282
+ )
1283
+ return self._stubs["check_autopilot_compatibility"]
1284
+
1285
+ def close(self):
1286
+ self._logged_channel.close()
1287
+
1288
+ @property
1289
+ def kind(self) -> str:
1290
+ return "grpc"
1291
+
1292
+
1293
+ __all__ = ("ClusterManagerGrpcTransport",)