VirtualNetworksOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

NetworkManagementClient's

<xref:virtual_networks> attribute.

Inheritance
builtins.object
VirtualNetworksOperations

Constructor

VirtualNetworksOperations(*args, **kwargs)

Methods

begin_create_or_update

Creates or updates a virtual network in the specified resource group.

begin_delete

Deletes the specified virtual network.

begin_list_ddos_protection_status

Gets the Ddos Protection Status of all IP Addresses under the Virtual Network.

check_ip_address_availability

Checks whether a private IP address is available for use.

get

Gets the specified virtual network by resource group.

list

Gets all virtual networks in a resource group.

list_all

Gets all virtual networks in a subscription.

list_usage

Lists usage stats.

update_tags

Updates a virtual network tags.

begin_create_or_update

Creates or updates a virtual network in the specified resource group.

begin_create_or_update(resource_group_name: str, virtual_network_name: str, parameters: _models.VirtualNetwork, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.VirtualNetwork]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

virtual_network_name
Required
str

The name of the virtual network. Required.

parameters
Required

Parameters supplied to the create or update virtual network operation. Is either a VirtualNetwork type or a IO[bytes] type. Required.

Returns

Type Description

An instance of LROPoller that returns either VirtualNetwork or the result of cls(response)

Exceptions

Type Description

begin_delete

Deletes the specified virtual network.

begin_delete(resource_group_name: str, virtual_network_name: str, **kwargs: Any) -> LROPoller[None]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

virtual_network_name
Required
str

The name of the virtual network. Required.

Returns

Type Description

An instance of LROPoller that returns either None or the result of cls(response)

Exceptions

Type Description

begin_list_ddos_protection_status

Gets the Ddos Protection Status of all IP Addresses under the Virtual Network.

begin_list_ddos_protection_status(resource_group_name: str, virtual_network_name: str, *, top: int | None = None, skip_token: str | None = None, **kwargs: Any) -> LROPoller[Iterable[PublicIpDdosProtectionStatusResult]]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

virtual_network_name
Required
str

The name of the virtual network. Required.

Keyword-Only Parameters

Name Description
top
int

The max number of ip addresses to return. Default value is None.

skip_token
str

The skipToken that is given with nextLink. Default value is None.

Returns

Type Description

An instance of LROPoller that returns an iterator like instance of either VirtualNetworkDdosProtectionStatusResult or the result of cls(response)

Exceptions

Type Description

check_ip_address_availability

Checks whether a private IP address is available for use.

check_ip_address_availability(resource_group_name: str, virtual_network_name: str, *, ip_address: str, **kwargs: Any) -> IPAddressAvailabilityResult

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

virtual_network_name
Required
str

The name of the virtual network. Required.

Keyword-Only Parameters

Name Description
ip_address
str

The private IP address to be verified. Required.

Returns

Type Description

IPAddressAvailabilityResult or the result of cls(response)

Exceptions

Type Description

get

Gets the specified virtual network by resource group.

get(resource_group_name: str, virtual_network_name: str, *, expand: str | None = None, **kwargs: Any) -> VirtualNetwork

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

virtual_network_name
Required
str

The name of the virtual network. Required.

Keyword-Only Parameters

Name Description
expand
str

Expands referenced resources. Default value is None.

Returns

Type Description

VirtualNetwork or the result of cls(response)

Exceptions

Type Description

list

Gets all virtual networks in a resource group.

list(resource_group_name: str, **kwargs: Any) -> Iterable[VirtualNetwork]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

Returns

Type Description

An iterator like instance of either VirtualNetwork or the result of cls(response)

Exceptions

Type Description

list_all

Gets all virtual networks in a subscription.

list_all(**kwargs: Any) -> Iterable[VirtualNetwork]

Returns

Type Description

An iterator like instance of either VirtualNetwork or the result of cls(response)

Exceptions

Type Description

list_usage

Lists usage stats.

list_usage(resource_group_name: str, virtual_network_name: str, **kwargs: Any) -> Iterable[VirtualNetworkUsage]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

virtual_network_name
Required
str

The name of the virtual network. Required.

Returns

Type Description

An iterator like instance of either VirtualNetworkUsage or the result of cls(response)

Exceptions

Type Description

update_tags

Updates a virtual network tags.

update_tags(resource_group_name: str, virtual_network_name: str, parameters: _models.TagsObject, *, content_type: str = 'application/json', **kwargs: Any) -> _models.VirtualNetwork

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

virtual_network_name
Required
str

The name of the virtual network. Required.

parameters
Required

Parameters supplied to update virtual network tags. Is either a TagsObject type or a IO[bytes] type. Required.

Returns

Type Description

VirtualNetwork or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.network.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\network\\models\\__init__.py'>