Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithNetworkSecurityGroup

Method
📦 Aspire.Hosting.Azure.Network v17.0.0
func (AzureSubnetResource) WithNetworkSecurityGroup(nsg AzureNetworkSecurityGroupResource) AzureSubnetResource

Signature

methodWithNetworkSecurityGroupbuilder
Associates a Network Security Group with the subnet.
WithNetworkSecurityGroup(nsg AzureNetworkSecurityGroupResource) AzureSubnetResource
nsgAzureNetworkSecurityGroupResourceThe Network Security Group to associate with the subnet.
AzureSubnetResource

The resource builder.

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

Applies to

This method applies to the following types: