Skip to content

Commit

Permalink
CodeGen from PR 16905 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge ae7589d5a925843622b7bdba6bcdc6f46f935000 into 8253d07
  • Loading branch information
SDKAuto committed Jan 10, 2022
1 parent 6b0495d commit b735dee
Show file tree
Hide file tree
Showing 5,114 changed files with 1,320,580 additions and 1,399,730 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 5 additions & 5 deletions sdk/network/azure-mgmt-network/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.4.5",
"autorest": "3.7.2",
"use": [
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
"@autorest/python@5.12.0",
"@autorest/modelerfour@4.19.3"
],
"commit": "200370117556209695877b7631afa7d6c100c356",
"commit": "274e9d725c19b360ad5e5dffa276513d218a27e1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/network/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",
"autorest_command": "autorest specification/network/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"readme": "specification/network/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

from ._version import VERSION

Expand Down Expand Up @@ -68,4 +68,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

class _SDKClient(object):
def __init__(self, *args, **kwargs):
Expand Down Expand Up @@ -93,12 +92,10 @@ def __init__(
credential, # type: "TokenCredential"
subscription_id, # type: str
api_version=None, # type: Optional[str]
base_url=None, # type: Optional[str]
base_url="https://management.azure.com", # type: str
profile=KnownProfiles.default, # type: KnownProfiles
**kwargs # type: Any
):
if not base_url:
base_url = 'https://management.azure.com'
self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(NetworkManagementClient, self).__init__(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,13 @@
# --------------------------------------------------------------------------
from msrest import Serializer, Deserializer
from typing import TYPE_CHECKING
import warnings

from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
from azure.core.polling import LROPoller, NoPolling, PollingMethod
from azure.mgmt.core.exceptions import ARMErrorFormat
from azure.mgmt.core.polling.arm_polling import ARMPolling

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union
from typing import Any, Iterable, Optional

from azure.core.paging import ItemPaged
from azure.core.polling import LROPoller


class NetworkManagementClientOperationsMixin(object):
Expand All @@ -34,6 +28,7 @@ def begin_delete_bastion_shareable_link(
bsl_request, # type: "_models.BastionShareableLinkListRequest"
**kwargs # type: Any
):
# type: (...) -> LROPoller[None]
"""Deletes the Bastion Shareable Links for all the VMs specified in the request.
:param resource_group_name: The name of the resource group.
Expand All @@ -44,13 +39,15 @@ def begin_delete_bastion_shareable_link(
:type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest
: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: 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.
: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.
: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)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
:raises: ~azure.core.exceptions.HttpResponseError
"""
api_version = self._get_api_version('begin_delete_bastion_shareable_link')
if api_version == '2019-09-01':
Expand Down Expand Up @@ -94,6 +91,7 @@ def begin_generatevirtualwanvpnserverconfigurationvpnprofile(
vpn_client_params, # type: "_models.VirtualWanVpnProfileParameters"
**kwargs # type: Any
):
# type: (...) -> LROPoller["_models.VpnProfileResponse"]
"""Generates a unique VPN profile for P2S clients for VirtualWan and associated
VpnServerConfiguration combination in the specified resource group.
Expand All @@ -107,13 +105,17 @@ def begin_generatevirtualwanvpnserverconfigurationvpnprofile(
:type vpn_client_params: ~azure.mgmt.network.v2021_05_01.models.VirtualWanVpnProfileParameters
: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: 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.
: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 VpnProfileResponse or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnProfileResponse]
:raises ~azure.core.exceptions.HttpResponseError:
: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 VpnProfileResponse or the result of
cls(response)
:rtype:
~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnProfileResponse]
:raises: ~azure.core.exceptions.HttpResponseError
"""
api_version = self._get_api_version('begin_generatevirtualwanvpnserverconfigurationvpnprofile')
if api_version == '2019-08-01':
Expand Down Expand Up @@ -158,6 +160,7 @@ def begin_get_active_sessions(
bastion_host_name, # type: str
**kwargs # type: Any
):
# type: (...) -> LROPoller[ItemPaged["_models.BastionActiveSessionListResult"]]
"""Returns the list of currently active sessions on the Bastion.
:param resource_group_name: The name of the resource group.
Expand All @@ -166,13 +169,17 @@ def begin_get_active_sessions(
:type bastion_host_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: 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.
: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 an iterator like instance of either BastionActiveSessionListResult or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionActiveSessionListResult]]
:raises ~azure.core.exceptions.HttpResponseError:
: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 an iterator like instance of either
BastionActiveSessionListResult or the result of cls(response)
:rtype:
~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionActiveSessionListResult]]
:raises: ~azure.core.exceptions.HttpResponseError
"""
api_version = self._get_api_version('begin_get_active_sessions')
if api_version == '2019-09-01':
Expand Down Expand Up @@ -216,6 +223,7 @@ def begin_put_bastion_shareable_link(
bsl_request, # type: "_models.BastionShareableLinkListRequest"
**kwargs # type: Any
):
# type: (...) -> LROPoller[ItemPaged["_models.BastionShareableLinkListResult"]]
"""Creates a Bastion Shareable Links for all the VMs specified in the request.
:param resource_group_name: The name of the resource group.
Expand All @@ -226,13 +234,17 @@ def begin_put_bastion_shareable_link(
:type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest
: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: 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.
: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 an iterator like instance of either BastionShareableLinkListResult or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult]]
:raises ~azure.core.exceptions.HttpResponseError:
: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 an iterator like instance of either
BastionShareableLinkListResult or the result of cls(response)
:rtype:
~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult]]
:raises: ~azure.core.exceptions.HttpResponseError
"""
api_version = self._get_api_version('begin_put_bastion_shareable_link')
if api_version == '2019-09-01':
Expand Down Expand Up @@ -275,6 +287,7 @@ def check_dns_name_availability(
domain_name_label, # type: str
**kwargs # type: Any
):
# type: (...) -> "_models.DnsNameAvailabilityResult"
"""Checks whether a domain name in the cloudapp.azure.com zone is available for use.
:param location: The location of the domain name.
Expand Down Expand Up @@ -369,6 +382,7 @@ def disconnect_active_sessions(
session_ids, # type: "_models.SessionIds"
**kwargs # type: Any
):
# type: (...) -> Iterable["_models.BastionSessionDeleteResult"]
"""Returns the list of currently active sessions on the Bastion.
:param resource_group_name: The name of the resource group.
Expand All @@ -378,8 +392,10 @@ def disconnect_active_sessions(
:param session_ids: The list of sessionids to disconnect.
:type session_ids: ~azure.mgmt.network.v2021_05_01.models.SessionIds
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either BastionSessionDeleteResult or the result of cls(response)
:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionSessionDeleteResult]
:return: An iterator like instance of either BastionSessionDeleteResult or the result of
cls(response)
:rtype:
~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionSessionDeleteResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
api_version = self._get_api_version('disconnect_active_sessions')
Expand Down Expand Up @@ -424,6 +440,7 @@ def get_bastion_shareable_link(
bsl_request, # type: "_models.BastionShareableLinkListRequest"
**kwargs # type: Any
):
# type: (...) -> Iterable["_models.BastionShareableLinkListResult"]
"""Return the Bastion Shareable Links for all the VMs specified in the request.
:param resource_group_name: The name of the resource group.
Expand All @@ -433,8 +450,10 @@ def get_bastion_shareable_link(
:param bsl_request: Post request for all the Bastion Shareable Link endpoints.
:type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either BastionShareableLinkListResult or the result of cls(response)
:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult]
:return: An iterator like instance of either BastionShareableLinkListResult or the result of
cls(response)
:rtype:
~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
api_version = self._get_api_version('get_bastion_shareable_link')
Expand Down Expand Up @@ -478,6 +497,7 @@ def supported_security_providers(
virtual_wan_name, # type: str
**kwargs # type: Any
):
# type: (...) -> "_models.VirtualWanSecurityProviders"
"""Gives the supported security providers for the virtual wan.
:param resource_group_name: The resource group name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy

from .._version import VERSION

Expand Down Expand Up @@ -64,4 +64,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

from typing import Any, Optional, TYPE_CHECKING

from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin
Expand All @@ -22,6 +21,7 @@

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
from azure.core.credentials_async import AsyncTokenCredential

class _SDKClient(object):
Expand Down Expand Up @@ -91,12 +91,10 @@ def __init__(
credential: "AsyncTokenCredential",
subscription_id: str,
api_version: Optional[str] = None,
base_url: Optional[str] = None,
base_url: str = "https://management.azure.com",
profile: KnownProfiles = KnownProfiles.default,
**kwargs # type: Any
) -> None:
if not base_url:
base_url = 'https://management.azure.com'
self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs)
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(NetworkManagementClient, self).__init__(
Expand Down
Loading

0 comments on commit b735dee

Please sign in to comment.