SecurityRule Class
Network security rule.
Variables are only populated by the server, and will be ignored when sending a request.
- Inheritance
-
azure.mgmt.network.models._models_py3.SubResourceSecurityRule
Constructor
SecurityRule(*, id: str | None = None, name: str | None = None, type: str | None = None, description: str | None = None, protocol: str | _models.SecurityRuleProtocol | None = None, source_port_range: str | None = None, destination_port_range: str | None = None, source_address_prefix: str | None = None, source_address_prefixes: List[str] | None = None, source_application_security_groups: List[_models.ApplicationSecurityGroup] | None = None, destination_address_prefix: str | None = None, destination_address_prefixes: List[str] | None = None, destination_application_security_groups: List[_models.ApplicationSecurityGroup] | None = None, source_port_ranges: List[str] | None = None, destination_port_ranges: List[str] | None = None, access: str | _models.SecurityRuleAccess | None = None, priority: int | None = None, direction: str | _models.SecurityRuleDirection | None = None, **kwargs: Any)
Keyword-Only Parameters
Name | Description |
---|---|
id
|
Resource ID. |
name
|
The name of the resource that is unique within a resource group. This name can be used to access the resource. |
type
|
The type of the resource. |
description
|
A description for this rule. Restricted to 140 chars. |
protocol
|
Network protocol this rule applies to. Known values are: "Tcp", "Udp", "Icmp", "Esp", "*", and "Ah". |
source_port_range
|
The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. |
destination_port_range
|
The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. |
source_address_prefix
|
The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. |
source_address_prefixes
|
The CIDR or source IP ranges. |
source_application_security_groups
|
The application security group specified as source. |
destination_address_prefix
|
The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. |
destination_address_prefixes
|
The destination address prefixes. CIDR or destination IP ranges. |
destination_application_security_groups
|
The application security group specified as destination. |
source_port_ranges
|
The source port ranges. |
destination_port_ranges
|
The destination port ranges. |
access
|
The network traffic is allowed or denied. Known values are: "Allow" and "Deny". |
priority
|
The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. |
direction
|
The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Known values are: "Inbound" and "Outbound". |
Variables
Name | Description |
---|---|
id
|
Resource ID. |
name
|
The name of the resource that is unique within a resource group. This name can be used to access the resource. |
etag
|
A unique read-only string that changes whenever the resource is updated. |
type
|
The type of the resource. |
description
|
A description for this rule. Restricted to 140 chars. |
protocol
|
Network protocol this rule applies to. Known values are: "Tcp", "Udp", "Icmp", "Esp", "*", and "Ah". |
source_port_range
|
The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. |
destination_port_range
|
The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. |
source_address_prefix
|
The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. |
source_address_prefixes
|
The CIDR or source IP ranges. |
source_application_security_groups
|
The application security group specified as source. |
destination_address_prefix
|
The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. |
destination_address_prefixes
|
The destination address prefixes. CIDR or destination IP ranges. |
destination_application_security_groups
|
The application security group specified as destination. |
source_port_ranges
|
The source port ranges. |
destination_port_ranges
|
The destination port ranges. |
access
|
The network traffic is allowed or denied. Known values are: "Allow" and "Deny". |
priority
|
The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. |
direction
|
The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Known values are: "Inbound" and "Outbound". |
provisioning_state
|
The provisioning state of the security rule resource. Known values are: "Succeeded", "Updating", "Deleting", and "Failed". |
Azure SDK for Python