Skip to content
Docs Try Aspire

AzureSecurityRule Properties

Class Properties 12 members
Represents a security rule configuration for an Azure Network Security Group.
Access Section titled Access SecurityRuleAccess
Gets or sets whether network traffic is allowed or denied.
public SecurityRuleAccess Access { get; set; }
Description Section titled Description nullable string?
Gets or sets an optional description for the security rule.
public string? Description { get; set; }
DestinationAddressPrefix Section titled DestinationAddressPrefix string
Gets or sets the destination address prefix. Defaults to "*" (any).
public string DestinationAddressPrefix { get; set; }
DestinationAddressPrefixReference Section titled DestinationAddressPrefixReference nullable ReferenceExpression?
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.
public ReferenceExpression? DestinationAddressPrefixReference { get; set; }
DestinationPortRange Section titled DestinationPortRange string
Gets or sets the destination port range. Use "*" for any, or a range like "80-443".
public string DestinationPortRange { get; set; }
Direction Section titled Direction SecurityRuleDirection
Gets or sets the direction of the rule.
public SecurityRuleDirection Direction { get; set; }
Gets or sets the name of the security rule. This name must be unique within the Network Security Group.
public string Name { get; set; }
Gets or sets the priority of the rule. Valid values are between 100 and 4096. Lower numbers have higher priority.
public int Priority { get; set; }
Protocol Section titled Protocol SecurityRuleProtocol
Gets or sets the network protocol this rule applies to.
public SecurityRuleProtocol Protocol { get; set; }
SourceAddressPrefix Section titled SourceAddressPrefix string
Gets or sets the source address prefix. Defaults to "*" (any).
public string SourceAddressPrefix { get; set; }
SourceAddressPrefixReference Section titled SourceAddressPrefixReference nullable ReferenceExpression?
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.
public ReferenceExpression? SourceAddressPrefixReference { get; set; }
SourcePortRange Section titled SourcePortRange string
Gets or sets the source port range. Defaults to "*" (any).
public string SourcePortRange { get; set; }