Skip to content
Docs Try Aspire

AzureSubnetResource

Handle
📦 Aspire.Hosting.Azure.Network v13.2.0
interface AzureSubnetResource
extends IResource,
IResourceWithParent,
AzureVirtualNetworkResource]] {
addPrivateEndpoint(target: IAzurePrivateEndpointTarget): AzurePrivateEndpointResource;
allowInbound(
port?: string,
from?: string,
to?: string,
protocol?: SecurityRuleProtocol,
priority?: number,
name?: string): AzureSubnetResource;
allowOutbound(
port?: string,
from?: string,
to?: string,
protocol?: SecurityRuleProtocol,
priority?: number,
name?: string): AzureSubnetResource;
denyInbound(
port?: string,
from?: string,
to?: string,
protocol?: SecurityRuleProtocol,
priority?: number,
name?: string): AzureSubnetResource;
denyOutbound(
port?: string,
from?: string,
to?: string,
protocol?: SecurityRuleProtocol,
priority?: number,
name?: string): AzureSubnetResource;
withNatGateway(natGateway: AzureNatGatewayResource): AzureSubnetResource;
withNetworkSecurityGroup(nsg: AzureNetworkSecurityGroupResource): AzureSubnetResource;
}

Methods

method addPrivateEndpoint builder
Adds an Azure Private Endpoint resource to an Azure subnet resource.
addPrivateEndpoint(target: IAzurePrivateEndpointTarget): AzurePrivateEndpointResource
target IAzurePrivateEndpointTarget
AzurePrivateEndpointResource
method allowInbound builder
Adds an inbound allow rule to the Azure subnet resource's Network Security Group.
allowInbound(
port?: string,
from?: string,
to?: string,
protocol?: SecurityRuleProtocol,
priority?: number,
name?: string): AzureSubnetResource
port string optional
from string optional
to string optional
protocol SecurityRuleProtocol optional
priority number optional
name string optional
AzureSubnetResource
method allowOutbound builder
Adds an outbound allow rule to the Azure subnet resource's Network Security Group.
allowOutbound(
port?: string,
from?: string,
to?: string,
protocol?: SecurityRuleProtocol,
priority?: number,
name?: string): AzureSubnetResource
port string optional
from string optional
to string optional
protocol SecurityRuleProtocol optional
priority number optional
name string optional
AzureSubnetResource
method denyInbound builder
Adds an inbound deny rule to the Azure subnet resource's Network Security Group.
denyInbound(
port?: string,
from?: string,
to?: string,
protocol?: SecurityRuleProtocol,
priority?: number,
name?: string): AzureSubnetResource
port string optional
from string optional
to string optional
protocol SecurityRuleProtocol optional
priority number optional
name string optional
AzureSubnetResource
method denyOutbound builder
Adds an outbound deny rule to the Azure subnet resource's Network Security Group.
denyOutbound(
port?: string,
from?: string,
to?: string,
protocol?: SecurityRuleProtocol,
priority?: number,
name?: string): AzureSubnetResource
port string optional
from string optional
to string optional
protocol SecurityRuleProtocol optional
priority number optional
name string optional
AzureSubnetResource
method withNatGateway builder
Associates an Azure NAT Gateway resource with an Azure subnet resource.
withNatGateway(natGateway: AzureNatGatewayResource): AzureSubnetResource
natGateway AzureNatGatewayResource
AzureSubnetResource
method withNetworkSecurityGroup builder
Associates an Azure Network Security Group resource with an Azure subnet resource.
withNetworkSecurityGroup(nsg: AzureNetworkSecurityGroupResource): AzureSubnetResource
nsg AzureNetworkSecurityGroupResource
AzureSubnetResource