1616from azure .mgmt .core .exceptions import ARMErrorFormat
1717from azure .mgmt .core .polling .async_arm_polling import AsyncARMPolling
1818
19- from ... import models
19+ from ... import models as _models
2020
2121T = TypeVar ('T' )
2222ClsType = Optional [Callable [[PipelineResponse [HttpRequest , AsyncHttpResponse ], T , Dict [str , Any ]], Any ]]
@@ -35,7 +35,7 @@ class ContainerGroupsOperations:
3535 :param deserializer: An object model deserializer.
3636 """
3737
38- models = models
38+ models = _models
3939
4040 def __init__ (self , client , config , serializer , deserializer ) -> None :
4141 self ._client = client
@@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4646 def list (
4747 self ,
4848 ** kwargs
49- ) -> AsyncIterable ["models .ContainerGroupListResult" ]:
49+ ) -> AsyncIterable ["_models .ContainerGroupListResult" ]:
5050 """Get a list of container groups in the specified subscription.
5151
5252 Get a list of container groups in the specified subscription. This operation returns properties
@@ -58,7 +58,7 @@ def list(
5858 :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerinstance.models.ContainerGroupListResult]
5959 :raises: ~azure.core.exceptions.HttpResponseError
6060 """
61- cls = kwargs .pop ('cls' , None ) # type: ClsType["models .ContainerGroupListResult"]
61+ cls = kwargs .pop ('cls' , None ) # type: ClsType["_models .ContainerGroupListResult"]
6262 error_map = {
6363 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
6464 }
@@ -117,7 +117,7 @@ def list_by_resource_group(
117117 self ,
118118 resource_group_name : str ,
119119 ** kwargs
120- ) -> AsyncIterable ["models .ContainerGroupListResult" ]:
120+ ) -> AsyncIterable ["_models .ContainerGroupListResult" ]:
121121 """Get a list of container groups in the specified subscription and resource group.
122122
123123 Get a list of container groups in a specified subscription and resource group. This operation
@@ -131,7 +131,7 @@ def list_by_resource_group(
131131 :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerinstance.models.ContainerGroupListResult]
132132 :raises: ~azure.core.exceptions.HttpResponseError
133133 """
134- cls = kwargs .pop ('cls' , None ) # type: ClsType["models .ContainerGroupListResult"]
134+ cls = kwargs .pop ('cls' , None ) # type: ClsType["_models .ContainerGroupListResult"]
135135 error_map = {
136136 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
137137 }
@@ -192,7 +192,7 @@ async def get(
192192 resource_group_name : str ,
193193 container_group_name : str ,
194194 ** kwargs
195- ) -> "models .ContainerGroup" :
195+ ) -> "_models .ContainerGroup" :
196196 """Get the properties of the specified container group.
197197
198198 Gets the properties of the specified container group in the specified subscription and resource
@@ -208,7 +208,7 @@ async def get(
208208 :rtype: ~azure.mgmt.containerinstance.models.ContainerGroup
209209 :raises: ~azure.core.exceptions.HttpResponseError
210210 """
211- cls = kwargs .pop ('cls' , None ) # type: ClsType["models .ContainerGroup"]
211+ cls = kwargs .pop ('cls' , None ) # type: ClsType["_models .ContainerGroup"]
212212 error_map = {
213213 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
214214 }
@@ -253,10 +253,10 @@ async def _create_or_update_initial(
253253 self ,
254254 resource_group_name : str ,
255255 container_group_name : str ,
256- container_group : "models .ContainerGroup" ,
256+ container_group : "_models .ContainerGroup" ,
257257 ** kwargs
258- ) -> "models .ContainerGroup" :
259- cls = kwargs .pop ('cls' , None ) # type: ClsType["models .ContainerGroup"]
258+ ) -> "_models .ContainerGroup" :
259+ cls = kwargs .pop ('cls' , None ) # type: ClsType["_models .ContainerGroup"]
260260 error_map = {
261261 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
262262 }
@@ -310,9 +310,9 @@ async def begin_create_or_update(
310310 self ,
311311 resource_group_name : str ,
312312 container_group_name : str ,
313- container_group : "models .ContainerGroup" ,
313+ container_group : "_models .ContainerGroup" ,
314314 ** kwargs
315- ) -> AsyncLROPoller ["models .ContainerGroup" ]:
315+ ) -> AsyncLROPoller ["_models .ContainerGroup" ]:
316316 """Create or update container groups.
317317
318318 Create or update container groups with specified configurations.
@@ -334,7 +334,7 @@ async def begin_create_or_update(
334334 :raises ~azure.core.exceptions.HttpResponseError:
335335 """
336336 polling = kwargs .pop ('polling' , True ) # type: Union[bool, AsyncPollingMethod]
337- cls = kwargs .pop ('cls' , None ) # type: ClsType["models .ContainerGroup"]
337+ cls = kwargs .pop ('cls' , None ) # type: ClsType["_models .ContainerGroup"]
338338 lro_delay = kwargs .pop (
339339 'polling_interval' ,
340340 self ._config .polling_interval
@@ -359,7 +359,13 @@ def get_long_running_output(pipeline_response):
359359 return cls (pipeline_response , deserialized , {})
360360 return deserialized
361361
362- if polling is True : polling_method = AsyncARMPolling (lro_delay , ** kwargs )
362+ path_format_arguments = {
363+ 'subscriptionId' : self ._serialize .url ("self._config.subscription_id" , self ._config .subscription_id , 'str' ),
364+ 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' ),
365+ 'containerGroupName' : self ._serialize .url ("container_group_name" , container_group_name , 'str' ),
366+ }
367+
368+ if polling is True : polling_method = AsyncARMPolling (lro_delay , path_format_arguments = path_format_arguments , ** kwargs )
363369 elif polling is False : polling_method = AsyncNoPolling ()
364370 else : polling_method = polling
365371 if cont_token :
@@ -377,9 +383,9 @@ async def update(
377383 self ,
378384 resource_group_name : str ,
379385 container_group_name : str ,
380- resource : "models .Resource" ,
386+ resource : "_models .Resource" ,
381387 ** kwargs
382- ) -> "models .ContainerGroup" :
388+ ) -> "_models .ContainerGroup" :
383389 """Update container groups.
384390
385391 Updates container group tags with specified values.
@@ -395,7 +401,7 @@ async def update(
395401 :rtype: ~azure.mgmt.containerinstance.models.ContainerGroup
396402 :raises: ~azure.core.exceptions.HttpResponseError
397403 """
398- cls = kwargs .pop ('cls' , None ) # type: ClsType["models .ContainerGroup"]
404+ cls = kwargs .pop ('cls' , None ) # type: ClsType["_models .ContainerGroup"]
399405 error_map = {
400406 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
401407 }
@@ -446,8 +452,8 @@ async def _delete_initial(
446452 resource_group_name : str ,
447453 container_group_name : str ,
448454 ** kwargs
449- ) -> Optional ["models .ContainerGroup" ]:
450- cls = kwargs .pop ('cls' , None ) # type: ClsType[Optional["models .ContainerGroup"]]
455+ ) -> Optional ["_models .ContainerGroup" ]:
456+ cls = kwargs .pop ('cls' , None ) # type: ClsType[Optional["_models .ContainerGroup"]]
451457 error_map = {
452458 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
453459 }
@@ -495,7 +501,7 @@ async def begin_delete(
495501 resource_group_name : str ,
496502 container_group_name : str ,
497503 ** kwargs
498- ) -> AsyncLROPoller ["models .ContainerGroup" ]:
504+ ) -> AsyncLROPoller ["_models .ContainerGroup" ]:
499505 """Delete the specified container group.
500506
501507 Delete the specified container group in the specified subscription and resource group. The
@@ -516,7 +522,7 @@ async def begin_delete(
516522 :raises ~azure.core.exceptions.HttpResponseError:
517523 """
518524 polling = kwargs .pop ('polling' , True ) # type: Union[bool, AsyncPollingMethod]
519- cls = kwargs .pop ('cls' , None ) # type: ClsType["models .ContainerGroup"]
525+ cls = kwargs .pop ('cls' , None ) # type: ClsType["_models .ContainerGroup"]
520526 lro_delay = kwargs .pop (
521527 'polling_interval' ,
522528 self ._config .polling_interval
@@ -540,7 +546,13 @@ def get_long_running_output(pipeline_response):
540546 return cls (pipeline_response , deserialized , {})
541547 return deserialized
542548
543- if polling is True : polling_method = AsyncARMPolling (lro_delay , ** kwargs )
549+ path_format_arguments = {
550+ 'subscriptionId' : self ._serialize .url ("self._config.subscription_id" , self ._config .subscription_id , 'str' ),
551+ 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' ),
552+ 'containerGroupName' : self ._serialize .url ("container_group_name" , container_group_name , 'str' ),
553+ }
554+
555+ if polling is True : polling_method = AsyncARMPolling (lro_delay , path_format_arguments = path_format_arguments , ** kwargs )
544556 elif polling is False : polling_method = AsyncNoPolling ()
545557 else : polling_method = polling
546558 if cont_token :
@@ -645,7 +657,13 @@ def get_long_running_output(pipeline_response):
645657 if cls :
646658 return cls (pipeline_response , None , {})
647659
648- if polling is True : polling_method = AsyncARMPolling (lro_delay , ** kwargs )
660+ path_format_arguments = {
661+ 'subscriptionId' : self ._serialize .url ("self._config.subscription_id" , self ._config .subscription_id , 'str' ),
662+ 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' ),
663+ 'containerGroupName' : self ._serialize .url ("container_group_name" , container_group_name , 'str' ),
664+ }
665+
666+ if polling is True : polling_method = AsyncARMPolling (lro_delay , path_format_arguments = path_format_arguments , ** kwargs )
649667 elif polling is False : polling_method = AsyncNoPolling ()
650668 else : polling_method = polling
651669 if cont_token :
@@ -808,7 +826,13 @@ def get_long_running_output(pipeline_response):
808826 if cls :
809827 return cls (pipeline_response , None , {})
810828
811- if polling is True : polling_method = AsyncARMPolling (lro_delay , ** kwargs )
829+ path_format_arguments = {
830+ 'subscriptionId' : self ._serialize .url ("self._config.subscription_id" , self ._config .subscription_id , 'str' ),
831+ 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' ),
832+ 'containerGroupName' : self ._serialize .url ("container_group_name" , container_group_name , 'str' ),
833+ }
834+
835+ if polling is True : polling_method = AsyncARMPolling (lro_delay , path_format_arguments = path_format_arguments , ** kwargs )
812836 elif polling is False : polling_method = AsyncNoPolling ()
813837 else : polling_method = polling
814838 if cont_token :
0 commit comments