10
10
# --------------------------------------------------------------------------
11
11
from msrest import Serializer , Deserializer
12
12
from typing import TYPE_CHECKING
13
- import warnings
14
-
15
- from azure .core .exceptions import ClientAuthenticationError , HttpResponseError , ResourceExistsError , ResourceNotFoundError , map_error
16
- from azure .core .paging import ItemPaged
17
- from azure .core .pipeline import PipelineResponse
18
- from azure .core .pipeline .transport import HttpRequest , HttpResponse
19
- from azure .core .polling import LROPoller , NoPolling , PollingMethod
20
- from azure .mgmt .core .exceptions import ARMErrorFormat
21
- from azure .mgmt .core .polling .arm_polling import ARMPolling
22
13
23
14
if TYPE_CHECKING :
24
15
# pylint: disable=unused-import,ungrouped-imports
25
- from typing import Any , Callable , Dict , Generic , Iterable , Optional , TypeVar , Union
16
+ from typing import Any , Iterable , Optional
17
+
18
+ from azure .core .paging import ItemPaged
19
+ from azure .core .polling import LROPoller
26
20
27
21
28
22
class NetworkManagementClientOperationsMixin (object ):
@@ -34,6 +28,7 @@ def begin_delete_bastion_shareable_link(
34
28
bsl_request , # type: "_models.BastionShareableLinkListRequest"
35
29
** kwargs # type: Any
36
30
):
31
+ # type: (...) -> LROPoller[None]
37
32
"""Deletes the Bastion Shareable Links for all the VMs specified in the request.
38
33
39
34
:param resource_group_name: The name of the resource group.
@@ -44,13 +39,15 @@ def begin_delete_bastion_shareable_link(
44
39
:type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest
45
40
:keyword callable cls: A custom type or function that will be passed the direct response
46
41
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
47
- :keyword polling: By default, your polling method will be ARMPolling.
48
- Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
42
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
43
+ operation to not poll, or pass in your own initialized polling object for a personal polling
44
+ strategy.
49
45
:paramtype polling: bool or ~azure.core.polling.PollingMethod
50
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
46
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
47
+ Retry-After header is present.
51
48
:return: An instance of LROPoller that returns either None or the result of cls(response)
52
49
:rtype: ~azure.core.polling.LROPoller[None]
53
- :raises ~azure.core.exceptions.HttpResponseError:
50
+ :raises: ~azure.core.exceptions.HttpResponseError
54
51
"""
55
52
api_version = self ._get_api_version ('begin_delete_bastion_shareable_link' )
56
53
if api_version == '2019-09-01' :
@@ -94,6 +91,7 @@ def begin_generatevirtualwanvpnserverconfigurationvpnprofile(
94
91
vpn_client_params , # type: "_models.VirtualWanVpnProfileParameters"
95
92
** kwargs # type: Any
96
93
):
94
+ # type: (...) -> LROPoller["_models.VpnProfileResponse"]
97
95
"""Generates a unique VPN profile for P2S clients for VirtualWan and associated
98
96
VpnServerConfiguration combination in the specified resource group.
99
97
@@ -107,13 +105,17 @@ def begin_generatevirtualwanvpnserverconfigurationvpnprofile(
107
105
:type vpn_client_params: ~azure.mgmt.network.v2021_05_01.models.VirtualWanVpnProfileParameters
108
106
:keyword callable cls: A custom type or function that will be passed the direct response
109
107
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
110
- :keyword polling: By default, your polling method will be ARMPolling.
111
- Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
108
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
109
+ operation to not poll, or pass in your own initialized polling object for a personal polling
110
+ strategy.
112
111
:paramtype polling: bool or ~azure.core.polling.PollingMethod
113
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
114
- :return: An instance of LROPoller that returns either VpnProfileResponse or the result of cls(response)
115
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnProfileResponse]
116
- :raises ~azure.core.exceptions.HttpResponseError:
112
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
113
+ Retry-After header is present.
114
+ :return: An instance of LROPoller that returns either VpnProfileResponse or the result of
115
+ cls(response)
116
+ :rtype:
117
+ ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnProfileResponse]
118
+ :raises: ~azure.core.exceptions.HttpResponseError
117
119
"""
118
120
api_version = self ._get_api_version ('begin_generatevirtualwanvpnserverconfigurationvpnprofile' )
119
121
if api_version == '2019-08-01' :
@@ -158,6 +160,7 @@ def begin_get_active_sessions(
158
160
bastion_host_name , # type: str
159
161
** kwargs # type: Any
160
162
):
163
+ # type: (...) -> LROPoller[ItemPaged["_models.BastionActiveSessionListResult"]]
161
164
"""Returns the list of currently active sessions on the Bastion.
162
165
163
166
:param resource_group_name: The name of the resource group.
@@ -166,13 +169,17 @@ def begin_get_active_sessions(
166
169
:type bastion_host_name: str
167
170
:keyword callable cls: A custom type or function that will be passed the direct response
168
171
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
169
- :keyword polling: By default, your polling method will be ARMPolling.
170
- Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
172
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
173
+ operation to not poll, or pass in your own initialized polling object for a personal polling
174
+ strategy.
171
175
:paramtype polling: bool or ~azure.core.polling.PollingMethod
172
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
173
- :return: An instance of LROPoller that returns an iterator like instance of either BastionActiveSessionListResult or the result of cls(response)
174
- :rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionActiveSessionListResult]]
175
- :raises ~azure.core.exceptions.HttpResponseError:
176
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
177
+ Retry-After header is present.
178
+ :return: An instance of LROPoller that returns an iterator like instance of either
179
+ BastionActiveSessionListResult or the result of cls(response)
180
+ :rtype:
181
+ ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionActiveSessionListResult]]
182
+ :raises: ~azure.core.exceptions.HttpResponseError
176
183
"""
177
184
api_version = self ._get_api_version ('begin_get_active_sessions' )
178
185
if api_version == '2019-09-01' :
@@ -216,6 +223,7 @@ def begin_put_bastion_shareable_link(
216
223
bsl_request , # type: "_models.BastionShareableLinkListRequest"
217
224
** kwargs # type: Any
218
225
):
226
+ # type: (...) -> LROPoller[ItemPaged["_models.BastionShareableLinkListResult"]]
219
227
"""Creates a Bastion Shareable Links for all the VMs specified in the request.
220
228
221
229
:param resource_group_name: The name of the resource group.
@@ -226,13 +234,17 @@ def begin_put_bastion_shareable_link(
226
234
:type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest
227
235
:keyword callable cls: A custom type or function that will be passed the direct response
228
236
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
229
- :keyword polling: By default, your polling method will be ARMPolling.
230
- Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
237
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
238
+ operation to not poll, or pass in your own initialized polling object for a personal polling
239
+ strategy.
231
240
:paramtype polling: bool or ~azure.core.polling.PollingMethod
232
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
233
- :return: An instance of LROPoller that returns an iterator like instance of either BastionShareableLinkListResult or the result of cls(response)
234
- :rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult]]
235
- :raises ~azure.core.exceptions.HttpResponseError:
241
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
242
+ Retry-After header is present.
243
+ :return: An instance of LROPoller that returns an iterator like instance of either
244
+ BastionShareableLinkListResult or the result of cls(response)
245
+ :rtype:
246
+ ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult]]
247
+ :raises: ~azure.core.exceptions.HttpResponseError
236
248
"""
237
249
api_version = self ._get_api_version ('begin_put_bastion_shareable_link' )
238
250
if api_version == '2019-09-01' :
@@ -275,6 +287,7 @@ def check_dns_name_availability(
275
287
domain_name_label , # type: str
276
288
** kwargs # type: Any
277
289
):
290
+ # type: (...) -> "_models.DnsNameAvailabilityResult"
278
291
"""Checks whether a domain name in the cloudapp.azure.com zone is available for use.
279
292
280
293
:param location: The location of the domain name.
@@ -369,6 +382,7 @@ def disconnect_active_sessions(
369
382
session_ids , # type: "_models.SessionIds"
370
383
** kwargs # type: Any
371
384
):
385
+ # type: (...) -> Iterable["_models.BastionSessionDeleteResult"]
372
386
"""Returns the list of currently active sessions on the Bastion.
373
387
374
388
:param resource_group_name: The name of the resource group.
@@ -378,8 +392,10 @@ def disconnect_active_sessions(
378
392
:param session_ids: The list of sessionids to disconnect.
379
393
:type session_ids: ~azure.mgmt.network.v2021_05_01.models.SessionIds
380
394
:keyword callable cls: A custom type or function that will be passed the direct response
381
- :return: An iterator like instance of either BastionSessionDeleteResult or the result of cls(response)
382
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionSessionDeleteResult]
395
+ :return: An iterator like instance of either BastionSessionDeleteResult or the result of
396
+ cls(response)
397
+ :rtype:
398
+ ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionSessionDeleteResult]
383
399
:raises: ~azure.core.exceptions.HttpResponseError
384
400
"""
385
401
api_version = self ._get_api_version ('disconnect_active_sessions' )
@@ -424,6 +440,7 @@ def get_bastion_shareable_link(
424
440
bsl_request , # type: "_models.BastionShareableLinkListRequest"
425
441
** kwargs # type: Any
426
442
):
443
+ # type: (...) -> Iterable["_models.BastionShareableLinkListResult"]
427
444
"""Return the Bastion Shareable Links for all the VMs specified in the request.
428
445
429
446
:param resource_group_name: The name of the resource group.
@@ -433,8 +450,10 @@ def get_bastion_shareable_link(
433
450
:param bsl_request: Post request for all the Bastion Shareable Link endpoints.
434
451
:type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest
435
452
:keyword callable cls: A custom type or function that will be passed the direct response
436
- :return: An iterator like instance of either BastionShareableLinkListResult or the result of cls(response)
437
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult]
453
+ :return: An iterator like instance of either BastionShareableLinkListResult or the result of
454
+ cls(response)
455
+ :rtype:
456
+ ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult]
438
457
:raises: ~azure.core.exceptions.HttpResponseError
439
458
"""
440
459
api_version = self ._get_api_version ('get_bastion_shareable_link' )
@@ -478,6 +497,7 @@ def supported_security_providers(
478
497
virtual_wan_name , # type: str
479
498
** kwargs # type: Any
480
499
):
500
+ # type: (...) -> "_models.VirtualWanSecurityProviders"
481
501
"""Gives the supported security providers for the virtual wan.
482
502
483
503
:param resource_group_name: The resource group name.
0 commit comments