Nat Rule Args
data class NatRuleArgs(val externalMappings: Output<List<VpnNatRuleMappingArgs>>? = null, val gatewayName: Output<String>? = null, val id: Output<String>? = null, val internalMappings: Output<List<VpnNatRuleMappingArgs>>? = null, val ipConfigurationId: Output<String>? = null, val mode: Output<Either<String, VpnNatRuleMode>>? = null, val name: Output<String>? = null, val natRuleName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val type: Output<Either<String, VpnNatRuleType>>? = null) : ConvertibleToJava<NatRuleArgs>
VpnGatewayNatRule Resource. API Version: 2020-11-01.
Example Usage
NatRulePut
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var natRule = new AzureNative.Network.NatRule("natRule", new()
{
ExternalMappings = new[]
{
new AzureNative.Network.Inputs.VpnNatRuleMappingArgs
{
AddressSpace = "192.168.21.0/24",
},
},
GatewayName = "gateway1",
InternalMappings = new[]
{
new AzureNative.Network.Inputs.VpnNatRuleMappingArgs
{
AddressSpace = "10.4.0.0/24",
},
},
IpConfigurationId = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default",
Mode = "EgressSnat",
NatRuleName = "natRule1",
ResourceGroupName = "rg1",
Type = "Static",
});
});
Content copied to clipboard
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewNatRule(ctx, "natRule", &network.NatRuleArgs{
ExternalMappings: []network.VpnNatRuleMappingArgs{
{
AddressSpace: pulumi.String("192.168.21.0/24"),
},
},
GatewayName: pulumi.String("gateway1"),
InternalMappings: []network.VpnNatRuleMappingArgs{
{
AddressSpace: pulumi.String("10.4.0.0/24"),
},
},
IpConfigurationId: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default"),
Mode: pulumi.String("EgressSnat"),
NatRuleName: pulumi.String("natRule1"),
ResourceGroupName: pulumi.String("rg1"),
Type: pulumi.String("Static"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.NatRule;
import com.pulumi.azurenative.network.NatRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var natRule = new NatRule("natRule", NatRuleArgs.builder()
.externalMappings(Map.of("addressSpace", "192.168.21.0/24"))
.gatewayName("gateway1")
.internalMappings(Map.of("addressSpace", "10.4.0.0/24"))
.ipConfigurationId("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default")
.mode("EgressSnat")
.natRuleName("natRule1")
.resourceGroupName("rg1")
.type("Static")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:network:NatRule natRule1 /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/natRule1
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(externalMappings: Output<List<VpnNatRuleMappingArgs>>? = null, gatewayName: Output<String>? = null, id: Output<String>? = null, internalMappings: Output<List<VpnNatRuleMappingArgs>>? = null, ipConfigurationId: Output<String>? = null, mode: Output<Either<String, VpnNatRuleMode>>? = null, name: Output<String>? = null, natRuleName: Output<String>? = null, resourceGroupName: Output<String>? = null, type: Output<Either<String, VpnNatRuleType>>? = null)
Properties
Link copied to clipboard
The private IP address external mapping for NAT.
Link copied to clipboard
The name of the gateway.
Link copied to clipboard
The private IP address internal mapping for NAT.
Link copied to clipboard
The IP Configuration ID this NAT rule applies to.
Link copied to clipboard
The Source NAT direction of a VPN NAT.
Link copied to clipboard
The name of the nat rule.
Link copied to clipboard
The resource group name of the VpnGateway.
Link copied to clipboard
The type of NAT rule for VPN NAT.