From 3eb887cbe37c5e692b23d005f5ccd4e7efae4fde Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Fri, 5 Feb 2021 07:17:47 -0800 Subject: [PATCH] chore: upgrade gapic-generator-python to 0.40.5 PiperOrigin-RevId: 354996675 Source-Author: Google APIs Source-Date: Mon Feb 1 12:11:49 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: 20712b8fe95001b312f62c6c5f33e3e3ec92cfaf Source-Link: https://github.com/googleapis/googleapis/commit/20712b8fe95001b312f62c6c5f33e3e3ec92cfaf --- docs/container_v1/cluster_manager.rst | 11 + docs/container_v1/services.rst | 6 +- docs/container_v1/types.rst | 1 + docs/container_v1beta1/cluster_manager.rst | 11 + docs/container_v1beta1/services.rst | 6 +- docs/container_v1beta1/types.rst | 1 + .../services/cluster_manager/async_client.py | 243 ++++++--- .../services/cluster_manager/client.py | 480 +++++++++++------- .../services/cluster_manager/pagers.py | 16 +- .../cluster_manager/transports/grpc.py | 23 +- .../transports/grpc_asyncio.py | 23 +- .../container_v1/types/cluster_service.py | 236 ++++----- .../services/cluster_manager/async_client.py | 240 ++++++--- .../services/cluster_manager/client.py | 451 +++++++++------- .../services/cluster_manager/pagers.py | 16 +- .../cluster_manager/transports/grpc.py | 23 +- .../transports/grpc_asyncio.py | 23 +- .../types/cluster_service.py | 306 +++++------ synth.metadata | 8 +- .../container_v1/test_cluster_manager.py | 210 +++++--- .../container_v1beta1/test_cluster_manager.py | 210 +++++--- 21 files changed, 1565 insertions(+), 979 deletions(-) create mode 100644 docs/container_v1/cluster_manager.rst create mode 100644 docs/container_v1beta1/cluster_manager.rst diff --git a/docs/container_v1/cluster_manager.rst b/docs/container_v1/cluster_manager.rst new file mode 100644 index 00000000..be77fd5e --- /dev/null +++ b/docs/container_v1/cluster_manager.rst @@ -0,0 +1,11 @@ +ClusterManager +-------------------------------- + +.. automodule:: google.cloud.container_v1.services.cluster_manager + :members: + :inherited-members: + + +.. automodule:: google.cloud.container_v1.services.cluster_manager.pagers + :members: + :inherited-members: diff --git a/docs/container_v1/services.rst b/docs/container_v1/services.rst index a23224df..faa067b2 100644 --- a/docs/container_v1/services.rst +++ b/docs/container_v1/services.rst @@ -1,6 +1,6 @@ Services for Google Container v1 API ==================================== +.. toctree:: + :maxdepth: 2 -.. automodule:: google.cloud.container_v1.services.cluster_manager - :members: - :inherited-members: + cluster_manager diff --git a/docs/container_v1/types.rst b/docs/container_v1/types.rst index 0767dd6e..b6bb3f63 100644 --- a/docs/container_v1/types.rst +++ b/docs/container_v1/types.rst @@ -3,4 +3,5 @@ Types for Google Container v1 API .. automodule:: google.cloud.container_v1.types :members: + :undoc-members: :show-inheritance: diff --git a/docs/container_v1beta1/cluster_manager.rst b/docs/container_v1beta1/cluster_manager.rst new file mode 100644 index 00000000..e27c2b30 --- /dev/null +++ b/docs/container_v1beta1/cluster_manager.rst @@ -0,0 +1,11 @@ +ClusterManager +-------------------------------- + +.. automodule:: google.cloud.container_v1beta1.services.cluster_manager + :members: + :inherited-members: + + +.. automodule:: google.cloud.container_v1beta1.services.cluster_manager.pagers + :members: + :inherited-members: diff --git a/docs/container_v1beta1/services.rst b/docs/container_v1beta1/services.rst index e4b6a994..18ed4869 100644 --- a/docs/container_v1beta1/services.rst +++ b/docs/container_v1beta1/services.rst @@ -1,6 +1,6 @@ Services for Google Container v1beta1 API ========================================= +.. toctree:: + :maxdepth: 2 -.. automodule:: google.cloud.container_v1beta1.services.cluster_manager - :members: - :inherited-members: + cluster_manager diff --git a/docs/container_v1beta1/types.rst b/docs/container_v1beta1/types.rst index 9dd46e91..54844ef0 100644 --- a/docs/container_v1beta1/types.rst +++ b/docs/container_v1beta1/types.rst @@ -3,4 +3,5 @@ Types for Google Container v1beta1 API .. automodule:: google.cloud.container_v1beta1.types :members: + :undoc-members: :show-inheritance: 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 5825f4d9..efd24e61 100644 --- a/google/cloud/container_v1/services/cluster_manager/async_client.py +++ b/google/cloud/container_v1/services/cluster_manager/async_client.py @@ -73,6 +73,7 @@ class ClusterManagerAsyncClient: ClusterManagerClient.parse_common_location_path ) + from_service_account_info = ClusterManagerClient.from_service_account_info from_service_account_file = ClusterManagerClient.from_service_account_file from_service_account_json = from_service_account_file @@ -152,7 +153,7 @@ async def list_clusters( specified zone or all zones. Args: - request (:class:`~.cluster_service.ListClustersRequest`): + request (:class:`google.cloud.container_v1.types.ListClustersRequest`): The request object. ListClustersRequest lists clusters. project_id (:class:`str`): Deprecated. The Google Developers Console `project ID or @@ -160,6 +161,7 @@ async def list_clusters( number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -169,6 +171,7 @@ async def list_clusters( in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -177,6 +180,7 @@ async def list_clusters( will be listed. Specified in the format ``projects/*/locations/*``. Location "-" matches all zones and all regions. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -188,7 +192,7 @@ async def list_clusters( sent along with the request as metadata. Returns: - ~.cluster_service.ListClustersResponse: + google.cloud.container_v1.types.ListClustersResponse: ListClustersResponse is the result of ListClustersRequest. @@ -258,7 +262,7 @@ async def get_cluster( r"""Gets the details of a specific cluster. Args: - request (:class:`~.cluster_service.GetClusterRequest`): + request (:class:`google.cloud.container_v1.types.GetClusterRequest`): The request object. GetClusterRequest gets the settings of a cluster. project_id (:class:`str`): @@ -267,6 +271,7 @@ async def get_cluster( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -275,6 +280,7 @@ async def get_cluster( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -283,6 +289,7 @@ async def get_cluster( to retrieve. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -290,6 +297,7 @@ async def get_cluster( The name (project, location, cluster) of the cluster to retrieve. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -301,7 +309,7 @@ async def get_cluster( sent along with the request as metadata. Returns: - ~.cluster_service.Cluster: + google.cloud.container_v1.types.Cluster: A Google Kubernetes Engine cluster. """ # Create or coerce a protobuf request object. @@ -383,7 +391,7 @@ async def create_cluster( indicating which CIDR range the cluster is using. Args: - request (:class:`~.cluster_service.CreateClusterRequest`): + request (:class:`google.cloud.container_v1.types.CreateClusterRequest`): The request object. CreateClusterRequest creates a cluster. project_id (:class:`str`): @@ -392,6 +400,7 @@ async def create_cluster( number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -400,12 +409,14 @@ async def create_cluster( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster (:class:`~.cluster_service.Cluster`): + cluster (:class:`google.cloud.container_v1.types.Cluster`): Required. A `cluster resource `__ + This corresponds to the ``cluster`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -413,6 +424,7 @@ async def create_cluster( The parent (project and location) where the cluster will be created. Specified in the format ``projects/*/locations/*``. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -424,7 +436,7 @@ async def create_cluster( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -491,7 +503,7 @@ async def update_cluster( r"""Updates the settings of a specific cluster. Args: - request (:class:`~.cluster_service.UpdateClusterRequest`): + request (:class:`google.cloud.container_v1.types.UpdateClusterRequest`): The request object. UpdateClusterRequest updates the settings of a cluster. project_id (:class:`str`): @@ -500,6 +512,7 @@ async def update_cluster( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -508,6 +521,7 @@ async def update_cluster( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -516,12 +530,14 @@ async def update_cluster( to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update (:class:`~.cluster_service.ClusterUpdate`): + update (:class:`google.cloud.container_v1.types.ClusterUpdate`): Required. A description of the update. + This corresponds to the ``update`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -529,6 +545,7 @@ async def update_cluster( The name (project, location, cluster) of the cluster to update. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -540,7 +557,7 @@ async def update_cluster( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -605,7 +622,7 @@ async def update_node_pool( specified node pool. Args: - request (:class:`~.cluster_service.UpdateNodePoolRequest`): + request (:class:`google.cloud.container_v1.types.UpdateNodePoolRequest`): The request object. UpdateNodePoolRequests update a node pool's image and/or version. @@ -616,7 +633,7 @@ async def update_node_pool( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -659,7 +676,7 @@ async def set_node_pool_autoscaling( pool. Args: - request (:class:`~.cluster_service.SetNodePoolAutoscalingRequest`): + request (:class:`google.cloud.container_v1.types.SetNodePoolAutoscalingRequest`): The request object. SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. @@ -670,7 +687,7 @@ async def set_node_pool_autoscaling( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -717,7 +734,7 @@ async def set_logging_service( r"""Sets the logging service for a specific cluster. Args: - request (:class:`~.cluster_service.SetLoggingServiceRequest`): + request (:class:`google.cloud.container_v1.types.SetLoggingServiceRequest`): The request object. SetLoggingServiceRequest sets the logging service of a cluster. project_id (:class:`str`): @@ -726,6 +743,7 @@ async def set_logging_service( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -734,6 +752,7 @@ async def set_logging_service( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -742,6 +761,7 @@ async def set_logging_service( to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -760,6 +780,7 @@ async def set_logging_service( string,\ ``logging.googleapis.com/kubernetes`` will be used for GKE 1.14+ or ``logging.googleapis.com`` for earlier versions. + This corresponds to the ``logging_service`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -767,6 +788,7 @@ async def set_logging_service( The name (project, location, cluster) of the cluster to set logging. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -778,7 +800,7 @@ async def set_logging_service( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -849,7 +871,7 @@ async def set_monitoring_service( r"""Sets the monitoring service for a specific cluster. Args: - request (:class:`~.cluster_service.SetMonitoringServiceRequest`): + request (:class:`google.cloud.container_v1.types.SetMonitoringServiceRequest`): The request object. SetMonitoringServiceRequest sets the monitoring service of a cluster. project_id (:class:`str`): @@ -858,6 +880,7 @@ async def set_monitoring_service( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -866,6 +889,7 @@ async def set_monitoring_service( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -874,6 +898,7 @@ async def set_monitoring_service( to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -894,6 +919,7 @@ async def set_monitoring_service( string,\ ``monitoring.googleapis.com/kubernetes`` will be used for GKE 1.14+ or ``monitoring.googleapis.com`` for earlier versions. + This corresponds to the ``monitoring_service`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -901,6 +927,7 @@ async def set_monitoring_service( The name (project, location, cluster) of the cluster to set monitoring. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -912,7 +939,7 @@ async def set_monitoring_service( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -983,7 +1010,7 @@ async def set_addons_config( r"""Sets the addons for a specific cluster. Args: - request (:class:`~.cluster_service.SetAddonsConfigRequest`): + request (:class:`google.cloud.container_v1.types.SetAddonsConfigRequest`): The request object. SetAddonsConfigRequest sets the addons associated with the cluster. project_id (:class:`str`): @@ -992,6 +1019,7 @@ async def set_addons_config( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1000,6 +1028,7 @@ async def set_addons_config( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1008,13 +1037,15 @@ async def set_addons_config( to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - addons_config (:class:`~.cluster_service.AddonsConfig`): + addons_config (:class:`google.cloud.container_v1.types.AddonsConfig`): Required. The desired configurations for the various addons available to run in the cluster. + This corresponds to the ``addons_config`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1022,6 +1053,7 @@ async def set_addons_config( The name (project, location, cluster) of the cluster to set addons. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1033,7 +1065,7 @@ async def set_addons_config( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1104,7 +1136,7 @@ async def set_locations( instead. Args: - request (:class:`~.cluster_service.SetLocationsRequest`): + request (:class:`google.cloud.container_v1.types.SetLocationsRequest`): The request object. SetLocationsRequest sets the locations of the cluster. project_id (:class:`str`): @@ -1113,6 +1145,7 @@ async def set_locations( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1121,6 +1154,7 @@ async def set_locations( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1129,6 +1163,7 @@ async def set_locations( to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1142,6 +1177,7 @@ async def set_locations( This list must always include the cluster's primary zone. + This corresponds to the ``locations`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1149,6 +1185,7 @@ async def set_locations( The name (project, location, cluster) of the cluster to set locations. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1160,7 +1197,7 @@ async def set_locations( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1230,7 +1267,7 @@ async def update_master( r"""Updates the master for a specific cluster. Args: - request (:class:`~.cluster_service.UpdateMasterRequest`): + request (:class:`google.cloud.container_v1.types.UpdateMasterRequest`): The request object. UpdateMasterRequest updates the master of the cluster. project_id (:class:`str`): @@ -1239,6 +1276,7 @@ async def update_master( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1247,6 +1285,7 @@ async def update_master( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1255,6 +1294,7 @@ async def update_master( to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1273,6 +1313,7 @@ async def update_master( "1.X.Y-gke.N": picks an explicit Kubernetes version - "-": picks the default Kubernetes version + This corresponds to the ``master_version`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1280,6 +1321,7 @@ async def update_master( The name (project, location, cluster) of the cluster to update. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1291,7 +1333,7 @@ async def update_master( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1358,7 +1400,7 @@ async def set_master_auth( password. Args: - request (:class:`~.cluster_service.SetMasterAuthRequest`): + request (:class:`google.cloud.container_v1.types.SetMasterAuthRequest`): The request object. SetMasterAuthRequest updates the admin password of a cluster. @@ -1369,7 +1411,7 @@ async def set_master_auth( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1424,7 +1466,7 @@ async def delete_cluster( initially created. Args: - request (:class:`~.cluster_service.DeleteClusterRequest`): + request (:class:`google.cloud.container_v1.types.DeleteClusterRequest`): The request object. DeleteClusterRequest deletes a cluster. project_id (:class:`str`): @@ -1433,6 +1475,7 @@ async def delete_cluster( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1441,6 +1484,7 @@ async def delete_cluster( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1449,6 +1493,7 @@ async def delete_cluster( to delete. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1456,6 +1501,7 @@ async def delete_cluster( The name (project, location, cluster) of the cluster to delete. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1467,7 +1513,7 @@ async def delete_cluster( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1540,7 +1586,7 @@ async def list_operations( or all zones. Args: - request (:class:`~.cluster_service.ListOperationsRequest`): + request (:class:`google.cloud.container_v1.types.ListOperationsRequest`): The request object. ListOperationsRequest lists operations. project_id (:class:`str`): @@ -1549,6 +1595,7 @@ async def list_operations( number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1558,6 +1605,7 @@ async def list_operations( to return operations for, or ``-`` for all zones. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1569,7 +1617,7 @@ async def list_operations( sent along with the request as metadata. Returns: - ~.cluster_service.ListOperationsResponse: + google.cloud.container_v1.types.ListOperationsResponse: ListOperationsResponse is the result of ListOperationsRequest. @@ -1637,7 +1685,7 @@ async def get_operation( r"""Gets the specified operation. Args: - request (:class:`~.cluster_service.GetOperationRequest`): + request (:class:`google.cloud.container_v1.types.GetOperationRequest`): The request object. GetOperationRequest gets a single operation. project_id (:class:`str`): @@ -1646,6 +1694,7 @@ async def get_operation( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1654,6 +1703,7 @@ async def get_operation( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1661,6 +1711,7 @@ async def get_operation( Deprecated. The server-assigned ``name`` of the operation. This field has been deprecated and replaced by the name field. + This corresponds to the ``operation_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1668,6 +1719,7 @@ async def get_operation( The name (project, location, operation id) of the operation to get. Specified in the format ``projects/*/locations/*/operations/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1679,7 +1731,7 @@ async def get_operation( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1753,7 +1805,7 @@ async def cancel_operation( r"""Cancels the specified operation. Args: - request (:class:`~.cluster_service.CancelOperationRequest`): + request (:class:`google.cloud.container_v1.types.CancelOperationRequest`): The request object. CancelOperationRequest cancels a single operation. project_id (:class:`str`): @@ -1762,6 +1814,7 @@ async def cancel_operation( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1770,6 +1823,7 @@ async def cancel_operation( `zone `__ in which the operation resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1777,6 +1831,7 @@ async def cancel_operation( Deprecated. The server-assigned ``name`` of the operation. This field has been deprecated and replaced by the name field. + This corresponds to the ``operation_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1784,6 +1839,7 @@ async def cancel_operation( The name (project, location, operation id) of the operation to cancel. Specified in the format ``projects/*/locations/*/operations/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1852,7 +1908,7 @@ async def get_server_config( Kubernetes Engine service. Args: - request (:class:`~.cluster_service.GetServerConfigRequest`): + request (:class:`google.cloud.container_v1.types.GetServerConfigRequest`): The request object. Gets the current Kubernetes Engine service configuration. project_id (:class:`str`): @@ -1861,6 +1917,7 @@ async def get_server_config( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1869,12 +1926,14 @@ async def get_server_config( `zone `__ to return operations for. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. name (:class:`str`): The name (project and location) of the server config to get, specified in the format ``projects/*/locations/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1886,7 +1945,7 @@ async def get_server_config( sent along with the request as metadata. Returns: - ~.cluster_service.ServerConfig: + google.cloud.container_v1.types.ServerConfig: Kubernetes Engine service configuration. @@ -1955,7 +2014,7 @@ async def get_json_web_keys( available for all clusters. Args: - request (:class:`~.cluster_service.GetJSONWebKeysRequest`): + request (:class:`google.cloud.container_v1.types.GetJSONWebKeysRequest`): 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 @@ -1969,7 +2028,7 @@ async def get_json_web_keys( sent along with the request as metadata. Returns: - ~.cluster_service.GetJSONWebKeysResponse: + google.cloud.container_v1.types.GetJSONWebKeysResponse: GetJSONWebKeysResponse is a valid JSON Web Key Set as specififed in rfc 7517 @@ -2014,7 +2073,7 @@ async def list_node_pools( r"""Lists the node pools for a cluster. Args: - request (:class:`~.cluster_service.ListNodePoolsRequest`): + request (:class:`google.cloud.container_v1.types.ListNodePoolsRequest`): The request object. ListNodePoolsRequest lists the node pool(s) for a cluster. project_id (:class:`str`): @@ -2023,6 +2082,7 @@ async def list_node_pools( number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2031,6 +2091,7 @@ async def list_node_pools( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2038,6 +2099,7 @@ async def list_node_pools( Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2045,6 +2107,7 @@ async def list_node_pools( The parent (project, location, cluster id) where the node pools will be listed. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2056,7 +2119,7 @@ async def list_node_pools( sent along with the request as metadata. Returns: - ~.cluster_service.ListNodePoolsResponse: + google.cloud.container_v1.types.ListNodePoolsResponse: ListNodePoolsResponse is the result of ListNodePoolsRequest. @@ -2129,7 +2192,7 @@ async def get_node_pool( r"""Retrieves the requested node pool. Args: - request (:class:`~.cluster_service.GetNodePoolRequest`): + request (:class:`google.cloud.container_v1.types.GetNodePoolRequest`): The request object. GetNodePoolRequest retrieves a node pool for a cluster. project_id (:class:`str`): @@ -2138,6 +2201,7 @@ async def get_node_pool( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2146,6 +2210,7 @@ async def get_node_pool( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2153,6 +2218,7 @@ async def get_node_pool( Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2160,6 +2226,7 @@ async def get_node_pool( Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field. + This corresponds to the ``node_pool_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2167,6 +2234,7 @@ async def get_node_pool( The name (project, location, cluster, node pool id) of the node pool to get. Specified in the format ``projects/*/locations/*/clusters/*/nodePools/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2178,7 +2246,7 @@ async def get_node_pool( sent along with the request as metadata. Returns: - ~.cluster_service.NodePool: + google.cloud.container_v1.types.NodePool: NodePool contains the name and configuration for a cluster's node pool. Node pools are a set of nodes (i.e. @@ -2261,7 +2329,7 @@ async def create_node_pool( r"""Creates a node pool for a cluster. Args: - request (:class:`~.cluster_service.CreateNodePoolRequest`): + request (:class:`google.cloud.container_v1.types.CreateNodePoolRequest`): The request object. CreateNodePoolRequest creates a node pool for a cluster. project_id (:class:`str`): @@ -2270,6 +2338,7 @@ async def create_node_pool( number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2278,6 +2347,7 @@ async def create_node_pool( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2285,10 +2355,11 @@ async def create_node_pool( Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - node_pool (:class:`~.cluster_service.NodePool`): + node_pool (:class:`google.cloud.container_v1.types.NodePool`): Required. The node pool to create. This corresponds to the ``node_pool`` field on the ``request`` instance; if ``request`` is provided, this @@ -2297,6 +2368,7 @@ async def create_node_pool( The parent (project, location, cluster id) where the node pool will be created. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2308,7 +2380,7 @@ async def create_node_pool( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2377,7 +2449,7 @@ async def delete_node_pool( r"""Deletes a node pool from a cluster. Args: - request (:class:`~.cluster_service.DeleteNodePoolRequest`): + request (:class:`google.cloud.container_v1.types.DeleteNodePoolRequest`): The request object. DeleteNodePoolRequest deletes a node pool for a cluster. project_id (:class:`str`): @@ -2386,6 +2458,7 @@ async def delete_node_pool( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2394,6 +2467,7 @@ async def delete_node_pool( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2401,6 +2475,7 @@ async def delete_node_pool( Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2409,6 +2484,7 @@ async def delete_node_pool( to delete. This field has been deprecated and replaced by the name field. + This corresponds to the ``node_pool_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2416,6 +2492,7 @@ async def delete_node_pool( The name (project, location, cluster, node pool id) of the node pool to delete. Specified in the format ``projects/*/locations/*/clusters/*/nodePools/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2427,7 +2504,7 @@ async def delete_node_pool( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2506,7 +2583,7 @@ async def rollback_node_pool_upgrade( successfully completed. Args: - request (:class:`~.cluster_service.RollbackNodePoolUpgradeRequest`): + request (:class:`google.cloud.container_v1.types.RollbackNodePoolUpgradeRequest`): The request object. RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed NodePool upgrade. This will be an no-op if the last upgrade @@ -2517,6 +2594,7 @@ async def rollback_node_pool_upgrade( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2525,6 +2603,7 @@ async def rollback_node_pool_upgrade( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2533,6 +2612,7 @@ async def rollback_node_pool_upgrade( to rollback. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2541,6 +2621,7 @@ async def rollback_node_pool_upgrade( to rollback. This field has been deprecated and replaced by the name field. + This corresponds to the ``node_pool_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2549,6 +2630,7 @@ async def rollback_node_pool_upgrade( the node poll to rollback upgrade. Specified in the format ``projects/*/locations/*/clusters/*/nodePools/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2560,7 +2642,7 @@ async def rollback_node_pool_upgrade( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2624,7 +2706,7 @@ async def set_node_pool_management( r"""Sets the NodeManagement options for a node pool. Args: - request (:class:`~.cluster_service.SetNodePoolManagementRequest`): + request (:class:`google.cloud.container_v1.types.SetNodePoolManagementRequest`): The request object. SetNodePoolManagementRequest sets the node management properties of a node pool. @@ -2635,7 +2717,7 @@ async def set_node_pool_management( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2677,7 +2759,7 @@ async def set_labels( r"""Sets labels on a cluster. Args: - request (:class:`~.cluster_service.SetLabelsRequest`): + request (:class:`google.cloud.container_v1.types.SetLabelsRequest`): 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 @@ -2690,7 +2772,7 @@ async def set_labels( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2738,7 +2820,7 @@ async def set_legacy_abac( on a cluster. Args: - request (:class:`~.cluster_service.SetLegacyAbacRequest`): + request (:class:`google.cloud.container_v1.types.SetLegacyAbacRequest`): The request object. SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for a cluster. project_id (:class:`str`): @@ -2747,6 +2829,7 @@ async def set_legacy_abac( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2755,6 +2838,7 @@ async def set_legacy_abac( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2763,12 +2847,14 @@ async def set_legacy_abac( to update. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. enabled (:class:`bool`): Required. Whether ABAC authorization will be enabled in the cluster. + This corresponds to the ``enabled`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2776,6 +2862,7 @@ async def set_legacy_abac( The name (project, location, cluster id) of the cluster to set legacy abac. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2787,7 +2874,7 @@ async def set_legacy_abac( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2855,7 +2942,7 @@ async def start_ip_rotation( r"""Starts master IP rotation. Args: - request (:class:`~.cluster_service.StartIPRotationRequest`): + request (:class:`google.cloud.container_v1.types.StartIPRotationRequest`): 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. @@ -2865,6 +2952,7 @@ async def start_ip_rotation( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2873,6 +2961,7 @@ async def start_ip_rotation( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2880,6 +2969,7 @@ async def start_ip_rotation( Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2887,6 +2977,7 @@ async def start_ip_rotation( The name (project, location, cluster id) of the cluster to start IP rotation. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2898,7 +2989,7 @@ async def start_ip_rotation( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2964,7 +3055,7 @@ async def complete_ip_rotation( r"""Completes master IP rotation. Args: - request (:class:`~.cluster_service.CompleteIPRotationRequest`): + request (:class:`google.cloud.container_v1.types.CompleteIPRotationRequest`): The request object. CompleteIPRotationRequest moves the cluster master back into single-IP mode. project_id (:class:`str`): @@ -2973,6 +3064,7 @@ async def complete_ip_rotation( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2981,6 +3073,7 @@ async def complete_ip_rotation( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2988,6 +3081,7 @@ async def complete_ip_rotation( Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2995,6 +3089,7 @@ async def complete_ip_rotation( The name (project, location, cluster id) of the cluster to complete IP rotation. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3006,7 +3101,7 @@ async def complete_ip_rotation( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3068,7 +3163,7 @@ async def set_node_pool_size( r"""Sets the size for a specific node pool. Args: - request (:class:`~.cluster_service.SetNodePoolSizeRequest`): + request (:class:`google.cloud.container_v1.types.SetNodePoolSizeRequest`): The request object. SetNodePoolSizeRequest sets the size a node pool. @@ -3079,7 +3174,7 @@ async def set_node_pool_size( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3126,7 +3221,7 @@ async def set_network_policy( r"""Enables or disables Network Policy for a cluster. Args: - request (:class:`~.cluster_service.SetNetworkPolicyRequest`): + request (:class:`google.cloud.container_v1.types.SetNetworkPolicyRequest`): The request object. SetNetworkPolicyRequest enables/disables network policy for a cluster. project_id (:class:`str`): @@ -3135,6 +3230,7 @@ async def set_network_policy( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3143,6 +3239,7 @@ async def set_network_policy( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3150,12 +3247,14 @@ async def set_network_policy( Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - network_policy (:class:`~.cluster_service.NetworkPolicy`): + network_policy (:class:`google.cloud.container_v1.types.NetworkPolicy`): Required. Configuration options for the NetworkPolicy feature. + This corresponds to the ``network_policy`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3163,6 +3262,7 @@ async def set_network_policy( The name (project, location, cluster id) of the cluster to set networking policy. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3174,7 +3274,7 @@ async def set_network_policy( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3243,13 +3343,14 @@ async def set_maintenance_policy( r"""Sets the maintenance policy for a cluster. Args: - request (:class:`~.cluster_service.SetMaintenancePolicyRequest`): + request (:class:`google.cloud.container_v1.types.SetMaintenancePolicyRequest`): The request object. SetMaintenancePolicyRequest sets the maintenance policy for a cluster. project_id (:class:`str`): Required. The Google Developers Console `project ID or project number `__. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3257,19 +3358,22 @@ async def set_maintenance_policy( Required. The name of the Google Compute Engine `zone `__ in which the cluster resides. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. cluster_id (:class:`str`): Required. The name of the cluster to update. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - maintenance_policy (:class:`~.cluster_service.MaintenancePolicy`): + maintenance_policy (:class:`google.cloud.container_v1.types.MaintenancePolicy`): Required. The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy. + This corresponds to the ``maintenance_policy`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3277,6 +3381,7 @@ async def set_maintenance_policy( The name (project, location, cluster id) of the cluster to set maintenance policy. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3288,7 +3393,7 @@ async def set_maintenance_policy( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3355,7 +3460,7 @@ async def list_usable_subnetworks( clusters in a project. Args: - request (:class:`~.cluster_service.ListUsableSubnetworksRequest`): + request (:class:`google.cloud.container_v1.types.ListUsableSubnetworksRequest`): The request object. ListUsableSubnetworksRequest requests the list of usable subnetworks available to a user for creating clusters. @@ -3367,7 +3472,7 @@ async def list_usable_subnetworks( sent along with the request as metadata. Returns: - ~.pagers.ListUsableSubnetworksAsyncPager: + google.cloud.container_v1.services.cluster_manager.pagers.ListUsableSubnetworksAsyncPager: ListUsableSubnetworksResponse is the response of ListUsableSubnetworksRequest. diff --git a/google/cloud/container_v1/services/cluster_manager/client.py b/google/cloud/container_v1/services/cluster_manager/client.py index ab4b7c16..6c0d9d43 100644 --- a/google/cloud/container_v1/services/cluster_manager/client.py +++ b/google/cloud/container_v1/services/cluster_manager/client.py @@ -110,6 +110,22 @@ def _get_default_mtls_endpoint(api_endpoint): DEFAULT_ENDPOINT ) + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + ClusterManagerClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + @classmethod def from_service_account_file(cls, filename: str, *args, **kwargs): """Creates an instance of this client using the provided credentials @@ -122,7 +138,7 @@ def from_service_account_file(cls, filename: str, *args, **kwargs): kwargs: Additional arguments to pass to the constructor. Returns: - {@api.name}: The constructed client. + ClusterManagerClient: The constructed client. """ credentials = service_account.Credentials.from_service_account_file(filename) kwargs["credentials"] = credentials @@ -214,10 +230,10 @@ def __init__( credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. - transport (Union[str, ~.ClusterManagerTransport]): The + transport (Union[str, ClusterManagerTransport]): The transport to use. If set to None, a transport is chosen automatically. - client_options (client_options_lib.ClientOptions): Custom options for the + client_options (google.api_core.client_options.ClientOptions): 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 @@ -253,21 +269,17 @@ def __init__( util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false")) ) - ssl_credentials = None + client_cert_source_func = None is_mtls = False if use_client_cert: if client_options.client_cert_source: - import grpc # type: ignore - - cert, key = client_options.client_cert_source() - ssl_credentials = grpc.ssl_channel_credentials( - certificate_chain=cert, private_key=key - ) is_mtls = True + client_cert_source_func = client_options.client_cert_source else: - creds = SslCredentials() - is_mtls = creds.is_mtls - ssl_credentials = creds.ssl_credentials if is_mtls else None + is_mtls = mtls.has_default_client_cert_source() + client_cert_source_func = ( + mtls.default_client_cert_source() if is_mtls else None + ) # Figure out which api endpoint to use. if client_options.api_endpoint is not None: @@ -310,7 +322,7 @@ def __init__( credentials_file=client_options.credentials_file, host=api_endpoint, scopes=client_options.scopes, - ssl_channel_credentials=ssl_credentials, + client_cert_source_for_mtls=client_cert_source_func, quota_project_id=client_options.quota_project_id, client_info=client_info, ) @@ -330,31 +342,34 @@ def list_clusters( specified zone or all zones. Args: - request (:class:`~.cluster_service.ListClustersRequest`): + request (google.cloud.container_v1.types.ListClustersRequest): The request object. ListClustersRequest lists clusters. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - parent (:class:`str`): + parent (str): The parent (project and location) where the clusters will be listed. Specified in the format ``projects/*/locations/*``. Location "-" matches all zones and all regions. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -366,7 +381,7 @@ def list_clusters( sent along with the request as metadata. Returns: - ~.cluster_service.ListClustersResponse: + google.cloud.container_v1.types.ListClustersResponse: ListClustersResponse is the result of ListClustersRequest. @@ -429,38 +444,42 @@ def get_cluster( r"""Gets the details of a specific cluster. Args: - request (:class:`~.cluster_service.GetClusterRequest`): + request (google.cloud.container_v1.types.GetClusterRequest): The request object. GetClusterRequest gets the settings of a cluster. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, cluster) of the cluster to retrieve. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -472,7 +491,7 @@ def get_cluster( sent along with the request as metadata. Returns: - ~.cluster_service.Cluster: + google.cloud.container_v1.types.Cluster: A Google Kubernetes Engine cluster. """ # Create or coerce a protobuf request object. @@ -547,36 +566,40 @@ def create_cluster( indicating which CIDR range the cluster is using. Args: - request (:class:`~.cluster_service.CreateClusterRequest`): + request (google.cloud.container_v1.types.CreateClusterRequest): The request object. CreateClusterRequest creates a cluster. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster (:class:`~.cluster_service.Cluster`): + cluster (google.cloud.container_v1.types.Cluster): Required. A `cluster resource `__ + This corresponds to the ``cluster`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - parent (:class:`str`): + parent (str): The parent (project and location) where the cluster will be created. Specified in the format ``projects/*/locations/*``. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -588,7 +611,7 @@ def create_cluster( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -656,44 +679,49 @@ def update_cluster( r"""Updates the settings of a specific cluster. Args: - request (:class:`~.cluster_service.UpdateClusterRequest`): + request (google.cloud.container_v1.types.UpdateClusterRequest): The request object. UpdateClusterRequest updates the settings of a cluster. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update (:class:`~.cluster_service.ClusterUpdate`): + update (google.cloud.container_v1.types.ClusterUpdate): Required. A description of the update. + This corresponds to the ``update`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, cluster) of the cluster to update. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -705,7 +733,7 @@ def update_cluster( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -771,7 +799,7 @@ def update_node_pool( specified node pool. Args: - request (:class:`~.cluster_service.UpdateNodePoolRequest`): + request (google.cloud.container_v1.types.UpdateNodePoolRequest): The request object. UpdateNodePoolRequests update a node pool's image and/or version. @@ -782,7 +810,7 @@ def update_node_pool( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -826,7 +854,7 @@ def set_node_pool_autoscaling( pool. Args: - request (:class:`~.cluster_service.SetNodePoolAutoscalingRequest`): + request (google.cloud.container_v1.types.SetNodePoolAutoscalingRequest): The request object. SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. @@ -837,7 +865,7 @@ def set_node_pool_autoscaling( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -887,35 +915,38 @@ def set_logging_service( r"""Sets the logging service for a specific cluster. Args: - request (:class:`~.cluster_service.SetLoggingServiceRequest`): + request (google.cloud.container_v1.types.SetLoggingServiceRequest): The request object. SetLoggingServiceRequest sets the logging service of a cluster. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - logging_service (:class:`str`): + logging_service (str): Required. The logging service the cluster should use to write logs. Currently available options: @@ -930,13 +961,15 @@ def set_logging_service( string,\ ``logging.googleapis.com/kubernetes`` will be used for GKE 1.14+ or ``logging.googleapis.com`` for earlier versions. + This corresponds to the ``logging_service`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, cluster) of the cluster to set logging. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -948,7 +981,7 @@ def set_logging_service( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1020,35 +1053,38 @@ def set_monitoring_service( r"""Sets the monitoring service for a specific cluster. Args: - request (:class:`~.cluster_service.SetMonitoringServiceRequest`): + request (google.cloud.container_v1.types.SetMonitoringServiceRequest): The request object. SetMonitoringServiceRequest sets the monitoring service of a cluster. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - monitoring_service (:class:`str`): + monitoring_service (str): Required. The monitoring service the cluster should use to write metrics. Currently available options: @@ -1065,13 +1101,15 @@ def set_monitoring_service( string,\ ``monitoring.googleapis.com/kubernetes`` will be used for GKE 1.14+ or ``monitoring.googleapis.com`` for earlier versions. + This corresponds to the ``monitoring_service`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, cluster) of the cluster to set monitoring. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1083,7 +1121,7 @@ def set_monitoring_service( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1155,45 +1193,50 @@ def set_addons_config( r"""Sets the addons for a specific cluster. Args: - request (:class:`~.cluster_service.SetAddonsConfigRequest`): + request (google.cloud.container_v1.types.SetAddonsConfigRequest): The request object. SetAddonsConfigRequest sets the addons associated with the cluster. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - addons_config (:class:`~.cluster_service.AddonsConfig`): + addons_config (google.cloud.container_v1.types.AddonsConfig): Required. The desired configurations for the various addons available to run in the cluster. + This corresponds to the ``addons_config`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, cluster) of the cluster to set addons. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1205,7 +1248,7 @@ def set_addons_config( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1277,35 +1320,38 @@ def set_locations( instead. Args: - request (:class:`~.cluster_service.SetLocationsRequest`): + request (google.cloud.container_v1.types.SetLocationsRequest): The request object. SetLocationsRequest sets the locations of the cluster. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + 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 (Sequence[str]): Required. The desired list of Google Compute Engine `zones `__ in which the cluster's nodes should be located. Changing @@ -1315,13 +1361,15 @@ def set_locations( This list must always include the cluster's primary zone. + This corresponds to the ``locations`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, cluster) of the cluster to set locations. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1333,7 +1381,7 @@ def set_locations( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1404,35 +1452,38 @@ def update_master( r"""Updates the master for a specific cluster. Args: - request (:class:`~.cluster_service.UpdateMasterRequest`): + request (google.cloud.container_v1.types.UpdateMasterRequest): The request object. UpdateMasterRequest updates the master of the cluster. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - master_version (:class:`str`): + master_version (str): Required. The Kubernetes version to change the master to. Users may specify either explicit @@ -1447,13 +1498,15 @@ def update_master( "1.X.Y-gke.N": picks an explicit Kubernetes version - "-": picks the default Kubernetes version + This corresponds to the ``master_version`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, cluster) of the cluster to update. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1465,7 +1518,7 @@ def update_master( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1533,7 +1586,7 @@ def set_master_auth( password. Args: - request (:class:`~.cluster_service.SetMasterAuthRequest`): + request (google.cloud.container_v1.types.SetMasterAuthRequest): The request object. SetMasterAuthRequest updates the admin password of a cluster. @@ -1544,7 +1597,7 @@ def set_master_auth( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1600,38 +1653,42 @@ def delete_cluster( initially created. Args: - request (:class:`~.cluster_service.DeleteClusterRequest`): + request (google.cloud.container_v1.types.DeleteClusterRequest): The request object. DeleteClusterRequest deletes a cluster. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, cluster) of the cluster to delete. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1643,7 +1700,7 @@ def delete_cluster( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1709,24 +1766,26 @@ def list_operations( or all zones. Args: - request (:class:`~.cluster_service.ListOperationsRequest`): + request (google.cloud.container_v1.types.ListOperationsRequest): The request object. ListOperationsRequest lists operations. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ to return operations for, or ``-`` for all zones. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1738,7 +1797,7 @@ def list_operations( sent along with the request as metadata. Returns: - ~.cluster_service.ListOperationsResponse: + google.cloud.container_v1.types.ListOperationsResponse: ListOperationsResponse is the result of ListOperationsRequest. @@ -1799,37 +1858,41 @@ def get_operation( r"""Gets the specified operation. Args: - request (:class:`~.cluster_service.GetOperationRequest`): + request (google.cloud.container_v1.types.GetOperationRequest): The request object. GetOperationRequest gets a single operation. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - operation_id (:class:`str`): + operation_id (str): Deprecated. The server-assigned ``name`` of the operation. This field has been deprecated and replaced by the name field. + This corresponds to the ``operation_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, operation id) of the operation to get. Specified in the format ``projects/*/locations/*/operations/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1841,7 +1904,7 @@ def get_operation( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1908,37 +1971,41 @@ def cancel_operation( r"""Cancels the specified operation. Args: - request (:class:`~.cluster_service.CancelOperationRequest`): + request (google.cloud.container_v1.types.CancelOperationRequest): The request object. CancelOperationRequest cancels a single operation. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the operation resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - operation_id (:class:`str`): + operation_id (str): Deprecated. The server-assigned ``name`` of the operation. This field has been deprecated and replaced by the name field. + This corresponds to the ``operation_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, operation id) of the operation to cancel. Specified in the format ``projects/*/locations/*/operations/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2008,29 +2075,32 @@ def get_server_config( Kubernetes Engine service. Args: - request (:class:`~.cluster_service.GetServerConfigRequest`): + request (google.cloud.container_v1.types.GetServerConfigRequest): The request object. Gets the current Kubernetes Engine service configuration. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ to return operations for. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project and location) of the server config to get, specified in the format ``projects/*/locations/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2042,7 +2112,7 @@ def get_server_config( sent along with the request as metadata. Returns: - ~.cluster_service.ServerConfig: + google.cloud.container_v1.types.ServerConfig: Kubernetes Engine service configuration. @@ -2104,7 +2174,7 @@ def get_json_web_keys( available for all clusters. Args: - request (:class:`~.cluster_service.GetJSONWebKeysRequest`): + request (google.cloud.container_v1.types.GetJSONWebKeysRequest): 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 @@ -2118,7 +2188,7 @@ def get_json_web_keys( sent along with the request as metadata. Returns: - ~.cluster_service.GetJSONWebKeysResponse: + google.cloud.container_v1.types.GetJSONWebKeysResponse: GetJSONWebKeysResponse is a valid JSON Web Key Set as specififed in rfc 7517 @@ -2164,37 +2234,41 @@ def list_node_pools( r"""Lists the node pools for a cluster. Args: - request (:class:`~.cluster_service.ListNodePoolsRequest`): + request (google.cloud.container_v1.types.ListNodePoolsRequest): The request object. ListNodePoolsRequest lists the node pool(s) for a cluster. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - parent (:class:`str`): + parent (str): The parent (project, location, cluster id) where the node pools will be listed. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2206,7 +2280,7 @@ def list_node_pools( sent along with the request as metadata. Returns: - ~.cluster_service.ListNodePoolsResponse: + google.cloud.container_v1.types.ListNodePoolsResponse: ListNodePoolsResponse is the result of ListNodePoolsRequest. @@ -2272,44 +2346,49 @@ def get_node_pool( r"""Retrieves the requested node pool. Args: - request (:class:`~.cluster_service.GetNodePoolRequest`): + request (google.cloud.container_v1.types.GetNodePoolRequest): The request object. GetNodePoolRequest retrieves a node pool for a cluster. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - node_pool_id (:class:`str`): + node_pool_id (str): Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field. + This corresponds to the ``node_pool_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, cluster, node pool id) of the node pool to get. Specified in the format ``projects/*/locations/*/clusters/*/nodePools/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2321,7 +2400,7 @@ def get_node_pool( sent along with the request as metadata. Returns: - ~.cluster_service.NodePool: + google.cloud.container_v1.types.NodePool: NodePool contains the name and configuration for a cluster's node pool. Node pools are a set of nodes (i.e. @@ -2397,42 +2476,46 @@ def create_node_pool( r"""Creates a node pool for a cluster. Args: - request (:class:`~.cluster_service.CreateNodePoolRequest`): + request (google.cloud.container_v1.types.CreateNodePoolRequest): The request object. CreateNodePoolRequest creates a node pool for a cluster. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - node_pool (:class:`~.cluster_service.NodePool`): + node_pool (google.cloud.container_v1.types.NodePool): Required. The node pool to create. This corresponds to the ``node_pool`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - parent (:class:`str`): + parent (str): The parent (project, location, cluster id) where the node pool will be created. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2444,7 +2527,7 @@ def create_node_pool( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2514,45 +2597,50 @@ def delete_node_pool( r"""Deletes a node pool from a cluster. Args: - request (:class:`~.cluster_service.DeleteNodePoolRequest`): + request (google.cloud.container_v1.types.DeleteNodePoolRequest): The request object. DeleteNodePoolRequest deletes a node pool for a cluster. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - node_pool_id (:class:`str`): + node_pool_id (str): Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field. + This corresponds to the ``node_pool_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, cluster, node pool id) of the node pool to delete. Specified in the format ``projects/*/locations/*/clusters/*/nodePools/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2564,7 +2652,7 @@ def delete_node_pool( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2636,49 +2724,54 @@ def rollback_node_pool_upgrade( successfully completed. Args: - request (:class:`~.cluster_service.RollbackNodePoolUpgradeRequest`): + request (google.cloud.container_v1.types.RollbackNodePoolUpgradeRequest): The request object. RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed NodePool upgrade. This will be an no-op if the last upgrade successfully completed. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Deprecated. The name of the cluster to rollback. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - node_pool_id (:class:`str`): + node_pool_id (str): Deprecated. The name of the node pool to rollback. This field has been deprecated and replaced by the name field. + This corresponds to the ``node_pool_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, cluster, node pool id) of the node poll to rollback upgrade. Specified in the format ``projects/*/locations/*/clusters/*/nodePools/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2690,7 +2783,7 @@ def rollback_node_pool_upgrade( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2757,7 +2850,7 @@ def set_node_pool_management( r"""Sets the NodeManagement options for a node pool. Args: - request (:class:`~.cluster_service.SetNodePoolManagementRequest`): + request (google.cloud.container_v1.types.SetNodePoolManagementRequest): The request object. SetNodePoolManagementRequest sets the node management properties of a node pool. @@ -2768,7 +2861,7 @@ def set_node_pool_management( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2811,7 +2904,7 @@ def set_labels( r"""Sets labels on a cluster. Args: - request (:class:`~.cluster_service.SetLabelsRequest`): + request (google.cloud.container_v1.types.SetLabelsRequest): 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 @@ -2824,7 +2917,7 @@ def set_labels( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2873,44 +2966,49 @@ def set_legacy_abac( on a cluster. Args: - request (:class:`~.cluster_service.SetLegacyAbacRequest`): + request (google.cloud.container_v1.types.SetLegacyAbacRequest): The request object. SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for a cluster. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - enabled (:class:`bool`): + enabled (bool): Required. Whether ABAC authorization will be enabled in the cluster. + This corresponds to the ``enabled`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, cluster id) of the cluster to set legacy abac. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2922,7 +3020,7 @@ def set_legacy_abac( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2991,38 +3089,42 @@ def start_ip_rotation( r"""Starts master IP rotation. Args: - request (:class:`~.cluster_service.StartIPRotationRequest`): + request (google.cloud.container_v1.types.StartIPRotationRequest): 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. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, cluster id) of the cluster to start IP rotation. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3034,7 +3136,7 @@ def start_ip_rotation( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3101,37 +3203,41 @@ def complete_ip_rotation( r"""Completes master IP rotation. Args: - request (:class:`~.cluster_service.CompleteIPRotationRequest`): + request (google.cloud.container_v1.types.CompleteIPRotationRequest): The request object. CompleteIPRotationRequest moves the cluster master back into single-IP mode. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, cluster id) of the cluster to complete IP rotation. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3143,7 +3249,7 @@ def complete_ip_rotation( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3206,7 +3312,7 @@ def set_node_pool_size( r"""Sets the size for a specific node pool. Args: - request (:class:`~.cluster_service.SetNodePoolSizeRequest`): + request (google.cloud.container_v1.types.SetNodePoolSizeRequest): The request object. SetNodePoolSizeRequest sets the size a node pool. @@ -3217,7 +3323,7 @@ def set_node_pool_size( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3265,43 +3371,48 @@ def set_network_policy( r"""Enables or disables Network Policy for a cluster. Args: - request (:class:`~.cluster_service.SetNetworkPolicyRequest`): + request (google.cloud.container_v1.types.SetNetworkPolicyRequest): The request object. SetNetworkPolicyRequest enables/disables network policy for a cluster. - project_id (:class:`str`): + project_id (str): Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - network_policy (:class:`~.cluster_service.NetworkPolicy`): + network_policy (google.cloud.container_v1.types.NetworkPolicy): Required. Configuration options for the NetworkPolicy feature. + This corresponds to the ``network_policy`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, cluster id) of the cluster to set networking policy. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3313,7 +3424,7 @@ def set_network_policy( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3383,40 +3494,45 @@ def set_maintenance_policy( r"""Sets the maintenance policy for a cluster. Args: - request (:class:`~.cluster_service.SetMaintenancePolicyRequest`): + request (google.cloud.container_v1.types.SetMaintenancePolicyRequest): The request object. SetMaintenancePolicyRequest sets the maintenance policy for a cluster. - project_id (:class:`str`): + project_id (str): Required. The Google Developers Console `project ID or project number `__. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. The name of the Google Compute Engine `zone `__ in which the cluster resides. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. The name of the cluster to update. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - maintenance_policy (:class:`~.cluster_service.MaintenancePolicy`): + maintenance_policy (google.cloud.container_v1.types.MaintenancePolicy): Required. The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy. + This corresponds to the ``maintenance_policy`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - name (:class:`str`): + name (str): The name (project, location, cluster id) of the cluster to set maintenance policy. Specified in the format ``projects/*/locations/*/clusters/*``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3428,7 +3544,7 @@ def set_maintenance_policy( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3496,7 +3612,7 @@ def list_usable_subnetworks( clusters in a project. Args: - request (:class:`~.cluster_service.ListUsableSubnetworksRequest`): + request (google.cloud.container_v1.types.ListUsableSubnetworksRequest): The request object. ListUsableSubnetworksRequest requests the list of usable subnetworks available to a user for creating clusters. @@ -3508,7 +3624,7 @@ def list_usable_subnetworks( sent along with the request as metadata. Returns: - ~.pagers.ListUsableSubnetworksPager: + google.cloud.container_v1.services.cluster_manager.pagers.ListUsableSubnetworksPager: ListUsableSubnetworksResponse is the response of ListUsableSubnetworksRequest. diff --git a/google/cloud/container_v1/services/cluster_manager/pagers.py b/google/cloud/container_v1/services/cluster_manager/pagers.py index 8491351b..94fef106 100644 --- a/google/cloud/container_v1/services/cluster_manager/pagers.py +++ b/google/cloud/container_v1/services/cluster_manager/pagers.py @@ -24,7 +24,7 @@ class ListUsableSubnetworksPager: """A pager for iterating through ``list_usable_subnetworks`` requests. This class thinly wraps an initial - :class:`~.cluster_service.ListUsableSubnetworksResponse` object, and + :class:`google.cloud.container_v1.types.ListUsableSubnetworksResponse` object, and provides an ``__iter__`` method to iterate through its ``subnetworks`` field. @@ -33,7 +33,7 @@ class ListUsableSubnetworksPager: through the ``subnetworks`` field on the corresponding responses. - All the usual :class:`~.cluster_service.ListUsableSubnetworksResponse` + All the usual :class:`google.cloud.container_v1.types.ListUsableSubnetworksResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -51,9 +51,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.cluster_service.ListUsableSubnetworksRequest`): + request (google.cloud.container_v1.types.ListUsableSubnetworksRequest): The initial request object. - response (:class:`~.cluster_service.ListUsableSubnetworksResponse`): + response (google.cloud.container_v1.types.ListUsableSubnetworksResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -86,7 +86,7 @@ class ListUsableSubnetworksAsyncPager: """A pager for iterating through ``list_usable_subnetworks`` requests. This class thinly wraps an initial - :class:`~.cluster_service.ListUsableSubnetworksResponse` object, and + :class:`google.cloud.container_v1.types.ListUsableSubnetworksResponse` object, and provides an ``__aiter__`` method to iterate through its ``subnetworks`` field. @@ -95,7 +95,7 @@ class ListUsableSubnetworksAsyncPager: through the ``subnetworks`` field on the corresponding responses. - All the usual :class:`~.cluster_service.ListUsableSubnetworksResponse` + All the usual :class:`google.cloud.container_v1.types.ListUsableSubnetworksResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -113,9 +113,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.cluster_service.ListUsableSubnetworksRequest`): + request (google.cloud.container_v1.types.ListUsableSubnetworksRequest): The initial request object. - response (:class:`~.cluster_service.ListUsableSubnetworksResponse`): + response (google.cloud.container_v1.types.ListUsableSubnetworksResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. 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 bf669fd8..681eabd4 100644 --- a/google/cloud/container_v1/services/cluster_manager/transports/grpc.py +++ b/google/cloud/container_v1/services/cluster_manager/transports/grpc.py @@ -58,6 +58,7 @@ def __init__( 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: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: @@ -88,6 +89,10 @@ def __init__( ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials for grpc channel. It is ignored if ``channel`` is provided. + client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): + A callback to provide client certificate bytes and private key bytes, + both in PEM format. It is used to configure mutual TLS channel. It is + ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. client_info (google.api_core.gapic_v1.client_info.ClientInfo): @@ -104,6 +109,11 @@ def __init__( """ self._ssl_channel_credentials = ssl_channel_credentials + if api_mtls_endpoint: + warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning) + if client_cert_source: + warnings.warn("client_cert_source is deprecated", DeprecationWarning) + if channel: # Sanity check: Ensure that channel and credentials are not both # provided. @@ -113,11 +123,6 @@ def __init__( self._grpc_channel = channel self._ssl_channel_credentials = None elif api_mtls_endpoint: - warnings.warn( - "api_mtls_endpoint and client_cert_source are deprecated", - DeprecationWarning, - ) - host = ( api_mtls_endpoint if ":" in api_mtls_endpoint @@ -161,12 +166,18 @@ def __init__( scopes=self.AUTH_SCOPES, quota_project_id=quota_project_id ) + if client_cert_source_for_mtls and not ssl_channel_credentials: + cert, key = client_cert_source_for_mtls() + self._ssl_channel_credentials = grpc.ssl_channel_credentials( + certificate_chain=cert, private_key=key + ) + # create a new channel. The provided one is ignored. self._grpc_channel = type(self).create_channel( host, credentials=credentials, credentials_file=credentials_file, - ssl_credentials=ssl_channel_credentials, + ssl_credentials=self._ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, options=[ 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 8f38cdd2..96316ee1 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 @@ -102,6 +102,7 @@ def __init__( 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, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: @@ -133,6 +134,10 @@ def __init__( ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials for grpc channel. It is ignored if ``channel`` is provided. + client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): + A callback to provide client certificate bytes and private key bytes, + both in PEM format. It is used to configure mutual TLS channel. It is + ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. client_info (google.api_core.gapic_v1.client_info.ClientInfo): @@ -149,6 +154,11 @@ def __init__( """ self._ssl_channel_credentials = ssl_channel_credentials + if api_mtls_endpoint: + warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning) + if client_cert_source: + warnings.warn("client_cert_source is deprecated", DeprecationWarning) + if channel: # Sanity check: Ensure that channel and credentials are not both # provided. @@ -158,11 +168,6 @@ def __init__( self._grpc_channel = channel self._ssl_channel_credentials = None elif api_mtls_endpoint: - warnings.warn( - "api_mtls_endpoint and client_cert_source are deprecated", - DeprecationWarning, - ) - host = ( api_mtls_endpoint if ":" in api_mtls_endpoint @@ -206,12 +211,18 @@ def __init__( scopes=self.AUTH_SCOPES, quota_project_id=quota_project_id ) + if client_cert_source_for_mtls and not ssl_channel_credentials: + cert, key = client_cert_source_for_mtls() + self._ssl_channel_credentials = grpc.ssl_channel_credentials( + certificate_chain=cert, private_key=key + ) + # create a new channel. The provided one is ignored. self._grpc_channel = type(self).create_channel( host, credentials=credentials, credentials_file=credentials_file, - ssl_credentials=ssl_channel_credentials, + ssl_credentials=self._ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, options=[ diff --git a/google/cloud/container_v1/types/cluster_service.py b/google/cloud/container_v1/types/cluster_service.py index 0706e501..f8a90da9 100644 --- a/google/cloud/container_v1/types/cluster_service.py +++ b/google/cloud/container_v1/types/cluster_service.py @@ -160,7 +160,7 @@ class NodeConfig(proto.Message): address of the Service Account; otherwise, if no Service Account is specified, the "default" service account is used. - metadata (Sequence[~.cluster_service.NodeConfig.MetadataEntry]): + metadata (Sequence[google.cloud.container_v1.types.NodeConfig.MetadataEntry]): The metadata key/value pairs assigned to instances in the cluster. @@ -205,7 +205,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 (Sequence[~.cluster_service.NodeConfig.LabelsEntry]): + labels (Sequence[google.cloud.container_v1.types.NodeConfig.LabelsEntry]): 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 @@ -239,7 +239,7 @@ class NodeConfig(proto.Message): https://cloud.google.com/compute/docs/instances/preemptible for more information about preemptible VM instances. - accelerators (Sequence[~.cluster_service.AcceleratorConfig]): + accelerators (Sequence[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 @@ -258,29 +258,29 @@ class NodeConfig(proto.Message): ``minCpuPlatform: "Intel Sandy Bridge"``. For more information, read `how to specify min CPU platform `__ - workload_metadata_config (~.cluster_service.WorkloadMetadataConfig): + workload_metadata_config (google.cloud.container_v1.types.WorkloadMetadataConfig): The workload metadata configuration for this node. - taints (Sequence[~.cluster_service.NodeTaint]): + taints (Sequence[google.cloud.container_v1.types.NodeTaint]): List of kubernetes taints to be applied to each node. For more information, including usage and the valid values, see: https://kubernetes.io/docs/concepts/configuration/taint- and-toleration/ - sandbox_config (~.cluster_service.SandboxConfig): + sandbox_config (google.cloud.container_v1.types.SandboxConfig): Sandbox configuration for this node. node_group (str): Setting this field will assign instances of this pool to run on the specified node group. This is useful for running workloads on `sole tenant nodes `__. - reservation_affinity (~.cluster_service.ReservationAffinity): + reservation_affinity (google.cloud.container_v1.types.ReservationAffinity): The optional reservation affinity. Setting this field will apply the specified `Zonal Compute Reservation `__ to this node pool. - shielded_instance_config (~.cluster_service.ShieldedInstanceConfig): + shielded_instance_config (google.cloud.container_v1.types.ShieldedInstanceConfig): Shielded Instance options. boot_disk_kms_key (str): The Customer Managed Encryption Key used to encrypt the boot @@ -374,7 +374,7 @@ class SandboxConfig(proto.Message): for the node. Attributes: - type_ (~.cluster_service.SandboxConfig.Type): + type_ (google.cloud.container_v1.types.SandboxConfig.Type): Type of the sandbox to use for the node. """ @@ -392,7 +392,7 @@ class ReservationAffinity(proto.Message): take capacity from. Attributes: - consume_reservation_type (~.cluster_service.ReservationAffinity.Type): + consume_reservation_type (google.cloud.container_v1.types.ReservationAffinity.Type): Corresponds to the type of reservation consumption. key (str): @@ -435,7 +435,7 @@ class NodeTaint(proto.Message): Key for taint. value (str): Value for taint. - effect (~.cluster_service.NodeTaint.Effect): + effect (google.cloud.container_v1.types.NodeTaint.Effect): Effect for taint. """ @@ -485,7 +485,7 @@ class MasterAuth(proto.Message): authentication methods, see: https://cloud.google.com/kubernetes- engine/docs/how-to/api-server-authentication - client_certificate_config (~.cluster_service.ClientCertificateConfig): + client_certificate_config (google.cloud.container_v1.types.ClientCertificateConfig): Configuration for client certificate authentication on the cluster. For clusters before v1.12, if no configuration is specified, @@ -532,18 +532,18 @@ class AddonsConfig(proto.Message): up in the cluster, enabling additional functionality. Attributes: - http_load_balancing (~.cluster_service.HttpLoadBalancing): + http_load_balancing (google.cloud.container_v1.types.HttpLoadBalancing): Configuration for the HTTP (L7) load balancing controller addon, which makes it easy to set up HTTP load balancers for services in a cluster. - horizontal_pod_autoscaling (~.cluster_service.HorizontalPodAutoscaling): + horizontal_pod_autoscaling (google.cloud.container_v1.types.HorizontalPodAutoscaling): Configuration for the horizontal pod autoscaling feature, which increases or decreases the number of replica pods a replication controller has based on the resource usage of the existing pods. - kubernetes_dashboard (~.cluster_service.KubernetesDashboard): + kubernetes_dashboard (google.cloud.container_v1.types.KubernetesDashboard): Configuration for the Kubernetes Dashboard. This addon is deprecated, and will be disabled in 1.15. It is recommended to use the Cloud @@ -552,19 +552,19 @@ class AddonsConfig(proto.Message): information, see: https://cloud.google.com/kubernetes- engine/docs/concepts/dashboards - network_policy_config (~.cluster_service.NetworkPolicyConfig): + network_policy_config (google.cloud.container_v1.types.NetworkPolicyConfig): Configuration for NetworkPolicy. This only tracks whether the addon is enabled or not on the Master, it does not track whether network policy is enabled for the nodes. - cloud_run_config (~.cluster_service.CloudRunConfig): + cloud_run_config (google.cloud.container_v1.types.CloudRunConfig): Configuration for the Cloud Run addon, which allows the user to use a managed Knative service. - dns_cache_config (~.cluster_service.DnsCacheConfig): + dns_cache_config (google.cloud.container_v1.types.DnsCacheConfig): Configuration for NodeLocalDNS, a dns cache running on cluster nodes - config_connector_config (~.cluster_service.ConfigConnectorConfig): + config_connector_config (google.cloud.container_v1.types.ConfigConnectorConfig): Configuration for the ConfigConnector add-on, a Kubernetes extension to manage hosted GCP services through the Kubernetes API @@ -706,7 +706,7 @@ class PrivateClusterConfig(proto.Message): peering_name (str): Output only. The peering name in the customer VPC used by this cluster. - master_global_access_config (~.cluster_service.PrivateClusterMasterGlobalAccessConfig): + master_global_access_config (google.cloud.container_v1.types.PrivateClusterMasterGlobalAccessConfig): Controls master global access settings. """ @@ -753,7 +753,7 @@ class CloudRunConfig(proto.Message): disabled (bool): Whether Cloud Run addon is enabled for this cluster. - load_balancer_type (~.cluster_service.CloudRunConfig.LoadBalancerType): + load_balancer_type (google.cloud.container_v1.types.CloudRunConfig.LoadBalancerType): Which load balancer type is installed for Cloud Run. """ @@ -792,7 +792,7 @@ class MasterAuthorizedNetworksConfig(proto.Message): enabled (bool): Whether or not master authorized networks is enabled. - cidr_blocks (Sequence[~.cluster_service.MasterAuthorizedNetworksConfig.CidrBlock]): + cidr_blocks (Sequence[google.cloud.container_v1.types.MasterAuthorizedNetworksConfig.CidrBlock]): cidr_blocks define up to 50 external networks that could access Kubernetes master through HTTPS. """ @@ -840,7 +840,7 @@ class NetworkPolicy(proto.Message): networking/networkpolicies/ Attributes: - provider (~.cluster_service.NetworkPolicy.Provider): + provider (google.cloud.container_v1.types.NetworkPolicy.Provider): The selected network policy provider. enabled (bool): Whether network policy is enabled on the @@ -1044,7 +1044,7 @@ class Cluster(proto.Message): This field is deprecated, use node_pool.initial_node_count instead. - node_config (~.cluster_service.NodeConfig): + node_config (google.cloud.container_v1.types.NodeConfig): Parameters used in creating the cluster's nodes. For requests, this field should only be used in lieu of a "node_pool" object, since this configuration (along with the @@ -1057,7 +1057,7 @@ class Cluster(proto.Message): If unspecified, the defaults are used. This field is deprecated, use node_pool.config instead. - master_auth (~.cluster_service.MasterAuth): + master_auth (google.cloud.container_v1.types.MasterAuth): The authentication information for accessing the master endpoint. If unspecified, the defaults are used: For clusters before v1.12, if master_auth is unspecified, @@ -1104,14 +1104,14 @@ class Cluster(proto.Message): notation (e.g. ``10.96.0.0/14``). Leave blank to have one automatically chosen or specify a ``/14`` block in ``10.0.0.0/8``. - addons_config (~.cluster_service.AddonsConfig): + addons_config (google.cloud.container_v1.types.AddonsConfig): Configurations for the various addons available to run in the cluster. subnetwork (str): The name of the Google Compute Engine `subnetwork `__ to which the cluster is connected. - node_pools (Sequence[~.cluster_service.NodePool]): + node_pools (Sequence[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. @@ -1137,57 +1137,57 @@ class Cluster(proto.Message): uptime and master/node upgrades are disabled. Alpha enabled clusters are automatically deleted thirty days after creation. - resource_labels (Sequence[~.cluster_service.Cluster.ResourceLabelsEntry]): + resource_labels (Sequence[google.cloud.container_v1.types.Cluster.ResourceLabelsEntry]): The resource labels for the cluster to use to annotate any related Google Compute Engine resources. label_fingerprint (str): The fingerprint of the set of labels for this cluster. - legacy_abac (~.cluster_service.LegacyAbac): + legacy_abac (google.cloud.container_v1.types.LegacyAbac): Configuration for the legacy ABAC authorization mode. - network_policy (~.cluster_service.NetworkPolicy): + network_policy (google.cloud.container_v1.types.NetworkPolicy): Configuration options for the NetworkPolicy feature. - ip_allocation_policy (~.cluster_service.IPAllocationPolicy): + ip_allocation_policy (google.cloud.container_v1.types.IPAllocationPolicy): Configuration for cluster IP allocation. - master_authorized_networks_config (~.cluster_service.MasterAuthorizedNetworksConfig): + master_authorized_networks_config (google.cloud.container_v1.types.MasterAuthorizedNetworksConfig): The configuration options for master authorized networks feature. - maintenance_policy (~.cluster_service.MaintenancePolicy): + maintenance_policy (google.cloud.container_v1.types.MaintenancePolicy): Configure the maintenance policy for this cluster. - binary_authorization (~.cluster_service.BinaryAuthorization): + binary_authorization (google.cloud.container_v1.types.BinaryAuthorization): Configuration for Binary Authorization. - autoscaling (~.cluster_service.ClusterAutoscaling): + autoscaling (google.cloud.container_v1.types.ClusterAutoscaling): Cluster-level autoscaling configuration. - network_config (~.cluster_service.NetworkConfig): + network_config (google.cloud.container_v1.types.NetworkConfig): Configuration for cluster networking. - default_max_pods_constraint (~.cluster_service.MaxPodsConstraint): + default_max_pods_constraint (google.cloud.container_v1.types.MaxPodsConstraint): The default constraint on the maximum number of pods that can be run simultaneously on a node in the node pool of this cluster. Only honored if cluster created with IP Alias support. - resource_usage_export_config (~.cluster_service.ResourceUsageExportConfig): + resource_usage_export_config (google.cloud.container_v1.types.ResourceUsageExportConfig): Configuration for exporting resource usages. Resource usage export is disabled when this config is unspecified. - authenticator_groups_config (~.cluster_service.AuthenticatorGroupsConfig): + authenticator_groups_config (google.cloud.container_v1.types.AuthenticatorGroupsConfig): Configuration controlling RBAC group membership information. - private_cluster_config (~.cluster_service.PrivateClusterConfig): + private_cluster_config (google.cloud.container_v1.types.PrivateClusterConfig): Configuration for private cluster. - database_encryption (~.cluster_service.DatabaseEncryption): + database_encryption (google.cloud.container_v1.types.DatabaseEncryption): Configuration of etcd encryption. - vertical_pod_autoscaling (~.cluster_service.VerticalPodAutoscaling): + vertical_pod_autoscaling (google.cloud.container_v1.types.VerticalPodAutoscaling): Cluster-level Vertical Pod Autoscaling configuration. - shielded_nodes (~.cluster_service.ShieldedNodes): + shielded_nodes (google.cloud.container_v1.types.ShieldedNodes): Shielded Nodes configuration. - release_channel (~.cluster_service.ReleaseChannel): + release_channel (google.cloud.container_v1.types.ReleaseChannel): Release channel configuration. - workload_identity_config (~.cluster_service.WorkloadIdentityConfig): + workload_identity_config (google.cloud.container_v1.types.WorkloadIdentityConfig): Configuration for the use of Kubernetes Service Accounts in GCP IAM policies. self_link (str): @@ -1236,7 +1236,7 @@ class Cluster(proto.Message): [Output only] The time the cluster was created, in `RFC3339 `__ text format. - status (~.cluster_service.Cluster.Status): + status (google.cloud.container_v1.types.Cluster.Status): [Output only] The current status of this cluster. status_message (str): [Output only] Deprecated. Use conditions instead. Additional @@ -1278,7 +1278,7 @@ class Cluster(proto.Message): cluster, in `CIDR `__ notation (e.g. ``1.2.3.4/29``). - conditions (Sequence[~.cluster_service.StatusCondition]): + conditions (Sequence[google.cloud.container_v1.types.StatusCondition]): Which conditions caused the current cluster state. """ @@ -1455,7 +1455,7 @@ class ClusterUpdate(proto.Message): string,\ ``monitoring.googleapis.com/kubernetes`` will be used for GKE 1.14+ or ``monitoring.googleapis.com`` for earlier versions. - desired_addons_config (~.cluster_service.AddonsConfig): + desired_addons_config (google.cloud.container_v1.types.AddonsConfig): Configurations for the various addons available to run in the cluster. desired_node_pool_id (str): @@ -1466,13 +1466,13 @@ class ClusterUpdate(proto.Message): desired_image_type (str): The desired image type for the node pool. NOTE: Set the "desired_node_pool" field as well. - desired_database_encryption (~.cluster_service.DatabaseEncryption): + desired_database_encryption (google.cloud.container_v1.types.DatabaseEncryption): Configuration of etcd encryption. - desired_workload_identity_config (~.cluster_service.WorkloadIdentityConfig): + desired_workload_identity_config (google.cloud.container_v1.types.WorkloadIdentityConfig): Configuration for Workload Identity. - desired_shielded_nodes (~.cluster_service.ShieldedNodes): + desired_shielded_nodes (google.cloud.container_v1.types.ShieldedNodes): Configuration for Shielded Nodes. - desired_node_pool_autoscaling (~.cluster_service.NodePoolAutoscaling): + desired_node_pool_autoscaling (google.cloud.container_v1.types.NodePoolAutoscaling): Autoscaler configuration for the node pool specified in desired_node_pool_id. If there is only one pool in the cluster and desired_node_pool_id is not provided then the @@ -1487,12 +1487,12 @@ class ClusterUpdate(proto.Message): Warning: changing cluster locations will update the locations of all node pools and will result in nodes being added and/or removed. - desired_master_authorized_networks_config (~.cluster_service.MasterAuthorizedNetworksConfig): + desired_master_authorized_networks_config (google.cloud.container_v1.types.MasterAuthorizedNetworksConfig): The desired configuration options for master authorized networks feature. - desired_cluster_autoscaling (~.cluster_service.ClusterAutoscaling): + desired_cluster_autoscaling (google.cloud.container_v1.types.ClusterAutoscaling): Cluster-level autoscaling configuration. - desired_binary_authorization (~.cluster_service.BinaryAuthorization): + desired_binary_authorization (google.cloud.container_v1.types.BinaryAuthorization): The desired configuration options for the Binary Authorization feature. desired_logging_service (str): @@ -1509,20 +1509,20 @@ class ClusterUpdate(proto.Message): string,\ ``logging.googleapis.com/kubernetes`` will be used for GKE 1.14+ or ``logging.googleapis.com`` for earlier versions. - desired_resource_usage_export_config (~.cluster_service.ResourceUsageExportConfig): + desired_resource_usage_export_config (google.cloud.container_v1.types.ResourceUsageExportConfig): The desired configuration for exporting resource usage. - desired_vertical_pod_autoscaling (~.cluster_service.VerticalPodAutoscaling): + desired_vertical_pod_autoscaling (google.cloud.container_v1.types.VerticalPodAutoscaling): Cluster-level Vertical Pod Autoscaling configuration. - desired_private_cluster_config (~.cluster_service.PrivateClusterConfig): + desired_private_cluster_config (google.cloud.container_v1.types.PrivateClusterConfig): The desired private cluster configuration. - desired_intra_node_visibility_config (~.cluster_service.IntraNodeVisibilityConfig): + desired_intra_node_visibility_config (google.cloud.container_v1.types.IntraNodeVisibilityConfig): The desired config of Intra-node visibility. - desired_default_snat_status (~.cluster_service.DefaultSnatStatus): + desired_default_snat_status (google.cloud.container_v1.types.DefaultSnatStatus): The desired status of whether to disable default sNAT for this cluster. - desired_release_channel (~.cluster_service.ReleaseChannel): + desired_release_channel (google.cloud.container_v1.types.ReleaseChannel): The desired release channel configuration. desired_master_version (str): The Kubernetes version to change the master @@ -1623,9 +1623,9 @@ class Operation(proto.Message): `zone `__ in which the operation is taking place. This field is deprecated, use location instead. - operation_type (~.cluster_service.Operation.Type): + operation_type (google.cloud.container_v1.types.Operation.Type): The operation type. - status (~.cluster_service.Operation.Status): + status (google.cloud.container_v1.types.Operation.Status): The current status of the operation. detail (str): Detailed operation progress, if available. @@ -1651,13 +1651,13 @@ class Operation(proto.Message): [Output only] The time the operation completed, in `RFC3339 `__ text format. - progress (~.cluster_service.OperationProgress): + progress (google.cloud.container_v1.types.OperationProgress): Output only. [Output only] Progress information for an operation. - cluster_conditions (Sequence[~.cluster_service.StatusCondition]): + cluster_conditions (Sequence[google.cloud.container_v1.types.StatusCondition]): Which conditions caused the current cluster state. - nodepool_conditions (Sequence[~.cluster_service.StatusCondition]): + nodepool_conditions (Sequence[google.cloud.container_v1.types.StatusCondition]): Which conditions caused the current node pool state. """ @@ -1731,15 +1731,15 @@ class OperationProgress(proto.Message): A non-parameterized string describing an operation stage. Unset for single-stage operations. - status (~.cluster_service.Operation.Status): + status (google.cloud.container_v1.types.Operation.Status): Status of an operation stage. Unset for single-stage operations. - metrics (Sequence[~.cluster_service.OperationProgress.Metric]): + metrics (Sequence[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[~.cluster_service.OperationProgress]): + stages (Sequence[google.cloud.container_v1.types.OperationProgress]): Substages of an operation or a stage. """ @@ -1791,7 +1791,7 @@ class CreateClusterRequest(proto.Message): `zone `__ in which the cluster resides. This field has been deprecated and replaced by the parent field. - cluster (~.cluster_service.Cluster): + cluster (google.cloud.container_v1.types.Cluster): Required. A `cluster resource `__ parent (str): @@ -1861,7 +1861,7 @@ class UpdateClusterRequest(proto.Message): Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. - update (~.cluster_service.ClusterUpdate): + update (google.cloud.container_v1.types.ClusterUpdate): Required. A description of the update. name (str): The name (project, location, cluster) of the cluster to @@ -1932,10 +1932,10 @@ class UpdateNodePoolRequest(proto.Message): the locations for a node pool will result in nodes being either created or removed from the node pool, depending on whether locations are being added or removed. - workload_metadata_config (~.cluster_service.WorkloadMetadataConfig): + workload_metadata_config (google.cloud.container_v1.types.WorkloadMetadataConfig): The desired workload metadata config for the node pool. - upgrade_settings (~.cluster_service.NodePool.UpgradeSettings): + upgrade_settings (google.cloud.container_v1.types.NodePool.UpgradeSettings): Upgrade settings control disruption and speed of the upgrade. """ @@ -1989,7 +1989,7 @@ class SetNodePoolAutoscalingRequest(proto.Message): Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field. - autoscaling (~.cluster_service.NodePoolAutoscaling): + autoscaling (google.cloud.container_v1.types.NodePoolAutoscaling): Required. Autoscaling configuration for the node pool. name (str): @@ -2134,7 +2134,7 @@ class SetAddonsConfigRequest(proto.Message): Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. - addons_config (~.cluster_service.AddonsConfig): + addons_config (google.cloud.container_v1.types.AddonsConfig): Required. The desired configurations for the various addons available to run in the cluster. name (str): @@ -2267,10 +2267,10 @@ class SetMasterAuthRequest(proto.Message): Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. - action (~.cluster_service.SetMasterAuthRequest.Action): + action (google.cloud.container_v1.types.SetMasterAuthRequest.Action): Required. The exact form of action to be taken on the master auth. - update (~.cluster_service.MasterAuth): + update (google.cloud.container_v1.types.MasterAuth): Required. A description of the update. name (str): The name (project, location, cluster) of the cluster to set @@ -2364,7 +2364,7 @@ class ListClustersResponse(proto.Message): r"""ListClustersResponse is the result of ListClustersRequest. Attributes: - clusters (Sequence[~.cluster_service.Cluster]): + clusters (Sequence[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]): @@ -2479,7 +2479,7 @@ class ListOperationsResponse(proto.Message): ListOperationsRequest. Attributes: - operations (Sequence[~.cluster_service.Operation]): + operations (Sequence[google.cloud.container_v1.types.Operation]): A list of operations in the project in the specified zone. missing_zones (Sequence[str]): @@ -2537,7 +2537,7 @@ class ServerConfig(proto.Message): valid_master_versions (Sequence[str]): List of valid master versions, in descending order. - channels (Sequence[~.cluster_service.ServerConfig.ReleaseChannelConfig]): + channels (Sequence[google.cloud.container_v1.types.ServerConfig.ReleaseChannelConfig]): List of release channel configurations. """ @@ -2546,7 +2546,7 @@ class ReleaseChannelConfig(proto.Message): channel. Attributes: - channel (~.cluster_service.ReleaseChannel.Channel): + channel (google.cloud.container_v1.types.ReleaseChannel.Channel): The release channel this configuration applies to. default_version (str): @@ -2596,7 +2596,7 @@ class CreateNodePoolRequest(proto.Message): Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. - node_pool (~.cluster_service.NodePool): + node_pool (google.cloud.container_v1.types.NodePool): Required. The node pool to create. parent (str): The parent (project, location, cluster id) where the node @@ -2741,7 +2741,7 @@ class NodePool(proto.Message): Attributes: name (str): The name of the node pool. - config (~.cluster_service.NodeConfig): + config (google.cloud.container_v1.types.NodeConfig): The node configuration of the pool. initial_node_count (int): The initial node count for the pool. You must ensure that @@ -2768,30 +2768,30 @@ class NodePool(proto.Message): [Output only] The resource URLs of the `managed instance groups `__ associated with this node pool. - status (~.cluster_service.NodePool.Status): + status (google.cloud.container_v1.types.NodePool.Status): [Output only] The status of the nodes in this pool instance. status_message (str): [Output only] Deprecated. Use conditions instead. Additional information about the current status of this node pool instance, if available. - autoscaling (~.cluster_service.NodePoolAutoscaling): + autoscaling (google.cloud.container_v1.types.NodePoolAutoscaling): Autoscaler configuration for this NodePool. Autoscaler is enabled only if a valid configuration is present. - management (~.cluster_service.NodeManagement): + management (google.cloud.container_v1.types.NodeManagement): NodeManagement configuration for this NodePool. - max_pods_constraint (~.cluster_service.MaxPodsConstraint): + max_pods_constraint (google.cloud.container_v1.types.MaxPodsConstraint): The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. - conditions (Sequence[~.cluster_service.StatusCondition]): + conditions (Sequence[google.cloud.container_v1.types.StatusCondition]): Which conditions caused the current node pool state. pod_ipv4_cidr_size (int): [Output only] The pod CIDR block size per node in this node pool. - upgrade_settings (~.cluster_service.NodePool.UpgradeSettings): + upgrade_settings (google.cloud.container_v1.types.NodePool.UpgradeSettings): Upgrade settings control disruption and speed of the upgrade. """ @@ -2900,7 +2900,7 @@ class NodeManagement(proto.Message): the nodes in this node pool will be monitored and, if they fail health checks too many times, an automatic repair action will be triggered. - upgrade_options (~.cluster_service.AutoUpgradeOptions): + upgrade_options (google.cloud.container_v1.types.AutoUpgradeOptions): Specifies the Auto Upgrade knobs for the node pool. """ @@ -2939,7 +2939,7 @@ class MaintenancePolicy(proto.Message): for the cluster. Attributes: - window (~.cluster_service.MaintenanceWindow): + window (google.cloud.container_v1.types.MaintenanceWindow): Specifies the maintenance window in which maintenance may be performed. resource_version (str): @@ -2962,16 +2962,16 @@ class MaintenanceWindow(proto.Message): for the cluster. Attributes: - daily_maintenance_window (~.cluster_service.DailyMaintenanceWindow): + daily_maintenance_window (google.cloud.container_v1.types.DailyMaintenanceWindow): DailyMaintenanceWindow specifies a daily maintenance operation window. - recurring_window (~.cluster_service.RecurringTimeWindow): + recurring_window (google.cloud.container_v1.types.RecurringTimeWindow): RecurringWindow specifies some number of recurring time periods for maintenance to occur. The time windows may be overlapping. If no maintenance windows are set, maintenance can occur at any time. - maintenance_exclusions (Sequence[~.cluster_service.MaintenanceWindow.MaintenanceExclusionsEntry]): + maintenance_exclusions (Sequence[google.cloud.container_v1.types.MaintenanceWindow.MaintenanceExclusionsEntry]): Exceptions to maintenance window. Non- mergency maintenance should not occur in these windows. @@ -2994,9 +2994,9 @@ class TimeWindow(proto.Message): r"""Represents an arbitrary window of time. Attributes: - start_time (~.timestamp.Timestamp): + start_time (google.protobuf.timestamp_pb2.Timestamp): The time that the window first starts. - end_time (~.timestamp.Timestamp): + end_time (google.protobuf.timestamp_pb2.Timestamp): The time that the window ends. The end time should take place after the start time. """ @@ -3010,7 +3010,7 @@ class RecurringTimeWindow(proto.Message): r"""Represents an arbitrary window of time that recurs. Attributes: - window (~.cluster_service.TimeWindow): + window (google.cloud.container_v1.types.TimeWindow): The window of the first recurrence. recurrence (str): An RRULE @@ -3104,7 +3104,7 @@ class SetNodePoolManagementRequest(proto.Message): Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field. - management (~.cluster_service.NodeManagement): + management (google.cloud.container_v1.types.NodeManagement): Required. NodeManagement configuration for the node pool. name (str): @@ -3218,7 +3218,7 @@ class ListNodePoolsResponse(proto.Message): r"""ListNodePoolsResponse is the result of ListNodePoolsRequest. Attributes: - node_pools (Sequence[~.cluster_service.NodePool]): + node_pools (Sequence[google.cloud.container_v1.types.NodePool]): A list of node pools for a cluster. """ @@ -3235,10 +3235,10 @@ class ClusterAutoscaling(proto.Message): enable_node_autoprovisioning (bool): Enables automatic node pool creation and deletion. - resource_limits (Sequence[~.cluster_service.ResourceLimit]): + resource_limits (Sequence[google.cloud.container_v1.types.ResourceLimit]): Contains global constraints regarding minimum and maximum amount of resources in the cluster. - autoprovisioning_node_pool_defaults (~.cluster_service.AutoprovisioningNodePoolDefaults): + autoprovisioning_node_pool_defaults (google.cloud.container_v1.types.AutoprovisioningNodePoolDefaults): AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP. autoprovisioning_locations (Sequence[str]): @@ -3271,10 +3271,10 @@ class AutoprovisioningNodePoolDefaults(proto.Message): service_account (str): The Google Cloud Platform Service Account to be used by the node VMs. - upgrade_settings (~.cluster_service.NodePool.UpgradeSettings): + upgrade_settings (google.cloud.container_v1.types.NodePool.UpgradeSettings): Specifies the upgrade settings for NAP created node pools - management (~.cluster_service.NodeManagement): + management (google.cloud.container_v1.types.NodeManagement): Specifies the node management options for NAP created node-pools. min_cpu_platform (str): @@ -3298,7 +3298,7 @@ class AutoprovisioningNodePoolDefaults(proto.Message): If unspecified, the default disk type is 'pd- standard' - shielded_instance_config (~.cluster_service.ShieldedInstanceConfig): + shielded_instance_config (google.cloud.container_v1.types.ShieldedInstanceConfig): Shielded Instance options. boot_disk_kms_key (str): The Customer Managed Encryption Key used to encrypt the boot @@ -3405,7 +3405,7 @@ class SetLabelsRequest(proto.Message): Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. - resource_labels (Sequence[~.cluster_service.SetLabelsRequest.ResourceLabelsEntry]): + resource_labels (Sequence[google.cloud.container_v1.types.SetLabelsRequest.ResourceLabelsEntry]): Required. The labels to set for that cluster. label_fingerprint (str): Required. The fingerprint of the previous set of labels for @@ -3573,7 +3573,7 @@ class WorkloadMetadataConfig(proto.Message): expose to workloads on the node pool. Attributes: - mode (~.cluster_service.WorkloadMetadataConfig.Mode): + mode (google.cloud.container_v1.types.WorkloadMetadataConfig.Mode): Mode is the configuration for how to expose metadata to workloads running on the node pool. """ @@ -3609,7 +3609,7 @@ class SetNetworkPolicyRequest(proto.Message): Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. - network_policy (~.cluster_service.NetworkPolicy): + network_policy (google.cloud.container_v1.types.NetworkPolicy): Required. Configuration options for the NetworkPolicy feature. name (str): @@ -3644,7 +3644,7 @@ class SetMaintenancePolicyRequest(proto.Message): in which the cluster resides. cluster_id (str): Required. The name of the cluster to update. - maintenance_policy (~.cluster_service.MaintenancePolicy): + maintenance_policy (google.cloud.container_v1.types.MaintenancePolicy): Required. The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy. @@ -3672,7 +3672,7 @@ class StatusCondition(proto.Message): certain status (e.g., ERROR or DEGRADED). Attributes: - code (~.cluster_service.StatusCondition.Code): + code (google.cloud.container_v1.types.StatusCondition.Code): Machine-friendly representation of the condition message (str): @@ -3713,7 +3713,7 @@ class NetworkConfig(proto.Message): Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network. - default_snat_status (~.cluster_service.DefaultSnatStatus): + default_snat_status (google.cloud.container_v1.types.DefaultSnatStatus): Whether the cluster disables default in-node sNAT rules. In-node sNAT rules will be disabled when default_snat_status is disabled. When disabled is set to false, default IP @@ -3848,7 +3848,7 @@ class GetJSONWebKeysResponse(proto.Message): specififed in rfc 7517 Attributes: - keys (Sequence[~.cluster_service.Jwk]): + keys (Sequence[google.cloud.container_v1.types.Jwk]): The public component of the keys used by the cluster to sign token requests. """ @@ -3864,7 +3864,7 @@ class ReleaseChannel(proto.Message): auto-upgrade defaults to true and cannot be disabled. Attributes: - channel (~.cluster_service.ReleaseChannel.Channel): + channel (google.cloud.container_v1.types.ReleaseChannel.Channel): channel specifies which release channel the cluster is subscribed to. """ @@ -3921,7 +3921,7 @@ class DatabaseEncryption(proto.Message): r"""Configuration of etcd encryption. Attributes: - state (~.cluster_service.DatabaseEncryption.State): + state (google.cloud.container_v1.types.DatabaseEncryption.State): Denotes the state of etcd encryption. key_name (str): Name of CloudKMS key to use for the @@ -3982,7 +3982,7 @@ class ListUsableSubnetworksResponse(proto.Message): ListUsableSubnetworksRequest. Attributes: - subnetworks (Sequence[~.cluster_service.UsableSubnetwork]): + subnetworks (Sequence[google.cloud.container_v1.types.UsableSubnetwork]): A list of usable subnetworks in the specified network project. next_page_token (str): @@ -4015,7 +4015,7 @@ class UsableSubnetworkSecondaryRange(proto.Message): ip_cidr_range (str): The range of IP addresses belonging to this subnetwork secondary range. - status (~.cluster_service.UsableSubnetworkSecondaryRange.Status): + status (google.cloud.container_v1.types.UsableSubnetworkSecondaryRange.Status): This field is to determine the status of the secondary range programmably. """ @@ -4051,7 +4051,7 @@ class UsableSubnetwork(proto.Message): ip_cidr_range (str): The range of internal addresses that are owned by this subnetwork. - secondary_ip_ranges (Sequence[~.cluster_service.UsableSubnetworkSecondaryRange]): + secondary_ip_ranges (Sequence[google.cloud.container_v1.types.UsableSubnetworkSecondaryRange]): Secondary IP ranges. status_message (str): A human readable status message representing the reasons for @@ -4078,7 +4078,7 @@ class ResourceUsageExportConfig(proto.Message): r"""Configuration for exporting cluster resource usages. Attributes: - bigquery_destination (~.cluster_service.ResourceUsageExportConfig.BigQueryDestination): + bigquery_destination (google.cloud.container_v1.types.ResourceUsageExportConfig.BigQueryDestination): Configuration to use BigQuery as usage export destination. enable_network_egress_metering (bool): @@ -4086,7 +4086,7 @@ class ResourceUsageExportConfig(proto.Message): this cluster. If enabled, a daemonset will be created in the cluster to meter network egress traffic. - consumption_metering_config (~.cluster_service.ResourceUsageExportConfig.ConsumptionMeteringConfig): + consumption_metering_config (google.cloud.container_v1.types.ResourceUsageExportConfig.ConsumptionMeteringConfig): Configuration to enable resource consumption metering. """ 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 36da61fb..cdf13edf 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/async_client.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/async_client.py @@ -77,6 +77,7 @@ class ClusterManagerAsyncClient: ClusterManagerClient.parse_common_location_path ) + from_service_account_info = ClusterManagerClient.from_service_account_info from_service_account_file = ClusterManagerClient.from_service_account_file from_service_account_json = from_service_account_file @@ -155,7 +156,7 @@ async def list_clusters( specified zone or all zones. Args: - request (:class:`~.cluster_service.ListClustersRequest`): + request (:class:`google.cloud.container_v1beta1.types.ListClustersRequest`): The request object. ListClustersRequest lists clusters. project_id (:class:`str`): Required. Deprecated. The Google Developers Console @@ -163,6 +164,7 @@ async def list_clusters( number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -173,6 +175,7 @@ async def list_clusters( in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -184,7 +187,7 @@ async def list_clusters( sent along with the request as metadata. Returns: - ~.cluster_service.ListClustersResponse: + google.cloud.container_v1beta1.types.ListClustersResponse: ListClustersResponse is the result of ListClustersRequest. @@ -251,7 +254,7 @@ async def get_cluster( r"""Gets the details for a specific cluster. Args: - request (:class:`~.cluster_service.GetClusterRequest`): + request (:class:`google.cloud.container_v1beta1.types.GetClusterRequest`): The request object. GetClusterRequest gets the settings of a cluster. project_id (:class:`str`): @@ -260,6 +263,7 @@ async def get_cluster( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -269,6 +273,7 @@ async def get_cluster( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -277,6 +282,7 @@ async def get_cluster( cluster to retrieve. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -288,7 +294,7 @@ async def get_cluster( sent along with the request as metadata. Returns: - ~.cluster_service.Cluster: + google.cloud.container_v1beta1.types.Cluster: A Google Kubernetes Engine cluster. """ # Create or coerce a protobuf request object. @@ -367,7 +373,7 @@ async def create_cluster( indicating which CIDR range the cluster is using. Args: - request (:class:`~.cluster_service.CreateClusterRequest`): + request (:class:`google.cloud.container_v1beta1.types.CreateClusterRequest`): The request object. CreateClusterRequest creates a cluster. project_id (:class:`str`): @@ -376,6 +382,7 @@ async def create_cluster( number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -385,12 +392,14 @@ async def create_cluster( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster (:class:`~.cluster_service.Cluster`): + cluster (:class:`google.cloud.container_v1beta1.types.Cluster`): Required. A `cluster resource `__ + This corresponds to the ``cluster`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -402,7 +411,7 @@ async def create_cluster( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -466,7 +475,7 @@ async def update_cluster( r"""Updates the settings for a specific cluster. Args: - request (:class:`~.cluster_service.UpdateClusterRequest`): + request (:class:`google.cloud.container_v1beta1.types.UpdateClusterRequest`): The request object. UpdateClusterRequest updates the settings of a cluster. project_id (:class:`str`): @@ -475,6 +484,7 @@ async def update_cluster( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -484,6 +494,7 @@ async def update_cluster( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -492,12 +503,14 @@ async def update_cluster( cluster to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update (:class:`~.cluster_service.ClusterUpdate`): + update (:class:`google.cloud.container_v1beta1.types.ClusterUpdate`): Required. A description of the update. + This corresponds to the ``update`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -509,7 +522,7 @@ async def update_cluster( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -572,7 +585,7 @@ async def update_node_pool( node pool. Args: - request (:class:`~.cluster_service.UpdateNodePoolRequest`): + request (:class:`google.cloud.container_v1beta1.types.UpdateNodePoolRequest`): The request object. SetNodePoolVersionRequest updates the version of a node pool. @@ -583,7 +596,7 @@ async def update_node_pool( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -626,7 +639,7 @@ async def set_node_pool_autoscaling( pool. Args: - request (:class:`~.cluster_service.SetNodePoolAutoscalingRequest`): + request (:class:`google.cloud.container_v1beta1.types.SetNodePoolAutoscalingRequest`): The request object. SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. @@ -637,7 +650,7 @@ async def set_node_pool_autoscaling( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -683,7 +696,7 @@ async def set_logging_service( r"""Sets the logging service for a specific cluster. Args: - request (:class:`~.cluster_service.SetLoggingServiceRequest`): + request (:class:`google.cloud.container_v1beta1.types.SetLoggingServiceRequest`): The request object. SetLoggingServiceRequest sets the logging service of a cluster. project_id (:class:`str`): @@ -692,6 +705,7 @@ async def set_logging_service( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -701,6 +715,7 @@ async def set_logging_service( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -709,6 +724,7 @@ async def set_logging_service( cluster to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -727,6 +743,7 @@ async def set_logging_service( string,\ ``logging.googleapis.com/kubernetes`` will be used for GKE 1.14+ or ``logging.googleapis.com`` for earlier versions. + This corresponds to the ``logging_service`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -738,7 +755,7 @@ async def set_logging_service( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -804,7 +821,7 @@ async def set_monitoring_service( r"""Sets the monitoring service for a specific cluster. Args: - request (:class:`~.cluster_service.SetMonitoringServiceRequest`): + request (:class:`google.cloud.container_v1beta1.types.SetMonitoringServiceRequest`): The request object. SetMonitoringServiceRequest sets the monitoring service of a cluster. project_id (:class:`str`): @@ -813,6 +830,7 @@ async def set_monitoring_service( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -822,6 +840,7 @@ async def set_monitoring_service( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -830,6 +849,7 @@ async def set_monitoring_service( cluster to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -850,6 +870,7 @@ async def set_monitoring_service( string,\ ``monitoring.googleapis.com/kubernetes`` will be used for GKE 1.14+ or ``monitoring.googleapis.com`` for earlier versions. + This corresponds to the ``monitoring_service`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -861,7 +882,7 @@ async def set_monitoring_service( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -927,7 +948,7 @@ async def set_addons_config( r"""Sets the addons for a specific cluster. Args: - request (:class:`~.cluster_service.SetAddonsConfigRequest`): + request (:class:`google.cloud.container_v1beta1.types.SetAddonsConfigRequest`): The request object. SetAddonsRequest sets the addons associated with the cluster. project_id (:class:`str`): @@ -936,6 +957,7 @@ async def set_addons_config( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -945,6 +967,7 @@ async def set_addons_config( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -953,13 +976,15 @@ async def set_addons_config( cluster to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - addons_config (:class:`~.cluster_service.AddonsConfig`): + addons_config (:class:`google.cloud.container_v1beta1.types.AddonsConfig`): Required. The desired configurations for the various addons available to run in the cluster. + This corresponds to the ``addons_config`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -971,7 +996,7 @@ async def set_addons_config( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1039,7 +1064,7 @@ async def set_locations( instead. Args: - request (:class:`~.cluster_service.SetLocationsRequest`): + request (:class:`google.cloud.container_v1beta1.types.SetLocationsRequest`): The request object. SetLocationsRequest sets the locations of the cluster. project_id (:class:`str`): @@ -1048,6 +1073,7 @@ async def set_locations( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1057,6 +1083,7 @@ async def set_locations( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1065,6 +1092,7 @@ async def set_locations( cluster to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1078,6 +1106,7 @@ async def set_locations( This list must always include the cluster's primary zone. + This corresponds to the ``locations`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1089,7 +1118,7 @@ async def set_locations( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1156,7 +1185,7 @@ async def update_master( r"""Updates the master for a specific cluster. Args: - request (:class:`~.cluster_service.UpdateMasterRequest`): + request (:class:`google.cloud.container_v1beta1.types.UpdateMasterRequest`): The request object. UpdateMasterRequest updates the master of the cluster. project_id (:class:`str`): @@ -1165,6 +1194,7 @@ async def update_master( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1174,6 +1204,7 @@ async def update_master( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1182,6 +1213,7 @@ async def update_master( cluster to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1200,6 +1232,7 @@ async def update_master( "1.X.Y-gke.N": picks an explicit Kubernetes version - "-": picks the default Kubernetes version + This corresponds to the ``master_version`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1211,7 +1244,7 @@ async def update_master( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1276,7 +1309,7 @@ async def set_master_auth( password. Args: - request (:class:`~.cluster_service.SetMasterAuthRequest`): + request (:class:`google.cloud.container_v1beta1.types.SetMasterAuthRequest`): The request object. SetMasterAuthRequest updates the admin password of a cluster. @@ -1287,7 +1320,7 @@ async def set_master_auth( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1341,7 +1374,7 @@ async def delete_cluster( initially created. Args: - request (:class:`~.cluster_service.DeleteClusterRequest`): + request (:class:`google.cloud.container_v1beta1.types.DeleteClusterRequest`): The request object. DeleteClusterRequest deletes a cluster. project_id (:class:`str`): @@ -1350,6 +1383,7 @@ async def delete_cluster( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1359,6 +1393,7 @@ async def delete_cluster( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1367,6 +1402,7 @@ async def delete_cluster( cluster to delete. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1378,7 +1414,7 @@ async def delete_cluster( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1449,7 +1485,7 @@ async def list_operations( zone or all zones. Args: - request (:class:`~.cluster_service.ListOperationsRequest`): + request (:class:`google.cloud.container_v1beta1.types.ListOperationsRequest`): The request object. ListOperationsRequest lists operations. project_id (:class:`str`): @@ -1458,6 +1494,7 @@ async def list_operations( number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1468,6 +1505,7 @@ async def list_operations( to return operations for, or ``-`` for all zones. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1479,7 +1517,7 @@ async def list_operations( sent along with the request as metadata. Returns: - ~.cluster_service.ListOperationsResponse: + google.cloud.container_v1beta1.types.ListOperationsResponse: ListOperationsResponse is the result of ListOperationsRequest. @@ -1546,7 +1584,7 @@ async def get_operation( r"""Gets the specified operation. Args: - request (:class:`~.cluster_service.GetOperationRequest`): + request (:class:`google.cloud.container_v1beta1.types.GetOperationRequest`): The request object. GetOperationRequest gets a single operation. project_id (:class:`str`): @@ -1555,6 +1593,7 @@ async def get_operation( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1564,6 +1603,7 @@ async def get_operation( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1571,6 +1611,7 @@ async def get_operation( Required. Deprecated. The server-assigned ``name`` of the operation. This field has been deprecated and replaced by the name field. + This corresponds to the ``operation_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1582,7 +1623,7 @@ async def get_operation( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1653,7 +1694,7 @@ async def cancel_operation( r"""Cancels the specified operation. Args: - request (:class:`~.cluster_service.CancelOperationRequest`): + request (:class:`google.cloud.container_v1beta1.types.CancelOperationRequest`): The request object. CancelOperationRequest cancels a single operation. project_id (:class:`str`): @@ -1662,6 +1703,7 @@ async def cancel_operation( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1671,6 +1713,7 @@ async def cancel_operation( `zone `__ in which the operation resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1678,6 +1721,7 @@ async def cancel_operation( Required. Deprecated. The server-assigned ``name`` of the operation. This field has been deprecated and replaced by the name field. + This corresponds to the ``operation_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1743,7 +1787,7 @@ async def get_server_config( Kubernetes Engine service. Args: - request (:class:`~.cluster_service.GetServerConfigRequest`): + request (:class:`google.cloud.container_v1beta1.types.GetServerConfigRequest`): The request object. Gets the current Kubernetes Engine service configuration. project_id (:class:`str`): @@ -1752,6 +1796,7 @@ async def get_server_config( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1761,6 +1806,7 @@ async def get_server_config( `zone `__ to return operations for. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1772,7 +1818,7 @@ async def get_server_config( sent along with the request as metadata. Returns: - ~.cluster_service.ServerConfig: + google.cloud.container_v1beta1.types.ServerConfig: Kubernetes Engine service configuration. @@ -1839,7 +1885,7 @@ async def list_node_pools( r"""Lists the node pools for a cluster. Args: - request (:class:`~.cluster_service.ListNodePoolsRequest`): + request (:class:`google.cloud.container_v1beta1.types.ListNodePoolsRequest`): The request object. ListNodePoolsRequest lists the node pool(s) for a cluster. project_id (:class:`str`): @@ -1848,6 +1894,7 @@ async def list_node_pools( number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1857,6 +1904,7 @@ async def list_node_pools( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1864,6 +1912,7 @@ async def list_node_pools( Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1875,7 +1924,7 @@ async def list_node_pools( sent along with the request as metadata. Returns: - ~.cluster_service.ListNodePoolsResponse: + google.cloud.container_v1beta1.types.ListNodePoolsResponse: ListNodePoolsResponse is the result of ListNodePoolsRequest. @@ -1944,7 +1993,7 @@ async def get_json_web_keys( available for all clusters. Args: - request (:class:`~.cluster_service.GetJSONWebKeysRequest`): + request (:class:`google.cloud.container_v1beta1.types.GetJSONWebKeysRequest`): 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 @@ -1958,7 +2007,7 @@ async def get_json_web_keys( sent along with the request as metadata. Returns: - ~.cluster_service.GetJSONWebKeysResponse: + google.cloud.container_v1beta1.types.GetJSONWebKeysResponse: GetJSONWebKeysResponse is a valid JSON Web Key Set as specififed in rfc 7517 @@ -2003,7 +2052,7 @@ async def get_node_pool( r"""Retrieves the requested node pool. Args: - request (:class:`~.cluster_service.GetNodePoolRequest`): + request (:class:`google.cloud.container_v1beta1.types.GetNodePoolRequest`): The request object. GetNodePoolRequest retrieves a node pool for a cluster. project_id (:class:`str`): @@ -2012,6 +2061,7 @@ async def get_node_pool( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2021,6 +2071,7 @@ async def get_node_pool( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2028,6 +2079,7 @@ async def get_node_pool( Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2036,6 +2088,7 @@ async def get_node_pool( node pool. This field has been deprecated and replaced by the name field. + This corresponds to the ``node_pool_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2047,7 +2100,7 @@ async def get_node_pool( sent along with the request as metadata. Returns: - ~.cluster_service.NodePool: + google.cloud.container_v1beta1.types.NodePool: NodePool contains the name and configuration for a cluster's node pool. Node pools are a set of nodes (i.e. @@ -2127,7 +2180,7 @@ async def create_node_pool( r"""Creates a node pool for a cluster. Args: - request (:class:`~.cluster_service.CreateNodePoolRequest`): + request (:class:`google.cloud.container_v1beta1.types.CreateNodePoolRequest`): The request object. CreateNodePoolRequest creates a node pool for a cluster. project_id (:class:`str`): @@ -2136,6 +2189,7 @@ async def create_node_pool( number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2145,6 +2199,7 @@ async def create_node_pool( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2152,10 +2207,11 @@ async def create_node_pool( Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - node_pool (:class:`~.cluster_service.NodePool`): + node_pool (:class:`google.cloud.container_v1beta1.types.NodePool`): Required. The node pool to create. This corresponds to the ``node_pool`` field on the ``request`` instance; if ``request`` is provided, this @@ -2168,7 +2224,7 @@ async def create_node_pool( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2234,7 +2290,7 @@ async def delete_node_pool( r"""Deletes a node pool from a cluster. Args: - request (:class:`~.cluster_service.DeleteNodePoolRequest`): + request (:class:`google.cloud.container_v1beta1.types.DeleteNodePoolRequest`): The request object. DeleteNodePoolRequest deletes a node pool for a cluster. project_id (:class:`str`): @@ -2243,6 +2299,7 @@ async def delete_node_pool( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2252,6 +2309,7 @@ async def delete_node_pool( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2259,6 +2317,7 @@ async def delete_node_pool( Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2267,6 +2326,7 @@ async def delete_node_pool( node pool to delete. This field has been deprecated and replaced by the name field. + This corresponds to the ``node_pool_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2278,7 +2338,7 @@ async def delete_node_pool( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2354,7 +2414,7 @@ async def rollback_node_pool_upgrade( successfully completed. Args: - request (:class:`~.cluster_service.RollbackNodePoolUpgradeRequest`): + request (:class:`google.cloud.container_v1beta1.types.RollbackNodePoolUpgradeRequest`): The request object. RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed NodePool upgrade. This will be an no-op if the last upgrade @@ -2365,6 +2425,7 @@ async def rollback_node_pool_upgrade( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2374,6 +2435,7 @@ async def rollback_node_pool_upgrade( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2382,6 +2444,7 @@ async def rollback_node_pool_upgrade( cluster to rollback. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2390,6 +2453,7 @@ async def rollback_node_pool_upgrade( node pool to rollback. This field has been deprecated and replaced by the name field. + This corresponds to the ``node_pool_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2401,7 +2465,7 @@ async def rollback_node_pool_upgrade( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2468,7 +2532,7 @@ async def set_node_pool_management( r"""Sets the NodeManagement options for a node pool. Args: - request (:class:`~.cluster_service.SetNodePoolManagementRequest`): + request (:class:`google.cloud.container_v1beta1.types.SetNodePoolManagementRequest`): The request object. SetNodePoolManagementRequest sets the node management properties of a node pool. project_id (:class:`str`): @@ -2477,6 +2541,7 @@ async def set_node_pool_management( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2486,6 +2551,7 @@ async def set_node_pool_management( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2494,6 +2560,7 @@ async def set_node_pool_management( cluster to update. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2502,12 +2569,14 @@ async def set_node_pool_management( node pool to update. This field has been deprecated and replaced by the name field. + This corresponds to the ``node_pool_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - management (:class:`~.cluster_service.NodeManagement`): + management (:class:`google.cloud.container_v1beta1.types.NodeManagement`): Required. NodeManagement configuration for the node pool. + This corresponds to the ``management`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2519,7 +2588,7 @@ async def set_node_pool_management( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2592,7 +2661,7 @@ async def set_labels( r"""Sets labels on a cluster. Args: - request (:class:`~.cluster_service.SetLabelsRequest`): + request (:class:`google.cloud.container_v1beta1.types.SetLabelsRequest`): 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 @@ -2603,6 +2672,7 @@ async def set_labels( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2612,6 +2682,7 @@ async def set_labels( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2619,12 +2690,14 @@ async def set_labels( Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - resource_labels (:class:`Sequence[~.cluster_service.SetLabelsRequest.ResourceLabelsEntry]`): + resource_labels (:class:`Sequence[google.cloud.container_v1beta1.types.SetLabelsRequest.ResourceLabelsEntry]`): Required. The labels to set for that cluster. + This corresponds to the ``resource_labels`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2637,6 +2710,7 @@ async def set_labels( fingerprint hash when updating or changing labels. Make a ``get()`` request to the resource to get the latest fingerprint. + This corresponds to the ``label_fingerprint`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2648,7 +2722,7 @@ async def set_labels( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2720,7 +2794,7 @@ async def set_legacy_abac( on a cluster. Args: - request (:class:`~.cluster_service.SetLegacyAbacRequest`): + request (:class:`google.cloud.container_v1beta1.types.SetLegacyAbacRequest`): The request object. SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for a cluster. project_id (:class:`str`): @@ -2729,6 +2803,7 @@ async def set_legacy_abac( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2738,6 +2813,7 @@ async def set_legacy_abac( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2746,12 +2822,14 @@ async def set_legacy_abac( cluster to update. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. enabled (:class:`bool`): Required. Whether ABAC authorization will be enabled in the cluster. + This corresponds to the ``enabled`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2763,7 +2841,7 @@ async def set_legacy_abac( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2828,7 +2906,7 @@ async def start_ip_rotation( r"""Starts master IP rotation. Args: - request (:class:`~.cluster_service.StartIPRotationRequest`): + request (:class:`google.cloud.container_v1beta1.types.StartIPRotationRequest`): 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. @@ -2838,6 +2916,7 @@ async def start_ip_rotation( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2847,6 +2926,7 @@ async def start_ip_rotation( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2854,6 +2934,7 @@ async def start_ip_rotation( Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2865,7 +2946,7 @@ async def start_ip_rotation( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2928,7 +3009,7 @@ async def complete_ip_rotation( r"""Completes master IP rotation. Args: - request (:class:`~.cluster_service.CompleteIPRotationRequest`): + request (:class:`google.cloud.container_v1beta1.types.CompleteIPRotationRequest`): The request object. CompleteIPRotationRequest moves the cluster master back into single-IP mode. project_id (:class:`str`): @@ -2937,6 +3018,7 @@ async def complete_ip_rotation( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2946,6 +3028,7 @@ async def complete_ip_rotation( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2953,6 +3036,7 @@ async def complete_ip_rotation( Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2964,7 +3048,7 @@ async def complete_ip_rotation( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3024,7 +3108,7 @@ async def set_node_pool_size( r"""Sets the size for a specific node pool. Args: - request (:class:`~.cluster_service.SetNodePoolSizeRequest`): + request (:class:`google.cloud.container_v1beta1.types.SetNodePoolSizeRequest`): The request object. SetNodePoolSizeRequest sets the size a node pool. @@ -3035,7 +3119,7 @@ async def set_node_pool_size( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3081,7 +3165,7 @@ async def set_network_policy( r"""Enables or disables Network Policy for a cluster. Args: - request (:class:`~.cluster_service.SetNetworkPolicyRequest`): + request (:class:`google.cloud.container_v1beta1.types.SetNetworkPolicyRequest`): The request object. SetNetworkPolicyRequest enables/disables network policy for a cluster. project_id (:class:`str`): @@ -3090,6 +3174,7 @@ async def set_network_policy( number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3099,6 +3184,7 @@ async def set_network_policy( `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3106,12 +3192,14 @@ async def set_network_policy( Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - network_policy (:class:`~.cluster_service.NetworkPolicy`): + network_policy (:class:`google.cloud.container_v1beta1.types.NetworkPolicy`): Required. Configuration options for the NetworkPolicy feature. + This corresponds to the ``network_policy`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3123,7 +3211,7 @@ async def set_network_policy( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3189,13 +3277,14 @@ async def set_maintenance_policy( r"""Sets the maintenance policy for a cluster. Args: - request (:class:`~.cluster_service.SetMaintenancePolicyRequest`): + request (:class:`google.cloud.container_v1beta1.types.SetMaintenancePolicyRequest`): The request object. SetMaintenancePolicyRequest sets the maintenance policy for a cluster. project_id (:class:`str`): Required. The Google Developers Console `project ID or project number `__. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3203,19 +3292,22 @@ async def set_maintenance_policy( Required. The name of the Google Compute Engine `zone `__ in which the cluster resides. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. cluster_id (:class:`str`): Required. The name of the cluster to update. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - maintenance_policy (:class:`~.cluster_service.MaintenancePolicy`): + maintenance_policy (:class:`google.cloud.container_v1beta1.types.MaintenancePolicy`): Required. The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy. + This corresponds to the ``maintenance_policy`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3227,7 +3319,7 @@ async def set_maintenance_policy( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3291,13 +3383,14 @@ async def list_usable_subnetworks( clusters in a project. Args: - request (:class:`~.cluster_service.ListUsableSubnetworksRequest`): + request (:class:`google.cloud.container_v1beta1.types.ListUsableSubnetworksRequest`): The request object. ListUsableSubnetworksRequest requests the list of usable subnetworks. available to a user for creating clusters. parent (:class:`str`): Required. The parent project where subnetworks are usable. Specified in the format ``projects/*``. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3309,7 +3402,7 @@ async def list_usable_subnetworks( sent along with the request as metadata. Returns: - ~.pagers.ListUsableSubnetworksAsyncPager: + google.cloud.container_v1beta1.services.cluster_manager.pagers.ListUsableSubnetworksAsyncPager: ListUsableSubnetworksResponse is the response of ListUsableSubnetworksRequest. @@ -3384,12 +3477,13 @@ async def list_locations( Engine. Args: - request (:class:`~.cluster_service.ListLocationsRequest`): + request (:class:`google.cloud.container_v1beta1.types.ListLocationsRequest`): The request object. ListLocationsRequest is used to request the locations that offer GKE. parent (:class:`str`): Required. Contains the name of the resource requested. Specified in the format ``projects/*``. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3401,7 +3495,7 @@ async def list_locations( sent along with the request as metadata. Returns: - ~.cluster_service.ListLocationsResponse: + google.cloud.container_v1beta1.types.ListLocationsResponse: ListLocationsResponse returns the list of all GKE locations and their recommendation state. diff --git a/google/cloud/container_v1beta1/services/cluster_manager/client.py b/google/cloud/container_v1beta1/services/cluster_manager/client.py index af40fcf9..cd87b4f4 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/client.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/client.py @@ -111,6 +111,22 @@ def _get_default_mtls_endpoint(api_endpoint): DEFAULT_ENDPOINT ) + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + ClusterManagerClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + @classmethod def from_service_account_file(cls, filename: str, *args, **kwargs): """Creates an instance of this client using the provided credentials @@ -123,7 +139,7 @@ def from_service_account_file(cls, filename: str, *args, **kwargs): kwargs: Additional arguments to pass to the constructor. Returns: - {@api.name}: The constructed client. + ClusterManagerClient: The constructed client. """ credentials = service_account.Credentials.from_service_account_file(filename) kwargs["credentials"] = credentials @@ -226,10 +242,10 @@ def __init__( credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. - transport (Union[str, ~.ClusterManagerTransport]): The + transport (Union[str, ClusterManagerTransport]): The transport to use. If set to None, a transport is chosen automatically. - client_options (client_options_lib.ClientOptions): Custom options for the + client_options (google.api_core.client_options.ClientOptions): 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 @@ -265,21 +281,17 @@ def __init__( util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false")) ) - ssl_credentials = None + client_cert_source_func = None is_mtls = False if use_client_cert: if client_options.client_cert_source: - import grpc # type: ignore - - cert, key = client_options.client_cert_source() - ssl_credentials = grpc.ssl_channel_credentials( - certificate_chain=cert, private_key=key - ) is_mtls = True + client_cert_source_func = client_options.client_cert_source else: - creds = SslCredentials() - is_mtls = creds.is_mtls - ssl_credentials = creds.ssl_credentials if is_mtls else None + is_mtls = mtls.has_default_client_cert_source() + client_cert_source_func = ( + mtls.default_client_cert_source() if is_mtls else None + ) # Figure out which api endpoint to use. if client_options.api_endpoint is not None: @@ -322,7 +334,7 @@ def __init__( credentials_file=client_options.credentials_file, host=api_endpoint, scopes=client_options.scopes, - ssl_channel_credentials=ssl_credentials, + client_cert_source_for_mtls=client_cert_source_func, quota_project_id=client_options.quota_project_id, client_info=client_info, ) @@ -341,24 +353,26 @@ def list_clusters( specified zone or all zones. Args: - request (:class:`~.cluster_service.ListClustersRequest`): + request (google.cloud.container_v1beta1.types.ListClustersRequest): The request object. ListClustersRequest lists clusters. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -370,7 +384,7 @@ def list_clusters( sent along with the request as metadata. Returns: - ~.cluster_service.ListClustersResponse: + google.cloud.container_v1beta1.types.ListClustersResponse: ListClustersResponse is the result of ListClustersRequest. @@ -430,32 +444,35 @@ def get_cluster( r"""Gets the details for a specific cluster. Args: - request (:class:`~.cluster_service.GetClusterRequest`): + request (google.cloud.container_v1beta1.types.GetClusterRequest): The request object. GetClusterRequest gets the settings of a cluster. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -467,7 +484,7 @@ def get_cluster( sent along with the request as metadata. Returns: - ~.cluster_service.Cluster: + google.cloud.container_v1beta1.types.Cluster: A Google Kubernetes Engine cluster. """ # Create or coerce a protobuf request object. @@ -539,30 +556,33 @@ def create_cluster( indicating which CIDR range the cluster is using. Args: - request (:class:`~.cluster_service.CreateClusterRequest`): + request (google.cloud.container_v1beta1.types.CreateClusterRequest): The request object. CreateClusterRequest creates a cluster. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster (:class:`~.cluster_service.Cluster`): + cluster (google.cloud.container_v1beta1.types.Cluster): Required. A `cluster resource `__ + This corresponds to the ``cluster`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -574,7 +594,7 @@ def create_cluster( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -639,38 +659,42 @@ def update_cluster( r"""Updates the settings for a specific cluster. Args: - request (:class:`~.cluster_service.UpdateClusterRequest`): + request (google.cloud.container_v1beta1.types.UpdateClusterRequest): The request object. UpdateClusterRequest updates the settings of a cluster. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update (:class:`~.cluster_service.ClusterUpdate`): + update (google.cloud.container_v1beta1.types.ClusterUpdate): Required. A description of the update. + This corresponds to the ``update`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -682,7 +706,7 @@ def update_cluster( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -746,7 +770,7 @@ def update_node_pool( node pool. Args: - request (:class:`~.cluster_service.UpdateNodePoolRequest`): + request (google.cloud.container_v1beta1.types.UpdateNodePoolRequest): The request object. SetNodePoolVersionRequest updates the version of a node pool. @@ -757,7 +781,7 @@ def update_node_pool( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -801,7 +825,7 @@ def set_node_pool_autoscaling( pool. Args: - request (:class:`~.cluster_service.SetNodePoolAutoscalingRequest`): + request (google.cloud.container_v1beta1.types.SetNodePoolAutoscalingRequest): The request object. SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. @@ -812,7 +836,7 @@ def set_node_pool_autoscaling( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -861,36 +885,39 @@ def set_logging_service( r"""Sets the logging service for a specific cluster. Args: - request (:class:`~.cluster_service.SetLoggingServiceRequest`): + request (google.cloud.container_v1beta1.types.SetLoggingServiceRequest): The request object. SetLoggingServiceRequest sets the logging service of a cluster. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - logging_service (:class:`str`): + logging_service (str): Required. The logging service the cluster should use to write logs. Currently available options: @@ -905,6 +932,7 @@ def set_logging_service( string,\ ``logging.googleapis.com/kubernetes`` will be used for GKE 1.14+ or ``logging.googleapis.com`` for earlier versions. + This corresponds to the ``logging_service`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -916,7 +944,7 @@ def set_logging_service( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -983,36 +1011,39 @@ def set_monitoring_service( r"""Sets the monitoring service for a specific cluster. Args: - request (:class:`~.cluster_service.SetMonitoringServiceRequest`): + request (google.cloud.container_v1beta1.types.SetMonitoringServiceRequest): The request object. SetMonitoringServiceRequest sets the monitoring service of a cluster. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - monitoring_service (:class:`str`): + monitoring_service (str): Required. The monitoring service the cluster should use to write metrics. Currently available options: @@ -1029,6 +1060,7 @@ def set_monitoring_service( string,\ ``monitoring.googleapis.com/kubernetes`` will be used for GKE 1.14+ or ``monitoring.googleapis.com`` for earlier versions. + This corresponds to the ``monitoring_service`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1040,7 +1072,7 @@ def set_monitoring_service( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1107,39 +1139,43 @@ def set_addons_config( r"""Sets the addons for a specific cluster. Args: - request (:class:`~.cluster_service.SetAddonsConfigRequest`): + request (google.cloud.container_v1beta1.types.SetAddonsConfigRequest): The request object. SetAddonsRequest sets the addons associated with the cluster. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - addons_config (:class:`~.cluster_service.AddonsConfig`): + addons_config (google.cloud.container_v1beta1.types.AddonsConfig): Required. The desired configurations for the various addons available to run in the cluster. + This corresponds to the ``addons_config`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1151,7 +1187,7 @@ def set_addons_config( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1220,36 +1256,39 @@ def set_locations( instead. Args: - request (:class:`~.cluster_service.SetLocationsRequest`): + request (google.cloud.container_v1beta1.types.SetLocationsRequest): The request object. SetLocationsRequest sets the locations of the cluster. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + 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 (Sequence[str]): Required. The desired list of Google Compute Engine `zones `__ in which the cluster's nodes should be located. Changing @@ -1259,6 +1298,7 @@ def set_locations( This list must always include the cluster's primary zone. + This corresponds to the ``locations`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1270,7 +1310,7 @@ def set_locations( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1338,36 +1378,39 @@ def update_master( r"""Updates the master for a specific cluster. Args: - request (:class:`~.cluster_service.UpdateMasterRequest`): + request (google.cloud.container_v1beta1.types.UpdateMasterRequest): The request object. UpdateMasterRequest updates the master of the cluster. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - master_version (:class:`str`): + master_version (str): Required. The Kubernetes version to change the master to. Users may specify either explicit @@ -1382,6 +1425,7 @@ def update_master( "1.X.Y-gke.N": picks an explicit Kubernetes version - "-": picks the default Kubernetes version + This corresponds to the ``master_version`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1393,7 +1437,7 @@ def update_master( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1459,7 +1503,7 @@ def set_master_auth( password. Args: - request (:class:`~.cluster_service.SetMasterAuthRequest`): + request (google.cloud.container_v1beta1.types.SetMasterAuthRequest): The request object. SetMasterAuthRequest updates the admin password of a cluster. @@ -1470,7 +1514,7 @@ def set_master_auth( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1525,32 +1569,35 @@ def delete_cluster( initially created. Args: - request (:class:`~.cluster_service.DeleteClusterRequest`): + request (google.cloud.container_v1beta1.types.DeleteClusterRequest): The request object. DeleteClusterRequest deletes a cluster. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1562,7 +1609,7 @@ def delete_cluster( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1626,25 +1673,27 @@ def list_operations( zone or all zones. Args: - request (:class:`~.cluster_service.ListOperationsRequest`): + request (google.cloud.container_v1beta1.types.ListOperationsRequest): The request object. ListOperationsRequest lists operations. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ to return operations for, or ``-`` for all zones. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1656,7 +1705,7 @@ def list_operations( sent along with the request as metadata. Returns: - ~.cluster_service.ListOperationsResponse: + google.cloud.container_v1beta1.types.ListOperationsResponse: ListOperationsResponse is the result of ListOperationsRequest. @@ -1716,31 +1765,34 @@ def get_operation( r"""Gets the specified operation. Args: - request (:class:`~.cluster_service.GetOperationRequest`): + request (google.cloud.container_v1beta1.types.GetOperationRequest): The request object. GetOperationRequest gets a single operation. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - operation_id (:class:`str`): + operation_id (str): Required. Deprecated. The server-assigned ``name`` of the operation. This field has been deprecated and replaced by the name field. + This corresponds to the ``operation_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1752,7 +1804,7 @@ def get_operation( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -1816,31 +1868,34 @@ def cancel_operation( r"""Cancels the specified operation. Args: - request (:class:`~.cluster_service.CancelOperationRequest`): + request (google.cloud.container_v1beta1.types.CancelOperationRequest): The request object. CancelOperationRequest cancels a single operation. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the operation resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - operation_id (:class:`str`): + operation_id (str): Required. Deprecated. The server-assigned ``name`` of the operation. This field has been deprecated and replaced by the name field. + This corresponds to the ``operation_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1907,24 +1962,26 @@ def get_server_config( Kubernetes Engine service. Args: - request (:class:`~.cluster_service.GetServerConfigRequest`): + request (google.cloud.container_v1beta1.types.GetServerConfigRequest): The request object. Gets the current Kubernetes Engine service configuration. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ to return operations for. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1936,7 +1993,7 @@ def get_server_config( sent along with the request as metadata. Returns: - ~.cluster_service.ServerConfig: + google.cloud.container_v1beta1.types.ServerConfig: Kubernetes Engine service configuration. @@ -1996,31 +2053,34 @@ def list_node_pools( r"""Lists the node pools for a cluster. Args: - request (:class:`~.cluster_service.ListNodePoolsRequest`): + request (google.cloud.container_v1beta1.types.ListNodePoolsRequest): The request object. ListNodePoolsRequest lists the node pool(s) for a cluster. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2032,7 +2092,7 @@ def list_node_pools( sent along with the request as metadata. Returns: - ~.cluster_service.ListNodePoolsResponse: + google.cloud.container_v1beta1.types.ListNodePoolsResponse: ListNodePoolsResponse is the result of ListNodePoolsRequest. @@ -2094,7 +2154,7 @@ def get_json_web_keys( available for all clusters. Args: - request (:class:`~.cluster_service.GetJSONWebKeysRequest`): + request (google.cloud.container_v1beta1.types.GetJSONWebKeysRequest): 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 @@ -2108,7 +2168,7 @@ def get_json_web_keys( sent along with the request as metadata. Returns: - ~.cluster_service.GetJSONWebKeysResponse: + google.cloud.container_v1beta1.types.GetJSONWebKeysResponse: GetJSONWebKeysResponse is a valid JSON Web Key Set as specififed in rfc 7517 @@ -2154,39 +2214,43 @@ def get_node_pool( r"""Retrieves the requested node pool. Args: - request (:class:`~.cluster_service.GetNodePoolRequest`): + request (google.cloud.container_v1beta1.types.GetNodePoolRequest): The request object. GetNodePoolRequest retrieves a node pool for a cluster. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - node_pool_id (:class:`str`): + node_pool_id (str): Required. Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field. + This corresponds to the ``node_pool_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2198,7 +2262,7 @@ def get_node_pool( sent along with the request as metadata. Returns: - ~.cluster_service.NodePool: + google.cloud.container_v1beta1.types.NodePool: NodePool contains the name and configuration for a cluster's node pool. Node pools are a set of nodes (i.e. @@ -2271,35 +2335,38 @@ def create_node_pool( r"""Creates a node pool for a cluster. Args: - request (:class:`~.cluster_service.CreateNodePoolRequest`): + request (google.cloud.container_v1beta1.types.CreateNodePoolRequest): The request object. CreateNodePoolRequest creates a node pool for a cluster. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the parent field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the parent field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - node_pool (:class:`~.cluster_service.NodePool`): + node_pool (google.cloud.container_v1beta1.types.NodePool): Required. The node pool to create. This corresponds to the ``node_pool`` field on the ``request`` instance; if ``request`` is provided, this @@ -2312,7 +2379,7 @@ def create_node_pool( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2379,39 +2446,43 @@ def delete_node_pool( r"""Deletes a node pool from a cluster. Args: - request (:class:`~.cluster_service.DeleteNodePoolRequest`): + request (google.cloud.container_v1beta1.types.DeleteNodePoolRequest): The request object. DeleteNodePoolRequest deletes a node pool for a cluster. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - node_pool_id (:class:`str`): + node_pool_id (str): Required. Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field. + This corresponds to the ``node_pool_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2423,7 +2494,7 @@ def delete_node_pool( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2492,42 +2563,46 @@ def rollback_node_pool_upgrade( successfully completed. Args: - request (:class:`~.cluster_service.RollbackNodePoolUpgradeRequest`): + request (google.cloud.container_v1beta1.types.RollbackNodePoolUpgradeRequest): The request object. RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed NodePool upgrade. This will be an no-op if the last upgrade successfully completed. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster to rollback. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - node_pool_id (:class:`str`): + node_pool_id (str): Required. Deprecated. The name of the node pool to rollback. This field has been deprecated and replaced by the name field. + This corresponds to the ``node_pool_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2539,7 +2614,7 @@ def rollback_node_pool_upgrade( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2609,46 +2684,51 @@ def set_node_pool_management( r"""Sets the NodeManagement options for a node pool. Args: - request (:class:`~.cluster_service.SetNodePoolManagementRequest`): + request (google.cloud.container_v1beta1.types.SetNodePoolManagementRequest): The request object. SetNodePoolManagementRequest sets the node management properties of a node pool. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - node_pool_id (:class:`str`): + node_pool_id (str): Required. Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field. + This corresponds to the ``node_pool_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - management (:class:`~.cluster_service.NodeManagement`): + management (google.cloud.container_v1beta1.types.NodeManagement): Required. NodeManagement configuration for the node pool. + This corresponds to the ``management`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2660,7 +2740,7 @@ def set_node_pool_management( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2734,43 +2814,47 @@ def set_labels( r"""Sets labels on a cluster. Args: - request (:class:`~.cluster_service.SetLabelsRequest`): + request (google.cloud.container_v1beta1.types.SetLabelsRequest): 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 Engine resources used by that cluster - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - resource_labels (:class:`Sequence[~.cluster_service.SetLabelsRequest.ResourceLabelsEntry]`): + resource_labels (Sequence[google.cloud.container_v1beta1.types.SetLabelsRequest.ResourceLabelsEntry]): Required. The labels to set for that cluster. + This corresponds to the ``resource_labels`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - label_fingerprint (:class:`str`): + label_fingerprint (str): Required. The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Kubernetes Engine @@ -2779,6 +2863,7 @@ def set_labels( fingerprint hash when updating or changing labels. Make a ``get()`` request to the resource to get the latest fingerprint. + This corresponds to the ``label_fingerprint`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2790,7 +2875,7 @@ def set_labels( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2863,38 +2948,42 @@ def set_legacy_abac( on a cluster. Args: - request (:class:`~.cluster_service.SetLegacyAbacRequest`): + request (google.cloud.container_v1beta1.types.SetLegacyAbacRequest): The request object. SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for a cluster. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - enabled (:class:`bool`): + enabled (bool): Required. Whether ABAC authorization will be enabled in the cluster. + This corresponds to the ``enabled`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2906,7 +2995,7 @@ def set_legacy_abac( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -2972,32 +3061,35 @@ def start_ip_rotation( r"""Starts master IP rotation. Args: - request (:class:`~.cluster_service.StartIPRotationRequest`): + request (google.cloud.container_v1beta1.types.StartIPRotationRequest): 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. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3009,7 +3101,7 @@ def start_ip_rotation( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3073,31 +3165,34 @@ def complete_ip_rotation( r"""Completes master IP rotation. Args: - request (:class:`~.cluster_service.CompleteIPRotationRequest`): + request (google.cloud.container_v1beta1.types.CompleteIPRotationRequest): The request object. CompleteIPRotationRequest moves the cluster master back into single-IP mode. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3109,7 +3204,7 @@ def complete_ip_rotation( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3170,7 +3265,7 @@ def set_node_pool_size( r"""Sets the size for a specific node pool. Args: - request (:class:`~.cluster_service.SetNodePoolSizeRequest`): + request (google.cloud.container_v1beta1.types.SetNodePoolSizeRequest): The request object. SetNodePoolSizeRequest sets the size a node pool. @@ -3181,7 +3276,7 @@ def set_node_pool_size( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3228,37 +3323,41 @@ def set_network_policy( r"""Enables or disables Network Policy for a cluster. Args: - request (:class:`~.cluster_service.SetNetworkPolicyRequest`): + request (google.cloud.container_v1beta1.types.SetNetworkPolicyRequest): The request object. SetNetworkPolicyRequest enables/disables network policy for a cluster. - project_id (:class:`str`): + project_id (str): Required. Deprecated. The Google Developers Console `project ID or project number `__. This field has been deprecated and replaced by the name field. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. Deprecated. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field has been deprecated and replaced by the name field. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - network_policy (:class:`~.cluster_service.NetworkPolicy`): + network_policy (google.cloud.container_v1beta1.types.NetworkPolicy): Required. Configuration options for the NetworkPolicy feature. + This corresponds to the ``network_policy`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3270,7 +3369,7 @@ def set_network_policy( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3337,33 +3436,37 @@ def set_maintenance_policy( r"""Sets the maintenance policy for a cluster. Args: - request (:class:`~.cluster_service.SetMaintenancePolicyRequest`): + request (google.cloud.container_v1beta1.types.SetMaintenancePolicyRequest): The request object. SetMaintenancePolicyRequest sets the maintenance policy for a cluster. - project_id (:class:`str`): + project_id (str): Required. The Google Developers Console `project ID or project number `__. + This corresponds to the ``project_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - zone (:class:`str`): + zone (str): Required. The name of the Google Compute Engine `zone `__ in which the cluster resides. + This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster_id (:class:`str`): + cluster_id (str): Required. The name of the cluster to update. + This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - maintenance_policy (:class:`~.cluster_service.MaintenancePolicy`): + maintenance_policy (google.cloud.container_v1beta1.types.MaintenancePolicy): Required. The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy. + This corresponds to the ``maintenance_policy`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3375,7 +3478,7 @@ def set_maintenance_policy( sent along with the request as metadata. Returns: - ~.cluster_service.Operation: + google.cloud.container_v1beta1.types.Operation: This operation resource represents operations that may have happened or are happening on the cluster. All fields are @@ -3440,13 +3543,14 @@ def list_usable_subnetworks( clusters in a project. Args: - request (:class:`~.cluster_service.ListUsableSubnetworksRequest`): + request (google.cloud.container_v1beta1.types.ListUsableSubnetworksRequest): The request object. ListUsableSubnetworksRequest requests the list of usable subnetworks. available to a user for creating clusters. - parent (:class:`str`): + parent (str): Required. The parent project where subnetworks are usable. Specified in the format ``projects/*``. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3458,7 +3562,7 @@ def list_usable_subnetworks( sent along with the request as metadata. Returns: - ~.pagers.ListUsableSubnetworksPager: + google.cloud.container_v1beta1.services.cluster_manager.pagers.ListUsableSubnetworksPager: ListUsableSubnetworksResponse is the response of ListUsableSubnetworksRequest. @@ -3526,12 +3630,13 @@ def list_locations( Engine. Args: - request (:class:`~.cluster_service.ListLocationsRequest`): + request (google.cloud.container_v1beta1.types.ListLocationsRequest): The request object. ListLocationsRequest is used to request the locations that offer GKE. - parent (:class:`str`): + parent (str): Required. Contains the name of the resource requested. Specified in the format ``projects/*``. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -3543,7 +3648,7 @@ def list_locations( sent along with the request as metadata. Returns: - ~.cluster_service.ListLocationsResponse: + google.cloud.container_v1beta1.types.ListLocationsResponse: ListLocationsResponse returns the list of all GKE locations and their recommendation state. diff --git a/google/cloud/container_v1beta1/services/cluster_manager/pagers.py b/google/cloud/container_v1beta1/services/cluster_manager/pagers.py index cd8bb39d..8d149eec 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/pagers.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/pagers.py @@ -24,7 +24,7 @@ class ListUsableSubnetworksPager: """A pager for iterating through ``list_usable_subnetworks`` requests. This class thinly wraps an initial - :class:`~.cluster_service.ListUsableSubnetworksResponse` object, and + :class:`google.cloud.container_v1beta1.types.ListUsableSubnetworksResponse` object, and provides an ``__iter__`` method to iterate through its ``subnetworks`` field. @@ -33,7 +33,7 @@ class ListUsableSubnetworksPager: through the ``subnetworks`` field on the corresponding responses. - All the usual :class:`~.cluster_service.ListUsableSubnetworksResponse` + All the usual :class:`google.cloud.container_v1beta1.types.ListUsableSubnetworksResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -51,9 +51,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.cluster_service.ListUsableSubnetworksRequest`): + request (google.cloud.container_v1beta1.types.ListUsableSubnetworksRequest): The initial request object. - response (:class:`~.cluster_service.ListUsableSubnetworksResponse`): + response (google.cloud.container_v1beta1.types.ListUsableSubnetworksResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -86,7 +86,7 @@ class ListUsableSubnetworksAsyncPager: """A pager for iterating through ``list_usable_subnetworks`` requests. This class thinly wraps an initial - :class:`~.cluster_service.ListUsableSubnetworksResponse` object, and + :class:`google.cloud.container_v1beta1.types.ListUsableSubnetworksResponse` object, and provides an ``__aiter__`` method to iterate through its ``subnetworks`` field. @@ -95,7 +95,7 @@ class ListUsableSubnetworksAsyncPager: through the ``subnetworks`` field on the corresponding responses. - All the usual :class:`~.cluster_service.ListUsableSubnetworksResponse` + All the usual :class:`google.cloud.container_v1beta1.types.ListUsableSubnetworksResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -113,9 +113,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.cluster_service.ListUsableSubnetworksRequest`): + request (google.cloud.container_v1beta1.types.ListUsableSubnetworksRequest): The initial request object. - response (:class:`~.cluster_service.ListUsableSubnetworksResponse`): + response (google.cloud.container_v1beta1.types.ListUsableSubnetworksResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. 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 4c538ffb..ef92cc98 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py @@ -58,6 +58,7 @@ def __init__( 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: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: @@ -88,6 +89,10 @@ def __init__( ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials for grpc channel. It is ignored if ``channel`` is provided. + client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): + A callback to provide client certificate bytes and private key bytes, + both in PEM format. It is used to configure mutual TLS channel. It is + ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. client_info (google.api_core.gapic_v1.client_info.ClientInfo): @@ -104,6 +109,11 @@ def __init__( """ self._ssl_channel_credentials = ssl_channel_credentials + if api_mtls_endpoint: + warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning) + if client_cert_source: + warnings.warn("client_cert_source is deprecated", DeprecationWarning) + if channel: # Sanity check: Ensure that channel and credentials are not both # provided. @@ -113,11 +123,6 @@ def __init__( self._grpc_channel = channel self._ssl_channel_credentials = None elif api_mtls_endpoint: - warnings.warn( - "api_mtls_endpoint and client_cert_source are deprecated", - DeprecationWarning, - ) - host = ( api_mtls_endpoint if ":" in api_mtls_endpoint @@ -161,12 +166,18 @@ def __init__( scopes=self.AUTH_SCOPES, quota_project_id=quota_project_id ) + if client_cert_source_for_mtls and not ssl_channel_credentials: + cert, key = client_cert_source_for_mtls() + self._ssl_channel_credentials = grpc.ssl_channel_credentials( + certificate_chain=cert, private_key=key + ) + # create a new channel. The provided one is ignored. self._grpc_channel = type(self).create_channel( host, credentials=credentials, credentials_file=credentials_file, - ssl_credentials=ssl_channel_credentials, + ssl_credentials=self._ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, options=[ 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 368aa383..7b96ad31 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 @@ -102,6 +102,7 @@ def __init__( 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, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: @@ -133,6 +134,10 @@ def __init__( ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials for grpc channel. It is ignored if ``channel`` is provided. + client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): + A callback to provide client certificate bytes and private key bytes, + both in PEM format. It is used to configure mutual TLS channel. It is + ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. client_info (google.api_core.gapic_v1.client_info.ClientInfo): @@ -149,6 +154,11 @@ def __init__( """ self._ssl_channel_credentials = ssl_channel_credentials + if api_mtls_endpoint: + warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning) + if client_cert_source: + warnings.warn("client_cert_source is deprecated", DeprecationWarning) + if channel: # Sanity check: Ensure that channel and credentials are not both # provided. @@ -158,11 +168,6 @@ def __init__( self._grpc_channel = channel self._ssl_channel_credentials = None elif api_mtls_endpoint: - warnings.warn( - "api_mtls_endpoint and client_cert_source are deprecated", - DeprecationWarning, - ) - host = ( api_mtls_endpoint if ":" in api_mtls_endpoint @@ -206,12 +211,18 @@ def __init__( scopes=self.AUTH_SCOPES, quota_project_id=quota_project_id ) + if client_cert_source_for_mtls and not ssl_channel_credentials: + cert, key = client_cert_source_for_mtls() + self._ssl_channel_credentials = grpc.ssl_channel_credentials( + certificate_chain=cert, private_key=key + ) + # create a new channel. The provided one is ignored. self._grpc_channel = type(self).create_channel( host, credentials=credentials, credentials_file=credentials_file, - ssl_credentials=ssl_channel_credentials, + ssl_credentials=self._ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, options=[ diff --git a/google/cloud/container_v1beta1/types/cluster_service.py b/google/cloud/container_v1beta1/types/cluster_service.py index e3185724..4ab224c7 100644 --- a/google/cloud/container_v1beta1/types/cluster_service.py +++ b/google/cloud/container_v1beta1/types/cluster_service.py @@ -167,7 +167,7 @@ class LinuxNodeConfig(proto.Message): r"""Parameters that can be configured on Linux nodes. Attributes: - sysctls (Sequence[~.cluster_service.LinuxNodeConfig.SysctlsEntry]): + sysctls (Sequence[google.cloud.container_v1beta1.types.LinuxNodeConfig.SysctlsEntry]): The Linux kernel parameters to be applied to the nodes and all pods running on the nodes. @@ -199,7 +199,7 @@ class NodeKubeletConfig(proto.Message): increased CPU affinity and exclusivity on the node. The default value is 'none' if unspecified. - cpu_cfs_quota (~.wrappers.BoolValue): + cpu_cfs_quota (google.protobuf.wrappers_pb2.BoolValue): Enable CPU CFS quota enforcement for containers that specify CPU limits. This option is enabled by default which makes @@ -267,7 +267,7 @@ class NodeConfig(proto.Message): address of the Service Account; otherwise, if no Service Account is specified, the "default" service account is used. - metadata (Sequence[~.cluster_service.NodeConfig.MetadataEntry]): + metadata (Sequence[google.cloud.container_v1beta1.types.NodeConfig.MetadataEntry]): The metadata key/value pairs assigned to instances in the cluster. @@ -312,7 +312,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 (Sequence[~.cluster_service.NodeConfig.LabelsEntry]): + labels (Sequence[google.cloud.container_v1beta1.types.NodeConfig.LabelsEntry]): 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 @@ -346,19 +346,19 @@ class NodeConfig(proto.Message): https://cloud.google.com/compute/docs/instances/preemptible for more inforamtion about preemptible VM instances. - accelerators (Sequence[~.cluster_service.AcceleratorConfig]): + accelerators (Sequence[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 more information about support for GPUs. - sandbox_config (~.cluster_service.SandboxConfig): + sandbox_config (google.cloud.container_v1beta1.types.SandboxConfig): Sandbox configuration for this node. node_group (str): Setting this field will assign instances of this pool to run on the specified node group. This is useful for running workloads on `sole tenant nodes `__. - reservation_affinity (~.cluster_service.ReservationAffinity): + reservation_affinity (google.cloud.container_v1beta1.types.ReservationAffinity): The optional reservation affinity. Setting this field will apply the specified `Zonal Compute Reservation `__ @@ -377,10 +377,10 @@ class NodeConfig(proto.Message): ``minCpuPlatform: "Intel Sandy Bridge"``. For more information, read `how to specify min CPU platform `__ - workload_metadata_config (~.cluster_service.WorkloadMetadataConfig): + workload_metadata_config (google.cloud.container_v1beta1.types.WorkloadMetadataConfig): The workload metadata configuration for this node. - taints (Sequence[~.cluster_service.NodeTaint]): + taints (Sequence[google.cloud.container_v1beta1.types.NodeTaint]): List of kubernetes taints to be applied to each node. For more information, including usage and the @@ -395,14 +395,14 @@ class NodeConfig(proto.Message): For more information about protecting resources with Cloud KMS Keys please see: https://cloud.google.com/compute/docs/disks/customer-managed-encryption - shielded_instance_config (~.cluster_service.ShieldedInstanceConfig): + shielded_instance_config (google.cloud.container_v1beta1.types.ShieldedInstanceConfig): Shielded Instance options. - linux_node_config (~.cluster_service.LinuxNodeConfig): + linux_node_config (google.cloud.container_v1beta1.types.LinuxNodeConfig): Parameters that can be configured on Linux nodes. - kubelet_config (~.cluster_service.NodeKubeletConfig): + kubelet_config (google.cloud.container_v1beta1.types.NodeKubeletConfig): Node kubelet configs. - ephemeral_storage_config (~.cluster_service.EphemeralStorageConfig): + ephemeral_storage_config (google.cloud.container_v1beta1.types.EphemeralStorageConfig): Parameters for the ephemeral storage filesystem. If unspecified, ephemeral storage is backed by the boot disk. @@ -503,7 +503,7 @@ class SandboxConfig(proto.Message): sandbox_type (str): Type of the sandbox to use for the node (e.g. 'gvisor') - type_ (~.cluster_service.SandboxConfig.Type): + type_ (google.cloud.container_v1beta1.types.SandboxConfig.Type): Type of the sandbox to use for the node. """ @@ -538,7 +538,7 @@ class ReservationAffinity(proto.Message): take capacity from. Attributes: - consume_reservation_type (~.cluster_service.ReservationAffinity.Type): + consume_reservation_type (google.cloud.container_v1beta1.types.ReservationAffinity.Type): Corresponds to the type of reservation consumption. key (str): @@ -581,7 +581,7 @@ class NodeTaint(proto.Message): Key for taint. value (str): Value for taint. - effect (~.cluster_service.NodeTaint.Effect): + effect (google.cloud.container_v1beta1.types.NodeTaint.Effect): Effect for taint. """ @@ -631,7 +631,7 @@ class MasterAuth(proto.Message): authentication methods, see: https://cloud.google.com/kubernetes- engine/docs/how-to/api-server-authentication - client_certificate_config (~.cluster_service.ClientCertificateConfig): + client_certificate_config (google.cloud.container_v1beta1.types.ClientCertificateConfig): Configuration for client certificate authentication on the cluster. For clusters before v1.12, if no configuration is specified, @@ -677,18 +677,18 @@ class AddonsConfig(proto.Message): up in the cluster, enabling additional functionality. Attributes: - http_load_balancing (~.cluster_service.HttpLoadBalancing): + http_load_balancing (google.cloud.container_v1beta1.types.HttpLoadBalancing): Configuration for the HTTP (L7) load balancing controller addon, which makes it easy to set up HTTP load balancers for services in a cluster. - horizontal_pod_autoscaling (~.cluster_service.HorizontalPodAutoscaling): + horizontal_pod_autoscaling (google.cloud.container_v1beta1.types.HorizontalPodAutoscaling): Configuration for the horizontal pod autoscaling feature, which increases or decreases the number of replica pods a replication controller has based on the resource usage of the existing pods. - kubernetes_dashboard (~.cluster_service.KubernetesDashboard): + kubernetes_dashboard (google.cloud.container_v1beta1.types.KubernetesDashboard): Configuration for the Kubernetes Dashboard. This addon is deprecated, and will be disabled in 1.15. It is recommended to use the Cloud @@ -697,29 +697,29 @@ class AddonsConfig(proto.Message): information, see: https://cloud.google.com/kubernetes- engine/docs/concepts/dashboards - network_policy_config (~.cluster_service.NetworkPolicyConfig): + network_policy_config (google.cloud.container_v1beta1.types.NetworkPolicyConfig): Configuration for NetworkPolicy. This only tracks whether the addon is enabled or not on the Master, it does not track whether network policy is enabled for the nodes. - istio_config (~.cluster_service.IstioConfig): + istio_config (google.cloud.container_v1beta1.types.IstioConfig): Configuration for Istio, an open platform to connect, manage, and secure microservices. - cloud_run_config (~.cluster_service.CloudRunConfig): + cloud_run_config (google.cloud.container_v1beta1.types.CloudRunConfig): Configuration for the Cloud Run addon. The ``IstioConfig`` addon must be enabled in order to enable Cloud Run addon. This option can only be enabled at cluster creation time. - dns_cache_config (~.cluster_service.DnsCacheConfig): + dns_cache_config (google.cloud.container_v1beta1.types.DnsCacheConfig): Configuration for NodeLocalDNS, a dns cache running on cluster nodes - config_connector_config (~.cluster_service.ConfigConnectorConfig): + config_connector_config (google.cloud.container_v1beta1.types.ConfigConnectorConfig): Configuration for the ConfigConnector add-on, a Kubernetes extension to manage hosted GCP services through the Kubernetes API - gce_persistent_disk_csi_driver_config (~.cluster_service.GcePersistentDiskCsiDriverConfig): + gce_persistent_disk_csi_driver_config (google.cloud.container_v1beta1.types.GcePersistentDiskCsiDriverConfig): Configuration for the Compute Engine Persistent Disk CSI driver. - kalm_config (~.cluster_service.KalmConfig): + kalm_config (google.cloud.container_v1beta1.types.KalmConfig): Configuration for the KALM addon, which manages the lifecycle of k8s applications. """ @@ -904,7 +904,7 @@ class PrivateClusterConfig(proto.Message): peering_name (str): Output only. The peering name in the customer VPC used by this cluster. - master_global_access_config (~.cluster_service.PrivateClusterMasterGlobalAccessConfig): + master_global_access_config (google.cloud.container_v1beta1.types.PrivateClusterMasterGlobalAccessConfig): Controls master global access settings. """ @@ -931,7 +931,7 @@ class IstioConfig(proto.Message): Attributes: disabled (bool): Whether Istio is enabled for this cluster. - auth (~.cluster_service.IstioConfig.IstioAuthMode): + auth (google.cloud.container_v1beta1.types.IstioConfig.IstioAuthMode): The specified Istio auth mode, either none, or mutual TLS. """ @@ -955,7 +955,7 @@ class CloudRunConfig(proto.Message): disabled (bool): Whether Cloud Run addon is enabled for this cluster. - load_balancer_type (~.cluster_service.CloudRunConfig.LoadBalancerType): + load_balancer_type (google.cloud.container_v1beta1.types.CloudRunConfig.LoadBalancerType): Which load balancer type is installed for Cloud Run. """ @@ -982,7 +982,7 @@ class MasterAuthorizedNetworksConfig(proto.Message): enabled (bool): Whether or not master authorized networks is enabled. - cidr_blocks (Sequence[~.cluster_service.MasterAuthorizedNetworksConfig.CidrBlock]): + cidr_blocks (Sequence[google.cloud.container_v1beta1.types.MasterAuthorizedNetworksConfig.CidrBlock]): cidr_blocks define up to 10 external networks that could access Kubernetes master through HTTPS. """ @@ -1030,7 +1030,7 @@ class NetworkPolicy(proto.Message): networking/networkpolicies/ Attributes: - provider (~.cluster_service.NetworkPolicy.Provider): + provider (google.cloud.container_v1beta1.types.NetworkPolicy.Provider): The selected network policy provider. enabled (bool): Whether network policy is enabled on the @@ -1264,7 +1264,7 @@ class ClusterTelemetry(proto.Message): r"""Telemetry integration for the cluster. Attributes: - type_ (~.cluster_service.ClusterTelemetry.Type): + type_ (google.cloud.container_v1beta1.types.ClusterTelemetry.Type): Type of the integration. """ @@ -1305,7 +1305,7 @@ class Cluster(proto.Message): This field is deprecated, use node_pool.initial_node_count instead. - node_config (~.cluster_service.NodeConfig): + node_config (google.cloud.container_v1beta1.types.NodeConfig): Parameters used in creating the cluster's nodes. For requests, this field should only be used in lieu of a "node_pool" object, since this configuration (along with the @@ -1318,7 +1318,7 @@ class Cluster(proto.Message): If unspecified, the defaults are used. This field is deprecated, use node_pool.config instead. - master_auth (~.cluster_service.MasterAuth): + master_auth (google.cloud.container_v1beta1.types.MasterAuth): The authentication information for accessing the master endpoint. If unspecified, the defaults are used: For clusters before v1.12, if master_auth is unspecified, @@ -1366,7 +1366,7 @@ class Cluster(proto.Message): notation (e.g. ``10.96.0.0/14``). Leave blank to have one automatically chosen or specify a ``/14`` block in ``10.0.0.0/8``. - addons_config (~.cluster_service.AddonsConfig): + addons_config (google.cloud.container_v1beta1.types.AddonsConfig): Configurations for the various addons available to run in the cluster. subnetwork (str): @@ -1374,7 +1374,7 @@ 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[~.cluster_service.NodePool]): + node_pools (Sequence[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. @@ -1400,35 +1400,35 @@ class Cluster(proto.Message): master/node upgrades are disabled. Alpha enabled clusters are automatically deleted thirty days after creation. - resource_labels (Sequence[~.cluster_service.Cluster.ResourceLabelsEntry]): + resource_labels (Sequence[google.cloud.container_v1beta1.types.Cluster.ResourceLabelsEntry]): The resource labels for the cluster to use to annotate any related Google Compute Engine resources. label_fingerprint (str): The fingerprint of the set of labels for this cluster. - legacy_abac (~.cluster_service.LegacyAbac): + legacy_abac (google.cloud.container_v1beta1.types.LegacyAbac): Configuration for the legacy ABAC authorization mode. - network_policy (~.cluster_service.NetworkPolicy): + network_policy (google.cloud.container_v1beta1.types.NetworkPolicy): Configuration options for the NetworkPolicy feature. - ip_allocation_policy (~.cluster_service.IPAllocationPolicy): + ip_allocation_policy (google.cloud.container_v1beta1.types.IPAllocationPolicy): Configuration for cluster IP allocation. - master_authorized_networks_config (~.cluster_service.MasterAuthorizedNetworksConfig): + master_authorized_networks_config (google.cloud.container_v1beta1.types.MasterAuthorizedNetworksConfig): The configuration options for master authorized networks feature. - maintenance_policy (~.cluster_service.MaintenancePolicy): + maintenance_policy (google.cloud.container_v1beta1.types.MaintenancePolicy): Configure the maintenance policy for this cluster. - binary_authorization (~.cluster_service.BinaryAuthorization): + binary_authorization (google.cloud.container_v1beta1.types.BinaryAuthorization): Configuration for Binary Authorization. - pod_security_policy_config (~.cluster_service.PodSecurityPolicyConfig): + pod_security_policy_config (google.cloud.container_v1beta1.types.PodSecurityPolicyConfig): Configuration for the PodSecurityPolicy feature. - autoscaling (~.cluster_service.ClusterAutoscaling): + autoscaling (google.cloud.container_v1beta1.types.ClusterAutoscaling): Cluster-level autoscaling configuration. - network_config (~.cluster_service.NetworkConfig): + network_config (google.cloud.container_v1beta1.types.NetworkConfig): Configuration for cluster networking. private_cluster (bool): If this is a private cluster setup. Private clusters are @@ -1442,37 +1442,37 @@ class Cluster(proto.Message): addresses to the master or set of masters, as well as the ILB VIP. This field is deprecated, use private_cluster_config.master_ipv4_cidr_block instead. - default_max_pods_constraint (~.cluster_service.MaxPodsConstraint): + default_max_pods_constraint (google.cloud.container_v1beta1.types.MaxPodsConstraint): The default constraint on the maximum number of pods that can be run simultaneously on a node in the node pool of this cluster. Only honored if cluster created with IP Alias support. - resource_usage_export_config (~.cluster_service.ResourceUsageExportConfig): + resource_usage_export_config (google.cloud.container_v1beta1.types.ResourceUsageExportConfig): Configuration for exporting resource usages. Resource usage export is disabled when this config unspecified. - authenticator_groups_config (~.cluster_service.AuthenticatorGroupsConfig): + authenticator_groups_config (google.cloud.container_v1beta1.types.AuthenticatorGroupsConfig): Configuration controlling RBAC group membership information. - private_cluster_config (~.cluster_service.PrivateClusterConfig): + private_cluster_config (google.cloud.container_v1beta1.types.PrivateClusterConfig): Configuration for private cluster. - vertical_pod_autoscaling (~.cluster_service.VerticalPodAutoscaling): + vertical_pod_autoscaling (google.cloud.container_v1beta1.types.VerticalPodAutoscaling): Cluster-level Vertical Pod Autoscaling configuration. - shielded_nodes (~.cluster_service.ShieldedNodes): + shielded_nodes (google.cloud.container_v1beta1.types.ShieldedNodes): Shielded Nodes configuration. - release_channel (~.cluster_service.ReleaseChannel): + release_channel (google.cloud.container_v1beta1.types.ReleaseChannel): Release channel configuration. - workload_identity_config (~.cluster_service.WorkloadIdentityConfig): + workload_identity_config (google.cloud.container_v1beta1.types.WorkloadIdentityConfig): Configuration for the use of Kubernetes Service Accounts in GCP IAM policies. - cluster_telemetry (~.cluster_service.ClusterTelemetry): + cluster_telemetry (google.cloud.container_v1beta1.types.ClusterTelemetry): Telemetry integration for the cluster. - tpu_config (~.cluster_service.TpuConfig): + tpu_config (google.cloud.container_v1beta1.types.TpuConfig): Configuration for Cloud TPU support; - notification_config (~.cluster_service.NotificationConfig): + notification_config (google.cloud.container_v1beta1.types.NotificationConfig): Notification configuration of the cluster. - confidential_nodes (~.cluster_service.ConfidentialNodes): + confidential_nodes (google.cloud.container_v1beta1.types.ConfidentialNodes): Configuration of Confidential Nodes self_link (str): [Output only] Server-defined URL for the resource. @@ -1520,7 +1520,7 @@ class Cluster(proto.Message): [Output only] The time the cluster was created, in `RFC3339 `__ text format. - status (~.cluster_service.Cluster.Status): + status (google.cloud.container_v1beta1.types.Cluster.Status): [Output only] The current status of this cluster. status_message (str): [Output only] Deprecated. Use conditions instead. Additional @@ -1562,12 +1562,12 @@ class Cluster(proto.Message): cluster, in `CIDR `__ notation (e.g. ``1.2.3.4/29``). - database_encryption (~.cluster_service.DatabaseEncryption): + database_encryption (google.cloud.container_v1beta1.types.DatabaseEncryption): Configuration of etcd encryption. - conditions (Sequence[~.cluster_service.StatusCondition]): + conditions (Sequence[google.cloud.container_v1beta1.types.StatusCondition]): Which conditions caused the current cluster state. - master (~.cluster_service.Master): + master (google.cloud.container_v1beta1.types.Master): Configuration for master components. """ @@ -1767,7 +1767,7 @@ class ClusterUpdate(proto.Message): string,\ ``monitoring.googleapis.com/kubernetes`` will be used for GKE 1.14+ or ``monitoring.googleapis.com`` for earlier versions. - desired_addons_config (~.cluster_service.AddonsConfig): + desired_addons_config (google.cloud.container_v1beta1.types.AddonsConfig): Configurations for the various addons available to run in the cluster. desired_node_pool_id (str): @@ -1779,7 +1779,7 @@ class ClusterUpdate(proto.Message): desired_image_type (str): The desired image type for the node pool. NOTE: Set the "desired_node_pool" field as well. - desired_node_pool_autoscaling (~.cluster_service.NodePoolAutoscaling): + desired_node_pool_autoscaling (google.cloud.container_v1beta1.types.NodePoolAutoscaling): Autoscaler configuration for the node pool specified in desired_node_pool_id. If there is only one pool in the cluster and desired_node_pool_id is not provided then the @@ -1794,15 +1794,15 @@ class ClusterUpdate(proto.Message): Warning: changing cluster locations will update the locations of all node pools and will result in nodes being added and/or removed. - desired_master_authorized_networks_config (~.cluster_service.MasterAuthorizedNetworksConfig): + desired_master_authorized_networks_config (google.cloud.container_v1beta1.types.MasterAuthorizedNetworksConfig): The desired configuration options for master authorized networks feature. - desired_pod_security_policy_config (~.cluster_service.PodSecurityPolicyConfig): + desired_pod_security_policy_config (google.cloud.container_v1beta1.types.PodSecurityPolicyConfig): The desired configuration options for the PodSecurityPolicy feature. - desired_cluster_autoscaling (~.cluster_service.ClusterAutoscaling): + desired_cluster_autoscaling (google.cloud.container_v1beta1.types.ClusterAutoscaling): Cluster-level autoscaling configuration. - desired_binary_authorization (~.cluster_service.BinaryAuthorization): + desired_binary_authorization (google.cloud.container_v1beta1.types.BinaryAuthorization): The desired configuration options for the Binary Authorization feature. desired_logging_service (str): @@ -1819,30 +1819,30 @@ class ClusterUpdate(proto.Message): string,\ ``logging.googleapis.com/kubernetes`` will be used for GKE 1.14+ or ``logging.googleapis.com`` for earlier versions. - desired_resource_usage_export_config (~.cluster_service.ResourceUsageExportConfig): + desired_resource_usage_export_config (google.cloud.container_v1beta1.types.ResourceUsageExportConfig): The desired configuration for exporting resource usage. - desired_vertical_pod_autoscaling (~.cluster_service.VerticalPodAutoscaling): + desired_vertical_pod_autoscaling (google.cloud.container_v1beta1.types.VerticalPodAutoscaling): Cluster-level Vertical Pod Autoscaling configuration. - desired_private_cluster_config (~.cluster_service.PrivateClusterConfig): + desired_private_cluster_config (google.cloud.container_v1beta1.types.PrivateClusterConfig): The desired private cluster configuration. - desired_intra_node_visibility_config (~.cluster_service.IntraNodeVisibilityConfig): + desired_intra_node_visibility_config (google.cloud.container_v1beta1.types.IntraNodeVisibilityConfig): The desired config of Intra-node visibility. - desired_default_snat_status (~.cluster_service.DefaultSnatStatus): + desired_default_snat_status (google.cloud.container_v1beta1.types.DefaultSnatStatus): The desired status of whether to disable default sNAT for this cluster. - desired_cluster_telemetry (~.cluster_service.ClusterTelemetry): + desired_cluster_telemetry (google.cloud.container_v1beta1.types.ClusterTelemetry): The desired telemetry integration for the cluster. - desired_release_channel (~.cluster_service.ReleaseChannel): + desired_release_channel (google.cloud.container_v1beta1.types.ReleaseChannel): The desired release channel configuration. - desired_tpu_config (~.cluster_service.TpuConfig): + desired_tpu_config (google.cloud.container_v1beta1.types.TpuConfig): The desired Cloud TPU configuration. - desired_datapath_provider (~.cluster_service.DatapathProvider): + desired_datapath_provider (google.cloud.container_v1beta1.types.DatapathProvider): The desired datapath provider for the cluster. - desired_notification_config (~.cluster_service.NotificationConfig): + desired_notification_config (google.cloud.container_v1beta1.types.NotificationConfig): The desired notification configuration. desired_master_version (str): The Kubernetes version to change the master @@ -1858,13 +1858,13 @@ class ClusterUpdate(proto.Message): version - "1.X.Y-gke.N": picks an explicit Kubernetes version - "-": picks the default Kubernetes version - desired_database_encryption (~.cluster_service.DatabaseEncryption): + desired_database_encryption (google.cloud.container_v1beta1.types.DatabaseEncryption): Configuration of etcd encryption. - desired_workload_identity_config (~.cluster_service.WorkloadIdentityConfig): + desired_workload_identity_config (google.cloud.container_v1beta1.types.WorkloadIdentityConfig): Configuration for Workload Identity. - desired_shielded_nodes (~.cluster_service.ShieldedNodes): + desired_shielded_nodes (google.cloud.container_v1beta1.types.ShieldedNodes): Configuration for Shielded Nodes. - desired_master (~.cluster_service.Master): + desired_master (google.cloud.container_v1beta1.types.Master): Configuration for master components. """ @@ -1972,9 +1972,9 @@ class Operation(proto.Message): `zone `__ in which the operation is taking place. This field is deprecated, use location instead. - operation_type (~.cluster_service.Operation.Type): + operation_type (google.cloud.container_v1beta1.types.Operation.Type): The operation type. - status (~.cluster_service.Operation.Status): + status (google.cloud.container_v1beta1.types.Operation.Status): The current status of the operation. detail (str): Detailed operation progress, if available. @@ -2001,16 +2001,16 @@ class Operation(proto.Message): [Output only] The time the operation completed, in `RFC3339 `__ text format. - progress (~.cluster_service.OperationProgress): + progress (google.cloud.container_v1beta1.types.OperationProgress): Output only. [Output only] Progress information for an operation. - cluster_conditions (Sequence[~.cluster_service.StatusCondition]): + cluster_conditions (Sequence[google.cloud.container_v1beta1.types.StatusCondition]): Which conditions caused the current cluster state. Deprecated. Use field error instead. - nodepool_conditions (Sequence[~.cluster_service.StatusCondition]): + nodepool_conditions (Sequence[google.cloud.container_v1beta1.types.StatusCondition]): Which conditions caused the current node pool state. Deprecated. Use field error instead. - error (~.gr_status.Status): + error (google.rpc.status_pb2.Status): The error result of the operation in case of failure. """ @@ -2086,15 +2086,15 @@ class OperationProgress(proto.Message): A non-parameterized string describing an operation stage. Unset for single-stage operations. - status (~.cluster_service.Operation.Status): + status (google.cloud.container_v1beta1.types.Operation.Status): Status of an operation stage. Unset for single-stage operations. - metrics (Sequence[~.cluster_service.OperationProgress.Metric]): + metrics (Sequence[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[~.cluster_service.OperationProgress]): + stages (Sequence[google.cloud.container_v1beta1.types.OperationProgress]): Substages of an operation or a stage. """ @@ -2146,7 +2146,7 @@ class CreateClusterRequest(proto.Message): `zone `__ in which the cluster resides. This field has been deprecated and replaced by the parent field. - cluster (~.cluster_service.Cluster): + cluster (google.cloud.container_v1beta1.types.Cluster): Required. A `cluster resource `__ parent (str): @@ -2216,7 +2216,7 @@ class UpdateClusterRequest(proto.Message): Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. - update (~.cluster_service.ClusterUpdate): + update (google.cloud.container_v1beta1.types.ClusterUpdate): Required. A description of the update. name (str): The name (project, location, cluster) of the cluster to @@ -2282,20 +2282,20 @@ class UpdateNodePoolRequest(proto.Message): the locations for a node pool will result in nodes being either created or removed from the node pool, depending on whether locations are being added or removed. - workload_metadata_config (~.cluster_service.WorkloadMetadataConfig): + workload_metadata_config (google.cloud.container_v1beta1.types.WorkloadMetadataConfig): The desired workload metadata config for the node pool. name (str): The name (project, location, cluster, node pool) of the node pool to update. Specified in the format ``projects/*/locations/*/clusters/*/nodePools/*``. - upgrade_settings (~.cluster_service.NodePool.UpgradeSettings): + upgrade_settings (google.cloud.container_v1beta1.types.NodePool.UpgradeSettings): Upgrade settings control disruption and speed of the upgrade. - linux_node_config (~.cluster_service.LinuxNodeConfig): + linux_node_config (google.cloud.container_v1beta1.types.LinuxNodeConfig): Parameters that can be configured on Linux nodes. - kubelet_config (~.cluster_service.NodeKubeletConfig): + kubelet_config (google.cloud.container_v1beta1.types.NodeKubeletConfig): Node kubelet configs. """ @@ -2354,7 +2354,7 @@ class SetNodePoolAutoscalingRequest(proto.Message): Required. Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field. - autoscaling (~.cluster_service.NodePoolAutoscaling): + autoscaling (google.cloud.container_v1beta1.types.NodePoolAutoscaling): Required. Autoscaling configuration for the node pool. name (str): @@ -2498,7 +2498,7 @@ class SetAddonsConfigRequest(proto.Message): Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. - addons_config (~.cluster_service.AddonsConfig): + addons_config (google.cloud.container_v1beta1.types.AddonsConfig): Required. The desired configurations for the various addons available to run in the cluster. name (str): @@ -2631,10 +2631,10 @@ class SetMasterAuthRequest(proto.Message): Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. - action (~.cluster_service.SetMasterAuthRequest.Action): + action (google.cloud.container_v1beta1.types.SetMasterAuthRequest.Action): Required. The exact form of action to be taken on the master auth. - update (~.cluster_service.MasterAuth): + update (google.cloud.container_v1beta1.types.MasterAuth): Required. A description of the update. name (str): The name (project, location, cluster) of the cluster to set @@ -2728,7 +2728,7 @@ class ListClustersResponse(proto.Message): r"""ListClustersResponse is the result of ListClustersRequest. Attributes: - clusters (Sequence[~.cluster_service.Cluster]): + clusters (Sequence[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]): @@ -2843,7 +2843,7 @@ class ListOperationsResponse(proto.Message): ListOperationsRequest. Attributes: - operations (Sequence[~.cluster_service.Operation]): + operations (Sequence[google.cloud.container_v1beta1.types.Operation]): A list of operations in the project in the specified zone. missing_zones (Sequence[str]): @@ -2901,7 +2901,7 @@ class ServerConfig(proto.Message): valid_master_versions (Sequence[str]): List of valid master versions, in descending order. - channels (Sequence[~.cluster_service.ServerConfig.ReleaseChannelConfig]): + channels (Sequence[google.cloud.container_v1beta1.types.ServerConfig.ReleaseChannelConfig]): List of release channel configurations. """ @@ -2910,13 +2910,13 @@ class ReleaseChannelConfig(proto.Message): channel. Attributes: - channel (~.cluster_service.ReleaseChannel.Channel): + channel (google.cloud.container_v1beta1.types.ReleaseChannel.Channel): The release channel this configuration applies to. default_version (str): The default version for newly created clusters on the channel. - available_versions (Sequence[~.cluster_service.ServerConfig.ReleaseChannelConfig.AvailableVersion]): + available_versions (Sequence[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]): @@ -2983,7 +2983,7 @@ class CreateNodePoolRequest(proto.Message): Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. - node_pool (~.cluster_service.NodePool): + node_pool (google.cloud.container_v1beta1.types.NodePool): Required. The node pool to create. parent (str): The parent (project, location, cluster id) where the node @@ -3128,7 +3128,7 @@ class NodePool(proto.Message): Attributes: name (str): The name of the node pool. - config (~.cluster_service.NodeConfig): + config (google.cloud.container_v1beta1.types.NodeConfig): The node configuration of the pool. initial_node_count (int): The initial node count for the pool. You must ensure that @@ -3155,30 +3155,30 @@ class NodePool(proto.Message): [Output only] The resource URLs of the `managed instance groups `__ associated with this node pool. - status (~.cluster_service.NodePool.Status): + status (google.cloud.container_v1beta1.types.NodePool.Status): [Output only] The status of the nodes in this pool instance. status_message (str): [Output only] Deprecated. Use conditions instead. Additional information about the current status of this node pool instance, if available. - autoscaling (~.cluster_service.NodePoolAutoscaling): + autoscaling (google.cloud.container_v1beta1.types.NodePoolAutoscaling): Autoscaler configuration for this NodePool. Autoscaler is enabled only if a valid configuration is present. - management (~.cluster_service.NodeManagement): + management (google.cloud.container_v1beta1.types.NodeManagement): NodeManagement configuration for this NodePool. - max_pods_constraint (~.cluster_service.MaxPodsConstraint): + max_pods_constraint (google.cloud.container_v1beta1.types.MaxPodsConstraint): The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. - conditions (Sequence[~.cluster_service.StatusCondition]): + conditions (Sequence[google.cloud.container_v1beta1.types.StatusCondition]): Which conditions caused the current node pool state. pod_ipv4_cidr_size (int): [Output only] The pod CIDR block size per node in this node pool. - upgrade_settings (~.cluster_service.NodePool.UpgradeSettings): + upgrade_settings (google.cloud.container_v1beta1.types.NodePool.UpgradeSettings): Upgrade settings control disruption and speed of the upgrade. """ @@ -3281,7 +3281,7 @@ class NodeManagement(proto.Message): auto_repair (bool): Whether the nodes will be automatically repaired. - upgrade_options (~.cluster_service.AutoUpgradeOptions): + upgrade_options (google.cloud.container_v1beta1.types.AutoUpgradeOptions): Specifies the Auto Upgrade knobs for the node pool. """ @@ -3320,7 +3320,7 @@ class MaintenancePolicy(proto.Message): for the cluster. Attributes: - window (~.cluster_service.MaintenanceWindow): + window (google.cloud.container_v1beta1.types.MaintenanceWindow): Specifies the maintenance window in which maintenance may be performed. resource_version (str): @@ -3343,16 +3343,16 @@ class MaintenanceWindow(proto.Message): for the cluster. Attributes: - daily_maintenance_window (~.cluster_service.DailyMaintenanceWindow): + daily_maintenance_window (google.cloud.container_v1beta1.types.DailyMaintenanceWindow): DailyMaintenanceWindow specifies a daily maintenance operation window. - recurring_window (~.cluster_service.RecurringTimeWindow): + recurring_window (google.cloud.container_v1beta1.types.RecurringTimeWindow): RecurringWindow specifies some number of recurring time periods for maintenance to occur. The time windows may be overlapping. If no maintenance windows are set, maintenance can occur at any time. - maintenance_exclusions (Sequence[~.cluster_service.MaintenanceWindow.MaintenanceExclusionsEntry]): + maintenance_exclusions (Sequence[google.cloud.container_v1beta1.types.MaintenanceWindow.MaintenanceExclusionsEntry]): Exceptions to maintenance window. Non- mergency maintenance should not occur in these windows. @@ -3375,9 +3375,9 @@ class TimeWindow(proto.Message): r"""Represents an arbitrary window of time. Attributes: - start_time (~.timestamp.Timestamp): + start_time (google.protobuf.timestamp_pb2.Timestamp): The time that the window first starts. - end_time (~.timestamp.Timestamp): + end_time (google.protobuf.timestamp_pb2.Timestamp): The time that the window ends. The end time should take place after the start time. """ @@ -3391,7 +3391,7 @@ class RecurringTimeWindow(proto.Message): r"""Represents an arbitrary window of time that recurs. Attributes: - window (~.cluster_service.TimeWindow): + window (google.cloud.container_v1beta1.types.TimeWindow): The window of the first recurrence. recurrence (str): An RRULE @@ -3481,7 +3481,7 @@ class SetNodePoolManagementRequest(proto.Message): Required. Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field. - management (~.cluster_service.NodeManagement): + management (google.cloud.container_v1beta1.types.NodeManagement): Required. NodeManagement configuration for the node pool. name (str): @@ -3595,7 +3595,7 @@ class ListNodePoolsResponse(proto.Message): r"""ListNodePoolsResponse is the result of ListNodePoolsRequest. Attributes: - node_pools (Sequence[~.cluster_service.NodePool]): + node_pools (Sequence[google.cloud.container_v1beta1.types.NodePool]): A list of node pools for a cluster. """ @@ -3612,12 +3612,12 @@ class ClusterAutoscaling(proto.Message): enable_node_autoprovisioning (bool): Enables automatic node pool creation and deletion. - resource_limits (Sequence[~.cluster_service.ResourceLimit]): + resource_limits (Sequence[google.cloud.container_v1beta1.types.ResourceLimit]): Contains global constraints regarding minimum and maximum amount of resources in the cluster. - autoscaling_profile (~.cluster_service.ClusterAutoscaling.AutoscalingProfile): + autoscaling_profile (google.cloud.container_v1beta1.types.ClusterAutoscaling.AutoscalingProfile): Defines autoscaling behaviour. - autoprovisioning_node_pool_defaults (~.cluster_service.AutoprovisioningNodePoolDefaults): + autoprovisioning_node_pool_defaults (google.cloud.container_v1beta1.types.AutoprovisioningNodePoolDefaults): AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP. autoprovisioning_locations (Sequence[str]): @@ -3675,10 +3675,10 @@ class AutoprovisioningNodePoolDefaults(proto.Message): address of the Service Account; otherwise, if no Service Account is specified, the "default" service account is used. - upgrade_settings (~.cluster_service.NodePool.UpgradeSettings): + upgrade_settings (google.cloud.container_v1beta1.types.NodePool.UpgradeSettings): Upgrade settings control disruption and speed of the upgrade. - management (~.cluster_service.NodeManagement): + management (google.cloud.container_v1beta1.types.NodeManagement): NodeManagement configuration for this NodePool. min_cpu_platform (str): @@ -3702,7 +3702,7 @@ class AutoprovisioningNodePoolDefaults(proto.Message): If unspecified, the default disk type is 'pd- standard' - shielded_instance_config (~.cluster_service.ShieldedInstanceConfig): + shielded_instance_config (google.cloud.container_v1beta1.types.ShieldedInstanceConfig): Shielded Instance options. boot_disk_kms_key (str): The Customer Managed Encryption Key used to encrypt the boot @@ -3809,7 +3809,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 (Sequence[~.cluster_service.SetLabelsRequest.ResourceLabelsEntry]): + resource_labels (Sequence[google.cloud.container_v1beta1.types.SetLabelsRequest.ResourceLabelsEntry]): Required. The labels to set for that cluster. label_fingerprint (str): Required. The fingerprint of the previous set of labels for @@ -3977,11 +3977,11 @@ class WorkloadMetadataConfig(proto.Message): expose to workloads on the node pool. Attributes: - node_metadata (~.cluster_service.WorkloadMetadataConfig.NodeMetadata): + node_metadata (google.cloud.container_v1beta1.types.WorkloadMetadataConfig.NodeMetadata): NodeMetadata is the configuration for how to expose metadata to the workloads running on the node. - mode (~.cluster_service.WorkloadMetadataConfig.Mode): + mode (google.cloud.container_v1beta1.types.WorkloadMetadataConfig.Mode): Mode is the configuration for how to expose metadata to workloads running on the node pool. """ @@ -4028,7 +4028,7 @@ class SetNetworkPolicyRequest(proto.Message): Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. - network_policy (~.cluster_service.NetworkPolicy): + network_policy (google.cloud.container_v1beta1.types.NetworkPolicy): Required. Configuration options for the NetworkPolicy feature. name (str): @@ -4063,7 +4063,7 @@ class SetMaintenancePolicyRequest(proto.Message): in which the cluster resides. cluster_id (str): Required. The name of the cluster to update. - maintenance_policy (~.cluster_service.MaintenancePolicy): + maintenance_policy (google.cloud.container_v1beta1.types.MaintenancePolicy): Required. The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy. @@ -4104,7 +4104,7 @@ class ListLocationsResponse(proto.Message): and their recommendation state. Attributes: - locations (Sequence[~.cluster_service.Location]): + locations (Sequence[google.cloud.container_v1beta1.types.Location]): A full list of GKE locations. next_page_token (str): Only return ListLocationsResponse that occur after the @@ -4128,7 +4128,7 @@ class Location(proto.Message): recommended for GKE cluster scheduling. Attributes: - type_ (~.cluster_service.Location.LocationType): + type_ (google.cloud.container_v1beta1.types.Location.LocationType): Contains the type of location this Location is for. Regional or Zonal. name (str): @@ -4157,13 +4157,13 @@ class StatusCondition(proto.Message): certain status (e.g., ERROR or DEGRADED). Attributes: - code (~.cluster_service.StatusCondition.Code): + code (google.cloud.container_v1beta1.types.StatusCondition.Code): Machine-friendly representation of the condition Deprecated. Use canonical_code instead. message (str): Human-friendly representation of the condition - canonical_code (~.gr_code.Code): + canonical_code (google.rpc.code_pb2.Code): Canonical code of the condition. """ @@ -4202,13 +4202,13 @@ class NetworkConfig(proto.Message): Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network. - default_snat_status (~.cluster_service.DefaultSnatStatus): + default_snat_status (google.cloud.container_v1beta1.types.DefaultSnatStatus): Whether the cluster disables default in-node sNAT rules. In-node sNAT rules will be disabled when default_snat_status is disabled. When disabled is set to false, default IP masquerade rules will be applied to the nodes to prevent sNAT on cluster internal traffic. - datapath_provider (~.cluster_service.DatapathProvider): + datapath_provider (google.cloud.container_v1beta1.types.DatapathProvider): The desired datapath provider for this cluster. By default, uses the IPTables-based kube-proxy implementation. @@ -4268,7 +4268,7 @@ class ListUsableSubnetworksResponse(proto.Message): ListUsableSubnetworksRequest. Attributes: - subnetworks (Sequence[~.cluster_service.UsableSubnetwork]): + subnetworks (Sequence[google.cloud.container_v1beta1.types.UsableSubnetwork]): A list of usable subnetworks in the specified network project. next_page_token (str): @@ -4301,7 +4301,7 @@ class UsableSubnetworkSecondaryRange(proto.Message): ip_cidr_range (str): The range of IP addresses belonging to this subnetwork secondary range. - status (~.cluster_service.UsableSubnetworkSecondaryRange.Status): + status (google.cloud.container_v1beta1.types.UsableSubnetworkSecondaryRange.Status): This field is to determine the status of the secondary range programmably. """ @@ -4337,7 +4337,7 @@ class UsableSubnetwork(proto.Message): ip_cidr_range (str): The range of internal addresses that are owned by this subnetwork. - secondary_ip_ranges (Sequence[~.cluster_service.UsableSubnetworkSecondaryRange]): + secondary_ip_ranges (Sequence[google.cloud.container_v1beta1.types.UsableSubnetworkSecondaryRange]): Secondary IP ranges. status_message (str): A human readable status message representing the reasons for @@ -4437,7 +4437,7 @@ class DatabaseEncryption(proto.Message): r"""Configuration of etcd encryption. Attributes: - state (~.cluster_service.DatabaseEncryption.State): + state (google.cloud.container_v1beta1.types.DatabaseEncryption.State): Denotes the state of etcd encryption. key_name (str): Name of CloudKMS key to use for the @@ -4461,7 +4461,7 @@ class ResourceUsageExportConfig(proto.Message): r"""Configuration for exporting cluster resource usages. Attributes: - bigquery_destination (~.cluster_service.ResourceUsageExportConfig.BigQueryDestination): + bigquery_destination (google.cloud.container_v1beta1.types.ResourceUsageExportConfig.BigQueryDestination): Configuration to use BigQuery as usage export destination. enable_network_egress_metering (bool): @@ -4469,7 +4469,7 @@ class ResourceUsageExportConfig(proto.Message): this cluster. If enabled, a daemonset will be created in the cluster to meter network egress traffic. - consumption_metering_config (~.cluster_service.ResourceUsageExportConfig.ConsumptionMeteringConfig): + consumption_metering_config (google.cloud.container_v1beta1.types.ResourceUsageExportConfig.ConsumptionMeteringConfig): Configuration to enable resource consumption metering. """ @@ -4637,7 +4637,7 @@ class GetJSONWebKeysResponse(proto.Message): specififed in rfc 7517 Attributes: - keys (Sequence[~.cluster_service.Jwk]): + keys (Sequence[google.cloud.container_v1beta1.types.Jwk]): The public component of the keys used by the cluster to sign token requests. """ @@ -4653,7 +4653,7 @@ class ReleaseChannel(proto.Message): auto-upgrade defaults to true and cannot be disabled. Attributes: - channel (~.cluster_service.ReleaseChannel.Channel): + channel (google.cloud.container_v1beta1.types.ReleaseChannel.Channel): channel specifies which release channel the cluster is subscribed to. """ @@ -4698,7 +4698,7 @@ class NotificationConfig(proto.Message): r"""NotificationConfig is the configuration of notifications. Attributes: - pubsub (~.cluster_service.NotificationConfig.PubSub): + pubsub (google.cloud.container_v1beta1.types.NotificationConfig.PubSub): Notification config for Pub/Sub. """ @@ -4739,13 +4739,13 @@ class UpgradeEvent(proto.Message): cluster server when a resource is upgrading. Attributes: - resource_type (~.cluster_service.UpgradeResourceType): + resource_type (google.cloud.container_v1beta1.types.UpgradeResourceType): Required. The resource type that is upgrading. operation (str): Required. The operation associated with this upgrade. - operation_start_time (~.timestamp.Timestamp): + operation_start_time (google.protobuf.timestamp_pb2.Timestamp): Required. The time when the operation was started. current_version (str): diff --git a/synth.metadata b/synth.metadata index 30aaeb59..971abe0e 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-container.git", - "sha": "01bc3539364e40247eabd11684f07089da59875a" + "sha": "ba7841c5535afcec202e21073b42f2aa407b1a5e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "dd372aa22ded7a8ba6f0e03a80e06358a3fa0907", - "internalRef": "347055288" + "sha": "20712b8fe95001b312f62c6c5f33e3e3ec92cfaf", + "internalRef": "354996675" } }, { @@ -96,8 +96,10 @@ "docs/_static/custom.css", "docs/_templates/layout.html", "docs/conf.py", + "docs/container_v1/cluster_manager.rst", "docs/container_v1/services.rst", "docs/container_v1/types.rst", + "docs/container_v1beta1/cluster_manager.rst", "docs/container_v1beta1/services.rst", "docs/container_v1beta1/types.rst", "docs/multiprocessing.rst", diff --git a/tests/unit/gapic/container_v1/test_cluster_manager.py b/tests/unit/gapic/container_v1/test_cluster_manager.py index 2df46f62..54867bbb 100644 --- a/tests/unit/gapic/container_v1/test_cluster_manager.py +++ b/tests/unit/gapic/container_v1/test_cluster_manager.py @@ -85,8 +85,21 @@ def test__get_default_mtls_endpoint(): ) +def test_cluster_manager_client_from_service_account_info(): + creds = credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = ClusterManagerClient.from_service_account_info(info) + assert client.transport._credentials == creds + + assert client.transport._host == "container.googleapis.com:443" + + @pytest.mark.parametrize( - "client_class", [ClusterManagerClient, ClusterManagerAsyncClient] + "client_class", [ClusterManagerClient, ClusterManagerAsyncClient,] ) def test_cluster_manager_client_from_service_account_file(client_class): creds = credentials.AnonymousCredentials() @@ -105,7 +118,10 @@ def test_cluster_manager_client_from_service_account_file(client_class): def test_cluster_manager_client_get_transport_class(): transport = ClusterManagerClient.get_transport_class() - assert transport == transports.ClusterManagerGrpcTransport + available_transports = [ + transports.ClusterManagerGrpcTransport, + ] + assert transport in available_transports transport = ClusterManagerClient.get_transport_class("grpc") assert transport == transports.ClusterManagerGrpcTransport @@ -156,7 +172,7 @@ def test_cluster_manager_client_client_options( credentials_file=None, host="squid.clam.whelk", scopes=None, - ssl_channel_credentials=None, + client_cert_source_for_mtls=None, quota_project_id=None, client_info=transports.base.DEFAULT_CLIENT_INFO, ) @@ -172,7 +188,7 @@ def test_cluster_manager_client_client_options( credentials_file=None, host=client.DEFAULT_ENDPOINT, scopes=None, - ssl_channel_credentials=None, + client_cert_source_for_mtls=None, quota_project_id=None, client_info=transports.base.DEFAULT_CLIENT_INFO, ) @@ -188,7 +204,7 @@ def test_cluster_manager_client_client_options( credentials_file=None, host=client.DEFAULT_MTLS_ENDPOINT, scopes=None, - ssl_channel_credentials=None, + client_cert_source_for_mtls=None, quota_project_id=None, client_info=transports.base.DEFAULT_CLIENT_INFO, ) @@ -216,7 +232,7 @@ def test_cluster_manager_client_client_options( credentials_file=None, host=client.DEFAULT_ENDPOINT, scopes=None, - ssl_channel_credentials=None, + client_cert_source_for_mtls=None, quota_project_id="octopus", client_info=transports.base.DEFAULT_CLIENT_INFO, ) @@ -267,29 +283,25 @@ def test_cluster_manager_client_mtls_env_auto( client_cert_source=client_cert_source_callback ) with mock.patch.object(transport_class, "__init__") as patched: - ssl_channel_creds = mock.Mock() - with mock.patch( - "grpc.ssl_channel_credentials", return_value=ssl_channel_creds - ): - patched.return_value = None - client = client_class(client_options=options) + patched.return_value = None + client = client_class(client_options=options) - if use_client_cert_env == "false": - expected_ssl_channel_creds = None - expected_host = client.DEFAULT_ENDPOINT - else: - expected_ssl_channel_creds = ssl_channel_creds - expected_host = client.DEFAULT_MTLS_ENDPOINT + if use_client_cert_env == "false": + expected_client_cert_source = None + expected_host = client.DEFAULT_ENDPOINT + else: + expected_client_cert_source = client_cert_source_callback + expected_host = client.DEFAULT_MTLS_ENDPOINT - patched.assert_called_once_with( - credentials=None, - credentials_file=None, - host=expected_host, - scopes=None, - ssl_channel_credentials=expected_ssl_channel_creds, - quota_project_id=None, - client_info=transports.base.DEFAULT_CLIENT_INFO, - ) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + ) # Check the case ADC client cert is provided. Whether client cert is used depends on # GOOGLE_API_USE_CLIENT_CERTIFICATE value. @@ -298,66 +310,53 @@ def test_cluster_manager_client_mtls_env_auto( ): with mock.patch.object(transport_class, "__init__") as patched: with mock.patch( - "google.auth.transport.grpc.SslCredentials.__init__", return_value=None + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, ): with mock.patch( - "google.auth.transport.grpc.SslCredentials.is_mtls", - new_callable=mock.PropertyMock, - ) as is_mtls_mock: - with mock.patch( - "google.auth.transport.grpc.SslCredentials.ssl_credentials", - new_callable=mock.PropertyMock, - ) as ssl_credentials_mock: - if use_client_cert_env == "false": - is_mtls_mock.return_value = False - ssl_credentials_mock.return_value = None - expected_host = client.DEFAULT_ENDPOINT - expected_ssl_channel_creds = None - else: - is_mtls_mock.return_value = True - ssl_credentials_mock.return_value = mock.Mock() - expected_host = client.DEFAULT_MTLS_ENDPOINT - expected_ssl_channel_creds = ( - ssl_credentials_mock.return_value - ) - - patched.return_value = None - client = client_class() - patched.assert_called_once_with( - credentials=None, - credentials_file=None, - host=expected_host, - scopes=None, - ssl_channel_credentials=expected_ssl_channel_creds, - quota_project_id=None, - client_info=transports.base.DEFAULT_CLIENT_INFO, - ) + "google.auth.transport.mtls.default_client_cert_source", + return_value=client_cert_source_callback, + ): + if use_client_cert_env == "false": + expected_host = client.DEFAULT_ENDPOINT + expected_client_cert_source = None + else: + expected_host = client.DEFAULT_MTLS_ENDPOINT + expected_client_cert_source = client_cert_source_callback - # Check the case client_cert_source and ADC client cert are not provided. - with mock.patch.dict( - os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} - ): - with mock.patch.object(transport_class, "__init__") as patched: - with mock.patch( - "google.auth.transport.grpc.SslCredentials.__init__", return_value=None - ): - with mock.patch( - "google.auth.transport.grpc.SslCredentials.is_mtls", - new_callable=mock.PropertyMock, - ) as is_mtls_mock: - is_mtls_mock.return_value = False patched.return_value = None client = client_class() patched.assert_called_once_with( credentials=None, credentials_file=None, - host=client.DEFAULT_ENDPOINT, + host=expected_host, scopes=None, - ssl_channel_credentials=None, + client_cert_source_for_mtls=expected_client_cert_source, quota_project_id=None, client_info=transports.base.DEFAULT_CLIENT_INFO, ) + # Check the case client_cert_source and ADC client cert are not provided. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + patched.return_value = None + client = client_class() + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client.DEFAULT_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + ) + @pytest.mark.parametrize( "client_class,transport_class,transport_name", @@ -383,7 +382,7 @@ def test_cluster_manager_client_client_options_scopes( credentials_file=None, host=client.DEFAULT_ENDPOINT, scopes=["1", "2"], - ssl_channel_credentials=None, + client_cert_source_for_mtls=None, quota_project_id=None, client_info=transports.base.DEFAULT_CLIENT_INFO, ) @@ -413,7 +412,7 @@ def test_cluster_manager_client_client_options_credentials_file( credentials_file="credentials.json", host=client.DEFAULT_ENDPOINT, scopes=None, - ssl_channel_credentials=None, + client_cert_source_for_mtls=None, quota_project_id=None, client_info=transports.base.DEFAULT_CLIENT_INFO, ) @@ -432,7 +431,7 @@ def test_cluster_manager_client_client_options_from_dict(): credentials_file=None, host="squid.clam.whelk", scopes=None, - ssl_channel_credentials=None, + client_cert_source_for_mtls=None, quota_project_id=None, client_info=transports.base.DEFAULT_CLIENT_INFO, ) @@ -9094,6 +9093,51 @@ def test_cluster_manager_transport_auth_adc(): ) +@pytest.mark.parametrize( + "transport_class", + [ + transports.ClusterManagerGrpcTransport, + transports.ClusterManagerGrpcAsyncIOTransport, + ], +) +def test_cluster_manager_grpc_transport_client_cert_source_for_mtls(transport_class): + cred = credentials.AnonymousCredentials() + + # Check ssl_channel_credentials is used if provided. + with mock.patch.object(transport_class, "create_channel") as mock_create_channel: + mock_ssl_channel_creds = mock.Mock() + transport_class( + host="squid.clam.whelk", + credentials=cred, + ssl_channel_credentials=mock_ssl_channel_creds, + ) + mock_create_channel.assert_called_once_with( + "squid.clam.whelk:443", + credentials=cred, + credentials_file=None, + scopes=("https://www.googleapis.com/auth/cloud-platform",), + ssl_credentials=mock_ssl_channel_creds, + quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], + ) + + # Check if ssl_channel_credentials is not provided, then client_cert_source_for_mtls + # is used. + with mock.patch.object(transport_class, "create_channel", return_value=mock.Mock()): + with mock.patch("grpc.ssl_channel_credentials") as mock_ssl_cred: + transport_class( + credentials=cred, + client_cert_source_for_mtls=client_cert_source_callback, + ) + expected_cert, expected_key = client_cert_source_callback() + mock_ssl_cred.assert_called_once_with( + certificate_chain=expected_cert, private_key=expected_key + ) + + def test_cluster_manager_host_no_port(): client = ClusterManagerClient( credentials=credentials.AnonymousCredentials(), @@ -9115,7 +9159,7 @@ def test_cluster_manager_host_with_port(): def test_cluster_manager_grpc_transport_channel(): - channel = grpc.insecure_channel("http://localhost/") + channel = grpc.secure_channel("http://localhost/", grpc.local_channel_credentials()) # Check that channel is used if provided. transport = transports.ClusterManagerGrpcTransport( @@ -9127,7 +9171,7 @@ def test_cluster_manager_grpc_transport_channel(): def test_cluster_manager_grpc_asyncio_transport_channel(): - channel = aio.insecure_channel("http://localhost/") + channel = aio.secure_channel("http://localhost/", grpc.local_channel_credentials()) # Check that channel is used if provided. transport = transports.ClusterManagerGrpcAsyncIOTransport( @@ -9138,6 +9182,8 @@ def test_cluster_manager_grpc_asyncio_transport_channel(): assert transport._ssl_channel_credentials == None +# Remove this test when deprecated arguments (api_mtls_endpoint, client_cert_source) are +# removed from grpc/grpc_asyncio transport constructor. @pytest.mark.parametrize( "transport_class", [ @@ -9152,7 +9198,7 @@ def test_cluster_manager_transport_channel_mtls_with_client_cert_source( "grpc.ssl_channel_credentials", autospec=True ) as grpc_ssl_channel_cred: with mock.patch.object( - transport_class, "create_channel", autospec=True + transport_class, "create_channel" ) as grpc_create_channel: mock_ssl_cred = mock.Mock() grpc_ssl_channel_cred.return_value = mock_ssl_cred @@ -9190,6 +9236,8 @@ def test_cluster_manager_transport_channel_mtls_with_client_cert_source( assert transport._ssl_channel_credentials == mock_ssl_cred +# Remove this test when deprecated arguments (api_mtls_endpoint, client_cert_source) are +# removed from grpc/grpc_asyncio transport constructor. @pytest.mark.parametrize( "transport_class", [ @@ -9205,7 +9253,7 @@ def test_cluster_manager_transport_channel_mtls_with_adc(transport_class): ssl_credentials=mock.PropertyMock(return_value=mock_ssl_cred), ): with mock.patch.object( - transport_class, "create_channel", autospec=True + transport_class, "create_channel" ) as grpc_create_channel: mock_grpc_channel = mock.Mock() grpc_create_channel.return_value = mock_grpc_channel diff --git a/tests/unit/gapic/container_v1beta1/test_cluster_manager.py b/tests/unit/gapic/container_v1beta1/test_cluster_manager.py index ba526cb9..6a070c4a 100644 --- a/tests/unit/gapic/container_v1beta1/test_cluster_manager.py +++ b/tests/unit/gapic/container_v1beta1/test_cluster_manager.py @@ -90,8 +90,21 @@ def test__get_default_mtls_endpoint(): ) +def test_cluster_manager_client_from_service_account_info(): + creds = credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = ClusterManagerClient.from_service_account_info(info) + assert client.transport._credentials == creds + + assert client.transport._host == "container.googleapis.com:443" + + @pytest.mark.parametrize( - "client_class", [ClusterManagerClient, ClusterManagerAsyncClient] + "client_class", [ClusterManagerClient, ClusterManagerAsyncClient,] ) def test_cluster_manager_client_from_service_account_file(client_class): creds = credentials.AnonymousCredentials() @@ -110,7 +123,10 @@ def test_cluster_manager_client_from_service_account_file(client_class): def test_cluster_manager_client_get_transport_class(): transport = ClusterManagerClient.get_transport_class() - assert transport == transports.ClusterManagerGrpcTransport + available_transports = [ + transports.ClusterManagerGrpcTransport, + ] + assert transport in available_transports transport = ClusterManagerClient.get_transport_class("grpc") assert transport == transports.ClusterManagerGrpcTransport @@ -161,7 +177,7 @@ def test_cluster_manager_client_client_options( credentials_file=None, host="squid.clam.whelk", scopes=None, - ssl_channel_credentials=None, + client_cert_source_for_mtls=None, quota_project_id=None, client_info=transports.base.DEFAULT_CLIENT_INFO, ) @@ -177,7 +193,7 @@ def test_cluster_manager_client_client_options( credentials_file=None, host=client.DEFAULT_ENDPOINT, scopes=None, - ssl_channel_credentials=None, + client_cert_source_for_mtls=None, quota_project_id=None, client_info=transports.base.DEFAULT_CLIENT_INFO, ) @@ -193,7 +209,7 @@ def test_cluster_manager_client_client_options( credentials_file=None, host=client.DEFAULT_MTLS_ENDPOINT, scopes=None, - ssl_channel_credentials=None, + client_cert_source_for_mtls=None, quota_project_id=None, client_info=transports.base.DEFAULT_CLIENT_INFO, ) @@ -221,7 +237,7 @@ def test_cluster_manager_client_client_options( credentials_file=None, host=client.DEFAULT_ENDPOINT, scopes=None, - ssl_channel_credentials=None, + client_cert_source_for_mtls=None, quota_project_id="octopus", client_info=transports.base.DEFAULT_CLIENT_INFO, ) @@ -272,29 +288,25 @@ def test_cluster_manager_client_mtls_env_auto( client_cert_source=client_cert_source_callback ) with mock.patch.object(transport_class, "__init__") as patched: - ssl_channel_creds = mock.Mock() - with mock.patch( - "grpc.ssl_channel_credentials", return_value=ssl_channel_creds - ): - patched.return_value = None - client = client_class(client_options=options) + patched.return_value = None + client = client_class(client_options=options) - if use_client_cert_env == "false": - expected_ssl_channel_creds = None - expected_host = client.DEFAULT_ENDPOINT - else: - expected_ssl_channel_creds = ssl_channel_creds - expected_host = client.DEFAULT_MTLS_ENDPOINT + if use_client_cert_env == "false": + expected_client_cert_source = None + expected_host = client.DEFAULT_ENDPOINT + else: + expected_client_cert_source = client_cert_source_callback + expected_host = client.DEFAULT_MTLS_ENDPOINT - patched.assert_called_once_with( - credentials=None, - credentials_file=None, - host=expected_host, - scopes=None, - ssl_channel_credentials=expected_ssl_channel_creds, - quota_project_id=None, - client_info=transports.base.DEFAULT_CLIENT_INFO, - ) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + ) # Check the case ADC client cert is provided. Whether client cert is used depends on # GOOGLE_API_USE_CLIENT_CERTIFICATE value. @@ -303,66 +315,53 @@ def test_cluster_manager_client_mtls_env_auto( ): with mock.patch.object(transport_class, "__init__") as patched: with mock.patch( - "google.auth.transport.grpc.SslCredentials.__init__", return_value=None + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, ): with mock.patch( - "google.auth.transport.grpc.SslCredentials.is_mtls", - new_callable=mock.PropertyMock, - ) as is_mtls_mock: - with mock.patch( - "google.auth.transport.grpc.SslCredentials.ssl_credentials", - new_callable=mock.PropertyMock, - ) as ssl_credentials_mock: - if use_client_cert_env == "false": - is_mtls_mock.return_value = False - ssl_credentials_mock.return_value = None - expected_host = client.DEFAULT_ENDPOINT - expected_ssl_channel_creds = None - else: - is_mtls_mock.return_value = True - ssl_credentials_mock.return_value = mock.Mock() - expected_host = client.DEFAULT_MTLS_ENDPOINT - expected_ssl_channel_creds = ( - ssl_credentials_mock.return_value - ) - - patched.return_value = None - client = client_class() - patched.assert_called_once_with( - credentials=None, - credentials_file=None, - host=expected_host, - scopes=None, - ssl_channel_credentials=expected_ssl_channel_creds, - quota_project_id=None, - client_info=transports.base.DEFAULT_CLIENT_INFO, - ) + "google.auth.transport.mtls.default_client_cert_source", + return_value=client_cert_source_callback, + ): + if use_client_cert_env == "false": + expected_host = client.DEFAULT_ENDPOINT + expected_client_cert_source = None + else: + expected_host = client.DEFAULT_MTLS_ENDPOINT + expected_client_cert_source = client_cert_source_callback - # Check the case client_cert_source and ADC client cert are not provided. - with mock.patch.dict( - os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} - ): - with mock.patch.object(transport_class, "__init__") as patched: - with mock.patch( - "google.auth.transport.grpc.SslCredentials.__init__", return_value=None - ): - with mock.patch( - "google.auth.transport.grpc.SslCredentials.is_mtls", - new_callable=mock.PropertyMock, - ) as is_mtls_mock: - is_mtls_mock.return_value = False patched.return_value = None client = client_class() patched.assert_called_once_with( credentials=None, credentials_file=None, - host=client.DEFAULT_ENDPOINT, + host=expected_host, scopes=None, - ssl_channel_credentials=None, + client_cert_source_for_mtls=expected_client_cert_source, quota_project_id=None, client_info=transports.base.DEFAULT_CLIENT_INFO, ) + # Check the case client_cert_source and ADC client cert are not provided. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + patched.return_value = None + client = client_class() + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client.DEFAULT_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + ) + @pytest.mark.parametrize( "client_class,transport_class,transport_name", @@ -388,7 +387,7 @@ def test_cluster_manager_client_client_options_scopes( credentials_file=None, host=client.DEFAULT_ENDPOINT, scopes=["1", "2"], - ssl_channel_credentials=None, + client_cert_source_for_mtls=None, quota_project_id=None, client_info=transports.base.DEFAULT_CLIENT_INFO, ) @@ -418,7 +417,7 @@ def test_cluster_manager_client_client_options_credentials_file( credentials_file="credentials.json", host=client.DEFAULT_ENDPOINT, scopes=None, - ssl_channel_credentials=None, + client_cert_source_for_mtls=None, quota_project_id=None, client_info=transports.base.DEFAULT_CLIENT_INFO, ) @@ -437,7 +436,7 @@ def test_cluster_manager_client_client_options_from_dict(): credentials_file=None, host="squid.clam.whelk", scopes=None, - ssl_channel_credentials=None, + client_cert_source_for_mtls=None, quota_project_id=None, client_info=transports.base.DEFAULT_CLIENT_INFO, ) @@ -9414,6 +9413,51 @@ def test_cluster_manager_transport_auth_adc(): ) +@pytest.mark.parametrize( + "transport_class", + [ + transports.ClusterManagerGrpcTransport, + transports.ClusterManagerGrpcAsyncIOTransport, + ], +) +def test_cluster_manager_grpc_transport_client_cert_source_for_mtls(transport_class): + cred = credentials.AnonymousCredentials() + + # Check ssl_channel_credentials is used if provided. + with mock.patch.object(transport_class, "create_channel") as mock_create_channel: + mock_ssl_channel_creds = mock.Mock() + transport_class( + host="squid.clam.whelk", + credentials=cred, + ssl_channel_credentials=mock_ssl_channel_creds, + ) + mock_create_channel.assert_called_once_with( + "squid.clam.whelk:443", + credentials=cred, + credentials_file=None, + scopes=("https://www.googleapis.com/auth/cloud-platform",), + ssl_credentials=mock_ssl_channel_creds, + quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], + ) + + # Check if ssl_channel_credentials is not provided, then client_cert_source_for_mtls + # is used. + with mock.patch.object(transport_class, "create_channel", return_value=mock.Mock()): + with mock.patch("grpc.ssl_channel_credentials") as mock_ssl_cred: + transport_class( + credentials=cred, + client_cert_source_for_mtls=client_cert_source_callback, + ) + expected_cert, expected_key = client_cert_source_callback() + mock_ssl_cred.assert_called_once_with( + certificate_chain=expected_cert, private_key=expected_key + ) + + def test_cluster_manager_host_no_port(): client = ClusterManagerClient( credentials=credentials.AnonymousCredentials(), @@ -9435,7 +9479,7 @@ def test_cluster_manager_host_with_port(): def test_cluster_manager_grpc_transport_channel(): - channel = grpc.insecure_channel("http://localhost/") + channel = grpc.secure_channel("http://localhost/", grpc.local_channel_credentials()) # Check that channel is used if provided. transport = transports.ClusterManagerGrpcTransport( @@ -9447,7 +9491,7 @@ def test_cluster_manager_grpc_transport_channel(): def test_cluster_manager_grpc_asyncio_transport_channel(): - channel = aio.insecure_channel("http://localhost/") + channel = aio.secure_channel("http://localhost/", grpc.local_channel_credentials()) # Check that channel is used if provided. transport = transports.ClusterManagerGrpcAsyncIOTransport( @@ -9458,6 +9502,8 @@ def test_cluster_manager_grpc_asyncio_transport_channel(): assert transport._ssl_channel_credentials == None +# Remove this test when deprecated arguments (api_mtls_endpoint, client_cert_source) are +# removed from grpc/grpc_asyncio transport constructor. @pytest.mark.parametrize( "transport_class", [ @@ -9472,7 +9518,7 @@ def test_cluster_manager_transport_channel_mtls_with_client_cert_source( "grpc.ssl_channel_credentials", autospec=True ) as grpc_ssl_channel_cred: with mock.patch.object( - transport_class, "create_channel", autospec=True + transport_class, "create_channel" ) as grpc_create_channel: mock_ssl_cred = mock.Mock() grpc_ssl_channel_cred.return_value = mock_ssl_cred @@ -9510,6 +9556,8 @@ def test_cluster_manager_transport_channel_mtls_with_client_cert_source( assert transport._ssl_channel_credentials == mock_ssl_cred +# Remove this test when deprecated arguments (api_mtls_endpoint, client_cert_source) are +# removed from grpc/grpc_asyncio transport constructor. @pytest.mark.parametrize( "transport_class", [ @@ -9525,7 +9573,7 @@ def test_cluster_manager_transport_channel_mtls_with_adc(transport_class): ssl_credentials=mock.PropertyMock(return_value=mock_ssl_cred), ): with mock.patch.object( - transport_class, "create_channel", autospec=True + transport_class, "create_channel" ) as grpc_create_channel: mock_grpc_channel = mock.Mock() grpc_create_channel.return_value = mock_grpc_channel