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 8b53ba6b5068..1eb654379088 100644 --- a/azure-mgmt-network/azure/mgmt/network/network_management_client.py +++ b/azure-mgmt-network/azure/mgmt/network/network_management_client.py @@ -744,6 +744,19 @@ def express_route_circuits(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 express_route_connections(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRouteConnectionsOperations` + """ + api_version = self._get_api_version('express_route_connections') + if api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteConnectionsOperations 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 express_route_cross_connection_peerings(self): """Instance depends on the API version: @@ -794,6 +807,19 @@ def express_route_cross_connections(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 express_route_gateways(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRouteGatewaysOperations` + """ + api_version = self._get_api_version('express_route_gateways') + if api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteGatewaysOperations 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 express_route_service_providers(self): """Instance depends on the API version: @@ -914,6 +940,19 @@ def inbound_nat_rules(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 interface_endpoints(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`InterfaceEndpointsOperations` + """ + api_version = self._get_api_version('interface_endpoints') + if api_version == '2018-08-01': + from .v2018_08_01.operations import InterfaceEndpointsOperations 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 load_balancer_backend_address_pools(self): """Instance depends on the API version: @@ -1325,6 +1364,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: @@ -2236,6 +2288,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 0622e5b0f037..670793ff7cc6 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,11 +10,12 @@ # -------------------------------------------------------------------------- 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 .endpoint_service_py3 import EndpointService + from .interface_endpoint_py3 import InterfaceEndpoint from .network_interface_dns_settings_py3 import NetworkInterfaceDnsSettings from .network_interface_py3 import NetworkInterface from .network_security_group_py3 import NetworkSecurityGroup @@ -30,6 +31,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 @@ -43,6 +48,7 @@ from .application_gateway_ssl_policy_py3 import ApplicationGatewaySslPolicy from .application_gateway_ip_configuration_py3 import ApplicationGatewayIPConfiguration from .application_gateway_authentication_certificate_py3 import ApplicationGatewayAuthenticationCertificate + from .application_gateway_trusted_root_certificate_py3 import ApplicationGatewayTrustedRootCertificate from .application_gateway_ssl_certificate_py3 import ApplicationGatewaySslCertificate from .application_gateway_frontend_ip_configuration_py3 import ApplicationGatewayFrontendIPConfiguration from .application_gateway_frontend_port_py3 import ApplicationGatewayFrontendPort @@ -71,6 +77,9 @@ from .azure_firewall_application_rule_protocol_py3 import AzureFirewallApplicationRuleProtocol from .azure_firewall_application_rule_py3 import AzureFirewallApplicationRule from .azure_firewall_application_rule_collection_py3 import AzureFirewallApplicationRuleCollection + from .azure_firewall_nat_rc_action_py3 import AzureFirewallNatRCAction + from .azure_firewall_nat_rule_py3 import AzureFirewallNatRule + from .azure_firewall_nat_rule_collection_py3 import AzureFirewallNatRuleCollection from .azure_firewall_network_rule_py3 import AzureFirewallNetworkRule from .azure_firewall_network_rule_collection_py3 import AzureFirewallNetworkRuleCollection from .azure_firewall_py3 import AzureFirewall @@ -82,6 +91,7 @@ from .express_route_circuit_peering_config_py3 import ExpressRouteCircuitPeeringConfig from .route_filter_rule_py3 import RouteFilterRule from .express_route_circuit_stats_py3 import ExpressRouteCircuitStats + from .express_route_connection_id_py3 import ExpressRouteConnectionId from .express_route_circuit_connection_py3 import ExpressRouteCircuitConnection from .express_route_circuit_peering_py3 import ExpressRouteCircuitPeering from .route_filter_py3 import RouteFilter @@ -102,8 +112,13 @@ from .express_route_circuit_reference_py3 import ExpressRouteCircuitReference from .express_route_cross_connection_peering_py3 import ExpressRouteCrossConnectionPeering from .express_route_cross_connection_py3 import ExpressRouteCrossConnection + from .express_route_gateway_properties_auto_scale_configuration_bounds_py3 import ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds + from .express_route_gateway_properties_auto_scale_configuration_py3 import ExpressRouteGatewayPropertiesAutoScaleConfiguration + from .express_route_connection_py3 import ExpressRouteConnection + from .express_route_gateway_py3 import ExpressRouteGateway + from .express_route_gateway_list_py3 import ExpressRouteGatewayList + from .express_route_connection_list_py3 import ExpressRouteConnectionList 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 @@ -240,11 +255,12 @@ 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 .endpoint_service import EndpointService + from .interface_endpoint import InterfaceEndpoint from .network_interface_dns_settings import NetworkInterfaceDnsSettings from .network_interface import NetworkInterface from .network_security_group import NetworkSecurityGroup @@ -260,6 +276,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 @@ -273,6 +293,7 @@ from .application_gateway_ssl_policy import ApplicationGatewaySslPolicy from .application_gateway_ip_configuration import ApplicationGatewayIPConfiguration from .application_gateway_authentication_certificate import ApplicationGatewayAuthenticationCertificate + from .application_gateway_trusted_root_certificate import ApplicationGatewayTrustedRootCertificate from .application_gateway_ssl_certificate import ApplicationGatewaySslCertificate from .application_gateway_frontend_ip_configuration import ApplicationGatewayFrontendIPConfiguration from .application_gateway_frontend_port import ApplicationGatewayFrontendPort @@ -301,6 +322,9 @@ from .azure_firewall_application_rule_protocol import AzureFirewallApplicationRuleProtocol from .azure_firewall_application_rule import AzureFirewallApplicationRule from .azure_firewall_application_rule_collection import AzureFirewallApplicationRuleCollection + from .azure_firewall_nat_rc_action import AzureFirewallNatRCAction + from .azure_firewall_nat_rule import AzureFirewallNatRule + from .azure_firewall_nat_rule_collection import AzureFirewallNatRuleCollection from .azure_firewall_network_rule import AzureFirewallNetworkRule from .azure_firewall_network_rule_collection import AzureFirewallNetworkRuleCollection from .azure_firewall import AzureFirewall @@ -312,6 +336,7 @@ from .express_route_circuit_peering_config import ExpressRouteCircuitPeeringConfig from .route_filter_rule import RouteFilterRule from .express_route_circuit_stats import ExpressRouteCircuitStats + from .express_route_connection_id import ExpressRouteConnectionId from .express_route_circuit_connection import ExpressRouteCircuitConnection from .express_route_circuit_peering import ExpressRouteCircuitPeering from .route_filter import RouteFilter @@ -332,8 +357,13 @@ from .express_route_circuit_reference import ExpressRouteCircuitReference from .express_route_cross_connection_peering import ExpressRouteCrossConnectionPeering from .express_route_cross_connection import ExpressRouteCrossConnection + from .express_route_gateway_properties_auto_scale_configuration_bounds import ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds + from .express_route_gateway_properties_auto_scale_configuration import ExpressRouteGatewayPropertiesAutoScaleConfiguration + from .express_route_connection import ExpressRouteConnection + from .express_route_gateway import ExpressRouteGateway + from .express_route_gateway_list import ExpressRouteGatewayList + from .express_route_connection_list import ExpressRouteConnectionList 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 @@ -482,6 +512,7 @@ from .express_route_service_provider_paged import ExpressRouteServiceProviderPaged from .express_route_cross_connection_paged import ExpressRouteCrossConnectionPaged from .express_route_cross_connection_peering_paged import ExpressRouteCrossConnectionPeeringPaged +from .interface_endpoint_paged import InterfaceEndpointPaged from .load_balancer_paged import LoadBalancerPaged from .backend_address_pool_paged import BackendAddressPoolPaged from .frontend_ip_configuration_paged import FrontendIPConfigurationPaged @@ -490,6 +521,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 @@ -510,6 +542,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 @@ -521,14 +554,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, @@ -545,6 +578,7 @@ ProvisioningState, AzureFirewallRCActionType, AzureFirewallApplicationRuleProtocolType, + AzureFirewallNatRCActionType, AzureFirewallNetworkRuleProtocol, AuthorizationUseStatus, ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, @@ -603,11 +637,12 @@ ) __all__ = [ + 'NetworkInterfaceTapConfiguration', 'SubResource', - 'BackendAddressPool', - 'InboundNatRule', 'ApplicationSecurityGroup', 'SecurityRule', + 'EndpointService', + 'InterfaceEndpoint', 'NetworkInterfaceDnsSettings', 'NetworkInterface', 'NetworkSecurityGroup', @@ -623,6 +658,10 @@ 'IPConfiguration', 'ResourceNavigationLink', 'Subnet', + 'FrontendIPConfiguration', + 'VirtualNetworkTap', + 'BackendAddressPool', + 'InboundNatRule', 'NetworkInterfaceIPConfiguration', 'ApplicationGatewayBackendAddress', 'ApplicationGatewayBackendAddressPool', @@ -636,6 +675,7 @@ 'ApplicationGatewaySslPolicy', 'ApplicationGatewayIPConfiguration', 'ApplicationGatewayAuthenticationCertificate', + 'ApplicationGatewayTrustedRootCertificate', 'ApplicationGatewaySslCertificate', 'ApplicationGatewayFrontendIPConfiguration', 'ApplicationGatewayFrontendPort', @@ -664,6 +704,9 @@ 'AzureFirewallApplicationRuleProtocol', 'AzureFirewallApplicationRule', 'AzureFirewallApplicationRuleCollection', + 'AzureFirewallNatRCAction', + 'AzureFirewallNatRule', + 'AzureFirewallNatRuleCollection', 'AzureFirewallNetworkRule', 'AzureFirewallNetworkRuleCollection', 'AzureFirewall', @@ -675,6 +718,7 @@ 'ExpressRouteCircuitPeeringConfig', 'RouteFilterRule', 'ExpressRouteCircuitStats', + 'ExpressRouteConnectionId', 'ExpressRouteCircuitConnection', 'ExpressRouteCircuitPeering', 'RouteFilter', @@ -695,8 +739,13 @@ 'ExpressRouteCircuitReference', 'ExpressRouteCrossConnectionPeering', 'ExpressRouteCrossConnection', + 'ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds', + 'ExpressRouteGatewayPropertiesAutoScaleConfiguration', + 'ExpressRouteConnection', + 'ExpressRouteGateway', + 'ExpressRouteGatewayList', + 'ExpressRouteConnectionList', 'LoadBalancerSku', - 'FrontendIPConfiguration', 'LoadBalancingRule', 'Probe', 'InboundNatPool', @@ -845,6 +894,7 @@ 'ExpressRouteServiceProviderPaged', 'ExpressRouteCrossConnectionPaged', 'ExpressRouteCrossConnectionPeeringPaged', + 'InterfaceEndpointPaged', 'LoadBalancerPaged', 'BackendAddressPoolPaged', 'FrontendIPConfigurationPaged', @@ -853,6 +903,7 @@ 'NetworkInterfacePaged', 'ProbePaged', 'NetworkInterfaceIPConfigurationPaged', + 'NetworkInterfaceTapConfigurationPaged', 'NetworkSecurityGroupPaged', 'SecurityRulePaged', 'NetworkWatcherPaged', @@ -873,6 +924,7 @@ 'VirtualNetworkUsagePaged', 'SubnetPaged', 'VirtualNetworkPeeringPaged', + 'VirtualNetworkTapPaged', 'VirtualNetworkGatewayPaged', 'VirtualNetworkGatewayConnectionListEntityPaged', 'VirtualNetworkGatewayConnectionPaged', @@ -883,14 +935,14 @@ 'HubVirtualNetworkConnectionPaged', 'VpnGatewayPaged', 'VpnConnectionPaged', - 'TransportProtocol', 'IPAllocationMethod', - 'IPVersion', 'SecurityRuleProtocol', 'SecurityRuleAccess', 'SecurityRuleDirection', 'RouteNextHopType', 'PublicIPAddressSkuName', + 'IPVersion', + 'TransportProtocol', 'ApplicationGatewayProtocol', 'ApplicationGatewayCookieBasedAffinity', 'ApplicationGatewayBackendHealthServerHealth', @@ -907,6 +959,7 @@ 'ProvisioningState', 'AzureFirewallRCActionType', 'AzureFirewallApplicationRuleProtocolType', + 'AzureFirewallNatRCActionType', 'AzureFirewallNetworkRuleProtocol', 'AuthorizationUseStatus', 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixState', diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway.py index 0ac75dc48c38..b0e63598a14d 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway.py @@ -46,6 +46,10 @@ class ApplicationGateway(Resource): application gateway resource. :type authentication_certificates: list[~azure.mgmt.network.v2018_08_01.models.ApplicationGatewayAuthenticationCertificate] + :param trusted_root_certificates: Trusted Root certificates of the + application gateway resource. + :type trusted_root_certificates: + list[~azure.mgmt.network.v2018_08_01.models.ApplicationGatewayTrustedRootCertificate] :param ssl_certificates: SSL certificates of the application gateway resource. :type ssl_certificates: @@ -126,6 +130,7 @@ class ApplicationGateway(Resource): 'operational_state': {'key': 'properties.operationalState', 'type': 'str'}, 'gateway_ip_configurations': {'key': 'properties.gatewayIPConfigurations', 'type': '[ApplicationGatewayIPConfiguration]'}, 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[ApplicationGatewayAuthenticationCertificate]'}, + 'trusted_root_certificates': {'key': 'properties.trustedRootCertificates', 'type': '[ApplicationGatewayTrustedRootCertificate]'}, 'ssl_certificates': {'key': 'properties.sslCertificates', 'type': '[ApplicationGatewaySslCertificate]'}, 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[ApplicationGatewayFrontendIPConfiguration]'}, 'frontend_ports': {'key': 'properties.frontendPorts', 'type': '[ApplicationGatewayFrontendPort]'}, @@ -153,6 +158,7 @@ def __init__(self, **kwargs): self.operational_state = None self.gateway_ip_configurations = kwargs.get('gateway_ip_configurations', None) self.authentication_certificates = kwargs.get('authentication_certificates', None) + self.trusted_root_certificates = kwargs.get('trusted_root_certificates', None) self.ssl_certificates = kwargs.get('ssl_certificates', None) self.frontend_ip_configurations = kwargs.get('frontend_ip_configurations', None) self.frontend_ports = kwargs.get('frontend_ports', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_backend_http_settings.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_backend_http_settings.py index 12f49de91f80..80ca0d6f3417 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_backend_http_settings.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_backend_http_settings.py @@ -38,6 +38,10 @@ class ApplicationGatewayBackendHttpSettings(SubResource): gateway authentication certificates. :type authentication_certificates: list[~azure.mgmt.network.v2018_08_01.models.SubResource] + :param trusted_root_certificates: Array of references to application + gateway trusted root certificates. + :type trusted_root_certificates: + list[~azure.mgmt.network.v2018_08_01.models.SubResource] :param connection_draining: Connection draining of the backend http settings resource. :type connection_draining: @@ -77,6 +81,7 @@ class ApplicationGatewayBackendHttpSettings(SubResource): 'request_timeout': {'key': 'properties.requestTimeout', 'type': 'int'}, 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[SubResource]'}, + 'trusted_root_certificates': {'key': 'properties.trustedRootCertificates', 'type': '[SubResource]'}, 'connection_draining': {'key': 'properties.connectionDraining', 'type': 'ApplicationGatewayConnectionDraining'}, 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'pick_host_name_from_backend_address': {'key': 'properties.pickHostNameFromBackendAddress', 'type': 'bool'}, @@ -97,6 +102,7 @@ def __init__(self, **kwargs): self.request_timeout = kwargs.get('request_timeout', None) self.probe = kwargs.get('probe', None) self.authentication_certificates = kwargs.get('authentication_certificates', None) + self.trusted_root_certificates = kwargs.get('trusted_root_certificates', None) self.connection_draining = kwargs.get('connection_draining', None) self.host_name = kwargs.get('host_name', None) self.pick_host_name_from_backend_address = kwargs.get('pick_host_name_from_backend_address', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_backend_http_settings_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_backend_http_settings_py3.py index 04c6e88febf9..7c216a9cd32b 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_backend_http_settings_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_backend_http_settings_py3.py @@ -38,6 +38,10 @@ class ApplicationGatewayBackendHttpSettings(SubResource): gateway authentication certificates. :type authentication_certificates: list[~azure.mgmt.network.v2018_08_01.models.SubResource] + :param trusted_root_certificates: Array of references to application + gateway trusted root certificates. + :type trusted_root_certificates: + list[~azure.mgmt.network.v2018_08_01.models.SubResource] :param connection_draining: Connection draining of the backend http settings resource. :type connection_draining: @@ -77,6 +81,7 @@ class ApplicationGatewayBackendHttpSettings(SubResource): 'request_timeout': {'key': 'properties.requestTimeout', 'type': 'int'}, 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[SubResource]'}, + 'trusted_root_certificates': {'key': 'properties.trustedRootCertificates', 'type': '[SubResource]'}, 'connection_draining': {'key': 'properties.connectionDraining', 'type': 'ApplicationGatewayConnectionDraining'}, 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'pick_host_name_from_backend_address': {'key': 'properties.pickHostNameFromBackendAddress', 'type': 'bool'}, @@ -89,7 +94,7 @@ class ApplicationGatewayBackendHttpSettings(SubResource): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, id: str=None, port: int=None, protocol=None, cookie_based_affinity=None, request_timeout: int=None, probe=None, authentication_certificates=None, connection_draining=None, host_name: str=None, pick_host_name_from_backend_address: bool=None, affinity_cookie_name: str=None, probe_enabled: bool=None, path: str=None, provisioning_state: str=None, name: str=None, etag: str=None, type: str=None, **kwargs) -> None: + def __init__(self, *, id: str=None, port: int=None, protocol=None, cookie_based_affinity=None, request_timeout: int=None, probe=None, authentication_certificates=None, trusted_root_certificates=None, connection_draining=None, host_name: str=None, pick_host_name_from_backend_address: bool=None, affinity_cookie_name: str=None, probe_enabled: bool=None, path: str=None, provisioning_state: str=None, name: str=None, etag: str=None, type: str=None, **kwargs) -> None: super(ApplicationGatewayBackendHttpSettings, self).__init__(id=id, **kwargs) self.port = port self.protocol = protocol @@ -97,6 +102,7 @@ def __init__(self, *, id: str=None, port: int=None, protocol=None, cookie_based_ self.request_timeout = request_timeout self.probe = probe self.authentication_certificates = authentication_certificates + self.trusted_root_certificates = trusted_root_certificates self.connection_draining = connection_draining self.host_name = host_name self.pick_host_name_from_backend_address = pick_host_name_from_backend_address diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_py3.py index 4f74ba01c1d2..894aae564b12 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_py3.py @@ -46,6 +46,10 @@ class ApplicationGateway(Resource): application gateway resource. :type authentication_certificates: list[~azure.mgmt.network.v2018_08_01.models.ApplicationGatewayAuthenticationCertificate] + :param trusted_root_certificates: Trusted Root certificates of the + application gateway resource. + :type trusted_root_certificates: + list[~azure.mgmt.network.v2018_08_01.models.ApplicationGatewayTrustedRootCertificate] :param ssl_certificates: SSL certificates of the application gateway resource. :type ssl_certificates: @@ -126,6 +130,7 @@ class ApplicationGateway(Resource): 'operational_state': {'key': 'properties.operationalState', 'type': 'str'}, 'gateway_ip_configurations': {'key': 'properties.gatewayIPConfigurations', 'type': '[ApplicationGatewayIPConfiguration]'}, 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[ApplicationGatewayAuthenticationCertificate]'}, + 'trusted_root_certificates': {'key': 'properties.trustedRootCertificates', 'type': '[ApplicationGatewayTrustedRootCertificate]'}, 'ssl_certificates': {'key': 'properties.sslCertificates', 'type': '[ApplicationGatewaySslCertificate]'}, 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[ApplicationGatewayFrontendIPConfiguration]'}, 'frontend_ports': {'key': 'properties.frontendPorts', 'type': '[ApplicationGatewayFrontendPort]'}, @@ -146,13 +151,14 @@ class ApplicationGateway(Resource): 'zones': {'key': 'zones', 'type': '[str]'}, } - def __init__(self, *, id: str=None, location: str=None, tags=None, sku=None, ssl_policy=None, gateway_ip_configurations=None, authentication_certificates=None, ssl_certificates=None, frontend_ip_configurations=None, frontend_ports=None, probes=None, backend_address_pools=None, backend_http_settings_collection=None, http_listeners=None, url_path_maps=None, request_routing_rules=None, redirect_configurations=None, web_application_firewall_configuration=None, enable_http2: bool=None, enable_fips: bool=None, autoscale_configuration=None, resource_guid: str=None, provisioning_state: str=None, etag: str=None, zones=None, **kwargs) -> None: + def __init__(self, *, id: str=None, location: str=None, tags=None, sku=None, ssl_policy=None, gateway_ip_configurations=None, authentication_certificates=None, trusted_root_certificates=None, ssl_certificates=None, frontend_ip_configurations=None, frontend_ports=None, probes=None, backend_address_pools=None, backend_http_settings_collection=None, http_listeners=None, url_path_maps=None, request_routing_rules=None, redirect_configurations=None, web_application_firewall_configuration=None, enable_http2: bool=None, enable_fips: bool=None, autoscale_configuration=None, resource_guid: str=None, provisioning_state: str=None, etag: str=None, zones=None, **kwargs) -> None: super(ApplicationGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) self.sku = sku self.ssl_policy = ssl_policy self.operational_state = None self.gateway_ip_configurations = gateway_ip_configurations self.authentication_certificates = authentication_certificates + self.trusted_root_certificates = trusted_root_certificates self.ssl_certificates = ssl_certificates self.frontend_ip_configurations = frontend_ip_configurations self.frontend_ports = frontend_ports diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_trusted_root_certificate.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_trusted_root_certificate.py new file mode 100644 index 000000000000..87739161a4cb --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_trusted_root_certificate.py @@ -0,0 +1,55 @@ +# 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 ApplicationGatewayTrustedRootCertificate(SubResource): + """Trusted Root certificates of an application gateway. + + :param id: Resource ID. + :type id: str + :param data: Certificate public data. + :type data: str + :param keyvault_secret_id: KeyVault Secret Id for certificate. + :type keyvault_secret_id: str + :param provisioning_state: Provisioning state of the trusted root + certificate resource. Possible values are: 'Updating', 'Deleting', and + 'Failed'. + :type provisioning_state: str + :param name: Name of the trusted root certificate that is unique within an + Application Gateway. + :type name: str + :param etag: A unique read-only string that changes whenever the resource + is updated. + :type etag: str + :param type: Type of the resource. + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'keyvault_secret_id': {'key': 'properties.keyvaultSecretId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationGatewayTrustedRootCertificate, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.keyvault_secret_id = kwargs.get('keyvault_secret_id', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.name = kwargs.get('name', None) + self.etag = kwargs.get('etag', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_trusted_root_certificate_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_trusted_root_certificate_py3.py new file mode 100644 index 000000000000..9ce1b7ab11e0 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/application_gateway_trusted_root_certificate_py3.py @@ -0,0 +1,55 @@ +# 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 ApplicationGatewayTrustedRootCertificate(SubResource): + """Trusted Root certificates of an application gateway. + + :param id: Resource ID. + :type id: str + :param data: Certificate public data. + :type data: str + :param keyvault_secret_id: KeyVault Secret Id for certificate. + :type keyvault_secret_id: str + :param provisioning_state: Provisioning state of the trusted root + certificate resource. Possible values are: 'Updating', 'Deleting', and + 'Failed'. + :type provisioning_state: str + :param name: Name of the trusted root certificate that is unique within an + Application Gateway. + :type name: str + :param etag: A unique read-only string that changes whenever the resource + is updated. + :type etag: str + :param type: Type of the resource. + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'keyvault_secret_id': {'key': 'properties.keyvaultSecretId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, data: str=None, keyvault_secret_id: str=None, provisioning_state: str=None, name: str=None, etag: str=None, type: str=None, **kwargs) -> None: + super(ApplicationGatewayTrustedRootCertificate, self).__init__(id=id, **kwargs) + self.data = data + self.keyvault_secret_id = keyvault_secret_id + self.provisioning_state = provisioning_state + self.name = name + self.etag = etag + self.type = type diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall.py index 43e9a57c6125..721cf439f5cf 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall.py @@ -29,11 +29,15 @@ class AzureFirewall(Resource): :param tags: Resource tags. :type tags: dict[str, str] :param application_rule_collections: Collection of application rule - collections used by a Azure Firewall. + collections used by Azure Firewall. :type application_rule_collections: list[~azure.mgmt.network.v2018_08_01.models.AzureFirewallApplicationRuleCollection] + :param nat_rule_collections: Collection of NAT rule collections used by + Azure Firewall. + :type nat_rule_collections: + list[~azure.mgmt.network.v2018_08_01.models.AzureFirewallNatRuleCollection] :param network_rule_collections: Collection of network rule collections - used by a Azure Firewall. + used by Azure Firewall. :type network_rule_collections: list[~azure.mgmt.network.v2018_08_01.models.AzureFirewallNetworkRuleCollection] :param ip_configurations: IP configuration of the Azure Firewall resource. @@ -61,6 +65,7 @@ class AzureFirewall(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'application_rule_collections': {'key': 'properties.applicationRuleCollections', 'type': '[AzureFirewallApplicationRuleCollection]'}, + 'nat_rule_collections': {'key': 'properties.natRuleCollections', 'type': '[AzureFirewallNatRuleCollection]'}, 'network_rule_collections': {'key': 'properties.networkRuleCollections', 'type': '[AzureFirewallNetworkRuleCollection]'}, 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[AzureFirewallIPConfiguration]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -70,6 +75,7 @@ class AzureFirewall(Resource): def __init__(self, **kwargs): super(AzureFirewall, self).__init__(**kwargs) self.application_rule_collections = kwargs.get('application_rule_collections', None) + self.nat_rule_collections = kwargs.get('nat_rule_collections', None) self.network_rule_collections = kwargs.get('network_rule_collections', None) self.ip_configurations = kwargs.get('ip_configurations', None) self.provisioning_state = kwargs.get('provisioning_state', 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 b9bc81836ffd..92d83cd68dfb 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 @@ -15,6 +15,9 @@ class AzureFirewallIPConfiguration(SubResource): """IP configuration of an Azure Firewall. + Variables are only populated by the server, and will be ignored when + sending a request. + :param id: Resource ID. :type id: str :param private_ip_address: The Firewall Internal Load Balancer IP to be @@ -34,11 +37,15 @@ class AzureFirewallIPConfiguration(SubResource): :param name: 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 + :ivar etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str + :vartype etag: str """ + _validation = { + 'etag': {'readonly': True}, + } + _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, @@ -56,4 +63,4 @@ def __init__(self, **kwargs): self.public_ip_address = kwargs.get('public_ip_address', None) self.provisioning_state = kwargs.get('provisioning_state', None) self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) + self.etag = 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 4f48de4304e2..d323072599bd 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 @@ -15,6 +15,9 @@ class AzureFirewallIPConfiguration(SubResource): """IP configuration of an Azure Firewall. + Variables are only populated by the server, and will be ignored when + sending a request. + :param id: Resource ID. :type id: str :param private_ip_address: The Firewall Internal Load Balancer IP to be @@ -34,11 +37,15 @@ class AzureFirewallIPConfiguration(SubResource): :param name: 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 + :ivar etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str + :vartype etag: str """ + _validation = { + 'etag': {'readonly': True}, + } + _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, @@ -49,11 +56,11 @@ class AzureFirewallIPConfiguration(SubResource): 'etag': {'key': 'etag', 'type': 'str'}, } - 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: + def __init__(self, *, id: str=None, private_ip_address: str=None, subnet=None, public_ip_address=None, provisioning_state=None, name: str=None, **kwargs) -> None: super(AzureFirewallIPConfiguration, self).__init__(id=id, **kwargs) self.private_ip_address = private_ip_address self.subnet = subnet self.public_ip_address = public_ip_address self.provisioning_state = provisioning_state self.name = name - self.etag = etag + self.etag = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rc_action.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rc_action.py new file mode 100644 index 000000000000..d88b34fa9b6d --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rc_action.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class AzureFirewallNatRCAction(Model): + """AzureFirewall NAT Rule Collection Action. + + :param type: The type of action. Possible values include: 'Snat', 'Dnat' + :type type: str or + ~azure.mgmt.network.v2018_08_01.models.AzureFirewallNatRCActionType + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureFirewallNatRCAction, self).__init__(**kwargs) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rc_action_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rc_action_py3.py new file mode 100644 index 000000000000..ec47f0f5460a --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rc_action_py3.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class AzureFirewallNatRCAction(Model): + """AzureFirewall NAT Rule Collection Action. + + :param type: The type of action. Possible values include: 'Snat', 'Dnat' + :type type: str or + ~azure.mgmt.network.v2018_08_01.models.AzureFirewallNatRCActionType + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(AzureFirewallNatRCAction, self).__init__(**kwargs) + self.type = type diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rule.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rule.py new file mode 100644 index 000000000000..7e8ea9122445 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rule.py @@ -0,0 +1,59 @@ +# 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.serialization import Model + + +class AzureFirewallNatRule(Model): + """Properties of a NAT rule. + + :param name: Name of the NAT rule. + :type name: str + :param description: Description of the rule. + :type description: str + :param source_addresses: List of source IP addresses for this rule. + :type source_addresses: list[str] + :param destination_addresses: List of destination IP addresses for this + rule. + :type destination_addresses: list[str] + :param destination_ports: List of destination ports. + :type destination_ports: list[str] + :param protocols: Array of AzureFirewallNetworkRuleProtocols applicable to + this NAT rule. + :type protocols: list[str or + ~azure.mgmt.network.v2018_08_01.models.AzureFirewallNetworkRuleProtocol] + :param translated_address: The translated address for this NAT rule. + :type translated_address: str + :param translated_port: The translated port for this NAT rule. + :type translated_port: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'protocols': {'key': 'protocols', 'type': '[str]'}, + 'translated_address': {'key': 'translatedAddress', 'type': 'str'}, + 'translated_port': {'key': 'translatedPort', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureFirewallNatRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.source_addresses = kwargs.get('source_addresses', None) + self.destination_addresses = kwargs.get('destination_addresses', None) + self.destination_ports = kwargs.get('destination_ports', None) + self.protocols = kwargs.get('protocols', None) + self.translated_address = kwargs.get('translated_address', None) + self.translated_port = kwargs.get('translated_port', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rule_collection.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rule_collection.py new file mode 100644 index 000000000000..5627fdb3af20 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rule_collection.py @@ -0,0 +1,65 @@ +# 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 AzureFirewallNatRuleCollection(SubResource): + """NAT rule collection resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource ID. + :type id: str + :param priority: Priority of the NAT rule collection resource. + :type priority: int + :param action: The action type of a NAT rule collection + :type action: + ~azure.mgmt.network.v2018_08_01.models.AzureFirewallNatRCAction + :param rules: Collection of rules used by a NAT rule collection. + :type rules: + list[~azure.mgmt.network.v2018_08_01.models.AzureFirewallNatRule] + :param provisioning_state: The provisioning state of the resource. + Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + :type provisioning_state: str or + ~azure.mgmt.network.v2018_08_01.models.ProvisioningState + :param name: Gets name of the resource that is unique within a resource + group. This name can be used to access the resource. + :type name: str + :ivar etag: Gets a unique read-only string that changes whenever the + resource is updated. + :vartype etag: str + """ + + _validation = { + 'priority': {'maximum': 65000, 'minimum': 100}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'action': {'key': 'properties.action', 'type': 'AzureFirewallNatRCAction'}, + 'rules': {'key': 'properties.rules', 'type': '[AzureFirewallNatRule]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureFirewallNatRuleCollection, self).__init__(**kwargs) + self.priority = kwargs.get('priority', None) + self.action = kwargs.get('action', None) + self.rules = kwargs.get('rules', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.name = kwargs.get('name', None) + self.etag = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rule_collection_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rule_collection_py3.py new file mode 100644 index 000000000000..e73c4abadc0e --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rule_collection_py3.py @@ -0,0 +1,65 @@ +# 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 AzureFirewallNatRuleCollection(SubResource): + """NAT rule collection resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource ID. + :type id: str + :param priority: Priority of the NAT rule collection resource. + :type priority: int + :param action: The action type of a NAT rule collection + :type action: + ~azure.mgmt.network.v2018_08_01.models.AzureFirewallNatRCAction + :param rules: Collection of rules used by a NAT rule collection. + :type rules: + list[~azure.mgmt.network.v2018_08_01.models.AzureFirewallNatRule] + :param provisioning_state: The provisioning state of the resource. + Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + :type provisioning_state: str or + ~azure.mgmt.network.v2018_08_01.models.ProvisioningState + :param name: Gets name of the resource that is unique within a resource + group. This name can be used to access the resource. + :type name: str + :ivar etag: Gets a unique read-only string that changes whenever the + resource is updated. + :vartype etag: str + """ + + _validation = { + 'priority': {'maximum': 65000, 'minimum': 100}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'action': {'key': 'properties.action', 'type': 'AzureFirewallNatRCAction'}, + 'rules': {'key': 'properties.rules', 'type': '[AzureFirewallNatRule]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, priority: int=None, action=None, rules=None, provisioning_state=None, name: str=None, **kwargs) -> None: + super(AzureFirewallNatRuleCollection, self).__init__(id=id, **kwargs) + self.priority = priority + self.action = action + self.rules = rules + self.provisioning_state = provisioning_state + self.name = name + self.etag = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rule_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rule_py3.py new file mode 100644 index 000000000000..ddc715746307 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_nat_rule_py3.py @@ -0,0 +1,59 @@ +# 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.serialization import Model + + +class AzureFirewallNatRule(Model): + """Properties of a NAT rule. + + :param name: Name of the NAT rule. + :type name: str + :param description: Description of the rule. + :type description: str + :param source_addresses: List of source IP addresses for this rule. + :type source_addresses: list[str] + :param destination_addresses: List of destination IP addresses for this + rule. + :type destination_addresses: list[str] + :param destination_ports: List of destination ports. + :type destination_ports: list[str] + :param protocols: Array of AzureFirewallNetworkRuleProtocols applicable to + this NAT rule. + :type protocols: list[str or + ~azure.mgmt.network.v2018_08_01.models.AzureFirewallNetworkRuleProtocol] + :param translated_address: The translated address for this NAT rule. + :type translated_address: str + :param translated_port: The translated port for this NAT rule. + :type translated_port: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'protocols': {'key': 'protocols', 'type': '[str]'}, + 'translated_address': {'key': 'translatedAddress', 'type': 'str'}, + 'translated_port': {'key': 'translatedPort', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, description: str=None, source_addresses=None, destination_addresses=None, destination_ports=None, protocols=None, translated_address: str=None, translated_port: str=None, **kwargs) -> None: + super(AzureFirewallNatRule, self).__init__(**kwargs) + self.name = name + self.description = description + self.source_addresses = source_addresses + self.destination_addresses = destination_addresses + self.destination_ports = destination_ports + self.protocols = protocols + self.translated_address = translated_address + self.translated_port = translated_port diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_py3.py index 91ba67e3df03..f622bc7e7012 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/azure_firewall_py3.py @@ -29,11 +29,15 @@ class AzureFirewall(Resource): :param tags: Resource tags. :type tags: dict[str, str] :param application_rule_collections: Collection of application rule - collections used by a Azure Firewall. + collections used by Azure Firewall. :type application_rule_collections: list[~azure.mgmt.network.v2018_08_01.models.AzureFirewallApplicationRuleCollection] + :param nat_rule_collections: Collection of NAT rule collections used by + Azure Firewall. + :type nat_rule_collections: + list[~azure.mgmt.network.v2018_08_01.models.AzureFirewallNatRuleCollection] :param network_rule_collections: Collection of network rule collections - used by a Azure Firewall. + used by Azure Firewall. :type network_rule_collections: list[~azure.mgmt.network.v2018_08_01.models.AzureFirewallNetworkRuleCollection] :param ip_configurations: IP configuration of the Azure Firewall resource. @@ -61,15 +65,17 @@ class AzureFirewall(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'application_rule_collections': {'key': 'properties.applicationRuleCollections', 'type': '[AzureFirewallApplicationRuleCollection]'}, + 'nat_rule_collections': {'key': 'properties.natRuleCollections', 'type': '[AzureFirewallNatRuleCollection]'}, 'network_rule_collections': {'key': 'properties.networkRuleCollections', 'type': '[AzureFirewallNetworkRuleCollection]'}, 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[AzureFirewallIPConfiguration]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, *, id: str=None, location: str=None, tags=None, application_rule_collections=None, network_rule_collections=None, ip_configurations=None, provisioning_state=None, **kwargs) -> None: + def __init__(self, *, id: str=None, location: str=None, tags=None, application_rule_collections=None, nat_rule_collections=None, network_rule_collections=None, ip_configurations=None, provisioning_state=None, **kwargs) -> None: super(AzureFirewall, self).__init__(id=id, location=location, tags=tags, **kwargs) self.application_rule_collections = application_rule_collections + self.nat_rule_collections = nat_rule_collections self.network_rule_collections = network_rule_collections self.ip_configurations = ip_configurations self.provisioning_state = provisioning_state diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/endpoint_service.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/endpoint_service.py new file mode 100644 index 000000000000..988ccdb20608 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/endpoint_service.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class EndpointService(Model): + """Identifies the service being brought into the virtual network. + + :param id: A unique identifier of the service being referenced by the + interface endpoint. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EndpointService, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/endpoint_service_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/endpoint_service_py3.py new file mode 100644 index 000000000000..84a14658f0eb --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/endpoint_service_py3.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class EndpointService(Model): + """Identifies the service being brought into the virtual network. + + :param id: A unique identifier of the service being referenced by the + interface endpoint. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(EndpointService, self).__init__(**kwargs) + self.id = id diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_circuit_peering.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_circuit_peering.py index 225f4c180826..03307dbb6001 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_circuit_peering.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_circuit_peering.py @@ -63,6 +63,9 @@ class ExpressRouteCircuitPeering(SubResource): :param ipv6_peering_config: The IPv6 peering configuration. :type ipv6_peering_config: ~azure.mgmt.network.v2018_08_01.models.Ipv6ExpressRouteCircuitPeeringConfig + :param express_route_connection: The ExpressRoute connection. + :type express_route_connection: + ~azure.mgmt.network.v2018_08_01.models.ExpressRouteConnectionId :param connections: The list of circuit connections associated with Azure Private Peering for this circuit. :type connections: @@ -99,6 +102,7 @@ class ExpressRouteCircuitPeering(SubResource): 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, 'route_filter': {'key': 'properties.routeFilter', 'type': 'RouteFilter'}, 'ipv6_peering_config': {'key': 'properties.ipv6PeeringConfig', 'type': 'Ipv6ExpressRouteCircuitPeeringConfig'}, + 'express_route_connection': {'key': 'properties.expressRouteConnection', 'type': 'ExpressRouteConnectionId'}, 'connections': {'key': 'properties.connections', 'type': '[ExpressRouteCircuitConnection]'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, @@ -123,6 +127,7 @@ def __init__(self, **kwargs): self.last_modified_by = kwargs.get('last_modified_by', None) self.route_filter = kwargs.get('route_filter', None) self.ipv6_peering_config = kwargs.get('ipv6_peering_config', None) + self.express_route_connection = kwargs.get('express_route_connection', None) self.connections = kwargs.get('connections', None) self.name = kwargs.get('name', None) self.etag = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_circuit_peering_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_circuit_peering_py3.py index 86377132d74c..307b39452e22 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_circuit_peering_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_circuit_peering_py3.py @@ -63,6 +63,9 @@ class ExpressRouteCircuitPeering(SubResource): :param ipv6_peering_config: The IPv6 peering configuration. :type ipv6_peering_config: ~azure.mgmt.network.v2018_08_01.models.Ipv6ExpressRouteCircuitPeeringConfig + :param express_route_connection: The ExpressRoute connection. + :type express_route_connection: + ~azure.mgmt.network.v2018_08_01.models.ExpressRouteConnectionId :param connections: The list of circuit connections associated with Azure Private Peering for this circuit. :type connections: @@ -99,12 +102,13 @@ class ExpressRouteCircuitPeering(SubResource): 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, 'route_filter': {'key': 'properties.routeFilter', 'type': 'RouteFilter'}, 'ipv6_peering_config': {'key': 'properties.ipv6PeeringConfig', 'type': 'Ipv6ExpressRouteCircuitPeeringConfig'}, + 'express_route_connection': {'key': 'properties.expressRouteConnection', 'type': 'ExpressRouteConnectionId'}, 'connections': {'key': 'properties.connections', 'type': '[ExpressRouteCircuitConnection]'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, *, id: str=None, peering_type=None, state=None, azure_asn: int=None, peer_asn: int=None, primary_peer_address_prefix: str=None, secondary_peer_address_prefix: str=None, primary_azure_port: str=None, secondary_azure_port: str=None, shared_key: str=None, vlan_id: int=None, microsoft_peering_config=None, stats=None, provisioning_state: str=None, gateway_manager_etag: str=None, last_modified_by: str=None, route_filter=None, ipv6_peering_config=None, connections=None, name: str=None, **kwargs) -> None: + def __init__(self, *, id: str=None, peering_type=None, state=None, azure_asn: int=None, peer_asn: int=None, primary_peer_address_prefix: str=None, secondary_peer_address_prefix: str=None, primary_azure_port: str=None, secondary_azure_port: str=None, shared_key: str=None, vlan_id: int=None, microsoft_peering_config=None, stats=None, provisioning_state: str=None, gateway_manager_etag: str=None, last_modified_by: str=None, route_filter=None, ipv6_peering_config=None, express_route_connection=None, connections=None, name: str=None, **kwargs) -> None: super(ExpressRouteCircuitPeering, self).__init__(id=id, **kwargs) self.peering_type = peering_type self.state = state @@ -123,6 +127,7 @@ def __init__(self, *, id: str=None, peering_type=None, state=None, azure_asn: in self.last_modified_by = last_modified_by self.route_filter = route_filter self.ipv6_peering_config = ipv6_peering_config + self.express_route_connection = express_route_connection self.connections = connections self.name = name self.etag = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection.py new file mode 100644 index 000000000000..74ffadec81ac --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection.py @@ -0,0 +1,60 @@ +# 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 ExpressRouteConnection(SubResource): + """ExpressRouteConnection resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :ivar provisioning_state: The provisioning state of the resource. Possible + values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.network.v2018_08_01.models.ProvisioningState + :param express_route_connection_id: The ID of the ExpressRoute circuit + peering. + :type express_route_connection_id: str + :param authorization_key: Authorization key to establish the connection. + :type authorization_key: str + :param routing_weight: The routing weight associated to the connection. + :type routing_weight: int + :param name: Required. The name of the resource. + :type name: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'express_route_connection_id': {'key': 'properties.expressRouteCircuitPeering.id', 'type': 'str'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExpressRouteConnection, self).__init__(**kwargs) + self.provisioning_state = None + self.express_route_connection_id = kwargs.get('express_route_connection_id', None) + self.authorization_key = kwargs.get('authorization_key', None) + self.routing_weight = kwargs.get('routing_weight', None) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection_id.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection_id.py new file mode 100644 index 000000000000..05d8fb5b1d33 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection_id.py @@ -0,0 +1,35 @@ +# 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.serialization import Model + + +class ExpressRouteConnectionId(Model): + """The ID of the ExpressRouteConnection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the ExpressRouteConnection. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExpressRouteConnectionId, self).__init__(**kwargs) + self.id = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection_id_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection_id_py3.py new file mode 100644 index 000000000000..ac3331079355 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection_id_py3.py @@ -0,0 +1,35 @@ +# 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.serialization import Model + + +class ExpressRouteConnectionId(Model): + """The ID of the ExpressRouteConnection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the ExpressRouteConnection. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ExpressRouteConnectionId, self).__init__(**kwargs) + self.id = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection_list.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection_list.py new file mode 100644 index 000000000000..5b282799dd73 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection_list.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class ExpressRouteConnectionList(Model): + """ExpressRouteConnection list. + + :param value: The list of ExpressRoute connections + :type value: + list[~azure.mgmt.network.v2018_08_01.models.ExpressRouteConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteConnection]'}, + } + + def __init__(self, **kwargs): + super(ExpressRouteConnectionList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection_list_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection_list_py3.py new file mode 100644 index 000000000000..bd063e3a7d88 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection_list_py3.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class ExpressRouteConnectionList(Model): + """ExpressRouteConnection list. + + :param value: The list of ExpressRoute connections + :type value: + list[~azure.mgmt.network.v2018_08_01.models.ExpressRouteConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteConnection]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(ExpressRouteConnectionList, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection_py3.py new file mode 100644 index 000000000000..206af6a6164f --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_connection_py3.py @@ -0,0 +1,60 @@ +# 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 ExpressRouteConnection(SubResource): + """ExpressRouteConnection resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :ivar provisioning_state: The provisioning state of the resource. Possible + values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.network.v2018_08_01.models.ProvisioningState + :param express_route_connection_id: The ID of the ExpressRoute circuit + peering. + :type express_route_connection_id: str + :param authorization_key: Authorization key to establish the connection. + :type authorization_key: str + :param routing_weight: The routing weight associated to the connection. + :type routing_weight: int + :param name: Required. The name of the resource. + :type name: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'express_route_connection_id': {'key': 'properties.expressRouteCircuitPeering.id', 'type': 'str'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str, id: str=None, express_route_connection_id: str=None, authorization_key: str=None, routing_weight: int=None, **kwargs) -> None: + super(ExpressRouteConnection, self).__init__(id=id, **kwargs) + self.provisioning_state = None + self.express_route_connection_id = express_route_connection_id + self.authorization_key = authorization_key + self.routing_weight = routing_weight + self.name = name diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway.py new file mode 100644 index 000000000000..bf1c32cb2166 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway.py @@ -0,0 +1,79 @@ +# 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 ExpressRouteGateway(Resource): + """ExpressRoute gateway 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 auto_scale_configuration: Configuration for auto scaling. + :type auto_scale_configuration: + ~azure.mgmt.network.v2018_08_01.models.ExpressRouteGatewayPropertiesAutoScaleConfiguration + :ivar express_route_connections: List of ExpressRoute connections to the + ExpressRoute gateway. + :vartype express_route_connections: + list[~azure.mgmt.network.v2018_08_01.models.ExpressRouteConnection] + :ivar provisioning_state: The provisioning state of the resource. Possible + values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.network.v2018_08_01.models.ProvisioningState + :param express_route_gateway_id: The resource URI for the Virtual Hub + where the ExpressRoute gateway is or will be deployed. The Virtual Hub + resource and the ExpressRoute gateway resource reside in the same + subscription. + :type express_route_gateway_id: str + :ivar etag: A unique read-only string that changes whenever the resource + is updated. + :vartype etag: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'express_route_connections': {'readonly': True}, + 'provisioning_state': {'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}'}, + 'auto_scale_configuration': {'key': 'properties.autoScaleConfiguration', 'type': 'ExpressRouteGatewayPropertiesAutoScaleConfiguration'}, + 'express_route_connections': {'key': 'properties.expressRouteConnections', 'type': '[ExpressRouteConnection]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'express_route_gateway_id': {'key': 'properties.virtualHub.id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExpressRouteGateway, self).__init__(**kwargs) + self.auto_scale_configuration = kwargs.get('auto_scale_configuration', None) + self.express_route_connections = None + self.provisioning_state = None + self.express_route_gateway_id = kwargs.get('express_route_gateway_id', None) + self.etag = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_list.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_list.py new file mode 100644 index 000000000000..1659678bdbd9 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_list.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class ExpressRouteGatewayList(Model): + """List of ExpressRoute gateways. + + :param value: List of ExpressRoute gateways. + :type value: + list[~azure.mgmt.network.v2018_08_01.models.ExpressRouteGateway] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteGateway]'}, + } + + def __init__(self, **kwargs): + super(ExpressRouteGatewayList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_list_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_list_py3.py new file mode 100644 index 000000000000..5eac67191c52 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_list_py3.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class ExpressRouteGatewayList(Model): + """List of ExpressRoute gateways. + + :param value: List of ExpressRoute gateways. + :type value: + list[~azure.mgmt.network.v2018_08_01.models.ExpressRouteGateway] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteGateway]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(ExpressRouteGatewayList, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_properties_auto_scale_configuration.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_properties_auto_scale_configuration.py new file mode 100644 index 000000000000..42f28cf5a964 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_properties_auto_scale_configuration.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class ExpressRouteGatewayPropertiesAutoScaleConfiguration(Model): + """Configuration for auto scaling. + + :param bounds: Minimum and maximum number of scale units to deploy. + :type bounds: + ~azure.mgmt.network.v2018_08_01.models.ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds + """ + + _attribute_map = { + 'bounds': {'key': 'bounds', 'type': 'ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds'}, + } + + def __init__(self, **kwargs): + super(ExpressRouteGatewayPropertiesAutoScaleConfiguration, self).__init__(**kwargs) + self.bounds = kwargs.get('bounds', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_properties_auto_scale_configuration_bounds.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_properties_auto_scale_configuration_bounds.py new file mode 100644 index 000000000000..0f842805e117 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_properties_auto_scale_configuration_bounds.py @@ -0,0 +1,34 @@ +# 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.serialization import Model + + +class ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds(Model): + """Minimum and maximum number of scale units to deploy. + + :param min: Minimum number of scale units deployed for ExpressRoute + gateway. + :type min: int + :param max: Maximum number of scale units deployed for ExpressRoute + gateway. + :type max: int + """ + + _attribute_map = { + 'min': {'key': 'min', 'type': 'int'}, + 'max': {'key': 'max', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds, self).__init__(**kwargs) + self.min = kwargs.get('min', None) + self.max = kwargs.get('max', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_properties_auto_scale_configuration_bounds_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_properties_auto_scale_configuration_bounds_py3.py new file mode 100644 index 000000000000..9ea3e23886e0 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_properties_auto_scale_configuration_bounds_py3.py @@ -0,0 +1,34 @@ +# 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.serialization import Model + + +class ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds(Model): + """Minimum and maximum number of scale units to deploy. + + :param min: Minimum number of scale units deployed for ExpressRoute + gateway. + :type min: int + :param max: Maximum number of scale units deployed for ExpressRoute + gateway. + :type max: int + """ + + _attribute_map = { + 'min': {'key': 'min', 'type': 'int'}, + 'max': {'key': 'max', 'type': 'int'}, + } + + def __init__(self, *, min: int=None, max: int=None, **kwargs) -> None: + super(ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds, self).__init__(**kwargs) + self.min = min + self.max = max diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_properties_auto_scale_configuration_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_properties_auto_scale_configuration_py3.py new file mode 100644 index 000000000000..0498c1bab0a7 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_properties_auto_scale_configuration_py3.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class ExpressRouteGatewayPropertiesAutoScaleConfiguration(Model): + """Configuration for auto scaling. + + :param bounds: Minimum and maximum number of scale units to deploy. + :type bounds: + ~azure.mgmt.network.v2018_08_01.models.ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds + """ + + _attribute_map = { + 'bounds': {'key': 'bounds', 'type': 'ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds'}, + } + + def __init__(self, *, bounds=None, **kwargs) -> None: + super(ExpressRouteGatewayPropertiesAutoScaleConfiguration, self).__init__(**kwargs) + self.bounds = bounds diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_py3.py new file mode 100644 index 000000000000..723bb8e472cd --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_gateway_py3.py @@ -0,0 +1,79 @@ +# 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 ExpressRouteGateway(Resource): + """ExpressRoute gateway 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 auto_scale_configuration: Configuration for auto scaling. + :type auto_scale_configuration: + ~azure.mgmt.network.v2018_08_01.models.ExpressRouteGatewayPropertiesAutoScaleConfiguration + :ivar express_route_connections: List of ExpressRoute connections to the + ExpressRoute gateway. + :vartype express_route_connections: + list[~azure.mgmt.network.v2018_08_01.models.ExpressRouteConnection] + :ivar provisioning_state: The provisioning state of the resource. Possible + values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.network.v2018_08_01.models.ProvisioningState + :param express_route_gateway_id: The resource URI for the Virtual Hub + where the ExpressRoute gateway is or will be deployed. The Virtual Hub + resource and the ExpressRoute gateway resource reside in the same + subscription. + :type express_route_gateway_id: str + :ivar etag: A unique read-only string that changes whenever the resource + is updated. + :vartype etag: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'express_route_connections': {'readonly': True}, + 'provisioning_state': {'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}'}, + 'auto_scale_configuration': {'key': 'properties.autoScaleConfiguration', 'type': 'ExpressRouteGatewayPropertiesAutoScaleConfiguration'}, + 'express_route_connections': {'key': 'properties.expressRouteConnections', 'type': '[ExpressRouteConnection]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'express_route_gateway_id': {'key': 'properties.virtualHub.id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, location: str=None, tags=None, auto_scale_configuration=None, express_route_gateway_id: str=None, **kwargs) -> None: + super(ExpressRouteGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.auto_scale_configuration = auto_scale_configuration + self.express_route_connections = None + self.provisioning_state = None + self.express_route_gateway_id = express_route_gateway_id + self.etag = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/interface_endpoint.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/interface_endpoint.py new file mode 100644 index 000000000000..15794d1ca441 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/interface_endpoint.py @@ -0,0 +1,80 @@ +# 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 InterfaceEndpoint(Resource): + """Interface endpoint 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 fqdn: A first-party service's FQDN that is mapped to the private IP + allocated via this interface endpoint. + :type fqdn: str + :param endpoint_service: A reference to the service being brought into the + virtual network. + :type endpoint_service: + ~azure.mgmt.network.v2018_08_01.models.EndpointService + :param subnet: The ID of the subnet from which the private IP will be + allocated. + :type subnet: ~azure.mgmt.network.v2018_08_01.models.SubResource + :param network_interfaces: Gets an array of references to the network + interfaces created for this interface endpoint. + :type network_interfaces: + list[~azure.mgmt.network.v2018_08_01.models.SubResource] + :ivar owner: A read-only property that identifies who created this + interface endpoint. + :vartype owner: str + :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}, + 'owner': {'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}'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'endpoint_service': {'key': 'properties.endpointService', 'type': 'EndpointService'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'network_interfaces': {'key': 'properties.networkInterfaces', 'type': '[SubResource]'}, + 'owner': {'key': 'properties.owner', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InterfaceEndpoint, self).__init__(**kwargs) + self.fqdn = kwargs.get('fqdn', None) + self.endpoint_service = kwargs.get('endpoint_service', None) + self.subnet = kwargs.get('subnet', None) + self.network_interfaces = kwargs.get('network_interfaces', None) + self.owner = None + self.etag = kwargs.get('etag', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/interface_endpoint_paged.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/interface_endpoint_paged.py new file mode 100644 index 000000000000..8150414b7fd7 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/interface_endpoint_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 InterfaceEndpointPaged(Paged): + """ + A paging container for iterating over a list of :class:`InterfaceEndpoint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InterfaceEndpoint]'} + } + + def __init__(self, *args, **kwargs): + + super(InterfaceEndpointPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/interface_endpoint_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/interface_endpoint_py3.py new file mode 100644 index 000000000000..796fbd7a5bd8 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/interface_endpoint_py3.py @@ -0,0 +1,80 @@ +# 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 InterfaceEndpoint(Resource): + """Interface endpoint 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 fqdn: A first-party service's FQDN that is mapped to the private IP + allocated via this interface endpoint. + :type fqdn: str + :param endpoint_service: A reference to the service being brought into the + virtual network. + :type endpoint_service: + ~azure.mgmt.network.v2018_08_01.models.EndpointService + :param subnet: The ID of the subnet from which the private IP will be + allocated. + :type subnet: ~azure.mgmt.network.v2018_08_01.models.SubResource + :param network_interfaces: Gets an array of references to the network + interfaces created for this interface endpoint. + :type network_interfaces: + list[~azure.mgmt.network.v2018_08_01.models.SubResource] + :ivar owner: A read-only property that identifies who created this + interface endpoint. + :vartype owner: str + :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}, + 'owner': {'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}'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'endpoint_service': {'key': 'properties.endpointService', 'type': 'EndpointService'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'network_interfaces': {'key': 'properties.networkInterfaces', 'type': '[SubResource]'}, + 'owner': {'key': 'properties.owner', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, location: str=None, tags=None, fqdn: str=None, endpoint_service=None, subnet=None, network_interfaces=None, etag: str=None, **kwargs) -> None: + super(InterfaceEndpoint, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.fqdn = fqdn + self.endpoint_service = endpoint_service + self.subnet = subnet + self.network_interfaces = network_interfaces + self.owner = None + self.etag = etag diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface.py index 484ae42136e1..0bda2f53ff41 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface.py @@ -34,6 +34,10 @@ class NetworkInterface(Resource): resource. :type network_security_group: ~azure.mgmt.network.v2018_08_01.models.NetworkSecurityGroup + :param interface_endpoint: A reference to the interface endpoint to which + the network interface is linked. + :type interface_endpoint: + ~azure.mgmt.network.v2018_08_01.models.InterfaceEndpoint :param ip_configurations: A list of IPConfigurations of the network interface. :type ip_configurations: @@ -52,6 +56,11 @@ class NetworkInterface(Resource): :param enable_ip_forwarding: Indicates whether IP forwarding is enabled on this network interface. :type enable_ip_forwarding: bool + :ivar hosted_workloads: A list of references to linked BareMetal resources + :vartype hosted_workloads: list[str] + :param linked_resource_type: The type of resource to be linked to this + network interface + :type linked_resource_type: str :param resource_guid: The resource GUID property of the network interface resource. :type resource_guid: str @@ -66,6 +75,7 @@ class NetworkInterface(Resource): _validation = { 'name': {'readonly': True}, 'type': {'readonly': True}, + 'hosted_workloads': {'readonly': True}, } _attribute_map = { @@ -76,12 +86,15 @@ class NetworkInterface(Resource): 'tags': {'key': 'tags', 'type': '{str}'}, 'virtual_machine': {'key': 'properties.virtualMachine', 'type': 'SubResource'}, 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, + 'interface_endpoint': {'key': 'properties.interfaceEndpoint', 'type': 'InterfaceEndpoint'}, 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'NetworkInterfaceDnsSettings'}, 'mac_address': {'key': 'properties.macAddress', 'type': 'str'}, 'primary': {'key': 'properties.primary', 'type': 'bool'}, 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + 'hosted_workloads': {'key': 'properties.hostedWorkloads', 'type': '[str]'}, + 'linked_resource_type': {'key': 'properties.linkedResourceType', 'type': 'str'}, 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, @@ -91,12 +104,15 @@ def __init__(self, **kwargs): super(NetworkInterface, self).__init__(**kwargs) self.virtual_machine = kwargs.get('virtual_machine', None) self.network_security_group = kwargs.get('network_security_group', None) + self.interface_endpoint = kwargs.get('interface_endpoint', None) self.ip_configurations = kwargs.get('ip_configurations', None) self.dns_settings = kwargs.get('dns_settings', None) self.mac_address = kwargs.get('mac_address', None) self.primary = kwargs.get('primary', None) self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) + self.hosted_workloads = None + self.linked_resource_type = kwargs.get('linked_resource_type', None) self.resource_guid = kwargs.get('resource_guid', None) self.provisioning_state = kwargs.get('provisioning_state', None) self.etag = kwargs.get('etag', None) 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_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_py3.py index aacec11e390c..d92bd774beda 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_interface_py3.py @@ -34,6 +34,10 @@ class NetworkInterface(Resource): resource. :type network_security_group: ~azure.mgmt.network.v2018_08_01.models.NetworkSecurityGroup + :param interface_endpoint: A reference to the interface endpoint to which + the network interface is linked. + :type interface_endpoint: + ~azure.mgmt.network.v2018_08_01.models.InterfaceEndpoint :param ip_configurations: A list of IPConfigurations of the network interface. :type ip_configurations: @@ -52,6 +56,11 @@ class NetworkInterface(Resource): :param enable_ip_forwarding: Indicates whether IP forwarding is enabled on this network interface. :type enable_ip_forwarding: bool + :ivar hosted_workloads: A list of references to linked BareMetal resources + :vartype hosted_workloads: list[str] + :param linked_resource_type: The type of resource to be linked to this + network interface + :type linked_resource_type: str :param resource_guid: The resource GUID property of the network interface resource. :type resource_guid: str @@ -66,6 +75,7 @@ class NetworkInterface(Resource): _validation = { 'name': {'readonly': True}, 'type': {'readonly': True}, + 'hosted_workloads': {'readonly': True}, } _attribute_map = { @@ -76,27 +86,33 @@ class NetworkInterface(Resource): 'tags': {'key': 'tags', 'type': '{str}'}, 'virtual_machine': {'key': 'properties.virtualMachine', 'type': 'SubResource'}, 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, + 'interface_endpoint': {'key': 'properties.interfaceEndpoint', 'type': 'InterfaceEndpoint'}, 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'NetworkInterfaceDnsSettings'}, 'mac_address': {'key': 'properties.macAddress', 'type': 'str'}, 'primary': {'key': 'properties.primary', 'type': 'bool'}, 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + 'hosted_workloads': {'key': 'properties.hostedWorkloads', 'type': '[str]'}, + 'linked_resource_type': {'key': 'properties.linkedResourceType', 'type': 'str'}, 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, *, id: str=None, location: str=None, tags=None, virtual_machine=None, network_security_group=None, ip_configurations=None, dns_settings=None, mac_address: str=None, primary: bool=None, enable_accelerated_networking: bool=None, enable_ip_forwarding: bool=None, resource_guid: str=None, provisioning_state: str=None, etag: str=None, **kwargs) -> None: + def __init__(self, *, id: str=None, location: str=None, tags=None, virtual_machine=None, network_security_group=None, interface_endpoint=None, ip_configurations=None, dns_settings=None, mac_address: str=None, primary: bool=None, enable_accelerated_networking: bool=None, enable_ip_forwarding: bool=None, linked_resource_type: str=None, resource_guid: str=None, provisioning_state: str=None, etag: str=None, **kwargs) -> None: super(NetworkInterface, self).__init__(id=id, location=location, tags=tags, **kwargs) self.virtual_machine = virtual_machine self.network_security_group = network_security_group + self.interface_endpoint = interface_endpoint self.ip_configurations = ip_configurations self.dns_settings = dns_settings self.mac_address = mac_address self.primary = primary self.enable_accelerated_networking = enable_accelerated_networking self.enable_ip_forwarding = enable_ip_forwarding + self.hosted_workloads = None + self.linked_resource_type = linked_resource_type self.resource_guid = resource_guid self.provisioning_state = provisioning_state self.etag = etag 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..ff0e45ed8179 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" @@ -202,12 +202,17 @@ class AzureFirewallApplicationRuleProtocolType(str, Enum): https = "Https" +class AzureFirewallNatRCActionType(str, Enum): + + snat = "Snat" + dnat = "Dnat" + + class AzureFirewallNetworkRuleProtocol(str, Enum): tcp = "TCP" udp = "UDP" any = "Any" - icmp = "ICMP" class AuthorizationUseStatus(str, Enum): diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/subnet.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/subnet.py index 69f191169369..53982cdfdde7 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/subnet.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/subnet.py @@ -36,6 +36,9 @@ class Subnet(SubResource): :param service_endpoint_policies: An array of service endpoint policies. :type service_endpoint_policies: list[~azure.mgmt.network.v2018_08_01.models.ServiceEndpointPolicy] + :param interface_endpoints: An array of references to interface endpoints + :type interface_endpoints: + list[~azure.mgmt.network.v2018_08_01.models.SubResource] :ivar ip_configurations: Gets an array of references to the network interface IP configurations using subnet. :vartype ip_configurations: @@ -66,6 +69,7 @@ class Subnet(SubResource): 'route_table': {'key': 'properties.routeTable', 'type': 'RouteTable'}, 'service_endpoints': {'key': 'properties.serviceEndpoints', 'type': '[ServiceEndpointPropertiesFormat]'}, 'service_endpoint_policies': {'key': 'properties.serviceEndpointPolicies', 'type': '[ServiceEndpointPolicy]'}, + 'interface_endpoints': {'key': 'properties.interfaceEndpoints', 'type': '[SubResource]'}, 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[IPConfiguration]'}, 'resource_navigation_links': {'key': 'properties.resourceNavigationLinks', 'type': '[ResourceNavigationLink]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -81,6 +85,7 @@ def __init__(self, **kwargs): self.route_table = kwargs.get('route_table', None) self.service_endpoints = kwargs.get('service_endpoints', None) self.service_endpoint_policies = kwargs.get('service_endpoint_policies', None) + self.interface_endpoints = kwargs.get('interface_endpoints', None) self.ip_configurations = None self.resource_navigation_links = kwargs.get('resource_navigation_links', None) self.provisioning_state = kwargs.get('provisioning_state', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/subnet_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/subnet_py3.py index b54ee83a1240..cb04284ba326 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/subnet_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/subnet_py3.py @@ -36,6 +36,9 @@ class Subnet(SubResource): :param service_endpoint_policies: An array of service endpoint policies. :type service_endpoint_policies: list[~azure.mgmt.network.v2018_08_01.models.ServiceEndpointPolicy] + :param interface_endpoints: An array of references to interface endpoints + :type interface_endpoints: + list[~azure.mgmt.network.v2018_08_01.models.SubResource] :ivar ip_configurations: Gets an array of references to the network interface IP configurations using subnet. :vartype ip_configurations: @@ -66,6 +69,7 @@ class Subnet(SubResource): 'route_table': {'key': 'properties.routeTable', 'type': 'RouteTable'}, 'service_endpoints': {'key': 'properties.serviceEndpoints', 'type': '[ServiceEndpointPropertiesFormat]'}, 'service_endpoint_policies': {'key': 'properties.serviceEndpointPolicies', 'type': '[ServiceEndpointPolicy]'}, + 'interface_endpoints': {'key': 'properties.interfaceEndpoints', 'type': '[SubResource]'}, 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[IPConfiguration]'}, 'resource_navigation_links': {'key': 'properties.resourceNavigationLinks', 'type': '[ResourceNavigationLink]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -73,7 +77,7 @@ class Subnet(SubResource): 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, *, id: str=None, address_prefix: str=None, address_prefixes=None, network_security_group=None, route_table=None, service_endpoints=None, service_endpoint_policies=None, resource_navigation_links=None, provisioning_state: str=None, name: str=None, etag: str=None, **kwargs) -> None: + def __init__(self, *, id: str=None, address_prefix: str=None, address_prefixes=None, network_security_group=None, route_table=None, service_endpoints=None, service_endpoint_policies=None, interface_endpoints=None, resource_navigation_links=None, provisioning_state: str=None, name: str=None, etag: str=None, **kwargs) -> None: super(Subnet, self).__init__(id=id, **kwargs) self.address_prefix = address_prefix self.address_prefixes = address_prefixes @@ -81,6 +85,7 @@ def __init__(self, *, id: str=None, address_prefix: str=None, address_prefixes=N self.route_table = route_table self.service_endpoints = service_endpoints self.service_endpoint_policies = service_endpoint_policies + self.interface_endpoints = interface_endpoints self.ip_configurations = None self.resource_navigation_links = resource_navigation_links self.provisioning_state = provisioning_state 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 6537a5654dc3..260b4d056999 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 @@ -31,6 +31,9 @@ from .operations.express_route_service_providers_operations import ExpressRouteServiceProvidersOperations from .operations.express_route_cross_connections_operations import ExpressRouteCrossConnectionsOperations from .operations.express_route_cross_connection_peerings_operations import ExpressRouteCrossConnectionPeeringsOperations +from .operations.express_route_gateways_operations import ExpressRouteGatewaysOperations +from .operations.express_route_connections_operations import ExpressRouteConnectionsOperations +from .operations.interface_endpoints_operations import InterfaceEndpointsOperations from .operations.load_balancers_operations import LoadBalancersOperations from .operations.load_balancer_backend_address_pools_operations import LoadBalancerBackendAddressPoolsOperations from .operations.load_balancer_frontend_ip_configurations_operations import LoadBalancerFrontendIPConfigurationsOperations @@ -41,6 +44,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 @@ -61,6 +65,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 @@ -140,6 +145,12 @@ class NetworkManagementClient(SDKClient): :vartype express_route_cross_connections: azure.mgmt.network.v2018_08_01.operations.ExpressRouteCrossConnectionsOperations :ivar express_route_cross_connection_peerings: ExpressRouteCrossConnectionPeerings operations :vartype express_route_cross_connection_peerings: azure.mgmt.network.v2018_08_01.operations.ExpressRouteCrossConnectionPeeringsOperations + :ivar express_route_gateways: ExpressRouteGateways operations + :vartype express_route_gateways: azure.mgmt.network.v2018_08_01.operations.ExpressRouteGatewaysOperations + :ivar express_route_connections: ExpressRouteConnections operations + :vartype express_route_connections: azure.mgmt.network.v2018_08_01.operations.ExpressRouteConnectionsOperations + :ivar interface_endpoints: InterfaceEndpoints operations + :vartype interface_endpoints: azure.mgmt.network.v2018_08_01.operations.InterfaceEndpointsOperations :ivar load_balancers: LoadBalancers operations :vartype load_balancers: azure.mgmt.network.v2018_08_01.operations.LoadBalancersOperations :ivar load_balancer_backend_address_pools: LoadBalancerBackendAddressPools operations @@ -160,6 +171,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 @@ -200,6 +213,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 @@ -267,6 +282,12 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.express_route_cross_connection_peerings = ExpressRouteCrossConnectionPeeringsOperations( self._client, self.config, self._serialize, self._deserialize) + self.express_route_gateways = ExpressRouteGatewaysOperations( + self._client, self.config, self._serialize, self._deserialize) + self.express_route_connections = ExpressRouteConnectionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.interface_endpoints = InterfaceEndpointsOperations( + self._client, self.config, self._serialize, self._deserialize) self.load_balancers = LoadBalancersOperations( self._client, self.config, self._serialize, self._deserialize) self.load_balancer_backend_address_pools = LoadBalancerBackendAddressPoolsOperations( @@ -287,6 +308,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( @@ -327,6 +350,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 ca348d9231bd..c74e9c1eb801 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 @@ -22,6 +22,9 @@ from .express_route_service_providers_operations import ExpressRouteServiceProvidersOperations from .express_route_cross_connections_operations import ExpressRouteCrossConnectionsOperations from .express_route_cross_connection_peerings_operations import ExpressRouteCrossConnectionPeeringsOperations +from .express_route_gateways_operations import ExpressRouteGatewaysOperations +from .express_route_connections_operations import ExpressRouteConnectionsOperations +from .interface_endpoints_operations import InterfaceEndpointsOperations from .load_balancers_operations import LoadBalancersOperations from .load_balancer_backend_address_pools_operations import LoadBalancerBackendAddressPoolsOperations from .load_balancer_frontend_ip_configurations_operations import LoadBalancerFrontendIPConfigurationsOperations @@ -32,6 +35,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 @@ -52,6 +56,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 @@ -77,6 +82,9 @@ 'ExpressRouteServiceProvidersOperations', 'ExpressRouteCrossConnectionsOperations', 'ExpressRouteCrossConnectionPeeringsOperations', + 'ExpressRouteGatewaysOperations', + 'ExpressRouteConnectionsOperations', + 'InterfaceEndpointsOperations', 'LoadBalancersOperations', 'LoadBalancerBackendAddressPoolsOperations', 'LoadBalancerFrontendIPConfigurationsOperations', @@ -87,6 +95,7 @@ 'NetworkInterfacesOperations', 'NetworkInterfaceIPConfigurationsOperations', 'NetworkInterfaceLoadBalancersOperations', + 'NetworkInterfaceTapConfigurationsOperations', 'NetworkSecurityGroupsOperations', 'SecurityRulesOperations', 'DefaultSecurityRulesOperations', @@ -107,6 +116,7 @@ 'VirtualNetworksOperations', 'SubnetsOperations', 'VirtualNetworkPeeringsOperations', + 'VirtualNetworkTapsOperations', 'VirtualNetworkGatewaysOperations', 'VirtualNetworkGatewayConnectionsOperations', 'LocalNetworkGatewaysOperations', diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_connections_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_connections_operations.py new file mode 100644 index 000000000000..bc04575bf61c --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_connections_operations.py @@ -0,0 +1,364 @@ +# 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 ExpressRouteConnectionsOperations(object): + """ExpressRouteConnectionsOperations 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 _create_or_update_initial( + self, resource_group_name, express_route_gateway_name, connection_name, put_express_route_connection_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'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_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(put_express_route_connection_parameters, 'ExpressRouteConnection') + + # 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('ExpressRouteConnection', response) + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, express_route_gateway_name, connection_name, put_express_route_connection_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a connection between an ExpressRoute gateway and an + ExpressRoute circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute + gateway. + :type express_route_gateway_name: str + :param connection_name: The name of the connection subresource. + :type connection_name: str + :param put_express_route_connection_parameters: Parameters required in + an ExpressRouteConnection PUT operation. + :type put_express_route_connection_parameters: + ~azure.mgmt.network.v2018_08_01.models.ExpressRouteConnection + :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 ExpressRouteConnection + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_08_01.models.ExpressRouteConnection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_08_01.models.ExpressRouteConnection]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + connection_name=connection_name, + put_express_route_connection_parameters=put_express_route_connection_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ExpressRouteConnection', 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/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}'} + + def get( + self, resource_group_name, express_route_gateway_name, connection_name, custom_headers=None, raw=False, **operation_config): + """Gets the specified ExpressRouteConnection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute + gateway. + :type express_route_gateway_name: str + :param connection_name: The name of the ExpressRoute connection. + :type connection_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: ExpressRouteConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.network.v2018_08_01.models.ExpressRouteConnection + 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'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_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('ExpressRouteConnection', 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/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}'} + + + def _delete_initial( + self, resource_group_name, express_route_gateway_name, connection_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'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_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, express_route_gateway_name, connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a connection to a ExpressRoute circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute + gateway. + :type express_route_gateway_name: str + :param connection_name: The name of the connection subresource. + :type connection_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, + express_route_gateway_name=express_route_gateway_name, + connection_name=connection_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/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}'} + + def list( + self, resource_group_name, express_route_gateway_name, custom_headers=None, raw=False, **operation_config): + """Lists ExpressRouteConnections. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute + gateway. + :type express_route_gateway_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: ExpressRouteConnectionList or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.network.v2018_08_01.models.ExpressRouteConnectionList or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_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('ExpressRouteConnectionList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections'} diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_gateways_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_gateways_operations.py new file mode 100644 index 000000000000..a8d5c40f9e03 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_gateways_operations.py @@ -0,0 +1,406 @@ +# 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 ExpressRouteGatewaysOperations(object): + """ExpressRouteGatewaysOperations 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_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists ExpressRoute gateways under a given 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: ExpressRouteGatewayList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.network.v2018_08_01.models.ExpressRouteGatewayList + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_by_subscription.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') + + # 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('ExpressRouteGatewayList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteGateways'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists ExpressRoute gateways in a given resource group. + + :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: ExpressRouteGatewayList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.network.v2018_08_01.models.ExpressRouteGatewayList + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # 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') + + # 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('ExpressRouteGatewayList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways'} + + + def _create_or_update_initial( + self, resource_group_name, express_route_gateway_name, put_express_route_gateway_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'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_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(put_express_route_gateway_parameters, 'ExpressRouteGateway') + + # 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('ExpressRouteGateway', response) + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, express_route_gateway_name, put_express_route_gateway_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a ExpressRoute gateway in a specified resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute + gateway. + :type express_route_gateway_name: str + :param put_express_route_gateway_parameters: Parameters required in an + ExpressRoute gateway PUT operation. + :type put_express_route_gateway_parameters: + ~azure.mgmt.network.v2018_08_01.models.ExpressRouteGateway + :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 ExpressRouteGateway or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_08_01.models.ExpressRouteGateway] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_08_01.models.ExpressRouteGateway]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + put_express_route_gateway_parameters=put_express_route_gateway_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ExpressRouteGateway', 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/expressRouteGateways/{expressRouteGatewayName}'} + + def get( + self, resource_group_name, express_route_gateway_name, custom_headers=None, raw=False, **operation_config): + """Fetches the details of a ExpressRoute gateway in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute + gateway. + :type express_route_gateway_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: ExpressRouteGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.network.v2018_08_01.models.ExpressRouteGateway 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'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_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, 404]: + 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('ExpressRouteGateway', 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/expressRouteGateways/{expressRouteGatewayName}'} + + + def _delete_initial( + self, resource_group_name, express_route_gateway_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'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_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, express_route_gateway_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified ExpressRoute gateway in a resource group. An + ExpressRoute gateway resource can only be deleted when there are no + connection subresources. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute + gateway. + :type express_route_gateway_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, + express_route_gateway_name=express_route_gateway_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/expressRouteGateways/{expressRouteGatewayName}'} diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/interface_endpoints_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/interface_endpoints_operations.py new file mode 100644 index 000000000000..e283f4ce6c75 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/interface_endpoints_operations.py @@ -0,0 +1,421 @@ +# 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 InterfaceEndpointsOperations(object): + """InterfaceEndpointsOperations 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, interface_endpoint_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'), + 'interfaceEndpointName': self._serialize.url("interface_endpoint_name", interface_endpoint_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, interface_endpoint_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified interface endpoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param interface_endpoint_name: The name of the interface endpoint. + :type interface_endpoint_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, + interface_endpoint_name=interface_endpoint_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/interfaceEndpoints/{interfaceEndpointName}'} + + def get( + self, resource_group_name, interface_endpoint_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets the specified interface endpoint by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param interface_endpoint_name: The name of the interface endpoint. + :type interface_endpoint_name: str + :param expand: Expands referenced resources. + :type expand: 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: InterfaceEndpoint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.network.v2018_08_01.models.InterfaceEndpoint 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'), + 'interfaceEndpointName': self._serialize.url("interface_endpoint_name", interface_endpoint_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') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, '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('InterfaceEndpoint', 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/interfaceEndpoints/{interfaceEndpointName}'} + + + def _create_or_update_initial( + self, resource_group_name, interface_endpoint_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'), + 'interfaceEndpointName': self._serialize.url("interface_endpoint_name", interface_endpoint_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, 'InterfaceEndpoint') + + # 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('InterfaceEndpoint', response) + if response.status_code == 201: + deserialized = self._deserialize('InterfaceEndpoint', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, interface_endpoint_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates an interface endpoint in the specified resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param interface_endpoint_name: The name of the interface endpoint. + :type interface_endpoint_name: str + :param parameters: Parameters supplied to the create or update + interface endpoint operation + :type parameters: + ~azure.mgmt.network.v2018_08_01.models.InterfaceEndpoint + :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 InterfaceEndpoint or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_08_01.models.InterfaceEndpoint] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_08_01.models.InterfaceEndpoint]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + interface_endpoint_name=interface_endpoint_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('InterfaceEndpoint', 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/interfaceEndpoints/{interfaceEndpointName}'} + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all interface endpoints in a resource group. + + :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 InterfaceEndpoint + :rtype: + ~azure.mgmt.network.v2018_08_01.models.InterfaceEndpointPaged[~azure.mgmt.network.v2018_08_01.models.InterfaceEndpoint] + :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'), + '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.InterfaceEndpointPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.InterfaceEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/interfaceEndpoints'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Gets all interface endpoints 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 InterfaceEndpoint + :rtype: + ~azure.mgmt.network.v2018_08_01.models.InterfaceEndpointPaged[~azure.mgmt.network.v2018_08_01.models.InterfaceEndpoint] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_subscription.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.InterfaceEndpointPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.InterfaceEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/interfaceEndpoints'} 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'}