AzureServiceTags
namespace Aspire.Hosting.Azure;
public static class AzureServiceTags{ // ...}Remarks
Section titled RemarksService tags represent a group of IP address prefixes from a given Azure service. Microsoft manages the address prefixes encompassed by each tag and automatically updates them as addresses change.
These tags can be used with the from and to parameters of methods such as Azure, Azure, Azure, Azure, or with the Azure and Azure properties.
Fields15
Section titled FieldsAzureActiveDirectory staticstringAzureLoadBalancer staticstringAzureMonitor staticstringGatewayManager staticstringInternetstaticstringSqlstaticstringStoragestaticstringVirtualNetwork staticstringExamples
Section titled ExamplesUse service tags when configuring network security rules:
var subnet = vnet.AddSubnet("web", "10.0.1.0/24") .AllowInbound(port: "443", from: AzureServiceTags.AzureLoadBalancer, protocol: SecurityRuleProtocol.Tcp) .DenyInbound(from: AzureServiceTags.Internet);