@@ -48,22 +48,22 @@ async def _create_initial(
4848 resource_group_name : str ,
4949 cluster_name : str ,
5050 connected_cluster : "_models.ConnectedCluster" ,
51- ** kwargs
51+ ** kwargs : Any
5252 ) -> "_models.ConnectedCluster" :
5353 cls = kwargs .pop ('cls' , None ) # type: ClsType["_models.ConnectedCluster"]
5454 error_map = {
5555 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
5656 }
5757 error_map .update (kwargs .pop ('error_map' , {}))
58- api_version = "2021-03 -01"
58+ api_version = "2021-10 -01"
5959 content_type = kwargs .pop ("content_type" , "application/json" )
6060 accept = "application/json"
6161
6262 # Construct URL
6363 url = self ._create_initial .metadata ['url' ] # type: ignore
6464 path_format_arguments = {
6565 'subscriptionId' : self ._serialize .url ("self._config.subscription_id" , self ._config .subscription_id , 'str' , min_length = 1 ),
66- 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' , max_length = 90 , min_length = 1 , pattern = r'^[-\w\._\(\)]+$' ),
66+ 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' , max_length = 90 , min_length = 1 ),
6767 'clusterName' : self ._serialize .url ("cluster_name" , cluster_name , 'str' ),
6868 }
6969 url = self ._client .format_url (url , ** path_format_arguments )
@@ -106,7 +106,7 @@ async def begin_create(
106106 resource_group_name : str ,
107107 cluster_name : str ,
108108 connected_cluster : "_models.ConnectedCluster" ,
109- ** kwargs
109+ ** kwargs : Any
110110 ) -> AsyncLROPoller ["_models.ConnectedCluster" ]:
111111 """Register a new Kubernetes cluster with Azure Resource Manager.
112112
@@ -121,8 +121,8 @@ async def begin_create(
121121 :type connected_cluster: ~connected_kubernetes_client.models.ConnectedCluster
122122 :keyword callable cls: A custom type or function that will be passed the direct response
123123 :keyword str continuation_token: A continuation token to restart a poller from a saved state.
124- :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
125- False for no polling , or your own initialized polling object for a personal polling strategy.
124+ :keyword polling: By default, your polling method will be AsyncARMPolling.
125+ Pass in False for this operation to not poll , or pass in your own initialized polling object for a personal polling strategy.
126126 :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
127127 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
128128 :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):
157157
158158 path_format_arguments = {
159159 'subscriptionId' : self ._serialize .url ("self._config.subscription_id" , self ._config .subscription_id , 'str' , min_length = 1 ),
160- 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' , max_length = 90 , min_length = 1 , pattern = r'^[-\w\._\(\)]+$' ),
160+ 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' , max_length = 90 , min_length = 1 ),
161161 'clusterName' : self ._serialize .url ("cluster_name" , cluster_name , 'str' ),
162162 }
163163
@@ -180,7 +180,7 @@ async def update(
180180 resource_group_name : str ,
181181 cluster_name : str ,
182182 connected_cluster_patch : "_models.ConnectedClusterPatch" ,
183- ** kwargs
183+ ** kwargs : Any
184184 ) -> "_models.ConnectedCluster" :
185185 """Updates a connected cluster.
186186
@@ -202,15 +202,15 @@ async def update(
202202 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
203203 }
204204 error_map .update (kwargs .pop ('error_map' , {}))
205- api_version = "2021-03 -01"
205+ api_version = "2021-10 -01"
206206 content_type = kwargs .pop ("content_type" , "application/json" )
207207 accept = "application/json"
208208
209209 # Construct URL
210210 url = self .update .metadata ['url' ] # type: ignore
211211 path_format_arguments = {
212212 'subscriptionId' : self ._serialize .url ("self._config.subscription_id" , self ._config .subscription_id , 'str' , min_length = 1 ),
213- 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' , max_length = 90 , min_length = 1 , pattern = r'^[-\w\._\(\)]+$' ),
213+ 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' , max_length = 90 , min_length = 1 ),
214214 'clusterName' : self ._serialize .url ("cluster_name" , cluster_name , 'str' ),
215215 }
216216 url = self ._client .format_url (url , ** path_format_arguments )
@@ -248,7 +248,7 @@ async def get(
248248 self ,
249249 resource_group_name : str ,
250250 cluster_name : str ,
251- ** kwargs
251+ ** kwargs : Any
252252 ) -> "_models.ConnectedCluster" :
253253 """Get the properties of the specified connected cluster.
254254
@@ -269,14 +269,14 @@ async def get(
269269 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
270270 }
271271 error_map .update (kwargs .pop ('error_map' , {}))
272- api_version = "2021-03 -01"
272+ api_version = "2021-10 -01"
273273 accept = "application/json"
274274
275275 # Construct URL
276276 url = self .get .metadata ['url' ] # type: ignore
277277 path_format_arguments = {
278278 'subscriptionId' : self ._serialize .url ("self._config.subscription_id" , self ._config .subscription_id , 'str' , min_length = 1 ),
279- 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' , max_length = 90 , min_length = 1 , pattern = r'^[-\w\._\(\)]+$' ),
279+ 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' , max_length = 90 , min_length = 1 ),
280280 'clusterName' : self ._serialize .url ("cluster_name" , cluster_name , 'str' ),
281281 }
282282 url = self ._client .format_url (url , ** path_format_arguments )
@@ -310,21 +310,21 @@ async def _delete_initial(
310310 self ,
311311 resource_group_name : str ,
312312 cluster_name : str ,
313- ** kwargs
313+ ** kwargs : Any
314314 ) -> None :
315315 cls = kwargs .pop ('cls' , None ) # type: ClsType[None]
316316 error_map = {
317317 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
318318 }
319319 error_map .update (kwargs .pop ('error_map' , {}))
320- api_version = "2021-03 -01"
320+ api_version = "2021-10 -01"
321321 accept = "application/json"
322322
323323 # Construct URL
324324 url = self ._delete_initial .metadata ['url' ] # type: ignore
325325 path_format_arguments = {
326326 'subscriptionId' : self ._serialize .url ("self._config.subscription_id" , self ._config .subscription_id , 'str' , min_length = 1 ),
327- 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' , max_length = 90 , min_length = 1 , pattern = r'^[-\w\._\(\)]+$' ),
327+ 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' , max_length = 90 , min_length = 1 ),
328328 'clusterName' : self ._serialize .url ("cluster_name" , cluster_name , 'str' ),
329329 }
330330 url = self ._client .format_url (url , ** path_format_arguments )
@@ -355,7 +355,7 @@ async def begin_delete(
355355 self ,
356356 resource_group_name : str ,
357357 cluster_name : str ,
358- ** kwargs
358+ ** kwargs : Any
359359 ) -> AsyncLROPoller [None ]:
360360 """Delete a connected cluster.
361361
@@ -367,8 +367,8 @@ async def begin_delete(
367367 :type cluster_name: str
368368 :keyword callable cls: A custom type or function that will be passed the direct response
369369 :keyword str continuation_token: A continuation token to restart a poller from a saved state.
370- :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
371- False for no polling , or your own initialized polling object for a personal polling strategy.
370+ :keyword polling: By default, your polling method will be AsyncARMPolling.
371+ Pass in False for this operation to not poll , or pass in your own initialized polling object for a personal polling strategy.
372372 :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
373373 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
374374 :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):
399399
400400 path_format_arguments = {
401401 'subscriptionId' : self ._serialize .url ("self._config.subscription_id" , self ._config .subscription_id , 'str' , min_length = 1 ),
402- 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' , max_length = 90 , min_length = 1 , pattern = r'^[-\w\._\(\)]+$' ),
402+ 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' , max_length = 90 , min_length = 1 ),
403403 'clusterName' : self ._serialize .url ("cluster_name" , cluster_name , 'str' ),
404404 }
405405
@@ -417,10 +417,80 @@ def get_long_running_output(pipeline_response):
417417 return AsyncLROPoller (self ._client , raw_result , get_long_running_output , polling_method )
418418 begin_delete .metadata = {'url' : '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}' } # type: ignore
419419
420+ async def list_cluster_user_credential (
421+ self ,
422+ resource_group_name : str ,
423+ cluster_name : str ,
424+ properties : "_models.ListClusterUserCredentialProperties" ,
425+ ** kwargs : Any
426+ ) -> "_models.CredentialResults" :
427+ """Gets cluster user credentials of a connected cluster.
428+
429+ Gets cluster user credentials of the connected cluster with a specified resource group and
430+ name.
431+
432+ :param resource_group_name: The name of the resource group. The name is case insensitive.
433+ :type resource_group_name: str
434+ :param cluster_name: The name of the Kubernetes cluster on which get is called.
435+ :type cluster_name: str
436+ :param properties: ListClusterUserCredential properties.
437+ :type properties: ~connected_kubernetes_client.models.ListClusterUserCredentialProperties
438+ :keyword callable cls: A custom type or function that will be passed the direct response
439+ :return: CredentialResults, or the result of cls(response)
440+ :rtype: ~connected_kubernetes_client.models.CredentialResults
441+ :raises: ~azure.core.exceptions.HttpResponseError
442+ """
443+ cls = kwargs .pop ('cls' , None ) # type: ClsType["_models.CredentialResults"]
444+ error_map = {
445+ 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
446+ }
447+ error_map .update (kwargs .pop ('error_map' , {}))
448+ api_version = "2021-10-01"
449+ content_type = kwargs .pop ("content_type" , "application/json" )
450+ accept = "application/json"
451+
452+ # Construct URL
453+ url = self .list_cluster_user_credential .metadata ['url' ] # type: ignore
454+ path_format_arguments = {
455+ 'subscriptionId' : self ._serialize .url ("self._config.subscription_id" , self ._config .subscription_id , 'str' , min_length = 1 ),
456+ 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' , max_length = 90 , min_length = 1 ),
457+ 'clusterName' : self ._serialize .url ("cluster_name" , cluster_name , 'str' ),
458+ }
459+ url = self ._client .format_url (url , ** path_format_arguments )
460+
461+ # Construct parameters
462+ query_parameters = {} # type: Dict[str, Any]
463+ query_parameters ['api-version' ] = self ._serialize .query ("api_version" , api_version , 'str' )
464+
465+ # Construct headers
466+ header_parameters = {} # type: Dict[str, Any]
467+ header_parameters ['Content-Type' ] = self ._serialize .header ("content_type" , content_type , 'str' )
468+ header_parameters ['Accept' ] = self ._serialize .header ("accept" , accept , 'str' )
469+
470+ body_content_kwargs = {} # type: Dict[str, Any]
471+ body_content = self ._serialize .body (properties , 'ListClusterUserCredentialProperties' )
472+ body_content_kwargs ['content' ] = body_content
473+ request = self ._client .post (url , query_parameters , header_parameters , ** body_content_kwargs )
474+ pipeline_response = await self ._client ._pipeline .run (request , stream = False , ** kwargs )
475+ response = pipeline_response .http_response
476+
477+ if response .status_code not in [200 ]:
478+ map_error (status_code = response .status_code , response = response , error_map = error_map )
479+ error = self ._deserialize .failsafe_deserialize (_models .ErrorResponse , response )
480+ raise HttpResponseError (response = response , model = error , error_format = ARMErrorFormat )
481+
482+ deserialized = self ._deserialize ('CredentialResults' , pipeline_response )
483+
484+ if cls :
485+ return cls (pipeline_response , deserialized , {})
486+
487+ return deserialized
488+ list_cluster_user_credential .metadata = {'url' : '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential' } # type: ignore
489+
420490 def list_by_resource_group (
421491 self ,
422492 resource_group_name : str ,
423- ** kwargs
493+ ** kwargs : Any
424494 ) -> AsyncIterable ["_models.ConnectedClusterList" ]:
425495 """Lists all connected clusters.
426496
@@ -438,7 +508,7 @@ def list_by_resource_group(
438508 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
439509 }
440510 error_map .update (kwargs .pop ('error_map' , {}))
441- api_version = "2021-03 -01"
511+ api_version = "2021-10 -01"
442512 accept = "application/json"
443513
444514 def prepare_request (next_link = None ):
@@ -451,7 +521,7 @@ def prepare_request(next_link=None):
451521 url = self .list_by_resource_group .metadata ['url' ] # type: ignore
452522 path_format_arguments = {
453523 'subscriptionId' : self ._serialize .url ("self._config.subscription_id" , self ._config .subscription_id , 'str' , min_length = 1 ),
454- 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' , max_length = 90 , min_length = 1 , pattern = r'^[-\w\._\(\)]+$' ),
524+ 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' , max_length = 90 , min_length = 1 ),
455525 }
456526 url = self ._client .format_url (url , ** path_format_arguments )
457527 # Construct parameters
@@ -492,7 +562,7 @@ async def get_next(next_link=None):
492562
493563 def list_by_subscription (
494564 self ,
495- ** kwargs
565+ ** kwargs : Any
496566 ) -> AsyncIterable ["_models.ConnectedClusterList" ]:
497567 """Lists all connected clusters.
498568
@@ -508,7 +578,7 @@ def list_by_subscription(
508578 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
509579 }
510580 error_map .update (kwargs .pop ('error_map' , {}))
511- api_version = "2021-03 -01"
581+ api_version = "2021-10 -01"
512582 accept = "application/json"
513583
514584 def prepare_request (next_link = None ):
0 commit comments