Skip to content
Docs Try Aspire
Docs Try

AzureSubnetResource

Handle
📦 Aspire.Hosting.Azure.Network v13.4.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 the subnet.
addPrivateEndpoint(target: IAzurePrivateEndpointTarget): AzurePrivateEndpointResource
target IAzurePrivateEndpointTarget
AzurePrivateEndpointResource
method allowInbound builder
Adds an inbound allow rule to the subnet'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 subnet'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 subnet'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 subnet'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 a NAT Gateway with the subnet.
withNatGateway(natGateway: AzureNatGatewayResource): AzureSubnetResource
natGateway AzureNatGatewayResource
AzureSubnetResource
Associates a Network Security Group with the subnet.
withNetworkSecurityGroup(nsg: AzureNetworkSecurityGroupResource): AzureSubnetResource
nsg AzureNetworkSecurityGroupResource
AzureSubnetResource