# Aspire.Hosting.Azure.Network

- Module: `Aspire.Hosting.Azure.Network`
- Version: `17.0.0`
- Import path: `apphost/modules/aspire`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)
- Functions: `20`
- Types: `16`

## Handles

- [AzureBicepResource](/reference/api/go/aspire.hosting.azure.network/azurebicepresource.md) -- `handle` - 0 members
- [AzureDelegatedSubnetResource](/reference/api/go/aspire.hosting.azure.network/azuredelegatedsubnetresource.md) -- `interface` - 1 members
- [AzureEnvironmentResource](/reference/api/go/aspire.hosting.azure.network/azureenvironmentresource.md) -- `handle` - 0 members
- [AzureInternalIngressResource](/reference/api/go/aspire.hosting.azure.network/azureinternalingressresource.md) -- `interface` - 1 members
- [AzureNatGatewayResource](/reference/api/go/aspire.hosting.azure.network/azurenatgatewayresource.md) -- `handle` - 1 members
- [AzureNetworkSecurityGroupResource](/reference/api/go/aspire.hosting.azure.network/azurenetworksecuritygroupresource.md) -- `handle` - 1 members
- [AzureNetworkSecurityPerimeterResource](/reference/api/go/aspire.hosting.azure.network/azurenetworksecurityperimeterresource.md) -- `handle` - 1 members
- [AzurePrivateEndpointResource](/reference/api/go/aspire.hosting.azure.network/azureprivateendpointresource.md) -- `handle` - 0 members
- [AzurePrivateEndpointTarget](/reference/api/go/aspire.hosting.azure.network/azureprivateendpointtarget.md) -- `interface` `marker` - 0 members
- [AzureProvisioningResource](/reference/api/go/aspire.hosting.azure.network/azureprovisioningresource.md) -- `handle` - 0 members
- [AzurePublicIPAddressResource](/reference/api/go/aspire.hosting.azure.network/azurepublicipaddressresource.md) -- `handle` - 0 members
- [AzureSubnetResource](/reference/api/go/aspire.hosting.azure.network/azuresubnetresource.md) -- `handle` - 8 members -- Represents an Azure Subnet resource.
- [AzureUserAssignedIdentityResource](/reference/api/go/aspire.hosting.azure.network/azureuserassignedidentityresource.md) -- `handle` - 0 members
- [AzureVirtualNetworkResource](/reference/api/go/aspire.hosting.azure.network/azurevirtualnetworkresource.md) -- `handle` - 1 members -- Represents an Azure Virtual Network resource.

## DTOs

- [AzureNspAccessRule](/reference/api/go/aspire.hosting.azure.network/azurenspaccessrule.md) -- `struct` - 8 fields -- Represents an access rule configuration for an Azure Network Security Perimeter.
- [AzureSecurityRule](/reference/api/go/aspire.hosting.azure.network/azuresecurityrule.md) -- `struct` - 12 fields -- Represents a security rule configuration for an Azure Network Security Group.

## Functions

- [WithDelegatedSubnet](/reference/api/go/aspire.hosting.azure.network/withdelegatedsubnet.md) -- `method` - on `AzureDelegatedSubnetResource` -- Configures the resource to use the specified subnet with appropriate service delegation.
- [WithInternalLoadBalancer](/reference/api/go/aspire.hosting.azure.network/withinternalloadbalancer.md) -- `method` - on `AzureInternalIngressResource` -- Configures the resource with an internal load balancer and private DNS.
- [WithPublicIPAddress](/reference/api/go/aspire.hosting.azure.network/withpublicipaddress.md) -- `method` - on `AzureNatGatewayResource` -- Associates an explicit Public IP Address resource with the NAT Gateway.
- [WithSecurityRule](/reference/api/go/aspire.hosting.azure.network/withsecurityrule.md) -- `method` - on `AzureNetworkSecurityGroupResource` -- Adds a security rule to the Network Security Group.
- [WithAccessRule](/reference/api/go/aspire.hosting.azure.network/withaccessrule.md) -- `method` - on `AzureNetworkSecurityPerimeterResource` -- Adds an access rule to the Network Security Perimeter.
- [AddPrivateEndpoint](/reference/api/go/aspire.hosting.azure.network/addprivateendpoint.md) -- `method` - on `AzureSubnetResource` -- Adds an Azure Private Endpoint resource to the subnet.
- [AllowInbound](/reference/api/go/aspire.hosting.azure.network/allowinbound.md) -- `method` - on `AzureSubnetResource` -- Adds an inbound allow rule to the subnet's Network Security Group.
- [AllowOutbound](/reference/api/go/aspire.hosting.azure.network/allowoutbound.md) -- `method` - on `AzureSubnetResource` -- Adds an outbound allow rule to the subnet's Network Security Group.
- [DenyInbound](/reference/api/go/aspire.hosting.azure.network/denyinbound.md) -- `method` - on `AzureSubnetResource` -- Adds an inbound deny rule to the subnet's Network Security Group.
- [DenyOutbound](/reference/api/go/aspire.hosting.azure.network/denyoutbound.md) -- `method` - on `AzureSubnetResource` -- Adds an outbound deny rule to the subnet's Network Security Group.
- [WithNatGateway](/reference/api/go/aspire.hosting.azure.network/withnatgateway.md) -- `method` - on `AzureSubnetResource` -- Associates a NAT Gateway with the subnet.
- [WithNetworkSecurityGroup](/reference/api/go/aspire.hosting.azure.network/withnetworksecuritygroup.md) -- `method` - on `AzureSubnetResource` -- Associates a Network Security Group with the subnet.
- [WithServiceDelegation](/reference/api/go/aspire.hosting.azure.network/withservicedelegation.md) -- `method` - on `AzureSubnetResource` -- Delegates the subnet to the specified Azure service.
- [AddSubnet](/reference/api/go/aspire.hosting.azure.network/addsubnet.md) -- `method` - on `AzureVirtualNetworkResource` -- Adds an Azure subnet resource to an Azure Virtual Network resource.
- [AddAzureVirtualNetwork](/reference/api/go/aspire.hosting.azure.network/addazurevirtualnetwork.md) -- `method` - on `DistributedApplicationBuilder` -- Adds an Azure Virtual Network resource to the application model.
- [AddNatGateway](/reference/api/go/aspire.hosting.azure.network/addnatgateway.md) -- `method` - on `DistributedApplicationBuilder` -- Adds an Azure NAT Gateway resource to the application model.
- [AddNetworkSecurityGroup](/reference/api/go/aspire.hosting.azure.network/addnetworksecuritygroup.md) -- `method` - on `DistributedApplicationBuilder` -- Adds an Azure Network Security Group to the application model.
- [AddNetworkSecurityPerimeter](/reference/api/go/aspire.hosting.azure.network/addnetworksecurityperimeter.md) -- `method` - on `DistributedApplicationBuilder` -- Adds an Azure Network Security Perimeter to the application model.
- [AddPublicIPAddress](/reference/api/go/aspire.hosting.azure.network/addpublicipaddress.md) -- `method` - on `DistributedApplicationBuilder` -- Adds an Azure Public IP Address resource to the application model.
- [WithNetworkSecurityPerimeter](/reference/api/go/aspire.hosting.azure.network/withnetworksecurityperimeter.md) -- `method` - on `Resource` -- Associates an Azure PaaS resource with a Network Security Perimeter.

## Exported values

- `AzureServiceTags.AppService`: `string` = `"AppService"` -- Represents Azure App Service and Azure Functions service addresses.
- `AzureServiceTags.AzureActiveDirectory`: `string` = `"AzureActiveDirectory"` -- Represents Microsoft Entra ID (formerly Azure Active Directory) service addresses.
- `AzureServiceTags.AzureContainerRegistry`: `string` = `"AzureContainerRegistry"` -- Represents Azure Container Registry service addresses.
- `AzureServiceTags.AzureCosmosDB`: `string` = `"AzureCosmosDB"` -- Represents Azure Cosmos DB service addresses.
- `AzureServiceTags.AzureKeyVault`: `string` = `"AzureKeyVault"` -- Represents Azure Key Vault service addresses.
- `AzureServiceTags.AzureLoadBalancer`: `string` = `"AzureLoadBalancer"` -- Represents the Azure infrastructure load balancer. This tag is commonly used to allow health probe traffic from Azure.
- `AzureServiceTags.AzureMonitor`: `string` = `"AzureMonitor"` -- Represents Azure Monitor service addresses, including Log Analytics, Application Insights, and Azure Monitor metrics.
- `AzureServiceTags.AzureTrafficManager`: `string` = `"AzureTrafficManager"` -- Represents Azure Traffic Manager probe IP addresses.
- `AzureServiceTags.EventHub`: `string` = `"EventHub"` -- Represents Azure Event Hubs service addresses.
- `AzureServiceTags.GatewayManager`: `string` = `"GatewayManager"` -- Represents the Gateway Manager service, used for VPN Gateway and Application Gateway management traffic.
- `AzureServiceTags.Internet`: `string` = `"Internet"` -- Represents the Internet address space, including all publicly routable IP addresses.
- `AzureServiceTags.ServiceBus`: `string` = `"ServiceBus"` -- Represents Azure Service Bus service addresses.
- `AzureServiceTags.Sql`: `string` = `"Sql"` -- Represents Azure SQL Database, Azure Database for MySQL, Azure Database for PostgreSQL, Azure Database for MariaDB, and Azure Synapse Analytics.
- `AzureServiceTags.Storage`: `string` = `"Storage"` -- Represents the Azure Storage service. This tag does not include specific Storage accounts; it covers all Azure Storage IP addresses.
- `AzureServiceTags.VirtualNetwork`: `string` = `"VirtualNetwork"` -- Represents the address space for the virtual network, including all connected address spaces, all connected on-premises address spaces, and peered virtual networks.
