Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithServiceDelegation

Method
📦 Aspire.Hosting.Azure.Network v17.0.0
func (AzureSubnetResource) WithServiceDelegation(
serviceName string,
options ...*WithServiceDelegationOptions,
) AzureSubnetResource

Signature

methodWithServiceDelegationbuilder
Delegates the subnet to the specified Azure service.
WithServiceDelegation(
serviceName string,
options ...*WithServiceDelegationOptions,
) AzureSubnetResource
serviceNamestringThe service name to delegate the subnet to (e.g., "Microsoft.App/environments"). See AzureSubnetServiceDelegations for well-known values.
options...*WithServiceDelegationOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithServiceDelegationOptions argument.

Name*stringThe name of the service delegation. If not specified, defaults to serviceName.
AzureSubnetResource

The resource builder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: