diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/__init__.py index 1541a46c1179..cf49e40b4478 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/__init__.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/__init__.py @@ -1116,7 +1116,6 @@ SecurityProviderName, SecurityPartnerProviderConnectionStatus, VirtualNetworkPeeringState, - VirtualNetworkPeeringLevel, VirtualNetworkGatewayType, VpnType, VpnGatewayGeneration, @@ -1812,7 +1811,6 @@ 'SecurityProviderName', 'SecurityPartnerProviderConnectionStatus', 'VirtualNetworkPeeringState', - 'VirtualNetworkPeeringLevel', 'VirtualNetworkGatewayType', 'VpnType', 'VpnGatewayGeneration', diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_models.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_models.py index f6247215a080..5b92c8768292 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_models.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_models.py @@ -7714,8 +7714,6 @@ class ExpressRouteConnection(SubResource): :type routing_weight: int :param enable_internet_security: Enable internet security. :type enable_internet_security: bool - :param express_route_gateway_bypass: Enable FastPath to vWan Firewall hub. - :type express_route_gateway_bypass: bool :param routing_configuration: The Routing Configuration indicating the associated and propagated route tables on this connection. :type routing_configuration: @@ -7737,7 +7735,6 @@ class ExpressRouteConnection(SubResource): 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, 'enable_internet_security': {'key': 'properties.enableInternetSecurity', 'type': 'bool'}, - 'express_route_gateway_bypass': {'key': 'properties.expressRouteGatewayBypass', 'type': 'bool'}, 'routing_configuration': {'key': 'properties.routingConfiguration', 'type': 'RoutingConfiguration'}, 'name': {'key': 'name', 'type': 'str'}, } @@ -7749,7 +7746,6 @@ def __init__(self, **kwargs): self.authorization_key = kwargs.get('authorization_key', None) self.routing_weight = kwargs.get('routing_weight', None) self.enable_internet_security = kwargs.get('enable_internet_security', None) - self.express_route_gateway_bypass = kwargs.get('express_route_gateway_bypass', None) self.routing_configuration = kwargs.get('routing_configuration', None) self.name = kwargs.get('name', None) @@ -18125,14 +18121,10 @@ class VirtualNetworkPeering(SubResource): (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). :type remote_virtual_network: ~azure.mgmt.network.v2020_07_01.models.SubResource - :param remote_address_space: The reference to the address space peered - with the remote virtual network. + :param remote_address_space: The reference to the remote virtual network + address space. :type remote_address_space: ~azure.mgmt.network.v2020_07_01.models.AddressSpace - :param remote_virtual_network_address_space: The reference to the current - address space of the remote virtual network. - :type remote_virtual_network_address_space: - ~azure.mgmt.network.v2020_07_01.models.AddressSpace :param remote_bgp_communities: The reference to the remote virtual network's Bgp Communities. :type remote_bgp_communities: @@ -18141,15 +18133,6 @@ class VirtualNetworkPeering(SubResource): values include: 'Initiated', 'Connected', 'Disconnected' :type peering_state: str or ~azure.mgmt.network.v2020_07_01.models.VirtualNetworkPeeringState - :param peering_sync_level: The peering sync status of the virtual network - peering. Possible values include: 'FullySynced', 'RemoteUnsynced', - 'LocalUnsynced', 'LocalAndRemoteUnsynced' - :type peering_sync_level: str or - ~azure.mgmt.network.v2020_07_01.models.VirtualNetworkPeeringLevel - :param sync_remote_address_space: Provided when user wants to sync the - peering with address space on the remote virtual network after the address - space is updated. Default value: False . - :type sync_remote_address_space: bool :ivar provisioning_state: The provisioning state of the virtual network peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' @@ -18176,11 +18159,8 @@ class VirtualNetworkPeering(SubResource): 'use_remote_gateways': {'key': 'properties.useRemoteGateways', 'type': 'bool'}, 'remote_virtual_network': {'key': 'properties.remoteVirtualNetwork', 'type': 'SubResource'}, 'remote_address_space': {'key': 'properties.remoteAddressSpace', 'type': 'AddressSpace'}, - 'remote_virtual_network_address_space': {'key': 'properties.remoteVirtualNetworkAddressSpace', 'type': 'AddressSpace'}, 'remote_bgp_communities': {'key': 'properties.remoteBgpCommunities', 'type': 'VirtualNetworkBgpCommunities'}, 'peering_state': {'key': 'properties.peeringState', 'type': 'str'}, - 'peering_sync_level': {'key': 'properties.peeringSyncLevel', 'type': 'str'}, - 'sync_remote_address_space': {'key': 'properties.syncRemoteAddressSpace', 'type': 'bool'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, @@ -18194,11 +18174,8 @@ def __init__(self, **kwargs): self.use_remote_gateways = kwargs.get('use_remote_gateways', None) self.remote_virtual_network = kwargs.get('remote_virtual_network', None) self.remote_address_space = kwargs.get('remote_address_space', None) - self.remote_virtual_network_address_space = kwargs.get('remote_virtual_network_address_space', None) self.remote_bgp_communities = kwargs.get('remote_bgp_communities', None) self.peering_state = kwargs.get('peering_state', None) - self.peering_sync_level = kwargs.get('peering_sync_level', None) - self.sync_remote_address_space = kwargs.get('sync_remote_address_space', False) self.provisioning_state = None self.name = kwargs.get('name', None) self.etag = None diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_models_py3.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_models_py3.py index 0c588ddba7f4..010cb50b8ebe 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_models_py3.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_models_py3.py @@ -7714,8 +7714,6 @@ class ExpressRouteConnection(SubResource): :type routing_weight: int :param enable_internet_security: Enable internet security. :type enable_internet_security: bool - :param express_route_gateway_bypass: Enable FastPath to vWan Firewall hub. - :type express_route_gateway_bypass: bool :param routing_configuration: The Routing Configuration indicating the associated and propagated route tables on this connection. :type routing_configuration: @@ -7737,19 +7735,17 @@ class ExpressRouteConnection(SubResource): 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, 'enable_internet_security': {'key': 'properties.enableInternetSecurity', 'type': 'bool'}, - 'express_route_gateway_bypass': {'key': 'properties.expressRouteGatewayBypass', 'type': 'bool'}, 'routing_configuration': {'key': 'properties.routingConfiguration', 'type': 'RoutingConfiguration'}, 'name': {'key': 'name', 'type': 'str'}, } - def __init__(self, *, express_route_circuit_peering, name: str, id: str=None, authorization_key: str=None, routing_weight: int=None, enable_internet_security: bool=None, express_route_gateway_bypass: bool=None, routing_configuration=None, **kwargs) -> None: + def __init__(self, *, express_route_circuit_peering, name: str, id: str=None, authorization_key: str=None, routing_weight: int=None, enable_internet_security: bool=None, routing_configuration=None, **kwargs) -> None: super(ExpressRouteConnection, self).__init__(id=id, **kwargs) self.provisioning_state = None self.express_route_circuit_peering = express_route_circuit_peering self.authorization_key = authorization_key self.routing_weight = routing_weight self.enable_internet_security = enable_internet_security - self.express_route_gateway_bypass = express_route_gateway_bypass self.routing_configuration = routing_configuration self.name = name @@ -18125,14 +18121,10 @@ class VirtualNetworkPeering(SubResource): (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). :type remote_virtual_network: ~azure.mgmt.network.v2020_07_01.models.SubResource - :param remote_address_space: The reference to the address space peered - with the remote virtual network. + :param remote_address_space: The reference to the remote virtual network + address space. :type remote_address_space: ~azure.mgmt.network.v2020_07_01.models.AddressSpace - :param remote_virtual_network_address_space: The reference to the current - address space of the remote virtual network. - :type remote_virtual_network_address_space: - ~azure.mgmt.network.v2020_07_01.models.AddressSpace :param remote_bgp_communities: The reference to the remote virtual network's Bgp Communities. :type remote_bgp_communities: @@ -18141,15 +18133,6 @@ class VirtualNetworkPeering(SubResource): values include: 'Initiated', 'Connected', 'Disconnected' :type peering_state: str or ~azure.mgmt.network.v2020_07_01.models.VirtualNetworkPeeringState - :param peering_sync_level: The peering sync status of the virtual network - peering. Possible values include: 'FullySynced', 'RemoteUnsynced', - 'LocalUnsynced', 'LocalAndRemoteUnsynced' - :type peering_sync_level: str or - ~azure.mgmt.network.v2020_07_01.models.VirtualNetworkPeeringLevel - :param sync_remote_address_space: Provided when user wants to sync the - peering with address space on the remote virtual network after the address - space is updated. Default value: False . - :type sync_remote_address_space: bool :ivar provisioning_state: The provisioning state of the virtual network peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' @@ -18176,17 +18159,14 @@ class VirtualNetworkPeering(SubResource): 'use_remote_gateways': {'key': 'properties.useRemoteGateways', 'type': 'bool'}, 'remote_virtual_network': {'key': 'properties.remoteVirtualNetwork', 'type': 'SubResource'}, 'remote_address_space': {'key': 'properties.remoteAddressSpace', 'type': 'AddressSpace'}, - 'remote_virtual_network_address_space': {'key': 'properties.remoteVirtualNetworkAddressSpace', 'type': 'AddressSpace'}, 'remote_bgp_communities': {'key': 'properties.remoteBgpCommunities', 'type': 'VirtualNetworkBgpCommunities'}, 'peering_state': {'key': 'properties.peeringState', 'type': 'str'}, - 'peering_sync_level': {'key': 'properties.peeringSyncLevel', 'type': 'str'}, - 'sync_remote_address_space': {'key': 'properties.syncRemoteAddressSpace', 'type': 'bool'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, *, id: str=None, allow_virtual_network_access: bool=None, allow_forwarded_traffic: bool=None, allow_gateway_transit: bool=None, use_remote_gateways: bool=None, remote_virtual_network=None, remote_address_space=None, remote_virtual_network_address_space=None, remote_bgp_communities=None, peering_state=None, peering_sync_level=None, sync_remote_address_space: bool=False, name: str=None, **kwargs) -> None: + def __init__(self, *, id: str=None, allow_virtual_network_access: bool=None, allow_forwarded_traffic: bool=None, allow_gateway_transit: bool=None, use_remote_gateways: bool=None, remote_virtual_network=None, remote_address_space=None, remote_bgp_communities=None, peering_state=None, name: str=None, **kwargs) -> None: super(VirtualNetworkPeering, self).__init__(id=id, **kwargs) self.allow_virtual_network_access = allow_virtual_network_access self.allow_forwarded_traffic = allow_forwarded_traffic @@ -18194,11 +18174,8 @@ def __init__(self, *, id: str=None, allow_virtual_network_access: bool=None, all self.use_remote_gateways = use_remote_gateways self.remote_virtual_network = remote_virtual_network self.remote_address_space = remote_address_space - self.remote_virtual_network_address_space = remote_virtual_network_address_space self.remote_bgp_communities = remote_bgp_communities self.peering_state = peering_state - self.peering_sync_level = peering_sync_level - self.sync_remote_address_space = sync_remote_address_space self.provisioning_state = None self.name = name self.etag = None diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_network_management_client_enums.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_network_management_client_enums.py index d6348f849cbc..f42120066702 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_network_management_client_enums.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/models/_network_management_client_enums.py @@ -779,14 +779,6 @@ class VirtualNetworkPeeringState(str, Enum): disconnected = "Disconnected" -class VirtualNetworkPeeringLevel(str, Enum): - - fully_synced = "FullySynced" - remote_unsynced = "RemoteUnsynced" - local_unsynced = "LocalUnsynced" - local_and_remote_unsynced = "LocalAndRemoteUnsynced" - - class VirtualNetworkGatewayType(str, Enum): vpn = "Vpn" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_network_interfaces_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_network_interfaces_operations.py index 94dc3892736e..4d37d6a59afc 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_network_interfaces_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_network_interfaces_operations.py @@ -1089,3 +1089,228 @@ def get_virtual_machine_scale_set_ip_configuration( return deserialized get_virtual_machine_scale_set_ip_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}'} + + def list_cloud_service_role_instance_network_interfaces( + self, resource_group_name, cloud_service_name, role_instance_name, custom_headers=None, raw=False, **operation_config): + """Gets information about all network interfaces in a role instance in a + cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The name of role instance. + :type role_instance_name: str + :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 NetworkInterface + :rtype: + ~azure.mgmt.network.v2020_07_01.models.NetworkInterfacePaged[~azure.mgmt.network.v2020_07_01.models.NetworkInterface] + :raises: :class:`CloudError` + """ + api_version = "2020-07-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_cloud_service_role_instance_network_interfaces.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + header_dict = None + if raw: + header_dict = {} + deserialized = models.NetworkInterfacePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_cloud_service_role_instance_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces'} + + def list_cloud_service_network_interfaces( + self, resource_group_name, cloud_service_name, custom_headers=None, raw=False, **operation_config): + """Gets all network interfaces in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :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 NetworkInterface + :rtype: + ~azure.mgmt.network.v2020_07_01.models.NetworkInterfacePaged[~azure.mgmt.network.v2020_07_01.models.NetworkInterface] + :raises: :class:`CloudError` + """ + api_version = "2020-07-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_cloud_service_network_interfaces.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + header_dict = None + if raw: + header_dict = {} + deserialized = models.NetworkInterfacePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_cloud_service_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/networkInterfaces'} + + def get_cloud_service_network_interface( + self, resource_group_name, cloud_service_name, role_instance_name, network_interface_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Get the specified network interface in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The name of role instance + :type role_instance_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param expand: Expands referenced resources. + :type expand: str + :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: NetworkInterface or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.network.v2020_07_01.models.NetworkInterface or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + api_version = "2020-07-01" + + # Construct URL + url = self.get_cloud_service_network_interface.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} + 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('NetworkInterface', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_cloud_service_network_interface.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}'} diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_public_ip_addresses_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_public_ip_addresses_operations.py index 0dde850af318..8509ea5e853d 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_public_ip_addresses_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_public_ip_addresses_operations.py @@ -743,3 +743,241 @@ def get_virtual_machine_scale_set_public_ip_address( return deserialized get_virtual_machine_scale_set_public_ip_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}'} + + def list_cloud_service_public_ip_addresses( + self, resource_group_name, cloud_service_name, custom_headers=None, raw=False, **operation_config): + """Gets information about all public IP addresses on a cloud service + level. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :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 PublicIPAddress + :rtype: + ~azure.mgmt.network.v2020_07_01.models.PublicIPAddressPaged[~azure.mgmt.network.v2020_07_01.models.PublicIPAddress] + :raises: :class:`CloudError` + """ + api_version = "2020-07-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_cloud_service_public_ip_addresses.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + header_dict = None + if raw: + header_dict = {} + deserialized = models.PublicIPAddressPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_cloud_service_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/publicipaddresses'} + + def list_cloud_service_role_instance_public_ip_addresses( + self, resource_group_name, cloud_service_name, role_instance_name, network_interface_name, ip_configuration_name, custom_headers=None, raw=False, **operation_config): + """Gets information about all public IP addresses in a role instance IP + configuration in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The name of role instance + :type role_instance_name: str + :param network_interface_name: The network interface name. + :type network_interface_name: str + :param ip_configuration_name: The IP configuration name. + :type ip_configuration_name: str + :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 PublicIPAddress + :rtype: + ~azure.mgmt.network.v2020_07_01.models.PublicIPAddressPaged[~azure.mgmt.network.v2020_07_01.models.PublicIPAddress] + :raises: :class:`CloudError` + """ + api_version = "2020-07-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_cloud_service_role_instance_public_ip_addresses.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + header_dict = None + if raw: + header_dict = {} + deserialized = models.PublicIPAddressPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_cloud_service_role_instance_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses'} + + def get_cloud_service_public_ip_address( + self, resource_group_name, cloud_service_name, role_instance_name, network_interface_name, ip_configuration_name, public_ip_address_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Get the specified public IP address in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The role instance name. + :type role_instance_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param ip_configuration_name: The name of the IP configuration. + :type ip_configuration_name: str + :param public_ip_address_name: The name of the public IP Address. + :type public_ip_address_name: str + :param expand: Expands referenced resources. + :type expand: str + :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: PublicIPAddress or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.network.v2020_07_01.models.PublicIPAddress or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + api_version = "2020-07-01" + + # Construct URL + url = self.get_cloud_service_public_ip_address.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), + 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} + 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('PublicIPAddress', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_cloud_service_public_ip_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}'}