Skip to content
Docs Try Aspire

AzureVirtualNetworkExtensions

Class static net8.0
📦 Aspire.Hosting.Azure.Network v13.2.0
Provides extension methods for adding Azure Virtual Network resources to the application model.
namespace Aspire.Hosting;
public static class AzureVirtualNetworkExtensions
{
// ...
}
AddAzureVirtualNetwork(IDistributedApplicationBuilder, string, string?)extensionats export
IResourceBuilder<AzureVirtualNetworkResource>
Adds an Azure Virtual Network resource to the application model.
AddAzureVirtualNetwork(IDistributedApplicationBuilder, string, IResourceBuilder<ParameterResource>)extensionats export
IResourceBuilder<AzureVirtualNetworkResource>
Adds an Azure Virtual Network resource to the application model with a parameterized address prefix.
AddSubnet(IResourceBuilder<AzureVirtualNetworkResource>, string, string, string?)extensionats export
IResourceBuilder<AzureSubnetResource>
Adds an Azure Subnet to the Virtual Network.
AddSubnet(IResourceBuilder<AzureVirtualNetworkResource>, string, IResourceBuilder<ParameterResource>, string?)extensionats export
IResourceBuilder<AzureSubnetResource>
Adds an Azure Subnet to the Virtual Network with a parameterized address prefix.
AllowInbound(IResourceBuilder<AzureSubnetResource>, string?, string?, string?, SecurityRuleProtocol?, int?, string?)extensionats export
IResourceBuilder<AzureSubnetResource>
Adds an inbound allow rule to the subnet's Network Security Group.
AllowOutbound(IResourceBuilder<AzureSubnetResource>, string?, string?, string?, SecurityRuleProtocol?, int?, string?)extensionats export
IResourceBuilder<AzureSubnetResource>
Adds an outbound allow rule to the subnet's Network Security Group.
DenyInbound(IResourceBuilder<AzureSubnetResource>, string?, string?, string?, SecurityRuleProtocol?, int?, string?)extensionats export
IResourceBuilder<AzureSubnetResource>
Adds an inbound deny rule to the subnet's Network Security Group.
DenyOutbound(IResourceBuilder<AzureSubnetResource>, string?, string?, string?, SecurityRuleProtocol?, int?, string?)extensionats export
IResourceBuilder<AzureSubnetResource>
Adds an outbound deny rule to the subnet's Network Security Group.
WithDelegatedSubnet(IResourceBuilder<T>, IResourceBuilder<AzureSubnetResource>)extensionats export
IResourceBuilder<T>
Configures the resource to use the specified subnet with appropriate service delegation.
WithNatGateway(IResourceBuilder<AzureSubnetResource>, IResourceBuilder<AzureNatGatewayResource>)extensionats export
IResourceBuilder<AzureSubnetResource>
Associates a NAT Gateway with the subnet.
WithNetworkSecurityGroup(IResourceBuilder<AzureSubnetResource>, IResourceBuilder<AzureNetworkSecurityGroupResource>)extensionats export
IResourceBuilder<AzureSubnetResource>
Associates a Network Security Group with the subnet.
View all methods