Skip to content
DocsTry Aspire
DocsTry

AzureSecurityRule Properties

ClassProperties12 members
Represents a security rule configuration for an Azure Network Security Group.
AccessSection titled AccessSecurityRuleAccess
Gets or sets whether network traffic is allowed or denied.
public SecurityRuleAccess Access { get; set; }
DescriptionSection titled Descriptionnullablestring?
Gets or sets an optional description for the security rule.
public string? Description { get; set; }
DestinationAddressPrefixSection titled DestinationAddressPrefixstring
Gets or sets the destination address prefix. Defaults to "*" (any).
public string DestinationAddressPrefix { get; set; }
DestinationAddressPrefixReferenceSection titled DestinationAddressPrefixReferencenullableReferenceExpression?
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; }
DestinationPortRangeSection titled DestinationPortRangestring
Gets or sets the destination port range. Use "*" for any, or a range like "80-443".
public string DestinationPortRange { get; set; }
DirectionSection titled DirectionSecurityRuleDirection
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; }
ProtocolSection titled ProtocolSecurityRuleProtocol
Gets or sets the network protocol this rule applies to.
public SecurityRuleProtocol Protocol { get; set; }
SourceAddressPrefixSection titled SourceAddressPrefixstring
Gets or sets the source address prefix. Defaults to "*" (any).
public string SourceAddressPrefix { get; set; }
SourceAddressPrefixReferenceSection titled SourceAddressPrefixReferencenullableReferenceExpression?
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; }
SourcePortRangeSection titled SourcePortRangestring
Gets or sets the source port range. Defaults to "*" (any).
public string SourcePortRange { get; set; }