Skip to content
DocsTry Aspire
DocsTry

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

methodaddPrivateEndpointbuilder
Adds an Azure Private Endpoint resource to the subnet.
addPrivateEndpoint(target: IAzurePrivateEndpointTarget): AzurePrivateEndpointResource
targetIAzurePrivateEndpointTarget
AzurePrivateEndpointResource
methodallowInboundbuilder
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
portstringoptional
fromstringoptional
tostringoptional
protocolSecurityRuleProtocoloptional
prioritynumberoptional
namestringoptional
AzureSubnetResource
methodallowOutboundbuilder
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
portstringoptional
fromstringoptional
tostringoptional
protocolSecurityRuleProtocoloptional
prioritynumberoptional
namestringoptional
AzureSubnetResource
methoddenyInboundbuilder
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
portstringoptional
fromstringoptional
tostringoptional
protocolSecurityRuleProtocoloptional
prioritynumberoptional
namestringoptional
AzureSubnetResource
methoddenyOutboundbuilder
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
portstringoptional
fromstringoptional
tostringoptional
protocolSecurityRuleProtocoloptional
prioritynumberoptional
namestringoptional
AzureSubnetResource
methodwithNatGatewaybuilder
Associates a NAT Gateway with the subnet.
withNatGateway(natGateway: AzureNatGatewayResource): AzureSubnetResource
natGatewayAzureNatGatewayResource
AzureSubnetResource
Associates a Network Security Group with the subnet.
withNetworkSecurityGroup(nsg: AzureNetworkSecurityGroupResource): AzureSubnetResource
nsgAzureNetworkSecurityGroupResource
AzureSubnetResource