Skip to content
Docs Try Aspire

AzureSecurityRule

Class sealed net8.0
📦 Aspire.Hosting.Azure.Network v13.2.0
Represents a security rule configuration for an Azure Network Security Group.
namespace Aspire.Hosting.Azure;
public sealed class AzureSecurityRule
{
// ...
}
Security rules control inbound and outbound network traffic for subnets associated with the Network Security Group. Rules are evaluated in priority order, with lower numbers having higher priority.
View all constructors
Accessget; set
SecurityRuleAccess
Gets or sets whether network traffic is allowed or denied.
Descriptionget; set
string?
Gets or sets an optional description for the security rule.
DestinationAddressPrefixget; set
string
Gets or sets the destination address prefix. Defaults to "*" (any).
DestinationAddressPrefixReferenceget; set
ReferenceExpression?
DestinationPortRangeget; set
string
Gets or sets the destination port range. Use "*" for any, or a range like "80-443".
Directionget; set
SecurityRuleDirection
Gets or sets the direction of the rule.
Nameget; set
string
Gets or sets the name of the security rule. This name must be unique within the Network Security Group.
Priorityget; set
int
Gets or sets the priority of the rule. Valid values are between 100 and 4096. Lower numbers have higher priority.
Protocolget; set
SecurityRuleProtocol
Gets or sets the network protocol this rule applies to.
SourceAddressPrefixget; set
string
Gets or sets the source address prefix. Defaults to "*" (any).
SourceAddressPrefixReferenceget; set
ReferenceExpression?
SourcePortRangeget; set
string
Gets or sets the source port range. Defaults to "*" (any).
View all properties