diff --git a/azure-mgmt-network/azure/mgmt/network/network_management_client.py b/azure-mgmt-network/azure/mgmt/network/network_management_client.py index 0bd7ccde2172..8aea2bed1db3 100644 --- a/azure-mgmt-network/azure/mgmt/network/network_management_client.py +++ b/azure-mgmt-network/azure/mgmt/network/network_management_client.py @@ -368,6 +368,19 @@ def available_endpoint_services(self): raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def azure_firewall_fqdn_tags(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`AzureFirewallFqdnTagsOperations` + """ + api_version = self._get_api_version('azure_firewall_fqdn_tags') + if api_version == '2018-08-01': + from .v2018_08_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def azure_firewalls(self): """Instance depends on the API version: @@ -1312,6 +1325,19 @@ def network_interface_load_balancers(self): raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def network_interface_tap_configurations(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`NetworkInterfaceTapConfigurationsOperations` + """ + api_version = self._get_api_version('network_interface_tap_configurations') + if api_version == '2018-08-01': + from .v2018_08_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def network_interfaces(self): """Instance depends on the API version: @@ -2223,6 +2249,19 @@ def virtual_network_peerings(self): raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def virtual_network_taps(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`VirtualNetworkTapsOperations` + """ + api_version = self._get_api_version('virtual_network_taps') + if api_version == '2018-08-01': + from .v2018_08_01.operations import VirtualNetworkTapsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def virtual_networks(self): """Instance depends on the API version: diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/__init__.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/__init__.py index 54ff3a4e8517..fc341247365f 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/__init__.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/__init__.py @@ -10,9 +10,8 @@ # -------------------------------------------------------------------------- try: + from .network_interface_tap_configuration_py3 import NetworkInterfaceTapConfiguration from .sub_resource_py3 import SubResource - from .backend_address_pool_py3 import BackendAddressPool - from .inbound_nat_rule_py3 import InboundNatRule from .application_security_group_py3 import ApplicationSecurityGroup from .security_rule_py3 import SecurityRule from .network_interface_dns_settings_py3 import NetworkInterfaceDnsSettings @@ -30,6 +29,10 @@ from .ip_configuration_py3 import IPConfiguration from .resource_navigation_link_py3 import ResourceNavigationLink from .subnet_py3 import Subnet + from .frontend_ip_configuration_py3 import FrontendIPConfiguration + from .virtual_network_tap_py3 import VirtualNetworkTap + from .backend_address_pool_py3 import BackendAddressPool + from .inbound_nat_rule_py3 import InboundNatRule from .network_interface_ip_configuration_py3 import NetworkInterfaceIPConfiguration from .application_gateway_backend_address_py3 import ApplicationGatewayBackendAddress from .application_gateway_backend_address_pool_py3 import ApplicationGatewayBackendAddressPool @@ -74,6 +77,7 @@ from .azure_firewall_network_rule_py3 import AzureFirewallNetworkRule from .azure_firewall_network_rule_collection_py3 import AzureFirewallNetworkRuleCollection from .azure_firewall_py3 import AzureFirewall + from .azure_firewall_fqdn_tag_py3 import AzureFirewallFqdnTag from .dns_name_availability_result_py3 import DnsNameAvailabilityResult from .ddos_protection_plan_py3 import DdosProtectionPlan from .endpoint_service_result_py3 import EndpointServiceResult @@ -102,7 +106,6 @@ from .express_route_cross_connection_peering_py3 import ExpressRouteCrossConnectionPeering from .express_route_cross_connection_py3 import ExpressRouteCrossConnection from .load_balancer_sku_py3 import LoadBalancerSku - from .frontend_ip_configuration_py3 import FrontendIPConfiguration from .load_balancing_rule_py3 import LoadBalancingRule from .probe_py3 import Probe from .inbound_nat_pool_py3 import InboundNatPool @@ -239,9 +242,8 @@ from .vpn_gateway_py3 import VpnGateway from .vpn_site_id_py3 import VpnSiteId except (SyntaxError, ImportError): + from .network_interface_tap_configuration import NetworkInterfaceTapConfiguration from .sub_resource import SubResource - from .backend_address_pool import BackendAddressPool - from .inbound_nat_rule import InboundNatRule from .application_security_group import ApplicationSecurityGroup from .security_rule import SecurityRule from .network_interface_dns_settings import NetworkInterfaceDnsSettings @@ -259,6 +261,10 @@ from .ip_configuration import IPConfiguration from .resource_navigation_link import ResourceNavigationLink from .subnet import Subnet + from .frontend_ip_configuration import FrontendIPConfiguration + from .virtual_network_tap import VirtualNetworkTap + from .backend_address_pool import BackendAddressPool + from .inbound_nat_rule import InboundNatRule from .network_interface_ip_configuration import NetworkInterfaceIPConfiguration from .application_gateway_backend_address import ApplicationGatewayBackendAddress from .application_gateway_backend_address_pool import ApplicationGatewayBackendAddressPool @@ -303,6 +309,7 @@ from .azure_firewall_network_rule import AzureFirewallNetworkRule from .azure_firewall_network_rule_collection import AzureFirewallNetworkRuleCollection from .azure_firewall import AzureFirewall + from .azure_firewall_fqdn_tag import AzureFirewallFqdnTag from .dns_name_availability_result import DnsNameAvailabilityResult from .ddos_protection_plan import DdosProtectionPlan from .endpoint_service_result import EndpointServiceResult @@ -331,7 +338,6 @@ from .express_route_cross_connection_peering import ExpressRouteCrossConnectionPeering from .express_route_cross_connection import ExpressRouteCrossConnection from .load_balancer_sku import LoadBalancerSku - from .frontend_ip_configuration import FrontendIPConfiguration from .load_balancing_rule import LoadBalancingRule from .probe import Probe from .inbound_nat_pool import InboundNatPool @@ -471,6 +477,7 @@ from .application_gateway_ssl_predefined_policy_paged import ApplicationGatewaySslPredefinedPolicyPaged from .application_security_group_paged import ApplicationSecurityGroupPaged from .azure_firewall_paged import AzureFirewallPaged +from .azure_firewall_fqdn_tag_paged import AzureFirewallFqdnTagPaged from .ddos_protection_plan_paged import DdosProtectionPlanPaged from .endpoint_service_result_paged import EndpointServiceResultPaged from .express_route_circuit_authorization_paged import ExpressRouteCircuitAuthorizationPaged @@ -487,6 +494,7 @@ from .network_interface_paged import NetworkInterfacePaged from .probe_paged import ProbePaged from .network_interface_ip_configuration_paged import NetworkInterfaceIPConfigurationPaged +from .network_interface_tap_configuration_paged import NetworkInterfaceTapConfigurationPaged from .network_security_group_paged import NetworkSecurityGroupPaged from .security_rule_paged import SecurityRulePaged from .network_watcher_paged import NetworkWatcherPaged @@ -507,6 +515,7 @@ from .virtual_network_usage_paged import VirtualNetworkUsagePaged from .subnet_paged import SubnetPaged from .virtual_network_peering_paged import VirtualNetworkPeeringPaged +from .virtual_network_tap_paged import VirtualNetworkTapPaged from .virtual_network_gateway_paged import VirtualNetworkGatewayPaged from .virtual_network_gateway_connection_list_entity_paged import VirtualNetworkGatewayConnectionListEntityPaged from .virtual_network_gateway_connection_paged import VirtualNetworkGatewayConnectionPaged @@ -518,14 +527,14 @@ from .vpn_gateway_paged import VpnGatewayPaged from .vpn_connection_paged import VpnConnectionPaged from .network_management_client_enums import ( - TransportProtocol, IPAllocationMethod, - IPVersion, SecurityRuleProtocol, SecurityRuleAccess, SecurityRuleDirection, RouteNextHopType, PublicIPAddressSkuName, + IPVersion, + TransportProtocol, ApplicationGatewayProtocol, ApplicationGatewayCookieBasedAffinity, ApplicationGatewayBackendHealthServerHealth, @@ -600,9 +609,8 @@ ) __all__ = [ + 'NetworkInterfaceTapConfiguration', 'SubResource', - 'BackendAddressPool', - 'InboundNatRule', 'ApplicationSecurityGroup', 'SecurityRule', 'NetworkInterfaceDnsSettings', @@ -620,6 +628,10 @@ 'IPConfiguration', 'ResourceNavigationLink', 'Subnet', + 'FrontendIPConfiguration', + 'VirtualNetworkTap', + 'BackendAddressPool', + 'InboundNatRule', 'NetworkInterfaceIPConfiguration', 'ApplicationGatewayBackendAddress', 'ApplicationGatewayBackendAddressPool', @@ -664,6 +676,7 @@ 'AzureFirewallNetworkRule', 'AzureFirewallNetworkRuleCollection', 'AzureFirewall', + 'AzureFirewallFqdnTag', 'DnsNameAvailabilityResult', 'DdosProtectionPlan', 'EndpointServiceResult', @@ -692,7 +705,6 @@ 'ExpressRouteCrossConnectionPeering', 'ExpressRouteCrossConnection', 'LoadBalancerSku', - 'FrontendIPConfiguration', 'LoadBalancingRule', 'Probe', 'InboundNatPool', @@ -832,6 +844,7 @@ 'ApplicationGatewaySslPredefinedPolicyPaged', 'ApplicationSecurityGroupPaged', 'AzureFirewallPaged', + 'AzureFirewallFqdnTagPaged', 'DdosProtectionPlanPaged', 'EndpointServiceResultPaged', 'ExpressRouteCircuitAuthorizationPaged', @@ -848,6 +861,7 @@ 'NetworkInterfacePaged', 'ProbePaged', 'NetworkInterfaceIPConfigurationPaged', + 'NetworkInterfaceTapConfigurationPaged', 'NetworkSecurityGroupPaged', 'SecurityRulePaged', 'NetworkWatcherPaged', @@ -868,6 +882,7 @@ 'VirtualNetworkUsagePaged', 'SubnetPaged', 'VirtualNetworkPeeringPaged', + 'VirtualNetworkTapPaged', 'VirtualNetworkGatewayPaged', 'VirtualNetworkGatewayConnectionListEntityPaged', 'VirtualNetworkGatewayConnectionPaged', @@ -878,14 +893,14 @@ 'HubVirtualNetworkConnectionPaged', 'VpnGatewayPaged', 'VpnConnectionPaged', - 'TransportProtocol', 'IPAllocationMethod', - 'IPVersion', 'SecurityRuleProtocol', 'SecurityRuleAccess', 'SecurityRuleDirection', 'RouteNextHopType', 'PublicIPAddressSkuName', + 'IPVersion', + 'TransportProtocol', 'ApplicationGatewayProtocol', 'ApplicationGatewayCookieBasedAffinity', 'ApplicationGatewayBackendHealthServerHealth', diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_application_rule.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_application_rule.py index 12c64307f2a1..728007d6cb95 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_application_rule.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_application_rule.py @@ -26,6 +26,8 @@ class AzureFirewallApplicationRule(Model): list[~azure.mgmt.network.v2018_08_01.models.AzureFirewallApplicationRuleProtocol] :param target_urls: List of URLs for this rule. :type target_urls: list[str] + :param fqdn_tags: List of FQDN Tags for this rule. + :type fqdn_tags: list[str] """ _attribute_map = { @@ -34,6 +36,7 @@ class AzureFirewallApplicationRule(Model): 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, 'protocols': {'key': 'protocols', 'type': '[AzureFirewallApplicationRuleProtocol]'}, 'target_urls': {'key': 'targetUrls', 'type': '[str]'}, + 'fqdn_tags': {'key': 'fqdnTags', 'type': '[str]'}, } def __init__(self, **kwargs): @@ -43,3 +46,4 @@ def __init__(self, **kwargs): self.source_addresses = kwargs.get('source_addresses', None) self.protocols = kwargs.get('protocols', None) self.target_urls = kwargs.get('target_urls', None) + self.fqdn_tags = kwargs.get('fqdn_tags', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_application_rule_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_application_rule_py3.py index 7e996ab033e0..ec1b33954df5 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_application_rule_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_application_rule_py3.py @@ -26,6 +26,8 @@ class AzureFirewallApplicationRule(Model): list[~azure.mgmt.network.v2018_08_01.models.AzureFirewallApplicationRuleProtocol] :param target_urls: List of URLs for this rule. :type target_urls: list[str] + :param fqdn_tags: List of FQDN Tags for this rule. + :type fqdn_tags: list[str] """ _attribute_map = { @@ -34,12 +36,14 @@ class AzureFirewallApplicationRule(Model): 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, 'protocols': {'key': 'protocols', 'type': '[AzureFirewallApplicationRuleProtocol]'}, 'target_urls': {'key': 'targetUrls', 'type': '[str]'}, + 'fqdn_tags': {'key': 'fqdnTags', 'type': '[str]'}, } - def __init__(self, *, name: str=None, description: str=None, source_addresses=None, protocols=None, target_urls=None, **kwargs) -> None: + def __init__(self, *, name: str=None, description: str=None, source_addresses=None, protocols=None, target_urls=None, fqdn_tags=None, **kwargs) -> None: super(AzureFirewallApplicationRule, self).__init__(**kwargs) self.name = name self.description = description self.source_addresses = source_addresses self.protocols = protocols self.target_urls = target_urls + self.fqdn_tags = fqdn_tags diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_fqdn_tag.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_fqdn_tag.py new file mode 100644 index 000000000000..bdcfb4d45e6c --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_fqdn_tag.py @@ -0,0 +1,63 @@ +# 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 .resource import Resource + + +class AzureFirewallFqdnTag(Resource): + """Azure Firewall FQDN Tag Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: The provisioning state of the resource. + :vartype provisioning_state: str + :ivar fqdn_tag_name: The name of this FQDN Tag. + :vartype fqdn_tag_name: str + :ivar etag: Gets a unique read-only string that changes whenever the + resource is updated. + :vartype etag: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'fqdn_tag_name': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'fqdn_tag_name': {'key': 'properties.fqdnTagName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureFirewallFqdnTag, self).__init__(**kwargs) + self.provisioning_state = None + self.fqdn_tag_name = None + self.etag = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_fqdn_tag_paged.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_fqdn_tag_paged.py new file mode 100644 index 000000000000..6cc01a07ba2d --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_fqdn_tag_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class AzureFirewallFqdnTagPaged(Paged): + """ + A paging container for iterating over a list of :class:`AzureFirewallFqdnTag ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AzureFirewallFqdnTag]'} + } + + def __init__(self, *args, **kwargs): + + super(AzureFirewallFqdnTagPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_fqdn_tag_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_fqdn_tag_py3.py new file mode 100644 index 000000000000..cb9e4ca2158d --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_fqdn_tag_py3.py @@ -0,0 +1,63 @@ +# 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 .resource_py3 import Resource + + +class AzureFirewallFqdnTag(Resource): + """Azure Firewall FQDN Tag Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: The provisioning state of the resource. + :vartype provisioning_state: str + :ivar fqdn_tag_name: The name of this FQDN Tag. + :vartype fqdn_tag_name: str + :ivar etag: Gets a unique read-only string that changes whenever the + resource is updated. + :vartype etag: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'fqdn_tag_name': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'fqdn_tag_name': {'key': 'properties.fqdnTagName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, location: str=None, tags=None, **kwargs) -> None: + super(AzureFirewallFqdnTag, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.fqdn_tag_name = None + self.etag = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_ip_configuration.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_ip_configuration.py index e3d24b603a86..b9bc81836ffd 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_ip_configuration.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_ip_configuration.py @@ -23,12 +23,8 @@ class AzureFirewallIPConfiguration(SubResource): :param subnet: Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'. :type subnet: ~azure.mgmt.network.v2018_08_01.models.SubResource - :param internal_public_ip_address: Reference of the PublicIP resource. - This field is a mandatory input. - :type internal_public_ip_address: - ~azure.mgmt.network.v2018_08_01.models.SubResource :param public_ip_address: Reference of the PublicIP resource. This field - is populated in the output. + is a mandatory input if subnet is not null. :type public_ip_address: ~azure.mgmt.network.v2018_08_01.models.SubResource :param provisioning_state: The provisioning state of the resource. @@ -47,7 +43,6 @@ class AzureFirewallIPConfiguration(SubResource): 'id': {'key': 'id', 'type': 'str'}, 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'internal_public_ip_address': {'key': 'properties.internalPublicIpAddress', 'type': 'SubResource'}, 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -58,7 +53,6 @@ def __init__(self, **kwargs): super(AzureFirewallIPConfiguration, self).__init__(**kwargs) self.private_ip_address = kwargs.get('private_ip_address', None) self.subnet = kwargs.get('subnet', None) - self.internal_public_ip_address = kwargs.get('internal_public_ip_address', None) self.public_ip_address = kwargs.get('public_ip_address', None) self.provisioning_state = kwargs.get('provisioning_state', None) self.name = kwargs.get('name', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_ip_configuration_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_ip_configuration_py3.py index 27e67a18f964..4f48de4304e2 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_ip_configuration_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_ip_configuration_py3.py @@ -23,12 +23,8 @@ class AzureFirewallIPConfiguration(SubResource): :param subnet: Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'. :type subnet: ~azure.mgmt.network.v2018_08_01.models.SubResource - :param internal_public_ip_address: Reference of the PublicIP resource. - This field is a mandatory input. - :type internal_public_ip_address: - ~azure.mgmt.network.v2018_08_01.models.SubResource :param public_ip_address: Reference of the PublicIP resource. This field - is populated in the output. + is a mandatory input if subnet is not null. :type public_ip_address: ~azure.mgmt.network.v2018_08_01.models.SubResource :param provisioning_state: The provisioning state of the resource. @@ -47,18 +43,16 @@ class AzureFirewallIPConfiguration(SubResource): 'id': {'key': 'id', 'type': 'str'}, 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'internal_public_ip_address': {'key': 'properties.internalPublicIpAddress', 'type': 'SubResource'}, 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, *, id: str=None, private_ip_address: str=None, subnet=None, internal_public_ip_address=None, public_ip_address=None, provisioning_state=None, name: str=None, etag: str=None, **kwargs) -> None: + def __init__(self, *, id: str=None, private_ip_address: str=None, subnet=None, public_ip_address=None, provisioning_state=None, name: str=None, etag: str=None, **kwargs) -> None: super(AzureFirewallIPConfiguration, self).__init__(id=id, **kwargs) self.private_ip_address = private_ip_address self.subnet = subnet - self.internal_public_ip_address = internal_public_ip_address self.public_ip_address = public_ip_address self.provisioning_state = provisioning_state self.name = name diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_ip_configuration.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_ip_configuration.py index 66e5e0dbb360..1e95a2fe4100 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_ip_configuration.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_ip_configuration.py @@ -17,6 +17,9 @@ class NetworkInterfaceIPConfiguration(SubResource): :param id: Resource ID. :type id: str + :param virtual_network_taps: The reference to Virtual Network Taps. + :type virtual_network_taps: + list[~azure.mgmt.network.v2018_08_01.models.VirtualNetworkTap] :param application_gateway_backend_address_pools: The reference of ApplicationGatewayBackendAddressPool resource. :type application_gateway_backend_address_pools: @@ -68,6 +71,7 @@ class NetworkInterfaceIPConfiguration(SubResource): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'virtual_network_taps': {'key': 'properties.virtualNetworkTaps', 'type': '[VirtualNetworkTap]'}, 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[BackendAddressPool]'}, 'load_balancer_inbound_nat_rules': {'key': 'properties.loadBalancerInboundNatRules', 'type': '[InboundNatRule]'}, @@ -85,6 +89,7 @@ class NetworkInterfaceIPConfiguration(SubResource): def __init__(self, **kwargs): super(NetworkInterfaceIPConfiguration, self).__init__(**kwargs) + self.virtual_network_taps = kwargs.get('virtual_network_taps', None) self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) self.load_balancer_inbound_nat_rules = kwargs.get('load_balancer_inbound_nat_rules', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_ip_configuration_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_ip_configuration_py3.py index d11b61f077de..f1fd7706aa8a 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_ip_configuration_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_ip_configuration_py3.py @@ -17,6 +17,9 @@ class NetworkInterfaceIPConfiguration(SubResource): :param id: Resource ID. :type id: str + :param virtual_network_taps: The reference to Virtual Network Taps. + :type virtual_network_taps: + list[~azure.mgmt.network.v2018_08_01.models.VirtualNetworkTap] :param application_gateway_backend_address_pools: The reference of ApplicationGatewayBackendAddressPool resource. :type application_gateway_backend_address_pools: @@ -68,6 +71,7 @@ class NetworkInterfaceIPConfiguration(SubResource): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'virtual_network_taps': {'key': 'properties.virtualNetworkTaps', 'type': '[VirtualNetworkTap]'}, 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[BackendAddressPool]'}, 'load_balancer_inbound_nat_rules': {'key': 'properties.loadBalancerInboundNatRules', 'type': '[InboundNatRule]'}, @@ -83,8 +87,9 @@ class NetworkInterfaceIPConfiguration(SubResource): 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, *, id: str=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_rules=None, private_ip_address: str=None, private_ip_allocation_method=None, private_ip_address_version=None, subnet=None, primary: bool=None, public_ip_address=None, application_security_groups=None, provisioning_state: str=None, name: str=None, etag: str=None, **kwargs) -> None: + def __init__(self, *, id: str=None, virtual_network_taps=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_rules=None, private_ip_address: str=None, private_ip_allocation_method=None, private_ip_address_version=None, subnet=None, primary: bool=None, public_ip_address=None, application_security_groups=None, provisioning_state: str=None, name: str=None, etag: str=None, **kwargs) -> None: super(NetworkInterfaceIPConfiguration, self).__init__(id=id, **kwargs) + self.virtual_network_taps = virtual_network_taps self.application_gateway_backend_address_pools = application_gateway_backend_address_pools self.load_balancer_backend_address_pools = load_balancer_backend_address_pools self.load_balancer_inbound_nat_rules = load_balancer_inbound_nat_rules diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_tap_configuration.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_tap_configuration.py new file mode 100644 index 000000000000..4096305a3c55 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_tap_configuration.py @@ -0,0 +1,54 @@ +# 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 .sub_resource import SubResource + + +class NetworkInterfaceTapConfiguration(SubResource): + """Tap configuration in a Network Interface. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource ID. + :type id: str + :param virtual_network_tap: The reference of the Virtual Network Tap + resource. + :type virtual_network_tap: + ~azure.mgmt.network.v2018_08_01.models.VirtualNetworkTap + :param name: The name of the resource that is unique within a resource + group. This name can be used to access the resource. + :type name: str + :param etag: A unique read-only string that changes whenever the resource + is updated. + :type etag: str + :ivar type: Sub Resource type. + :vartype type: str + """ + + _validation = { + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'virtual_network_tap': {'key': 'properties.virtualNetworkTap', 'type': 'VirtualNetworkTap'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceTapConfiguration, self).__init__(**kwargs) + self.virtual_network_tap = kwargs.get('virtual_network_tap', None) + self.name = kwargs.get('name', None) + self.etag = kwargs.get('etag', None) + self.type = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_tap_configuration_paged.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_tap_configuration_paged.py new file mode 100644 index 000000000000..155db4f86bdd --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_tap_configuration_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class NetworkInterfaceTapConfigurationPaged(Paged): + """ + A paging container for iterating over a list of :class:`NetworkInterfaceTapConfiguration ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NetworkInterfaceTapConfiguration]'} + } + + def __init__(self, *args, **kwargs): + + super(NetworkInterfaceTapConfigurationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_tap_configuration_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_tap_configuration_py3.py new file mode 100644 index 000000000000..0596f7bb2c97 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_tap_configuration_py3.py @@ -0,0 +1,54 @@ +# 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 .sub_resource_py3 import SubResource + + +class NetworkInterfaceTapConfiguration(SubResource): + """Tap configuration in a Network Interface. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource ID. + :type id: str + :param virtual_network_tap: The reference of the Virtual Network Tap + resource. + :type virtual_network_tap: + ~azure.mgmt.network.v2018_08_01.models.VirtualNetworkTap + :param name: The name of the resource that is unique within a resource + group. This name can be used to access the resource. + :type name: str + :param etag: A unique read-only string that changes whenever the resource + is updated. + :type etag: str + :ivar type: Sub Resource type. + :vartype type: str + """ + + _validation = { + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'virtual_network_tap': {'key': 'properties.virtualNetworkTap', 'type': 'VirtualNetworkTap'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, virtual_network_tap=None, name: str=None, etag: str=None, **kwargs) -> None: + super(NetworkInterfaceTapConfiguration, self).__init__(id=id, **kwargs) + self.virtual_network_tap = virtual_network_tap + self.name = name + self.etag = etag + self.type = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_management_client_enums.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_management_client_enums.py index 2a455544e0a5..4a419a04c43a 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_management_client_enums.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_management_client_enums.py @@ -12,25 +12,12 @@ from enum import Enum -class TransportProtocol(str, Enum): - - udp = "Udp" - tcp = "Tcp" - all = "All" - - class IPAllocationMethod(str, Enum): static = "Static" dynamic = "Dynamic" -class IPVersion(str, Enum): - - ipv4 = "IPv4" - ipv6 = "IPv6" - - class SecurityRuleProtocol(str, Enum): tcp = "Tcp" @@ -65,6 +52,19 @@ class PublicIPAddressSkuName(str, Enum): standard = "Standard" +class IPVersion(str, Enum): + + ipv4 = "IPv4" + ipv6 = "IPv6" + + +class TransportProtocol(str, Enum): + + udp = "Udp" + tcp = "Tcp" + all = "All" + + class ApplicationGatewayProtocol(str, Enum): http = "Http" diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/virtual_network_tap.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/virtual_network_tap.py new file mode 100644 index 000000000000..3017d81d0428 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/virtual_network_tap.py @@ -0,0 +1,77 @@ +# 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 .resource import Resource + + +class VirtualNetworkTap(Resource): + """Virtual Network Tap resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param network_interface_tap_configurations: Specifies the list of + resource IDs for the network interface IP configuration that needs to be + tapped. + :type network_interface_tap_configurations: + list[~azure.mgmt.network.v2018_08_01.models.NetworkInterfaceTapConfiguration] + :param destination_network_interface_ip_configuration: The reference to + the private IP Address of the collector nic that will receive the tap + :type destination_network_interface_ip_configuration: + ~azure.mgmt.network.v2018_08_01.models.NetworkInterfaceIPConfiguration + :param destination_load_balancer_front_end_ip_configuration: The reference + to the private IP address on the internal Load Balancer that will receive + the tap + :type destination_load_balancer_front_end_ip_configuration: + ~azure.mgmt.network.v2018_08_01.models.FrontendIPConfiguration + :param destination_port: The VXLAN destination port that will receive the + tapped traffic. + :type destination_port: int + :param etag: Gets a unique read-only string that changes whenever the + resource is updated. + :type etag: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'network_interface_tap_configurations': {'key': 'properties.networkInterfaceTapConfigurations', 'type': '[NetworkInterfaceTapConfiguration]'}, + 'destination_network_interface_ip_configuration': {'key': 'properties.destinationNetworkInterfaceIPConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, + 'destination_load_balancer_front_end_ip_configuration': {'key': 'properties.destinationLoadBalancerFrontEndIPConfiguration', 'type': 'FrontendIPConfiguration'}, + 'destination_port': {'key': 'properties.destinationPort', 'type': 'int'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkTap, self).__init__(**kwargs) + self.network_interface_tap_configurations = kwargs.get('network_interface_tap_configurations', None) + self.destination_network_interface_ip_configuration = kwargs.get('destination_network_interface_ip_configuration', None) + self.destination_load_balancer_front_end_ip_configuration = kwargs.get('destination_load_balancer_front_end_ip_configuration', None) + self.destination_port = kwargs.get('destination_port', None) + self.etag = kwargs.get('etag', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/virtual_network_tap_paged.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/virtual_network_tap_paged.py new file mode 100644 index 000000000000..3324c9558721 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/virtual_network_tap_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class VirtualNetworkTapPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetworkTap ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetworkTap]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkTapPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/virtual_network_tap_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/virtual_network_tap_py3.py new file mode 100644 index 000000000000..8d219ba21c0d --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/virtual_network_tap_py3.py @@ -0,0 +1,77 @@ +# 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 .resource_py3 import Resource + + +class VirtualNetworkTap(Resource): + """Virtual Network Tap resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param network_interface_tap_configurations: Specifies the list of + resource IDs for the network interface IP configuration that needs to be + tapped. + :type network_interface_tap_configurations: + list[~azure.mgmt.network.v2018_08_01.models.NetworkInterfaceTapConfiguration] + :param destination_network_interface_ip_configuration: The reference to + the private IP Address of the collector nic that will receive the tap + :type destination_network_interface_ip_configuration: + ~azure.mgmt.network.v2018_08_01.models.NetworkInterfaceIPConfiguration + :param destination_load_balancer_front_end_ip_configuration: The reference + to the private IP address on the internal Load Balancer that will receive + the tap + :type destination_load_balancer_front_end_ip_configuration: + ~azure.mgmt.network.v2018_08_01.models.FrontendIPConfiguration + :param destination_port: The VXLAN destination port that will receive the + tapped traffic. + :type destination_port: int + :param etag: Gets a unique read-only string that changes whenever the + resource is updated. + :type etag: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'network_interface_tap_configurations': {'key': 'properties.networkInterfaceTapConfigurations', 'type': '[NetworkInterfaceTapConfiguration]'}, + 'destination_network_interface_ip_configuration': {'key': 'properties.destinationNetworkInterfaceIPConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, + 'destination_load_balancer_front_end_ip_configuration': {'key': 'properties.destinationLoadBalancerFrontEndIPConfiguration', 'type': 'FrontendIPConfiguration'}, + 'destination_port': {'key': 'properties.destinationPort', 'type': 'int'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, location: str=None, tags=None, network_interface_tap_configurations=None, destination_network_interface_ip_configuration=None, destination_load_balancer_front_end_ip_configuration=None, destination_port: int=None, etag: str=None, **kwargs) -> None: + super(VirtualNetworkTap, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.network_interface_tap_configurations = network_interface_tap_configurations + self.destination_network_interface_ip_configuration = destination_network_interface_ip_configuration + self.destination_load_balancer_front_end_ip_configuration = destination_load_balancer_front_end_ip_configuration + self.destination_port = destination_port + self.etag = etag diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/network_management_client.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/network_management_client.py index 3cdc25008473..b174fbdb33f8 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/network_management_client.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/network_management_client.py @@ -21,6 +21,7 @@ from .operations.application_gateways_operations import ApplicationGatewaysOperations from .operations.application_security_groups_operations import ApplicationSecurityGroupsOperations from .operations.azure_firewalls_operations import AzureFirewallsOperations +from .operations.azure_firewall_fqdn_tags_operations import AzureFirewallFqdnTagsOperations from .operations.ddos_protection_plans_operations import DdosProtectionPlansOperations from .operations.available_endpoint_services_operations import AvailableEndpointServicesOperations from .operations.express_route_circuit_authorizations_operations import ExpressRouteCircuitAuthorizationsOperations @@ -40,6 +41,7 @@ from .operations.network_interfaces_operations import NetworkInterfacesOperations from .operations.network_interface_ip_configurations_operations import NetworkInterfaceIPConfigurationsOperations from .operations.network_interface_load_balancers_operations import NetworkInterfaceLoadBalancersOperations +from .operations.network_interface_tap_configurations_operations import NetworkInterfaceTapConfigurationsOperations from .operations.network_security_groups_operations import NetworkSecurityGroupsOperations from .operations.security_rules_operations import SecurityRulesOperations from .operations.default_security_rules_operations import DefaultSecurityRulesOperations @@ -60,6 +62,7 @@ from .operations.virtual_networks_operations import VirtualNetworksOperations from .operations.subnets_operations import SubnetsOperations from .operations.virtual_network_peerings_operations import VirtualNetworkPeeringsOperations +from .operations.virtual_network_taps_operations import VirtualNetworkTapsOperations from .operations.virtual_network_gateways_operations import VirtualNetworkGatewaysOperations from .operations.virtual_network_gateway_connections_operations import VirtualNetworkGatewayConnectionsOperations from .operations.local_network_gateways_operations import LocalNetworkGatewaysOperations @@ -119,6 +122,8 @@ class NetworkManagementClient(SDKClient): :vartype application_security_groups: azure.mgmt.network.v2018_08_01.operations.ApplicationSecurityGroupsOperations :ivar azure_firewalls: AzureFirewalls operations :vartype azure_firewalls: azure.mgmt.network.v2018_08_01.operations.AzureFirewallsOperations + :ivar azure_firewall_fqdn_tags: AzureFirewallFqdnTags operations + :vartype azure_firewall_fqdn_tags: azure.mgmt.network.v2018_08_01.operations.AzureFirewallFqdnTagsOperations :ivar ddos_protection_plans: DdosProtectionPlans operations :vartype ddos_protection_plans: azure.mgmt.network.v2018_08_01.operations.DdosProtectionPlansOperations :ivar available_endpoint_services: AvailableEndpointServices operations @@ -157,6 +162,8 @@ class NetworkManagementClient(SDKClient): :vartype network_interface_ip_configurations: azure.mgmt.network.v2018_08_01.operations.NetworkInterfaceIPConfigurationsOperations :ivar network_interface_load_balancers: NetworkInterfaceLoadBalancers operations :vartype network_interface_load_balancers: azure.mgmt.network.v2018_08_01.operations.NetworkInterfaceLoadBalancersOperations + :ivar network_interface_tap_configurations: NetworkInterfaceTapConfigurations operations + :vartype network_interface_tap_configurations: azure.mgmt.network.v2018_08_01.operations.NetworkInterfaceTapConfigurationsOperations :ivar network_security_groups: NetworkSecurityGroups operations :vartype network_security_groups: azure.mgmt.network.v2018_08_01.operations.NetworkSecurityGroupsOperations :ivar security_rules: SecurityRules operations @@ -197,6 +204,8 @@ class NetworkManagementClient(SDKClient): :vartype subnets: azure.mgmt.network.v2018_08_01.operations.SubnetsOperations :ivar virtual_network_peerings: VirtualNetworkPeerings operations :vartype virtual_network_peerings: azure.mgmt.network.v2018_08_01.operations.VirtualNetworkPeeringsOperations + :ivar virtual_network_taps: VirtualNetworkTaps operations + :vartype virtual_network_taps: azure.mgmt.network.v2018_08_01.operations.VirtualNetworkTapsOperations :ivar virtual_network_gateways: VirtualNetworkGateways operations :vartype virtual_network_gateways: azure.mgmt.network.v2018_08_01.operations.VirtualNetworkGatewaysOperations :ivar virtual_network_gateway_connections: VirtualNetworkGatewayConnections operations @@ -244,6 +253,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.azure_firewalls = AzureFirewallsOperations( self._client, self.config, self._serialize, self._deserialize) + self.azure_firewall_fqdn_tags = AzureFirewallFqdnTagsOperations( + self._client, self.config, self._serialize, self._deserialize) self.ddos_protection_plans = DdosProtectionPlansOperations( self._client, self.config, self._serialize, self._deserialize) self.available_endpoint_services = AvailableEndpointServicesOperations( @@ -282,6 +293,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.network_interface_load_balancers = NetworkInterfaceLoadBalancersOperations( self._client, self.config, self._serialize, self._deserialize) + self.network_interface_tap_configurations = NetworkInterfaceTapConfigurationsOperations( + self._client, self.config, self._serialize, self._deserialize) self.network_security_groups = NetworkSecurityGroupsOperations( self._client, self.config, self._serialize, self._deserialize) self.security_rules = SecurityRulesOperations( @@ -322,6 +335,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.virtual_network_peerings = VirtualNetworkPeeringsOperations( self._client, self.config, self._serialize, self._deserialize) + self.virtual_network_taps = VirtualNetworkTapsOperations( + self._client, self.config, self._serialize, self._deserialize) self.virtual_network_gateways = VirtualNetworkGatewaysOperations( self._client, self.config, self._serialize, self._deserialize) self.virtual_network_gateway_connections = VirtualNetworkGatewayConnectionsOperations( diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/__init__.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/__init__.py index d6756f1d6600..98f9ad5f0850 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/__init__.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/__init__.py @@ -12,6 +12,7 @@ from .application_gateways_operations import ApplicationGatewaysOperations from .application_security_groups_operations import ApplicationSecurityGroupsOperations from .azure_firewalls_operations import AzureFirewallsOperations +from .azure_firewall_fqdn_tags_operations import AzureFirewallFqdnTagsOperations from .ddos_protection_plans_operations import DdosProtectionPlansOperations from .available_endpoint_services_operations import AvailableEndpointServicesOperations from .express_route_circuit_authorizations_operations import ExpressRouteCircuitAuthorizationsOperations @@ -31,6 +32,7 @@ from .network_interfaces_operations import NetworkInterfacesOperations from .network_interface_ip_configurations_operations import NetworkInterfaceIPConfigurationsOperations from .network_interface_load_balancers_operations import NetworkInterfaceLoadBalancersOperations +from .network_interface_tap_configurations_operations import NetworkInterfaceTapConfigurationsOperations from .network_security_groups_operations import NetworkSecurityGroupsOperations from .security_rules_operations import SecurityRulesOperations from .default_security_rules_operations import DefaultSecurityRulesOperations @@ -51,6 +53,7 @@ from .virtual_networks_operations import VirtualNetworksOperations from .subnets_operations import SubnetsOperations from .virtual_network_peerings_operations import VirtualNetworkPeeringsOperations +from .virtual_network_taps_operations import VirtualNetworkTapsOperations from .virtual_network_gateways_operations import VirtualNetworkGatewaysOperations from .virtual_network_gateway_connections_operations import VirtualNetworkGatewayConnectionsOperations from .local_network_gateways_operations import LocalNetworkGatewaysOperations @@ -66,6 +69,7 @@ 'ApplicationGatewaysOperations', 'ApplicationSecurityGroupsOperations', 'AzureFirewallsOperations', + 'AzureFirewallFqdnTagsOperations', 'DdosProtectionPlansOperations', 'AvailableEndpointServicesOperations', 'ExpressRouteCircuitAuthorizationsOperations', @@ -85,6 +89,7 @@ 'NetworkInterfacesOperations', 'NetworkInterfaceIPConfigurationsOperations', 'NetworkInterfaceLoadBalancersOperations', + 'NetworkInterfaceTapConfigurationsOperations', 'NetworkSecurityGroupsOperations', 'SecurityRulesOperations', 'DefaultSecurityRulesOperations', @@ -105,6 +110,7 @@ 'VirtualNetworksOperations', 'SubnetsOperations', 'VirtualNetworkPeeringsOperations', + 'VirtualNetworkTapsOperations', 'VirtualNetworkGatewaysOperations', 'VirtualNetworkGatewayConnectionsOperations', 'LocalNetworkGatewaysOperations', diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/azure_firewall_fqdn_tags_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/azure_firewall_fqdn_tags_operations.py new file mode 100644 index 000000000000..23267a67079b --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/azure_firewall_fqdn_tags_operations.py @@ -0,0 +1,102 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AzureFirewallFqdnTagsOperations(object): + """AzureFirewallFqdnTagsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client API version. Constant value: "2018-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-08-01" + + self.config = config + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """Gets all the Azure Firewall FQDN Tags in a subscription. + + :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`. + :return: An iterator like instance of AzureFirewallFqdnTag + :rtype: + ~azure.mgmt.network.v2018_08_01.models.AzureFirewallFqdnTagPaged[~azure.mgmt.network.v2018_08_01.models.AzureFirewallFqdnTag] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + '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') + + else: + url = next_link + query_parameters = {} + + # 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 + + return response + + # Deserialize response + deserialized = models.AzureFirewallFqdnTagPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AzureFirewallFqdnTagPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewallFqdnTags'} diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/network_interface_tap_configurations_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/network_interface_tap_configurations_operations.py new file mode 100644 index 000000000000..3b78d421df2f --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/network_interface_tap_configurations_operations.py @@ -0,0 +1,370 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class NetworkInterfaceTapConfigurationsOperations(object): + """NetworkInterfaceTapConfigurationsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client API version. Constant value: "2018-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-08-01" + + self.config = config + + + def _delete_initial( + self, resource_group_name, network_interface_name, tap_configuration_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'tapConfigurationName': self._serialize.url("tap_configuration_name", tap_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, network_interface_name, tap_configuration_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified tap configuration from the NetworkInterface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. + :type tap_configuration_name: str + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + tap_configuration_name=tap_configuration_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}'} + + def get( + self, resource_group_name, network_interface_name, tap_configuration_name, custom_headers=None, raw=False, **operation_config): + """Get the specified tap configuration on a network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. + :type tap_configuration_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`. + :return: NetworkInterfaceTapConfiguration or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.network.v2018_08_01.models.NetworkInterfaceTapConfiguration + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'tapConfigurationName': self._serialize.url("tap_configuration_name", tap_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 = {} + 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('NetworkInterfaceTapConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}'} + + + def _create_or_update_initial( + self, resource_group_name, network_interface_name, tap_configuration_name, tap_configuration_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'tapConfigurationName': self._serialize.url("tap_configuration_name", tap_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(tap_configuration_parameters, 'NetworkInterfaceTapConfiguration') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + 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('NetworkInterfaceTapConfiguration', response) + if response.status_code == 201: + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, network_interface_name, tap_configuration_name, tap_configuration_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a Tap configuration in the specified + NetworkInterface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. + :type tap_configuration_name: str + :param tap_configuration_parameters: Parameters supplied to the create + or update tap configuration operation. + :type tap_configuration_parameters: + ~azure.mgmt.network.v2018_08_01.models.NetworkInterfaceTapConfiguration + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + NetworkInterfaceTapConfiguration or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_08_01.models.NetworkInterfaceTapConfiguration] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_08_01.models.NetworkInterfaceTapConfiguration]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + tap_configuration_name=tap_configuration_name, + tap_configuration_parameters=tap_configuration_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}'} + + def list( + self, resource_group_name, network_interface_name, custom_headers=None, raw=False, **operation_config): + """Get all Tap configurations in a network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_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`. + :return: An iterator like instance of NetworkInterfaceTapConfiguration + :rtype: + ~azure.mgmt.network.v2018_08_01.models.NetworkInterfaceTapConfigurationPaged[~azure.mgmt.network.v2018_08_01.models.NetworkInterfaceTapConfiguration] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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 + + return response + + # Deserialize response + deserialized = models.NetworkInterfaceTapConfigurationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.NetworkInterfaceTapConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations'} diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/virtual_network_taps_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/virtual_network_taps_operations.py new file mode 100644 index 000000000000..97864621c4d7 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/virtual_network_taps_operations.py @@ -0,0 +1,518 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualNetworkTapsOperations(object): + """VirtualNetworkTapsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client API version. Constant value: "2018-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-08-01" + + self.config = config + + + def _delete_initial( + self, resource_group_name, tap_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'tapName': self._serialize.url("tap_name", tap_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 = {} + 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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, tap_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified virtual network tap. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param tap_name: The name of the virtual network tap. + :type tap_name: str + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + tap_name=tap_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}'} + + def get( + self, resource_group_name, tap_name, custom_headers=None, raw=False, **operation_config): + """Gets information about the specified virtual network tap. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param tap_name: The name of virtual network tap. + :type tap_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`. + :return: VirtualNetworkTap or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.network.v2018_08_01.models.VirtualNetworkTap or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'tapName': self._serialize.url("tap_name", tap_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('VirtualNetworkTap', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}'} + + + def _create_or_update_initial( + self, resource_group_name, tap_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'tapName': self._serialize.url("tap_name", tap_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' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(parameters, 'VirtualNetworkTap') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + 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('VirtualNetworkTap', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkTap', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, tap_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a Virtual Network Tap. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param tap_name: The name of the virtual network tap. + :type tap_name: str + :param parameters: Parameters supplied to the create or update virtual + network tap operation. + :type parameters: + ~azure.mgmt.network.v2018_08_01.models.VirtualNetworkTap + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualNetworkTap or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_08_01.models.VirtualNetworkTap] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_08_01.models.VirtualNetworkTap]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + tap_name=tap_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualNetworkTap', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}'} + + + def _update_tags_initial( + self, resource_group_name, tap_name, tags=None, custom_headers=None, raw=False, **operation_config): + tap_parameters = models.TagsObject(tags=tags) + + # Construct URL + url = self.update_tags.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'tapName': self._serialize.url("tap_name", tap_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' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(tap_parameters, 'TagsObject') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + 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('VirtualNetworkTap', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_tags( + self, resource_group_name, tap_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates an VirtualNetworkTap tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param tap_name: The name of the tap. + :type tap_name: str + :param tags: Resource tags. + :type tags: dict[str, str] + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualNetworkTap or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_08_01.models.VirtualNetworkTap] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_08_01.models.VirtualNetworkTap]] + :raises: :class:`CloudError` + """ + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + tap_name=tap_name, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualNetworkTap', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}'} + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """Gets all the VirtualNetworkTaps in a subscription. + + :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`. + :return: An iterator like instance of VirtualNetworkTap + :rtype: + ~azure.mgmt.network.v2018_08_01.models.VirtualNetworkTapPaged[~azure.mgmt.network.v2018_08_01.models.VirtualNetworkTap] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + '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') + + else: + url = next_link + query_parameters = {} + + # 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 + + return response + + # Deserialize response + deserialized = models.VirtualNetworkTapPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualNetworkTapPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworkTaps'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all the VirtualNetworkTaps in a subscription. + + :param resource_group_name: The name of the resource group. + :type resource_group_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`. + :return: An iterator like instance of VirtualNetworkTap + :rtype: + ~azure.mgmt.network.v2018_08_01.models.VirtualNetworkTapPaged[~azure.mgmt.network.v2018_08_01.models.VirtualNetworkTap] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_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') + + else: + url = next_link + query_parameters = {} + + # 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 + + return response + + # Deserialize response + deserialized = models.VirtualNetworkTapPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualNetworkTapPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps'}