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 8aea2bed1db3..dec37c820691 100644 --- a/azure-mgmt-network/azure/mgmt/network/network_management_client.py +++ b/azure-mgmt-network/azure/mgmt/network/network_management_client.py @@ -914,6 +914,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: 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 8bc3c1c6de2a..34590085da89 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 @@ -14,6 +14,8 @@ from .sub_resource_py3 import SubResource 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 @@ -249,6 +251,8 @@ from .sub_resource import SubResource 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 @@ -492,6 +496,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 @@ -620,6 +625,8 @@ 'SubResource', 'ApplicationSecurityGroup', 'SecurityRule', + 'EndpointService', + 'InterfaceEndpoint', 'NetworkInterfaceDnsSettings', 'NetworkInterface', 'NetworkSecurityGroup', @@ -863,6 +870,7 @@ 'ExpressRouteServiceProviderPaged', 'ExpressRouteCrossConnectionPaged', 'ExpressRouteCrossConnectionPeeringPaged', + 'InterfaceEndpointPaged', 'LoadBalancerPaged', 'BackendAddressPoolPaged', 'FrontendIPConfigurationPaged', 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/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_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_management_client_enums.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/network_management_client_enums.py index ba253dc20d57..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 @@ -213,7 +213,6 @@ 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/network_management_client.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/network_management_client.py index b174fbdb33f8..717e00bbfd2a 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,7 @@ 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.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 @@ -142,6 +143,8 @@ 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 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 @@ -273,6 +276,8 @@ 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.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( 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 98f9ad5f0850..89a785eef55b 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,7 @@ 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 .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 @@ -79,6 +80,7 @@ 'ExpressRouteServiceProvidersOperations', 'ExpressRouteCrossConnectionsOperations', 'ExpressRouteCrossConnectionPeeringsOperations', + 'InterfaceEndpointsOperations', 'LoadBalancersOperations', 'LoadBalancerBackendAddressPoolsOperations', 'LoadBalancerFrontendIPConfigurationsOperations', 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'}