From d24809b92da02ede757ccb73893523c78a29924c Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Wed, 20 Oct 2021 12:56:43 +0800 Subject: [PATCH] [AutoRelease] t2-hybridkubernetes-2021-10-04-45305 (#21037) * CodeGen from PR 15956 in Azure/azure-rest-api-specs New GA version changes - 2021-10-01 (#15956) * New GA api-version changes- 2021-01-01 * readme changes * readme changes * add systemdata definition * system data ref fix * system data ref fix * fix * fix * fix * remove empty patch section * revert patch section * lint fix * lint fix * lintfix * readme changes * Update readme.md * remove property bag from cc update example * Fixing listClusterUserCreds examples * hide creds * example file naming changes and clientProxy flag correction Co-authored-by: Siri Teja Reddy Kasireddy Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> * version,CHANGELOG * Update CHANGELOG.md Co-authored-by: SDKAuto Co-authored-by: Siri Teja Reddy Kasireddy Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: PythonSdkPipelines Co-authored-by: Yuchao Yan --- .../azure-mgmt-hybridkubernetes/CHANGELOG.md | 6 + .../azure-mgmt-hybridkubernetes/_meta.json | 11 +- .../mgmt/hybridkubernetes/_configuration.py | 2 +- .../mgmt/hybridkubernetes/_metadata.json | 4 +- .../azure/mgmt/hybridkubernetes/_version.py | 2 +- .../hybridkubernetes/aio/_configuration.py | 2 +- .../_connected_cluster_operations.py | 120 +++++++++++--- .../aio/operations/_operations.py | 4 +- .../mgmt/hybridkubernetes/models/__init__.py | 14 ++ .../_connected_kubernetes_client_enums.py | 7 + .../mgmt/hybridkubernetes/models/_models.py | 141 ++++++++++++++++- .../hybridkubernetes/models/_models_py3.py | 148 +++++++++++++++++- .../_connected_cluster_operations.py | 105 +++++++++++-- .../operations/_operations.py | 2 +- 14 files changed, 504 insertions(+), 64 deletions(-) diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/CHANGELOG.md b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/CHANGELOG.md index 9bd56bc98d61..49f81deb9e0b 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/CHANGELOG.md +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.1.0 (2021-10-20) + +**Features** + + - Added operation ConnectedClusterOperations.list_cluster_user_credential + ## 1.0.0 (2021-05-19) **Features** diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/_meta.json b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/_meta.json index 267624bb2fb4..defc8cf9c4ab 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/_meta.json +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/_meta.json @@ -1,8 +1,11 @@ { - "autorest": "3.3.0", - "use": "@autorest/python@5.6.6", - "commit": "e34c5f11d61ca17fdc9fd0f70446dd54b94d67f1", + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "9a19506631005d0ff1e3f394c86a9ce10cf51910", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/hybridkubernetes/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.3.0", + "autorest_command": "autorest specification/hybridkubernetes/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/hybridkubernetes/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_configuration.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_configuration.py index 94b86be667aa..e19d63e4e4c1 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_configuration.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-03-01" + self.api_version = "2021-10-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-hybridkubernetes/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_metadata.json b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_metadata.json index f76dc3a23ee3..3d1a7e4eebe5 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_metadata.json +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2021-03-01", - "total_api_version_list": ["2021-03-01"], + "chosen_version": "2021-10-01", + "total_api_version_list": ["2021-10-01"], "client": { "name": "ConnectedKubernetesClient", "filename": "_connected_kubernetes_client", diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_version.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_version.py index c47f66669f1b..59deb8c7263b 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_version.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.1.0" diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/_configuration.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/_configuration.py index f57e8e5affd3..dd7cacfd5154 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/_configuration.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-03-01" + self.api_version = "2021-10-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-hybridkubernetes/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_connected_cluster_operations.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_connected_cluster_operations.py index 8918c02adb09..eb050e0b0ae1 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_connected_cluster_operations.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_connected_cluster_operations.py @@ -48,14 +48,14 @@ async def _create_initial( resource_group_name: str, cluster_name: str, connected_cluster: "_models.ConnectedCluster", - **kwargs + **kwargs: Any ) -> "_models.ConnectedCluster": cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectedCluster"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -63,7 +63,7 @@ async def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -106,7 +106,7 @@ async def begin_create( resource_group_name: str, cluster_name: str, connected_cluster: "_models.ConnectedCluster", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ConnectedCluster"]: """Register a new Kubernetes cluster with Azure Resource Manager. @@ -121,8 +121,8 @@ async def begin_create( :type connected_cluster: ~connected_kubernetes_client.models.ConnectedCluster :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ConnectedCluster or the result of cls(response) @@ -157,7 +157,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } @@ -180,7 +180,7 @@ async def update( resource_group_name: str, cluster_name: str, connected_cluster_patch: "_models.ConnectedClusterPatch", - **kwargs + **kwargs: Any ) -> "_models.ConnectedCluster": """Updates a connected cluster. @@ -202,7 +202,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -210,7 +210,7 @@ async def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -248,7 +248,7 @@ async def get( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> "_models.ConnectedCluster": """Get the properties of the specified connected cluster. @@ -269,14 +269,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -310,21 +310,21 @@ async def _delete_initial( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -355,7 +355,7 @@ async def begin_delete( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a connected cluster. @@ -367,8 +367,8 @@ async def begin_delete( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -399,7 +399,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } @@ -417,10 +417,80 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'} # type: ignore + async def list_cluster_user_credential( + self, + resource_group_name: str, + cluster_name: str, + properties: "_models.ListClusterUserCredentialProperties", + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster user credentials of a connected cluster. + + Gets cluster user credentials of the connected cluster with a specified resource group and + name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the Kubernetes cluster on which get is called. + :type cluster_name: str + :param properties: ListClusterUserCredential properties. + :type properties: ~connected_kubernetes_client.models.ListClusterUserCredentialProperties + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~connected_kubernetes_client.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list_cluster_user_credential.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(properties, 'ListClusterUserCredentialProperties') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_user_credential.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential'} # type: ignore + def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ConnectedClusterList"]: """Lists all connected clusters. @@ -438,7 +508,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -451,7 +521,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -492,7 +562,7 @@ async def get_next(next_link=None): def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ConnectedClusterList"]: """Lists all connected clusters. @@ -508,7 +578,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_operations.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_operations.py index d9f99f389f57..e4e03897092f 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_operations.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def get( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationList"]: """Lists all of the available API operations for Connected Cluster resource. @@ -57,7 +57,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/__init__.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/__init__.py index 2c3091d2c8b6..85af76a7c2fb 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/__init__.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/__init__.py @@ -11,9 +11,13 @@ from ._models_py3 import ConnectedClusterIdentity from ._models_py3 import ConnectedClusterList from ._models_py3 import ConnectedClusterPatch + from ._models_py3 import CredentialResult + from ._models_py3 import CredentialResults from ._models_py3 import ErrorAdditionalInfo from ._models_py3 import ErrorDetail from ._models_py3 import ErrorResponse + from ._models_py3 import HybridConnectionConfig + from ._models_py3 import ListClusterUserCredentialProperties from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import OperationList @@ -25,9 +29,13 @@ from ._models import ConnectedClusterIdentity # type: ignore from ._models import ConnectedClusterList # type: ignore from ._models import ConnectedClusterPatch # type: ignore + from ._models import CredentialResult # type: ignore + from ._models import CredentialResults # type: ignore from ._models import ErrorAdditionalInfo # type: ignore from ._models import ErrorDetail # type: ignore from ._models import ErrorResponse # type: ignore + from ._models import HybridConnectionConfig # type: ignore + from ._models import ListClusterUserCredentialProperties # type: ignore from ._models import Operation # type: ignore from ._models import OperationDisplay # type: ignore from ._models import OperationList # type: ignore @@ -36,6 +44,7 @@ from ._models import TrackedResource # type: ignore from ._connected_kubernetes_client_enums import ( + AuthenticationMethod, ConnectivityStatus, CreatedByType, LastModifiedByType, @@ -48,15 +57,20 @@ 'ConnectedClusterIdentity', 'ConnectedClusterList', 'ConnectedClusterPatch', + 'CredentialResult', + 'CredentialResults', 'ErrorAdditionalInfo', 'ErrorDetail', 'ErrorResponse', + 'HybridConnectionConfig', + 'ListClusterUserCredentialProperties', 'Operation', 'OperationDisplay', 'OperationList', 'Resource', 'SystemData', 'TrackedResource', + 'AuthenticationMethod', 'ConnectivityStatus', 'CreatedByType', 'LastModifiedByType', diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_connected_kubernetes_client_enums.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_connected_kubernetes_client_enums.py index 84f185bf193a..a58b19c6b6c1 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_connected_kubernetes_client_enums.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_connected_kubernetes_client_enums.py @@ -26,6 +26,13 @@ def __getattr__(cls, name): raise AttributeError(name) +class AuthenticationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The mode of client authentication. + """ + + TOKEN = "Token" + AAD = "AAD" + class ConnectivityStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Represents the connectivity status of the connected cluster. """ diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models.py index 030d3aba9563..5d3e787ba82a 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models.py @@ -281,12 +281,12 @@ class ConnectedClusterPatch(msrest.serialization.Model): :type tags: dict[str, str] :param properties: Describes the connected cluster resource properties that can be updated during PATCH operation. - :type properties: str + :type properties: any """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, } def __init__( @@ -298,6 +298,67 @@ def __init__( self.properties = kwargs.get('properties', None) +class CredentialResult(msrest.serialization.Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytearray + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResult, self).__init__(**kwargs) + self.name = None + self.value = None + + +class CredentialResults(msrest.serialization.Model): + """The list of credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar hybrid_connection_config: Contains the REP (rendezvous endpoint) and “Sender” access + token. + :vartype hybrid_connection_config: ~connected_kubernetes_client.models.HybridConnectionConfig + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: list[~connected_kubernetes_client.models.CredentialResult] + """ + + _validation = { + 'hybrid_connection_config': {'readonly': True}, + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'hybrid_connection_config': {'key': 'hybridConnectionConfig', 'type': 'HybridConnectionConfig'}, + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResults, self).__init__(**kwargs) + self.hybrid_connection_config = None + self.kubeconfigs = None + + class ErrorAdditionalInfo(msrest.serialization.Model): """The resource management error additional info. @@ -306,7 +367,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: str + :vartype info: any """ _validation = { @@ -316,7 +377,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, } def __init__( @@ -392,6 +453,78 @@ def __init__( self.error = kwargs.get('error', None) +class HybridConnectionConfig(msrest.serialization.Model): + """Contains the REP (rendezvous endpoint) and “Sender” access token. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar expiration_time: Timestamp when this token will be expired. + :vartype expiration_time: long + :ivar hybrid_connection_name: Name of the connection. + :vartype hybrid_connection_name: str + :ivar relay: Name of the relay. + :vartype relay: str + :ivar token: Sender access token. + :vartype token: str + """ + + _validation = { + 'expiration_time': {'readonly': True}, + 'hybrid_connection_name': {'readonly': True}, + 'relay': {'readonly': True}, + 'token': {'readonly': True}, + } + + _attribute_map = { + 'expiration_time': {'key': 'expirationTime', 'type': 'long'}, + 'hybrid_connection_name': {'key': 'hybridConnectionName', 'type': 'str'}, + 'relay': {'key': 'relay', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HybridConnectionConfig, self).__init__(**kwargs) + self.expiration_time = None + self.hybrid_connection_name = None + self.relay = None + self.token = None + + +class ListClusterUserCredentialProperties(msrest.serialization.Model): + """ListClusterUserCredentialProperties. + + All required parameters must be populated in order to send to Azure. + + :param authentication_method: Required. The mode of client authentication. Possible values + include: "Token", "AAD". + :type authentication_method: str or ~connected_kubernetes_client.models.AuthenticationMethod + :param client_proxy: Required. Boolean value to indicate whether the request is for client side + proxy or not. + :type client_proxy: bool + """ + + _validation = { + 'authentication_method': {'required': True}, + 'client_proxy': {'required': True}, + } + + _attribute_map = { + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + 'client_proxy': {'key': 'clientProxy', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ListClusterUserCredentialProperties, self).__init__(**kwargs) + self.authentication_method = kwargs['authentication_method'] + self.client_proxy = kwargs['client_proxy'] + + class Operation(msrest.serialization.Model): """The Connected cluster API operation. diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models_py3.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models_py3.py index 90e1b0bd198d..d1208982d77a 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models_py3.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models_py3.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization @@ -302,19 +302,19 @@ class ConnectedClusterPatch(msrest.serialization.Model): :type tags: dict[str, str] :param properties: Describes the connected cluster resource properties that can be updated during PATCH operation. - :type properties: str + :type properties: any """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - properties: Optional[str] = None, + properties: Optional[Any] = None, **kwargs ): super(ConnectedClusterPatch, self).__init__(**kwargs) @@ -322,6 +322,67 @@ def __init__( self.properties = properties +class CredentialResult(msrest.serialization.Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytearray + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResult, self).__init__(**kwargs) + self.name = None + self.value = None + + +class CredentialResults(msrest.serialization.Model): + """The list of credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar hybrid_connection_config: Contains the REP (rendezvous endpoint) and “Sender” access + token. + :vartype hybrid_connection_config: ~connected_kubernetes_client.models.HybridConnectionConfig + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: list[~connected_kubernetes_client.models.CredentialResult] + """ + + _validation = { + 'hybrid_connection_config': {'readonly': True}, + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'hybrid_connection_config': {'key': 'hybridConnectionConfig', 'type': 'HybridConnectionConfig'}, + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResults, self).__init__(**kwargs) + self.hybrid_connection_config = None + self.kubeconfigs = None + + class ErrorAdditionalInfo(msrest.serialization.Model): """The resource management error additional info. @@ -330,7 +391,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: str + :vartype info: any """ _validation = { @@ -340,7 +401,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, } def __init__( @@ -418,6 +479,81 @@ def __init__( self.error = error +class HybridConnectionConfig(msrest.serialization.Model): + """Contains the REP (rendezvous endpoint) and “Sender” access token. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar expiration_time: Timestamp when this token will be expired. + :vartype expiration_time: long + :ivar hybrid_connection_name: Name of the connection. + :vartype hybrid_connection_name: str + :ivar relay: Name of the relay. + :vartype relay: str + :ivar token: Sender access token. + :vartype token: str + """ + + _validation = { + 'expiration_time': {'readonly': True}, + 'hybrid_connection_name': {'readonly': True}, + 'relay': {'readonly': True}, + 'token': {'readonly': True}, + } + + _attribute_map = { + 'expiration_time': {'key': 'expirationTime', 'type': 'long'}, + 'hybrid_connection_name': {'key': 'hybridConnectionName', 'type': 'str'}, + 'relay': {'key': 'relay', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HybridConnectionConfig, self).__init__(**kwargs) + self.expiration_time = None + self.hybrid_connection_name = None + self.relay = None + self.token = None + + +class ListClusterUserCredentialProperties(msrest.serialization.Model): + """ListClusterUserCredentialProperties. + + All required parameters must be populated in order to send to Azure. + + :param authentication_method: Required. The mode of client authentication. Possible values + include: "Token", "AAD". + :type authentication_method: str or ~connected_kubernetes_client.models.AuthenticationMethod + :param client_proxy: Required. Boolean value to indicate whether the request is for client side + proxy or not. + :type client_proxy: bool + """ + + _validation = { + 'authentication_method': {'required': True}, + 'client_proxy': {'required': True}, + } + + _attribute_map = { + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + 'client_proxy': {'key': 'clientProxy', 'type': 'bool'}, + } + + def __init__( + self, + *, + authentication_method: Union[str, "AuthenticationMethod"], + client_proxy: bool, + **kwargs + ): + super(ListClusterUserCredentialProperties, self).__init__(**kwargs) + self.authentication_method = authentication_method + self.client_proxy = client_proxy + + class Operation(msrest.serialization.Model): """The Connected cluster API operation. diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_connected_cluster_operations.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_connected_cluster_operations.py index 9efeb126fead..2d0390d45d7e 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_connected_cluster_operations.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_connected_cluster_operations.py @@ -60,7 +60,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -68,7 +68,7 @@ def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -127,8 +127,8 @@ def begin_create( :type connected_cluster: ~connected_kubernetes_client.models.ConnectedCluster :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ConnectedCluster or the result of cls(response) @@ -163,7 +163,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } @@ -209,7 +209,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -217,7 +217,7 @@ def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -277,14 +277,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -326,14 +326,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -377,8 +377,8 @@ def begin_delete( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -409,7 +409,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } @@ -427,6 +427,77 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'} # type: ignore + def list_cluster_user_credential( + self, + resource_group_name, # type: str + cluster_name, # type: str + properties, # type: "_models.ListClusterUserCredentialProperties" + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" + """Gets cluster user credentials of a connected cluster. + + Gets cluster user credentials of the connected cluster with a specified resource group and + name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the Kubernetes cluster on which get is called. + :type cluster_name: str + :param properties: ListClusterUserCredential properties. + :type properties: ~connected_kubernetes_client.models.ListClusterUserCredentialProperties + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~connected_kubernetes_client.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list_cluster_user_credential.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(properties, 'ListClusterUserCredentialProperties') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_user_credential.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential'} # type: ignore + def list_by_resource_group( self, resource_group_name, # type: str @@ -449,7 +520,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -462,7 +533,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -520,7 +591,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_operations.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_operations.py index 4effb139b9c8..aa3d1b477899 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_operations.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_operations.py @@ -62,7 +62,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None):