Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddSubnet

Method
📦 Aspire.Hosting.Azure.Network v17.0.0
func (AzureVirtualNetworkResource) AddSubnet(
name string,
addressPrefix any,
options ...*AddSubnetOptions,
) AzureSubnetResource

Signature

methodAddSubnetbuilder
Adds an Azure subnet resource to an Azure Virtual Network resource.
AddSubnet(
name string,
addressPrefix any,
options ...*AddSubnetOptions,
) AzureSubnetResource
namestring
addressPrefixany
options...*AddSubnetOptionsOptional settings, described under Options.

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

SubnetName*string
AzureSubnetResource

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

Applies to

This method applies to the following types: