AzureSubnetResource
Handle
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; withServiceDelegation( serviceName: string, name?: string): AzureSubnetResource;}8 members
Methods
Adds an Azure Private Endpoint resource to the subnet.
addPrivateEndpoint(target: IAzurePrivateEndpointTarget): AzurePrivateEndpointResourceParameters
targetIAzurePrivateEndpointTarget The target Azure resource to connect via private link.Returns
AzurePrivateEndpointResource 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): AzureSubnetResourceParameters
portstringoptionalThe destination port range (e.g., "443", "80-443"). Defaults to "*" (any).fromstringoptionalThe source address prefix (e.g., "AzureLoadBalancer", "Internet", "10.0.0.0/8"). Defaults to "*" (any).tostringoptionalThe destination address prefix. Defaults to "*" (any).protocolSecurityRuleProtocol optionalThe network protocol. Defaults to `Asterisk` (any).prioritynumberoptionalThe rule priority (100-4096). If not specified, auto-increments from 100 by 100.namestringoptionalThe rule name. If not specified, auto-generated from parameters.Returns
AzureSubnetResource 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): AzureSubnetResourceParameters
portstringoptionalThe destination port range (e.g., "443", "80-443"). Defaults to "*" (any).fromstringoptionalThe source address prefix. Defaults to "*" (any).tostringoptionalThe destination address prefix (e.g., "Internet", "VirtualNetwork"). Defaults to "*" (any).protocolSecurityRuleProtocol optionalThe network protocol. Defaults to `Asterisk` (any).prioritynumberoptionalThe rule priority (100-4096). If not specified, auto-increments from 100 by 100.namestringoptionalThe rule name. If not specified, auto-generated from parameters.Returns
AzureSubnetResource 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): AzureSubnetResourceParameters
portstringoptionalThe destination port range (e.g., "443", "80-443"). Defaults to "*" (any).fromstringoptionalThe source address prefix (e.g., "Internet", "VirtualNetwork", "10.0.0.0/8"). Defaults to "*" (any).tostringoptionalThe destination address prefix. Defaults to "*" (any).protocolSecurityRuleProtocol optionalThe network protocol. Defaults to `Asterisk` (any).prioritynumberoptionalThe rule priority (100-4096). If not specified, auto-increments from 100 by 100.namestringoptionalThe rule name. If not specified, auto-generated from parameters.Returns
AzureSubnetResource 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): AzureSubnetResourceParameters
portstringoptionalThe destination port range (e.g., "443", "80-443"). Defaults to "*" (any).fromstringoptionalThe source address prefix. Defaults to "*" (any).tostringoptionalThe destination address prefix (e.g., "Internet", "VirtualNetwork"). Defaults to "*" (any).protocolSecurityRuleProtocol optionalThe network protocol. Defaults to `Asterisk` (any).prioritynumberoptionalThe rule priority (100-4096). If not specified, auto-increments from 100 by 100.namestringoptionalThe rule name. If not specified, auto-generated from parameters.Returns
AzureSubnetResource Associates a NAT Gateway with the subnet.
withNatGateway(natGateway: AzureNatGatewayResource): AzureSubnetResourceParameters
natGateway AzureNatGatewayResource The NAT Gateway to associate with the subnet.Returns
AzureSubnetResource Associates a Network Security Group with the subnet.
withNetworkSecurityGroup(nsg: AzureNetworkSecurityGroupResource): AzureSubnetResourceParameters
nsgAzureNetworkSecurityGroupResource The Network Security Group to associate with the subnet.Returns
AzureSubnetResource Delegates the subnet to the specified Azure service.
withServiceDelegation( serviceName: string, name?: string): AzureSubnetResourceParameters
serviceName stringThe service name to delegate the subnet to (e.g., "Microsoft.App/environments"). See `AzureSubnetServiceDelegations` for well-known values.namestringoptionalThe name of the service delegation. If not specified, defaults to `serviceName`.Returns
AzureSubnetResource