Sdílet prostřednictvím


SecurityRulesOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

NetworkManagementClient's

<xref:security_rules> attribute.

Inheritance
builtins.object
SecurityRulesOperations

Constructor

SecurityRulesOperations(*args, **kwargs)

Methods

begin_create_or_update

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

begin_delete

Deletes the specified network security rule.

get

Get the specified network security rule.

list

Gets all security rules in a network security group.

begin_create_or_update

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

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

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

network_security_group_name
Required
str

The name of the network security group. Required.

security_rule_name
Required
str

The name of the security rule. Required.

security_rule_parameters
Required

Parameters supplied to the create or update network security rule operation. Is either a SecurityRule type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_delete

Deletes the specified network security rule.

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

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

network_security_group_name
Required
str

The name of the network security group. Required.

security_rule_name
Required
str

The name of the security rule. Required.

Returns

Type Description

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

Exceptions

Type Description

get

Get the specified network security rule.

get(resource_group_name: str, network_security_group_name: str, security_rule_name: str, **kwargs: Any) -> SecurityRule

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

network_security_group_name
Required
str

The name of the network security group. Required.

security_rule_name
Required
str

The name of the security rule. Required.

Returns

Type Description

SecurityRule or the result of cls(response)

Exceptions

Type Description

list

Gets all security rules in a network security group.

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

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

network_security_group_name
Required
str

The name of the network security group. Required.

Returns

Type Description

An iterator like instance of either SecurityRule 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'>