diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/aio/operations/_network_interfaces_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/aio/operations/_network_interfaces_operations.py index 93321b66b3505..92464f85d09a2 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/aio/operations/_network_interfaces_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/aio/operations/_network_interfaces_operations.py @@ -1161,226 +1161,3 @@ async def get_virtual_machine_scale_set_ip_configuration( return deserialized get_virtual_machine_scale_set_ip_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}'} # type: ignore - - def list_cloud_service_role_instance_network_interfaces( - self, - resource_group_name: str, - cloud_service_name: str, - role_instance_name: str, - **kwargs - ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: - """Gets information about all network interfaces in a role instance in a cloud service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cloud_service_name: The name of the cloud service. - :type cloud_service_name: str - :param role_instance_name: The name of role instance. - :type role_instance_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2020_07_01.models.NetworkInterfaceListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_cloud_service_role_instance_network_interfaces.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), - 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_cloud_service_role_instance_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces'} # type: ignore - - def list_cloud_service_network_interfaces( - self, - resource_group_name: str, - cloud_service_name: str, - **kwargs - ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: - """Gets all network interfaces in a cloud service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cloud_service_name: The name of the cloud service. - :type cloud_service_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2020_07_01.models.NetworkInterfaceListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_cloud_service_network_interfaces.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_cloud_service_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/networkInterfaces'} # type: ignore - - async def get_cloud_service_network_interface( - self, - resource_group_name: str, - cloud_service_name: str, - role_instance_name: str, - network_interface_name: str, - expand: Optional[str] = None, - **kwargs - ) -> "_models.NetworkInterface": - """Get the specified network interface in a cloud service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cloud_service_name: The name of the cloud service. - :type cloud_service_name: str - :param role_instance_name: The name of role instance. - :type role_instance_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkInterface, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2020_07_01.models.NetworkInterface - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01" - accept = "application/json" - - # Construct URL - url = self.get_cloud_service_network_interface.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), - 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkInterface', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_cloud_service_network_interface.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/aio/operations/_public_ip_addresses_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/aio/operations/_public_ip_addresses_operations.py index 95a3a057a120c..9fd68c0b9ac7f 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/aio/operations/_public_ip_addresses_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/aio/operations/_public_ip_addresses_operations.py @@ -783,243 +783,3 @@ async def get_virtual_machine_scale_set_public_ip_address( return deserialized get_virtual_machine_scale_set_public_ip_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}'} # type: ignore - - def list_cloud_service_public_ip_addresses( - self, - resource_group_name: str, - cloud_service_name: str, - **kwargs - ) -> AsyncIterable["_models.PublicIPAddressListResult"]: - """Gets information about all public IP addresses on a cloud service level. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cloud_service_name: The name of the cloud service. - :type cloud_service_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2020_07_01.models.PublicIPAddressListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_cloud_service_public_ip_addresses.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_cloud_service_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/publicipaddresses'} # type: ignore - - def list_cloud_service_role_instance_public_ip_addresses( - self, - resource_group_name: str, - cloud_service_name: str, - role_instance_name: str, - network_interface_name: str, - ip_configuration_name: str, - **kwargs - ) -> AsyncIterable["_models.PublicIPAddressListResult"]: - """Gets information about all public IP addresses in a role instance IP configuration in a cloud - service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cloud_service_name: The name of the cloud service. - :type cloud_service_name: str - :param role_instance_name: The name of role instance. - :type role_instance_name: str - :param network_interface_name: The network interface name. - :type network_interface_name: str - :param ip_configuration_name: The IP configuration name. - :type ip_configuration_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2020_07_01.models.PublicIPAddressListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_cloud_service_role_instance_public_ip_addresses.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), - 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_cloud_service_role_instance_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses'} # type: ignore - - async def get_cloud_service_public_ip_address( - self, - resource_group_name: str, - cloud_service_name: str, - role_instance_name: str, - network_interface_name: str, - ip_configuration_name: str, - public_ip_address_name: str, - expand: Optional[str] = None, - **kwargs - ) -> "_models.PublicIPAddress": - """Get the specified public IP address in a cloud service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cloud_service_name: The name of the cloud service. - :type cloud_service_name: str - :param role_instance_name: The role instance name. - :type role_instance_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param ip_configuration_name: The name of the IP configuration. - :type ip_configuration_name: str - :param public_ip_address_name: The name of the public IP Address. - :type public_ip_address_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PublicIPAddress, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2020_07_01.models.PublicIPAddress - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01" - accept = "application/json" - - # Construct URL - url = self.get_cloud_service_public_ip_address.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), - 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_cloud_service_public_ip_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_models.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_models.py index 0c63c6b0af66b..cbca27ff7501a 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_models.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_models.py @@ -8339,6 +8339,8 @@ class ExpressRouteConnection(SubResource): :type routing_weight: int :param enable_internet_security: Enable internet security. :type enable_internet_security: bool + :param express_route_gateway_bypass: Enable FastPath to vWan Firewall hub. + :type express_route_gateway_bypass: bool :param routing_configuration: The Routing Configuration indicating the associated and propagated route tables on this connection. :type routing_configuration: ~azure.mgmt.network.v2020_07_01.models.RoutingConfiguration @@ -8357,6 +8359,7 @@ class ExpressRouteConnection(SubResource): 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, 'enable_internet_security': {'key': 'properties.enableInternetSecurity', 'type': 'bool'}, + 'express_route_gateway_bypass': {'key': 'properties.expressRouteGatewayBypass', 'type': 'bool'}, 'routing_configuration': {'key': 'properties.routingConfiguration', 'type': 'RoutingConfiguration'}, } @@ -8371,6 +8374,7 @@ def __init__( self.authorization_key = kwargs.get('authorization_key', None) self.routing_weight = kwargs.get('routing_weight', None) self.enable_internet_security = kwargs.get('enable_internet_security', None) + self.express_route_gateway_bypass = kwargs.get('express_route_gateway_bypass', None) self.routing_configuration = kwargs.get('routing_configuration', None) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_models_py3.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_models_py3.py index 1f5187c5404be..1ee59ed6d3da0 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_models_py3.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_models_py3.py @@ -9310,6 +9310,8 @@ class ExpressRouteConnection(SubResource): :type routing_weight: int :param enable_internet_security: Enable internet security. :type enable_internet_security: bool + :param express_route_gateway_bypass: Enable FastPath to vWan Firewall hub. + :type express_route_gateway_bypass: bool :param routing_configuration: The Routing Configuration indicating the associated and propagated route tables on this connection. :type routing_configuration: ~azure.mgmt.network.v2020_07_01.models.RoutingConfiguration @@ -9328,6 +9330,7 @@ class ExpressRouteConnection(SubResource): 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, 'enable_internet_security': {'key': 'properties.enableInternetSecurity', 'type': 'bool'}, + 'express_route_gateway_bypass': {'key': 'properties.expressRouteGatewayBypass', 'type': 'bool'}, 'routing_configuration': {'key': 'properties.routingConfiguration', 'type': 'RoutingConfiguration'}, } @@ -9340,6 +9343,7 @@ def __init__( authorization_key: Optional[str] = None, routing_weight: Optional[int] = None, enable_internet_security: Optional[bool] = None, + express_route_gateway_bypass: Optional[bool] = None, routing_configuration: Optional["RoutingConfiguration"] = None, **kwargs ): @@ -9350,6 +9354,7 @@ def __init__( self.authorization_key = authorization_key self.routing_weight = routing_weight self.enable_internet_security = enable_internet_security + self.express_route_gateway_bypass = express_route_gateway_bypass self.routing_configuration = routing_configuration diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_network_interfaces_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_network_interfaces_operations.py index 93ac2b85cb8c7..d91f6723efa17 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_network_interfaces_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_network_interfaces_operations.py @@ -1182,229 +1182,3 @@ def get_virtual_machine_scale_set_ip_configuration( return deserialized get_virtual_machine_scale_set_ip_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}'} # type: ignore - - def list_cloud_service_role_instance_network_interfaces( - self, - resource_group_name, # type: str - cloud_service_name, # type: str - role_instance_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.NetworkInterfaceListResult"] - """Gets information about all network interfaces in a role instance in a cloud service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cloud_service_name: The name of the cloud service. - :type cloud_service_name: str - :param role_instance_name: The name of role instance. - :type role_instance_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2020_07_01.models.NetworkInterfaceListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_cloud_service_role_instance_network_interfaces.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), - 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_cloud_service_role_instance_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces'} # type: ignore - - def list_cloud_service_network_interfaces( - self, - resource_group_name, # type: str - cloud_service_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.NetworkInterfaceListResult"] - """Gets all network interfaces in a cloud service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cloud_service_name: The name of the cloud service. - :type cloud_service_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2020_07_01.models.NetworkInterfaceListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_cloud_service_network_interfaces.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_cloud_service_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/networkInterfaces'} # type: ignore - - def get_cloud_service_network_interface( - self, - resource_group_name, # type: str - cloud_service_name, # type: str - role_instance_name, # type: str - network_interface_name, # type: str - expand=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.NetworkInterface" - """Get the specified network interface in a cloud service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cloud_service_name: The name of the cloud service. - :type cloud_service_name: str - :param role_instance_name: The name of role instance. - :type role_instance_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkInterface, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2020_07_01.models.NetworkInterface - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01" - accept = "application/json" - - # Construct URL - url = self.get_cloud_service_network_interface.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), - 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkInterface', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_cloud_service_network_interface.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_public_ip_addresses_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_public_ip_addresses_operations.py index 14571a06d3c9d..5f80c47bae199 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_public_ip_addresses_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_public_ip_addresses_operations.py @@ -798,246 +798,3 @@ def get_virtual_machine_scale_set_public_ip_address( return deserialized get_virtual_machine_scale_set_public_ip_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}'} # type: ignore - - def list_cloud_service_public_ip_addresses( - self, - resource_group_name, # type: str - cloud_service_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.PublicIPAddressListResult"] - """Gets information about all public IP addresses on a cloud service level. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cloud_service_name: The name of the cloud service. - :type cloud_service_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2020_07_01.models.PublicIPAddressListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_cloud_service_public_ip_addresses.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_cloud_service_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/publicipaddresses'} # type: ignore - - def list_cloud_service_role_instance_public_ip_addresses( - self, - resource_group_name, # type: str - cloud_service_name, # type: str - role_instance_name, # type: str - network_interface_name, # type: str - ip_configuration_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.PublicIPAddressListResult"] - """Gets information about all public IP addresses in a role instance IP configuration in a cloud - service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cloud_service_name: The name of the cloud service. - :type cloud_service_name: str - :param role_instance_name: The name of role instance. - :type role_instance_name: str - :param network_interface_name: The network interface name. - :type network_interface_name: str - :param ip_configuration_name: The IP configuration name. - :type ip_configuration_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2020_07_01.models.PublicIPAddressListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_cloud_service_role_instance_public_ip_addresses.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), - 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_cloud_service_role_instance_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses'} # type: ignore - - def get_cloud_service_public_ip_address( - self, - resource_group_name, # type: str - cloud_service_name, # type: str - role_instance_name, # type: str - network_interface_name, # type: str - ip_configuration_name, # type: str - public_ip_address_name, # type: str - expand=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.PublicIPAddress" - """Get the specified public IP address in a cloud service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cloud_service_name: The name of the cloud service. - :type cloud_service_name: str - :param role_instance_name: The role instance name. - :type role_instance_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param ip_configuration_name: The name of the IP configuration. - :type ip_configuration_name: str - :param public_ip_address_name: The name of the public IP Address. - :type public_ip_address_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PublicIPAddress, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2020_07_01.models.PublicIPAddress - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01" - accept = "application/json" - - # Construct URL - url = self.get_cloud_service_public_ip_address.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), - 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_cloud_service_public_ip_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}'} # type: ignore