Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AzureSecurityRule

Struct
📦 Aspire.Hosting.Azure.Network v17.0.0

Represents a security rule configuration for an Azure Network Security Group.

type AzureSecurityRule struct {
Name string `json:"Name"`
Description *string `json:"Description"`
Priority float64 `json:"Priority"`
Direction SecurityRuleDirection `json:"Direction"`
Access SecurityRuleAccess `json:"Access"`
Protocol SecurityRuleProtocol `json:"Protocol"`
SourceAddressPrefix string `json:"SourceAddressPrefix"`
SourceAddressPrefixReference *ReferenceExpression `json:"SourceAddressPrefixReference"`
SourcePortRange string `json:"SourcePortRange"`
DestinationAddressPrefix string `json:"DestinationAddressPrefix"`
DestinationAddressPrefixReference *ReferenceExpression `json:"DestinationAddressPrefixReference"`
DestinationPortRange string `json:"DestinationPortRange"`
}

Fields

Namestring
Gets or sets the name of the security rule. This name must be unique within the Network Security Group.
Description*string
Gets or sets an optional description for the security rule.
Priorityfloat64
Gets or sets the priority of the rule. Valid values are between 100 and 4096. Lower numbers have higher priority.
DirectionSecurityRuleDirection
Gets or sets the direction of the rule.
AccessSecurityRuleAccess
Gets or sets whether network traffic is allowed or denied.
ProtocolSecurityRuleProtocol
Gets or sets the network protocol this rule applies to.
SourceAddressPrefixstring
Gets or sets the source address prefix. Defaults to "*" (any).
SourceAddressPrefixReference*ReferenceExpression
Gets or sets a ReferenceExpression whose value is resolved at deploy time and used as the source address prefix for the rule. Takes precedence over SourceAddressPrefix.
SourcePortRangestring
Gets or sets the source port range. Defaults to "*" (any).
DestinationAddressPrefixstring
Gets or sets the destination address prefix. Defaults to "*" (any).
DestinationAddressPrefixReference*ReferenceExpression
Gets or sets a ReferenceExpression whose value is resolved at deploy time and used as the destination address prefix for the rule. Takes precedence over DestinationAddressPrefix.
DestinationPortRangestring
Gets or sets the destination port range. Use "*" for any, or a range like "80-443".