NetworkSecurityGroupsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

NetworkManagementClient's

<xref:network_security_groups> attribute.

Constructor

NetworkSecurityGroupsOperations(*args, **kwargs)

Methods

begin_create_or_update

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

begin_delete

Deletes the specified network security group.

get

Gets the specified network security group.

list

Gets all network security groups in a resource group.

list_all

Gets all network security groups in a subscription.

update_tags

Updates a network security group tags.

begin_create_or_update

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

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

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

network_security_group_name
Required
str

The name of the network security group. Required.

parameters
Required
NetworkSecurityGroup or <xref:JSON> or IO[bytes]

Parameters supplied to the create or update network security group operation. Is one of the following types: NetworkSecurityGroup, JSON, IO[bytes] Required.

Returns

Type Description

An instance of LROPoller that returns NetworkSecurityGroup. The NetworkSecurityGroup is compatible with MutableMapping

Exceptions

Type Description

begin_delete

Deletes the specified network security group.

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

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

network_security_group_name
Required
str

The name of the network security group. Required.

Returns

Type Description

An instance of LROPoller that returns None

Exceptions

Type Description

get

Gets the specified network security group.

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

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

network_security_group_name
Required
str

The name of the network security group. Required.

Keyword-Only Parameters

Name Description
expand
str

Expands referenced resources. Default value is None.

Default value: None

Returns

Type Description

NetworkSecurityGroup. The NetworkSecurityGroup is compatible with MutableMapping

Exceptions

Type Description

list

Gets all network security groups in a resource group.

list(resource_group_name: str, **kwargs: Any) -> ItemPaged[NetworkSecurityGroup]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

Returns

Type Description

An iterator like instance of NetworkSecurityGroup

Exceptions

Type Description

list_all

Gets all network security groups in a subscription.

list_all(**kwargs: Any) -> ItemPaged[NetworkSecurityGroup]

Returns

Type Description

An iterator like instance of NetworkSecurityGroup

Exceptions

Type Description

update_tags

Updates a network security group tags.

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

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

network_security_group_name
Required
str

The name of the network security group. Required.

parameters
Required
TagsObject or <xref:JSON> or IO[bytes]

Parameters supplied to update network security group tags. Is one of the following types: TagsObject, JSON, IO[bytes] Required.

Returns

Type Description

NetworkSecurityGroup. The NetworkSecurityGroup is compatible with MutableMapping

Exceptions

Type Description