From f8a3645b159fa628bf8a971d42188ccbff3bf533 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 8 Oct 2018 23:11:00 +0000 Subject: [PATCH] Generated from b232daf214b1a03e32b14427be20bbca4ac805ac ExpressRoutePort swagger --- .../mgmt/network/network_management_client.py | 39 ++ .../network/v2018_08_01/models/__init__.py | 24 + .../models/express_route_circuit.py | 17 + .../models/express_route_circuit_py3.py | 19 +- .../v2018_08_01/models/express_route_link.py | 86 +++ .../models/express_route_link_paged.py | 27 + .../models/express_route_link_py3.py | 86 +++ .../v2018_08_01/models/express_route_port.py | 116 ++++ .../models/express_route_port_paged.py | 27 + .../models/express_route_port_py3.py | 116 ++++ .../models/express_route_ports_location.py | 72 +++ ...express_route_ports_location_bandwidths.py | 42 ++ ...ess_route_ports_location_bandwidths_py3.py | 42 ++ .../express_route_ports_location_paged.py | 27 + .../express_route_ports_location_py3.py | 72 +++ .../models/network_management_client_enums.py | 18 + .../v2018_08_01/network_management_client.py | 15 + .../v2018_08_01/operations/__init__.py | 6 + .../express_route_links_operations.py | 176 ++++++ ...xpress_route_ports_locations_operations.py | 166 ++++++ .../express_route_ports_operations.py | 522 ++++++++++++++++++ 21 files changed, 1714 insertions(+), 1 deletion(-) create mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_link.py create mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_link_paged.py create mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_link_py3.py create mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_port.py create mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_port_paged.py create mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_port_py3.py create mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location.py create mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location_bandwidths.py create mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location_bandwidths_py3.py create mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location_paged.py create mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location_py3.py create mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_links_operations.py create mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_ports_locations_operations.py create mode 100644 azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_ports_operations.py 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 1d13d18293f8..d07160d047a8 100644 --- a/azure-mgmt-network/azure/mgmt/network/network_management_client.py +++ b/azure-mgmt-network/azure/mgmt/network/network_management_client.py @@ -848,6 +848,45 @@ def express_route_gateways(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_links(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRouteLinksOperations` + """ + api_version = self._get_api_version('express_route_links') + if api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteLinksOperations 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_ports(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRoutePortsOperations` + """ + api_version = self._get_api_version('express_route_ports') + if api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRoutePortsOperations 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_ports_locations(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRoutePortsLocationsOperations` + """ + api_version = self._get_api_version('express_route_ports_locations') + if api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRoutePortsLocationsOperations 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: 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 4afc0cd7a568..57bf32acecb4 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 @@ -125,6 +125,10 @@ from .express_route_gateway_py3 import ExpressRouteGateway from .express_route_gateway_list_py3 import ExpressRouteGatewayList from .express_route_connection_list_py3 import ExpressRouteConnectionList + from .express_route_ports_location_bandwidths_py3 import ExpressRoutePortsLocationBandwidths + from .express_route_ports_location_py3 import ExpressRoutePortsLocation + from .express_route_link_py3 import ExpressRouteLink + from .express_route_port_py3 import ExpressRoutePort from .load_balancer_sku_py3 import LoadBalancerSku from .load_balancing_rule_py3 import LoadBalancingRule from .probe_py3 import Probe @@ -394,6 +398,10 @@ from .express_route_gateway import ExpressRouteGateway from .express_route_gateway_list import ExpressRouteGatewayList from .express_route_connection_list import ExpressRouteConnectionList + from .express_route_ports_location_bandwidths import ExpressRoutePortsLocationBandwidths + from .express_route_ports_location import ExpressRoutePortsLocation + from .express_route_link import ExpressRouteLink + from .express_route_port import ExpressRoutePort from .load_balancer_sku import LoadBalancerSku from .load_balancing_rule import LoadBalancingRule from .probe import Probe @@ -561,6 +569,9 @@ 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 .express_route_ports_location_paged import ExpressRoutePortsLocationPaged +from .express_route_port_paged import ExpressRoutePortPaged +from .express_route_link_paged import ExpressRouteLinkPaged from .interface_endpoint_paged import InterfaceEndpointPaged from .load_balancer_paged import LoadBalancerPaged from .backend_address_pool_paged import BackendAddressPoolPaged @@ -643,6 +654,9 @@ ExpressRouteCircuitSkuTier, ExpressRouteCircuitSkuFamily, ServiceProviderProvisioningState, + ExpressRouteLinkConnectorType, + ExpressRouteLinkAdminState, + ExpressRoutePortsEncapsulation, LoadBalancerSkuName, LoadDistribution, ProbeProtocol, @@ -810,6 +824,10 @@ 'ExpressRouteGateway', 'ExpressRouteGatewayList', 'ExpressRouteConnectionList', + 'ExpressRoutePortsLocationBandwidths', + 'ExpressRoutePortsLocation', + 'ExpressRouteLink', + 'ExpressRoutePort', 'LoadBalancerSku', 'LoadBalancingRule', 'Probe', @@ -977,6 +995,9 @@ 'ExpressRouteServiceProviderPaged', 'ExpressRouteCrossConnectionPaged', 'ExpressRouteCrossConnectionPeeringPaged', + 'ExpressRoutePortsLocationPaged', + 'ExpressRoutePortPaged', + 'ExpressRouteLinkPaged', 'InterfaceEndpointPaged', 'LoadBalancerPaged', 'BackendAddressPoolPaged', @@ -1058,6 +1079,9 @@ 'ExpressRouteCircuitSkuTier', 'ExpressRouteCircuitSkuFamily', 'ServiceProviderProvisioningState', + 'ExpressRouteLinkConnectorType', + 'ExpressRouteLinkAdminState', + 'ExpressRoutePortsEncapsulation', 'LoadBalancerSkuName', 'LoadDistribution', 'ProbeProtocol', diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_circuit.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_circuit.py index 3a8423be9f1a..0cfbafe84926 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_circuit.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_circuit.py @@ -55,6 +55,16 @@ class ExpressRouteCircuit(Resource): :param service_provider_properties: The ServiceProviderProperties. :type service_provider_properties: ~azure.mgmt.network.v2018_08_01.models.ExpressRouteCircuitServiceProviderProperties + :param express_route_port: The reference to the ExpressRoutePort resource + when the circuit is provisioned on an ExpressRoutePort resource. + :type express_route_port: + ~azure.mgmt.network.v2018_08_01.models.SubResource + :param bandwidth_in_gbps: The bandwidth of the circuit when the circuit is + provisioned on an ExpressRoutePort resource. + :type bandwidth_in_gbps: float + :ivar stag: The identifier of the circuit traffic. Outer tag for QinQ + encapsulation. + :vartype stag: int :param provisioning_state: Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. :type provisioning_state: str @@ -70,6 +80,7 @@ class ExpressRouteCircuit(Resource): _validation = { 'name': {'readonly': True}, 'type': {'readonly': True}, + 'stag': {'readonly': True}, 'etag': {'readonly': True}, } @@ -88,6 +99,9 @@ class ExpressRouteCircuit(Resource): 'service_key': {'key': 'properties.serviceKey', 'type': 'str'}, 'service_provider_notes': {'key': 'properties.serviceProviderNotes', 'type': 'str'}, 'service_provider_properties': {'key': 'properties.serviceProviderProperties', 'type': 'ExpressRouteCircuitServiceProviderProperties'}, + 'express_route_port': {'key': 'properties.expressRoutePort', 'type': 'SubResource'}, + 'bandwidth_in_gbps': {'key': 'properties.bandwidthInGbps', 'type': 'float'}, + 'stag': {'key': 'properties.stag', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, 'allow_global_reach': {'key': 'properties.allowGlobalReach', 'type': 'bool'}, @@ -105,6 +119,9 @@ def __init__(self, **kwargs): self.service_key = kwargs.get('service_key', None) self.service_provider_notes = kwargs.get('service_provider_notes', None) self.service_provider_properties = kwargs.get('service_provider_properties', None) + self.express_route_port = kwargs.get('express_route_port', None) + self.bandwidth_in_gbps = kwargs.get('bandwidth_in_gbps', None) + self.stag = None self.provisioning_state = kwargs.get('provisioning_state', None) self.gateway_manager_etag = kwargs.get('gateway_manager_etag', None) self.allow_global_reach = kwargs.get('allow_global_reach', None) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_circuit_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_circuit_py3.py index 06a104c8b458..73b55cbf7b5f 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_circuit_py3.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_circuit_py3.py @@ -55,6 +55,16 @@ class ExpressRouteCircuit(Resource): :param service_provider_properties: The ServiceProviderProperties. :type service_provider_properties: ~azure.mgmt.network.v2018_08_01.models.ExpressRouteCircuitServiceProviderProperties + :param express_route_port: The reference to the ExpressRoutePort resource + when the circuit is provisioned on an ExpressRoutePort resource. + :type express_route_port: + ~azure.mgmt.network.v2018_08_01.models.SubResource + :param bandwidth_in_gbps: The bandwidth of the circuit when the circuit is + provisioned on an ExpressRoutePort resource. + :type bandwidth_in_gbps: float + :ivar stag: The identifier of the circuit traffic. Outer tag for QinQ + encapsulation. + :vartype stag: int :param provisioning_state: Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. :type provisioning_state: str @@ -70,6 +80,7 @@ class ExpressRouteCircuit(Resource): _validation = { 'name': {'readonly': True}, 'type': {'readonly': True}, + 'stag': {'readonly': True}, 'etag': {'readonly': True}, } @@ -88,13 +99,16 @@ class ExpressRouteCircuit(Resource): 'service_key': {'key': 'properties.serviceKey', 'type': 'str'}, 'service_provider_notes': {'key': 'properties.serviceProviderNotes', 'type': 'str'}, 'service_provider_properties': {'key': 'properties.serviceProviderProperties', 'type': 'ExpressRouteCircuitServiceProviderProperties'}, + 'express_route_port': {'key': 'properties.expressRoutePort', 'type': 'SubResource'}, + 'bandwidth_in_gbps': {'key': 'properties.bandwidthInGbps', 'type': 'float'}, + 'stag': {'key': 'properties.stag', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, 'allow_global_reach': {'key': 'properties.allowGlobalReach', 'type': 'bool'}, 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, *, id: str=None, location: str=None, tags=None, sku=None, allow_classic_operations: bool=None, circuit_provisioning_state: str=None, service_provider_provisioning_state=None, authorizations=None, peerings=None, service_key: str=None, service_provider_notes: str=None, service_provider_properties=None, provisioning_state: str=None, gateway_manager_etag: str=None, allow_global_reach: bool=None, **kwargs) -> None: + def __init__(self, *, id: str=None, location: str=None, tags=None, sku=None, allow_classic_operations: bool=None, circuit_provisioning_state: str=None, service_provider_provisioning_state=None, authorizations=None, peerings=None, service_key: str=None, service_provider_notes: str=None, service_provider_properties=None, express_route_port=None, bandwidth_in_gbps: float=None, provisioning_state: str=None, gateway_manager_etag: str=None, allow_global_reach: bool=None, **kwargs) -> None: super(ExpressRouteCircuit, self).__init__(id=id, location=location, tags=tags, **kwargs) self.sku = sku self.allow_classic_operations = allow_classic_operations @@ -105,6 +119,9 @@ def __init__(self, *, id: str=None, location: str=None, tags=None, sku=None, all self.service_key = service_key self.service_provider_notes = service_provider_notes self.service_provider_properties = service_provider_properties + self.express_route_port = express_route_port + self.bandwidth_in_gbps = bandwidth_in_gbps + self.stag = None self.provisioning_state = provisioning_state self.gateway_manager_etag = gateway_manager_etag self.allow_global_reach = allow_global_reach diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_link.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_link.py new file mode 100644 index 000000000000..2c8c300fd9f0 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_link.py @@ -0,0 +1,86 @@ +# 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 ExpressRouteLink(SubResource): + """ExpressRouteLink. + + ExpressRouteLink child resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource ID. + :type id: str + :ivar router_name: Name of Azure router associated with physical port. + :vartype router_name: str + :ivar interface_name: Name of Azure router interface. + :vartype interface_name: str + :ivar patch_panel_id: Mapping between physical port to patch panel port. + :vartype patch_panel_id: str + :ivar rack_id: Mapping of physical patch panel to rack. + :vartype rack_id: str + :ivar connector_type: Physical fiber port type. Possible values include: + 'LC', 'SC' + :vartype connector_type: str or + ~azure.mgmt.network.v2018_08_01.models.ExpressRouteLinkConnectorType + :param admin_state: Administrative state of the physical port. Possible + values include: 'Enabled', 'Disabled' + :type admin_state: str or + ~azure.mgmt.network.v2018_08_01.models.ExpressRouteLinkAdminState + :ivar provisioning_state: The provisioning state of the ExpressRouteLink + resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and + 'Failed'. + :vartype provisioning_state: str + :param name: Name of child port resource that is unique among child port + resources of the parent. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource + is updated. + :vartype etag: str + """ + + _validation = { + 'router_name': {'readonly': True}, + 'interface_name': {'readonly': True}, + 'patch_panel_id': {'readonly': True}, + 'rack_id': {'readonly': True}, + 'connector_type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'router_name': {'key': 'properties.routerName', 'type': 'str'}, + 'interface_name': {'key': 'properties.interfaceName', 'type': 'str'}, + 'patch_panel_id': {'key': 'properties.patchPanelId', 'type': 'str'}, + 'rack_id': {'key': 'properties.rackId', 'type': 'str'}, + 'connector_type': {'key': 'properties.connectorType', 'type': 'str'}, + 'admin_state': {'key': 'properties.adminState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExpressRouteLink, self).__init__(**kwargs) + self.router_name = None + self.interface_name = None + self.patch_panel_id = None + self.rack_id = None + self.connector_type = None + self.admin_state = kwargs.get('admin_state', None) + self.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/express_route_link_paged.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_link_paged.py new file mode 100644 index 000000000000..91074370bccc --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_link_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 ExpressRouteLinkPaged(Paged): + """ + A paging container for iterating over a list of :class:`ExpressRouteLink ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ExpressRouteLink]'} + } + + def __init__(self, *args, **kwargs): + + super(ExpressRouteLinkPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_link_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_link_py3.py new file mode 100644 index 000000000000..74d44c0f9b7c --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_link_py3.py @@ -0,0 +1,86 @@ +# 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 ExpressRouteLink(SubResource): + """ExpressRouteLink. + + ExpressRouteLink child resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource ID. + :type id: str + :ivar router_name: Name of Azure router associated with physical port. + :vartype router_name: str + :ivar interface_name: Name of Azure router interface. + :vartype interface_name: str + :ivar patch_panel_id: Mapping between physical port to patch panel port. + :vartype patch_panel_id: str + :ivar rack_id: Mapping of physical patch panel to rack. + :vartype rack_id: str + :ivar connector_type: Physical fiber port type. Possible values include: + 'LC', 'SC' + :vartype connector_type: str or + ~azure.mgmt.network.v2018_08_01.models.ExpressRouteLinkConnectorType + :param admin_state: Administrative state of the physical port. Possible + values include: 'Enabled', 'Disabled' + :type admin_state: str or + ~azure.mgmt.network.v2018_08_01.models.ExpressRouteLinkAdminState + :ivar provisioning_state: The provisioning state of the ExpressRouteLink + resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and + 'Failed'. + :vartype provisioning_state: str + :param name: Name of child port resource that is unique among child port + resources of the parent. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource + is updated. + :vartype etag: str + """ + + _validation = { + 'router_name': {'readonly': True}, + 'interface_name': {'readonly': True}, + 'patch_panel_id': {'readonly': True}, + 'rack_id': {'readonly': True}, + 'connector_type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'router_name': {'key': 'properties.routerName', 'type': 'str'}, + 'interface_name': {'key': 'properties.interfaceName', 'type': 'str'}, + 'patch_panel_id': {'key': 'properties.patchPanelId', 'type': 'str'}, + 'rack_id': {'key': 'properties.rackId', 'type': 'str'}, + 'connector_type': {'key': 'properties.connectorType', 'type': 'str'}, + 'admin_state': {'key': 'properties.adminState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, admin_state=None, name: str=None, **kwargs) -> None: + super(ExpressRouteLink, self).__init__(id=id, **kwargs) + self.router_name = None + self.interface_name = None + self.patch_panel_id = None + self.rack_id = None + self.connector_type = None + self.admin_state = admin_state + self.provisioning_state = None + self.name = name + self.etag = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_port.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_port.py new file mode 100644 index 000000000000..c63ba29998ef --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_port.py @@ -0,0 +1,116 @@ +# 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 ExpressRoutePort(Resource): + """ExpressRoute Port. + + ExpressRoutePort resource definition. + + 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 peering_location: The name of the peering location that the + ExpressRoutePort is mapped to physically. + :type peering_location: str + :param bandwidth_in_gbps: Bandwidth of procured ports in Gbps + :type bandwidth_in_gbps: int + :ivar provisioned_bandwidth_in_gbps: Aggregate Gbps of associated circuit + bandwidths. + :vartype provisioned_bandwidth_in_gbps: float + :ivar mtu: Maximum transmission unit of the physical port pair(s) + :vartype mtu: str + :param encapsulation: Encapsulation method on physical ports. Possible + values include: 'Dot1Q', 'QinQ' + :type encapsulation: str or + ~azure.mgmt.network.v2018_08_01.models.ExpressRoutePortsEncapsulation + :ivar ether_type: Ethertype of the physical port. + :vartype ether_type: str + :ivar allocation_date: Date of the physical port allocation to be used in + Letter of Authorization. + :vartype allocation_date: str + :param links: ExpressRouteLink Sub-Resources. The set of physical links of + the ExpressRoutePort resource + :type links: list[~azure.mgmt.network.v2018_08_01.models.ExpressRouteLink] + :ivar circuits: Reference the ExpressRoute circuit(s) that are provisioned + on this ExpressRoutePort resource. + :vartype circuits: + list[~azure.mgmt.network.v2018_08_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the ExpressRoutePort + resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and + 'Failed'. + :vartype provisioning_state: str + :param resource_guid: The resource GUID property of the ExpressRoutePort + resource. + :type resource_guid: 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}, + 'provisioned_bandwidth_in_gbps': {'readonly': True}, + 'mtu': {'readonly': True}, + 'ether_type': {'readonly': True}, + 'allocation_date': {'readonly': True}, + 'circuits': {'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}'}, + 'peering_location': {'key': 'properties.peeringLocation', 'type': 'str'}, + 'bandwidth_in_gbps': {'key': 'properties.bandwidthInGbps', 'type': 'int'}, + 'provisioned_bandwidth_in_gbps': {'key': 'properties.provisionedBandwidthInGbps', 'type': 'float'}, + 'mtu': {'key': 'properties.mtu', 'type': 'str'}, + 'encapsulation': {'key': 'properties.encapsulation', 'type': 'str'}, + 'ether_type': {'key': 'properties.etherType', 'type': 'str'}, + 'allocation_date': {'key': 'properties.allocationDate', 'type': 'str'}, + 'links': {'key': 'properties.links', 'type': '[ExpressRouteLink]'}, + 'circuits': {'key': 'properties.circuits', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExpressRoutePort, self).__init__(**kwargs) + self.peering_location = kwargs.get('peering_location', None) + self.bandwidth_in_gbps = kwargs.get('bandwidth_in_gbps', None) + self.provisioned_bandwidth_in_gbps = None + self.mtu = None + self.encapsulation = kwargs.get('encapsulation', None) + self.ether_type = None + self.allocation_date = None + self.links = kwargs.get('links', None) + self.circuits = None + self.provisioning_state = None + self.resource_guid = kwargs.get('resource_guid', None) + self.etag = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_port_paged.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_port_paged.py new file mode 100644 index 000000000000..3ff97b46881e --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_port_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 ExpressRoutePortPaged(Paged): + """ + A paging container for iterating over a list of :class:`ExpressRoutePort ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ExpressRoutePort]'} + } + + def __init__(self, *args, **kwargs): + + super(ExpressRoutePortPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_port_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_port_py3.py new file mode 100644 index 000000000000..7d15edef88c2 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_port_py3.py @@ -0,0 +1,116 @@ +# 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 ExpressRoutePort(Resource): + """ExpressRoute Port. + + ExpressRoutePort resource definition. + + 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 peering_location: The name of the peering location that the + ExpressRoutePort is mapped to physically. + :type peering_location: str + :param bandwidth_in_gbps: Bandwidth of procured ports in Gbps + :type bandwidth_in_gbps: int + :ivar provisioned_bandwidth_in_gbps: Aggregate Gbps of associated circuit + bandwidths. + :vartype provisioned_bandwidth_in_gbps: float + :ivar mtu: Maximum transmission unit of the physical port pair(s) + :vartype mtu: str + :param encapsulation: Encapsulation method on physical ports. Possible + values include: 'Dot1Q', 'QinQ' + :type encapsulation: str or + ~azure.mgmt.network.v2018_08_01.models.ExpressRoutePortsEncapsulation + :ivar ether_type: Ethertype of the physical port. + :vartype ether_type: str + :ivar allocation_date: Date of the physical port allocation to be used in + Letter of Authorization. + :vartype allocation_date: str + :param links: ExpressRouteLink Sub-Resources. The set of physical links of + the ExpressRoutePort resource + :type links: list[~azure.mgmt.network.v2018_08_01.models.ExpressRouteLink] + :ivar circuits: Reference the ExpressRoute circuit(s) that are provisioned + on this ExpressRoutePort resource. + :vartype circuits: + list[~azure.mgmt.network.v2018_08_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the ExpressRoutePort + resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and + 'Failed'. + :vartype provisioning_state: str + :param resource_guid: The resource GUID property of the ExpressRoutePort + resource. + :type resource_guid: 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}, + 'provisioned_bandwidth_in_gbps': {'readonly': True}, + 'mtu': {'readonly': True}, + 'ether_type': {'readonly': True}, + 'allocation_date': {'readonly': True}, + 'circuits': {'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}'}, + 'peering_location': {'key': 'properties.peeringLocation', 'type': 'str'}, + 'bandwidth_in_gbps': {'key': 'properties.bandwidthInGbps', 'type': 'int'}, + 'provisioned_bandwidth_in_gbps': {'key': 'properties.provisionedBandwidthInGbps', 'type': 'float'}, + 'mtu': {'key': 'properties.mtu', 'type': 'str'}, + 'encapsulation': {'key': 'properties.encapsulation', 'type': 'str'}, + 'ether_type': {'key': 'properties.etherType', 'type': 'str'}, + 'allocation_date': {'key': 'properties.allocationDate', 'type': 'str'}, + 'links': {'key': 'properties.links', 'type': '[ExpressRouteLink]'}, + 'circuits': {'key': 'properties.circuits', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, location: str=None, tags=None, peering_location: str=None, bandwidth_in_gbps: int=None, encapsulation=None, links=None, resource_guid: str=None, **kwargs) -> None: + super(ExpressRoutePort, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.peering_location = peering_location + self.bandwidth_in_gbps = bandwidth_in_gbps + self.provisioned_bandwidth_in_gbps = None + self.mtu = None + self.encapsulation = encapsulation + self.ether_type = None + self.allocation_date = None + self.links = links + self.circuits = None + self.provisioning_state = None + self.resource_guid = resource_guid + self.etag = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location.py new file mode 100644 index 000000000000..9ff640a90fe1 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location.py @@ -0,0 +1,72 @@ +# 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 ExpressRoutePortsLocation(Resource): + """ExpressRoutePorts Peering Location. + + Definition of the ExpressRoutePorts peering location resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar address: Address of peering location. + :vartype address: str + :ivar contact: Contact details of peering locations. + :vartype contact: str + :param available_bandwidths: The inventory of available ExpressRoutePort + bandwidths. + :type available_bandwidths: + list[~azure.mgmt.network.v2018_08_01.models.ExpressRoutePortsLocationBandwidths] + :ivar provisioning_state: The provisioning state of the + ExpressRoutePortLocation resource. Possible values are: 'Succeeded', + 'Updating', 'Deleting', and 'Failed'. + :vartype provisioning_state: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'address': {'readonly': True}, + 'contact': {'readonly': True}, + 'provisioning_state': {'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}'}, + 'address': {'key': 'properties.address', 'type': 'str'}, + 'contact': {'key': 'properties.contact', 'type': 'str'}, + 'available_bandwidths': {'key': 'properties.availableBandwidths', 'type': '[ExpressRoutePortsLocationBandwidths]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExpressRoutePortsLocation, self).__init__(**kwargs) + self.address = None + self.contact = None + self.available_bandwidths = kwargs.get('available_bandwidths', None) + self.provisioning_state = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location_bandwidths.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location_bandwidths.py new file mode 100644 index 000000000000..1087c7a3c792 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location_bandwidths.py @@ -0,0 +1,42 @@ +# 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 ExpressRoutePortsLocationBandwidths(Model): + """ExpressRoutePorts Location Bandwidths. + + Real-time inventory of available ExpressRoute port bandwidths. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar offer_name: Bandwidth descriptive name + :vartype offer_name: str + :ivar value_in_gbps: Bandwidth value in Gbps + :vartype value_in_gbps: int + """ + + _validation = { + 'offer_name': {'readonly': True}, + 'value_in_gbps': {'readonly': True}, + } + + _attribute_map = { + 'offer_name': {'key': 'offerName', 'type': 'str'}, + 'value_in_gbps': {'key': 'valueInGbps', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ExpressRoutePortsLocationBandwidths, self).__init__(**kwargs) + self.offer_name = None + self.value_in_gbps = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location_bandwidths_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location_bandwidths_py3.py new file mode 100644 index 000000000000..cba89b52bc09 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location_bandwidths_py3.py @@ -0,0 +1,42 @@ +# 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 ExpressRoutePortsLocationBandwidths(Model): + """ExpressRoutePorts Location Bandwidths. + + Real-time inventory of available ExpressRoute port bandwidths. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar offer_name: Bandwidth descriptive name + :vartype offer_name: str + :ivar value_in_gbps: Bandwidth value in Gbps + :vartype value_in_gbps: int + """ + + _validation = { + 'offer_name': {'readonly': True}, + 'value_in_gbps': {'readonly': True}, + } + + _attribute_map = { + 'offer_name': {'key': 'offerName', 'type': 'str'}, + 'value_in_gbps': {'key': 'valueInGbps', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(ExpressRoutePortsLocationBandwidths, self).__init__(**kwargs) + self.offer_name = None + self.value_in_gbps = None diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location_paged.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location_paged.py new file mode 100644 index 000000000000..8fc99d45be75 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location_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 ExpressRoutePortsLocationPaged(Paged): + """ + A paging container for iterating over a list of :class:`ExpressRoutePortsLocation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ExpressRoutePortsLocation]'} + } + + def __init__(self, *args, **kwargs): + + super(ExpressRoutePortsLocationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location_py3.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location_py3.py new file mode 100644 index 000000000000..56e304c69cfb --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/models/express_route_ports_location_py3.py @@ -0,0 +1,72 @@ +# 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 ExpressRoutePortsLocation(Resource): + """ExpressRoutePorts Peering Location. + + Definition of the ExpressRoutePorts peering location resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar address: Address of peering location. + :vartype address: str + :ivar contact: Contact details of peering locations. + :vartype contact: str + :param available_bandwidths: The inventory of available ExpressRoutePort + bandwidths. + :type available_bandwidths: + list[~azure.mgmt.network.v2018_08_01.models.ExpressRoutePortsLocationBandwidths] + :ivar provisioning_state: The provisioning state of the + ExpressRoutePortLocation resource. Possible values are: 'Succeeded', + 'Updating', 'Deleting', and 'Failed'. + :vartype provisioning_state: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'address': {'readonly': True}, + 'contact': {'readonly': True}, + 'provisioning_state': {'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}'}, + 'address': {'key': 'properties.address', 'type': 'str'}, + 'contact': {'key': 'properties.contact', 'type': 'str'}, + 'available_bandwidths': {'key': 'properties.availableBandwidths', 'type': '[ExpressRoutePortsLocationBandwidths]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, location: str=None, tags=None, available_bandwidths=None, **kwargs) -> None: + super(ExpressRoutePortsLocation, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.address = None + self.contact = None + self.available_bandwidths = available_bandwidths + self.provisioning_state = 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 60de1b2cf4ef..a3e6aed94dfc 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 @@ -288,6 +288,24 @@ class ServiceProviderProvisioningState(str, Enum): deprovisioning = "Deprovisioning" +class ExpressRouteLinkConnectorType(str, Enum): + + lc = "LC" + sc = "SC" + + +class ExpressRouteLinkAdminState(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class ExpressRoutePortsEncapsulation(str, Enum): + + dot1_q = "Dot1Q" + qin_q = "QinQ" + + class LoadBalancerSkuName(str, Enum): basic = "Basic" 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 5864009fbd7c..b3d431d5ce3c 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 @@ -35,6 +35,9 @@ 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.express_route_ports_locations_operations import ExpressRoutePortsLocationsOperations +from .operations.express_route_ports_operations import ExpressRoutePortsOperations +from .operations.express_route_links_operations import ExpressRouteLinksOperations from .operations.interface_endpoints_operations import InterfaceEndpointsOperations from .operations.load_balancers_operations import LoadBalancersOperations from .operations.load_balancer_backend_address_pools_operations import LoadBalancerBackendAddressPoolsOperations @@ -158,6 +161,12 @@ class NetworkManagementClient(SDKClient): :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 express_route_ports_locations: ExpressRoutePortsLocations operations + :vartype express_route_ports_locations: azure.mgmt.network.v2018_08_01.operations.ExpressRoutePortsLocationsOperations + :ivar express_route_ports: ExpressRoutePorts operations + :vartype express_route_ports: azure.mgmt.network.v2018_08_01.operations.ExpressRoutePortsOperations + :ivar express_route_links: ExpressRouteLinks operations + :vartype express_route_links: azure.mgmt.network.v2018_08_01.operations.ExpressRouteLinksOperations :ivar interface_endpoints: InterfaceEndpoints operations :vartype interface_endpoints: azure.mgmt.network.v2018_08_01.operations.InterfaceEndpointsOperations :ivar load_balancers: LoadBalancers operations @@ -305,6 +314,12 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.express_route_connections = ExpressRouteConnectionsOperations( self._client, self.config, self._serialize, self._deserialize) + self.express_route_ports_locations = ExpressRoutePortsLocationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.express_route_ports = ExpressRoutePortsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.express_route_links = ExpressRouteLinksOperations( + self._client, self.config, self._serialize, self._deserialize) self.interface_endpoints = InterfaceEndpointsOperations( self._client, self.config, self._serialize, self._deserialize) self.load_balancers = LoadBalancersOperations( 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 809521775aba..a0758b89387a 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 @@ -26,6 +26,9 @@ from .express_route_cross_connection_peerings_operations import ExpressRouteCrossConnectionPeeringsOperations from .express_route_gateways_operations import ExpressRouteGatewaysOperations from .express_route_connections_operations import ExpressRouteConnectionsOperations +from .express_route_ports_locations_operations import ExpressRoutePortsLocationsOperations +from .express_route_ports_operations import ExpressRoutePortsOperations +from .express_route_links_operations import ExpressRouteLinksOperations from .interface_endpoints_operations import InterfaceEndpointsOperations from .load_balancers_operations import LoadBalancersOperations from .load_balancer_backend_address_pools_operations import LoadBalancerBackendAddressPoolsOperations @@ -91,6 +94,9 @@ 'ExpressRouteCrossConnectionPeeringsOperations', 'ExpressRouteGatewaysOperations', 'ExpressRouteConnectionsOperations', + 'ExpressRoutePortsLocationsOperations', + 'ExpressRoutePortsOperations', + 'ExpressRouteLinksOperations', 'InterfaceEndpointsOperations', 'LoadBalancersOperations', 'LoadBalancerBackendAddressPoolsOperations', diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_links_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_links_operations.py new file mode 100644 index 000000000000..1300e68b8685 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_links_operations.py @@ -0,0 +1,176 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ExpressRouteLinksOperations(object): + """ExpressRouteLinksOperations 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 get( + self, resource_group_name, express_route_port_name, link_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the specified ExpressRouteLink resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort + resource. + :type express_route_port_name: str + :param link_name: The name of the ExpressRouteLink resource. + :type link_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: ExpressRouteLink or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.network.v2018_08_01.models.ExpressRouteLink or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), + 'linkName': self._serialize.url("link_name", link_name, '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('ExpressRouteLink', 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/ExpressRoutePorts/{expressRoutePortName}/links/{linkName}'} + + def list( + self, resource_group_name, express_route_port_name, custom_headers=None, raw=False, **operation_config): + """Retrieve the ExpressRouteLink sub-resources of the specified + ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort + resource. + :type express_route_port_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 ExpressRouteLink + :rtype: + ~azure.mgmt.network.v2018_08_01.models.ExpressRouteLinkPaged[~azure.mgmt.network.v2018_08_01.models.ExpressRouteLink] + :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 = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, '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.ExpressRouteLinkPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ExpressRouteLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links'} diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_ports_locations_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_ports_locations_operations.py new file mode 100644 index 000000000000..2f5f85577108 --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_ports_locations_operations.py @@ -0,0 +1,166 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ExpressRoutePortsLocationsOperations(object): + """ExpressRoutePortsLocationsOperations 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( + self, custom_headers=None, raw=False, **operation_config): + """Retrieves all ExpressRoutePort peering locations. Does not return + available bandwidths for each location. Available bandwidths can only + be obtained when retriving a specific peering location. + + :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 ExpressRoutePortsLocation + :rtype: + ~azure.mgmt.network.v2018_08_01.models.ExpressRoutePortsLocationPaged[~azure.mgmt.network.v2018_08_01.models.ExpressRoutePortsLocation] + :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 = { + '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.ExpressRoutePortsLocationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ExpressRoutePortsLocationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations'} + + def get( + self, location_name, custom_headers=None, raw=False, **operation_config): + """Retrieves a single ExpressRoutePort peering location, including the + list of available bandwidths available at said peering location. + + :param location_name: Name of the requested ExpressRoutePort peering + location. + :type location_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: ExpressRoutePortsLocation or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.network.v2018_08_01.models.ExpressRoutePortsLocation or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'locationName': self._serialize.url("location_name", location_name, '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('ExpressRoutePortsLocation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations/{locationName}'} diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_ports_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_ports_operations.py new file mode 100644 index 000000000000..41883528c48e --- /dev/null +++ b/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/express_route_ports_operations.py @@ -0,0 +1,522 @@ +# 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 ExpressRoutePortsOperations(object): + """ExpressRoutePortsOperations 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, express_route_port_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, '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_port_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort + resource. + :type express_route_port_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_port_name=express_route_port_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/ExpressRoutePorts/{expressRoutePortName}'} + + def get( + self, resource_group_name, express_route_port_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the requested ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of ExpressRoutePort. + :type express_route_port_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: ExpressRoutePort or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.network.v2018_08_01.models.ExpressRoutePort or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, '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('ExpressRoutePort', 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/ExpressRoutePorts/{expressRoutePortName}'} + + + def _create_or_update_initial( + self, resource_group_name, express_route_port_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, '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, 'ExpressRoutePort') + + # 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('ExpressRoutePort', response) + if response.status_code == 201: + deserialized = self._deserialize('ExpressRoutePort', 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_port_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates the specified ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort + resource. + :type express_route_port_name: str + :param parameters: Parameters supplied to the create ExpressRoutePort + operation. + :type parameters: + ~azure.mgmt.network.v2018_08_01.models.ExpressRoutePort + :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 ExpressRoutePort or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_08_01.models.ExpressRoutePort] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_08_01.models.ExpressRoutePort]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ExpressRoutePort', 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/ExpressRoutePorts/{expressRoutePortName}'} + + + def _update_tags_initial( + self, resource_group_name, express_route_port_name, tags=None, custom_headers=None, raw=False, **operation_config): + parameters = models.TagsObject(tags=tags) + + # Construct URL + url = self.update_tags.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, '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, '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('ExpressRoutePort', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_tags( + self, resource_group_name, express_route_port_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Update ExpressRoutePort tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort + resource. + :type express_route_port_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 ExpressRoutePort or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_08_01.models.ExpressRoutePort] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_08_01.models.ExpressRoutePort]] + :raises: :class:`CloudError` + """ + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ExpressRoutePort', 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/ExpressRoutePorts/{expressRoutePortName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """List all the ExpressRoutePort resources in the specified 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 ExpressRoutePort + :rtype: + ~azure.mgmt.network.v2018_08_01.models.ExpressRoutePortPaged[~azure.mgmt.network.v2018_08_01.models.ExpressRoutePort] + :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 = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, '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.ExpressRoutePortPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ExpressRoutePortPaged(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/ExpressRoutePorts'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all the ExpressRoutePort resources in the specified 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 ExpressRoutePort + :rtype: + ~azure.mgmt.network.v2018_08_01.models.ExpressRoutePortPaged[~azure.mgmt.network.v2018_08_01.models.ExpressRoutePort] + :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 = { + '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.ExpressRoutePortPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ExpressRoutePortPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts'}