AzureSecurityRule
Class sealed net8.0
Represents a security rule configuration for an Azure Network Security Group.
namespace Aspire.Hosting.Azure;
public sealed class AzureSecurityRule{ // ...} 13 members
Remarks
Section titled Remarks 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.
Constructors1
Section titled ConstructorsProperties12
Section titled PropertiesAccessget; setSecurityRuleAccess Gets or sets whether network traffic is allowed or denied.
Descriptionget; setstring? Gets or sets an optional description for the security rule.
DestinationAddressPrefixget; setstring Gets or sets the destination address prefix. Defaults to "*" (any).
DestinationAddressPrefixReferenceget; setReferenceExpression? Gets or sets a
ApplicationModel.ReferenceExpression whose value is resolved at deploy time and used as the destination address prefix for the rule. Takes precedence over AzureSecurityRule.DestinationAddressPrefix. DestinationPortRangeget; setstring Gets or sets the destination port range. Use "*" for any, or a range like "80-443".
Directionget; setSecurityRuleDirection Gets or sets the direction of the rule.
Nameget; setstring Gets or sets the name of the security rule. This name must be unique within the Network Security Group.
Priorityget; setint Gets or sets the priority of the rule. Valid values are between 100 and 4096. Lower numbers have higher priority.
Protocolget; setSecurityRuleProtocol Gets or sets the network protocol this rule applies to.
SourceAddressPrefixget; setstring Gets or sets the source address prefix. Defaults to "*" (any).
SourceAddressPrefixReferenceget; setReferenceExpression? Gets or sets a
ApplicationModel.ReferenceExpression whose value is resolved at deploy time and used as the source address prefix for the rule. Takes precedence over AzureSecurityRule.SourceAddressPrefix. SourcePortRangeget; setstring Gets or sets the source port range. Defaults to "*" (any).