Skip to content

Commit

Permalink
Generated from d7ff365f2b3176f932f1af58d754e686d08696fa
Browse files Browse the repository at this point in the history
  • Loading branch information
SDK Automation committed Sep 18, 2020
1 parent 981105d commit 323f91b
Show file tree
Hide file tree
Showing 123 changed files with 89,328 additions and 120 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def check_dns_name_availability(self, location, domain_name_label, custom_header
overrides<msrest:optionsforoperations>`.
:return: DnsNameAvailabilityResult or ClientRawResponse if raw=true
:rtype:
~azure.mgmt.network.v2020_06_01.models.DnsNameAvailabilityResult or
~azure.mgmt.network.v2020_07_01.models.DnsNameAvailabilityResult or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
Expand Down Expand Up @@ -97,6 +97,8 @@ def check_dns_name_availability(self, location, domain_name_label, custom_header
from .v2020_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2020-06-01':
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2020-07-01':
from .v2020_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
Expand All @@ -117,7 +119,7 @@ def delete_bastion_shareable_link(self, resource_group_name, bastion_host_name,
:type bastion_host_name: str
:param vms: List of VM references.
:type vms:
list[~azure.mgmt.network.v2020_06_01.models.BastionShareableLink]
list[~azure.mgmt.network.v2020_07_01.models.BastionShareableLink]
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
Expand Down Expand Up @@ -145,6 +147,8 @@ def delete_bastion_shareable_link(self, resource_group_name, bastion_host_name,
from .v2020_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2020-06-01':
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2020-07-01':
from .v2020_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
Expand All @@ -171,7 +175,7 @@ def disconnect_active_sessions(self, resource_group_name, bastion_host_name, ses
overrides<msrest:optionsforoperations>`.
:return: An iterator like instance of BastionSessionState
:rtype:
~azure.mgmt.network.v2020_06_01.models.BastionSessionStatePaged[~azure.mgmt.network.v2020_06_01.models.BastionSessionState]
~azure.mgmt.network.v2020_07_01.models.BastionSessionStatePaged[~azure.mgmt.network.v2020_07_01.models.BastionSessionState]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
Expand All @@ -190,6 +194,8 @@ def disconnect_active_sessions(self, resource_group_name, bastion_host_name, ses
from .v2020_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2020-06-01':
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2020-07-01':
from .v2020_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
Expand All @@ -216,7 +222,7 @@ def generatevirtualwanvpnserverconfigurationvpnprofile(self, resource_group_name
:param authentication_method: VPN client authentication method.
Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
:type authentication_method: str or
~azure.mgmt.network.v2020_06_01.models.AuthenticationMethod
~azure.mgmt.network.v2020_07_01.models.AuthenticationMethod
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
Expand All @@ -225,9 +231,9 @@ def generatevirtualwanvpnserverconfigurationvpnprofile(self, resource_group_name
:return: An instance of LROPoller that returns VpnProfileResponse or
ClientRawResponse<VpnProfileResponse> if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2020_06_01.models.VpnProfileResponse]
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2020_07_01.models.VpnProfileResponse]
or
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2020_06_01.models.VpnProfileResponse]]
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2020_07_01.models.VpnProfileResponse]]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
Expand All @@ -248,6 +254,8 @@ def generatevirtualwanvpnserverconfigurationvpnprofile(self, resource_group_name
from .v2020_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2020-06-01':
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2020-07-01':
from .v2020_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
Expand All @@ -274,9 +282,9 @@ def get_active_sessions(self, resource_group_name, bastion_host_name, custom_hea
BastionActiveSessionListResult or
ClientRawResponse<BastionActiveSessionListResult> if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2020_06_01.models.BastionActiveSessionListResult]
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2020_07_01.models.BastionActiveSessionListResult]
or
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2020_06_01.models.BastionActiveSessionListResult]]
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2020_07_01.models.BastionActiveSessionListResult]]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
Expand All @@ -295,6 +303,8 @@ def get_active_sessions(self, resource_group_name, bastion_host_name, custom_hea
from .v2020_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2020-06-01':
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2020-07-01':
from .v2020_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
Expand All @@ -315,15 +325,15 @@ def get_bastion_shareable_link(self, resource_group_name, bastion_host_name, vms
:type bastion_host_name: str
:param vms: List of VM references.
:type vms:
list[~azure.mgmt.network.v2020_06_01.models.BastionShareableLink]
list[~azure.mgmt.network.v2020_07_01.models.BastionShareableLink]
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: An iterator like instance of BastionShareableLink
:rtype:
~azure.mgmt.network.v2020_06_01.models.BastionShareableLinkPaged[~azure.mgmt.network.v2020_06_01.models.BastionShareableLink]
~azure.mgmt.network.v2020_07_01.models.BastionShareableLinkPaged[~azure.mgmt.network.v2020_07_01.models.BastionShareableLink]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
Expand All @@ -342,6 +352,8 @@ def get_bastion_shareable_link(self, resource_group_name, bastion_host_name, vms
from .v2020_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2020-06-01':
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2020-07-01':
from .v2020_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
Expand All @@ -362,7 +374,7 @@ def put_bastion_shareable_link(self, resource_group_name, bastion_host_name, vms
:type bastion_host_name: str
:param vms: List of VM references.
:type vms:
list[~azure.mgmt.network.v2020_06_01.models.BastionShareableLink]
list[~azure.mgmt.network.v2020_07_01.models.BastionShareableLink]
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
Expand All @@ -372,9 +384,9 @@ def put_bastion_shareable_link(self, resource_group_name, bastion_host_name, vms
BastionShareableLinkListResult or
ClientRawResponse<BastionShareableLinkListResult> if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2020_06_01.models.BastionShareableLinkListResult]
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2020_07_01.models.BastionShareableLinkListResult]
or
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2020_06_01.models.BastionShareableLinkListResult]]
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2020_07_01.models.BastionShareableLinkListResult]]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
Expand All @@ -393,6 +405,8 @@ def put_bastion_shareable_link(self, resource_group_name, bastion_host_name, vms
from .v2020_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2020-06-01':
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2020-07-01':
from .v2020_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
Expand All @@ -418,7 +432,7 @@ def supported_security_providers(self, resource_group_name, virtual_wan_name, cu
overrides<msrest:optionsforoperations>`.
:return: VirtualWanSecurityProviders or ClientRawResponse if raw=true
:rtype:
~azure.mgmt.network.v2020_06_01.models.VirtualWanSecurityProviders or
~azure.mgmt.network.v2020_07_01.models.VirtualWanSecurityProviders or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
Expand Down Expand Up @@ -456,6 +470,8 @@ def supported_security_providers(self, resource_group_name, virtual_wan_name, cu
from .v2020_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2020-06-01':
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2020-07-01':
from .v2020_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
from .v2019_07_01.models import *
from .v2020_04_01.models import *
from .v2020_06_01.models import *
from .v2020_07_01.models import *
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
from ._models_py3 import BastionActiveSessionListResult
from ._models_py3 import BastionHost
from ._models_py3 import BastionHostIPConfiguration
from ._models_py3 import BastionHostListResult
from ._models_py3 import BastionSessionState
from ._models_py3 import BastionShareableLink
from ._models_py3 import BastionShareableLinkListRequest
Expand Down Expand Up @@ -508,7 +507,6 @@
from ._models import BastionActiveSessionListResult
from ._models import BastionHost
from ._models import BastionHostIPConfiguration
from ._models import BastionHostListResult
from ._models import BastionSessionState
from ._models import BastionShareableLink
from ._models import BastionShareableLinkListRequest
Expand Down Expand Up @@ -1134,7 +1132,6 @@
'BastionActiveSessionListResult',
'BastionHost',
'BastionHostIPConfiguration',
'BastionHostListResult',
'BastionSessionState',
'BastionShareableLink',
'BastionShareableLinkListRequest',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4066,26 +4066,6 @@ def __init__(self, **kwargs):
self.type = None


class BastionHostListResult(Model):
"""Response for ListBastionHosts API service call.

:param value: List of Bastion Hosts in a resource group.
:type value: list[~azure.mgmt.network.v2020_05_01.models.BastionHost]
:param next_link: URL to get the next set of results.
:type next_link: str
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[BastionHost]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}

def __init__(self, **kwargs):
super(BastionHostListResult, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.next_link = kwargs.get('next_link', None)


class BastionSessionState(Model):
"""The session state detail for a target.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4066,26 +4066,6 @@ def __init__(self, *, subnet, public_ip_address, id: str=None, private_ip_alloca
self.type = None


class BastionHostListResult(Model):
"""Response for ListBastionHosts API service call.

:param value: List of Bastion Hosts in a resource group.
:type value: list[~azure.mgmt.network.v2020_05_01.models.BastionHost]
:param next_link: URL to get the next set of results.
:type next_link: str
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[BastionHost]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}

def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None:
super(BastionHostListResult, self).__init__(**kwargs)
self.value = value
self.next_link = next_link


class BastionSessionState(Model):
"""The session state detail for a target.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,64 +629,3 @@ def internal_paging(next_link=None):

return deserialized
list_usage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/usages'}

def get_bastion_hosts(
self, resource_group_name, virtual_network_name, custom_headers=None, raw=False, **operation_config):
"""Get a list of bastion hosts accessible from the given network.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param virtual_network_name: The name of the virtual network.
:type virtual_network_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: BastionHostListResult or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.network.v2020_05_01.models.BastionHostListResult
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = self.get_bastion_hosts.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)

# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('BastionHostListResult', response)

if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response

return deserialized
get_bastion_hosts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/bastionHosts'}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from ._configuration import NetworkManagementClientConfiguration
from ._network_management_client import NetworkManagementClient
__all__ = ['NetworkManagementClient', 'NetworkManagementClientConfiguration']

from .version import VERSION

__version__ = VERSION

Loading

0 comments on commit 323f91b

Please sign in to comment.