@@ -65,7 +65,7 @@ async def check_name_availability(
6565 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
6666 }
6767 error_map .update (kwargs .pop ('error_map' , {}))
68- api_version = "2021-04 -01-preview"
68+ api_version = "2021-09 -01-preview"
6969 content_type = kwargs .pop ("content_type" , "application/json" )
7070 accept = "application/json"
7171
@@ -122,7 +122,7 @@ def list_by_subscription(
122122 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
123123 }
124124 error_map .update (kwargs .pop ('error_map' , {}))
125- api_version = "2021-04 -01-preview"
125+ api_version = "2021-09 -01-preview"
126126 accept = "application/json"
127127
128128 def prepare_request (next_link = None ):
@@ -193,7 +193,7 @@ def list_by_resource_group(
193193 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
194194 }
195195 error_map .update (kwargs .pop ('error_map' , {}))
196- api_version = "2021-04 -01-preview"
196+ api_version = "2021-09 -01-preview"
197197 accept = "application/json"
198198
199199 def prepare_request (next_link = None ):
@@ -268,7 +268,7 @@ async def get(
268268 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
269269 }
270270 error_map .update (kwargs .pop ('error_map' , {}))
271- api_version = "2021-04 -01-preview"
271+ api_version = "2021-09 -01-preview"
272272 accept = "application/json"
273273
274274 # Construct URL
@@ -317,7 +317,7 @@ async def _create_or_update_initial(
317317 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
318318 }
319319 error_map .update (kwargs .pop ('error_map' , {}))
320- api_version = "2021-04 -01-preview"
320+ api_version = "2021-09 -01-preview"
321321 content_type = kwargs .pop ("content_type" , "application/json" )
322322 accept = "application/json"
323323
@@ -447,7 +447,7 @@ async def _delete_initial(
447447 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
448448 }
449449 error_map .update (kwargs .pop ('error_map' , {}))
450- api_version = "2021-04 -01-preview"
450+ api_version = "2021-09 -01-preview"
451451 accept = "application/json"
452452
453453 # Construct URL
@@ -558,7 +558,7 @@ async def _update_initial(
558558 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
559559 }
560560 error_map .update (kwargs .pop ('error_map' , {}))
561- api_version = "2021-04 -01-preview"
561+ api_version = "2021-09 -01-preview"
562562 content_type = kwargs .pop ("content_type" , "application/json" )
563563 accept = "application/json"
564564
@@ -697,7 +697,7 @@ async def list_keys(
697697 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
698698 }
699699 error_map .update (kwargs .pop ('error_map' , {}))
700- api_version = "2021-04 -01-preview"
700+ api_version = "2021-09 -01-preview"
701701 accept = "application/json"
702702
703703 # Construct URL
@@ -746,7 +746,7 @@ async def _regenerate_key_initial(
746746 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
747747 }
748748 error_map .update (kwargs .pop ('error_map' , {}))
749- api_version = "2021-04 -01-preview"
749+ api_version = "2021-09 -01-preview"
750750 content_type = kwargs .pop ("content_type" , "application/json" )
751751 accept = "application/json"
752752
@@ -872,7 +872,7 @@ async def _restart_initial(
872872 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
873873 }
874874 error_map .update (kwargs .pop ('error_map' , {}))
875- api_version = "2021-04 -01-preview"
875+ api_version = "2021-09 -01-preview"
876876 accept = "application/json"
877877
878878 # Construct URL
@@ -970,3 +970,63 @@ def get_long_running_output(pipeline_response):
970970 else :
971971 return AsyncLROPoller (self ._client , raw_result , get_long_running_output , polling_method )
972972 begin_restart .metadata = {'url' : '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/restart' } # type: ignore
973+
974+ async def list_skus (
975+ self ,
976+ resource_group_name : str ,
977+ resource_name : str ,
978+ ** kwargs : Any
979+ ) -> "_models.SkuList" :
980+ """List all available skus of the resource.
981+
982+ :param resource_group_name: The name of the resource group that contains the resource. You can
983+ obtain this value from the Azure Resource Manager API or the portal.
984+ :type resource_group_name: str
985+ :param resource_name: The name of the resource.
986+ :type resource_name: str
987+ :keyword callable cls: A custom type or function that will be passed the direct response
988+ :return: SkuList, or the result of cls(response)
989+ :rtype: ~azure.mgmt.signalr.models.SkuList
990+ :raises: ~azure.core.exceptions.HttpResponseError
991+ """
992+ cls = kwargs .pop ('cls' , None ) # type: ClsType["_models.SkuList"]
993+ error_map = {
994+ 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
995+ }
996+ error_map .update (kwargs .pop ('error_map' , {}))
997+ api_version = "2021-09-01-preview"
998+ accept = "application/json"
999+
1000+ # Construct URL
1001+ url = self .list_skus .metadata ['url' ] # type: ignore
1002+ path_format_arguments = {
1003+ 'subscriptionId' : self ._serialize .url ("self._config.subscription_id" , self ._config .subscription_id , 'str' ),
1004+ 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' ),
1005+ 'resourceName' : self ._serialize .url ("resource_name" , resource_name , 'str' ),
1006+ }
1007+ url = self ._client .format_url (url , ** path_format_arguments )
1008+
1009+ # Construct parameters
1010+ query_parameters = {} # type: Dict[str, Any]
1011+ query_parameters ['api-version' ] = self ._serialize .query ("api_version" , api_version , 'str' )
1012+
1013+ # Construct headers
1014+ header_parameters = {} # type: Dict[str, Any]
1015+ header_parameters ['Accept' ] = self ._serialize .header ("accept" , accept , 'str' )
1016+
1017+ request = self ._client .get (url , query_parameters , header_parameters )
1018+ pipeline_response = await self ._client ._pipeline .run (request , stream = False , ** kwargs )
1019+ response = pipeline_response .http_response
1020+
1021+ if response .status_code not in [200 ]:
1022+ map_error (status_code = response .status_code , response = response , error_map = error_map )
1023+ error = self ._deserialize .failsafe_deserialize (_models .ErrorResponse , response )
1024+ raise HttpResponseError (response = response , model = error , error_format = ARMErrorFormat )
1025+
1026+ deserialized = self ._deserialize ('SkuList' , pipeline_response )
1027+
1028+ if cls :
1029+ return cls (pipeline_response , deserialized , {})
1030+
1031+ return deserialized
1032+ list_skus .metadata = {'url' : '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/skus' } # type: ignore
0 commit comments