SubnetsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:subnets> attribute.
- Inheritance
-
builtins.objectSubnetsOperations
Constructor
SubnetsOperations(*args, **kwargs)
Methods
begin_create_or_update |
Creates or updates a subnet in the specified virtual network. |
begin_delete |
Deletes the specified subnet. |
begin_prepare_network_policies |
Prepares a subnet by applying network intent policies. |
begin_unprepare_network_policies |
Unprepares a subnet by removing network intent policies. |
get |
Gets the specified subnet by virtual network and resource group. |
list |
Gets all subnets in a virtual network. |
begin_create_or_update
Creates or updates a subnet in the specified virtual network.
begin_create_or_update(resource_group_name: str, virtual_network_name: str, subnet_name: str, subnet_parameters: _models.Subnet, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.Subnet]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
virtual_network_name
Required
|
The name of the virtual network. Required. |
subnet_name
Required
|
The name of the subnet. Required. |
subnet_parameters
Required
|
Parameters supplied to the create or update subnet operation. Is either a Subnet type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either Subnet or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_delete
Deletes the specified subnet.
begin_delete(resource_group_name: str, virtual_network_name: str, subnet_name: str, **kwargs: Any) -> LROPoller[None]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
virtual_network_name
Required
|
The name of the virtual network. Required. |
subnet_name
Required
|
The name of the subnet. Required. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_prepare_network_policies
Prepares a subnet by applying network intent policies.
begin_prepare_network_policies(resource_group_name: str, virtual_network_name: str, subnet_name: str, prepare_network_policies_request_parameters: _models.PrepareNetworkPoliciesRequest, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[None]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
virtual_network_name
Required
|
The name of the virtual network. Required. |
subnet_name
Required
|
The name of the subnet. Required. |
prepare_network_policies_request_parameters
Required
|
Parameters supplied to prepare subnet by applying network intent policies. Is either a PrepareNetworkPoliciesRequest type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_unprepare_network_policies
Unprepares a subnet by removing network intent policies.
begin_unprepare_network_policies(resource_group_name: str, virtual_network_name: str, subnet_name: str, unprepare_network_policies_request_parameters: _models.UnprepareNetworkPoliciesRequest, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[None]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
virtual_network_name
Required
|
The name of the virtual network. Required. |
subnet_name
Required
|
The name of the subnet. Required. |
unprepare_network_policies_request_parameters
Required
|
Parameters supplied to unprepare subnet to remove network intent policies. Is either a UnprepareNetworkPoliciesRequest type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get
Gets the specified subnet by virtual network and resource group.
get(resource_group_name: str, virtual_network_name: str, subnet_name: str, *, expand: str | None = None, **kwargs: Any) -> Subnet
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
virtual_network_name
Required
|
The name of the virtual network. Required. |
subnet_name
Required
|
The name of the subnet. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
expand
|
Expands referenced resources. Default value is None. |
Returns
Type | Description |
---|---|
Subnet or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list
Gets all subnets in a virtual network.
list(resource_group_name: str, virtual_network_name: str, **kwargs: Any) -> Iterable[Subnet]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
virtual_network_name
Required
|
The name of the virtual network. Required. |
Returns
Type | Description |
---|---|
An iterator like instance of either Subnet 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'>
Azure SDK for Python