diff --git a/.github/release-please.yml b/.github/release-please.yml index 29601ad4..fe749ff6 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -1,5 +1,6 @@ releaseType: python handleGHRelease: true +manifest: true # NOTE: this section is generated by synthtool.languages.python # See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py branches: diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 00000000..d18e9443 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "2.13.0" +} diff --git a/docs/container_v1/types.rst b/docs/container_v1/types.rst index b2e640f2..3ae28cbf 100644 --- a/docs/container_v1/types.rst +++ b/docs/container_v1/types.rst @@ -3,5 +3,4 @@ Types for Google Cloud Container v1 API .. automodule:: google.cloud.container_v1.types :members: - :undoc-members: :show-inheritance: diff --git a/docs/container_v1beta1/types.rst b/docs/container_v1beta1/types.rst index 9847e8c4..d4baa1c5 100644 --- a/docs/container_v1beta1/types.rst +++ b/docs/container_v1beta1/types.rst @@ -3,5 +3,4 @@ Types for Google Cloud Container v1beta1 API .. automodule:: google.cloud.container_v1beta1.types :members: - :undoc-members: :show-inheritance: diff --git a/google/cloud/container/__init__.py b/google/cloud/container/__init__.py index 238ed849..58863d9f 100644 --- a/google/cloud/container/__init__.py +++ b/google/cloud/container/__init__.py @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.cloud.container import gapic_version as package_version + +__version__ = package_version.__version__ + from google.cloud.container_v1.services.cluster_manager.async_client import ( ClusterManagerAsyncClient, @@ -51,6 +55,7 @@ DeleteNodePoolRequest, DnsCacheConfig, DNSConfig, + GatewayAPIConfig, GcePersistentDiskCsiDriverConfig, GcfsConfig, GcpFilestoreCsiDriverConfig, @@ -123,6 +128,7 @@ RecurringTimeWindow, ReleaseChannel, ReservationAffinity, + ResourceLabels, ResourceLimit, ResourceUsageExportConfig, RollbackNodePoolUpgradeRequest, @@ -194,6 +200,7 @@ "DeleteNodePoolRequest", "DnsCacheConfig", "DNSConfig", + "GatewayAPIConfig", "GcePersistentDiskCsiDriverConfig", "GcfsConfig", "GcpFilestoreCsiDriverConfig", @@ -263,6 +270,7 @@ "RecurringTimeWindow", "ReleaseChannel", "ReservationAffinity", + "ResourceLabels", "ResourceLimit", "ResourceUsageExportConfig", "RollbackNodePoolUpgradeRequest", diff --git a/google/cloud/container/gapic_version.py b/google/cloud/container/gapic_version.py new file mode 100644 index 00000000..a3c92559 --- /dev/null +++ b/google/cloud/container/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +__version__ = "2.13.0" # {x-release-please-version} diff --git a/google/cloud/container_v1/__init__.py b/google/cloud/container_v1/__init__.py index 1f0c1628..b3bf6ace 100644 --- a/google/cloud/container_v1/__init__.py +++ b/google/cloud/container_v1/__init__.py @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.cloud.container import gapic_version as package_version + +__version__ = package_version.__version__ + from .services.cluster_manager import ClusterManagerAsyncClient, ClusterManagerClient from .types.cluster_service import ( @@ -46,6 +50,7 @@ DeleteNodePoolRequest, DnsCacheConfig, DNSConfig, + GatewayAPIConfig, GcePersistentDiskCsiDriverConfig, GcfsConfig, GcpFilestoreCsiDriverConfig, @@ -118,6 +123,7 @@ RecurringTimeWindow, ReleaseChannel, ReservationAffinity, + ResourceLabels, ResourceLimit, ResourceUsageExportConfig, RollbackNodePoolUpgradeRequest, @@ -191,6 +197,7 @@ "DeleteNodePoolRequest", "DnsCacheConfig", "GPUSharingConfig", + "GatewayAPIConfig", "GcePersistentDiskCsiDriverConfig", "GcfsConfig", "GcpFilestoreCsiDriverConfig", @@ -262,6 +269,7 @@ "RecurringTimeWindow", "ReleaseChannel", "ReservationAffinity", + "ResourceLabels", "ResourceLimit", "ResourceUsageExportConfig", "RollbackNodePoolUpgradeRequest", diff --git a/google/cloud/container_v1/services/cluster_manager/async_client.py b/google/cloud/container_v1/services/cluster_manager/async_client.py index 9a258b8e..96402641 100644 --- a/google/cloud/container_v1/services/cluster_manager/async_client.py +++ b/google/cloud/container_v1/services/cluster_manager/async_client.py @@ -16,7 +16,17 @@ from collections import OrderedDict import functools import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, +) import warnings from google.api_core import exceptions as core_exceptions @@ -162,9 +172,9 @@ def transport(self) -> ClusterManagerTransport: def __init__( self, *, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, ClusterManagerTransport] = "grpc_asyncio", - client_options: ClientOptions = None, + client_options: Optional[ClientOptions] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the cluster manager client. @@ -208,13 +218,13 @@ def __init__( async def list_clusters( self, - request: Union[cluster_service.ListClustersRequest, dict] = None, + request: Optional[Union[cluster_service.ListClustersRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - parent: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ListClustersResponse: r"""Lists all clusters owned by a project in either the @@ -246,7 +256,7 @@ async def sample_list_clusters(): print(response) Args: - request (Union[google.cloud.container_v1.types.ListClustersRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.ListClustersRequest, dict]]): The request object. ListClustersRequest lists clusters. project_id (:class:`str`): Deprecated. The Google Developers Console `project ID or @@ -347,14 +357,14 @@ async def sample_list_clusters(): async def get_cluster( self, - request: Union[cluster_service.GetClusterRequest, dict] = None, + request: Optional[Union[cluster_service.GetClusterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Cluster: r"""Gets the details of a specific cluster. @@ -385,7 +395,7 @@ async def sample_get_cluster(): print(response) Args: - request (Union[google.cloud.container_v1.types.GetClusterRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.GetClusterRequest, dict]]): The request object. GetClusterRequest gets the settings of a cluster. project_id (:class:`str`): @@ -494,14 +504,14 @@ async def sample_get_cluster(): async def create_cluster( self, - request: Union[cluster_service.CreateClusterRequest, dict] = None, + request: Optional[Union[cluster_service.CreateClusterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster: cluster_service.Cluster = None, - parent: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster: Optional[cluster_service.Cluster] = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Creates a cluster, consisting of the specified number and type @@ -544,7 +554,7 @@ async def sample_create_cluster(): print(response) Args: - request (Union[google.cloud.container_v1.types.CreateClusterRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.CreateClusterRequest, dict]]): The request object. CreateClusterRequest creates a cluster. project_id (:class:`str`): @@ -645,15 +655,15 @@ async def sample_create_cluster(): async def update_cluster( self, - request: Union[cluster_service.UpdateClusterRequest, dict] = None, + request: Optional[Union[cluster_service.UpdateClusterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - update: cluster_service.ClusterUpdate = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + update: Optional[cluster_service.ClusterUpdate] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Updates the settings of a specific cluster. @@ -684,7 +694,7 @@ async def sample_update_cluster(): print(response) Args: - request (Union[google.cloud.container_v1.types.UpdateClusterRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.UpdateClusterRequest, dict]]): The request object. UpdateClusterRequest updates the settings of a cluster. project_id (:class:`str`): @@ -796,10 +806,10 @@ async def sample_update_cluster(): async def update_node_pool( self, - request: Union[cluster_service.UpdateNodePoolRequest, dict] = None, + request: Optional[Union[cluster_service.UpdateNodePoolRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Updates the version and/or image type for the @@ -833,7 +843,7 @@ async def sample_update_node_pool(): print(response) Args: - request (Union[google.cloud.container_v1.types.UpdateNodePoolRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.UpdateNodePoolRequest, dict]]): The request object. UpdateNodePoolRequests update a node pool's image and/or version. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -880,10 +890,12 @@ async def sample_update_node_pool(): async def set_node_pool_autoscaling( self, - request: Union[cluster_service.SetNodePoolAutoscalingRequest, dict] = None, + request: Optional[ + Union[cluster_service.SetNodePoolAutoscalingRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the autoscaling settings for the specified node @@ -915,7 +927,7 @@ async def sample_set_node_pool_autoscaling(): print(response) Args: - request (Union[google.cloud.container_v1.types.SetNodePoolAutoscalingRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.SetNodePoolAutoscalingRequest, dict]]): The request object. SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -962,15 +974,15 @@ async def sample_set_node_pool_autoscaling(): async def set_logging_service( self, - request: Union[cluster_service.SetLoggingServiceRequest, dict] = None, + request: Optional[Union[cluster_service.SetLoggingServiceRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - logging_service: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + logging_service: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the logging service for a specific cluster. @@ -1002,7 +1014,7 @@ async def sample_set_logging_service(): print(response) Args: - request (Union[google.cloud.container_v1.types.SetLoggingServiceRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.SetLoggingServiceRequest, dict]]): The request object. SetLoggingServiceRequest sets the logging service of a cluster. project_id (:class:`str`): @@ -1128,15 +1140,17 @@ async def sample_set_logging_service(): async def set_monitoring_service( self, - request: Union[cluster_service.SetMonitoringServiceRequest, dict] = None, + request: Optional[ + Union[cluster_service.SetMonitoringServiceRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - monitoring_service: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + monitoring_service: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the monitoring service for a specific cluster. @@ -1168,7 +1182,7 @@ async def sample_set_monitoring_service(): print(response) Args: - request (Union[google.cloud.container_v1.types.SetMonitoringServiceRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.SetMonitoringServiceRequest, dict]]): The request object. SetMonitoringServiceRequest sets the monitoring service of a cluster. project_id (:class:`str`): @@ -1296,15 +1310,15 @@ async def sample_set_monitoring_service(): async def set_addons_config( self, - request: Union[cluster_service.SetAddonsConfigRequest, dict] = None, + request: Optional[Union[cluster_service.SetAddonsConfigRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - addons_config: cluster_service.AddonsConfig = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + addons_config: Optional[cluster_service.AddonsConfig] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the addons for a specific cluster. @@ -1335,7 +1349,7 @@ async def sample_set_addons_config(): print(response) Args: - request (Union[google.cloud.container_v1.types.SetAddonsConfigRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.SetAddonsConfigRequest, dict]]): The request object. SetAddonsConfigRequest sets the addons associated with the cluster. project_id (:class:`str`): @@ -1448,15 +1462,15 @@ async def sample_set_addons_config(): async def set_locations( self, - request: Union[cluster_service.SetLocationsRequest, dict] = None, + request: Optional[Union[cluster_service.SetLocationsRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - locations: Sequence[str] = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + locations: Optional[MutableSequence[str]] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the locations for a specific cluster. Deprecated. Use @@ -1490,7 +1504,7 @@ async def sample_set_locations(): print(response) Args: - request (Union[google.cloud.container_v1.types.SetLocationsRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.SetLocationsRequest, dict]]): The request object. SetLocationsRequest sets the locations of the cluster. project_id (:class:`str`): @@ -1521,7 +1535,7 @@ async def sample_set_locations(): This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - locations (:class:`Sequence[str]`): + locations (:class:`MutableSequence[str]`): Required. The desired list of Google Compute Engine `zones `__ in which the cluster's nodes should be located. Changing @@ -1613,15 +1627,15 @@ async def sample_set_locations(): async def update_master( self, - request: Union[cluster_service.UpdateMasterRequest, dict] = None, + request: Optional[Union[cluster_service.UpdateMasterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - master_version: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + master_version: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Updates the master for a specific cluster. @@ -1653,7 +1667,7 @@ async def sample_update_master(): print(response) Args: - request (Union[google.cloud.container_v1.types.UpdateMasterRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.UpdateMasterRequest, dict]]): The request object. UpdateMasterRequest updates the master of the cluster. project_id (:class:`str`): @@ -1777,10 +1791,10 @@ async def sample_update_master(): async def set_master_auth( self, - request: Union[cluster_service.SetMasterAuthRequest, dict] = None, + request: Optional[Union[cluster_service.SetMasterAuthRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets master auth materials. Currently supports @@ -1815,7 +1829,7 @@ async def sample_set_master_auth(): print(response) Args: - request (Union[google.cloud.container_v1.types.SetMasterAuthRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.SetMasterAuthRequest, dict]]): The request object. SetMasterAuthRequest updates the admin password of a cluster. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -1862,14 +1876,14 @@ async def sample_set_master_auth(): async def delete_cluster( self, - request: Union[cluster_service.DeleteClusterRequest, dict] = None, + request: Optional[Union[cluster_service.DeleteClusterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Deletes the cluster, including the Kubernetes @@ -1909,7 +1923,7 @@ async def sample_delete_cluster(): print(response) Args: - request (Union[google.cloud.container_v1.types.DeleteClusterRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.DeleteClusterRequest, dict]]): The request object. DeleteClusterRequest deletes a cluster. project_id (:class:`str`): @@ -2022,12 +2036,12 @@ async def sample_delete_cluster(): async def list_operations( self, - request: Union[cluster_service.ListOperationsRequest, dict] = None, + request: Optional[Union[cluster_service.ListOperationsRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ListOperationsResponse: r"""Lists all operations in a project in a specific zone @@ -2059,7 +2073,7 @@ async def sample_list_operations(): print(response) Args: - request (Union[google.cloud.container_v1.types.ListOperationsRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.ListOperationsRequest, dict]]): The request object. ListOperationsRequest lists operations. project_id (:class:`str`): @@ -2150,14 +2164,14 @@ async def sample_list_operations(): async def get_operation( self, - request: Union[cluster_service.GetOperationRequest, dict] = None, + request: Optional[Union[cluster_service.GetOperationRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - operation_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + operation_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Gets the specified operation. @@ -2188,7 +2202,7 @@ async def sample_get_operation(): print(response) Args: - request (Union[google.cloud.container_v1.types.GetOperationRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.GetOperationRequest, dict]]): The request object. GetOperationRequest gets a single operation. project_id (:class:`str`): @@ -2300,14 +2314,14 @@ async def sample_get_operation(): async def cancel_operation( self, - request: Union[cluster_service.CancelOperationRequest, dict] = None, + request: Optional[Union[cluster_service.CancelOperationRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - operation_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + operation_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Cancels the specified operation. @@ -2335,7 +2349,7 @@ async def sample_cancel_operation(): await client.cancel_operation(request=request) Args: - request (Union[google.cloud.container_v1.types.CancelOperationRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.CancelOperationRequest, dict]]): The request object. CancelOperationRequest cancels a single operation. project_id (:class:`str`): @@ -2426,13 +2440,13 @@ async def sample_cancel_operation(): async def get_server_config( self, - request: Union[cluster_service.GetServerConfigRequest, dict] = None, + request: Optional[Union[cluster_service.GetServerConfigRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ServerConfig: r"""Returns configuration info about the Google @@ -2464,7 +2478,7 @@ async def sample_get_server_config(): print(response) Args: - request (Union[google.cloud.container_v1.types.GetServerConfigRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.GetServerConfigRequest, dict]]): The request object. Gets the current Kubernetes Engine service configuration. project_id (:class:`str`): @@ -2563,10 +2577,10 @@ async def sample_get_server_config(): async def get_json_web_keys( self, - request: Union[cluster_service.GetJSONWebKeysRequest, dict] = None, + request: Optional[Union[cluster_service.GetJSONWebKeysRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.GetJSONWebKeysResponse: r"""Gets the public component of the cluster signing keys @@ -2600,7 +2614,7 @@ async def sample_get_json_web_keys(): print(response) Args: - request (Union[google.cloud.container_v1.types.GetJSONWebKeysRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.GetJSONWebKeysRequest, dict]]): The request object. GetJSONWebKeysRequest gets the public component of the keys used by the cluster to sign token requests. This will be the jwks_uri for the @@ -2649,14 +2663,14 @@ async def sample_get_json_web_keys(): async def list_node_pools( self, - request: Union[cluster_service.ListNodePoolsRequest, dict] = None, + request: Optional[Union[cluster_service.ListNodePoolsRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - parent: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ListNodePoolsResponse: r"""Lists the node pools for a cluster. @@ -2687,7 +2701,7 @@ async def sample_list_node_pools(): print(response) Args: - request (Union[google.cloud.container_v1.types.ListNodePoolsRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.ListNodePoolsRequest, dict]]): The request object. ListNodePoolsRequest lists the node pool(s) for a cluster. project_id (:class:`str`): @@ -2797,15 +2811,15 @@ async def sample_list_node_pools(): async def get_node_pool( self, - request: Union[cluster_service.GetNodePoolRequest, dict] = None, + request: Optional[Union[cluster_service.GetNodePoolRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.NodePool: r"""Retrieves the requested node pool. @@ -2836,7 +2850,7 @@ async def sample_get_node_pool(): print(response) Args: - request (Union[google.cloud.container_v1.types.GetNodePoolRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.GetNodePoolRequest, dict]]): The request object. GetNodePoolRequest retrieves a node pool for a cluster. project_id (:class:`str`): @@ -2964,15 +2978,15 @@ async def sample_get_node_pool(): async def create_node_pool( self, - request: Union[cluster_service.CreateNodePoolRequest, dict] = None, + request: Optional[Union[cluster_service.CreateNodePoolRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool: cluster_service.NodePool = None, - parent: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool: Optional[cluster_service.NodePool] = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Creates a node pool for a cluster. @@ -3003,7 +3017,7 @@ async def sample_create_node_pool(): print(response) Args: - request (Union[google.cloud.container_v1.types.CreateNodePoolRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.CreateNodePoolRequest, dict]]): The request object. CreateNodePoolRequest creates a node pool for a cluster. project_id (:class:`str`): @@ -3112,15 +3126,15 @@ async def sample_create_node_pool(): async def delete_node_pool( self, - request: Union[cluster_service.DeleteNodePoolRequest, dict] = None, + request: Optional[Union[cluster_service.DeleteNodePoolRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Deletes a node pool from a cluster. @@ -3151,7 +3165,7 @@ async def sample_delete_node_pool(): print(response) Args: - request (Union[google.cloud.container_v1.types.DeleteNodePoolRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.DeleteNodePoolRequest, dict]]): The request object. DeleteNodePoolRequest deletes a node pool for a cluster. project_id (:class:`str`): @@ -3274,10 +3288,12 @@ async def sample_delete_node_pool(): async def complete_node_pool_upgrade( self, - request: Union[cluster_service.CompleteNodePoolUpgradeRequest, dict] = None, + request: Optional[ + Union[cluster_service.CompleteNodePoolUpgradeRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""CompleteNodePoolUpgrade will signal an on-going node @@ -3306,7 +3322,7 @@ async def sample_complete_node_pool_upgrade(): await client.complete_node_pool_upgrade(request=request) Args: - request (Union[google.cloud.container_v1.types.CompleteNodePoolUpgradeRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.CompleteNodePoolUpgradeRequest, dict]]): The request object. CompleteNodePoolUpgradeRequest sets the name of target node pool to complete upgrade. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -3342,15 +3358,17 @@ async def sample_complete_node_pool_upgrade(): async def rollback_node_pool_upgrade( self, - request: Union[cluster_service.RollbackNodePoolUpgradeRequest, dict] = None, + request: Optional[ + Union[cluster_service.RollbackNodePoolUpgradeRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Rolls back a previously Aborted or Failed NodePool @@ -3383,7 +3401,7 @@ async def sample_rollback_node_pool_upgrade(): print(response) Args: - request (Union[google.cloud.container_v1.types.RollbackNodePoolUpgradeRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.RollbackNodePoolUpgradeRequest, dict]]): The request object. RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed NodePool upgrade. This will be an no-op if the last upgrade @@ -3500,10 +3518,12 @@ async def sample_rollback_node_pool_upgrade(): async def set_node_pool_management( self, - request: Union[cluster_service.SetNodePoolManagementRequest, dict] = None, + request: Optional[ + Union[cluster_service.SetNodePoolManagementRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the NodeManagement options for a node pool. @@ -3534,7 +3554,7 @@ async def sample_set_node_pool_management(): print(response) Args: - request (Union[google.cloud.container_v1.types.SetNodePoolManagementRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.SetNodePoolManagementRequest, dict]]): The request object. SetNodePoolManagementRequest sets the node management properties of a node pool. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -3581,10 +3601,10 @@ async def sample_set_node_pool_management(): async def set_labels( self, - request: Union[cluster_service.SetLabelsRequest, dict] = None, + request: Optional[Union[cluster_service.SetLabelsRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets labels on a cluster. @@ -3616,7 +3636,7 @@ async def sample_set_labels(): print(response) Args: - request (Union[google.cloud.container_v1.types.SetLabelsRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.SetLabelsRequest, dict]]): The request object. SetLabelsRequest sets the Google Cloud Platform labels on a Google Container Engine cluster, which will in turn set them for Google Compute @@ -3665,15 +3685,15 @@ async def sample_set_labels(): async def set_legacy_abac( self, - request: Union[cluster_service.SetLegacyAbacRequest, dict] = None, + request: Optional[Union[cluster_service.SetLegacyAbacRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - enabled: bool = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + enabled: Optional[bool] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Enables or disables the ABAC authorization mechanism @@ -3706,7 +3726,7 @@ async def sample_set_legacy_abac(): print(response) Args: - request (Union[google.cloud.container_v1.types.SetLegacyAbacRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.SetLegacyAbacRequest, dict]]): The request object. SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for a cluster. project_id (:class:`str`): @@ -3818,14 +3838,14 @@ async def sample_set_legacy_abac(): async def start_ip_rotation( self, - request: Union[cluster_service.StartIPRotationRequest, dict] = None, + request: Optional[Union[cluster_service.StartIPRotationRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Starts master IP rotation. @@ -3856,7 +3876,7 @@ async def sample_start_ip_rotation(): print(response) Args: - request (Union[google.cloud.container_v1.types.StartIPRotationRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.StartIPRotationRequest, dict]]): The request object. StartIPRotationRequest creates a new IP for the cluster and then performs a node upgrade on each node pool to point to the new IP. @@ -3959,14 +3979,16 @@ async def sample_start_ip_rotation(): async def complete_ip_rotation( self, - request: Union[cluster_service.CompleteIPRotationRequest, dict] = None, + request: Optional[ + Union[cluster_service.CompleteIPRotationRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Completes master IP rotation. @@ -3997,7 +4019,7 @@ async def sample_complete_ip_rotation(): print(response) Args: - request (Union[google.cloud.container_v1.types.CompleteIPRotationRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.CompleteIPRotationRequest, dict]]): The request object. CompleteIPRotationRequest moves the cluster master back into single-IP mode. project_id (:class:`str`): @@ -4099,10 +4121,10 @@ async def sample_complete_ip_rotation(): async def set_node_pool_size( self, - request: Union[cluster_service.SetNodePoolSizeRequest, dict] = None, + request: Optional[Union[cluster_service.SetNodePoolSizeRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the size for a specific node pool. The new size will be @@ -4137,7 +4159,7 @@ async def sample_set_node_pool_size(): print(response) Args: - request (Union[google.cloud.container_v1.types.SetNodePoolSizeRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.SetNodePoolSizeRequest, dict]]): The request object. SetNodePoolSizeRequest sets the size of a node pool. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -4184,15 +4206,15 @@ async def sample_set_node_pool_size(): async def set_network_policy( self, - request: Union[cluster_service.SetNetworkPolicyRequest, dict] = None, + request: Optional[Union[cluster_service.SetNetworkPolicyRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - network_policy: cluster_service.NetworkPolicy = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + network_policy: Optional[cluster_service.NetworkPolicy] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Enables or disables Network Policy for a cluster. @@ -4223,7 +4245,7 @@ async def sample_set_network_policy(): print(response) Args: - request (Union[google.cloud.container_v1.types.SetNetworkPolicyRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.SetNetworkPolicyRequest, dict]]): The request object. SetNetworkPolicyRequest enables/disables network policy for a cluster. project_id (:class:`str`): @@ -4334,15 +4356,17 @@ async def sample_set_network_policy(): async def set_maintenance_policy( self, - request: Union[cluster_service.SetMaintenancePolicyRequest, dict] = None, + request: Optional[ + Union[cluster_service.SetMaintenancePolicyRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - maintenance_policy: cluster_service.MaintenancePolicy = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + maintenance_policy: Optional[cluster_service.MaintenancePolicy] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the maintenance policy for a cluster. @@ -4376,7 +4400,7 @@ async def sample_set_maintenance_policy(): print(response) Args: - request (Union[google.cloud.container_v1.types.SetMaintenancePolicyRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.SetMaintenancePolicyRequest, dict]]): The request object. SetMaintenancePolicyRequest sets the maintenance policy for a cluster. project_id (:class:`str`): @@ -4486,10 +4510,12 @@ async def sample_set_maintenance_policy(): async def list_usable_subnetworks( self, - request: Union[cluster_service.ListUsableSubnetworksRequest, dict] = None, + request: Optional[ + Union[cluster_service.ListUsableSubnetworksRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListUsableSubnetworksAsyncPager: r"""Lists subnetworks that are usable for creating @@ -4522,7 +4548,7 @@ async def sample_list_usable_subnetworks(): print(response) Args: - request (Union[google.cloud.container_v1.types.ListUsableSubnetworksRequest, dict]): + request (Optional[Union[google.cloud.container_v1.types.ListUsableSubnetworksRequest, dict]]): The request object. ListUsableSubnetworksRequest requests the list of usable subnetworks available to a user for creating clusters. diff --git a/google/cloud/container_v1/services/cluster_manager/client.py b/google/cloud/container_v1/services/cluster_manager/client.py index d526e828..bb233426 100644 --- a/google/cloud/container_v1/services/cluster_manager/client.py +++ b/google/cloud/container_v1/services/cluster_manager/client.py @@ -16,7 +16,18 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) import warnings from google.api_core import client_options as client_options_lib @@ -61,7 +72,7 @@ class ClusterManagerClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[ClusterManagerTransport]: """Returns an appropriate transport class. @@ -331,8 +342,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, ClusterManagerTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, ClusterManagerTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the cluster manager client. @@ -346,7 +357,7 @@ def __init__( transport (Union[str, ClusterManagerTransport]): The transport to use. If set to None, a transport is chosen automatically. - client_options (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -376,6 +387,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -428,13 +440,13 @@ def __init__( def list_clusters( self, - request: Union[cluster_service.ListClustersRequest, dict] = None, + request: Optional[Union[cluster_service.ListClustersRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - parent: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ListClustersResponse: r"""Lists all clusters owned by a project in either the @@ -557,14 +569,14 @@ def sample_list_clusters(): def get_cluster( self, - request: Union[cluster_service.GetClusterRequest, dict] = None, + request: Optional[Union[cluster_service.GetClusterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Cluster: r"""Gets the details of a specific cluster. @@ -694,14 +706,14 @@ def sample_get_cluster(): def create_cluster( self, - request: Union[cluster_service.CreateClusterRequest, dict] = None, + request: Optional[Union[cluster_service.CreateClusterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster: cluster_service.Cluster = None, - parent: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster: Optional[cluster_service.Cluster] = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Creates a cluster, consisting of the specified number and type @@ -845,15 +857,15 @@ def sample_create_cluster(): def update_cluster( self, - request: Union[cluster_service.UpdateClusterRequest, dict] = None, + request: Optional[Union[cluster_service.UpdateClusterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - update: cluster_service.ClusterUpdate = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + update: Optional[cluster_service.ClusterUpdate] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Updates the settings of a specific cluster. @@ -996,10 +1008,10 @@ def sample_update_cluster(): def update_node_pool( self, - request: Union[cluster_service.UpdateNodePoolRequest, dict] = None, + request: Optional[Union[cluster_service.UpdateNodePoolRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Updates the version and/or image type for the @@ -1081,10 +1093,12 @@ def sample_update_node_pool(): def set_node_pool_autoscaling( self, - request: Union[cluster_service.SetNodePoolAutoscalingRequest, dict] = None, + request: Optional[ + Union[cluster_service.SetNodePoolAutoscalingRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the autoscaling settings for the specified node @@ -1166,15 +1180,15 @@ def sample_set_node_pool_autoscaling(): def set_logging_service( self, - request: Union[cluster_service.SetLoggingServiceRequest, dict] = None, + request: Optional[Union[cluster_service.SetLoggingServiceRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - logging_service: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + logging_service: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the logging service for a specific cluster. @@ -1332,15 +1346,17 @@ def sample_set_logging_service(): def set_monitoring_service( self, - request: Union[cluster_service.SetMonitoringServiceRequest, dict] = None, + request: Optional[ + Union[cluster_service.SetMonitoringServiceRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - monitoring_service: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + monitoring_service: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the monitoring service for a specific cluster. @@ -1500,15 +1516,15 @@ def sample_set_monitoring_service(): def set_addons_config( self, - request: Union[cluster_service.SetAddonsConfigRequest, dict] = None, + request: Optional[Union[cluster_service.SetAddonsConfigRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - addons_config: cluster_service.AddonsConfig = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + addons_config: Optional[cluster_service.AddonsConfig] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the addons for a specific cluster. @@ -1652,15 +1668,15 @@ def sample_set_addons_config(): def set_locations( self, - request: Union[cluster_service.SetLocationsRequest, dict] = None, + request: Optional[Union[cluster_service.SetLocationsRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - locations: Sequence[str] = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + locations: Optional[MutableSequence[str]] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the locations for a specific cluster. Deprecated. Use @@ -1725,7 +1741,7 @@ def sample_set_locations(): This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - locations (Sequence[str]): + locations (MutableSequence[str]): Required. The desired list of Google Compute Engine `zones `__ in which the cluster's nodes should be located. Changing @@ -1817,15 +1833,15 @@ def sample_set_locations(): def update_master( self, - request: Union[cluster_service.UpdateMasterRequest, dict] = None, + request: Optional[Union[cluster_service.UpdateMasterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - master_version: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + master_version: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Updates the master for a specific cluster. @@ -1981,10 +1997,10 @@ def sample_update_master(): def set_master_auth( self, - request: Union[cluster_service.SetMasterAuthRequest, dict] = None, + request: Optional[Union[cluster_service.SetMasterAuthRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets master auth materials. Currently supports @@ -2067,14 +2083,14 @@ def sample_set_master_auth(): def delete_cluster( self, - request: Union[cluster_service.DeleteClusterRequest, dict] = None, + request: Optional[Union[cluster_service.DeleteClusterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Deletes the cluster, including the Kubernetes @@ -2217,12 +2233,12 @@ def sample_delete_cluster(): def list_operations( self, - request: Union[cluster_service.ListOperationsRequest, dict] = None, + request: Optional[Union[cluster_service.ListOperationsRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ListOperationsResponse: r"""Lists all operations in a project in a specific zone @@ -2335,14 +2351,14 @@ def sample_list_operations(): def get_operation( self, - request: Union[cluster_service.GetOperationRequest, dict] = None, + request: Optional[Union[cluster_service.GetOperationRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - operation_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + operation_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Gets the specified operation. @@ -2475,14 +2491,14 @@ def sample_get_operation(): def cancel_operation( self, - request: Union[cluster_service.CancelOperationRequest, dict] = None, + request: Optional[Union[cluster_service.CancelOperationRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - operation_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + operation_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Cancels the specified operation. @@ -2601,13 +2617,13 @@ def sample_cancel_operation(): def get_server_config( self, - request: Union[cluster_service.GetServerConfigRequest, dict] = None, + request: Optional[Union[cluster_service.GetServerConfigRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ServerConfig: r"""Returns configuration info about the Google @@ -2728,10 +2744,10 @@ def sample_get_server_config(): def get_json_web_keys( self, - request: Union[cluster_service.GetJSONWebKeysRequest, dict] = None, + request: Optional[Union[cluster_service.GetJSONWebKeysRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.GetJSONWebKeysResponse: r"""Gets the public component of the cluster signing keys @@ -2815,14 +2831,14 @@ def sample_get_json_web_keys(): def list_node_pools( self, - request: Union[cluster_service.ListNodePoolsRequest, dict] = None, + request: Optional[Union[cluster_service.ListNodePoolsRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - parent: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ListNodePoolsResponse: r"""Lists the node pools for a cluster. @@ -2953,15 +2969,15 @@ def sample_list_node_pools(): def get_node_pool( self, - request: Union[cluster_service.GetNodePoolRequest, dict] = None, + request: Optional[Union[cluster_service.GetNodePoolRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.NodePool: r"""Retrieves the requested node pool. @@ -3110,15 +3126,15 @@ def sample_get_node_pool(): def create_node_pool( self, - request: Union[cluster_service.CreateNodePoolRequest, dict] = None, + request: Optional[Union[cluster_service.CreateNodePoolRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool: cluster_service.NodePool = None, - parent: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool: Optional[cluster_service.NodePool] = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Creates a node pool for a cluster. @@ -3258,15 +3274,15 @@ def sample_create_node_pool(): def delete_node_pool( self, - request: Union[cluster_service.DeleteNodePoolRequest, dict] = None, + request: Optional[Union[cluster_service.DeleteNodePoolRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Deletes a node pool from a cluster. @@ -3410,10 +3426,12 @@ def sample_delete_node_pool(): def complete_node_pool_upgrade( self, - request: Union[cluster_service.CompleteNodePoolUpgradeRequest, dict] = None, + request: Optional[ + Union[cluster_service.CompleteNodePoolUpgradeRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""CompleteNodePoolUpgrade will signal an on-going node @@ -3481,15 +3499,17 @@ def sample_complete_node_pool_upgrade(): def rollback_node_pool_upgrade( self, - request: Union[cluster_service.RollbackNodePoolUpgradeRequest, dict] = None, + request: Optional[ + Union[cluster_service.RollbackNodePoolUpgradeRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Rolls back a previously Aborted or Failed NodePool @@ -3641,10 +3661,12 @@ def sample_rollback_node_pool_upgrade(): def set_node_pool_management( self, - request: Union[cluster_service.SetNodePoolManagementRequest, dict] = None, + request: Optional[ + Union[cluster_service.SetNodePoolManagementRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the NodeManagement options for a node pool. @@ -3723,10 +3745,10 @@ def sample_set_node_pool_management(): def set_labels( self, - request: Union[cluster_service.SetLabelsRequest, dict] = None, + request: Optional[Union[cluster_service.SetLabelsRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets labels on a cluster. @@ -3808,15 +3830,15 @@ def sample_set_labels(): def set_legacy_abac( self, - request: Union[cluster_service.SetLegacyAbacRequest, dict] = None, + request: Optional[Union[cluster_service.SetLegacyAbacRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - enabled: bool = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + enabled: Optional[bool] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Enables or disables the ABAC authorization mechanism @@ -3961,14 +3983,14 @@ def sample_set_legacy_abac(): def start_ip_rotation( self, - request: Union[cluster_service.StartIPRotationRequest, dict] = None, + request: Optional[Union[cluster_service.StartIPRotationRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Starts master IP rotation. @@ -4102,14 +4124,16 @@ def sample_start_ip_rotation(): def complete_ip_rotation( self, - request: Union[cluster_service.CompleteIPRotationRequest, dict] = None, + request: Optional[ + Union[cluster_service.CompleteIPRotationRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Completes master IP rotation. @@ -4242,10 +4266,10 @@ def sample_complete_ip_rotation(): def set_node_pool_size( self, - request: Union[cluster_service.SetNodePoolSizeRequest, dict] = None, + request: Optional[Union[cluster_service.SetNodePoolSizeRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the size for a specific node pool. The new size will be @@ -4328,15 +4352,15 @@ def sample_set_node_pool_size(): def set_network_policy( self, - request: Union[cluster_service.SetNetworkPolicyRequest, dict] = None, + request: Optional[Union[cluster_service.SetNetworkPolicyRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - network_policy: cluster_service.NetworkPolicy = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + network_policy: Optional[cluster_service.NetworkPolicy] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Enables or disables Network Policy for a cluster. @@ -4478,15 +4502,17 @@ def sample_set_network_policy(): def set_maintenance_policy( self, - request: Union[cluster_service.SetMaintenancePolicyRequest, dict] = None, + request: Optional[ + Union[cluster_service.SetMaintenancePolicyRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - maintenance_policy: cluster_service.MaintenancePolicy = None, - name: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + maintenance_policy: Optional[cluster_service.MaintenancePolicy] = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the maintenance policy for a cluster. @@ -4630,10 +4656,12 @@ def sample_set_maintenance_policy(): def list_usable_subnetworks( self, - request: Union[cluster_service.ListUsableSubnetworksRequest, dict] = None, + request: Optional[ + Union[cluster_service.ListUsableSubnetworksRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListUsableSubnetworksPager: r"""Lists subnetworks that are usable for creating diff --git a/google/cloud/container_v1/services/cluster_manager/transports/base.py b/google/cloud/container_v1/services/cluster_manager/transports/base.py index cc413a68..9ea536a0 100644 --- a/google/cloud/container_v1/services/cluster_manager/transports/base.py +++ b/google/cloud/container_v1/services/cluster_manager/transports/base.py @@ -49,7 +49,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/google/cloud/container_v1/services/cluster_manager/transports/grpc.py b/google/cloud/container_v1/services/cluster_manager/transports/grpc.py index 6403577c..3dcdd5a9 100644 --- a/google/cloud/container_v1/services/cluster_manager/transports/grpc.py +++ b/google/cloud/container_v1/services/cluster_manager/transports/grpc.py @@ -47,14 +47,14 @@ def __init__( self, *, host: str = "container.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - channel: grpc.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + channel: Optional[grpc.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, @@ -181,8 +181,8 @@ def __init__( def create_channel( cls, host: str = "container.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, **kwargs, diff --git a/google/cloud/container_v1/services/cluster_manager/transports/grpc_asyncio.py b/google/cloud/container_v1/services/cluster_manager/transports/grpc_asyncio.py index 4465c959..b308b28d 100644 --- a/google/cloud/container_v1/services/cluster_manager/transports/grpc_asyncio.py +++ b/google/cloud/container_v1/services/cluster_manager/transports/grpc_asyncio.py @@ -49,7 +49,7 @@ class ClusterManagerGrpcAsyncIOTransport(ClusterManagerTransport): def create_channel( cls, host: str = "container.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, @@ -92,15 +92,15 @@ def __init__( self, *, host: str = "container.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, - channel: aio.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, - quota_project_id=None, + channel: Optional[aio.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, api_audience: Optional[str] = None, diff --git a/google/cloud/container_v1/types/__init__.py b/google/cloud/container_v1/types/__init__.py index 83e4a36a..a3c78154 100644 --- a/google/cloud/container_v1/types/__init__.py +++ b/google/cloud/container_v1/types/__init__.py @@ -44,6 +44,7 @@ DeleteNodePoolRequest, DnsCacheConfig, DNSConfig, + GatewayAPIConfig, GcePersistentDiskCsiDriverConfig, GcfsConfig, GcpFilestoreCsiDriverConfig, @@ -116,6 +117,7 @@ RecurringTimeWindow, ReleaseChannel, ReservationAffinity, + ResourceLabels, ResourceLimit, ResourceUsageExportConfig, RollbackNodePoolUpgradeRequest, @@ -185,6 +187,7 @@ "DeleteNodePoolRequest", "DnsCacheConfig", "DNSConfig", + "GatewayAPIConfig", "GcePersistentDiskCsiDriverConfig", "GcfsConfig", "GcpFilestoreCsiDriverConfig", @@ -254,6 +257,7 @@ "RecurringTimeWindow", "ReleaseChannel", "ReservationAffinity", + "ResourceLabels", "ResourceLimit", "ResourceUsageExportConfig", "RollbackNodePoolUpgradeRequest", diff --git a/google/cloud/container_v1/types/cluster_service.py b/google/cloud/container_v1/types/cluster_service.py index d9d4c692..f5faa46a 100644 --- a/google/cloud/container_v1/types/cluster_service.py +++ b/google/cloud/container_v1/types/cluster_service.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + from google.protobuf import duration_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore from google.protobuf import wrappers_pb2 # type: ignore @@ -41,6 +43,7 @@ "NodeTaint", "NodeTaints", "NodeLabels", + "ResourceLabels", "NetworkTags", "MasterAuth", "ClientCertificateConfig", @@ -124,6 +127,7 @@ "SetMaintenancePolicyRequest", "StatusCondition", "NetworkConfig", + "GatewayAPIConfig", "ServiceExternalIPsConfig", "GetOpenIDConfigRequest", "GetOpenIDConfigResponse", @@ -220,7 +224,7 @@ class LinuxNodeConfig(proto.Message): r"""Parameters that can be configured on Linux nodes. Attributes: - sysctls (Mapping[str, str]): + sysctls (MutableMapping[str, str]): The Linux kernel parameters to be applied to the nodes and all pods running on the nodes. @@ -231,13 +235,27 @@ class LinuxNodeConfig(proto.Message): net.core.wmem_default net.core.wmem_max net.core.optmem_max net.core.somaxconn net.ipv4.tcp_rmem net.ipv4.tcp_wmem net.ipv4.tcp_tw_reuse + cgroup_mode (google.cloud.container_v1.types.LinuxNodeConfig.CgroupMode): + cgroup_mode specifies the cgroup mode to be used on the + node. """ - sysctls = proto.MapField( + class CgroupMode(proto.Enum): + r"""Possible cgroup modes that can be used.""" + CGROUP_MODE_UNSPECIFIED = 0 + CGROUP_MODE_V1 = 1 + CGROUP_MODE_V2 = 2 + + sysctls: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=1, ) + cgroup_mode: CgroupMode = proto.Field( + proto.ENUM, + number=2, + enum=CgroupMode, + ) class NodeKubeletConfig(proto.Message): @@ -285,20 +303,20 @@ class NodeKubeletConfig(proto.Message): or equal to 1024 and less than 4194304. """ - cpu_manager_policy = proto.Field( + cpu_manager_policy: str = proto.Field( proto.STRING, number=1, ) - cpu_cfs_quota = proto.Field( + cpu_cfs_quota: wrappers_pb2.BoolValue = proto.Field( proto.MESSAGE, number=2, message=wrappers_pb2.BoolValue, ) - cpu_cfs_quota_period = proto.Field( + cpu_cfs_quota_period: str = proto.Field( proto.STRING, number=3, ) - pod_pids_limit = proto.Field( + pod_pids_limit: int = proto.Field( proto.INT64, number=4, ) @@ -323,7 +341,7 @@ class NodeConfig(proto.Message): specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB. - oauth_scopes (Sequence[str]): + oauth_scopes (MutableSequence[str]): The set of Google API scopes to be made available on all of the node VMs under the "default" service account. @@ -346,7 +364,7 @@ class NodeConfig(proto.Message): address of the Service Account; otherwise, if no Service Account is specified, the "default" service account is used. - metadata (Mapping[str, str]): + metadata (MutableMapping[str, str]): The metadata key/value pairs assigned to instances in the cluster. @@ -387,7 +405,7 @@ class NodeConfig(proto.Message): The image type to use for this node. Note that for a given image type, the latest version of it will be used. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): The map of Kubernetes labels (key/value pairs) to be applied to each node. These will added in addition to any default label(s) that @@ -407,7 +425,7 @@ class NodeConfig(proto.Message): per zone. See: https://cloud.google.com/compute/docs/disks/local-ssd for more information. - tags (Sequence[str]): + tags (MutableSequence[str]): The list of instance tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls and are @@ -420,7 +438,7 @@ class NodeConfig(proto.Message): https://cloud.google.com/compute/docs/instances/preemptible for more information about preemptible VM instances. - accelerators (Sequence[google.cloud.container_v1.types.AcceleratorConfig]): + accelerators (MutableSequence[google.cloud.container_v1.types.AcceleratorConfig]): A list of hardware accelerators to be attached to each node. See https://cloud.google.com/compute/docs/gpus for @@ -442,7 +460,7 @@ class NodeConfig(proto.Message): workload_metadata_config (google.cloud.container_v1.types.WorkloadMetadataConfig): The workload metadata configuration for this node. - taints (Sequence[google.cloud.container_v1.types.NodeTaint]): + taints (MutableSequence[google.cloud.container_v1.types.NodeTaint]): List of kubernetes taints to be applied to each node. For more information, including usage and the @@ -489,133 +507,142 @@ class NodeConfig(proto.Message): Confidential nodes config. All the nodes in the node pool will be Confidential VM once enabled. + resource_labels (MutableMapping[str, str]): + The resource labels for the node pool to use + to annotate any related Google Compute Engine + resources. logging_config (google.cloud.container_v1.types.NodePoolLoggingConfig): Logging configuration. """ - machine_type = proto.Field( + machine_type: str = proto.Field( proto.STRING, number=1, ) - disk_size_gb = proto.Field( + disk_size_gb: int = proto.Field( proto.INT32, number=2, ) - oauth_scopes = proto.RepeatedField( + oauth_scopes: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) - service_account = proto.Field( + service_account: str = proto.Field( proto.STRING, number=9, ) - metadata = proto.MapField( + metadata: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=4, ) - image_type = proto.Field( + image_type: str = proto.Field( proto.STRING, number=5, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=6, ) - local_ssd_count = proto.Field( + local_ssd_count: int = proto.Field( proto.INT32, number=7, ) - tags = proto.RepeatedField( + tags: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=8, ) - preemptible = proto.Field( + preemptible: bool = proto.Field( proto.BOOL, number=10, ) - accelerators = proto.RepeatedField( + accelerators: MutableSequence["AcceleratorConfig"] = proto.RepeatedField( proto.MESSAGE, number=11, message="AcceleratorConfig", ) - disk_type = proto.Field( + disk_type: str = proto.Field( proto.STRING, number=12, ) - min_cpu_platform = proto.Field( + min_cpu_platform: str = proto.Field( proto.STRING, number=13, ) - workload_metadata_config = proto.Field( + workload_metadata_config: "WorkloadMetadataConfig" = proto.Field( proto.MESSAGE, number=14, message="WorkloadMetadataConfig", ) - taints = proto.RepeatedField( + taints: MutableSequence["NodeTaint"] = proto.RepeatedField( proto.MESSAGE, number=15, message="NodeTaint", ) - sandbox_config = proto.Field( + sandbox_config: "SandboxConfig" = proto.Field( proto.MESSAGE, number=17, message="SandboxConfig", ) - node_group = proto.Field( + node_group: str = proto.Field( proto.STRING, number=18, ) - reservation_affinity = proto.Field( + reservation_affinity: "ReservationAffinity" = proto.Field( proto.MESSAGE, number=19, message="ReservationAffinity", ) - shielded_instance_config = proto.Field( + shielded_instance_config: "ShieldedInstanceConfig" = proto.Field( proto.MESSAGE, number=20, message="ShieldedInstanceConfig", ) - linux_node_config = proto.Field( + linux_node_config: "LinuxNodeConfig" = proto.Field( proto.MESSAGE, number=21, message="LinuxNodeConfig", ) - kubelet_config = proto.Field( + kubelet_config: "NodeKubeletConfig" = proto.Field( proto.MESSAGE, number=22, message="NodeKubeletConfig", ) - boot_disk_kms_key = proto.Field( + boot_disk_kms_key: str = proto.Field( proto.STRING, number=23, ) - gcfs_config = proto.Field( + gcfs_config: "GcfsConfig" = proto.Field( proto.MESSAGE, number=25, message="GcfsConfig", ) - advanced_machine_features = proto.Field( + advanced_machine_features: "AdvancedMachineFeatures" = proto.Field( proto.MESSAGE, number=26, message="AdvancedMachineFeatures", ) - gvnic = proto.Field( + gvnic: "VirtualNIC" = proto.Field( proto.MESSAGE, number=29, message="VirtualNIC", ) - spot = proto.Field( + spot: bool = proto.Field( proto.BOOL, number=32, ) - confidential_nodes = proto.Field( + confidential_nodes: "ConfidentialNodes" = proto.Field( proto.MESSAGE, number=35, message="ConfidentialNodes", ) - logging_config = proto.Field( + resource_labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=37, + ) + logging_config: "NodePoolLoggingConfig" = proto.Field( proto.MESSAGE, number=38, message="NodePoolLoggingConfig", @@ -636,7 +663,7 @@ class AdvancedMachineFeatures(proto.Message): This field is a member of `oneof`_ ``_threads_per_core``. """ - threads_per_core = proto.Field( + threads_per_core: int = proto.Field( proto.INT64, number=1, optional=True, @@ -692,6 +719,13 @@ class NodeNetworkConfig(proto.Message): This field cannot be changed after the node pool has been created. + enable_private_nodes (bool): + Whether nodes have internal IP addresses only. If + enable_private_nodes is not specified, then the value is + derived from + [cluster.privateClusterConfig.enablePrivateNodes][google.container.v1beta1.PrivateClusterConfig.enablePrivateNodes] + + This field is a member of `oneof`_ ``_enable_private_nodes``. network_performance_config (google.cloud.container_v1.types.NodeNetworkConfig.NetworkPerformanceConfig): Network bandwidth tier configuration. @@ -714,26 +748,31 @@ class Tier(proto.Enum): TIER_UNSPECIFIED = 0 TIER_1 = 1 - total_egress_bandwidth_tier = proto.Field( + total_egress_bandwidth_tier: "NodeNetworkConfig.NetworkPerformanceConfig.Tier" = proto.Field( proto.ENUM, number=1, optional=True, enum="NodeNetworkConfig.NetworkPerformanceConfig.Tier", ) - create_pod_range = proto.Field( + create_pod_range: bool = proto.Field( proto.BOOL, number=4, ) - pod_range = proto.Field( + pod_range: str = proto.Field( proto.STRING, number=5, ) - pod_ipv4_cidr_block = proto.Field( + pod_ipv4_cidr_block: str = proto.Field( proto.STRING, number=6, ) - network_performance_config = proto.Field( + enable_private_nodes: bool = proto.Field( + proto.BOOL, + number=9, + optional=True, + ) + network_performance_config: NetworkPerformanceConfig = proto.Field( proto.MESSAGE, number=11, optional=True, @@ -764,11 +803,11 @@ class ShieldedInstanceConfig(proto.Message): is created. """ - enable_secure_boot = proto.Field( + enable_secure_boot: bool = proto.Field( proto.BOOL, number=1, ) - enable_integrity_monitoring = proto.Field( + enable_integrity_monitoring: bool = proto.Field( proto.BOOL, number=2, ) @@ -788,7 +827,7 @@ class Type(proto.Enum): UNSPECIFIED = 0 GVISOR = 1 - type_ = proto.Field( + type_: Type = proto.Field( proto.ENUM, number=2, enum=Type, @@ -804,7 +843,7 @@ class GcfsConfig(proto.Message): Whether to use GCFS. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -824,7 +863,7 @@ class ReservationAffinity(proto.Message): target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value. - values (Sequence[str]): + values (MutableSequence[str]): Corresponds to the label value(s) of reservation resource(s). """ @@ -838,16 +877,16 @@ class Type(proto.Enum): ANY_RESERVATION = 2 SPECIFIC_RESERVATION = 3 - consume_reservation_type = proto.Field( + consume_reservation_type: Type = proto.Field( proto.ENUM, number=1, enum=Type, ) - key = proto.Field( + key: str = proto.Field( proto.STRING, number=2, ) - values = proto.RepeatedField( + values: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) @@ -878,15 +917,15 @@ class Effect(proto.Enum): PREFER_NO_SCHEDULE = 2 NO_EXECUTE = 3 - key = proto.Field( + key: str = proto.Field( proto.STRING, number=1, ) - value = proto.Field( + value: str = proto.Field( proto.STRING, number=2, ) - effect = proto.Field( + effect: Effect = proto.Field( proto.ENUM, number=3, enum=Effect, @@ -898,11 +937,11 @@ class NodeTaints(proto.Message): taints `__. Attributes: - taints (Sequence[google.cloud.container_v1.types.NodeTaint]): + taints (MutableSequence[google.cloud.container_v1.types.NodeTaint]): List of node taints. """ - taints = proto.RepeatedField( + taints: MutableSequence["NodeTaint"] = proto.RepeatedField( proto.MESSAGE, number=1, message="NodeTaint", @@ -914,11 +953,27 @@ class NodeLabels(proto.Message): labels `__. Attributes: - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): Map of node label keys and node label values. """ - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=1, + ) + + +class ResourceLabels(proto.Message): + r"""Collection of `GCP + labels `__. + + Attributes: + labels (MutableMapping[str, str]): + Map of node label keys and node label values. + """ + + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=1, @@ -930,11 +985,11 @@ class NetworkTags(proto.Message): to a node's underlying VM instance. Attributes: - tags (Sequence[str]): + tags (MutableSequence[str]): List of network tags. """ - tags = proto.RepeatedField( + tags: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=1, ) @@ -986,28 +1041,28 @@ class MasterAuth(proto.Message): authenticate to the cluster endpoint. """ - username = proto.Field( + username: str = proto.Field( proto.STRING, number=1, ) - password = proto.Field( + password: str = proto.Field( proto.STRING, number=2, ) - client_certificate_config = proto.Field( + client_certificate_config: "ClientCertificateConfig" = proto.Field( proto.MESSAGE, number=3, message="ClientCertificateConfig", ) - cluster_ca_certificate = proto.Field( + cluster_ca_certificate: str = proto.Field( proto.STRING, number=100, ) - client_certificate = proto.Field( + client_certificate: str = proto.Field( proto.STRING, number=101, ) - client_key = proto.Field( + client_key: str = proto.Field( proto.STRING, number=102, ) @@ -1021,7 +1076,7 @@ class ClientCertificateConfig(proto.Message): Issue a client certificate. """ - issue_client_certificate = proto.Field( + issue_client_certificate: bool = proto.Field( proto.BOOL, number=1, ) @@ -1078,52 +1133,54 @@ class AddonsConfig(proto.Message): addon. """ - http_load_balancing = proto.Field( + http_load_balancing: "HttpLoadBalancing" = proto.Field( proto.MESSAGE, number=1, message="HttpLoadBalancing", ) - horizontal_pod_autoscaling = proto.Field( + horizontal_pod_autoscaling: "HorizontalPodAutoscaling" = proto.Field( proto.MESSAGE, number=2, message="HorizontalPodAutoscaling", ) - kubernetes_dashboard = proto.Field( + kubernetes_dashboard: "KubernetesDashboard" = proto.Field( proto.MESSAGE, number=3, message="KubernetesDashboard", ) - network_policy_config = proto.Field( + network_policy_config: "NetworkPolicyConfig" = proto.Field( proto.MESSAGE, number=4, message="NetworkPolicyConfig", ) - cloud_run_config = proto.Field( + cloud_run_config: "CloudRunConfig" = proto.Field( proto.MESSAGE, number=7, message="CloudRunConfig", ) - dns_cache_config = proto.Field( + dns_cache_config: "DnsCacheConfig" = proto.Field( proto.MESSAGE, number=8, message="DnsCacheConfig", ) - config_connector_config = proto.Field( + config_connector_config: "ConfigConnectorConfig" = proto.Field( proto.MESSAGE, number=10, message="ConfigConnectorConfig", ) - gce_persistent_disk_csi_driver_config = proto.Field( - proto.MESSAGE, - number=11, - message="GcePersistentDiskCsiDriverConfig", + gce_persistent_disk_csi_driver_config: "GcePersistentDiskCsiDriverConfig" = ( + proto.Field( + proto.MESSAGE, + number=11, + message="GcePersistentDiskCsiDriverConfig", + ) ) - gcp_filestore_csi_driver_config = proto.Field( + gcp_filestore_csi_driver_config: "GcpFilestoreCsiDriverConfig" = proto.Field( proto.MESSAGE, number=14, message="GcpFilestoreCsiDriverConfig", ) - gke_backup_agent_config = proto.Field( + gke_backup_agent_config: "GkeBackupAgentConfig" = proto.Field( proto.MESSAGE, number=16, message="GkeBackupAgentConfig", @@ -1143,7 +1200,7 @@ class HttpLoadBalancing(proto.Message): balancers. """ - disabled = proto.Field( + disabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1163,7 +1220,7 @@ class HorizontalPodAutoscaling(proto.Message): Stackdriver Monitoring. """ - disabled = proto.Field( + disabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1178,7 +1235,7 @@ class KubernetesDashboard(proto.Message): for this cluster. """ - disabled = proto.Field( + disabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1195,7 +1252,7 @@ class NetworkPolicyConfig(proto.Message): cluster. """ - disabled = proto.Field( + disabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1210,7 +1267,7 @@ class DnsCacheConfig(proto.Message): this cluster. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1225,7 +1282,7 @@ class PrivateClusterMasterGlobalAccessConfig(proto.Message): not. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1261,37 +1318,45 @@ class PrivateClusterConfig(proto.Message): VPC used by this cluster. master_global_access_config (google.cloud.container_v1.types.PrivateClusterMasterGlobalAccessConfig): Controls master global access settings. + private_endpoint_subnetwork (str): + Subnet to provision the master's private endpoint during + cluster creation. Specified in + projects/\ */regions/*/subnetworks/\* format. """ - enable_private_nodes = proto.Field( + enable_private_nodes: bool = proto.Field( proto.BOOL, number=1, ) - enable_private_endpoint = proto.Field( + enable_private_endpoint: bool = proto.Field( proto.BOOL, number=2, ) - master_ipv4_cidr_block = proto.Field( + master_ipv4_cidr_block: str = proto.Field( proto.STRING, number=3, ) - private_endpoint = proto.Field( + private_endpoint: str = proto.Field( proto.STRING, number=4, ) - public_endpoint = proto.Field( + public_endpoint: str = proto.Field( proto.STRING, number=5, ) - peering_name = proto.Field( + peering_name: str = proto.Field( proto.STRING, number=7, ) - master_global_access_config = proto.Field( + master_global_access_config: "PrivateClusterMasterGlobalAccessConfig" = proto.Field( proto.MESSAGE, number=8, message="PrivateClusterMasterGlobalAccessConfig", ) + private_endpoint_subnetwork: str = proto.Field( + proto.STRING, + number=10, + ) class AuthenticatorGroupsConfig(proto.Message): @@ -1308,11 +1373,11 @@ class AuthenticatorGroupsConfig(proto.Message): be used. Only relevant if enabled = true. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) - security_group = proto.Field( + security_group: str = proto.Field( proto.STRING, number=2, ) @@ -1336,11 +1401,11 @@ class LoadBalancerType(proto.Enum): LOAD_BALANCER_TYPE_EXTERNAL = 1 LOAD_BALANCER_TYPE_INTERNAL = 2 - disabled = proto.Field( + disabled: bool = proto.Field( proto.BOOL, number=1, ) - load_balancer_type = proto.Field( + load_balancer_type: LoadBalancerType = proto.Field( proto.ENUM, number=3, enum=LoadBalancerType, @@ -1356,7 +1421,7 @@ class ConfigConnectorConfig(proto.Message): cluster. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1371,7 +1436,7 @@ class GcePersistentDiskCsiDriverConfig(proto.Message): enabled for this cluster. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1386,7 +1451,7 @@ class GcpFilestoreCsiDriverConfig(proto.Message): enabled for this cluster. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1401,7 +1466,7 @@ class GkeBackupAgentConfig(proto.Message): for this cluster. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1418,9 +1483,14 @@ class MasterAuthorizedNetworksConfig(proto.Message): enabled (bool): Whether or not master authorized networks is enabled. - cidr_blocks (Sequence[google.cloud.container_v1.types.MasterAuthorizedNetworksConfig.CidrBlock]): + cidr_blocks (MutableSequence[google.cloud.container_v1.types.MasterAuthorizedNetworksConfig.CidrBlock]): cidr_blocks define up to 50 external networks that could access Kubernetes master through HTTPS. + gcp_public_cidrs_access_enabled (bool): + Whether master is accessbile via Google + Compute Engine Public IP addresses. + + This field is a member of `oneof`_ ``_gcp_public_cidrs_access_enabled``. """ class CidrBlock(proto.Message): @@ -1434,24 +1504,29 @@ class CidrBlock(proto.Message): cidr_block must be specified in CIDR notation. """ - display_name = proto.Field( + display_name: str = proto.Field( proto.STRING, number=1, ) - cidr_block = proto.Field( + cidr_block: str = proto.Field( proto.STRING, number=2, ) - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) - cidr_blocks = proto.RepeatedField( + cidr_blocks: MutableSequence[CidrBlock] = proto.RepeatedField( proto.MESSAGE, number=2, message=CidrBlock, ) + gcp_public_cidrs_access_enabled: bool = proto.Field( + proto.BOOL, + number=3, + optional=True, + ) class LegacyAbac(proto.Message): @@ -1468,7 +1543,7 @@ class LegacyAbac(proto.Message): configuration or IAM. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1491,12 +1566,12 @@ class Provider(proto.Enum): PROVIDER_UNSPECIFIED = 0 CALICO = 1 - provider = proto.Field( + provider: Provider = proto.Field( proto.ENUM, number=1, enum=Provider, ) - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=2, ) @@ -1524,11 +1599,11 @@ class EvaluationMode(proto.Enum): DISABLED = 1 PROJECT_SINGLETON_POLICY_ENFORCE = 2 - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) - evaluation_mode = proto.Field( + evaluation_mode: EvaluationMode = proto.Field( proto.ENUM, number=2, enum=EvaluationMode, @@ -1660,64 +1735,64 @@ class IPAllocationPolicy(proto.Message): create_subnetwork is true """ - use_ip_aliases = proto.Field( + use_ip_aliases: bool = proto.Field( proto.BOOL, number=1, ) - create_subnetwork = proto.Field( + create_subnetwork: bool = proto.Field( proto.BOOL, number=2, ) - subnetwork_name = proto.Field( + subnetwork_name: str = proto.Field( proto.STRING, number=3, ) - cluster_ipv4_cidr = proto.Field( + cluster_ipv4_cidr: str = proto.Field( proto.STRING, number=4, ) - node_ipv4_cidr = proto.Field( + node_ipv4_cidr: str = proto.Field( proto.STRING, number=5, ) - services_ipv4_cidr = proto.Field( + services_ipv4_cidr: str = proto.Field( proto.STRING, number=6, ) - cluster_secondary_range_name = proto.Field( + cluster_secondary_range_name: str = proto.Field( proto.STRING, number=7, ) - services_secondary_range_name = proto.Field( + services_secondary_range_name: str = proto.Field( proto.STRING, number=8, ) - cluster_ipv4_cidr_block = proto.Field( + cluster_ipv4_cidr_block: str = proto.Field( proto.STRING, number=9, ) - node_ipv4_cidr_block = proto.Field( + node_ipv4_cidr_block: str = proto.Field( proto.STRING, number=10, ) - services_ipv4_cidr_block = proto.Field( + services_ipv4_cidr_block: str = proto.Field( proto.STRING, number=11, ) - tpu_ipv4_cidr_block = proto.Field( + tpu_ipv4_cidr_block: str = proto.Field( proto.STRING, number=13, ) - use_routes = proto.Field( + use_routes: bool = proto.Field( proto.BOOL, number=15, ) - stack_type = proto.Field( + stack_type: "StackType" = proto.Field( proto.ENUM, number=16, enum="StackType", ) - ipv6_access_type = proto.Field( + ipv6_access_type: "IPv6AccessType" = proto.Field( proto.ENUM, number=17, enum="IPv6AccessType", @@ -1818,11 +1893,11 @@ class Cluster(proto.Message): The name of the Google Compute Engine `subnetwork `__ to which the cluster is connected. - node_pools (Sequence[google.cloud.container_v1.types.NodePool]): + node_pools (MutableSequence[google.cloud.container_v1.types.NodePool]): The node pools associated with this cluster. This field should not be set if "node_config" or "initial_node_count" are specified. - locations (Sequence[str]): + locations (MutableSequence[str]): The list of Google Compute Engine `zones `__ in which the cluster's nodes should be located. @@ -1844,7 +1919,7 @@ class Cluster(proto.Message): uptime and master/node upgrades are disabled. Alpha enabled clusters are automatically deleted thirty days after creation. - resource_labels (Mapping[str, str]): + resource_labels (MutableMapping[str, str]): The resource labels for the cluster to use to annotate any related Google Compute Engine resources. @@ -1974,7 +2049,7 @@ class Cluster(proto.Message): `CIDR `__ notation (e.g. ``1.2.3.4/29``). Service addresses are typically put in the last ``/16`` from the container CIDR. - instance_group_urls (Sequence[str]): + instance_group_urls (MutableSequence[str]): Deprecated. Use node_pools.instance_group_urls. current_node_count (int): [Output only] The number of nodes currently in the cluster. @@ -1999,7 +2074,7 @@ class Cluster(proto.Message): cluster, in `CIDR `__ notation (e.g. ``1.2.3.4/29``). - conditions (Sequence[google.cloud.container_v1.types.StatusCondition]): + conditions (MutableSequence[google.cloud.container_v1.types.StatusCondition]): Which conditions caused the current cluster state. autopilot (google.cloud.container_v1.types.Autopilot): @@ -2033,285 +2108,285 @@ class Status(proto.Enum): ERROR = 5 DEGRADED = 6 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=2, ) - initial_node_count = proto.Field( + initial_node_count: int = proto.Field( proto.INT32, number=3, ) - node_config = proto.Field( + node_config: "NodeConfig" = proto.Field( proto.MESSAGE, number=4, message="NodeConfig", ) - master_auth = proto.Field( + master_auth: "MasterAuth" = proto.Field( proto.MESSAGE, number=5, message="MasterAuth", ) - logging_service = proto.Field( + logging_service: str = proto.Field( proto.STRING, number=6, ) - monitoring_service = proto.Field( + monitoring_service: str = proto.Field( proto.STRING, number=7, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=8, ) - cluster_ipv4_cidr = proto.Field( + cluster_ipv4_cidr: str = proto.Field( proto.STRING, number=9, ) - addons_config = proto.Field( + addons_config: "AddonsConfig" = proto.Field( proto.MESSAGE, number=10, message="AddonsConfig", ) - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=11, ) - node_pools = proto.RepeatedField( + node_pools: MutableSequence["NodePool"] = proto.RepeatedField( proto.MESSAGE, number=12, message="NodePool", ) - locations = proto.RepeatedField( + locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=13, ) - enable_kubernetes_alpha = proto.Field( + enable_kubernetes_alpha: bool = proto.Field( proto.BOOL, number=14, ) - resource_labels = proto.MapField( + resource_labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=15, ) - label_fingerprint = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, number=16, ) - legacy_abac = proto.Field( + legacy_abac: "LegacyAbac" = proto.Field( proto.MESSAGE, number=18, message="LegacyAbac", ) - network_policy = proto.Field( + network_policy: "NetworkPolicy" = proto.Field( proto.MESSAGE, number=19, message="NetworkPolicy", ) - ip_allocation_policy = proto.Field( + ip_allocation_policy: "IPAllocationPolicy" = proto.Field( proto.MESSAGE, number=20, message="IPAllocationPolicy", ) - master_authorized_networks_config = proto.Field( + master_authorized_networks_config: "MasterAuthorizedNetworksConfig" = proto.Field( proto.MESSAGE, number=22, message="MasterAuthorizedNetworksConfig", ) - maintenance_policy = proto.Field( + maintenance_policy: "MaintenancePolicy" = proto.Field( proto.MESSAGE, number=23, message="MaintenancePolicy", ) - binary_authorization = proto.Field( + binary_authorization: "BinaryAuthorization" = proto.Field( proto.MESSAGE, number=24, message="BinaryAuthorization", ) - autoscaling = proto.Field( + autoscaling: "ClusterAutoscaling" = proto.Field( proto.MESSAGE, number=26, message="ClusterAutoscaling", ) - network_config = proto.Field( + network_config: "NetworkConfig" = proto.Field( proto.MESSAGE, number=27, message="NetworkConfig", ) - default_max_pods_constraint = proto.Field( + default_max_pods_constraint: "MaxPodsConstraint" = proto.Field( proto.MESSAGE, number=30, message="MaxPodsConstraint", ) - resource_usage_export_config = proto.Field( + resource_usage_export_config: "ResourceUsageExportConfig" = proto.Field( proto.MESSAGE, number=33, message="ResourceUsageExportConfig", ) - authenticator_groups_config = proto.Field( + authenticator_groups_config: "AuthenticatorGroupsConfig" = proto.Field( proto.MESSAGE, number=34, message="AuthenticatorGroupsConfig", ) - private_cluster_config = proto.Field( + private_cluster_config: "PrivateClusterConfig" = proto.Field( proto.MESSAGE, number=37, message="PrivateClusterConfig", ) - database_encryption = proto.Field( + database_encryption: "DatabaseEncryption" = proto.Field( proto.MESSAGE, number=38, message="DatabaseEncryption", ) - vertical_pod_autoscaling = proto.Field( + vertical_pod_autoscaling: "VerticalPodAutoscaling" = proto.Field( proto.MESSAGE, number=39, message="VerticalPodAutoscaling", ) - shielded_nodes = proto.Field( + shielded_nodes: "ShieldedNodes" = proto.Field( proto.MESSAGE, number=40, message="ShieldedNodes", ) - release_channel = proto.Field( + release_channel: "ReleaseChannel" = proto.Field( proto.MESSAGE, number=41, message="ReleaseChannel", ) - workload_identity_config = proto.Field( + workload_identity_config: "WorkloadIdentityConfig" = proto.Field( proto.MESSAGE, number=43, message="WorkloadIdentityConfig", ) - mesh_certificates = proto.Field( + mesh_certificates: "MeshCertificates" = proto.Field( proto.MESSAGE, number=67, message="MeshCertificates", ) - cost_management_config = proto.Field( + cost_management_config: "CostManagementConfig" = proto.Field( proto.MESSAGE, number=45, message="CostManagementConfig", ) - notification_config = proto.Field( + notification_config: "NotificationConfig" = proto.Field( proto.MESSAGE, number=49, message="NotificationConfig", ) - confidential_nodes = proto.Field( + confidential_nodes: "ConfidentialNodes" = proto.Field( proto.MESSAGE, number=50, message="ConfidentialNodes", ) - identity_service_config = proto.Field( + identity_service_config: "IdentityServiceConfig" = proto.Field( proto.MESSAGE, number=54, message="IdentityServiceConfig", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=100, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=101, ) - endpoint = proto.Field( + endpoint: str = proto.Field( proto.STRING, number=102, ) - initial_cluster_version = proto.Field( + initial_cluster_version: str = proto.Field( proto.STRING, number=103, ) - current_master_version = proto.Field( + current_master_version: str = proto.Field( proto.STRING, number=104, ) - current_node_version = proto.Field( + current_node_version: str = proto.Field( proto.STRING, number=105, ) - create_time = proto.Field( + create_time: str = proto.Field( proto.STRING, number=106, ) - status = proto.Field( + status: Status = proto.Field( proto.ENUM, number=107, enum=Status, ) - status_message = proto.Field( + status_message: str = proto.Field( proto.STRING, number=108, ) - node_ipv4_cidr_size = proto.Field( + node_ipv4_cidr_size: int = proto.Field( proto.INT32, number=109, ) - services_ipv4_cidr = proto.Field( + services_ipv4_cidr: str = proto.Field( proto.STRING, number=110, ) - instance_group_urls = proto.RepeatedField( + instance_group_urls: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=111, ) - current_node_count = proto.Field( + current_node_count: int = proto.Field( proto.INT32, number=112, ) - expire_time = proto.Field( + expire_time: str = proto.Field( proto.STRING, number=113, ) - location = proto.Field( + location: str = proto.Field( proto.STRING, number=114, ) - enable_tpu = proto.Field( + enable_tpu: bool = proto.Field( proto.BOOL, number=115, ) - tpu_ipv4_cidr_block = proto.Field( + tpu_ipv4_cidr_block: str = proto.Field( proto.STRING, number=116, ) - conditions = proto.RepeatedField( + conditions: MutableSequence["StatusCondition"] = proto.RepeatedField( proto.MESSAGE, number=118, message="StatusCondition", ) - autopilot = proto.Field( + autopilot: "Autopilot" = proto.Field( proto.MESSAGE, number=128, message="Autopilot", ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=129, ) - node_pool_defaults = proto.Field( + node_pool_defaults: "NodePoolDefaults" = proto.Field( proto.MESSAGE, number=131, optional=True, message="NodePoolDefaults", ) - logging_config = proto.Field( + logging_config: "LoggingConfig" = proto.Field( proto.MESSAGE, number=132, message="LoggingConfig", ) - monitoring_config = proto.Field( + monitoring_config: "MonitoringConfig" = proto.Field( proto.MESSAGE, number=133, message="MonitoringConfig", ) - node_pool_auto_config = proto.Field( + node_pool_auto_config: "NodePoolAutoConfig" = proto.Field( proto.MESSAGE, number=136, message="NodePoolAutoConfig", @@ -2333,7 +2408,7 @@ class NodePoolAutoConfig(proto.Message): RFC1035. """ - network_tags = proto.Field( + network_tags: "NetworkTags" = proto.Field( proto.MESSAGE, number=1, message="NetworkTags", @@ -2349,7 +2424,7 @@ class NodePoolDefaults(proto.Message): defaults. """ - node_config_defaults = proto.Field( + node_config_defaults: "NodeConfigDefaults" = proto.Field( proto.MESSAGE, number=1, message="NodeConfigDefaults", @@ -2367,12 +2442,12 @@ class NodeConfigDefaults(proto.Message): Logging configuration for node pools. """ - gcfs_config = proto.Field( + gcfs_config: "GcfsConfig" = proto.Field( proto.MESSAGE, number=1, message="GcfsConfig", ) - logging_config = proto.Field( + logging_config: "NodePoolLoggingConfig" = proto.Field( proto.MESSAGE, number=3, message="NodePoolLoggingConfig", @@ -2445,7 +2520,7 @@ class ClusterUpdate(proto.Message): desired_node_pool_id. If there is only one pool in the cluster and desired_node_pool_id is not provided then the change applies to that single node pool. - desired_locations (Sequence[str]): + desired_locations (MutableSequence[str]): The desired list of Google Compute Engine `zones `__ in which the cluster's nodes should be located. @@ -2516,6 +2591,11 @@ class ClusterUpdate(proto.Message): desired_service_external_ips_config (google.cloud.container_v1.types.ServiceExternalIPsConfig): ServiceExternalIPsConfig specifies the config for the use of Services with ExternalIPs field. + desired_enable_private_endpoint (bool): + Enable/Disable private endpoint for the + cluster's master. + + This field is a member of `oneof`_ ``_desired_enable_private_endpoint``. desired_master_version (str): The Kubernetes version to change the master to. @@ -2536,180 +2616,195 @@ class ClusterUpdate(proto.Message): auto-provisioned node pools in autopilot clusters and node auto-provisioning enabled clusters. + desired_gateway_api_config (google.cloud.container_v1.types.GatewayAPIConfig): + The desired config of Gateway API on this + cluster. desired_node_pool_logging_config (google.cloud.container_v1.types.NodePoolLoggingConfig): The desired node pool logging configuration defaults for the cluster. """ - desired_node_version = proto.Field( + desired_node_version: str = proto.Field( proto.STRING, number=4, ) - desired_monitoring_service = proto.Field( + desired_monitoring_service: str = proto.Field( proto.STRING, number=5, ) - desired_addons_config = proto.Field( + desired_addons_config: "AddonsConfig" = proto.Field( proto.MESSAGE, number=6, message="AddonsConfig", ) - desired_node_pool_id = proto.Field( + desired_node_pool_id: str = proto.Field( proto.STRING, number=7, ) - desired_image_type = proto.Field( + desired_image_type: str = proto.Field( proto.STRING, number=8, ) - desired_database_encryption = proto.Field( + desired_database_encryption: "DatabaseEncryption" = proto.Field( proto.MESSAGE, number=46, message="DatabaseEncryption", ) - desired_workload_identity_config = proto.Field( + desired_workload_identity_config: "WorkloadIdentityConfig" = proto.Field( proto.MESSAGE, number=47, message="WorkloadIdentityConfig", ) - desired_mesh_certificates = proto.Field( + desired_mesh_certificates: "MeshCertificates" = proto.Field( proto.MESSAGE, number=67, message="MeshCertificates", ) - desired_shielded_nodes = proto.Field( + desired_shielded_nodes: "ShieldedNodes" = proto.Field( proto.MESSAGE, number=48, message="ShieldedNodes", ) - desired_cost_management_config = proto.Field( + desired_cost_management_config: "CostManagementConfig" = proto.Field( proto.MESSAGE, number=49, message="CostManagementConfig", ) - desired_dns_config = proto.Field( + desired_dns_config: "DNSConfig" = proto.Field( proto.MESSAGE, number=53, message="DNSConfig", ) - desired_node_pool_autoscaling = proto.Field( + desired_node_pool_autoscaling: "NodePoolAutoscaling" = proto.Field( proto.MESSAGE, number=9, message="NodePoolAutoscaling", ) - desired_locations = proto.RepeatedField( + desired_locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=10, ) - desired_master_authorized_networks_config = proto.Field( - proto.MESSAGE, - number=12, - message="MasterAuthorizedNetworksConfig", + desired_master_authorized_networks_config: "MasterAuthorizedNetworksConfig" = ( + proto.Field( + proto.MESSAGE, + number=12, + message="MasterAuthorizedNetworksConfig", + ) ) - desired_cluster_autoscaling = proto.Field( + desired_cluster_autoscaling: "ClusterAutoscaling" = proto.Field( proto.MESSAGE, number=15, message="ClusterAutoscaling", ) - desired_binary_authorization = proto.Field( + desired_binary_authorization: "BinaryAuthorization" = proto.Field( proto.MESSAGE, number=16, message="BinaryAuthorization", ) - desired_logging_service = proto.Field( + desired_logging_service: str = proto.Field( proto.STRING, number=19, ) - desired_resource_usage_export_config = proto.Field( + desired_resource_usage_export_config: "ResourceUsageExportConfig" = proto.Field( proto.MESSAGE, number=21, message="ResourceUsageExportConfig", ) - desired_vertical_pod_autoscaling = proto.Field( + desired_vertical_pod_autoscaling: "VerticalPodAutoscaling" = proto.Field( proto.MESSAGE, number=22, message="VerticalPodAutoscaling", ) - desired_private_cluster_config = proto.Field( + desired_private_cluster_config: "PrivateClusterConfig" = proto.Field( proto.MESSAGE, number=25, message="PrivateClusterConfig", ) - desired_intra_node_visibility_config = proto.Field( + desired_intra_node_visibility_config: "IntraNodeVisibilityConfig" = proto.Field( proto.MESSAGE, number=26, message="IntraNodeVisibilityConfig", ) - desired_default_snat_status = proto.Field( + desired_default_snat_status: "DefaultSnatStatus" = proto.Field( proto.MESSAGE, number=28, message="DefaultSnatStatus", ) - desired_release_channel = proto.Field( + desired_release_channel: "ReleaseChannel" = proto.Field( proto.MESSAGE, number=31, message="ReleaseChannel", ) - desired_l4ilb_subsetting_config = proto.Field( + desired_l4ilb_subsetting_config: "ILBSubsettingConfig" = proto.Field( proto.MESSAGE, number=39, message="ILBSubsettingConfig", ) - desired_datapath_provider = proto.Field( + desired_datapath_provider: "DatapathProvider" = proto.Field( proto.ENUM, number=50, enum="DatapathProvider", ) - desired_private_ipv6_google_access = proto.Field( + desired_private_ipv6_google_access: "PrivateIPv6GoogleAccess" = proto.Field( proto.ENUM, number=51, enum="PrivateIPv6GoogleAccess", ) - desired_notification_config = proto.Field( + desired_notification_config: "NotificationConfig" = proto.Field( proto.MESSAGE, number=55, message="NotificationConfig", ) - desired_authenticator_groups_config = proto.Field( + desired_authenticator_groups_config: "AuthenticatorGroupsConfig" = proto.Field( proto.MESSAGE, number=63, message="AuthenticatorGroupsConfig", ) - desired_logging_config = proto.Field( + desired_logging_config: "LoggingConfig" = proto.Field( proto.MESSAGE, number=64, message="LoggingConfig", ) - desired_monitoring_config = proto.Field( + desired_monitoring_config: "MonitoringConfig" = proto.Field( proto.MESSAGE, number=65, message="MonitoringConfig", ) - desired_identity_service_config = proto.Field( + desired_identity_service_config: "IdentityServiceConfig" = proto.Field( proto.MESSAGE, number=66, message="IdentityServiceConfig", ) - desired_service_external_ips_config = proto.Field( + desired_service_external_ips_config: "ServiceExternalIPsConfig" = proto.Field( proto.MESSAGE, number=60, message="ServiceExternalIPsConfig", ) - desired_master_version = proto.Field( + desired_enable_private_endpoint: bool = proto.Field( + proto.BOOL, + number=71, + optional=True, + ) + desired_master_version: str = proto.Field( proto.STRING, number=100, ) - desired_gcfs_config = proto.Field( + desired_gcfs_config: "GcfsConfig" = proto.Field( proto.MESSAGE, number=109, message="GcfsConfig", ) - desired_node_pool_auto_config_network_tags = proto.Field( + desired_node_pool_auto_config_network_tags: "NetworkTags" = proto.Field( proto.MESSAGE, number=110, message="NetworkTags", ) - desired_node_pool_logging_config = proto.Field( + desired_gateway_api_config: "GatewayAPIConfig" = proto.Field( + proto.MESSAGE, + number=114, + message="GatewayAPIConfig", + ) + desired_node_pool_logging_config: "NodePoolLoggingConfig" = proto.Field( proto.MESSAGE, number=116, message="NodePoolLoggingConfig", @@ -2761,10 +2856,10 @@ class Operation(proto.Message): progress (google.cloud.container_v1.types.OperationProgress): Output only. [Output only] Progress information for an operation. - cluster_conditions (Sequence[google.cloud.container_v1.types.StatusCondition]): + cluster_conditions (MutableSequence[google.cloud.container_v1.types.StatusCondition]): Which conditions caused the current cluster state. Deprecated. Use field error instead. - nodepool_conditions (Sequence[google.cloud.container_v1.types.StatusCondition]): + nodepool_conditions (MutableSequence[google.cloud.container_v1.types.StatusCondition]): Which conditions caused the current node pool state. Deprecated. Use field error instead. error (google.rpc.status_pb2.Status): @@ -2800,68 +2895,68 @@ class Type(proto.Enum): SET_NETWORK_POLICY = 15 SET_MAINTENANCE_POLICY = 16 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - operation_type = proto.Field( + operation_type: Type = proto.Field( proto.ENUM, number=3, enum=Type, ) - status = proto.Field( + status: Status = proto.Field( proto.ENUM, number=4, enum=Status, ) - detail = proto.Field( + detail: str = proto.Field( proto.STRING, number=8, ) - status_message = proto.Field( + status_message: str = proto.Field( proto.STRING, number=5, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=6, ) - target_link = proto.Field( + target_link: str = proto.Field( proto.STRING, number=7, ) - location = proto.Field( + location: str = proto.Field( proto.STRING, number=9, ) - start_time = proto.Field( + start_time: str = proto.Field( proto.STRING, number=10, ) - end_time = proto.Field( + end_time: str = proto.Field( proto.STRING, number=11, ) - progress = proto.Field( + progress: "OperationProgress" = proto.Field( proto.MESSAGE, number=12, message="OperationProgress", ) - cluster_conditions = proto.RepeatedField( + cluster_conditions: MutableSequence["StatusCondition"] = proto.RepeatedField( proto.MESSAGE, number=13, message="StatusCondition", ) - nodepool_conditions = proto.RepeatedField( + nodepool_conditions: MutableSequence["StatusCondition"] = proto.RepeatedField( proto.MESSAGE, number=14, message="StatusCondition", ) - error = proto.Field( + error: status_pb2.Status = proto.Field( proto.MESSAGE, number=15, message=status_pb2.Status, @@ -2879,12 +2974,12 @@ class OperationProgress(proto.Message): status (google.cloud.container_v1.types.Operation.Status): Status of an operation stage. Unset for single-stage operations. - metrics (Sequence[google.cloud.container_v1.types.OperationProgress.Metric]): + metrics (MutableSequence[google.cloud.container_v1.types.OperationProgress.Metric]): Progress metric bundle, for example: metrics: [{name: "nodes done", int_value: 15}, {name: "nodes total", int_value: 32}] or metrics: [{name: "progress", double_value: 0.56}, {name: "progress scale", double_value: 1.0}] - stages (Sequence[google.cloud.container_v1.types.OperationProgress]): + stages (MutableSequence[google.cloud.container_v1.types.OperationProgress]): Substages of an operation or a stage. """ @@ -2917,41 +3012,41 @@ class Metric(proto.Message): This field is a member of `oneof`_ ``value``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - int_value = proto.Field( + int_value: int = proto.Field( proto.INT64, number=2, oneof="value", ) - double_value = proto.Field( + double_value: float = proto.Field( proto.DOUBLE, number=3, oneof="value", ) - string_value = proto.Field( + string_value: str = proto.Field( proto.STRING, number=4, oneof="value", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - status = proto.Field( + status: "Operation.Status" = proto.Field( proto.ENUM, number=2, enum="Operation.Status", ) - metrics = proto.RepeatedField( + metrics: MutableSequence[Metric] = proto.RepeatedField( proto.MESSAGE, number=3, message=Metric, ) - stages = proto.RepeatedField( + stages: MutableSequence["OperationProgress"] = proto.RepeatedField( proto.MESSAGE, number=4, message="OperationProgress", @@ -2981,20 +3076,20 @@ class CreateClusterRequest(proto.Message): created. Specified in the format ``projects/*/locations/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster = proto.Field( + cluster: "Cluster" = proto.Field( proto.MESSAGE, number=3, message="Cluster", ) - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=5, ) @@ -3025,19 +3120,19 @@ class GetClusterRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=5, ) @@ -3070,24 +3165,24 @@ class UpdateClusterRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - update = proto.Field( + update: "ClusterUpdate" = proto.Field( proto.MESSAGE, number=4, message="ClusterUpdate", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=5, ) @@ -3138,7 +3233,7 @@ class UpdateNodePoolRequest(proto.Message): The name (project, location, cluster, node pool) of the node pool to update. Specified in the format ``projects/*/locations/*/clusters/*/nodePools/*``. - locations (Sequence[str]): + locations (MutableSequence[str]): The desired list of Google Compute Engine `zones `__ in which the node pool's nodes should be located. Changing @@ -3183,100 +3278,109 @@ class UpdateNodePoolRequest(proto.Message): Enable or disable gvnic on the node pool. logging_config (google.cloud.container_v1.types.NodePoolLoggingConfig): Logging configuration. + resource_labels (google.cloud.container_v1.types.ResourceLabels): + The resource labels for the node pool to use + to annotate any related Google Compute Engine + resources. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - node_pool_id = proto.Field( + node_pool_id: str = proto.Field( proto.STRING, number=4, ) - node_version = proto.Field( + node_version: str = proto.Field( proto.STRING, number=5, ) - image_type = proto.Field( + image_type: str = proto.Field( proto.STRING, number=6, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=8, ) - locations = proto.RepeatedField( + locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=13, ) - workload_metadata_config = proto.Field( + workload_metadata_config: "WorkloadMetadataConfig" = proto.Field( proto.MESSAGE, number=14, message="WorkloadMetadataConfig", ) - upgrade_settings = proto.Field( + upgrade_settings: "NodePool.UpgradeSettings" = proto.Field( proto.MESSAGE, number=15, message="NodePool.UpgradeSettings", ) - tags = proto.Field( + tags: "NetworkTags" = proto.Field( proto.MESSAGE, number=16, message="NetworkTags", ) - taints = proto.Field( + taints: "NodeTaints" = proto.Field( proto.MESSAGE, number=17, message="NodeTaints", ) - labels = proto.Field( + labels: "NodeLabels" = proto.Field( proto.MESSAGE, number=18, message="NodeLabels", ) - linux_node_config = proto.Field( + linux_node_config: "LinuxNodeConfig" = proto.Field( proto.MESSAGE, number=19, message="LinuxNodeConfig", ) - kubelet_config = proto.Field( + kubelet_config: "NodeKubeletConfig" = proto.Field( proto.MESSAGE, number=20, message="NodeKubeletConfig", ) - node_network_config = proto.Field( + node_network_config: "NodeNetworkConfig" = proto.Field( proto.MESSAGE, number=21, message="NodeNetworkConfig", ) - gcfs_config = proto.Field( + gcfs_config: "GcfsConfig" = proto.Field( proto.MESSAGE, number=22, message="GcfsConfig", ) - confidential_nodes = proto.Field( + confidential_nodes: "ConfidentialNodes" = proto.Field( proto.MESSAGE, number=23, message="ConfidentialNodes", ) - gvnic = proto.Field( + gvnic: "VirtualNIC" = proto.Field( proto.MESSAGE, number=29, message="VirtualNIC", ) - logging_config = proto.Field( + logging_config: "NodePoolLoggingConfig" = proto.Field( proto.MESSAGE, number=32, message="NodePoolLoggingConfig", ) + resource_labels: "ResourceLabels" = proto.Field( + proto.MESSAGE, + number=33, + message="ResourceLabels", + ) class SetNodePoolAutoscalingRequest(proto.Message): @@ -3312,28 +3416,28 @@ class SetNodePoolAutoscalingRequest(proto.Message): ``projects/*/locations/*/clusters/*/nodePools/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - node_pool_id = proto.Field( + node_pool_id: str = proto.Field( proto.STRING, number=4, ) - autoscaling = proto.Field( + autoscaling: "NodePoolAutoscaling" = proto.Field( proto.MESSAGE, number=5, message="NodePoolAutoscaling", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) @@ -3379,23 +3483,23 @@ class SetLoggingServiceRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - logging_service = proto.Field( + logging_service: str = proto.Field( proto.STRING, number=4, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=5, ) @@ -3442,23 +3546,23 @@ class SetMonitoringServiceRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - monitoring_service = proto.Field( + monitoring_service: str = proto.Field( proto.STRING, number=4, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) @@ -3493,24 +3597,24 @@ class SetAddonsConfigRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - addons_config = proto.Field( + addons_config: "AddonsConfig" = proto.Field( proto.MESSAGE, number=4, message="AddonsConfig", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) @@ -3535,7 +3639,7 @@ class SetLocationsRequest(proto.Message): Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. - locations (Sequence[str]): + locations (MutableSequence[str]): Required. The desired list of Google Compute Engine `zones `__ in which the cluster's nodes should be located. Changing the @@ -3550,23 +3654,23 @@ class SetLocationsRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - locations = proto.RepeatedField( + locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=4, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) @@ -3610,23 +3714,23 @@ class UpdateMasterRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - master_version = proto.Field( + master_version: str = proto.Field( proto.STRING, number=4, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=7, ) @@ -3669,29 +3773,29 @@ class Action(proto.Enum): GENERATE_PASSWORD = 2 SET_USERNAME = 3 - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - action = proto.Field( + action: Action = proto.Field( proto.ENUM, number=4, enum=Action, ) - update = proto.Field( + update: "MasterAuth" = proto.Field( proto.MESSAGE, number=5, message="MasterAuth", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=7, ) @@ -3722,19 +3826,19 @@ class DeleteClusterRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=4, ) @@ -3761,15 +3865,15 @@ class ListClustersRequest(proto.Message): Location "-" matches all zones and all regions. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=4, ) @@ -3779,20 +3883,20 @@ class ListClustersResponse(proto.Message): r"""ListClustersResponse is the result of ListClustersRequest. Attributes: - clusters (Sequence[google.cloud.container_v1.types.Cluster]): + clusters (MutableSequence[google.cloud.container_v1.types.Cluster]): A list of clusters in the project in the specified zone, or across all ones. - missing_zones (Sequence[str]): + missing_zones (MutableSequence[str]): If any zones are listed here, the list of clusters returned may be missing those zones. """ - clusters = proto.RepeatedField( + clusters: MutableSequence["Cluster"] = proto.RepeatedField( proto.MESSAGE, number=1, message="Cluster", ) - missing_zones = proto.RepeatedField( + missing_zones: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=2, ) @@ -3823,19 +3927,19 @@ class GetOperationRequest(proto.Message): ``projects/*/locations/*/operations/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - operation_id = proto.Field( + operation_id: str = proto.Field( proto.STRING, number=3, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=5, ) @@ -3863,15 +3967,15 @@ class ListOperationsRequest(proto.Message): and all regions. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=4, ) @@ -3902,19 +4006,19 @@ class CancelOperationRequest(proto.Message): ``projects/*/locations/*/operations/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - operation_id = proto.Field( + operation_id: str = proto.Field( proto.STRING, number=3, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=4, ) @@ -3925,21 +4029,21 @@ class ListOperationsResponse(proto.Message): ListOperationsRequest. Attributes: - operations (Sequence[google.cloud.container_v1.types.Operation]): + operations (MutableSequence[google.cloud.container_v1.types.Operation]): A list of operations in the project in the specified zone. - missing_zones (Sequence[str]): + missing_zones (MutableSequence[str]): If any zones are listed here, the list of operations returned may be missing the operations from those zones. """ - operations = proto.RepeatedField( + operations: MutableSequence["Operation"] = proto.RepeatedField( proto.MESSAGE, number=1, message="Operation", ) - missing_zones = proto.RepeatedField( + missing_zones: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=2, ) @@ -3965,15 +4069,15 @@ class GetServerConfigRequest(proto.Message): specified in the format ``projects/*/locations/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=4, ) @@ -3986,17 +4090,17 @@ class ServerConfig(proto.Message): default_cluster_version (str): Version of Kubernetes the service deploys by default. - valid_node_versions (Sequence[str]): + valid_node_versions (MutableSequence[str]): List of valid node upgrade target versions, in descending order. default_image_type (str): Default image type. - valid_image_types (Sequence[str]): + valid_image_types (MutableSequence[str]): List of valid image types. - valid_master_versions (Sequence[str]): + valid_master_versions (MutableSequence[str]): List of valid master versions, in descending order. - channels (Sequence[google.cloud.container_v1.types.ServerConfig.ReleaseChannelConfig]): + channels (MutableSequence[google.cloud.container_v1.types.ServerConfig.ReleaseChannelConfig]): List of release channel configurations. """ @@ -4011,45 +4115,45 @@ class ReleaseChannelConfig(proto.Message): default_version (str): The default version for newly created clusters on the channel. - valid_versions (Sequence[str]): + valid_versions (MutableSequence[str]): List of valid versions for the channel. """ - channel = proto.Field( + channel: "ReleaseChannel.Channel" = proto.Field( proto.ENUM, number=1, enum="ReleaseChannel.Channel", ) - default_version = proto.Field( + default_version: str = proto.Field( proto.STRING, number=2, ) - valid_versions = proto.RepeatedField( + valid_versions: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=4, ) - default_cluster_version = proto.Field( + default_cluster_version: str = proto.Field( proto.STRING, number=1, ) - valid_node_versions = proto.RepeatedField( + valid_node_versions: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) - default_image_type = proto.Field( + default_image_type: str = proto.Field( proto.STRING, number=4, ) - valid_image_types = proto.RepeatedField( + valid_image_types: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=5, ) - valid_master_versions = proto.RepeatedField( + valid_master_versions: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=6, ) - channels = proto.RepeatedField( + channels: MutableSequence[ReleaseChannelConfig] = proto.RepeatedField( proto.MESSAGE, number=9, message=ReleaseChannelConfig, @@ -4083,24 +4187,24 @@ class CreateNodePoolRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - node_pool = proto.Field( + node_pool: "NodePool" = proto.Field( proto.MESSAGE, number=4, message="NodePool", ) - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=6, ) @@ -4135,23 +4239,23 @@ class DeleteNodePoolRequest(proto.Message): ``projects/*/locations/*/clusters/*/nodePools/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - node_pool_id = proto.Field( + node_pool_id: str = proto.Field( proto.STRING, number=4, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) @@ -4182,19 +4286,19 @@ class ListNodePoolsRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=5, ) @@ -4229,23 +4333,23 @@ class GetNodePoolRequest(proto.Message): ``projects/*/locations/*/clusters/*/nodePools/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - node_pool_id = proto.Field( + node_pool_id: str = proto.Field( proto.STRING, number=4, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) @@ -4280,7 +4384,7 @@ class StandardRolloutPolicy(proto.Message): Attributes: batch_percentage (float): - Percentage of the bool pool nodes to drain in a batch. The + Percentage of the blue pool nodes to drain in a batch. The range of this field should be (0.0, 1.0]. This field is a member of `oneof`_ ``update_batch_size``. @@ -4295,30 +4399,30 @@ class StandardRolloutPolicy(proto.Message): This field is a member of `oneof`_ ``_batch_soak_duration``. """ - batch_percentage = proto.Field( + batch_percentage: float = proto.Field( proto.FLOAT, number=1, oneof="update_batch_size", ) - batch_node_count = proto.Field( + batch_node_count: int = proto.Field( proto.INT32, number=2, oneof="update_batch_size", ) - batch_soak_duration = proto.Field( + batch_soak_duration: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=3, optional=True, message=duration_pb2.Duration, ) - standard_rollout_policy = proto.Field( + standard_rollout_policy: StandardRolloutPolicy = proto.Field( proto.MESSAGE, number=1, oneof="rollout_policy", message=StandardRolloutPolicy, ) - node_pool_soak_duration = proto.Field( + node_pool_soak_duration: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=2, optional=True, @@ -4346,7 +4450,7 @@ class NodePool(proto.Message): quota `__ is sufficient for this number of instances. You must also have available firewall and routes quota. - locations (Sequence[str]): + locations (MutableSequence[str]): The list of Google Compute Engine `zones `__ in which the NodePool's nodes should be located. @@ -4365,7 +4469,7 @@ class NodePool(proto.Message): [Output only] Server-defined URL for the resource. version (str): The version of the Kubernetes of this node. - instance_group_urls (Sequence[str]): + instance_group_urls (MutableSequence[str]): [Output only] The resource URLs of the `managed instance groups `__ associated with this node pool. During the node pool @@ -4388,7 +4492,7 @@ class NodePool(proto.Message): The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. - conditions (Sequence[google.cloud.container_v1.types.StatusCondition]): + conditions (MutableSequence[google.cloud.container_v1.types.StatusCondition]): Which conditions caused the current node pool state. pod_ipv4_cidr_size (int): @@ -4397,6 +4501,8 @@ class NodePool(proto.Message): upgrade_settings (google.cloud.container_v1.types.NodePool.UpgradeSettings): Upgrade settings control disruption and speed of the upgrade. + placement_policy (google.cloud.container_v1.types.NodePool.PlacementPolicy): + Specifies the node placement policy. update_info (google.cloud.container_v1.types.NodePool.UpdateInfo): Output only. [Output only] Update info contains relevant information during a node pool update. @@ -4485,21 +4591,21 @@ class UpgradeSettings(proto.Message): This field is a member of `oneof`_ ``_blue_green_settings``. """ - max_surge = proto.Field( + max_surge: int = proto.Field( proto.INT32, number=1, ) - max_unavailable = proto.Field( + max_unavailable: int = proto.Field( proto.INT32, number=2, ) - strategy = proto.Field( + strategy: "NodePoolUpdateStrategy" = proto.Field( proto.ENUM, number=3, optional=True, enum="NodePoolUpdateStrategy", ) - blue_green_settings = proto.Field( + blue_green_settings: "BlueGreenSettings" = proto.Field( proto.MESSAGE, number=4, optional=True, @@ -4522,11 +4628,11 @@ class BlueGreenInfo(proto.Message): Attributes: phase (google.cloud.container_v1.types.NodePool.UpdateInfo.BlueGreenInfo.Phase): Current blue-green upgrade phase. - blue_instance_group_urls (Sequence[str]): + blue_instance_group_urls (MutableSequence[str]): The resource URLs of the [managed instance groups] (/compute/docs/instance-groups/creating-groups-of-managed-instances) associated with blue pool. - green_instance_group_urls (Sequence[str]): + green_instance_group_urls (MutableSequence[str]): The resource URLs of the [managed instance groups] (/compute/docs/instance-groups/creating-groups-of-managed-instances) associated with green pool. @@ -4552,107 +4658,132 @@ class Phase(proto.Enum): DELETING_BLUE_POOL = 6 ROLLBACK_STARTED = 7 - phase = proto.Field( + phase: "NodePool.UpdateInfo.BlueGreenInfo.Phase" = proto.Field( proto.ENUM, number=1, enum="NodePool.UpdateInfo.BlueGreenInfo.Phase", ) - blue_instance_group_urls = proto.RepeatedField( + blue_instance_group_urls: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=2, ) - green_instance_group_urls = proto.RepeatedField( + green_instance_group_urls: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) - blue_pool_deletion_start_time = proto.Field( + blue_pool_deletion_start_time: str = proto.Field( proto.STRING, number=4, ) - green_pool_version = proto.Field( + green_pool_version: str = proto.Field( proto.STRING, number=5, ) - blue_green_info = proto.Field( + blue_green_info: "NodePool.UpdateInfo.BlueGreenInfo" = proto.Field( proto.MESSAGE, number=1, message="NodePool.UpdateInfo.BlueGreenInfo", ) - name = proto.Field( + class PlacementPolicy(proto.Message): + r"""PlacementPolicy defines the placement policy used by the node + pool. + + Attributes: + type_ (google.cloud.container_v1.types.NodePool.PlacementPolicy.Type): + The type of placement. + """ + + class Type(proto.Enum): + r"""Type defines the type of placement policy.""" + TYPE_UNSPECIFIED = 0 + COMPACT = 1 + + type_: "NodePool.PlacementPolicy.Type" = proto.Field( + proto.ENUM, + number=1, + enum="NodePool.PlacementPolicy.Type", + ) + + name: str = proto.Field( proto.STRING, number=1, ) - config = proto.Field( + config: "NodeConfig" = proto.Field( proto.MESSAGE, number=2, message="NodeConfig", ) - initial_node_count = proto.Field( + initial_node_count: int = proto.Field( proto.INT32, number=3, ) - locations = proto.RepeatedField( + locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=13, ) - network_config = proto.Field( + network_config: "NodeNetworkConfig" = proto.Field( proto.MESSAGE, number=14, message="NodeNetworkConfig", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=100, ) - version = proto.Field( + version: str = proto.Field( proto.STRING, number=101, ) - instance_group_urls = proto.RepeatedField( + instance_group_urls: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=102, ) - status = proto.Field( + status: Status = proto.Field( proto.ENUM, number=103, enum=Status, ) - status_message = proto.Field( + status_message: str = proto.Field( proto.STRING, number=104, ) - autoscaling = proto.Field( + autoscaling: "NodePoolAutoscaling" = proto.Field( proto.MESSAGE, number=4, message="NodePoolAutoscaling", ) - management = proto.Field( + management: "NodeManagement" = proto.Field( proto.MESSAGE, number=5, message="NodeManagement", ) - max_pods_constraint = proto.Field( + max_pods_constraint: "MaxPodsConstraint" = proto.Field( proto.MESSAGE, number=6, message="MaxPodsConstraint", ) - conditions = proto.RepeatedField( + conditions: MutableSequence["StatusCondition"] = proto.RepeatedField( proto.MESSAGE, number=105, message="StatusCondition", ) - pod_ipv4_cidr_size = proto.Field( + pod_ipv4_cidr_size: int = proto.Field( proto.INT32, number=7, ) - upgrade_settings = proto.Field( + upgrade_settings: UpgradeSettings = proto.Field( proto.MESSAGE, number=107, message=UpgradeSettings, ) - update_info = proto.Field( + placement_policy: PlacementPolicy = proto.Field( + proto.MESSAGE, + number=108, + message=PlacementPolicy, + ) + update_info: UpdateInfo = proto.Field( proto.MESSAGE, number=109, message=UpdateInfo, @@ -4682,15 +4813,15 @@ class NodeManagement(proto.Message): pool. """ - auto_upgrade = proto.Field( + auto_upgrade: bool = proto.Field( proto.BOOL, number=1, ) - auto_repair = proto.Field( + auto_repair: bool = proto.Field( proto.BOOL, number=2, ) - upgrade_options = proto.Field( + upgrade_options: "AutoUpgradeOptions" = proto.Field( proto.MESSAGE, number=10, message="AutoUpgradeOptions", @@ -4712,11 +4843,11 @@ class AutoUpgradeOptions(proto.Message): commence with the description of the upgrade. """ - auto_upgrade_start_time = proto.Field( + auto_upgrade_start_time: str = proto.Field( proto.STRING, number=1, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=2, ) @@ -4740,12 +4871,12 @@ class MaintenancePolicy(proto.Message): policy. """ - window = proto.Field( + window: "MaintenanceWindow" = proto.Field( proto.MESSAGE, number=1, message="MaintenanceWindow", ) - resource_version = proto.Field( + resource_version: str = proto.Field( proto.STRING, number=3, ) @@ -4776,25 +4907,25 @@ class MaintenanceWindow(proto.Message): occur at any time. This field is a member of `oneof`_ ``policy``. - maintenance_exclusions (Mapping[str, google.cloud.container_v1.types.TimeWindow]): + maintenance_exclusions (MutableMapping[str, google.cloud.container_v1.types.TimeWindow]): Exceptions to maintenance window. Non-emergency maintenance should not occur in these windows. """ - daily_maintenance_window = proto.Field( + daily_maintenance_window: "DailyMaintenanceWindow" = proto.Field( proto.MESSAGE, number=2, oneof="policy", message="DailyMaintenanceWindow", ) - recurring_window = proto.Field( + recurring_window: "RecurringTimeWindow" = proto.Field( proto.MESSAGE, number=3, oneof="policy", message="RecurringTimeWindow", ) - maintenance_exclusions = proto.MapField( + maintenance_exclusions: MutableMapping[str, "TimeWindow"] = proto.MapField( proto.STRING, proto.MESSAGE, number=4, @@ -4820,18 +4951,18 @@ class TimeWindow(proto.Message): should take place after the start time. """ - maintenance_exclusion_options = proto.Field( + maintenance_exclusion_options: "MaintenanceExclusionOptions" = proto.Field( proto.MESSAGE, number=3, oneof="options", message="MaintenanceExclusionOptions", ) - start_time = proto.Field( + start_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp, ) - end_time = proto.Field( + end_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp, @@ -4853,7 +4984,7 @@ class Scope(proto.Enum): NO_MINOR_UPGRADES = 1 NO_MINOR_OR_NODE_UPGRADES = 2 - scope = proto.Field( + scope: Scope = proto.Field( proto.ENUM, number=1, enum=Scope, @@ -4907,12 +5038,12 @@ class RecurringTimeWindow(proto.Message): SECONDLY are not supported. """ - window = proto.Field( + window: "TimeWindow" = proto.Field( proto.MESSAGE, number=1, message="TimeWindow", ) - recurrence = proto.Field( + recurrence: str = proto.Field( proto.STRING, number=2, ) @@ -4935,11 +5066,11 @@ class DailyMaintenanceWindow(proto.Message): "PTnHnMnS". """ - start_time = proto.Field( + start_time: str = proto.Field( proto.STRING, number=2, ) - duration = proto.Field( + duration: str = proto.Field( proto.STRING, number=3, ) @@ -4978,28 +5109,28 @@ class SetNodePoolManagementRequest(proto.Message): format ``projects/*/locations/*/clusters/*/nodePools/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - node_pool_id = proto.Field( + node_pool_id: str = proto.Field( proto.STRING, number=4, ) - management = proto.Field( + management: "NodeManagement" = proto.Field( proto.MESSAGE, number=5, message="NodeManagement", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=7, ) @@ -5037,27 +5168,27 @@ class SetNodePoolSizeRequest(proto.Message): ``projects/*/locations/*/clusters/*/nodePools/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - node_pool_id = proto.Field( + node_pool_id: str = proto.Field( proto.STRING, number=4, ) - node_count = proto.Field( + node_count: int = proto.Field( proto.INT32, number=5, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=7, ) @@ -5074,7 +5205,7 @@ class CompleteNodePoolUpgradeRequest(proto.Message): ``projects/*/locations/*/clusters/*/nodePools/*``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -5114,27 +5245,27 @@ class RollbackNodePoolUpgradeRequest(proto.Message): PodDisruptionBudget. Default value is false. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - node_pool_id = proto.Field( + node_pool_id: str = proto.Field( proto.STRING, number=4, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) - respect_pdb = proto.Field( + respect_pdb: bool = proto.Field( proto.BOOL, number=7, ) @@ -5144,11 +5275,11 @@ class ListNodePoolsResponse(proto.Message): r"""ListNodePoolsResponse is the result of ListNodePoolsRequest. Attributes: - node_pools (Sequence[google.cloud.container_v1.types.NodePool]): + node_pools (MutableSequence[google.cloud.container_v1.types.NodePool]): A list of node pools for a cluster. """ - node_pools = proto.RepeatedField( + node_pools: MutableSequence["NodePool"] = proto.RepeatedField( proto.MESSAGE, number=1, message="NodePool", @@ -5165,7 +5296,7 @@ class ClusterAutoscaling(proto.Message): enable_node_autoprovisioning (bool): Enables automatic node pool creation and deletion. - resource_limits (Sequence[google.cloud.container_v1.types.ResourceLimit]): + resource_limits (MutableSequence[google.cloud.container_v1.types.ResourceLimit]): Contains global constraints regarding minimum and maximum amount of resources in the cluster. autoscaling_profile (google.cloud.container_v1.types.ClusterAutoscaling.AutoscalingProfile): @@ -5173,7 +5304,7 @@ class ClusterAutoscaling(proto.Message): autoprovisioning_node_pool_defaults (google.cloud.container_v1.types.AutoprovisioningNodePoolDefaults): AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP. - autoprovisioning_locations (Sequence[str]): + autoprovisioning_locations (MutableSequence[str]): The list of Google Compute Engine `zones `__ in which the NodePool's nodes can be created by NAP. @@ -5185,26 +5316,28 @@ class AutoscalingProfile(proto.Enum): OPTIMIZE_UTILIZATION = 1 BALANCED = 2 - enable_node_autoprovisioning = proto.Field( + enable_node_autoprovisioning: bool = proto.Field( proto.BOOL, number=1, ) - resource_limits = proto.RepeatedField( + resource_limits: MutableSequence["ResourceLimit"] = proto.RepeatedField( proto.MESSAGE, number=2, message="ResourceLimit", ) - autoscaling_profile = proto.Field( + autoscaling_profile: AutoscalingProfile = proto.Field( proto.ENUM, number=3, enum=AutoscalingProfile, ) - autoprovisioning_node_pool_defaults = proto.Field( - proto.MESSAGE, - number=4, - message="AutoprovisioningNodePoolDefaults", + autoprovisioning_node_pool_defaults: "AutoprovisioningNodePoolDefaults" = ( + proto.Field( + proto.MESSAGE, + number=4, + message="AutoprovisioningNodePoolDefaults", + ) ) - autoprovisioning_locations = proto.RepeatedField( + autoprovisioning_locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=5, ) @@ -5215,7 +5348,7 @@ class AutoprovisioningNodePoolDefaults(proto.Message): pool created by NAP. Attributes: - oauth_scopes (Sequence[str]): + oauth_scopes (MutableSequence[str]): Scopes that are used by NAP when creating node pools. service_account (str): @@ -5265,46 +5398,46 @@ class AutoprovisioningNodePoolDefaults(proto.Message): The image type to use for NAP created node. """ - oauth_scopes = proto.RepeatedField( + oauth_scopes: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=1, ) - service_account = proto.Field( + service_account: str = proto.Field( proto.STRING, number=2, ) - upgrade_settings = proto.Field( + upgrade_settings: "NodePool.UpgradeSettings" = proto.Field( proto.MESSAGE, number=3, message="NodePool.UpgradeSettings", ) - management = proto.Field( + management: "NodeManagement" = proto.Field( proto.MESSAGE, number=4, message="NodeManagement", ) - min_cpu_platform = proto.Field( + min_cpu_platform: str = proto.Field( proto.STRING, number=5, ) - disk_size_gb = proto.Field( + disk_size_gb: int = proto.Field( proto.INT32, number=6, ) - disk_type = proto.Field( + disk_type: str = proto.Field( proto.STRING, number=7, ) - shielded_instance_config = proto.Field( + shielded_instance_config: "ShieldedInstanceConfig" = proto.Field( proto.MESSAGE, number=8, message="ShieldedInstanceConfig", ) - boot_disk_kms_key = proto.Field( + boot_disk_kms_key: str = proto.Field( proto.STRING, number=9, ) - image_type = proto.Field( + image_type: str = proto.Field( proto.STRING, number=10, ) @@ -5326,15 +5459,15 @@ class ResourceLimit(proto.Message): cluster. """ - resource_type = proto.Field( + resource_type: str = proto.Field( proto.STRING, number=1, ) - minimum = proto.Field( + minimum: int = proto.Field( proto.INT64, number=2, ) - maximum = proto.Field( + maximum: int = proto.Field( proto.INT64, number=3, ) @@ -5380,32 +5513,32 @@ class LocationPolicy(proto.Enum): BALANCED = 1 ANY = 2 - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) - min_node_count = proto.Field( + min_node_count: int = proto.Field( proto.INT32, number=2, ) - max_node_count = proto.Field( + max_node_count: int = proto.Field( proto.INT32, number=3, ) - autoprovisioned = proto.Field( + autoprovisioned: bool = proto.Field( proto.BOOL, number=4, ) - location_policy = proto.Field( + location_policy: LocationPolicy = proto.Field( proto.ENUM, number=5, enum=LocationPolicy, ) - total_min_node_count = proto.Field( + total_min_node_count: int = proto.Field( proto.INT32, number=6, ) - total_max_node_count = proto.Field( + total_max_node_count: int = proto.Field( proto.INT32, number=7, ) @@ -5432,7 +5565,7 @@ class SetLabelsRequest(proto.Message): Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. - resource_labels (Mapping[str, str]): + resource_labels (MutableMapping[str, str]): Required. The labels to set for that cluster. label_fingerprint (str): Required. The fingerprint of the previous set of labels for @@ -5448,28 +5581,28 @@ class SetLabelsRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - resource_labels = proto.MapField( + resource_labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=4, ) - label_fingerprint = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, number=5, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=7, ) @@ -5504,23 +5637,23 @@ class SetLegacyAbacRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=4, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) @@ -5556,23 +5689,23 @@ class StartIPRotationRequest(proto.Message): rotation. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) - rotate_credentials = proto.Field( + rotate_credentials: bool = proto.Field( proto.BOOL, number=7, ) @@ -5604,19 +5737,19 @@ class CompleteIPRotationRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=7, ) @@ -5643,19 +5776,19 @@ class AcceleratorConfig(proto.Message): This field is a member of `oneof`_ ``_gpu_sharing_config``. """ - accelerator_count = proto.Field( + accelerator_count: int = proto.Field( proto.INT64, number=1, ) - accelerator_type = proto.Field( + accelerator_type: str = proto.Field( proto.STRING, number=2, ) - gpu_partition_size = proto.Field( + gpu_partition_size: str = proto.Field( proto.STRING, number=3, ) - gpu_sharing_config = proto.Field( + gpu_sharing_config: "GPUSharingConfig" = proto.Field( proto.MESSAGE, number=5, optional=True, @@ -5683,11 +5816,11 @@ class GPUSharingStrategy(proto.Enum): GPU_SHARING_STRATEGY_UNSPECIFIED = 0 TIME_SHARING = 1 - max_shared_clients_per_gpu = proto.Field( + max_shared_clients_per_gpu: int = proto.Field( proto.INT64, number=1, ) - gpu_sharing_strategy = proto.Field( + gpu_sharing_strategy: GPUSharingStrategy = proto.Field( proto.ENUM, number=2, optional=True, @@ -5713,7 +5846,7 @@ class Mode(proto.Enum): GCE_METADATA = 1 GKE_METADATA = 2 - mode = proto.Field( + mode: Mode = proto.Field( proto.ENUM, number=2, enum=Mode, @@ -5749,24 +5882,24 @@ class SetNetworkPolicyRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - network_policy = proto.Field( + network_policy: "NetworkPolicy" = proto.Field( proto.MESSAGE, number=4, message="NetworkPolicy", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) @@ -5797,24 +5930,24 @@ class SetMaintenancePolicyRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - maintenance_policy = proto.Field( + maintenance_policy: "MaintenancePolicy" = proto.Field( proto.MESSAGE, number=4, message="MaintenancePolicy", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=5, ) @@ -5845,16 +5978,16 @@ class Code(proto.Enum): CLOUD_KMS_KEY_ERROR = 7 CA_EXPIRING = 9 - code = proto.Field( + code: Code = proto.Field( proto.ENUM, number=1, enum=Code, ) - message = proto.Field( + message: str = proto.Field( proto.STRING, number=2, ) - canonical_code = proto.Field( + canonical_code: code_pb2.Code = proto.Field( proto.ENUM, number=3, enum=code_pb2.Code, @@ -5905,49 +6038,83 @@ class NetworkConfig(proto.Message): ServiceExternalIPsConfig specifies if services with externalIPs field are blocked or not. + gateway_api_config (google.cloud.container_v1.types.GatewayAPIConfig): + GatewayAPIConfig contains the desired config + of Gateway API on this cluster. """ - network = proto.Field( + network: str = proto.Field( proto.STRING, number=1, ) - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=2, ) - enable_intra_node_visibility = proto.Field( + enable_intra_node_visibility: bool = proto.Field( proto.BOOL, number=5, ) - default_snat_status = proto.Field( + default_snat_status: "DefaultSnatStatus" = proto.Field( proto.MESSAGE, number=7, message="DefaultSnatStatus", ) - enable_l4ilb_subsetting = proto.Field( + enable_l4ilb_subsetting: bool = proto.Field( proto.BOOL, number=10, ) - datapath_provider = proto.Field( + datapath_provider: "DatapathProvider" = proto.Field( proto.ENUM, number=11, enum="DatapathProvider", ) - private_ipv6_google_access = proto.Field( + private_ipv6_google_access: "PrivateIPv6GoogleAccess" = proto.Field( proto.ENUM, number=12, enum="PrivateIPv6GoogleAccess", ) - dns_config = proto.Field( + dns_config: "DNSConfig" = proto.Field( proto.MESSAGE, number=13, message="DNSConfig", ) - service_external_ips_config = proto.Field( + service_external_ips_config: "ServiceExternalIPsConfig" = proto.Field( proto.MESSAGE, number=15, message="ServiceExternalIPsConfig", ) + gateway_api_config: "GatewayAPIConfig" = proto.Field( + proto.MESSAGE, + number=16, + message="GatewayAPIConfig", + ) + + +class GatewayAPIConfig(proto.Message): + r"""GatewayAPIConfig contains the desired config of Gateway API + on this cluster. + + Attributes: + channel (google.cloud.container_v1.types.GatewayAPIConfig.Channel): + The Gateway API release channel to use for + Gateway API. + """ + + class Channel(proto.Enum): + r"""Channel describes if/how Gateway API should be installed and + implemented in a cluster. + """ + CHANNEL_UNSPECIFIED = 0 + CHANNEL_DISABLED = 1 + CHANNEL_EXPERIMENTAL = 3 + CHANNEL_STANDARD = 4 + + channel: Channel = proto.Field( + proto.ENUM, + number=1, + enum=Channel, + ) class ServiceExternalIPsConfig(proto.Message): @@ -5959,7 +6126,7 @@ class ServiceExternalIPsConfig(proto.Message): allowed or not. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -5977,7 +6144,7 @@ class GetOpenIDConfigRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) @@ -5993,43 +6160,43 @@ class GetOpenIDConfigResponse(proto.Message): OIDC Issuer. jwks_uri (str): JSON Web Key uri. - response_types_supported (Sequence[str]): + response_types_supported (MutableSequence[str]): Supported response types. - subject_types_supported (Sequence[str]): + subject_types_supported (MutableSequence[str]): Supported subject types. - id_token_signing_alg_values_supported (Sequence[str]): + id_token_signing_alg_values_supported (MutableSequence[str]): supported ID Token signing Algorithms. - claims_supported (Sequence[str]): + claims_supported (MutableSequence[str]): Supported claims. - grant_types (Sequence[str]): + grant_types (MutableSequence[str]): Supported grant types. """ - issuer = proto.Field( + issuer: str = proto.Field( proto.STRING, number=1, ) - jwks_uri = proto.Field( + jwks_uri: str = proto.Field( proto.STRING, number=2, ) - response_types_supported = proto.RepeatedField( + response_types_supported: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) - subject_types_supported = proto.RepeatedField( + subject_types_supported: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=4, ) - id_token_signing_alg_values_supported = proto.RepeatedField( + id_token_signing_alg_values_supported: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=5, ) - claims_supported = proto.RepeatedField( + claims_supported: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=6, ) - grant_types = proto.RepeatedField( + grant_types: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=7, ) @@ -6048,7 +6215,7 @@ class GetJSONWebKeysRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) @@ -6078,39 +6245,39 @@ class Jwk(proto.Message): Used for ECDSA keys. """ - kty = proto.Field( + kty: str = proto.Field( proto.STRING, number=1, ) - alg = proto.Field( + alg: str = proto.Field( proto.STRING, number=2, ) - use = proto.Field( + use: str = proto.Field( proto.STRING, number=3, ) - kid = proto.Field( + kid: str = proto.Field( proto.STRING, number=4, ) - n = proto.Field( + n: str = proto.Field( proto.STRING, number=5, ) - e = proto.Field( + e: str = proto.Field( proto.STRING, number=6, ) - x = proto.Field( + x: str = proto.Field( proto.STRING, number=7, ) - y = proto.Field( + y: str = proto.Field( proto.STRING, number=8, ) - crv = proto.Field( + crv: str = proto.Field( proto.STRING, number=9, ) @@ -6121,12 +6288,12 @@ class GetJSONWebKeysResponse(proto.Message): specififed in rfc 7517 Attributes: - keys (Sequence[google.cloud.container_v1.types.Jwk]): + keys (MutableSequence[google.cloud.container_v1.types.Jwk]): The public component of the keys used by the cluster to sign token requests. """ - keys = proto.RepeatedField( + keys: MutableSequence["Jwk"] = proto.RepeatedField( proto.MESSAGE, number=1, message="Jwk", @@ -6153,7 +6320,7 @@ class Channel(proto.Enum): REGULAR = 2 STABLE = 3 - channel = proto.Field( + channel: Channel = proto.Field( proto.ENUM, number=1, enum=Channel, @@ -6168,7 +6335,7 @@ class CostManagementConfig(proto.Message): Whether the feature is enabled or not. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -6184,7 +6351,7 @@ class IntraNodeVisibilityConfig(proto.Message): cluster. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -6199,7 +6366,7 @@ class ILBSubsettingConfig(proto.Message): Enables l4 ILB subsetting for this cluster. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -6234,17 +6401,17 @@ class DNSScope(proto.Enum): DNS_SCOPE_UNSPECIFIED = 0 VPC_SCOPE = 2 - cluster_dns = proto.Field( + cluster_dns: Provider = proto.Field( proto.ENUM, number=1, enum=Provider, ) - cluster_dns_scope = proto.Field( + cluster_dns_scope: DNSScope = proto.Field( proto.ENUM, number=2, enum=DNSScope, ) - cluster_dns_domain = proto.Field( + cluster_dns_domain: str = proto.Field( proto.STRING, number=3, ) @@ -6259,7 +6426,7 @@ class MaxPodsConstraint(proto.Message): per node. """ - max_pods_per_node = proto.Field( + max_pods_per_node: int = proto.Field( proto.INT64, number=1, ) @@ -6275,7 +6442,7 @@ class WorkloadIdentityConfig(proto.Message): service accounts to. """ - workload_pool = proto.Field( + workload_pool: str = proto.Field( proto.STRING, number=2, ) @@ -6292,7 +6459,7 @@ class IdentityServiceConfig(proto.Message): component """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -6317,7 +6484,7 @@ class MeshCertificates(proto.Message): must be non-empty). """ - enable_certificates = proto.Field( + enable_certificates: wrappers_pb2.BoolValue = proto.Field( proto.MESSAGE, number=1, message=wrappers_pb2.BoolValue, @@ -6342,12 +6509,12 @@ class State(proto.Enum): ENCRYPTED = 1 DECRYPTED = 2 - state = proto.Field( + state: State = proto.Field( proto.ENUM, number=2, enum=State, ) - key_name = proto.Field( + key_name: str = proto.Field( proto.STRING, number=1, ) @@ -6380,19 +6547,19 @@ class ListUsableSubnetworksRequest(proto.Message): requests to get the next page of results. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=2, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=3, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=4, ) @@ -6403,7 +6570,7 @@ class ListUsableSubnetworksResponse(proto.Message): ListUsableSubnetworksRequest. Attributes: - subnetworks (Sequence[google.cloud.container_v1.types.UsableSubnetwork]): + subnetworks (MutableSequence[google.cloud.container_v1.types.UsableSubnetwork]): A list of usable subnetworks in the specified network project. next_page_token (str): @@ -6418,12 +6585,12 @@ class ListUsableSubnetworksResponse(proto.Message): def raw_page(self): return self - subnetworks = proto.RepeatedField( + subnetworks: MutableSequence["UsableSubnetwork"] = proto.RepeatedField( proto.MESSAGE, number=1, message="UsableSubnetwork", ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) @@ -6453,15 +6620,15 @@ class Status(proto.Enum): IN_USE_SHAREABLE_POD = 3 IN_USE_MANAGED_POD = 4 - range_name = proto.Field( + range_name: str = proto.Field( proto.STRING, number=1, ) - ip_cidr_range = proto.Field( + ip_cidr_range: str = proto.Field( proto.STRING, number=2, ) - status = proto.Field( + status: Status = proto.Field( proto.ENUM, number=3, enum=Status, @@ -6484,7 +6651,7 @@ class UsableSubnetwork(proto.Message): ip_cidr_range (str): The range of internal addresses that are owned by this subnetwork. - secondary_ip_ranges (Sequence[google.cloud.container_v1.types.UsableSubnetworkSecondaryRange]): + secondary_ip_ranges (MutableSequence[google.cloud.container_v1.types.UsableSubnetworkSecondaryRange]): Secondary IP ranges. status_message (str): A human readable status message representing the reasons for @@ -6494,24 +6661,26 @@ class UsableSubnetwork(proto.Message): message will be given by status_message. """ - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=1, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=2, ) - ip_cidr_range = proto.Field( + ip_cidr_range: str = proto.Field( proto.STRING, number=3, ) - secondary_ip_ranges = proto.RepeatedField( + secondary_ip_ranges: MutableSequence[ + "UsableSubnetworkSecondaryRange" + ] = proto.RepeatedField( proto.MESSAGE, number=4, message="UsableSubnetworkSecondaryRange", ) - status_message = proto.Field( + status_message: str = proto.Field( proto.STRING, number=5, ) @@ -6543,7 +6712,7 @@ class BigQueryDestination(proto.Message): The ID of a BigQuery Dataset. """ - dataset_id = proto.Field( + dataset_id: str = proto.Field( proto.STRING, number=1, ) @@ -6559,21 +6728,21 @@ class ConsumptionMeteringConfig(proto.Message): consumption records. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) - bigquery_destination = proto.Field( + bigquery_destination: BigQueryDestination = proto.Field( proto.MESSAGE, number=1, message=BigQueryDestination, ) - enable_network_egress_metering = proto.Field( + enable_network_egress_metering: bool = proto.Field( proto.BOOL, number=2, ) - consumption_metering_config = proto.Field( + consumption_metering_config: ConsumptionMeteringConfig = proto.Field( proto.MESSAGE, number=3, message=ConsumptionMeteringConfig, @@ -6590,7 +6759,7 @@ class VerticalPodAutoscaling(proto.Message): Enables vertical pod autoscaling. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -6605,7 +6774,7 @@ class DefaultSnatStatus(proto.Message): Disables cluster default sNAT rules. """ - disabled = proto.Field( + disabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -6620,7 +6789,7 @@ class ShieldedNodes(proto.Message): on all nodes in this cluster. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -6635,7 +6804,7 @@ class VirtualNIC(proto.Message): node pool. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -6675,15 +6844,15 @@ class PubSub(proto.Message): event types will be sent """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) - topic = proto.Field( + topic: str = proto.Field( proto.STRING, number=2, ) - filter = proto.Field( + filter: "NotificationConfig.Filter" = proto.Field( proto.MESSAGE, number=3, message="NotificationConfig.Filter", @@ -6697,17 +6866,19 @@ class Filter(proto.Message): types will be sent Attributes: - event_type (Sequence[google.cloud.container_v1.types.NotificationConfig.EventType]): + event_type (MutableSequence[google.cloud.container_v1.types.NotificationConfig.EventType]): Event types to allowlist. """ - event_type = proto.RepeatedField( + event_type: MutableSequence[ + "NotificationConfig.EventType" + ] = proto.RepeatedField( proto.ENUM, number=1, enum="NotificationConfig.EventType", ) - pubsub = proto.Field( + pubsub: PubSub = proto.Field( proto.MESSAGE, number=1, message=PubSub, @@ -6724,7 +6895,7 @@ class ConfidentialNodes(proto.Message): enabled. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -6751,29 +6922,29 @@ class UpgradeEvent(proto.Message): of the node pool. """ - resource_type = proto.Field( + resource_type: "UpgradeResourceType" = proto.Field( proto.ENUM, number=1, enum="UpgradeResourceType", ) - operation = proto.Field( + operation: str = proto.Field( proto.STRING, number=2, ) - operation_start_time = proto.Field( + operation_start_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=3, message=timestamp_pb2.Timestamp, ) - current_version = proto.Field( + current_version: str = proto.Field( proto.STRING, number=4, ) - target_version = proto.Field( + target_version: str = proto.Field( proto.STRING, number=5, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=6, ) @@ -6796,21 +6967,21 @@ class UpgradeAvailableEvent(proto.Message): example, the relative path of the node pool. """ - version = proto.Field( + version: str = proto.Field( proto.STRING, number=1, ) - resource_type = proto.Field( + resource_type: "UpgradeResourceType" = proto.Field( proto.ENUM, number=2, enum="UpgradeResourceType", ) - release_channel = proto.Field( + release_channel: "ReleaseChannel" = proto.Field( proto.MESSAGE, number=3, message="ReleaseChannel", ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=4, ) @@ -6830,7 +7001,7 @@ class SecurityBulletinEvent(proto.Message): bulletin_id (str): The ID of the bulletin corresponding to the vulnerability. - cve_ids (Sequence[str]): + cve_ids (MutableSequence[str]): The CVEs associated with this bulletin. severity (str): The severity of this bulletin as it relates @@ -6842,10 +7013,10 @@ class SecurityBulletinEvent(proto.Message): A brief description of the bulletin. See the bulletin pointed to by the bulletin_uri field for an expanded description. - affected_supported_minors (Sequence[str]): + affected_supported_minors (MutableSequence[str]): The GKE minor versions affected by this vulnerability. - patched_versions (Sequence[str]): + patched_versions (MutableSequence[str]): The GKE versions where this vulnerability is patched. suggested_upgrade_target (str): @@ -6861,43 +7032,43 @@ class SecurityBulletinEvent(proto.Message): their clusters safe. """ - resource_type_affected = proto.Field( + resource_type_affected: str = proto.Field( proto.STRING, number=1, ) - bulletin_id = proto.Field( + bulletin_id: str = proto.Field( proto.STRING, number=2, ) - cve_ids = proto.RepeatedField( + cve_ids: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) - severity = proto.Field( + severity: str = proto.Field( proto.STRING, number=4, ) - bulletin_uri = proto.Field( + bulletin_uri: str = proto.Field( proto.STRING, number=5, ) - brief_description = proto.Field( + brief_description: str = proto.Field( proto.STRING, number=6, ) - affected_supported_minors = proto.RepeatedField( + affected_supported_minors: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=7, ) - patched_versions = proto.RepeatedField( + patched_versions: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=8, ) - suggested_upgrade_target = proto.Field( + suggested_upgrade_target: str = proto.Field( proto.STRING, number=9, ) - manual_steps_required = proto.Field( + manual_steps_required: bool = proto.Field( proto.BOOL, number=10, ) @@ -6912,7 +7083,7 @@ class Autopilot(proto.Message): Enable Autopilot """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -6926,7 +7097,7 @@ class LoggingConfig(proto.Message): Logging components configuration """ - component_config = proto.Field( + component_config: "LoggingComponentConfig" = proto.Field( proto.MESSAGE, number=1, message="LoggingComponentConfig", @@ -6938,7 +7109,7 @@ class LoggingComponentConfig(proto.Message): configuration. Attributes: - enable_components (Sequence[google.cloud.container_v1.types.LoggingComponentConfig.Component]): + enable_components (MutableSequence[google.cloud.container_v1.types.LoggingComponentConfig.Component]): Select components to collect logs. An empty set would disable all logging. """ @@ -6948,8 +7119,11 @@ class Component(proto.Enum): COMPONENT_UNSPECIFIED = 0 SYSTEM_COMPONENTS = 1 WORKLOADS = 2 + APISERVER = 3 + SCHEDULER = 4 + CONTROLLER_MANAGER = 5 - enable_components = proto.RepeatedField( + enable_components: MutableSequence[Component] = proto.RepeatedField( proto.ENUM, number=1, enum=Component, @@ -6967,12 +7141,12 @@ class MonitoringConfig(proto.Message): Prometheus in the cluster. """ - component_config = proto.Field( + component_config: "MonitoringComponentConfig" = proto.Field( proto.MESSAGE, number=1, message="MonitoringComponentConfig", ) - managed_prometheus_config = proto.Field( + managed_prometheus_config: "ManagedPrometheusConfig" = proto.Field( proto.MESSAGE, number=2, message="ManagedPrometheusConfig", @@ -6988,7 +7162,7 @@ class NodePoolLoggingConfig(proto.Message): Logging variant configuration. """ - variant_config = proto.Field( + variant_config: "LoggingVariantConfig" = proto.Field( proto.MESSAGE, number=1, message="LoggingVariantConfig", @@ -7010,7 +7184,7 @@ class Variant(proto.Enum): DEFAULT = 1 MAX_THROUGHPUT = 2 - variant = proto.Field( + variant: Variant = proto.Field( proto.ENUM, number=1, enum=Variant, @@ -7022,7 +7196,7 @@ class MonitoringComponentConfig(proto.Message): configuration. Attributes: - enable_components (Sequence[google.cloud.container_v1.types.MonitoringComponentConfig.Component]): + enable_components (MutableSequence[google.cloud.container_v1.types.MonitoringComponentConfig.Component]): Select components to collect metrics. An empty set would disable all monitoring. """ @@ -7035,7 +7209,7 @@ class Component(proto.Enum): SCHEDULER = 4 CONTROLLER_MANAGER = 5 - enable_components = proto.RepeatedField( + enable_components: MutableSequence[Component] = proto.RepeatedField( proto.ENUM, number=1, enum=Component, @@ -7051,7 +7225,7 @@ class ManagedPrometheusConfig(proto.Message): Enable Managed Collection. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) diff --git a/google/cloud/container_v1beta1/__init__.py b/google/cloud/container_v1beta1/__init__.py index 80720e2c..72475a5a 100644 --- a/google/cloud/container_v1beta1/__init__.py +++ b/google/cloud/container_v1beta1/__init__.py @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.cloud.container import gapic_version as package_version + +__version__ = package_version.__version__ + from .services.cluster_manager import ClusterManagerAsyncClient, ClusterManagerClient from .types.cluster_service import ( @@ -48,6 +52,7 @@ DnsCacheConfig, DNSConfig, EphemeralStorageConfig, + GatewayAPIConfig, GcePersistentDiskCsiDriverConfig, GcfsConfig, GcpFilestoreCsiDriverConfig, @@ -127,6 +132,7 @@ RecurringTimeWindow, ReleaseChannel, ReservationAffinity, + ResourceLabels, ResourceLimit, ResourceUsageExportConfig, RollbackNodePoolUpgradeRequest, @@ -206,6 +212,7 @@ "DnsCacheConfig", "EphemeralStorageConfig", "GPUSharingConfig", + "GatewayAPIConfig", "GcePersistentDiskCsiDriverConfig", "GcfsConfig", "GcpFilestoreCsiDriverConfig", @@ -284,6 +291,7 @@ "RecurringTimeWindow", "ReleaseChannel", "ReservationAffinity", + "ResourceLabels", "ResourceLimit", "ResourceUsageExportConfig", "RollbackNodePoolUpgradeRequest", diff --git a/google/cloud/container_v1beta1/services/cluster_manager/async_client.py b/google/cloud/container_v1beta1/services/cluster_manager/async_client.py index 6c4391b8..d0284751 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/async_client.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/async_client.py @@ -16,7 +16,17 @@ from collections import OrderedDict import functools import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, +) import warnings from google.api_core import exceptions as core_exceptions @@ -162,9 +172,9 @@ def transport(self) -> ClusterManagerTransport: def __init__( self, *, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, ClusterManagerTransport] = "grpc_asyncio", - client_options: ClientOptions = None, + client_options: Optional[ClientOptions] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the cluster manager client. @@ -208,12 +218,12 @@ def __init__( async def list_clusters( self, - request: Union[cluster_service.ListClustersRequest, dict] = None, + request: Optional[Union[cluster_service.ListClustersRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ListClustersResponse: r"""Lists all clusters owned by a project in either the @@ -247,7 +257,7 @@ async def sample_list_clusters(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.ListClustersRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.ListClustersRequest, dict]]): The request object. ListClustersRequest lists clusters. project_id (:class:`str`): Required. Deprecated. The Google Developers Console @@ -338,13 +348,13 @@ async def sample_list_clusters(): async def get_cluster( self, - request: Union[cluster_service.GetClusterRequest, dict] = None, + request: Optional[Union[cluster_service.GetClusterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Cluster: r"""Gets the details for a specific cluster. @@ -378,7 +388,7 @@ async def sample_get_cluster(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.GetClusterRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.GetClusterRequest, dict]]): The request object. GetClusterRequest gets the settings of a cluster. project_id (:class:`str`): @@ -478,13 +488,13 @@ async def sample_get_cluster(): async def create_cluster( self, - request: Union[cluster_service.CreateClusterRequest, dict] = None, + request: Optional[Union[cluster_service.CreateClusterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster: cluster_service.Cluster = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster: Optional[cluster_service.Cluster] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Creates a cluster, consisting of the specified number and type @@ -529,7 +539,7 @@ async def sample_create_cluster(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.CreateClusterRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.CreateClusterRequest, dict]]): The request object. CreateClusterRequest creates a cluster. project_id (:class:`str`): @@ -621,14 +631,14 @@ async def sample_create_cluster(): async def update_cluster( self, - request: Union[cluster_service.UpdateClusterRequest, dict] = None, + request: Optional[Union[cluster_service.UpdateClusterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - update: cluster_service.ClusterUpdate = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + update: Optional[cluster_service.ClusterUpdate] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Updates the settings for a specific cluster. @@ -662,7 +672,7 @@ async def sample_update_cluster(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.UpdateClusterRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.UpdateClusterRequest, dict]]): The request object. UpdateClusterRequest updates the settings of a cluster. project_id (:class:`str`): @@ -765,10 +775,10 @@ async def sample_update_cluster(): async def update_node_pool( self, - request: Union[cluster_service.UpdateNodePoolRequest, dict] = None, + request: Optional[Union[cluster_service.UpdateNodePoolRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Updates the version and/or image type of a specific @@ -806,7 +816,7 @@ async def sample_update_node_pool(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.UpdateNodePoolRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.UpdateNodePoolRequest, dict]]): The request object. SetNodePoolVersionRequest updates the version of a node pool. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -853,10 +863,12 @@ async def sample_update_node_pool(): async def set_node_pool_autoscaling( self, - request: Union[cluster_service.SetNodePoolAutoscalingRequest, dict] = None, + request: Optional[ + Union[cluster_service.SetNodePoolAutoscalingRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the autoscaling settings of a specific node @@ -892,7 +904,7 @@ async def sample_set_node_pool_autoscaling(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.SetNodePoolAutoscalingRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.SetNodePoolAutoscalingRequest, dict]]): The request object. SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -939,14 +951,14 @@ async def sample_set_node_pool_autoscaling(): async def set_logging_service( self, - request: Union[cluster_service.SetLoggingServiceRequest, dict] = None, + request: Optional[Union[cluster_service.SetLoggingServiceRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - logging_service: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + logging_service: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the logging service for a specific cluster. @@ -981,7 +993,7 @@ async def sample_set_logging_service(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.SetLoggingServiceRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.SetLoggingServiceRequest, dict]]): The request object. SetLoggingServiceRequest sets the logging service of a cluster. project_id (:class:`str`): @@ -1096,14 +1108,16 @@ async def sample_set_logging_service(): async def set_monitoring_service( self, - request: Union[cluster_service.SetMonitoringServiceRequest, dict] = None, + request: Optional[ + Union[cluster_service.SetMonitoringServiceRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - monitoring_service: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + monitoring_service: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the monitoring service for a specific cluster. @@ -1138,7 +1152,7 @@ async def sample_set_monitoring_service(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.SetMonitoringServiceRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.SetMonitoringServiceRequest, dict]]): The request object. SetMonitoringServiceRequest sets the monitoring service of a cluster. project_id (:class:`str`): @@ -1255,14 +1269,14 @@ async def sample_set_monitoring_service(): async def set_addons_config( self, - request: Union[cluster_service.SetAddonsConfigRequest, dict] = None, + request: Optional[Union[cluster_service.SetAddonsConfigRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - addons_config: cluster_service.AddonsConfig = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + addons_config: Optional[cluster_service.AddonsConfig] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the addons for a specific cluster. @@ -1296,7 +1310,7 @@ async def sample_set_addons_config(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.SetAddonsConfigRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.SetAddonsConfigRequest, dict]]): The request object. SetAddonsRequest sets the addons associated with the cluster. project_id (:class:`str`): @@ -1400,14 +1414,14 @@ async def sample_set_addons_config(): async def set_locations( self, - request: Union[cluster_service.SetLocationsRequest, dict] = None, + request: Optional[Union[cluster_service.SetLocationsRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - locations: Sequence[str] = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + locations: Optional[MutableSequence[str]] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the locations for a specific cluster. Deprecated. Use @@ -1444,7 +1458,7 @@ async def sample_set_locations(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.SetLocationsRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.SetLocationsRequest, dict]]): The request object. SetLocationsRequest sets the locations of the cluster. project_id (:class:`str`): @@ -1476,7 +1490,7 @@ async def sample_set_locations(): This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - locations (:class:`Sequence[str]`): + locations (:class:`MutableSequence[str]`): Required. The desired list of Google Compute Engine `zones `__ in which the cluster's nodes should be located. Changing @@ -1558,14 +1572,14 @@ async def sample_set_locations(): async def update_master( self, - request: Union[cluster_service.UpdateMasterRequest, dict] = None, + request: Optional[Union[cluster_service.UpdateMasterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - master_version: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + master_version: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Updates the master for a specific cluster. @@ -1600,7 +1614,7 @@ async def sample_update_master(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.UpdateMasterRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.UpdateMasterRequest, dict]]): The request object. UpdateMasterRequest updates the master of the cluster. project_id (:class:`str`): @@ -1715,10 +1729,10 @@ async def sample_update_master(): async def set_master_auth( self, - request: Union[cluster_service.SetMasterAuthRequest, dict] = None, + request: Optional[Union[cluster_service.SetMasterAuthRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets master auth materials. Currently supports @@ -1756,7 +1770,7 @@ async def sample_set_master_auth(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.SetMasterAuthRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.SetMasterAuthRequest, dict]]): The request object. SetMasterAuthRequest updates the admin password of a cluster. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -1803,13 +1817,13 @@ async def sample_set_master_auth(): async def delete_cluster( self, - request: Union[cluster_service.DeleteClusterRequest, dict] = None, + request: Optional[Union[cluster_service.DeleteClusterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Deletes the cluster, including the Kubernetes @@ -1852,7 +1866,7 @@ async def sample_delete_cluster(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.DeleteClusterRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.DeleteClusterRequest, dict]]): The request object. DeleteClusterRequest deletes a cluster. project_id (:class:`str`): @@ -1956,12 +1970,12 @@ async def sample_delete_cluster(): async def list_operations( self, - request: Union[cluster_service.ListOperationsRequest, dict] = None, + request: Optional[Union[cluster_service.ListOperationsRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ListOperationsResponse: r"""Lists all operations in a project in the specified @@ -1995,7 +2009,7 @@ async def sample_list_operations(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.ListOperationsRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.ListOperationsRequest, dict]]): The request object. ListOperationsRequest lists operations. project_id (:class:`str`): @@ -2087,13 +2101,13 @@ async def sample_list_operations(): async def get_operation( self, - request: Union[cluster_service.GetOperationRequest, dict] = None, + request: Optional[Union[cluster_service.GetOperationRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - operation_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + operation_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Gets the specified operation. @@ -2127,7 +2141,7 @@ async def sample_get_operation(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.GetOperationRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.GetOperationRequest, dict]]): The request object. GetOperationRequest gets a single operation. project_id (:class:`str`): @@ -2230,13 +2244,13 @@ async def sample_get_operation(): async def cancel_operation( self, - request: Union[cluster_service.CancelOperationRequest, dict] = None, + request: Optional[Union[cluster_service.CancelOperationRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - operation_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + operation_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Cancels the specified operation. @@ -2267,7 +2281,7 @@ async def sample_cancel_operation(): await client.cancel_operation(request=request) Args: - request (Union[google.cloud.container_v1beta1.types.CancelOperationRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.CancelOperationRequest, dict]]): The request object. CancelOperationRequest cancels a single operation. project_id (:class:`str`): @@ -2349,12 +2363,12 @@ async def sample_cancel_operation(): async def get_server_config( self, - request: Union[cluster_service.GetServerConfigRequest, dict] = None, + request: Optional[Union[cluster_service.GetServerConfigRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ServerConfig: r"""Returns configuration info about the Google @@ -2388,7 +2402,7 @@ async def sample_get_server_config(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.GetServerConfigRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.GetServerConfigRequest, dict]]): The request object. Gets the current Kubernetes Engine service configuration. project_id (:class:`str`): @@ -2479,13 +2493,13 @@ async def sample_get_server_config(): async def list_node_pools( self, - request: Union[cluster_service.ListNodePoolsRequest, dict] = None, + request: Optional[Union[cluster_service.ListNodePoolsRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ListNodePoolsResponse: r"""Lists the node pools for a cluster. @@ -2519,7 +2533,7 @@ async def sample_list_node_pools(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.ListNodePoolsRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.ListNodePoolsRequest, dict]]): The request object. ListNodePoolsRequest lists the node pool(s) for a cluster. project_id (:class:`str`): @@ -2620,10 +2634,10 @@ async def sample_list_node_pools(): async def get_json_web_keys( self, - request: Union[cluster_service.GetJSONWebKeysRequest, dict] = None, + request: Optional[Union[cluster_service.GetJSONWebKeysRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.GetJSONWebKeysResponse: r"""Gets the public component of the cluster signing keys @@ -2657,7 +2671,7 @@ async def sample_get_json_web_keys(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.GetJSONWebKeysRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.GetJSONWebKeysRequest, dict]]): The request object. GetJSONWebKeysRequest gets the public component of the keys used by the cluster to sign token requests. This will be the jwks_uri for the @@ -2706,14 +2720,14 @@ async def sample_get_json_web_keys(): async def get_node_pool( self, - request: Union[cluster_service.GetNodePoolRequest, dict] = None, + request: Optional[Union[cluster_service.GetNodePoolRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.NodePool: r"""Retrieves the requested node pool. @@ -2748,7 +2762,7 @@ async def sample_get_node_pool(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.GetNodePoolRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.GetNodePoolRequest, dict]]): The request object. GetNodePoolRequest retrieves a node pool for a cluster. project_id (:class:`str`): @@ -2901,14 +2915,14 @@ async def sample_get_node_pool(): async def create_node_pool( self, - request: Union[cluster_service.CreateNodePoolRequest, dict] = None, + request: Optional[Union[cluster_service.CreateNodePoolRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool: cluster_service.NodePool = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool: Optional[cluster_service.NodePool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Creates a node pool for a cluster. @@ -2942,7 +2956,7 @@ async def sample_create_node_pool(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.CreateNodePoolRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.CreateNodePoolRequest, dict]]): The request object. CreateNodePoolRequest creates a node pool for a cluster. project_id (:class:`str`): @@ -3042,14 +3056,14 @@ async def sample_create_node_pool(): async def delete_node_pool( self, - request: Union[cluster_service.DeleteNodePoolRequest, dict] = None, + request: Optional[Union[cluster_service.DeleteNodePoolRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Deletes a node pool from a cluster. @@ -3084,7 +3098,7 @@ async def sample_delete_node_pool(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.DeleteNodePoolRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.DeleteNodePoolRequest, dict]]): The request object. DeleteNodePoolRequest deletes a node pool for a cluster. project_id (:class:`str`): @@ -3198,10 +3212,12 @@ async def sample_delete_node_pool(): async def complete_node_pool_upgrade( self, - request: Union[cluster_service.CompleteNodePoolUpgradeRequest, dict] = None, + request: Optional[ + Union[cluster_service.CompleteNodePoolUpgradeRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""CompleteNodePoolUpgrade will signal an on-going node @@ -3230,7 +3246,7 @@ async def sample_complete_node_pool_upgrade(): await client.complete_node_pool_upgrade(request=request) Args: - request (Union[google.cloud.container_v1beta1.types.CompleteNodePoolUpgradeRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.CompleteNodePoolUpgradeRequest, dict]]): The request object. CompleteNodePoolUpgradeRequest sets the name of target node pool to complete upgrade. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -3266,14 +3282,16 @@ async def sample_complete_node_pool_upgrade(): async def rollback_node_pool_upgrade( self, - request: Union[cluster_service.RollbackNodePoolUpgradeRequest, dict] = None, + request: Optional[ + Union[cluster_service.RollbackNodePoolUpgradeRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Rolls back a previously Aborted or Failed NodePool @@ -3310,7 +3328,7 @@ async def sample_rollback_node_pool_upgrade(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.RollbackNodePoolUpgradeRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.RollbackNodePoolUpgradeRequest, dict]]): The request object. RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed NodePool upgrade. This will be an no-op if the last upgrade @@ -3417,15 +3435,17 @@ async def sample_rollback_node_pool_upgrade(): async def set_node_pool_management( self, - request: Union[cluster_service.SetNodePoolManagementRequest, dict] = None, + request: Optional[ + Union[cluster_service.SetNodePoolManagementRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool_id: str = None, - management: cluster_service.NodeManagement = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool_id: Optional[str] = None, + management: Optional[cluster_service.NodeManagement] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the NodeManagement options for a node pool. @@ -3460,7 +3480,7 @@ async def sample_set_node_pool_management(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.SetNodePoolManagementRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.SetNodePoolManagementRequest, dict]]): The request object. SetNodePoolManagementRequest sets the node management properties of a node pool. project_id (:class:`str`): @@ -3576,15 +3596,15 @@ async def sample_set_node_pool_management(): async def set_labels( self, - request: Union[cluster_service.SetLabelsRequest, dict] = None, + request: Optional[Union[cluster_service.SetLabelsRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - resource_labels: Mapping[str, str] = None, - label_fingerprint: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + resource_labels: Optional[MutableMapping[str, str]] = None, + label_fingerprint: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets labels on a cluster. @@ -3619,7 +3639,7 @@ async def sample_set_labels(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.SetLabelsRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.SetLabelsRequest, dict]]): The request object. SetLabelsRequest sets the Google Cloud Platform labels on a Google Container Engine cluster, which will in turn set them for Google Compute @@ -3652,7 +3672,7 @@ async def sample_set_labels(): This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - resource_labels (:class:`Mapping[str, str]`): + resource_labels (:class:`MutableMapping[str, str]`): Required. The labels to set for that cluster. @@ -3741,14 +3761,14 @@ async def sample_set_labels(): async def set_legacy_abac( self, - request: Union[cluster_service.SetLegacyAbacRequest, dict] = None, + request: Optional[Union[cluster_service.SetLegacyAbacRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - enabled: bool = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + enabled: Optional[bool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Enables or disables the ABAC authorization mechanism @@ -3784,7 +3804,7 @@ async def sample_set_legacy_abac(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.SetLegacyAbacRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.SetLegacyAbacRequest, dict]]): The request object. SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for a cluster. project_id (:class:`str`): @@ -3887,13 +3907,13 @@ async def sample_set_legacy_abac(): async def start_ip_rotation( self, - request: Union[cluster_service.StartIPRotationRequest, dict] = None, + request: Optional[Union[cluster_service.StartIPRotationRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Starts master IP rotation. @@ -3927,7 +3947,7 @@ async def sample_start_ip_rotation(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.StartIPRotationRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.StartIPRotationRequest, dict]]): The request object. StartIPRotationRequest creates a new IP for the cluster and then performs a node upgrade on each node pool to point to the new IP. @@ -4021,13 +4041,15 @@ async def sample_start_ip_rotation(): async def complete_ip_rotation( self, - request: Union[cluster_service.CompleteIPRotationRequest, dict] = None, + request: Optional[ + Union[cluster_service.CompleteIPRotationRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Completes master IP rotation. @@ -4061,7 +4083,7 @@ async def sample_complete_ip_rotation(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.CompleteIPRotationRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.CompleteIPRotationRequest, dict]]): The request object. CompleteIPRotationRequest moves the cluster master back into single-IP mode. project_id (:class:`str`): @@ -4154,10 +4176,10 @@ async def sample_complete_ip_rotation(): async def set_node_pool_size( self, - request: Union[cluster_service.SetNodePoolSizeRequest, dict] = None, + request: Optional[Union[cluster_service.SetNodePoolSizeRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""SetNodePoolSizeRequest sets the size of a node pool. The new @@ -4196,7 +4218,7 @@ async def sample_set_node_pool_size(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.SetNodePoolSizeRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.SetNodePoolSizeRequest, dict]]): The request object. SetNodePoolSizeRequest sets the size of a node pool. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -4243,14 +4265,14 @@ async def sample_set_node_pool_size(): async def set_network_policy( self, - request: Union[cluster_service.SetNetworkPolicyRequest, dict] = None, + request: Optional[Union[cluster_service.SetNetworkPolicyRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - network_policy: cluster_service.NetworkPolicy = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + network_policy: Optional[cluster_service.NetworkPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Enables or disables Network Policy for a cluster. @@ -4284,7 +4306,7 @@ async def sample_set_network_policy(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.SetNetworkPolicyRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.SetNetworkPolicyRequest, dict]]): The request object. SetNetworkPolicyRequest enables/disables network policy for a cluster. project_id (:class:`str`): @@ -4386,14 +4408,16 @@ async def sample_set_network_policy(): async def set_maintenance_policy( self, - request: Union[cluster_service.SetMaintenancePolicyRequest, dict] = None, + request: Optional[ + Union[cluster_service.SetMaintenancePolicyRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - maintenance_policy: cluster_service.MaintenancePolicy = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + maintenance_policy: Optional[cluster_service.MaintenancePolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the maintenance policy for a cluster. @@ -4427,7 +4451,7 @@ async def sample_set_maintenance_policy(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.SetMaintenancePolicyRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.SetMaintenancePolicyRequest, dict]]): The request object. SetMaintenancePolicyRequest sets the maintenance policy for a cluster. project_id (:class:`str`): @@ -4525,11 +4549,13 @@ async def sample_set_maintenance_policy(): async def list_usable_subnetworks( self, - request: Union[cluster_service.ListUsableSubnetworksRequest, dict] = None, + request: Optional[ + Union[cluster_service.ListUsableSubnetworksRequest, dict] + ] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListUsableSubnetworksAsyncPager: r"""Lists subnetworks that can be used for creating @@ -4563,7 +4589,7 @@ async def sample_list_usable_subnetworks(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.ListUsableSubnetworksRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.ListUsableSubnetworksRequest, dict]]): The request object. ListUsableSubnetworksRequest requests the list of usable subnetworks. available to a user for creating clusters. @@ -4654,11 +4680,11 @@ async def sample_list_usable_subnetworks(): async def list_locations( self, - request: Union[cluster_service.ListLocationsRequest, dict] = None, + request: Optional[Union[cluster_service.ListLocationsRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ListLocationsResponse: r"""Fetches locations that offer Google Kubernetes @@ -4691,7 +4717,7 @@ async def sample_list_locations(): print(response) Args: - request (Union[google.cloud.container_v1beta1.types.ListLocationsRequest, dict]): + request (Optional[Union[google.cloud.container_v1beta1.types.ListLocationsRequest, dict]]): The request object. ListLocationsRequest is used to request the locations that offer GKE. parent (:class:`str`): diff --git a/google/cloud/container_v1beta1/services/cluster_manager/client.py b/google/cloud/container_v1beta1/services/cluster_manager/client.py index 8b8f3fa8..32765e0a 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/client.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/client.py @@ -16,7 +16,18 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) import warnings from google.api_core import client_options as client_options_lib @@ -61,7 +72,7 @@ class ClusterManagerClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[ClusterManagerTransport]: """Returns an appropriate transport class. @@ -331,8 +342,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, ClusterManagerTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, ClusterManagerTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the cluster manager client. @@ -346,7 +357,7 @@ def __init__( transport (Union[str, ClusterManagerTransport]): The transport to use. If set to None, a transport is chosen automatically. - client_options (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -376,6 +387,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -428,12 +440,12 @@ def __init__( def list_clusters( self, - request: Union[cluster_service.ListClustersRequest, dict] = None, + request: Optional[Union[cluster_service.ListClustersRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ListClustersResponse: r"""Lists all clusters owned by a project in either the @@ -548,13 +560,13 @@ def sample_list_clusters(): def get_cluster( self, - request: Union[cluster_service.GetClusterRequest, dict] = None, + request: Optional[Union[cluster_service.GetClusterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Cluster: r"""Gets the details for a specific cluster. @@ -678,13 +690,13 @@ def sample_get_cluster(): def create_cluster( self, - request: Union[cluster_service.CreateClusterRequest, dict] = None, + request: Optional[Union[cluster_service.CreateClusterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster: cluster_service.Cluster = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster: Optional[cluster_service.Cluster] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Creates a cluster, consisting of the specified number and type @@ -821,14 +833,14 @@ def sample_create_cluster(): def update_cluster( self, - request: Union[cluster_service.UpdateClusterRequest, dict] = None, + request: Optional[Union[cluster_service.UpdateClusterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - update: cluster_service.ClusterUpdate = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + update: Optional[cluster_service.ClusterUpdate] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Updates the settings for a specific cluster. @@ -965,10 +977,10 @@ def sample_update_cluster(): def update_node_pool( self, - request: Union[cluster_service.UpdateNodePoolRequest, dict] = None, + request: Optional[Union[cluster_service.UpdateNodePoolRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Updates the version and/or image type of a specific @@ -1054,10 +1066,12 @@ def sample_update_node_pool(): def set_node_pool_autoscaling( self, - request: Union[cluster_service.SetNodePoolAutoscalingRequest, dict] = None, + request: Optional[ + Union[cluster_service.SetNodePoolAutoscalingRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the autoscaling settings of a specific node @@ -1143,14 +1157,14 @@ def sample_set_node_pool_autoscaling(): def set_logging_service( self, - request: Union[cluster_service.SetLoggingServiceRequest, dict] = None, + request: Optional[Union[cluster_service.SetLoggingServiceRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - logging_service: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + logging_service: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the logging service for a specific cluster. @@ -1300,14 +1314,16 @@ def sample_set_logging_service(): def set_monitoring_service( self, - request: Union[cluster_service.SetMonitoringServiceRequest, dict] = None, + request: Optional[ + Union[cluster_service.SetMonitoringServiceRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - monitoring_service: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + monitoring_service: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the monitoring service for a specific cluster. @@ -1459,14 +1475,14 @@ def sample_set_monitoring_service(): def set_addons_config( self, - request: Union[cluster_service.SetAddonsConfigRequest, dict] = None, + request: Optional[Union[cluster_service.SetAddonsConfigRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - addons_config: cluster_service.AddonsConfig = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + addons_config: Optional[cluster_service.AddonsConfig] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the addons for a specific cluster. @@ -1604,14 +1620,14 @@ def sample_set_addons_config(): def set_locations( self, - request: Union[cluster_service.SetLocationsRequest, dict] = None, + request: Optional[Union[cluster_service.SetLocationsRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - locations: Sequence[str] = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + locations: Optional[MutableSequence[str]] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the locations for a specific cluster. Deprecated. Use @@ -1680,7 +1696,7 @@ def sample_set_locations(): This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - locations (Sequence[str]): + locations (MutableSequence[str]): Required. The desired list of Google Compute Engine `zones `__ in which the cluster's nodes should be located. Changing @@ -1762,14 +1778,14 @@ def sample_set_locations(): def update_master( self, - request: Union[cluster_service.UpdateMasterRequest, dict] = None, + request: Optional[Union[cluster_service.UpdateMasterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - master_version: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + master_version: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Updates the master for a specific cluster. @@ -1919,10 +1935,10 @@ def sample_update_master(): def set_master_auth( self, - request: Union[cluster_service.SetMasterAuthRequest, dict] = None, + request: Optional[Union[cluster_service.SetMasterAuthRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets master auth materials. Currently supports @@ -2008,13 +2024,13 @@ def sample_set_master_auth(): def delete_cluster( self, - request: Union[cluster_service.DeleteClusterRequest, dict] = None, + request: Optional[Union[cluster_service.DeleteClusterRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Deletes the cluster, including the Kubernetes @@ -2151,12 +2167,12 @@ def sample_delete_cluster(): def list_operations( self, - request: Union[cluster_service.ListOperationsRequest, dict] = None, + request: Optional[Union[cluster_service.ListOperationsRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ListOperationsResponse: r"""Lists all operations in a project in the specified @@ -2272,13 +2288,13 @@ def sample_list_operations(): def get_operation( self, - request: Union[cluster_service.GetOperationRequest, dict] = None, + request: Optional[Union[cluster_service.GetOperationRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - operation_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + operation_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Gets the specified operation. @@ -2405,13 +2421,13 @@ def sample_get_operation(): def cancel_operation( self, - request: Union[cluster_service.CancelOperationRequest, dict] = None, + request: Optional[Union[cluster_service.CancelOperationRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - operation_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + operation_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Cancels the specified operation. @@ -2524,12 +2540,12 @@ def sample_cancel_operation(): def get_server_config( self, - request: Union[cluster_service.GetServerConfigRequest, dict] = None, + request: Optional[Union[cluster_service.GetServerConfigRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ServerConfig: r"""Returns configuration info about the Google @@ -2644,13 +2660,13 @@ def sample_get_server_config(): def list_node_pools( self, - request: Union[cluster_service.ListNodePoolsRequest, dict] = None, + request: Optional[Union[cluster_service.ListNodePoolsRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ListNodePoolsResponse: r"""Lists the node pools for a cluster. @@ -2775,10 +2791,10 @@ def sample_list_node_pools(): def get_json_web_keys( self, - request: Union[cluster_service.GetJSONWebKeysRequest, dict] = None, + request: Optional[Union[cluster_service.GetJSONWebKeysRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.GetJSONWebKeysResponse: r"""Gets the public component of the cluster signing keys @@ -2862,14 +2878,14 @@ def sample_get_json_web_keys(): def get_node_pool( self, - request: Union[cluster_service.GetNodePoolRequest, dict] = None, + request: Optional[Union[cluster_service.GetNodePoolRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.NodePool: r"""Retrieves the requested node pool. @@ -3047,14 +3063,14 @@ def sample_get_node_pool(): def create_node_pool( self, - request: Union[cluster_service.CreateNodePoolRequest, dict] = None, + request: Optional[Union[cluster_service.CreateNodePoolRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool: cluster_service.NodePool = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool: Optional[cluster_service.NodePool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Creates a node pool for a cluster. @@ -3188,14 +3204,14 @@ def sample_create_node_pool(): def delete_node_pool( self, - request: Union[cluster_service.DeleteNodePoolRequest, dict] = None, + request: Optional[Union[cluster_service.DeleteNodePoolRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Deletes a node pool from a cluster. @@ -3334,10 +3350,12 @@ def sample_delete_node_pool(): def complete_node_pool_upgrade( self, - request: Union[cluster_service.CompleteNodePoolUpgradeRequest, dict] = None, + request: Optional[ + Union[cluster_service.CompleteNodePoolUpgradeRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""CompleteNodePoolUpgrade will signal an on-going node @@ -3405,14 +3423,16 @@ def sample_complete_node_pool_upgrade(): def rollback_node_pool_upgrade( self, - request: Union[cluster_service.RollbackNodePoolUpgradeRequest, dict] = None, + request: Optional[ + Union[cluster_service.RollbackNodePoolUpgradeRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Rolls back a previously Aborted or Failed NodePool @@ -3558,15 +3578,17 @@ def sample_rollback_node_pool_upgrade(): def set_node_pool_management( self, - request: Union[cluster_service.SetNodePoolManagementRequest, dict] = None, + request: Optional[ + Union[cluster_service.SetNodePoolManagementRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - node_pool_id: str = None, - management: cluster_service.NodeManagement = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + node_pool_id: Optional[str] = None, + management: Optional[cluster_service.NodeManagement] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the NodeManagement options for a node pool. @@ -3717,15 +3739,15 @@ def sample_set_node_pool_management(): def set_labels( self, - request: Union[cluster_service.SetLabelsRequest, dict] = None, + request: Optional[Union[cluster_service.SetLabelsRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - resource_labels: Mapping[str, str] = None, - label_fingerprint: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + resource_labels: Optional[MutableMapping[str, str]] = None, + label_fingerprint: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets labels on a cluster. @@ -3793,7 +3815,7 @@ def sample_set_labels(): This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - resource_labels (Mapping[str, str]): + resource_labels (MutableMapping[str, str]): Required. The labels to set for that cluster. @@ -3881,14 +3903,14 @@ def sample_set_labels(): def set_legacy_abac( self, - request: Union[cluster_service.SetLegacyAbacRequest, dict] = None, + request: Optional[Union[cluster_service.SetLegacyAbacRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - enabled: bool = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + enabled: Optional[bool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Enables or disables the ABAC authorization mechanism @@ -4027,13 +4049,13 @@ def sample_set_legacy_abac(): def start_ip_rotation( self, - request: Union[cluster_service.StartIPRotationRequest, dict] = None, + request: Optional[Union[cluster_service.StartIPRotationRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Starts master IP rotation. @@ -4161,13 +4183,15 @@ def sample_start_ip_rotation(): def complete_ip_rotation( self, - request: Union[cluster_service.CompleteIPRotationRequest, dict] = None, + request: Optional[ + Union[cluster_service.CompleteIPRotationRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Completes master IP rotation. @@ -4294,10 +4318,10 @@ def sample_complete_ip_rotation(): def set_node_pool_size( self, - request: Union[cluster_service.SetNodePoolSizeRequest, dict] = None, + request: Optional[Union[cluster_service.SetNodePoolSizeRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""SetNodePoolSizeRequest sets the size of a node pool. The new @@ -4384,14 +4408,14 @@ def sample_set_node_pool_size(): def set_network_policy( self, - request: Union[cluster_service.SetNetworkPolicyRequest, dict] = None, + request: Optional[Union[cluster_service.SetNetworkPolicyRequest, dict]] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - network_policy: cluster_service.NetworkPolicy = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + network_policy: Optional[cluster_service.NetworkPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Enables or disables Network Policy for a cluster. @@ -4527,14 +4551,16 @@ def sample_set_network_policy(): def set_maintenance_policy( self, - request: Union[cluster_service.SetMaintenancePolicyRequest, dict] = None, + request: Optional[ + Union[cluster_service.SetMaintenancePolicyRequest, dict] + ] = None, *, - project_id: str = None, - zone: str = None, - cluster_id: str = None, - maintenance_policy: cluster_service.MaintenancePolicy = None, + project_id: Optional[str] = None, + zone: Optional[str] = None, + cluster_id: Optional[str] = None, + maintenance_policy: Optional[cluster_service.MaintenancePolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: r"""Sets the maintenance policy for a cluster. @@ -4666,11 +4692,13 @@ def sample_set_maintenance_policy(): def list_usable_subnetworks( self, - request: Union[cluster_service.ListUsableSubnetworksRequest, dict] = None, + request: Optional[ + Union[cluster_service.ListUsableSubnetworksRequest, dict] + ] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListUsableSubnetworksPager: r"""Lists subnetworks that can be used for creating @@ -4785,11 +4813,11 @@ def sample_list_usable_subnetworks(): def list_locations( self, - request: Union[cluster_service.ListLocationsRequest, dict] = None, + request: Optional[Union[cluster_service.ListLocationsRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.ListLocationsResponse: r"""Fetches locations that offer Google Kubernetes diff --git a/google/cloud/container_v1beta1/services/cluster_manager/transports/base.py b/google/cloud/container_v1beta1/services/cluster_manager/transports/base.py index 1cc5de64..29b04471 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/transports/base.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/transports/base.py @@ -49,7 +49,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py b/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py index de6c1926..a6657c5c 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py @@ -47,14 +47,14 @@ def __init__( self, *, host: str = "container.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - channel: grpc.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + channel: Optional[grpc.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, @@ -181,8 +181,8 @@ def __init__( def create_channel( cls, host: str = "container.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, **kwargs, diff --git a/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py b/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py index bbe069a2..2a4ce448 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py @@ -49,7 +49,7 @@ class ClusterManagerGrpcAsyncIOTransport(ClusterManagerTransport): def create_channel( cls, host: str = "container.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, @@ -92,15 +92,15 @@ def __init__( self, *, host: str = "container.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, - channel: aio.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, - quota_project_id=None, + channel: Optional[aio.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, api_audience: Optional[str] = None, diff --git a/google/cloud/container_v1beta1/types/__init__.py b/google/cloud/container_v1beta1/types/__init__.py index 6b3a7df6..41669142 100644 --- a/google/cloud/container_v1beta1/types/__init__.py +++ b/google/cloud/container_v1beta1/types/__init__.py @@ -46,6 +46,7 @@ DnsCacheConfig, DNSConfig, EphemeralStorageConfig, + GatewayAPIConfig, GcePersistentDiskCsiDriverConfig, GcfsConfig, GcpFilestoreCsiDriverConfig, @@ -125,6 +126,7 @@ RecurringTimeWindow, ReleaseChannel, ReservationAffinity, + ResourceLabels, ResourceLimit, ResourceUsageExportConfig, RollbackNodePoolUpgradeRequest, @@ -200,6 +202,7 @@ "DnsCacheConfig", "DNSConfig", "EphemeralStorageConfig", + "GatewayAPIConfig", "GcePersistentDiskCsiDriverConfig", "GcfsConfig", "GcpFilestoreCsiDriverConfig", @@ -277,6 +280,7 @@ "RecurringTimeWindow", "ReleaseChannel", "ReservationAffinity", + "ResourceLabels", "ResourceLimit", "ResourceUsageExportConfig", "RollbackNodePoolUpgradeRequest", diff --git a/google/cloud/container_v1beta1/types/cluster_service.py b/google/cloud/container_v1beta1/types/cluster_service.py index 9742540d..cd697747 100644 --- a/google/cloud/container_v1beta1/types/cluster_service.py +++ b/google/cloud/container_v1beta1/types/cluster_service.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + from google.protobuf import duration_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore from google.protobuf import wrappers_pb2 # type: ignore @@ -41,6 +43,7 @@ "NodeTaint", "NodeTaints", "NodeLabels", + "ResourceLabels", "NetworkTags", "MasterAuth", "ClientCertificateConfig", @@ -135,6 +138,7 @@ "Location", "StatusCondition", "NetworkConfig", + "GatewayAPIConfig", "ServiceExternalIPsConfig", "ListUsableSubnetworksRequest", "ListUsableSubnetworksResponse", @@ -220,7 +224,7 @@ class LinuxNodeConfig(proto.Message): r"""Parameters that can be configured on Linux nodes. Attributes: - sysctls (Mapping[str, str]): + sysctls (MutableMapping[str, str]): The Linux kernel parameters to be applied to the nodes and all pods running on the nodes. @@ -242,12 +246,12 @@ class CgroupMode(proto.Enum): CGROUP_MODE_V1 = 1 CGROUP_MODE_V2 = 2 - sysctls = proto.MapField( + sysctls: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=1, ) - cgroup_mode = proto.Field( + cgroup_mode: CgroupMode = proto.Field( proto.ENUM, number=2, enum=CgroupMode, @@ -299,20 +303,20 @@ class NodeKubeletConfig(proto.Message): or equal to 1024 and less than 4194304. """ - cpu_manager_policy = proto.Field( + cpu_manager_policy: str = proto.Field( proto.STRING, number=1, ) - cpu_cfs_quota = proto.Field( + cpu_cfs_quota: wrappers_pb2.BoolValue = proto.Field( proto.MESSAGE, number=2, message=wrappers_pb2.BoolValue, ) - cpu_cfs_quota_period = proto.Field( + cpu_cfs_quota_period: str = proto.Field( proto.STRING, number=3, ) - pod_pids_limit = proto.Field( + pod_pids_limit: int = proto.Field( proto.INT64, number=4, ) @@ -337,7 +341,7 @@ class NodeConfig(proto.Message): specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB. - oauth_scopes (Sequence[str]): + oauth_scopes (MutableSequence[str]): The set of Google API scopes to be made available on all of the node VMs under the "default" service account. @@ -360,7 +364,7 @@ class NodeConfig(proto.Message): address of the Service Account; otherwise, if no Service Account is specified, the "default" service account is used. - metadata (Mapping[str, str]): + metadata (MutableMapping[str, str]): The metadata key/value pairs assigned to instances in the cluster. @@ -401,7 +405,7 @@ class NodeConfig(proto.Message): The image type to use for this node. Note that for a given image type, the latest version of it will be used. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): The map of Kubernetes labels (key/value pairs) to be applied to each node. These will added in addition to any default label(s) that @@ -421,7 +425,7 @@ class NodeConfig(proto.Message): per zone. See: https://cloud.google.com/compute/docs/disks/local-ssd for more information. - tags (Sequence[str]): + tags (MutableSequence[str]): The list of instance tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls and are @@ -434,7 +438,7 @@ class NodeConfig(proto.Message): https://cloud.google.com/compute/docs/instances/preemptible for more inforamtion about preemptible VM instances. - accelerators (Sequence[google.cloud.container_v1beta1.types.AcceleratorConfig]): + accelerators (MutableSequence[google.cloud.container_v1beta1.types.AcceleratorConfig]): A list of hardware accelerators to be attached to each node. See https://cloud.google.com/compute/docs/gpus for @@ -468,7 +472,7 @@ class NodeConfig(proto.Message): workload_metadata_config (google.cloud.container_v1beta1.types.WorkloadMetadataConfig): The workload metadata configuration for this node. - taints (Sequence[google.cloud.container_v1beta1.types.NodeTaint]): + taints (MutableSequence[google.cloud.container_v1beta1.types.NodeTaint]): List of kubernetes taints to be applied to each node. For more information, including usage and the @@ -506,138 +510,147 @@ class NodeConfig(proto.Message): Confidential nodes config. All the nodes in the node pool will be Confidential VM once enabled. + resource_labels (MutableMapping[str, str]): + The resource labels for the node pool to use + to annotate any related Google Compute Engine + resources. logging_config (google.cloud.container_v1beta1.types.NodePoolLoggingConfig): Logging configuration. """ - machine_type = proto.Field( + machine_type: str = proto.Field( proto.STRING, number=1, ) - disk_size_gb = proto.Field( + disk_size_gb: int = proto.Field( proto.INT32, number=2, ) - oauth_scopes = proto.RepeatedField( + oauth_scopes: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) - service_account = proto.Field( + service_account: str = proto.Field( proto.STRING, number=9, ) - metadata = proto.MapField( + metadata: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=4, ) - image_type = proto.Field( + image_type: str = proto.Field( proto.STRING, number=5, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=6, ) - local_ssd_count = proto.Field( + local_ssd_count: int = proto.Field( proto.INT32, number=7, ) - tags = proto.RepeatedField( + tags: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=8, ) - preemptible = proto.Field( + preemptible: bool = proto.Field( proto.BOOL, number=10, ) - accelerators = proto.RepeatedField( + accelerators: MutableSequence["AcceleratorConfig"] = proto.RepeatedField( proto.MESSAGE, number=11, message="AcceleratorConfig", ) - sandbox_config = proto.Field( + sandbox_config: "SandboxConfig" = proto.Field( proto.MESSAGE, number=17, message="SandboxConfig", ) - node_group = proto.Field( + node_group: str = proto.Field( proto.STRING, number=18, ) - reservation_affinity = proto.Field( + reservation_affinity: "ReservationAffinity" = proto.Field( proto.MESSAGE, number=19, message="ReservationAffinity", ) - disk_type = proto.Field( + disk_type: str = proto.Field( proto.STRING, number=12, ) - min_cpu_platform = proto.Field( + min_cpu_platform: str = proto.Field( proto.STRING, number=13, ) - workload_metadata_config = proto.Field( + workload_metadata_config: "WorkloadMetadataConfig" = proto.Field( proto.MESSAGE, number=14, message="WorkloadMetadataConfig", ) - taints = proto.RepeatedField( + taints: MutableSequence["NodeTaint"] = proto.RepeatedField( proto.MESSAGE, number=15, message="NodeTaint", ) - boot_disk_kms_key = proto.Field( + boot_disk_kms_key: str = proto.Field( proto.STRING, number=23, ) - shielded_instance_config = proto.Field( + shielded_instance_config: "ShieldedInstanceConfig" = proto.Field( proto.MESSAGE, number=20, message="ShieldedInstanceConfig", ) - linux_node_config = proto.Field( + linux_node_config: "LinuxNodeConfig" = proto.Field( proto.MESSAGE, number=21, message="LinuxNodeConfig", ) - kubelet_config = proto.Field( + kubelet_config: "NodeKubeletConfig" = proto.Field( proto.MESSAGE, number=22, message="NodeKubeletConfig", ) - ephemeral_storage_config = proto.Field( + ephemeral_storage_config: "EphemeralStorageConfig" = proto.Field( proto.MESSAGE, number=24, message="EphemeralStorageConfig", ) - gcfs_config = proto.Field( + gcfs_config: "GcfsConfig" = proto.Field( proto.MESSAGE, number=25, message="GcfsConfig", ) - advanced_machine_features = proto.Field( + advanced_machine_features: "AdvancedMachineFeatures" = proto.Field( proto.MESSAGE, number=26, message="AdvancedMachineFeatures", ) - gvnic = proto.Field( + gvnic: "VirtualNIC" = proto.Field( proto.MESSAGE, number=29, message="VirtualNIC", ) - spot = proto.Field( + spot: bool = proto.Field( proto.BOOL, number=32, ) - confidential_nodes = proto.Field( + confidential_nodes: "ConfidentialNodes" = proto.Field( proto.MESSAGE, number=35, message="ConfidentialNodes", ) - logging_config = proto.Field( + resource_labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=37, + ) + logging_config: "NodePoolLoggingConfig" = proto.Field( proto.MESSAGE, number=38, message="NodePoolLoggingConfig", @@ -658,7 +671,7 @@ class AdvancedMachineFeatures(proto.Message): This field is a member of `oneof`_ ``_threads_per_core``. """ - threads_per_core = proto.Field( + threads_per_core: int = proto.Field( proto.INT64, number=1, optional=True, @@ -714,6 +727,13 @@ class NodeNetworkConfig(proto.Message): This field cannot be changed after the node pool has been created. + enable_private_nodes (bool): + Whether nodes have internal IP addresses only. If + enable_private_nodes is not specified, then the value is + derived from + [cluster.privateClusterConfig.enablePrivateNodes][google.container.v1beta1.PrivateClusterConfig.enablePrivateNodes] + + This field is a member of `oneof`_ ``_enable_private_nodes``. network_performance_config (google.cloud.container_v1beta1.types.NodeNetworkConfig.NetworkPerformanceConfig): Network bandwidth tier configuration. @@ -742,32 +762,37 @@ class Tier(proto.Enum): TIER_UNSPECIFIED = 0 TIER_1 = 1 - total_egress_bandwidth_tier = proto.Field( + total_egress_bandwidth_tier: "NodeNetworkConfig.NetworkPerformanceConfig.Tier" = proto.Field( proto.ENUM, number=1, optional=True, enum="NodeNetworkConfig.NetworkPerformanceConfig.Tier", ) - external_ip_egress_bandwidth_tier = proto.Field( + external_ip_egress_bandwidth_tier: "NodeNetworkConfig.NetworkPerformanceConfig.Tier" = proto.Field( proto.ENUM, number=2, optional=True, enum="NodeNetworkConfig.NetworkPerformanceConfig.Tier", ) - create_pod_range = proto.Field( + create_pod_range: bool = proto.Field( proto.BOOL, number=4, ) - pod_range = proto.Field( + pod_range: str = proto.Field( proto.STRING, number=5, ) - pod_ipv4_cidr_block = proto.Field( + pod_ipv4_cidr_block: str = proto.Field( proto.STRING, number=6, ) - network_performance_config = proto.Field( + enable_private_nodes: bool = proto.Field( + proto.BOOL, + number=9, + optional=True, + ) + network_performance_config: NetworkPerformanceConfig = proto.Field( proto.MESSAGE, number=11, optional=True, @@ -798,11 +823,11 @@ class ShieldedInstanceConfig(proto.Message): is created. """ - enable_secure_boot = proto.Field( + enable_secure_boot: bool = proto.Field( proto.BOOL, number=1, ) - enable_integrity_monitoring = proto.Field( + enable_integrity_monitoring: bool = proto.Field( proto.BOOL, number=2, ) @@ -825,11 +850,11 @@ class Type(proto.Enum): UNSPECIFIED = 0 GVISOR = 1 - sandbox_type = proto.Field( + sandbox_type: str = proto.Field( proto.STRING, number=1, ) - type_ = proto.Field( + type_: Type = proto.Field( proto.ENUM, number=2, enum=Type, @@ -848,7 +873,7 @@ class EphemeralStorageConfig(proto.Message): using local SSDs as ephemeral storage. """ - local_ssd_count = proto.Field( + local_ssd_count: int = proto.Field( proto.INT32, number=1, ) @@ -863,7 +888,7 @@ class GcfsConfig(proto.Message): Whether to use GCFS. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -883,7 +908,7 @@ class ReservationAffinity(proto.Message): target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value. - values (Sequence[str]): + values (MutableSequence[str]): Corresponds to the label value(s) of reservation resource(s). """ @@ -897,16 +922,16 @@ class Type(proto.Enum): ANY_RESERVATION = 2 SPECIFIC_RESERVATION = 3 - consume_reservation_type = proto.Field( + consume_reservation_type: Type = proto.Field( proto.ENUM, number=1, enum=Type, ) - key = proto.Field( + key: str = proto.Field( proto.STRING, number=2, ) - values = proto.RepeatedField( + values: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) @@ -937,15 +962,15 @@ class Effect(proto.Enum): PREFER_NO_SCHEDULE = 2 NO_EXECUTE = 3 - key = proto.Field( + key: str = proto.Field( proto.STRING, number=1, ) - value = proto.Field( + value: str = proto.Field( proto.STRING, number=2, ) - effect = proto.Field( + effect: Effect = proto.Field( proto.ENUM, number=3, enum=Effect, @@ -957,11 +982,11 @@ class NodeTaints(proto.Message): taints `__. Attributes: - taints (Sequence[google.cloud.container_v1beta1.types.NodeTaint]): + taints (MutableSequence[google.cloud.container_v1beta1.types.NodeTaint]): List of node taints. """ - taints = proto.RepeatedField( + taints: MutableSequence["NodeTaint"] = proto.RepeatedField( proto.MESSAGE, number=1, message="NodeTaint", @@ -973,11 +998,27 @@ class NodeLabels(proto.Message): labels `__. Attributes: - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): + Map of node label keys and node label values. + """ + + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=1, + ) + + +class ResourceLabels(proto.Message): + r"""Collection of `GCP + labels `__. + + Attributes: + labels (MutableMapping[str, str]): Map of node label keys and node label values. """ - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=1, @@ -990,11 +1031,11 @@ class NetworkTags(proto.Message): ```NodeConfig`` `__). Attributes: - tags (Sequence[str]): + tags (MutableSequence[str]): List of network tags. """ - tags = proto.RepeatedField( + tags: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=1, ) @@ -1045,28 +1086,28 @@ class MasterAuth(proto.Message): authenticate to the cluster endpoint. """ - username = proto.Field( + username: str = proto.Field( proto.STRING, number=1, ) - password = proto.Field( + password: str = proto.Field( proto.STRING, number=2, ) - client_certificate_config = proto.Field( + client_certificate_config: "ClientCertificateConfig" = proto.Field( proto.MESSAGE, number=3, message="ClientCertificateConfig", ) - cluster_ca_certificate = proto.Field( + cluster_ca_certificate: str = proto.Field( proto.STRING, number=100, ) - client_certificate = proto.Field( + client_certificate: str = proto.Field( proto.STRING, number=101, ) - client_key = proto.Field( + client_key: str = proto.Field( proto.STRING, number=102, ) @@ -1080,7 +1121,7 @@ class ClientCertificateConfig(proto.Message): Issue a client certificate. """ - issue_client_certificate = proto.Field( + issue_client_certificate: bool = proto.Field( proto.BOOL, number=1, ) @@ -1143,62 +1184,64 @@ class AddonsConfig(proto.Message): addon. """ - http_load_balancing = proto.Field( + http_load_balancing: "HttpLoadBalancing" = proto.Field( proto.MESSAGE, number=1, message="HttpLoadBalancing", ) - horizontal_pod_autoscaling = proto.Field( + horizontal_pod_autoscaling: "HorizontalPodAutoscaling" = proto.Field( proto.MESSAGE, number=2, message="HorizontalPodAutoscaling", ) - kubernetes_dashboard = proto.Field( + kubernetes_dashboard: "KubernetesDashboard" = proto.Field( proto.MESSAGE, number=3, message="KubernetesDashboard", ) - network_policy_config = proto.Field( + network_policy_config: "NetworkPolicyConfig" = proto.Field( proto.MESSAGE, number=4, message="NetworkPolicyConfig", ) - istio_config = proto.Field( + istio_config: "IstioConfig" = proto.Field( proto.MESSAGE, number=5, message="IstioConfig", ) - cloud_run_config = proto.Field( + cloud_run_config: "CloudRunConfig" = proto.Field( proto.MESSAGE, number=7, message="CloudRunConfig", ) - dns_cache_config = proto.Field( + dns_cache_config: "DnsCacheConfig" = proto.Field( proto.MESSAGE, number=8, message="DnsCacheConfig", ) - config_connector_config = proto.Field( + config_connector_config: "ConfigConnectorConfig" = proto.Field( proto.MESSAGE, number=10, message="ConfigConnectorConfig", ) - gce_persistent_disk_csi_driver_config = proto.Field( - proto.MESSAGE, - number=11, - message="GcePersistentDiskCsiDriverConfig", + gce_persistent_disk_csi_driver_config: "GcePersistentDiskCsiDriverConfig" = ( + proto.Field( + proto.MESSAGE, + number=11, + message="GcePersistentDiskCsiDriverConfig", + ) ) - kalm_config = proto.Field( + kalm_config: "KalmConfig" = proto.Field( proto.MESSAGE, number=12, message="KalmConfig", ) - gcp_filestore_csi_driver_config = proto.Field( + gcp_filestore_csi_driver_config: "GcpFilestoreCsiDriverConfig" = proto.Field( proto.MESSAGE, number=14, message="GcpFilestoreCsiDriverConfig", ) - gke_backup_agent_config = proto.Field( + gke_backup_agent_config: "GkeBackupAgentConfig" = proto.Field( proto.MESSAGE, number=16, message="GkeBackupAgentConfig", @@ -1218,7 +1261,7 @@ class HttpLoadBalancing(proto.Message): balancers. """ - disabled = proto.Field( + disabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1238,7 +1281,7 @@ class HorizontalPodAutoscaling(proto.Message): Stackdriver Monitoring. """ - disabled = proto.Field( + disabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1253,7 +1296,7 @@ class KubernetesDashboard(proto.Message): for this cluster. """ - disabled = proto.Field( + disabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1270,7 +1313,7 @@ class NetworkPolicyConfig(proto.Message): cluster. """ - disabled = proto.Field( + disabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1285,7 +1328,7 @@ class DnsCacheConfig(proto.Message): this cluster. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1299,7 +1342,7 @@ class KalmConfig(proto.Message): Whether KALM is enabled for this cluster. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1314,7 +1357,7 @@ class GkeBackupAgentConfig(proto.Message): for this cluster. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1329,7 +1372,7 @@ class ConfigConnectorConfig(proto.Message): cluster. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1344,7 +1387,7 @@ class GcePersistentDiskCsiDriverConfig(proto.Message): enabled for this cluster. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1359,7 +1402,7 @@ class GcpFilestoreCsiDriverConfig(proto.Message): enabled for this cluster. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1374,7 +1417,7 @@ class PrivateClusterMasterGlobalAccessConfig(proto.Message): not. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1410,37 +1453,45 @@ class PrivateClusterConfig(proto.Message): VPC used by this cluster. master_global_access_config (google.cloud.container_v1beta1.types.PrivateClusterMasterGlobalAccessConfig): Controls master global access settings. + private_endpoint_subnetwork (str): + Subnet to provision the master's private endpoint during + cluster creation. Specified in + projects/\ */regions/*/subnetworks/\* format. """ - enable_private_nodes = proto.Field( + enable_private_nodes: bool = proto.Field( proto.BOOL, number=1, ) - enable_private_endpoint = proto.Field( + enable_private_endpoint: bool = proto.Field( proto.BOOL, number=2, ) - master_ipv4_cidr_block = proto.Field( + master_ipv4_cidr_block: str = proto.Field( proto.STRING, number=3, ) - private_endpoint = proto.Field( + private_endpoint: str = proto.Field( proto.STRING, number=4, ) - public_endpoint = proto.Field( + public_endpoint: str = proto.Field( proto.STRING, number=5, ) - peering_name = proto.Field( + peering_name: str = proto.Field( proto.STRING, number=7, ) - master_global_access_config = proto.Field( + master_global_access_config: "PrivateClusterMasterGlobalAccessConfig" = proto.Field( proto.MESSAGE, number=8, message="PrivateClusterMasterGlobalAccessConfig", ) + private_endpoint_subnetwork: str = proto.Field( + proto.STRING, + number=10, + ) class IstioConfig(proto.Message): @@ -1461,11 +1512,11 @@ class IstioAuthMode(proto.Enum): AUTH_NONE = 0 AUTH_MUTUAL_TLS = 1 - disabled = proto.Field( + disabled: bool = proto.Field( proto.BOOL, number=1, ) - auth = proto.Field( + auth: IstioAuthMode = proto.Field( proto.ENUM, number=2, enum=IstioAuthMode, @@ -1490,11 +1541,11 @@ class LoadBalancerType(proto.Enum): LOAD_BALANCER_TYPE_EXTERNAL = 1 LOAD_BALANCER_TYPE_INTERNAL = 2 - disabled = proto.Field( + disabled: bool = proto.Field( proto.BOOL, number=1, ) - load_balancer_type = proto.Field( + load_balancer_type: LoadBalancerType = proto.Field( proto.ENUM, number=3, enum=LoadBalancerType, @@ -1512,9 +1563,14 @@ class MasterAuthorizedNetworksConfig(proto.Message): enabled (bool): Whether or not master authorized networks is enabled. - cidr_blocks (Sequence[google.cloud.container_v1beta1.types.MasterAuthorizedNetworksConfig.CidrBlock]): + cidr_blocks (MutableSequence[google.cloud.container_v1beta1.types.MasterAuthorizedNetworksConfig.CidrBlock]): cidr_blocks define up to 10 external networks that could access Kubernetes master through HTTPS. + gcp_public_cidrs_access_enabled (bool): + Whether master is accessbile via Google + Compute Engine Public IP addresses. + + This field is a member of `oneof`_ ``_gcp_public_cidrs_access_enabled``. """ class CidrBlock(proto.Message): @@ -1528,24 +1584,29 @@ class CidrBlock(proto.Message): cidr_block must be specified in CIDR notation. """ - display_name = proto.Field( + display_name: str = proto.Field( proto.STRING, number=1, ) - cidr_block = proto.Field( + cidr_block: str = proto.Field( proto.STRING, number=2, ) - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) - cidr_blocks = proto.RepeatedField( + cidr_blocks: MutableSequence[CidrBlock] = proto.RepeatedField( proto.MESSAGE, number=2, message=CidrBlock, ) + gcp_public_cidrs_access_enabled: bool = proto.Field( + proto.BOOL, + number=3, + optional=True, + ) class LegacyAbac(proto.Message): @@ -1562,7 +1623,7 @@ class LegacyAbac(proto.Message): configuration or IAM. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1585,12 +1646,12 @@ class Provider(proto.Enum): PROVIDER_UNSPECIFIED = 0 CALICO = 1 - provider = proto.Field( + provider: Provider = proto.Field( proto.ENUM, number=1, enum=Provider, ) - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=2, ) @@ -1758,77 +1819,77 @@ class IPv6AccessType(proto.Enum): INTERNAL = 1 EXTERNAL = 2 - use_ip_aliases = proto.Field( + use_ip_aliases: bool = proto.Field( proto.BOOL, number=1, ) - create_subnetwork = proto.Field( + create_subnetwork: bool = proto.Field( proto.BOOL, number=2, ) - subnetwork_name = proto.Field( + subnetwork_name: str = proto.Field( proto.STRING, number=3, ) - cluster_ipv4_cidr = proto.Field( + cluster_ipv4_cidr: str = proto.Field( proto.STRING, number=4, ) - node_ipv4_cidr = proto.Field( + node_ipv4_cidr: str = proto.Field( proto.STRING, number=5, ) - services_ipv4_cidr = proto.Field( + services_ipv4_cidr: str = proto.Field( proto.STRING, number=6, ) - cluster_secondary_range_name = proto.Field( + cluster_secondary_range_name: str = proto.Field( proto.STRING, number=7, ) - services_secondary_range_name = proto.Field( + services_secondary_range_name: str = proto.Field( proto.STRING, number=8, ) - cluster_ipv4_cidr_block = proto.Field( + cluster_ipv4_cidr_block: str = proto.Field( proto.STRING, number=9, ) - node_ipv4_cidr_block = proto.Field( + node_ipv4_cidr_block: str = proto.Field( proto.STRING, number=10, ) - services_ipv4_cidr_block = proto.Field( + services_ipv4_cidr_block: str = proto.Field( proto.STRING, number=11, ) - allow_route_overlap = proto.Field( + allow_route_overlap: bool = proto.Field( proto.BOOL, number=12, ) - tpu_ipv4_cidr_block = proto.Field( + tpu_ipv4_cidr_block: str = proto.Field( proto.STRING, number=13, ) - use_routes = proto.Field( + use_routes: bool = proto.Field( proto.BOOL, number=15, ) - stack_type = proto.Field( + stack_type: StackType = proto.Field( proto.ENUM, number=16, enum=StackType, ) - ipv6_access_type = proto.Field( + ipv6_access_type: IPv6AccessType = proto.Field( proto.ENUM, number=17, enum=IPv6AccessType, ) - subnet_ipv6_cidr_block = proto.Field( + subnet_ipv6_cidr_block: str = proto.Field( proto.STRING, number=22, ) - services_ipv6_cidr_block = proto.Field( + services_ipv6_cidr_block: str = proto.Field( proto.STRING, number=23, ) @@ -1856,11 +1917,11 @@ class EvaluationMode(proto.Enum): DISABLED = 1 PROJECT_SINGLETON_POLICY_ENFORCE = 2 - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) - evaluation_mode = proto.Field( + evaluation_mode: EvaluationMode = proto.Field( proto.ENUM, number=2, enum=EvaluationMode, @@ -1877,7 +1938,7 @@ class PodSecurityPolicyConfig(proto.Message): under a PodSecurityPolicy to be created. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -1897,11 +1958,11 @@ class AuthenticatorGroupsConfig(proto.Message): be used. Only relevant if enabled = true. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) - security_group = proto.Field( + security_group: str = proto.Field( proto.STRING, number=2, ) @@ -1922,7 +1983,7 @@ class Type(proto.Enum): ENABLED = 2 SYSTEM_ONLY = 3 - type_ = proto.Field( + type_: Type = proto.Field( proto.ENUM, number=1, enum=Type, @@ -2025,11 +2086,11 @@ class Cluster(proto.Message): `subnetwork `__ to which the cluster is connected. On output this shows the subnetwork ID instead of the name. - node_pools (Sequence[google.cloud.container_v1beta1.types.NodePool]): + node_pools (MutableSequence[google.cloud.container_v1beta1.types.NodePool]): The node pools associated with this cluster. This field should not be set if "node_config" or "initial_node_count" are specified. - locations (Sequence[str]): + locations (MutableSequence[str]): The list of Google Compute Engine `zones `__ in which the cluster's nodes should be located. @@ -2051,7 +2112,7 @@ class Cluster(proto.Message): master/node upgrades are disabled. Alpha enabled clusters are automatically deleted thirty days after creation. - resource_labels (Mapping[str, str]): + resource_labels (MutableMapping[str, str]): The resource labels for the cluster to use to annotate any related Google Compute Engine resources. @@ -2204,7 +2265,7 @@ class Cluster(proto.Message): `CIDR `__ notation (e.g. ``1.2.3.4/29``). Service addresses are typically put in the last ``/16`` from the container CIDR. - instance_group_urls (Sequence[str]): + instance_group_urls (MutableSequence[str]): Deprecated. Use node_pools.instance_group_urls. current_node_count (int): [Output only] The number of nodes currently in the cluster. @@ -2231,7 +2292,7 @@ class Cluster(proto.Message): notation (e.g. ``1.2.3.4/29``). database_encryption (google.cloud.container_v1beta1.types.DatabaseEncryption): Configuration of etcd encryption. - conditions (Sequence[google.cloud.container_v1beta1.types.StatusCondition]): + conditions (MutableSequence[google.cloud.container_v1beta1.types.StatusCondition]): Which conditions caused the current cluster state. master (google.cloud.container_v1beta1.types.Master): @@ -2272,328 +2333,328 @@ class Status(proto.Enum): ERROR = 5 DEGRADED = 6 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=2, ) - initial_node_count = proto.Field( + initial_node_count: int = proto.Field( proto.INT32, number=3, ) - node_config = proto.Field( + node_config: "NodeConfig" = proto.Field( proto.MESSAGE, number=4, message="NodeConfig", ) - master_auth = proto.Field( + master_auth: "MasterAuth" = proto.Field( proto.MESSAGE, number=5, message="MasterAuth", ) - logging_service = proto.Field( + logging_service: str = proto.Field( proto.STRING, number=6, ) - monitoring_service = proto.Field( + monitoring_service: str = proto.Field( proto.STRING, number=7, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=8, ) - cluster_ipv4_cidr = proto.Field( + cluster_ipv4_cidr: str = proto.Field( proto.STRING, number=9, ) - addons_config = proto.Field( + addons_config: "AddonsConfig" = proto.Field( proto.MESSAGE, number=10, message="AddonsConfig", ) - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=11, ) - node_pools = proto.RepeatedField( + node_pools: MutableSequence["NodePool"] = proto.RepeatedField( proto.MESSAGE, number=12, message="NodePool", ) - locations = proto.RepeatedField( + locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=13, ) - enable_kubernetes_alpha = proto.Field( + enable_kubernetes_alpha: bool = proto.Field( proto.BOOL, number=14, ) - resource_labels = proto.MapField( + resource_labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=15, ) - label_fingerprint = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, number=16, ) - legacy_abac = proto.Field( + legacy_abac: "LegacyAbac" = proto.Field( proto.MESSAGE, number=18, message="LegacyAbac", ) - network_policy = proto.Field( + network_policy: "NetworkPolicy" = proto.Field( proto.MESSAGE, number=19, message="NetworkPolicy", ) - ip_allocation_policy = proto.Field( + ip_allocation_policy: "IPAllocationPolicy" = proto.Field( proto.MESSAGE, number=20, message="IPAllocationPolicy", ) - master_authorized_networks_config = proto.Field( + master_authorized_networks_config: "MasterAuthorizedNetworksConfig" = proto.Field( proto.MESSAGE, number=22, message="MasterAuthorizedNetworksConfig", ) - maintenance_policy = proto.Field( + maintenance_policy: "MaintenancePolicy" = proto.Field( proto.MESSAGE, number=23, message="MaintenancePolicy", ) - binary_authorization = proto.Field( + binary_authorization: "BinaryAuthorization" = proto.Field( proto.MESSAGE, number=24, message="BinaryAuthorization", ) - pod_security_policy_config = proto.Field( + pod_security_policy_config: "PodSecurityPolicyConfig" = proto.Field( proto.MESSAGE, number=25, message="PodSecurityPolicyConfig", ) - autoscaling = proto.Field( + autoscaling: "ClusterAutoscaling" = proto.Field( proto.MESSAGE, number=26, message="ClusterAutoscaling", ) - network_config = proto.Field( + network_config: "NetworkConfig" = proto.Field( proto.MESSAGE, number=27, message="NetworkConfig", ) - private_cluster = proto.Field( + private_cluster: bool = proto.Field( proto.BOOL, number=28, ) - master_ipv4_cidr_block = proto.Field( + master_ipv4_cidr_block: str = proto.Field( proto.STRING, number=29, ) - default_max_pods_constraint = proto.Field( + default_max_pods_constraint: "MaxPodsConstraint" = proto.Field( proto.MESSAGE, number=30, message="MaxPodsConstraint", ) - resource_usage_export_config = proto.Field( + resource_usage_export_config: "ResourceUsageExportConfig" = proto.Field( proto.MESSAGE, number=33, message="ResourceUsageExportConfig", ) - authenticator_groups_config = proto.Field( + authenticator_groups_config: "AuthenticatorGroupsConfig" = proto.Field( proto.MESSAGE, number=34, message="AuthenticatorGroupsConfig", ) - private_cluster_config = proto.Field( + private_cluster_config: "PrivateClusterConfig" = proto.Field( proto.MESSAGE, number=37, message="PrivateClusterConfig", ) - vertical_pod_autoscaling = proto.Field( + vertical_pod_autoscaling: "VerticalPodAutoscaling" = proto.Field( proto.MESSAGE, number=39, message="VerticalPodAutoscaling", ) - shielded_nodes = proto.Field( + shielded_nodes: "ShieldedNodes" = proto.Field( proto.MESSAGE, number=40, message="ShieldedNodes", ) - release_channel = proto.Field( + release_channel: "ReleaseChannel" = proto.Field( proto.MESSAGE, number=41, message="ReleaseChannel", ) - workload_identity_config = proto.Field( + workload_identity_config: "WorkloadIdentityConfig" = proto.Field( proto.MESSAGE, number=43, message="WorkloadIdentityConfig", ) - workload_certificates = proto.Field( + workload_certificates: "WorkloadCertificates" = proto.Field( proto.MESSAGE, number=52, message="WorkloadCertificates", ) - mesh_certificates = proto.Field( + mesh_certificates: "MeshCertificates" = proto.Field( proto.MESSAGE, number=67, message="MeshCertificates", ) - workload_alts_config = proto.Field( + workload_alts_config: "WorkloadALTSConfig" = proto.Field( proto.MESSAGE, number=53, message="WorkloadALTSConfig", ) - cost_management_config = proto.Field( + cost_management_config: "CostManagementConfig" = proto.Field( proto.MESSAGE, number=45, message="CostManagementConfig", ) - cluster_telemetry = proto.Field( + cluster_telemetry: "ClusterTelemetry" = proto.Field( proto.MESSAGE, number=46, message="ClusterTelemetry", ) - tpu_config = proto.Field( + tpu_config: "TpuConfig" = proto.Field( proto.MESSAGE, number=47, message="TpuConfig", ) - notification_config = proto.Field( + notification_config: "NotificationConfig" = proto.Field( proto.MESSAGE, number=49, message="NotificationConfig", ) - confidential_nodes = proto.Field( + confidential_nodes: "ConfidentialNodes" = proto.Field( proto.MESSAGE, number=50, message="ConfidentialNodes", ) - identity_service_config = proto.Field( + identity_service_config: "IdentityServiceConfig" = proto.Field( proto.MESSAGE, number=54, message="IdentityServiceConfig", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=100, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=101, ) - endpoint = proto.Field( + endpoint: str = proto.Field( proto.STRING, number=102, ) - initial_cluster_version = proto.Field( + initial_cluster_version: str = proto.Field( proto.STRING, number=103, ) - current_master_version = proto.Field( + current_master_version: str = proto.Field( proto.STRING, number=104, ) - current_node_version = proto.Field( + current_node_version: str = proto.Field( proto.STRING, number=105, ) - create_time = proto.Field( + create_time: str = proto.Field( proto.STRING, number=106, ) - status = proto.Field( + status: Status = proto.Field( proto.ENUM, number=107, enum=Status, ) - status_message = proto.Field( + status_message: str = proto.Field( proto.STRING, number=108, ) - node_ipv4_cidr_size = proto.Field( + node_ipv4_cidr_size: int = proto.Field( proto.INT32, number=109, ) - services_ipv4_cidr = proto.Field( + services_ipv4_cidr: str = proto.Field( proto.STRING, number=110, ) - instance_group_urls = proto.RepeatedField( + instance_group_urls: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=111, ) - current_node_count = proto.Field( + current_node_count: int = proto.Field( proto.INT32, number=112, ) - expire_time = proto.Field( + expire_time: str = proto.Field( proto.STRING, number=113, ) - location = proto.Field( + location: str = proto.Field( proto.STRING, number=114, ) - enable_tpu = proto.Field( + enable_tpu: bool = proto.Field( proto.BOOL, number=115, ) - tpu_ipv4_cidr_block = proto.Field( + tpu_ipv4_cidr_block: str = proto.Field( proto.STRING, number=116, ) - database_encryption = proto.Field( + database_encryption: "DatabaseEncryption" = proto.Field( proto.MESSAGE, number=38, message="DatabaseEncryption", ) - conditions = proto.RepeatedField( + conditions: MutableSequence["StatusCondition"] = proto.RepeatedField( proto.MESSAGE, number=118, message="StatusCondition", ) - master = proto.Field( + master: "Master" = proto.Field( proto.MESSAGE, number=124, message="Master", ) - autopilot = proto.Field( + autopilot: "Autopilot" = proto.Field( proto.MESSAGE, number=128, message="Autopilot", ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=129, ) - node_pool_defaults = proto.Field( + node_pool_defaults: "NodePoolDefaults" = proto.Field( proto.MESSAGE, number=131, optional=True, message="NodePoolDefaults", ) - logging_config = proto.Field( + logging_config: "LoggingConfig" = proto.Field( proto.MESSAGE, number=132, message="LoggingConfig", ) - monitoring_config = proto.Field( + monitoring_config: "MonitoringConfig" = proto.Field( proto.MESSAGE, number=133, message="MonitoringConfig", ) - node_pool_auto_config = proto.Field( + node_pool_auto_config: "NodePoolAutoConfig" = proto.Field( proto.MESSAGE, number=136, message="NodePoolAutoConfig", ) - protect_config = proto.Field( + protect_config: "ProtectConfig" = proto.Field( proto.MESSAGE, number=137, optional=True, @@ -2621,7 +2682,7 @@ class Mode(proto.Enum): BASELINE = 2 RESTRICTED = 3 - audit_mode = proto.Field( + audit_mode: Mode = proto.Field( proto.ENUM, number=1, optional=True, @@ -2654,13 +2715,13 @@ class WorkloadVulnerabilityMode(proto.Enum): DISABLED = 1 BASIC = 2 - workload_config = proto.Field( + workload_config: "WorkloadConfig" = proto.Field( proto.MESSAGE, number=1, optional=True, message="WorkloadConfig", ) - workload_vulnerability_mode = proto.Field( + workload_vulnerability_mode: WorkloadVulnerabilityMode = proto.Field( proto.ENUM, number=2, optional=True, @@ -2677,7 +2738,7 @@ class NodePoolDefaults(proto.Message): defaults. """ - node_config_defaults = proto.Field( + node_config_defaults: "NodeConfigDefaults" = proto.Field( proto.MESSAGE, number=1, message="NodeConfigDefaults", @@ -2695,12 +2756,12 @@ class NodeConfigDefaults(proto.Message): Logging configuration for node pools. """ - gcfs_config = proto.Field( + gcfs_config: "GcfsConfig" = proto.Field( proto.MESSAGE, number=1, message="GcfsConfig", ) - logging_config = proto.Field( + logging_config: "NodePoolLoggingConfig" = proto.Field( proto.MESSAGE, number=3, message="NodePoolLoggingConfig", @@ -2722,7 +2783,7 @@ class NodePoolAutoConfig(proto.Message): RFC1035. """ - network_tags = proto.Field( + network_tags: "NetworkTags" = proto.Field( proto.MESSAGE, number=1, message="NetworkTags", @@ -2781,7 +2842,7 @@ class ClusterUpdate(proto.Message): desired_node_pool_id. If there is only one pool in the cluster and desired_node_pool_id is not provided then the change applies to that single node pool. - desired_locations (Sequence[str]): + desired_locations (MutableSequence[str]): The desired list of Google Compute Engine `zones `__ in which the cluster's nodes should be located. @@ -2899,6 +2960,11 @@ class ClusterUpdate(proto.Message): desired_identity_service_config (google.cloud.container_v1beta1.types.IdentityServiceConfig): The desired Identity Service component configuration. + desired_enable_private_endpoint (bool): + Enable/Disable private endpoint for the + cluster's master. + + This field is a member of `oneof`_ ``_desired_enable_private_endpoint``. desired_node_pool_auto_config_network_tags (google.cloud.container_v1beta1.types.NetworkTags): The desired network tags that apply to all auto-provisioned node pools in autopilot @@ -2909,216 +2975,231 @@ class ClusterUpdate(proto.Message): cluster. This field is a member of `oneof`_ ``_desired_protect_config``. + desired_gateway_api_config (google.cloud.container_v1beta1.types.GatewayAPIConfig): + The desired config of Gateway API on this + cluster. desired_node_pool_logging_config (google.cloud.container_v1beta1.types.NodePoolLoggingConfig): The desired node pool logging configuration defaults for the cluster. """ - desired_node_version = proto.Field( + desired_node_version: str = proto.Field( proto.STRING, number=4, ) - desired_monitoring_service = proto.Field( + desired_monitoring_service: str = proto.Field( proto.STRING, number=5, ) - desired_addons_config = proto.Field( + desired_addons_config: "AddonsConfig" = proto.Field( proto.MESSAGE, number=6, message="AddonsConfig", ) - desired_node_pool_id = proto.Field( + desired_node_pool_id: str = proto.Field( proto.STRING, number=7, ) - desired_image_type = proto.Field( + desired_image_type: str = proto.Field( proto.STRING, number=8, ) - desired_node_pool_autoscaling = proto.Field( + desired_node_pool_autoscaling: "NodePoolAutoscaling" = proto.Field( proto.MESSAGE, number=9, message="NodePoolAutoscaling", ) - desired_locations = proto.RepeatedField( + desired_locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=10, ) - desired_master_authorized_networks_config = proto.Field( - proto.MESSAGE, - number=12, - message="MasterAuthorizedNetworksConfig", + desired_master_authorized_networks_config: "MasterAuthorizedNetworksConfig" = ( + proto.Field( + proto.MESSAGE, + number=12, + message="MasterAuthorizedNetworksConfig", + ) ) - desired_pod_security_policy_config = proto.Field( + desired_pod_security_policy_config: "PodSecurityPolicyConfig" = proto.Field( proto.MESSAGE, number=14, message="PodSecurityPolicyConfig", ) - desired_cluster_autoscaling = proto.Field( + desired_cluster_autoscaling: "ClusterAutoscaling" = proto.Field( proto.MESSAGE, number=15, message="ClusterAutoscaling", ) - desired_binary_authorization = proto.Field( + desired_binary_authorization: "BinaryAuthorization" = proto.Field( proto.MESSAGE, number=16, message="BinaryAuthorization", ) - desired_logging_service = proto.Field( + desired_logging_service: str = proto.Field( proto.STRING, number=19, ) - desired_resource_usage_export_config = proto.Field( + desired_resource_usage_export_config: "ResourceUsageExportConfig" = proto.Field( proto.MESSAGE, number=21, message="ResourceUsageExportConfig", ) - desired_vertical_pod_autoscaling = proto.Field( + desired_vertical_pod_autoscaling: "VerticalPodAutoscaling" = proto.Field( proto.MESSAGE, number=22, message="VerticalPodAutoscaling", ) - desired_private_cluster_config = proto.Field( + desired_private_cluster_config: "PrivateClusterConfig" = proto.Field( proto.MESSAGE, number=25, message="PrivateClusterConfig", ) - desired_intra_node_visibility_config = proto.Field( + desired_intra_node_visibility_config: "IntraNodeVisibilityConfig" = proto.Field( proto.MESSAGE, number=26, message="IntraNodeVisibilityConfig", ) - desired_default_snat_status = proto.Field( + desired_default_snat_status: "DefaultSnatStatus" = proto.Field( proto.MESSAGE, number=28, message="DefaultSnatStatus", ) - desired_cluster_telemetry = proto.Field( + desired_cluster_telemetry: "ClusterTelemetry" = proto.Field( proto.MESSAGE, number=30, message="ClusterTelemetry", ) - desired_release_channel = proto.Field( + desired_release_channel: "ReleaseChannel" = proto.Field( proto.MESSAGE, number=31, message="ReleaseChannel", ) - desired_tpu_config = proto.Field( + desired_tpu_config: "TpuConfig" = proto.Field( proto.MESSAGE, number=38, message="TpuConfig", ) - desired_l4ilb_subsetting_config = proto.Field( + desired_l4ilb_subsetting_config: "ILBSubsettingConfig" = proto.Field( proto.MESSAGE, number=39, message="ILBSubsettingConfig", ) - desired_datapath_provider = proto.Field( + desired_datapath_provider: "DatapathProvider" = proto.Field( proto.ENUM, number=50, enum="DatapathProvider", ) - desired_private_ipv6_google_access = proto.Field( + desired_private_ipv6_google_access: "PrivateIPv6GoogleAccess" = proto.Field( proto.ENUM, number=51, enum="PrivateIPv6GoogleAccess", ) - desired_notification_config = proto.Field( + desired_notification_config: "NotificationConfig" = proto.Field( proto.MESSAGE, number=55, message="NotificationConfig", ) - desired_master_version = proto.Field( + desired_master_version: str = proto.Field( proto.STRING, number=100, ) - desired_gcfs_config = proto.Field( + desired_gcfs_config: "GcfsConfig" = proto.Field( proto.MESSAGE, number=109, message="GcfsConfig", ) - desired_database_encryption = proto.Field( + desired_database_encryption: "DatabaseEncryption" = proto.Field( proto.MESSAGE, number=46, message="DatabaseEncryption", ) - desired_workload_identity_config = proto.Field( + desired_workload_identity_config: "WorkloadIdentityConfig" = proto.Field( proto.MESSAGE, number=47, message="WorkloadIdentityConfig", ) - desired_workload_certificates = proto.Field( + desired_workload_certificates: "WorkloadCertificates" = proto.Field( proto.MESSAGE, number=61, message="WorkloadCertificates", ) - desired_mesh_certificates = proto.Field( + desired_mesh_certificates: "MeshCertificates" = proto.Field( proto.MESSAGE, number=67, message="MeshCertificates", ) - desired_workload_alts_config = proto.Field( + desired_workload_alts_config: "WorkloadALTSConfig" = proto.Field( proto.MESSAGE, number=62, message="WorkloadALTSConfig", ) - desired_shielded_nodes = proto.Field( + desired_shielded_nodes: "ShieldedNodes" = proto.Field( proto.MESSAGE, number=48, message="ShieldedNodes", ) - desired_cost_management_config = proto.Field( + desired_cost_management_config: "CostManagementConfig" = proto.Field( proto.MESSAGE, number=49, message="CostManagementConfig", ) - desired_master = proto.Field( + desired_master: "Master" = proto.Field( proto.MESSAGE, number=52, message="Master", ) - desired_dns_config = proto.Field( + desired_dns_config: "DNSConfig" = proto.Field( proto.MESSAGE, number=53, message="DNSConfig", ) - desired_service_external_ips_config = proto.Field( + desired_service_external_ips_config: "ServiceExternalIPsConfig" = proto.Field( proto.MESSAGE, number=60, message="ServiceExternalIPsConfig", ) - desired_authenticator_groups_config = proto.Field( + desired_authenticator_groups_config: "AuthenticatorGroupsConfig" = proto.Field( proto.MESSAGE, number=63, message="AuthenticatorGroupsConfig", ) - desired_logging_config = proto.Field( + desired_logging_config: "LoggingConfig" = proto.Field( proto.MESSAGE, number=64, message="LoggingConfig", ) - desired_monitoring_config = proto.Field( + desired_monitoring_config: "MonitoringConfig" = proto.Field( proto.MESSAGE, number=65, message="MonitoringConfig", ) - desired_identity_service_config = proto.Field( + desired_identity_service_config: "IdentityServiceConfig" = proto.Field( proto.MESSAGE, number=66, message="IdentityServiceConfig", ) - desired_node_pool_auto_config_network_tags = proto.Field( + desired_enable_private_endpoint: bool = proto.Field( + proto.BOOL, + number=71, + optional=True, + ) + desired_node_pool_auto_config_network_tags: "NetworkTags" = proto.Field( proto.MESSAGE, number=110, message="NetworkTags", ) - desired_protect_config = proto.Field( + desired_protect_config: "ProtectConfig" = proto.Field( proto.MESSAGE, number=112, optional=True, message="ProtectConfig", ) - desired_node_pool_logging_config = proto.Field( + desired_gateway_api_config: "GatewayAPIConfig" = proto.Field( + proto.MESSAGE, + number=114, + message="GatewayAPIConfig", + ) + desired_node_pool_logging_config: "NodePoolLoggingConfig" = proto.Field( proto.MESSAGE, number=116, message="NodePoolLoggingConfig", @@ -3170,10 +3251,10 @@ class Operation(proto.Message): progress (google.cloud.container_v1beta1.types.OperationProgress): Output only. [Output only] Progress information for an operation. - cluster_conditions (Sequence[google.cloud.container_v1beta1.types.StatusCondition]): + cluster_conditions (MutableSequence[google.cloud.container_v1beta1.types.StatusCondition]): Which conditions caused the current cluster state. Deprecated. Use field error instead. - nodepool_conditions (Sequence[google.cloud.container_v1beta1.types.StatusCondition]): + nodepool_conditions (MutableSequence[google.cloud.container_v1beta1.types.StatusCondition]): Which conditions caused the current node pool state. Deprecated. Use field error instead. error (google.rpc.status_pb2.Status): @@ -3209,68 +3290,68 @@ class Type(proto.Enum): SET_NETWORK_POLICY = 15 SET_MAINTENANCE_POLICY = 16 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - operation_type = proto.Field( + operation_type: Type = proto.Field( proto.ENUM, number=3, enum=Type, ) - status = proto.Field( + status: Status = proto.Field( proto.ENUM, number=4, enum=Status, ) - detail = proto.Field( + detail: str = proto.Field( proto.STRING, number=8, ) - status_message = proto.Field( + status_message: str = proto.Field( proto.STRING, number=5, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=6, ) - target_link = proto.Field( + target_link: str = proto.Field( proto.STRING, number=7, ) - location = proto.Field( + location: str = proto.Field( proto.STRING, number=9, ) - start_time = proto.Field( + start_time: str = proto.Field( proto.STRING, number=10, ) - end_time = proto.Field( + end_time: str = proto.Field( proto.STRING, number=11, ) - progress = proto.Field( + progress: "OperationProgress" = proto.Field( proto.MESSAGE, number=12, message="OperationProgress", ) - cluster_conditions = proto.RepeatedField( + cluster_conditions: MutableSequence["StatusCondition"] = proto.RepeatedField( proto.MESSAGE, number=13, message="StatusCondition", ) - nodepool_conditions = proto.RepeatedField( + nodepool_conditions: MutableSequence["StatusCondition"] = proto.RepeatedField( proto.MESSAGE, number=14, message="StatusCondition", ) - error = proto.Field( + error: status_pb2.Status = proto.Field( proto.MESSAGE, number=15, message=status_pb2.Status, @@ -3288,12 +3369,12 @@ class OperationProgress(proto.Message): status (google.cloud.container_v1beta1.types.Operation.Status): Status of an operation stage. Unset for single-stage operations. - metrics (Sequence[google.cloud.container_v1beta1.types.OperationProgress.Metric]): + metrics (MutableSequence[google.cloud.container_v1beta1.types.OperationProgress.Metric]): Progress metric bundle, for example: metrics: [{name: "nodes done", int_value: 15}, {name: "nodes total", int_value: 32}] or metrics: [{name: "progress", double_value: 0.56}, {name: "progress scale", double_value: 1.0}] - stages (Sequence[google.cloud.container_v1beta1.types.OperationProgress]): + stages (MutableSequence[google.cloud.container_v1beta1.types.OperationProgress]): Substages of an operation or a stage. """ @@ -3326,41 +3407,41 @@ class Metric(proto.Message): This field is a member of `oneof`_ ``value``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - int_value = proto.Field( + int_value: int = proto.Field( proto.INT64, number=2, oneof="value", ) - double_value = proto.Field( + double_value: float = proto.Field( proto.DOUBLE, number=3, oneof="value", ) - string_value = proto.Field( + string_value: str = proto.Field( proto.STRING, number=4, oneof="value", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - status = proto.Field( + status: "Operation.Status" = proto.Field( proto.ENUM, number=2, enum="Operation.Status", ) - metrics = proto.RepeatedField( + metrics: MutableSequence[Metric] = proto.RepeatedField( proto.MESSAGE, number=3, message=Metric, ) - stages = proto.RepeatedField( + stages: MutableSequence["OperationProgress"] = proto.RepeatedField( proto.MESSAGE, number=4, message="OperationProgress", @@ -3390,20 +3471,20 @@ class CreateClusterRequest(proto.Message): created. Specified in the format ``projects/*/locations/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster = proto.Field( + cluster: "Cluster" = proto.Field( proto.MESSAGE, number=3, message="Cluster", ) - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=5, ) @@ -3434,19 +3515,19 @@ class GetClusterRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=5, ) @@ -3479,24 +3560,24 @@ class UpdateClusterRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - update = proto.Field( + update: "ClusterUpdate" = proto.Field( proto.MESSAGE, number=4, message="ClusterUpdate", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=5, ) @@ -3542,7 +3623,7 @@ class UpdateNodePoolRequest(proto.Message): image_type (str): Required. The desired image type for the node pool. - locations (Sequence[str]): + locations (MutableSequence[str]): The desired list of Google Compute Engine `zones `__ in which the node pool's nodes should be located. Changing @@ -3591,100 +3672,109 @@ class UpdateNodePoolRequest(proto.Message): Enable or disable gvnic on the node pool. logging_config (google.cloud.container_v1beta1.types.NodePoolLoggingConfig): Logging configuration. + resource_labels (google.cloud.container_v1beta1.types.ResourceLabels): + The resource labels for the node pool to use + to annotate any related Google Compute Engine + resources. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - node_pool_id = proto.Field( + node_pool_id: str = proto.Field( proto.STRING, number=4, ) - node_version = proto.Field( + node_version: str = proto.Field( proto.STRING, number=5, ) - image_type = proto.Field( + image_type: str = proto.Field( proto.STRING, number=6, ) - locations = proto.RepeatedField( + locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=13, ) - workload_metadata_config = proto.Field( + workload_metadata_config: "WorkloadMetadataConfig" = proto.Field( proto.MESSAGE, number=14, message="WorkloadMetadataConfig", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=8, ) - upgrade_settings = proto.Field( + upgrade_settings: "NodePool.UpgradeSettings" = proto.Field( proto.MESSAGE, number=15, message="NodePool.UpgradeSettings", ) - tags = proto.Field( + tags: "NetworkTags" = proto.Field( proto.MESSAGE, number=16, message="NetworkTags", ) - taints = proto.Field( + taints: "NodeTaints" = proto.Field( proto.MESSAGE, number=17, message="NodeTaints", ) - labels = proto.Field( + labels: "NodeLabels" = proto.Field( proto.MESSAGE, number=18, message="NodeLabels", ) - linux_node_config = proto.Field( + linux_node_config: "LinuxNodeConfig" = proto.Field( proto.MESSAGE, number=19, message="LinuxNodeConfig", ) - kubelet_config = proto.Field( + kubelet_config: "NodeKubeletConfig" = proto.Field( proto.MESSAGE, number=20, message="NodeKubeletConfig", ) - node_network_config = proto.Field( + node_network_config: "NodeNetworkConfig" = proto.Field( proto.MESSAGE, number=21, message="NodeNetworkConfig", ) - gcfs_config = proto.Field( + gcfs_config: "GcfsConfig" = proto.Field( proto.MESSAGE, number=22, message="GcfsConfig", ) - confidential_nodes = proto.Field( + confidential_nodes: "ConfidentialNodes" = proto.Field( proto.MESSAGE, number=23, message="ConfidentialNodes", ) - gvnic = proto.Field( + gvnic: "VirtualNIC" = proto.Field( proto.MESSAGE, number=29, message="VirtualNIC", ) - logging_config = proto.Field( + logging_config: "NodePoolLoggingConfig" = proto.Field( proto.MESSAGE, number=32, message="NodePoolLoggingConfig", ) + resource_labels: "ResourceLabels" = proto.Field( + proto.MESSAGE, + number=33, + message="ResourceLabels", + ) class SetNodePoolAutoscalingRequest(proto.Message): @@ -3720,28 +3810,28 @@ class SetNodePoolAutoscalingRequest(proto.Message): ``projects/*/locations/*/clusters/*/nodePools/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - node_pool_id = proto.Field( + node_pool_id: str = proto.Field( proto.STRING, number=4, ) - autoscaling = proto.Field( + autoscaling: "NodePoolAutoscaling" = proto.Field( proto.MESSAGE, number=5, message="NodePoolAutoscaling", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) @@ -3787,23 +3877,23 @@ class SetLoggingServiceRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - logging_service = proto.Field( + logging_service: str = proto.Field( proto.STRING, number=4, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=5, ) @@ -3850,23 +3940,23 @@ class SetMonitoringServiceRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - monitoring_service = proto.Field( + monitoring_service: str = proto.Field( proto.STRING, number=4, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) @@ -3900,24 +3990,24 @@ class SetAddonsConfigRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - addons_config = proto.Field( + addons_config: "AddonsConfig" = proto.Field( proto.MESSAGE, number=4, message="AddonsConfig", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) @@ -3942,7 +4032,7 @@ class SetLocationsRequest(proto.Message): Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. - locations (Sequence[str]): + locations (MutableSequence[str]): Required. The desired list of Google Compute Engine `zones `__ in which the cluster's nodes should be located. Changing the @@ -3957,23 +4047,23 @@ class SetLocationsRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - locations = proto.RepeatedField( + locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=4, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) @@ -4017,23 +4107,23 @@ class UpdateMasterRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - master_version = proto.Field( + master_version: str = proto.Field( proto.STRING, number=4, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=7, ) @@ -4076,29 +4166,29 @@ class Action(proto.Enum): GENERATE_PASSWORD = 2 SET_USERNAME = 3 - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - action = proto.Field( + action: Action = proto.Field( proto.ENUM, number=4, enum=Action, ) - update = proto.Field( + update: "MasterAuth" = proto.Field( proto.MESSAGE, number=5, message="MasterAuth", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=7, ) @@ -4129,19 +4219,19 @@ class DeleteClusterRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=4, ) @@ -4168,15 +4258,15 @@ class ListClustersRequest(proto.Message): Location "-" matches all zones and all regions. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=4, ) @@ -4186,20 +4276,20 @@ class ListClustersResponse(proto.Message): r"""ListClustersResponse is the result of ListClustersRequest. Attributes: - clusters (Sequence[google.cloud.container_v1beta1.types.Cluster]): + clusters (MutableSequence[google.cloud.container_v1beta1.types.Cluster]): A list of clusters in the project in the specified zone, or across all ones. - missing_zones (Sequence[str]): + missing_zones (MutableSequence[str]): If any zones are listed here, the list of clusters returned may be missing those zones. """ - clusters = proto.RepeatedField( + clusters: MutableSequence["Cluster"] = proto.RepeatedField( proto.MESSAGE, number=1, message="Cluster", ) - missing_zones = proto.RepeatedField( + missing_zones: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=2, ) @@ -4230,19 +4320,19 @@ class GetOperationRequest(proto.Message): ``projects/*/locations/*/operations/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - operation_id = proto.Field( + operation_id: str = proto.Field( proto.STRING, number=3, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=5, ) @@ -4270,15 +4360,15 @@ class ListOperationsRequest(proto.Message): and all regions. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=4, ) @@ -4309,19 +4399,19 @@ class CancelOperationRequest(proto.Message): ``projects/*/locations/*/operations/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - operation_id = proto.Field( + operation_id: str = proto.Field( proto.STRING, number=3, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=4, ) @@ -4332,21 +4422,21 @@ class ListOperationsResponse(proto.Message): ListOperationsRequest. Attributes: - operations (Sequence[google.cloud.container_v1beta1.types.Operation]): + operations (MutableSequence[google.cloud.container_v1beta1.types.Operation]): A list of operations in the project in the specified zone. - missing_zones (Sequence[str]): + missing_zones (MutableSequence[str]): If any zones are listed here, the list of operations returned may be missing the operations from those zones. """ - operations = proto.RepeatedField( + operations: MutableSequence["Operation"] = proto.RepeatedField( proto.MESSAGE, number=1, message="Operation", ) - missing_zones = proto.RepeatedField( + missing_zones: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=2, ) @@ -4372,15 +4462,15 @@ class GetServerConfigRequest(proto.Message): specified in the format ``projects/*/locations/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=4, ) @@ -4393,19 +4483,19 @@ class ServerConfig(proto.Message): default_cluster_version (str): Version of Kubernetes the service deploys by default. - valid_node_versions (Sequence[str]): + valid_node_versions (MutableSequence[str]): List of valid node upgrade target versions, in descending order. default_image_type (str): Default image type. - valid_image_types (Sequence[str]): + valid_image_types (MutableSequence[str]): List of valid image types. - valid_master_versions (Sequence[str]): + valid_master_versions (MutableSequence[str]): List of valid master versions, in descending order. - channels (Sequence[google.cloud.container_v1beta1.types.ServerConfig.ReleaseChannelConfig]): + channels (MutableSequence[google.cloud.container_v1beta1.types.ServerConfig.ReleaseChannelConfig]): List of release channel configurations. - windows_version_maps (Mapping[str, google.cloud.container_v1beta1.types.WindowsVersions]): + windows_version_maps (MutableMapping[str, google.cloud.container_v1beta1.types.WindowsVersions]): Maps of Kubernetes version and supported Windows server versions. """ @@ -4421,10 +4511,10 @@ class ReleaseChannelConfig(proto.Message): default_version (str): The default version for newly created clusters on the channel. - available_versions (Sequence[google.cloud.container_v1beta1.types.ServerConfig.ReleaseChannelConfig.AvailableVersion]): + available_versions (MutableSequence[google.cloud.container_v1beta1.types.ServerConfig.ReleaseChannelConfig.AvailableVersion]): Deprecated. This field has been deprecated and replaced with the valid_versions field. - valid_versions (Sequence[str]): + valid_versions (MutableSequence[str]): List of valid versions for the channel. """ @@ -4438,60 +4528,62 @@ class AvailableVersion(proto.Message): Reason for availability. """ - version = proto.Field( + version: str = proto.Field( proto.STRING, number=1, ) - reason = proto.Field( + reason: str = proto.Field( proto.STRING, number=2, ) - channel = proto.Field( + channel: "ReleaseChannel.Channel" = proto.Field( proto.ENUM, number=1, enum="ReleaseChannel.Channel", ) - default_version = proto.Field( + default_version: str = proto.Field( proto.STRING, number=2, ) - available_versions = proto.RepeatedField( + available_versions: MutableSequence[ + "ServerConfig.ReleaseChannelConfig.AvailableVersion" + ] = proto.RepeatedField( proto.MESSAGE, number=3, message="ServerConfig.ReleaseChannelConfig.AvailableVersion", ) - valid_versions = proto.RepeatedField( + valid_versions: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=4, ) - default_cluster_version = proto.Field( + default_cluster_version: str = proto.Field( proto.STRING, number=1, ) - valid_node_versions = proto.RepeatedField( + valid_node_versions: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) - default_image_type = proto.Field( + default_image_type: str = proto.Field( proto.STRING, number=4, ) - valid_image_types = proto.RepeatedField( + valid_image_types: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=5, ) - valid_master_versions = proto.RepeatedField( + valid_master_versions: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=6, ) - channels = proto.RepeatedField( + channels: MutableSequence[ReleaseChannelConfig] = proto.RepeatedField( proto.MESSAGE, number=9, message=ReleaseChannelConfig, ) - windows_version_maps = proto.MapField( + windows_version_maps: MutableMapping[str, "WindowsVersions"] = proto.MapField( proto.STRING, proto.MESSAGE, number=10, @@ -4503,7 +4595,7 @@ class WindowsVersions(proto.Message): r"""Windows server versions. Attributes: - windows_versions (Sequence[google.cloud.container_v1beta1.types.WindowsVersions.WindowsVersion]): + windows_versions (MutableSequence[google.cloud.container_v1beta1.types.WindowsVersions.WindowsVersion]): List of Windows server versions. """ @@ -4519,21 +4611,21 @@ class WindowsVersion(proto.Message): Mainstream support end date """ - image_type = proto.Field( + image_type: str = proto.Field( proto.STRING, number=1, ) - os_version = proto.Field( + os_version: str = proto.Field( proto.STRING, number=2, ) - support_end_date = proto.Field( + support_end_date: date_pb2.Date = proto.Field( proto.MESSAGE, number=3, message=date_pb2.Date, ) - windows_versions = proto.RepeatedField( + windows_versions: MutableSequence[WindowsVersion] = proto.RepeatedField( proto.MESSAGE, number=1, message=WindowsVersion, @@ -4567,24 +4659,24 @@ class CreateNodePoolRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - node_pool = proto.Field( + node_pool: "NodePool" = proto.Field( proto.MESSAGE, number=4, message="NodePool", ) - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=6, ) @@ -4619,23 +4711,23 @@ class DeleteNodePoolRequest(proto.Message): ``projects/*/locations/*/clusters/*/nodePools/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - node_pool_id = proto.Field( + node_pool_id: str = proto.Field( proto.STRING, number=4, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) @@ -4666,19 +4758,19 @@ class ListNodePoolsRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=5, ) @@ -4713,23 +4805,23 @@ class GetNodePoolRequest(proto.Message): ``projects/*/locations/*/clusters/*/nodePools/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - node_pool_id = proto.Field( + node_pool_id: str = proto.Field( proto.STRING, number=4, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) @@ -4764,7 +4856,7 @@ class StandardRolloutPolicy(proto.Message): Attributes: batch_percentage (float): - Percentage of the bool pool nodes to drain in a batch. The + Percentage of the blue pool nodes to drain in a batch. The range of this field should be (0.0, 1.0]. This field is a member of `oneof`_ ``update_batch_size``. @@ -4779,30 +4871,30 @@ class StandardRolloutPolicy(proto.Message): This field is a member of `oneof`_ ``_batch_soak_duration``. """ - batch_percentage = proto.Field( + batch_percentage: float = proto.Field( proto.FLOAT, number=1, oneof="update_batch_size", ) - batch_node_count = proto.Field( + batch_node_count: int = proto.Field( proto.INT32, number=2, oneof="update_batch_size", ) - batch_soak_duration = proto.Field( + batch_soak_duration: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=3, optional=True, message=duration_pb2.Duration, ) - standard_rollout_policy = proto.Field( + standard_rollout_policy: StandardRolloutPolicy = proto.Field( proto.MESSAGE, number=1, oneof="rollout_policy", message=StandardRolloutPolicy, ) - node_pool_soak_duration = proto.Field( + node_pool_soak_duration: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=2, optional=True, @@ -4854,7 +4946,7 @@ class NodePool(proto.Message): quota `__ is sufficient for this number of instances. You must also have available firewall and routes quota. - locations (Sequence[str]): + locations (MutableSequence[str]): The list of Google Compute Engine `zones `__ in which the NodePool's nodes should be located. @@ -4873,7 +4965,7 @@ class NodePool(proto.Message): [Output only] Server-defined URL for the resource. version (str): The version of the Kubernetes of this node. - instance_group_urls (Sequence[str]): + instance_group_urls (MutableSequence[str]): [Output only] The resource URLs of the `managed instance groups `__ associated with this node pool. During the node pool @@ -4896,7 +4988,7 @@ class NodePool(proto.Message): The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. - conditions (Sequence[google.cloud.container_v1beta1.types.StatusCondition]): + conditions (MutableSequence[google.cloud.container_v1beta1.types.StatusCondition]): Which conditions caused the current node pool state. pod_ipv4_cidr_size (int): @@ -4971,21 +5063,21 @@ class UpgradeSettings(proto.Message): This field is a member of `oneof`_ ``_blue_green_settings``. """ - max_surge = proto.Field( + max_surge: int = proto.Field( proto.INT32, number=1, ) - max_unavailable = proto.Field( + max_unavailable: int = proto.Field( proto.INT32, number=2, ) - strategy = proto.Field( + strategy: "NodePoolUpdateStrategy" = proto.Field( proto.ENUM, number=3, optional=True, enum="NodePoolUpdateStrategy", ) - blue_green_settings = proto.Field( + blue_green_settings: "BlueGreenSettings" = proto.Field( proto.MESSAGE, number=4, optional=True, @@ -5008,11 +5100,11 @@ class BlueGreenInfo(proto.Message): Attributes: phase (google.cloud.container_v1beta1.types.NodePool.UpdateInfo.BlueGreenInfo.Phase): Current blue-green upgrade phase. - blue_instance_group_urls (Sequence[str]): + blue_instance_group_urls (MutableSequence[str]): The resource URLs of the [managed instance groups] (/compute/docs/instance-groups/creating-groups-of-managed-instances) associated with blue pool. - green_instance_group_urls (Sequence[str]): + green_instance_group_urls (MutableSequence[str]): The resource URLs of the [managed instance groups] (/compute/docs/instance-groups/creating-groups-of-managed-instances) associated with green pool. @@ -5038,29 +5130,29 @@ class Phase(proto.Enum): DELETING_BLUE_POOL = 6 ROLLBACK_STARTED = 7 - phase = proto.Field( + phase: "NodePool.UpdateInfo.BlueGreenInfo.Phase" = proto.Field( proto.ENUM, number=1, enum="NodePool.UpdateInfo.BlueGreenInfo.Phase", ) - blue_instance_group_urls = proto.RepeatedField( + blue_instance_group_urls: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=2, ) - green_instance_group_urls = proto.RepeatedField( + green_instance_group_urls: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) - blue_pool_deletion_start_time = proto.Field( + blue_pool_deletion_start_time: str = proto.Field( proto.STRING, number=4, ) - green_pool_version = proto.Field( + green_pool_version: str = proto.Field( proto.STRING, number=5, ) - blue_green_info = proto.Field( + blue_green_info: "NodePool.UpdateInfo.BlueGreenInfo" = proto.Field( proto.MESSAGE, number=1, message="NodePool.UpdateInfo.BlueGreenInfo", @@ -5080,90 +5172,90 @@ class Type(proto.Enum): TYPE_UNSPECIFIED = 0 COMPACT = 1 - type_ = proto.Field( + type_: "NodePool.PlacementPolicy.Type" = proto.Field( proto.ENUM, number=1, enum="NodePool.PlacementPolicy.Type", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - config = proto.Field( + config: "NodeConfig" = proto.Field( proto.MESSAGE, number=2, message="NodeConfig", ) - initial_node_count = proto.Field( + initial_node_count: int = proto.Field( proto.INT32, number=3, ) - locations = proto.RepeatedField( + locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=13, ) - network_config = proto.Field( + network_config: "NodeNetworkConfig" = proto.Field( proto.MESSAGE, number=14, message="NodeNetworkConfig", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=100, ) - version = proto.Field( + version: str = proto.Field( proto.STRING, number=101, ) - instance_group_urls = proto.RepeatedField( + instance_group_urls: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=102, ) - status = proto.Field( + status: Status = proto.Field( proto.ENUM, number=103, enum=Status, ) - status_message = proto.Field( + status_message: str = proto.Field( proto.STRING, number=104, ) - autoscaling = proto.Field( + autoscaling: "NodePoolAutoscaling" = proto.Field( proto.MESSAGE, number=4, message="NodePoolAutoscaling", ) - management = proto.Field( + management: "NodeManagement" = proto.Field( proto.MESSAGE, number=5, message="NodeManagement", ) - max_pods_constraint = proto.Field( + max_pods_constraint: "MaxPodsConstraint" = proto.Field( proto.MESSAGE, number=6, message="MaxPodsConstraint", ) - conditions = proto.RepeatedField( + conditions: MutableSequence["StatusCondition"] = proto.RepeatedField( proto.MESSAGE, number=105, message="StatusCondition", ) - pod_ipv4_cidr_size = proto.Field( + pod_ipv4_cidr_size: int = proto.Field( proto.INT32, number=7, ) - upgrade_settings = proto.Field( + upgrade_settings: UpgradeSettings = proto.Field( proto.MESSAGE, number=107, message=UpgradeSettings, ) - placement_policy = proto.Field( + placement_policy: PlacementPolicy = proto.Field( proto.MESSAGE, number=108, message=PlacementPolicy, ) - update_info = proto.Field( + update_info: UpdateInfo = proto.Field( proto.MESSAGE, number=109, message=UpdateInfo, @@ -5186,15 +5278,15 @@ class NodeManagement(proto.Message): pool. """ - auto_upgrade = proto.Field( + auto_upgrade: bool = proto.Field( proto.BOOL, number=1, ) - auto_repair = proto.Field( + auto_repair: bool = proto.Field( proto.BOOL, number=2, ) - upgrade_options = proto.Field( + upgrade_options: "AutoUpgradeOptions" = proto.Field( proto.MESSAGE, number=10, message="AutoUpgradeOptions", @@ -5216,11 +5308,11 @@ class AutoUpgradeOptions(proto.Message): commence with the description of the upgrade. """ - auto_upgrade_start_time = proto.Field( + auto_upgrade_start_time: str = proto.Field( proto.STRING, number=1, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=2, ) @@ -5244,12 +5336,12 @@ class MaintenancePolicy(proto.Message): policy. """ - window = proto.Field( + window: "MaintenanceWindow" = proto.Field( proto.MESSAGE, number=1, message="MaintenanceWindow", ) - resource_version = proto.Field( + resource_version: str = proto.Field( proto.STRING, number=3, ) @@ -5280,25 +5372,25 @@ class MaintenanceWindow(proto.Message): occur at any time. This field is a member of `oneof`_ ``policy``. - maintenance_exclusions (Mapping[str, google.cloud.container_v1beta1.types.TimeWindow]): + maintenance_exclusions (MutableMapping[str, google.cloud.container_v1beta1.types.TimeWindow]): Exceptions to maintenance window. Non-emergency maintenance should not occur in these windows. """ - daily_maintenance_window = proto.Field( + daily_maintenance_window: "DailyMaintenanceWindow" = proto.Field( proto.MESSAGE, number=2, oneof="policy", message="DailyMaintenanceWindow", ) - recurring_window = proto.Field( + recurring_window: "RecurringTimeWindow" = proto.Field( proto.MESSAGE, number=3, oneof="policy", message="RecurringTimeWindow", ) - maintenance_exclusions = proto.MapField( + maintenance_exclusions: MutableMapping[str, "TimeWindow"] = proto.MapField( proto.STRING, proto.MESSAGE, number=4, @@ -5324,18 +5416,18 @@ class TimeWindow(proto.Message): should take place after the start time. """ - maintenance_exclusion_options = proto.Field( + maintenance_exclusion_options: "MaintenanceExclusionOptions" = proto.Field( proto.MESSAGE, number=3, oneof="options", message="MaintenanceExclusionOptions", ) - start_time = proto.Field( + start_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp, ) - end_time = proto.Field( + end_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp, @@ -5357,7 +5449,7 @@ class Scope(proto.Enum): NO_MINOR_UPGRADES = 1 NO_MINOR_OR_NODE_UPGRADES = 2 - scope = proto.Field( + scope: Scope = proto.Field( proto.ENUM, number=1, enum=Scope, @@ -5411,12 +5503,12 @@ class RecurringTimeWindow(proto.Message): SECONDLY are not supported. """ - window = proto.Field( + window: "TimeWindow" = proto.Field( proto.MESSAGE, number=1, message="TimeWindow", ) - recurrence = proto.Field( + recurrence: str = proto.Field( proto.STRING, number=2, ) @@ -5435,11 +5527,11 @@ class DailyMaintenanceWindow(proto.Message): chosen to be smallest possible in the given scenario. """ - start_time = proto.Field( + start_time: str = proto.Field( proto.STRING, number=2, ) - duration = proto.Field( + duration: str = proto.Field( proto.STRING, number=3, ) @@ -5478,28 +5570,28 @@ class SetNodePoolManagementRequest(proto.Message): format ``projects/*/locations/*/clusters/*/nodePools/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - node_pool_id = proto.Field( + node_pool_id: str = proto.Field( proto.STRING, number=4, ) - management = proto.Field( + management: "NodeManagement" = proto.Field( proto.MESSAGE, number=5, message="NodeManagement", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=7, ) @@ -5537,27 +5629,27 @@ class SetNodePoolSizeRequest(proto.Message): ``projects/*/locations/*/clusters/*/nodePools/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - node_pool_id = proto.Field( + node_pool_id: str = proto.Field( proto.STRING, number=4, ) - node_count = proto.Field( + node_count: int = proto.Field( proto.INT32, number=5, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=7, ) @@ -5574,7 +5666,7 @@ class CompleteNodePoolUpgradeRequest(proto.Message): ``projects/*/locations/*/clusters/*/nodePools/*``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -5614,27 +5706,27 @@ class RollbackNodePoolUpgradeRequest(proto.Message): PodDisruptionBudget. Default value is false. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - node_pool_id = proto.Field( + node_pool_id: str = proto.Field( proto.STRING, number=4, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) - respect_pdb = proto.Field( + respect_pdb: bool = proto.Field( proto.BOOL, number=7, ) @@ -5644,11 +5736,11 @@ class ListNodePoolsResponse(proto.Message): r"""ListNodePoolsResponse is the result of ListNodePoolsRequest. Attributes: - node_pools (Sequence[google.cloud.container_v1beta1.types.NodePool]): + node_pools (MutableSequence[google.cloud.container_v1beta1.types.NodePool]): A list of node pools for a cluster. """ - node_pools = proto.RepeatedField( + node_pools: MutableSequence["NodePool"] = proto.RepeatedField( proto.MESSAGE, number=1, message="NodePool", @@ -5665,7 +5757,7 @@ class ClusterAutoscaling(proto.Message): enable_node_autoprovisioning (bool): Enables automatic node pool creation and deletion. - resource_limits (Sequence[google.cloud.container_v1beta1.types.ResourceLimit]): + resource_limits (MutableSequence[google.cloud.container_v1beta1.types.ResourceLimit]): Contains global constraints regarding minimum and maximum amount of resources in the cluster. autoscaling_profile (google.cloud.container_v1beta1.types.ClusterAutoscaling.AutoscalingProfile): @@ -5673,7 +5765,7 @@ class ClusterAutoscaling(proto.Message): autoprovisioning_node_pool_defaults (google.cloud.container_v1beta1.types.AutoprovisioningNodePoolDefaults): AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP. - autoprovisioning_locations (Sequence[str]): + autoprovisioning_locations (MutableSequence[str]): The list of Google Compute Engine `zones `__ in which the NodePool's nodes can be created by NAP. @@ -5685,26 +5777,28 @@ class AutoscalingProfile(proto.Enum): OPTIMIZE_UTILIZATION = 1 BALANCED = 2 - enable_node_autoprovisioning = proto.Field( + enable_node_autoprovisioning: bool = proto.Field( proto.BOOL, number=1, ) - resource_limits = proto.RepeatedField( + resource_limits: MutableSequence["ResourceLimit"] = proto.RepeatedField( proto.MESSAGE, number=2, message="ResourceLimit", ) - autoscaling_profile = proto.Field( + autoscaling_profile: AutoscalingProfile = proto.Field( proto.ENUM, number=3, enum=AutoscalingProfile, ) - autoprovisioning_node_pool_defaults = proto.Field( - proto.MESSAGE, - number=4, - message="AutoprovisioningNodePoolDefaults", + autoprovisioning_node_pool_defaults: "AutoprovisioningNodePoolDefaults" = ( + proto.Field( + proto.MESSAGE, + number=4, + message="AutoprovisioningNodePoolDefaults", + ) ) - autoprovisioning_locations = proto.RepeatedField( + autoprovisioning_locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=5, ) @@ -5715,7 +5809,7 @@ class AutoprovisioningNodePoolDefaults(proto.Message): pool created by NAP. Attributes: - oauth_scopes (Sequence[str]): + oauth_scopes (MutableSequence[str]): The set of Google API scopes to be made available on all of the node VMs under the "default" service account. @@ -5782,46 +5876,46 @@ class AutoprovisioningNodePoolDefaults(proto.Message): The image type to use for NAP created node. """ - oauth_scopes = proto.RepeatedField( + oauth_scopes: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=1, ) - service_account = proto.Field( + service_account: str = proto.Field( proto.STRING, number=2, ) - upgrade_settings = proto.Field( + upgrade_settings: "NodePool.UpgradeSettings" = proto.Field( proto.MESSAGE, number=3, message="NodePool.UpgradeSettings", ) - management = proto.Field( + management: "NodeManagement" = proto.Field( proto.MESSAGE, number=4, message="NodeManagement", ) - min_cpu_platform = proto.Field( + min_cpu_platform: str = proto.Field( proto.STRING, number=5, ) - disk_size_gb = proto.Field( + disk_size_gb: int = proto.Field( proto.INT32, number=6, ) - disk_type = proto.Field( + disk_type: str = proto.Field( proto.STRING, number=7, ) - shielded_instance_config = proto.Field( + shielded_instance_config: "ShieldedInstanceConfig" = proto.Field( proto.MESSAGE, number=8, message="ShieldedInstanceConfig", ) - boot_disk_kms_key = proto.Field( + boot_disk_kms_key: str = proto.Field( proto.STRING, number=9, ) - image_type = proto.Field( + image_type: str = proto.Field( proto.STRING, number=10, ) @@ -5843,15 +5937,15 @@ class ResourceLimit(proto.Message): cluster. """ - resource_type = proto.Field( + resource_type: str = proto.Field( proto.STRING, number=1, ) - minimum = proto.Field( + minimum: int = proto.Field( proto.INT64, number=2, ) - maximum = proto.Field( + maximum: int = proto.Field( proto.INT64, number=3, ) @@ -5897,32 +5991,32 @@ class LocationPolicy(proto.Enum): BALANCED = 1 ANY = 2 - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) - min_node_count = proto.Field( + min_node_count: int = proto.Field( proto.INT32, number=2, ) - max_node_count = proto.Field( + max_node_count: int = proto.Field( proto.INT32, number=3, ) - autoprovisioned = proto.Field( + autoprovisioned: bool = proto.Field( proto.BOOL, number=4, ) - location_policy = proto.Field( + location_policy: LocationPolicy = proto.Field( proto.ENUM, number=5, enum=LocationPolicy, ) - total_min_node_count = proto.Field( + total_min_node_count: int = proto.Field( proto.INT32, number=6, ) - total_max_node_count = proto.Field( + total_max_node_count: int = proto.Field( proto.INT32, number=7, ) @@ -5949,7 +6043,7 @@ class SetLabelsRequest(proto.Message): Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. - resource_labels (Mapping[str, str]): + resource_labels (MutableMapping[str, str]): Required. The labels to set for that cluster. label_fingerprint (str): Required. The fingerprint of the previous set of labels for @@ -5965,28 +6059,28 @@ class SetLabelsRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - resource_labels = proto.MapField( + resource_labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=4, ) - label_fingerprint = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, number=5, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=7, ) @@ -6021,23 +6115,23 @@ class SetLegacyAbacRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=4, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) @@ -6073,23 +6167,23 @@ class StartIPRotationRequest(proto.Message): rotation. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) - rotate_credentials = proto.Field( + rotate_credentials: bool = proto.Field( proto.BOOL, number=7, ) @@ -6121,19 +6215,19 @@ class CompleteIPRotationRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=7, ) @@ -6163,23 +6257,23 @@ class AcceleratorConfig(proto.Message): This field is a member of `oneof`_ ``_gpu_sharing_config``. """ - accelerator_count = proto.Field( + accelerator_count: int = proto.Field( proto.INT64, number=1, ) - accelerator_type = proto.Field( + accelerator_type: str = proto.Field( proto.STRING, number=2, ) - gpu_partition_size = proto.Field( + gpu_partition_size: str = proto.Field( proto.STRING, number=3, ) - max_time_shared_clients_per_gpu = proto.Field( + max_time_shared_clients_per_gpu: int = proto.Field( proto.INT64, number=4, ) - gpu_sharing_config = proto.Field( + gpu_sharing_config: "GPUSharingConfig" = proto.Field( proto.MESSAGE, number=5, optional=True, @@ -6207,11 +6301,11 @@ class GPUSharingStrategy(proto.Enum): GPU_SHARING_STRATEGY_UNSPECIFIED = 0 TIME_SHARING = 1 - max_shared_clients_per_gpu = proto.Field( + max_shared_clients_per_gpu: int = proto.Field( proto.INT64, number=1, ) - gpu_sharing_strategy = proto.Field( + gpu_sharing_strategy: GPUSharingStrategy = proto.Field( proto.ENUM, number=2, optional=True, @@ -6228,7 +6322,7 @@ class ManagedPrometheusConfig(proto.Message): Enable Managed Collection. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -6265,12 +6359,12 @@ class Mode(proto.Enum): GCE_METADATA = 1 GKE_METADATA = 2 - node_metadata = proto.Field( + node_metadata: NodeMetadata = proto.Field( proto.ENUM, number=1, enum=NodeMetadata, ) - mode = proto.Field( + mode: Mode = proto.Field( proto.ENUM, number=2, enum=Mode, @@ -6306,24 +6400,24 @@ class SetNetworkPolicyRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - network_policy = proto.Field( + network_policy: "NetworkPolicy" = proto.Field( proto.MESSAGE, number=4, message="NetworkPolicy", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=6, ) @@ -6354,24 +6448,24 @@ class SetMaintenancePolicyRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=1, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=2, ) - cluster_id = proto.Field( + cluster_id: str = proto.Field( proto.STRING, number=3, ) - maintenance_policy = proto.Field( + maintenance_policy: "MaintenancePolicy" = proto.Field( proto.MESSAGE, number=4, message="MaintenancePolicy", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=5, ) @@ -6387,7 +6481,7 @@ class ListLocationsRequest(proto.Message): Specified in the format ``projects/*``. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) @@ -6398,7 +6492,7 @@ class ListLocationsResponse(proto.Message): and their recommendation state. Attributes: - locations (Sequence[google.cloud.container_v1beta1.types.Location]): + locations (MutableSequence[google.cloud.container_v1beta1.types.Location]): A full list of GKE locations. next_page_token (str): Only return ListLocationsResponse that occur after the @@ -6412,12 +6506,12 @@ class ListLocationsResponse(proto.Message): def raw_page(self): return self - locations = proto.RepeatedField( + locations: MutableSequence["Location"] = proto.RepeatedField( proto.MESSAGE, number=1, message="Location", ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) @@ -6445,16 +6539,16 @@ class LocationType(proto.Enum): ZONE = 1 REGION = 2 - type_ = proto.Field( + type_: LocationType = proto.Field( proto.ENUM, number=1, enum=LocationType, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=2, ) - recommended = proto.Field( + recommended: bool = proto.Field( proto.BOOL, number=3, ) @@ -6486,16 +6580,16 @@ class Code(proto.Enum): CLOUD_KMS_KEY_ERROR = 7 CA_EXPIRING = 9 - code = proto.Field( + code: Code = proto.Field( proto.ENUM, number=1, enum=Code, ) - message = proto.Field( + message: str = proto.Field( proto.STRING, number=2, ) - canonical_code = proto.Field( + canonical_code: code_pb2.Code = proto.Field( proto.ENUM, number=3, enum=code_pb2.Code, @@ -6546,49 +6640,83 @@ class NetworkConfig(proto.Message): ServiceExternalIPsConfig specifies if services with externalIPs field are blocked or not. + gateway_api_config (google.cloud.container_v1beta1.types.GatewayAPIConfig): + GatewayAPIConfig contains the desired config + of Gateway API on this cluster. """ - network = proto.Field( + network: str = proto.Field( proto.STRING, number=1, ) - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=2, ) - enable_intra_node_visibility = proto.Field( + enable_intra_node_visibility: bool = proto.Field( proto.BOOL, number=5, ) - default_snat_status = proto.Field( + default_snat_status: "DefaultSnatStatus" = proto.Field( proto.MESSAGE, number=7, message="DefaultSnatStatus", ) - enable_l4ilb_subsetting = proto.Field( + enable_l4ilb_subsetting: bool = proto.Field( proto.BOOL, number=10, ) - datapath_provider = proto.Field( + datapath_provider: "DatapathProvider" = proto.Field( proto.ENUM, number=11, enum="DatapathProvider", ) - private_ipv6_google_access = proto.Field( + private_ipv6_google_access: "PrivateIPv6GoogleAccess" = proto.Field( proto.ENUM, number=12, enum="PrivateIPv6GoogleAccess", ) - dns_config = proto.Field( + dns_config: "DNSConfig" = proto.Field( proto.MESSAGE, number=13, message="DNSConfig", ) - service_external_ips_config = proto.Field( + service_external_ips_config: "ServiceExternalIPsConfig" = proto.Field( proto.MESSAGE, number=15, message="ServiceExternalIPsConfig", ) + gateway_api_config: "GatewayAPIConfig" = proto.Field( + proto.MESSAGE, + number=16, + message="GatewayAPIConfig", + ) + + +class GatewayAPIConfig(proto.Message): + r"""GatewayAPIConfig contains the desired config of Gateway API + on this cluster. + + Attributes: + channel (google.cloud.container_v1beta1.types.GatewayAPIConfig.Channel): + The Gateway API release channel to use for + Gateway API. + """ + + class Channel(proto.Enum): + r"""Channel describes if/how Gateway API should be installed and + implemented in a cluster. + """ + CHANNEL_UNSPECIFIED = 0 + CHANNEL_DISABLED = 1 + CHANNEL_EXPERIMENTAL = 3 + CHANNEL_STANDARD = 4 + + channel: Channel = proto.Field( + proto.ENUM, + number=1, + enum=Channel, + ) class ServiceExternalIPsConfig(proto.Message): @@ -6600,7 +6728,7 @@ class ServiceExternalIPsConfig(proto.Message): allowed or not. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -6633,19 +6761,19 @@ class ListUsableSubnetworksRequest(proto.Message): requests to get the next page of results. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=2, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=3, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=4, ) @@ -6656,7 +6784,7 @@ class ListUsableSubnetworksResponse(proto.Message): ListUsableSubnetworksRequest. Attributes: - subnetworks (Sequence[google.cloud.container_v1beta1.types.UsableSubnetwork]): + subnetworks (MutableSequence[google.cloud.container_v1beta1.types.UsableSubnetwork]): A list of usable subnetworks in the specified network project. next_page_token (str): @@ -6671,12 +6799,12 @@ class ListUsableSubnetworksResponse(proto.Message): def raw_page(self): return self - subnetworks = proto.RepeatedField( + subnetworks: MutableSequence["UsableSubnetwork"] = proto.RepeatedField( proto.MESSAGE, number=1, message="UsableSubnetwork", ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) @@ -6706,15 +6834,15 @@ class Status(proto.Enum): IN_USE_SHAREABLE_POD = 3 IN_USE_MANAGED_POD = 4 - range_name = proto.Field( + range_name: str = proto.Field( proto.STRING, number=1, ) - ip_cidr_range = proto.Field( + ip_cidr_range: str = proto.Field( proto.STRING, number=2, ) - status = proto.Field( + status: Status = proto.Field( proto.ENUM, number=3, enum=Status, @@ -6737,7 +6865,7 @@ class UsableSubnetwork(proto.Message): ip_cidr_range (str): The range of internal addresses that are owned by this subnetwork. - secondary_ip_ranges (Sequence[google.cloud.container_v1beta1.types.UsableSubnetworkSecondaryRange]): + secondary_ip_ranges (MutableSequence[google.cloud.container_v1beta1.types.UsableSubnetworkSecondaryRange]): Secondary IP ranges. status_message (str): A human readable status message representing the reasons for @@ -6747,24 +6875,26 @@ class UsableSubnetwork(proto.Message): message will be given by status_message. """ - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=1, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=2, ) - ip_cidr_range = proto.Field( + ip_cidr_range: str = proto.Field( proto.STRING, number=3, ) - secondary_ip_ranges = proto.RepeatedField( + secondary_ip_ranges: MutableSequence[ + "UsableSubnetworkSecondaryRange" + ] = proto.RepeatedField( proto.MESSAGE, number=4, message="UsableSubnetworkSecondaryRange", ) - status_message = proto.Field( + status_message: str = proto.Field( proto.STRING, number=5, ) @@ -6780,7 +6910,7 @@ class VerticalPodAutoscaling(proto.Message): Enables vertical pod autoscaling. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -6795,7 +6925,7 @@ class DefaultSnatStatus(proto.Message): Disables cluster default sNAT rules. """ - disabled = proto.Field( + disabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -6811,7 +6941,7 @@ class IntraNodeVisibilityConfig(proto.Message): cluster. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -6826,7 +6956,7 @@ class ILBSubsettingConfig(proto.Message): Enables l4 ILB subsetting for this cluster """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -6862,17 +6992,17 @@ class DNSScope(proto.Enum): CLUSTER_SCOPE = 1 VPC_SCOPE = 2 - cluster_dns = proto.Field( + cluster_dns: Provider = proto.Field( proto.ENUM, number=1, enum=Provider, ) - cluster_dns_scope = proto.Field( + cluster_dns_scope: DNSScope = proto.Field( proto.ENUM, number=2, enum=DNSScope, ) - cluster_dns_domain = proto.Field( + cluster_dns_domain: str = proto.Field( proto.STRING, number=3, ) @@ -6887,7 +7017,7 @@ class MaxPodsConstraint(proto.Message): per node. """ - max_pods_per_node = proto.Field( + max_pods_per_node: int = proto.Field( proto.INT64, number=1, ) @@ -6909,15 +7039,15 @@ class WorkloadIdentityConfig(proto.Message): provider. """ - identity_namespace = proto.Field( + identity_namespace: str = proto.Field( proto.STRING, number=1, ) - workload_pool = proto.Field( + workload_pool: str = proto.Field( proto.STRING, number=2, ) - identity_provider = proto.Field( + identity_provider: str = proto.Field( proto.STRING, number=3, ) @@ -6937,7 +7067,7 @@ class WorkloadALTSConfig(proto.Message): must be non-empty). """ - enable_alts = proto.Field( + enable_alts: wrappers_pb2.BoolValue = proto.Field( proto.MESSAGE, number=1, message=wrappers_pb2.BoolValue, @@ -6963,7 +7093,7 @@ class WorkloadCertificates(proto.Message): must be non-empty). """ - enable_certificates = proto.Field( + enable_certificates: wrappers_pb2.BoolValue = proto.Field( proto.MESSAGE, number=1, message=wrappers_pb2.BoolValue, @@ -6989,7 +7119,7 @@ class MeshCertificates(proto.Message): must be non-empty). """ - enable_certificates = proto.Field( + enable_certificates: wrappers_pb2.BoolValue = proto.Field( proto.MESSAGE, number=1, message=wrappers_pb2.BoolValue, @@ -7014,12 +7144,12 @@ class State(proto.Enum): ENCRYPTED = 1 DECRYPTED = 2 - state = proto.Field( + state: State = proto.Field( proto.ENUM, number=2, enum=State, ) - key_name = proto.Field( + key_name: str = proto.Field( proto.STRING, number=1, ) @@ -7051,7 +7181,7 @@ class BigQueryDestination(proto.Message): The ID of a BigQuery Dataset. """ - dataset_id = proto.Field( + dataset_id: str = proto.Field( proto.STRING, number=1, ) @@ -7067,21 +7197,21 @@ class ConsumptionMeteringConfig(proto.Message): consumption records. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) - bigquery_destination = proto.Field( + bigquery_destination: BigQueryDestination = proto.Field( proto.MESSAGE, number=1, message=BigQueryDestination, ) - enable_network_egress_metering = proto.Field( + enable_network_egress_metering: bool = proto.Field( proto.BOOL, number=2, ) - consumption_metering_config = proto.Field( + consumption_metering_config: ConsumptionMeteringConfig = proto.Field( proto.MESSAGE, number=3, message=ConsumptionMeteringConfig, @@ -7097,7 +7227,7 @@ class ShieldedNodes(proto.Message): on all nodes in this cluster. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -7112,7 +7242,7 @@ class VirtualNIC(proto.Message): node pool. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -7130,7 +7260,7 @@ class GetOpenIDConfigRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) @@ -7146,43 +7276,43 @@ class GetOpenIDConfigResponse(proto.Message): OIDC Issuer. jwks_uri (str): JSON Web Key uri. - response_types_supported (Sequence[str]): + response_types_supported (MutableSequence[str]): Supported response types. - subject_types_supported (Sequence[str]): + subject_types_supported (MutableSequence[str]): Supported subject types. - id_token_signing_alg_values_supported (Sequence[str]): + id_token_signing_alg_values_supported (MutableSequence[str]): supported ID Token signing Algorithms. - claims_supported (Sequence[str]): + claims_supported (MutableSequence[str]): Supported claims. - grant_types (Sequence[str]): + grant_types (MutableSequence[str]): Supported grant types. """ - issuer = proto.Field( + issuer: str = proto.Field( proto.STRING, number=1, ) - jwks_uri = proto.Field( + jwks_uri: str = proto.Field( proto.STRING, number=2, ) - response_types_supported = proto.RepeatedField( + response_types_supported: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) - subject_types_supported = proto.RepeatedField( + subject_types_supported: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=4, ) - id_token_signing_alg_values_supported = proto.RepeatedField( + id_token_signing_alg_values_supported: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=5, ) - claims_supported = proto.RepeatedField( + claims_supported: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=6, ) - grant_types = proto.RepeatedField( + grant_types: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=7, ) @@ -7201,7 +7331,7 @@ class GetJSONWebKeysRequest(proto.Message): ``projects/*/locations/*/clusters/*``. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) @@ -7231,39 +7361,39 @@ class Jwk(proto.Message): Used for ECDSA keys. """ - kty = proto.Field( + kty: str = proto.Field( proto.STRING, number=1, ) - alg = proto.Field( + alg: str = proto.Field( proto.STRING, number=2, ) - use = proto.Field( + use: str = proto.Field( proto.STRING, number=3, ) - kid = proto.Field( + kid: str = proto.Field( proto.STRING, number=4, ) - n = proto.Field( + n: str = proto.Field( proto.STRING, number=5, ) - e = proto.Field( + e: str = proto.Field( proto.STRING, number=6, ) - x = proto.Field( + x: str = proto.Field( proto.STRING, number=7, ) - y = proto.Field( + y: str = proto.Field( proto.STRING, number=8, ) - crv = proto.Field( + crv: str = proto.Field( proto.STRING, number=9, ) @@ -7274,12 +7404,12 @@ class GetJSONWebKeysResponse(proto.Message): specififed in rfc 7517 Attributes: - keys (Sequence[google.cloud.container_v1beta1.types.Jwk]): + keys (MutableSequence[google.cloud.container_v1beta1.types.Jwk]): The public component of the keys used by the cluster to sign token requests. """ - keys = proto.RepeatedField( + keys: MutableSequence["Jwk"] = proto.RepeatedField( proto.MESSAGE, number=1, message="Jwk", @@ -7306,7 +7436,7 @@ class Channel(proto.Enum): REGULAR = 2 STABLE = 3 - channel = proto.Field( + channel: Channel = proto.Field( proto.ENUM, number=1, enum=Channel, @@ -7321,7 +7451,7 @@ class CostManagementConfig(proto.Message): Whether the feature is enabled or not. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -7342,15 +7472,15 @@ class TpuConfig(proto.Message): VPC. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) - use_service_networking = proto.Field( + use_service_networking: bool = proto.Field( proto.BOOL, number=2, ) - ipv4_cidr_block = proto.Field( + ipv4_cidr_block: str = proto.Field( proto.STRING, number=3, ) @@ -7369,7 +7499,7 @@ class Autopilot(proto.Message): Enable Autopilot """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -7409,15 +7539,15 @@ class PubSub(proto.Message): event types will be sent """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) - topic = proto.Field( + topic: str = proto.Field( proto.STRING, number=2, ) - filter = proto.Field( + filter: "NotificationConfig.Filter" = proto.Field( proto.MESSAGE, number=3, message="NotificationConfig.Filter", @@ -7431,17 +7561,19 @@ class Filter(proto.Message): types will be sent Attributes: - event_type (Sequence[google.cloud.container_v1beta1.types.NotificationConfig.EventType]): + event_type (MutableSequence[google.cloud.container_v1beta1.types.NotificationConfig.EventType]): Event types to allowlist. """ - event_type = proto.RepeatedField( + event_type: MutableSequence[ + "NotificationConfig.EventType" + ] = proto.RepeatedField( proto.ENUM, number=1, enum="NotificationConfig.EventType", ) - pubsub = proto.Field( + pubsub: PubSub = proto.Field( proto.MESSAGE, number=1, message=PubSub, @@ -7458,7 +7590,7 @@ class ConfidentialNodes(proto.Message): enabled. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -7485,29 +7617,29 @@ class UpgradeEvent(proto.Message): of the node pool. """ - resource_type = proto.Field( + resource_type: "UpgradeResourceType" = proto.Field( proto.ENUM, number=1, enum="UpgradeResourceType", ) - operation = proto.Field( + operation: str = proto.Field( proto.STRING, number=2, ) - operation_start_time = proto.Field( + operation_start_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=3, message=timestamp_pb2.Timestamp, ) - current_version = proto.Field( + current_version: str = proto.Field( proto.STRING, number=4, ) - target_version = proto.Field( + target_version: str = proto.Field( proto.STRING, number=5, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=6, ) @@ -7532,25 +7664,25 @@ class UpgradeAvailableEvent(proto.Message): Windows node versions info. """ - version = proto.Field( + version: str = proto.Field( proto.STRING, number=1, ) - resource_type = proto.Field( + resource_type: "UpgradeResourceType" = proto.Field( proto.ENUM, number=2, enum="UpgradeResourceType", ) - release_channel = proto.Field( + release_channel: "ReleaseChannel" = proto.Field( proto.MESSAGE, number=3, message="ReleaseChannel", ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=4, ) - windows_versions = proto.Field( + windows_versions: "WindowsVersions" = proto.Field( proto.MESSAGE, number=5, message="WindowsVersions", @@ -7571,7 +7703,7 @@ class SecurityBulletinEvent(proto.Message): bulletin_id (str): The ID of the bulletin corresponding to the vulnerability. - cve_ids (Sequence[str]): + cve_ids (MutableSequence[str]): The CVEs associated with this bulletin. severity (str): The severity of this bulletin as it relates @@ -7583,10 +7715,10 @@ class SecurityBulletinEvent(proto.Message): A brief description of the bulletin. See the bulletin pointed to by the bulletin_uri field for an expanded description. - affected_supported_minors (Sequence[str]): + affected_supported_minors (MutableSequence[str]): The GKE minor versions affected by this vulnerability. - patched_versions (Sequence[str]): + patched_versions (MutableSequence[str]): The GKE versions where this vulnerability is patched. suggested_upgrade_target (str): @@ -7602,43 +7734,43 @@ class SecurityBulletinEvent(proto.Message): their clusters safe. """ - resource_type_affected = proto.Field( + resource_type_affected: str = proto.Field( proto.STRING, number=1, ) - bulletin_id = proto.Field( + bulletin_id: str = proto.Field( proto.STRING, number=2, ) - cve_ids = proto.RepeatedField( + cve_ids: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) - severity = proto.Field( + severity: str = proto.Field( proto.STRING, number=4, ) - bulletin_uri = proto.Field( + bulletin_uri: str = proto.Field( proto.STRING, number=5, ) - brief_description = proto.Field( + brief_description: str = proto.Field( proto.STRING, number=6, ) - affected_supported_minors = proto.RepeatedField( + affected_supported_minors: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=7, ) - patched_versions = proto.RepeatedField( + patched_versions: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=8, ) - suggested_upgrade_target = proto.Field( + suggested_upgrade_target: str = proto.Field( proto.STRING, number=9, ) - manual_steps_required = proto.Field( + manual_steps_required: bool = proto.Field( proto.BOOL, number=10, ) @@ -7655,7 +7787,7 @@ class IdentityServiceConfig(proto.Message): component """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) @@ -7669,7 +7801,7 @@ class LoggingConfig(proto.Message): Logging components configuration """ - component_config = proto.Field( + component_config: "LoggingComponentConfig" = proto.Field( proto.MESSAGE, number=1, message="LoggingComponentConfig", @@ -7681,7 +7813,7 @@ class LoggingComponentConfig(proto.Message): configuration. Attributes: - enable_components (Sequence[google.cloud.container_v1beta1.types.LoggingComponentConfig.Component]): + enable_components (MutableSequence[google.cloud.container_v1beta1.types.LoggingComponentConfig.Component]): Select components to collect logs. An empty set would disable all logging. """ @@ -7691,8 +7823,11 @@ class Component(proto.Enum): COMPONENT_UNSPECIFIED = 0 SYSTEM_COMPONENTS = 1 WORKLOADS = 2 + APISERVER = 3 + SCHEDULER = 4 + CONTROLLER_MANAGER = 5 - enable_components = proto.RepeatedField( + enable_components: MutableSequence[Component] = proto.RepeatedField( proto.ENUM, number=1, enum=Component, @@ -7710,12 +7845,12 @@ class MonitoringConfig(proto.Message): Prometheus in the cluster. """ - component_config = proto.Field( + component_config: "MonitoringComponentConfig" = proto.Field( proto.MESSAGE, number=1, message="MonitoringComponentConfig", ) - managed_prometheus_config = proto.Field( + managed_prometheus_config: "ManagedPrometheusConfig" = proto.Field( proto.MESSAGE, number=2, message="ManagedPrometheusConfig", @@ -7731,7 +7866,7 @@ class NodePoolLoggingConfig(proto.Message): Logging variant configuration. """ - variant_config = proto.Field( + variant_config: "LoggingVariantConfig" = proto.Field( proto.MESSAGE, number=1, message="LoggingVariantConfig", @@ -7753,7 +7888,7 @@ class Variant(proto.Enum): DEFAULT = 1 MAX_THROUGHPUT = 2 - variant = proto.Field( + variant: Variant = proto.Field( proto.ENUM, number=1, enum=Variant, @@ -7765,7 +7900,7 @@ class MonitoringComponentConfig(proto.Message): configuration. Attributes: - enable_components (Sequence[google.cloud.container_v1beta1.types.MonitoringComponentConfig.Component]): + enable_components (MutableSequence[google.cloud.container_v1beta1.types.MonitoringComponentConfig.Component]): Select components to collect metrics. An empty set would disable all monitoring. """ @@ -7779,7 +7914,7 @@ class Component(proto.Enum): SCHEDULER = 4 CONTROLLER_MANAGER = 5 - enable_components = proto.RepeatedField( + enable_components: MutableSequence[Component] = proto.RepeatedField( proto.ENUM, number=1, enum=Component, diff --git a/owlbot.py b/owlbot.py new file mode 100644 index 00000000..ce738f01 --- /dev/null +++ b/owlbot.py @@ -0,0 +1,56 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json +from pathlib import Path +import shutil + +import synthtool as s +import synthtool.gcp as gcp +from synthtool.languages import python + +# ---------------------------------------------------------------------------- +# Copy the generated client from the owl-bot staging directory +# ---------------------------------------------------------------------------- + +clean_up_generated_samples = True + +# Load the default version defined in .repo-metadata.json. +default_version = json.load(open(".repo-metadata.json", "rt")).get( + "default_version" +) + +for library in s.get_staging_dirs(default_version): + if clean_up_generated_samples: + shutil.rmtree("samples/generated_samples", ignore_errors=True) + clean_up_generated_samples = False + s.move([library], excludes=["**/gapic_version.py"]) +s.remove_staging_dirs() + +# ---------------------------------------------------------------------------- +# Add templated files +# ---------------------------------------------------------------------------- + +templated_files = gcp.CommonTemplates().py_library( + cov_level=100, + microgenerator=True, + versions=gcp.common.detect_versions(path="./google", default_first=True), +) +s.move(templated_files, excludes=[".coveragerc", ".github/release-please.yml"]) + +python.py_samples(skip_readmes=True) + +# run format session for all directories which have a noxfile +for noxfile in Path(".").glob("**/noxfile.py"): + s.shell.run(["nox", "-s", "format"], cwd=noxfile.parent, hide_output=False) diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 00000000..f6730a22 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,28 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "packages": { + ".": { + "release-type": "python", + "extra-files": [ + "google/cloud/container/gapic_version.py", + { + "type": "json", + "path": "samples/generated_samples/snippet_metadata_google.container.v1beta1.json", + "jsonpath": "$.clientLibrary.version" + }, + { + "type": "json", + "path": "samples/generated_samples/snippet_metadata_google.container.v1.json", + "jsonpath": "$.clientLibrary.version" + } + ] + } + }, + "release-type": "python", + "plugins": [ + { + "type": "sentence-case" + } + ], + "initial-version": "0.1.0" +} diff --git a/samples/generated_samples/snippet_metadata_container_v1.json b/samples/generated_samples/snippet_metadata_google.container.v1.json similarity index 99% rename from samples/generated_samples/snippet_metadata_container_v1.json rename to samples/generated_samples/snippet_metadata_google.container.v1.json index 8cde912c..34c1cf39 100644 --- a/samples/generated_samples/snippet_metadata_container_v1.json +++ b/samples/generated_samples/snippet_metadata_google.container.v1.json @@ -7,7 +7,8 @@ } ], "language": "PYTHON", - "name": "google-cloud-container" + "name": "google-cloud-container", + "version": "0.1.0" }, "snippets": [ { @@ -3622,7 +3623,7 @@ }, { "name": "locations", - "type": "Sequence[str]" + "type": "MutableSequence[str]" }, { "name": "name", @@ -3718,7 +3719,7 @@ }, { "name": "locations", - "type": "Sequence[str]" + "type": "MutableSequence[str]" }, { "name": "name", diff --git a/samples/generated_samples/snippet_metadata_container_v1beta1.json b/samples/generated_samples/snippet_metadata_google.container.v1beta1.json similarity index 99% rename from samples/generated_samples/snippet_metadata_container_v1beta1.json rename to samples/generated_samples/snippet_metadata_google.container.v1beta1.json index ddfd12e0..15a96218 100644 --- a/samples/generated_samples/snippet_metadata_container_v1beta1.json +++ b/samples/generated_samples/snippet_metadata_google.container.v1beta1.json @@ -7,7 +7,8 @@ } ], "language": "PYTHON", - "name": "google-cloud-container" + "name": "google-cloud-container", + "version": "0.1.0" }, "snippets": [ { @@ -3333,7 +3334,7 @@ }, { "name": "resource_labels", - "type": "Mapping[str, str]" + "type": "MutableMapping[str, str]" }, { "name": "label_fingerprint", @@ -3429,7 +3430,7 @@ }, { "name": "resource_labels", - "type": "Mapping[str, str]" + "type": "MutableMapping[str, str]" }, { "name": "label_fingerprint", @@ -3711,7 +3712,7 @@ }, { "name": "locations", - "type": "Sequence[str]" + "type": "MutableSequence[str]" }, { "name": "retry", @@ -3803,7 +3804,7 @@ }, { "name": "locations", - "type": "Sequence[str]" + "type": "MutableSequence[str]" }, { "name": "retry", diff --git a/scripts/fixup_container_v1_keywords.py b/scripts/fixup_container_v1_keywords.py index 69ae0c71..4f822170 100644 --- a/scripts/fixup_container_v1_keywords.py +++ b/scripts/fixup_container_v1_keywords.py @@ -71,7 +71,7 @@ class containerCallTransformer(cst.CSTTransformer): 'start_ip_rotation': ('project_id', 'zone', 'cluster_id', 'name', 'rotate_credentials', ), 'update_cluster': ('update', 'project_id', 'zone', 'cluster_id', 'name', ), 'update_master': ('master_version', 'project_id', 'zone', 'cluster_id', 'name', ), - 'update_node_pool': ('node_version', 'image_type', 'project_id', 'zone', 'cluster_id', 'node_pool_id', 'name', 'locations', 'workload_metadata_config', 'upgrade_settings', 'tags', 'taints', 'labels', 'linux_node_config', 'kubelet_config', 'node_network_config', 'gcfs_config', 'confidential_nodes', 'gvnic', 'logging_config', ), + 'update_node_pool': ('node_version', 'image_type', 'project_id', 'zone', 'cluster_id', 'node_pool_id', 'name', 'locations', 'workload_metadata_config', 'upgrade_settings', 'tags', 'taints', 'labels', 'linux_node_config', 'kubelet_config', 'node_network_config', 'gcfs_config', 'confidential_nodes', 'gvnic', 'logging_config', 'resource_labels', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: diff --git a/scripts/fixup_container_v1beta1_keywords.py b/scripts/fixup_container_v1beta1_keywords.py index af90d76e..561433ea 100644 --- a/scripts/fixup_container_v1beta1_keywords.py +++ b/scripts/fixup_container_v1beta1_keywords.py @@ -72,7 +72,7 @@ class containerCallTransformer(cst.CSTTransformer): 'start_ip_rotation': ('project_id', 'zone', 'cluster_id', 'name', 'rotate_credentials', ), 'update_cluster': ('project_id', 'zone', 'cluster_id', 'update', 'name', ), 'update_master': ('project_id', 'zone', 'cluster_id', 'master_version', 'name', ), - 'update_node_pool': ('project_id', 'zone', 'cluster_id', 'node_pool_id', 'node_version', 'image_type', 'locations', 'workload_metadata_config', 'name', 'upgrade_settings', 'tags', 'taints', 'labels', 'linux_node_config', 'kubelet_config', 'node_network_config', 'gcfs_config', 'confidential_nodes', 'gvnic', 'logging_config', ), + 'update_node_pool': ('project_id', 'zone', 'cluster_id', 'node_pool_id', 'node_version', 'image_type', 'locations', 'workload_metadata_config', 'name', 'upgrade_settings', 'tags', 'taints', 'labels', 'linux_node_config', 'kubelet_config', 'node_network_config', 'gcfs_config', 'confidential_nodes', 'gvnic', 'logging_config', 'resource_labels', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: diff --git a/setup.py b/setup.py index e44ffa76..af50b7c6 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ -# Copyright 2018 Google LLC +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,32 +12,35 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - +# import io import os -import setuptools +import setuptools # type: ignore -# Package metadata. +package_root = os.path.abspath(os.path.dirname(__file__)) name = "google-cloud-container" -description = "Google Container Engine API client library" -version = "2.13.0" -# Should be one of: -# 'Development Status :: 3 - Alpha' -# 'Development Status :: 4 - Beta' -# 'Development Status :: 5 - Production/Stable' -release_status = "Development Status :: 5 - Production/Stable" + + +description = "Google Cloud Container API client library" + +version = {} +with open(os.path.join(package_root, "google/cloud/container/gapic_version.py")) as fp: + exec(fp.read(), version) +version = version["__version__"] + +if version[0] == "0": + release_status = "Development Status :: 4 - Beta" +else: + release_status = "Development Status :: 5 - Production/Stable" + dependencies = [ - "google-api-core[grpc] >= 1.32.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", - "grpc-google-iam-v1 >=0.12.4, <1.0.0dev", + "google-api-core[grpc] >= 1.33.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", "proto-plus >= 1.22.0, <2.0.0dev", "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", ] -extras = {"libcst": "libcst >= 0.2.5"} - - -# Setup boilerplate below this line. +url = "https://github.com/googleapis/python-container" package_root = os.path.abspath(os.path.dirname(__file__)) @@ -44,20 +48,16 @@ with io.open(readme_filename, encoding="utf-8") as readme_file: readme = readme_file.read() -# Only include packages under the 'google' namespace. Do not include tests, -# benchmarks, etc. packages = [ package for package in setuptools.PEP420PackageFinder.find() if package.startswith("google") ] -# Determine which namespaces are needed. namespaces = ["google"] if "google.cloud" in packages: namespaces.append("google.cloud") - setuptools.setup( name=name, version=version, @@ -66,7 +66,7 @@ author="Google LLC", author_email="googleapis-packages@google.com", license="Apache 2.0", - url="https://github.com/googleapis/python-container", + url=url, classifiers=[ release_status, "Intended Audience :: Developers", @@ -82,14 +82,9 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, + python_requires=">=3.7", namespace_packages=namespaces, install_requires=dependencies, - extras_require=extras, - python_requires=">=3.7", - scripts=[ - "scripts/fixup_container_v1_keywords.py", - "scripts/fixup_container_v1beta1_keywords.py", - ], include_package_data=True, zip_safe=False, ) diff --git a/testing/constraints-3.10.txt b/testing/constraints-3.10.txt index e69de29b..ed7f9aed 100644 --- a/testing/constraints-3.10.txt +++ b/testing/constraints-3.10.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/testing/constraints-3.11.txt b/testing/constraints-3.11.txt index e69de29b..ed7f9aed 100644 --- a/testing/constraints-3.11.txt +++ b/testing/constraints-3.11.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/testing/constraints-3.7.txt b/testing/constraints-3.7.txt index 85c46d16..6f3158cc 100644 --- a/testing/constraints-3.7.txt +++ b/testing/constraints-3.7.txt @@ -1,11 +1,9 @@ # This constraints file is used to check that lower bounds # are correct in setup.py -# List *all* library dependencies and extras in this file. +# List all library dependencies and extras in this file. # Pin the version to the lower bound. -# -# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -google-api-core==1.32.0 -grpc-google-iam-v1==0.12.4 +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", +# Then this file should have google-cloud-foo==1.14.0 +google-api-core==1.33.2 proto-plus==1.22.0 protobuf==3.19.5 diff --git a/testing/constraints-3.8.txt b/testing/constraints-3.8.txt index e69de29b..ed7f9aed 100644 --- a/testing/constraints-3.8.txt +++ b/testing/constraints-3.8.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/testing/constraints-3.9.txt b/testing/constraints-3.9.txt index e69de29b..ed7f9aed 100644 --- a/testing/constraints-3.9.txt +++ b/testing/constraints-3.9.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf