AzureSubnetServiceDelegations
Classstaticnet10.0
Well-known Azure service identifiers for subnet service delegation.
namespace Aspire.Hosting.Azure;
public static class AzureSubnetServiceDelegations{ // ...}Remarks
Section titled Remarks Delegating a subnet grants an Azure service permission to create service-specific resources in that subnet. These constants provide discoverable, strongly-named values for the services Aspire integrates with, so callers don't have to remember or duplicate the underlying resource provider strings when delegating a subnet. Each value is an Azure resource provider path; see Subnet delegation.
Fields4
Section titled Fieldsstring Delegation for Azure Application Gateway for Containers.
ContainerInstances staticstring Delegation for Azure Container Instances (ACI), which allows container groups to be deployed into the subnet.
Examples
Section titled ExamplesThis example delegates a subnet to Azure Container Instances using a well-known value:
var vnet = builder.AddAzureVirtualNetwork("vnet");var subnet = vnet.AddSubnet("aci-subnet", "10.0.0.0/23") .WithServiceDelegation(AzureSubnetServiceDelegations.ContainerInstances);