1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. NatPrivateDnatRule
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.NatPrivateDnatRule

Explore with Pulumi AI

Manages a DNAT rule resource of the private NAT within FlexibleEngine.

Example Usage

DNAT rules forwarded with VIP as the backend

import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";

const config = new pulumi.Config();
const networkId = config.requireObject("networkId");
const gatewayId = config.requireObject("gatewayId");
const transitIpId = config.requireObject("transitIpId");
const testNetworkingVipV2 = new flexibleengine.NetworkingVipV2("testNetworkingVipV2", {networkId: networkId});
const testNatPrivateDnatRule = new flexibleengine.NatPrivateDnatRule("testNatPrivateDnatRule", {
    gatewayId: gatewayId,
    protocol: "tcp",
    transitIpId: transitIpId,
    transitServicePort: 1000,
    backendInterfaceId: testNetworkingVipV2.networkingVipV2Id,
    internalServicePort: 2000,
});
Copy
import pulumi
import pulumi_flexibleengine as flexibleengine

config = pulumi.Config()
network_id = config.require_object("networkId")
gateway_id = config.require_object("gatewayId")
transit_ip_id = config.require_object("transitIpId")
test_networking_vip_v2 = flexibleengine.NetworkingVipV2("testNetworkingVipV2", network_id=network_id)
test_nat_private_dnat_rule = flexibleengine.NatPrivateDnatRule("testNatPrivateDnatRule",
    gateway_id=gateway_id,
    protocol="tcp",
    transit_ip_id=transit_ip_id,
    transit_service_port=1000,
    backend_interface_id=test_networking_vip_v2.networking_vip_v2_id,
    internal_service_port=2000)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		networkId := cfg.RequireObject("networkId")
		gatewayId := cfg.RequireObject("gatewayId")
		transitIpId := cfg.RequireObject("transitIpId")
		testNetworkingVipV2, err := flexibleengine.NewNetworkingVipV2(ctx, "testNetworkingVipV2", &flexibleengine.NetworkingVipV2Args{
			NetworkId: pulumi.Any(networkId),
		})
		if err != nil {
			return err
		}
		_, err = flexibleengine.NewNatPrivateDnatRule(ctx, "testNatPrivateDnatRule", &flexibleengine.NatPrivateDnatRuleArgs{
			GatewayId:           pulumi.Any(gatewayId),
			Protocol:            pulumi.String("tcp"),
			TransitIpId:         pulumi.Any(transitIpId),
			TransitServicePort:  pulumi.Float64(1000),
			BackendInterfaceId:  testNetworkingVipV2.NetworkingVipV2Id,
			InternalServicePort: pulumi.Float64(2000),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var networkId = config.RequireObject<dynamic>("networkId");
    var gatewayId = config.RequireObject<dynamic>("gatewayId");
    var transitIpId = config.RequireObject<dynamic>("transitIpId");
    var testNetworkingVipV2 = new Flexibleengine.NetworkingVipV2("testNetworkingVipV2", new()
    {
        NetworkId = networkId,
    });

    var testNatPrivateDnatRule = new Flexibleengine.NatPrivateDnatRule("testNatPrivateDnatRule", new()
    {
        GatewayId = gatewayId,
        Protocol = "tcp",
        TransitIpId = transitIpId,
        TransitServicePort = 1000,
        BackendInterfaceId = testNetworkingVipV2.NetworkingVipV2Id,
        InternalServicePort = 2000,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.NetworkingVipV2;
import com.pulumi.flexibleengine.NetworkingVipV2Args;
import com.pulumi.flexibleengine.NatPrivateDnatRule;
import com.pulumi.flexibleengine.NatPrivateDnatRuleArgs;
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) {
        final var config = ctx.config();
        final var networkId = config.get("networkId");
        final var gatewayId = config.get("gatewayId");
        final var transitIpId = config.get("transitIpId");
        var testNetworkingVipV2 = new NetworkingVipV2("testNetworkingVipV2", NetworkingVipV2Args.builder()
            .networkId(networkId)
            .build());

        var testNatPrivateDnatRule = new NatPrivateDnatRule("testNatPrivateDnatRule", NatPrivateDnatRuleArgs.builder()
            .gatewayId(gatewayId)
            .protocol("tcp")
            .transitIpId(transitIpId)
            .transitServicePort(1000)
            .backendInterfaceId(testNetworkingVipV2.networkingVipV2Id())
            .internalServicePort(2000)
            .build());

    }
}
Copy
configuration:
  networkId:
    type: dynamic
  gatewayId:
    type: dynamic
  transitIpId:
    type: dynamic
resources:
  testNetworkingVipV2:
    type: flexibleengine:NetworkingVipV2
    properties:
      networkId: ${networkId}
  testNatPrivateDnatRule:
    type: flexibleengine:NatPrivateDnatRule
    properties:
      gatewayId: ${gatewayId}
      protocol: tcp
      transitIpId: ${transitIpId}
      transitServicePort: 1000
      backendInterfaceId: ${testNetworkingVipV2.networkingVipV2Id}
      internalServicePort: 2000
Copy

DNAT rules forwarded with a custom private IP address as the backend

import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";

const config = new pulumi.Config();
const gatewayId = config.requireObject("gatewayId");
const transitIpId = config.requireObject("transitIpId");
const test = new flexibleengine.NatPrivateDnatRule("test", {
    gatewayId: gatewayId,
    protocol: "tcp",
    transitIpId: transitIpId,
    transitServicePort: 1000,
    backendPrivateIp: "172.168.0.69",
    internalServicePort: 2000,
});
Copy
import pulumi
import pulumi_flexibleengine as flexibleengine

config = pulumi.Config()
gateway_id = config.require_object("gatewayId")
transit_ip_id = config.require_object("transitIpId")
test = flexibleengine.NatPrivateDnatRule("test",
    gateway_id=gateway_id,
    protocol="tcp",
    transit_ip_id=transit_ip_id,
    transit_service_port=1000,
    backend_private_ip="172.168.0.69",
    internal_service_port=2000)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		gatewayId := cfg.RequireObject("gatewayId")
		transitIpId := cfg.RequireObject("transitIpId")
		_, err := flexibleengine.NewNatPrivateDnatRule(ctx, "test", &flexibleengine.NatPrivateDnatRuleArgs{
			GatewayId:           pulumi.Any(gatewayId),
			Protocol:            pulumi.String("tcp"),
			TransitIpId:         pulumi.Any(transitIpId),
			TransitServicePort:  pulumi.Float64(1000),
			BackendPrivateIp:    pulumi.String("172.168.0.69"),
			InternalServicePort: pulumi.Float64(2000),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var gatewayId = config.RequireObject<dynamic>("gatewayId");
    var transitIpId = config.RequireObject<dynamic>("transitIpId");
    var test = new Flexibleengine.NatPrivateDnatRule("test", new()
    {
        GatewayId = gatewayId,
        Protocol = "tcp",
        TransitIpId = transitIpId,
        TransitServicePort = 1000,
        BackendPrivateIp = "172.168.0.69",
        InternalServicePort = 2000,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.NatPrivateDnatRule;
import com.pulumi.flexibleengine.NatPrivateDnatRuleArgs;
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) {
        final var config = ctx.config();
        final var gatewayId = config.get("gatewayId");
        final var transitIpId = config.get("transitIpId");
        var test = new NatPrivateDnatRule("test", NatPrivateDnatRuleArgs.builder()
            .gatewayId(gatewayId)
            .protocol("tcp")
            .transitIpId(transitIpId)
            .transitServicePort(1000)
            .backendPrivateIp("172.168.0.69")
            .internalServicePort(2000)
            .build());

    }
}
Copy
configuration:
  gatewayId:
    type: dynamic
  transitIpId:
    type: dynamic
resources:
  test:
    type: flexibleengine:NatPrivateDnatRule
    properties:
      gatewayId: ${gatewayId}
      protocol: tcp
      transitIpId: ${transitIpId}
      transitServicePort: 1000
      backendPrivateIp: 172.168.0.69
      internalServicePort: 2000
Copy

DNAT rules for all ports

import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";

const config = new pulumi.Config();
const gatewayId = config.requireObject("gatewayId");
const transitIpId = config.requireObject("transitIpId");
const test = new flexibleengine.NatPrivateDnatRule("test", {
    gatewayId: gatewayId,
    protocol: "any",
    transitIpId: transitIpId,
    backendPrivateIp: "172.168.0.69",
});
Copy
import pulumi
import pulumi_flexibleengine as flexibleengine

config = pulumi.Config()
gateway_id = config.require_object("gatewayId")
transit_ip_id = config.require_object("transitIpId")
test = flexibleengine.NatPrivateDnatRule("test",
    gateway_id=gateway_id,
    protocol="any",
    transit_ip_id=transit_ip_id,
    backend_private_ip="172.168.0.69")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		gatewayId := cfg.RequireObject("gatewayId")
		transitIpId := cfg.RequireObject("transitIpId")
		_, err := flexibleengine.NewNatPrivateDnatRule(ctx, "test", &flexibleengine.NatPrivateDnatRuleArgs{
			GatewayId:        pulumi.Any(gatewayId),
			Protocol:         pulumi.String("any"),
			TransitIpId:      pulumi.Any(transitIpId),
			BackendPrivateIp: pulumi.String("172.168.0.69"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var gatewayId = config.RequireObject<dynamic>("gatewayId");
    var transitIpId = config.RequireObject<dynamic>("transitIpId");
    var test = new Flexibleengine.NatPrivateDnatRule("test", new()
    {
        GatewayId = gatewayId,
        Protocol = "any",
        TransitIpId = transitIpId,
        BackendPrivateIp = "172.168.0.69",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.NatPrivateDnatRule;
import com.pulumi.flexibleengine.NatPrivateDnatRuleArgs;
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) {
        final var config = ctx.config();
        final var gatewayId = config.get("gatewayId");
        final var transitIpId = config.get("transitIpId");
        var test = new NatPrivateDnatRule("test", NatPrivateDnatRuleArgs.builder()
            .gatewayId(gatewayId)
            .protocol("any")
            .transitIpId(transitIpId)
            .backendPrivateIp("172.168.0.69")
            .build());

    }
}
Copy
configuration:
  gatewayId:
    type: dynamic
  transitIpId:
    type: dynamic
resources:
  test:
    type: flexibleengine:NatPrivateDnatRule
    properties:
      gatewayId: ${gatewayId}
      protocol: any
      transitIpId: ${transitIpId}
      backendPrivateIp: 172.168.0.69
Copy

Create NatPrivateDnatRule Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new NatPrivateDnatRule(name: string, args: NatPrivateDnatRuleArgs, opts?: CustomResourceOptions);
@overload
def NatPrivateDnatRule(resource_name: str,
                       args: NatPrivateDnatRuleArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def NatPrivateDnatRule(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       gateway_id: Optional[str] = None,
                       transit_ip_id: Optional[str] = None,
                       backend_interface_id: Optional[str] = None,
                       backend_private_ip: Optional[str] = None,
                       description: Optional[str] = None,
                       internal_service_port: Optional[float] = None,
                       nat_private_dnat_rule_id: Optional[str] = None,
                       protocol: Optional[str] = None,
                       region: Optional[str] = None,
                       transit_service_port: Optional[float] = None)
func NewNatPrivateDnatRule(ctx *Context, name string, args NatPrivateDnatRuleArgs, opts ...ResourceOption) (*NatPrivateDnatRule, error)
public NatPrivateDnatRule(string name, NatPrivateDnatRuleArgs args, CustomResourceOptions? opts = null)
public NatPrivateDnatRule(String name, NatPrivateDnatRuleArgs args)
public NatPrivateDnatRule(String name, NatPrivateDnatRuleArgs args, CustomResourceOptions options)
type: flexibleengine:NatPrivateDnatRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. NatPrivateDnatRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. NatPrivateDnatRuleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. NatPrivateDnatRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. NatPrivateDnatRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. NatPrivateDnatRuleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var natPrivateDnatRuleResource = new Flexibleengine.NatPrivateDnatRule("natPrivateDnatRuleResource", new()
{
    GatewayId = "string",
    TransitIpId = "string",
    BackendInterfaceId = "string",
    BackendPrivateIp = "string",
    Description = "string",
    InternalServicePort = 0,
    NatPrivateDnatRuleId = "string",
    Protocol = "string",
    Region = "string",
    TransitServicePort = 0,
});
Copy
example, err := flexibleengine.NewNatPrivateDnatRule(ctx, "natPrivateDnatRuleResource", &flexibleengine.NatPrivateDnatRuleArgs{
	GatewayId:            pulumi.String("string"),
	TransitIpId:          pulumi.String("string"),
	BackendInterfaceId:   pulumi.String("string"),
	BackendPrivateIp:     pulumi.String("string"),
	Description:          pulumi.String("string"),
	InternalServicePort:  pulumi.Float64(0),
	NatPrivateDnatRuleId: pulumi.String("string"),
	Protocol:             pulumi.String("string"),
	Region:               pulumi.String("string"),
	TransitServicePort:   pulumi.Float64(0),
})
Copy
var natPrivateDnatRuleResource = new NatPrivateDnatRule("natPrivateDnatRuleResource", NatPrivateDnatRuleArgs.builder()
    .gatewayId("string")
    .transitIpId("string")
    .backendInterfaceId("string")
    .backendPrivateIp("string")
    .description("string")
    .internalServicePort(0)
    .natPrivateDnatRuleId("string")
    .protocol("string")
    .region("string")
    .transitServicePort(0)
    .build());
Copy
nat_private_dnat_rule_resource = flexibleengine.NatPrivateDnatRule("natPrivateDnatRuleResource",
    gateway_id="string",
    transit_ip_id="string",
    backend_interface_id="string",
    backend_private_ip="string",
    description="string",
    internal_service_port=0,
    nat_private_dnat_rule_id="string",
    protocol="string",
    region="string",
    transit_service_port=0)
Copy
const natPrivateDnatRuleResource = new flexibleengine.NatPrivateDnatRule("natPrivateDnatRuleResource", {
    gatewayId: "string",
    transitIpId: "string",
    backendInterfaceId: "string",
    backendPrivateIp: "string",
    description: "string",
    internalServicePort: 0,
    natPrivateDnatRuleId: "string",
    protocol: "string",
    region: "string",
    transitServicePort: 0,
});
Copy
type: flexibleengine:NatPrivateDnatRule
properties:
    backendInterfaceId: string
    backendPrivateIp: string
    description: string
    gatewayId: string
    internalServicePort: 0
    natPrivateDnatRuleId: string
    protocol: string
    region: string
    transitIpId: string
    transitServicePort: 0
Copy

NatPrivateDnatRule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The NatPrivateDnatRule resource accepts the following input properties:

GatewayId This property is required. string
Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource.
TransitIpId This property is required. string
Specifies the ID of the transit IP for private NAT.
BackendInterfaceId string
Specifies the network interface ID of the transit IP for private NAT.
Exactly one of backend_interface_id and backend_private_ip must be set.
BackendPrivateIp string
Specifies the private IP address of the backend instance.
Description string
Specifies the description of the DNAT rule, which contain maximum of 255 characters, and angle brackets (< and >) are not allowed.
InternalServicePort double

Specifies the port of the backend instance.

Defaults to 0 and the default port is only available for rules with the protocol any.

NatPrivateDnatRuleId string
The resource ID in UUID format.
Protocol string
Specifies the protocol type.
The valid values are tcp, udp and any. Defaults to any.
Region string
Specifies the region where the DNAT rule is located.
If omitted, the provider-level region will be used. Changing this will create a new resource.
TransitServicePort double

Specifies the port of the transit IP.

Defaults to 0 and the default port is only available for rules with the protocol any.

GatewayId This property is required. string
Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource.
TransitIpId This property is required. string
Specifies the ID of the transit IP for private NAT.
BackendInterfaceId string
Specifies the network interface ID of the transit IP for private NAT.
Exactly one of backend_interface_id and backend_private_ip must be set.
BackendPrivateIp string
Specifies the private IP address of the backend instance.
Description string
Specifies the description of the DNAT rule, which contain maximum of 255 characters, and angle brackets (< and >) are not allowed.
InternalServicePort float64

Specifies the port of the backend instance.

Defaults to 0 and the default port is only available for rules with the protocol any.

NatPrivateDnatRuleId string
The resource ID in UUID format.
Protocol string
Specifies the protocol type.
The valid values are tcp, udp and any. Defaults to any.
Region string
Specifies the region where the DNAT rule is located.
If omitted, the provider-level region will be used. Changing this will create a new resource.
TransitServicePort float64

Specifies the port of the transit IP.

Defaults to 0 and the default port is only available for rules with the protocol any.

gatewayId This property is required. String
Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource.
transitIpId This property is required. String
Specifies the ID of the transit IP for private NAT.
backendInterfaceId String
Specifies the network interface ID of the transit IP for private NAT.
Exactly one of backend_interface_id and backend_private_ip must be set.
backendPrivateIp String
Specifies the private IP address of the backend instance.
description String
Specifies the description of the DNAT rule, which contain maximum of 255 characters, and angle brackets (< and >) are not allowed.
internalServicePort Double

Specifies the port of the backend instance.

Defaults to 0 and the default port is only available for rules with the protocol any.

natPrivateDnatRuleId String
The resource ID in UUID format.
protocol String
Specifies the protocol type.
The valid values are tcp, udp and any. Defaults to any.
region String
Specifies the region where the DNAT rule is located.
If omitted, the provider-level region will be used. Changing this will create a new resource.
transitServicePort Double

Specifies the port of the transit IP.

Defaults to 0 and the default port is only available for rules with the protocol any.

gatewayId This property is required. string
Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource.
transitIpId This property is required. string
Specifies the ID of the transit IP for private NAT.
backendInterfaceId string
Specifies the network interface ID of the transit IP for private NAT.
Exactly one of backend_interface_id and backend_private_ip must be set.
backendPrivateIp string
Specifies the private IP address of the backend instance.
description string
Specifies the description of the DNAT rule, which contain maximum of 255 characters, and angle brackets (< and >) are not allowed.
internalServicePort number

Specifies the port of the backend instance.

Defaults to 0 and the default port is only available for rules with the protocol any.

natPrivateDnatRuleId string
The resource ID in UUID format.
protocol string
Specifies the protocol type.
The valid values are tcp, udp and any. Defaults to any.
region string
Specifies the region where the DNAT rule is located.
If omitted, the provider-level region will be used. Changing this will create a new resource.
transitServicePort number

Specifies the port of the transit IP.

Defaults to 0 and the default port is only available for rules with the protocol any.

gateway_id This property is required. str
Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource.
transit_ip_id This property is required. str
Specifies the ID of the transit IP for private NAT.
backend_interface_id str
Specifies the network interface ID of the transit IP for private NAT.
Exactly one of backend_interface_id and backend_private_ip must be set.
backend_private_ip str
Specifies the private IP address of the backend instance.
description str
Specifies the description of the DNAT rule, which contain maximum of 255 characters, and angle brackets (< and >) are not allowed.
internal_service_port float

Specifies the port of the backend instance.

Defaults to 0 and the default port is only available for rules with the protocol any.

nat_private_dnat_rule_id str
The resource ID in UUID format.
protocol str
Specifies the protocol type.
The valid values are tcp, udp and any. Defaults to any.
region str
Specifies the region where the DNAT rule is located.
If omitted, the provider-level region will be used. Changing this will create a new resource.
transit_service_port float

Specifies the port of the transit IP.

Defaults to 0 and the default port is only available for rules with the protocol any.

gatewayId This property is required. String
Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource.
transitIpId This property is required. String
Specifies the ID of the transit IP for private NAT.
backendInterfaceId String
Specifies the network interface ID of the transit IP for private NAT.
Exactly one of backend_interface_id and backend_private_ip must be set.
backendPrivateIp String
Specifies the private IP address of the backend instance.
description String
Specifies the description of the DNAT rule, which contain maximum of 255 characters, and angle brackets (< and >) are not allowed.
internalServicePort Number

Specifies the port of the backend instance.

Defaults to 0 and the default port is only available for rules with the protocol any.

natPrivateDnatRuleId String
The resource ID in UUID format.
protocol String
Specifies the protocol type.
The valid values are tcp, udp and any. Defaults to any.
region String
Specifies the region where the DNAT rule is located.
If omitted, the provider-level region will be used. Changing this will create a new resource.
transitServicePort Number

Specifies the port of the transit IP.

Defaults to 0 and the default port is only available for rules with the protocol any.

Outputs

All input properties are implicitly available as output properties. Additionally, the NatPrivateDnatRule resource produces the following output properties:

BackendType string
The type of backend instance. The valid values are as follows:

  • COMPUTE: ECS instance.
  • VIP: VIP.
  • ELB: ELB loadbalancer.
  • ELBv3: ver.3 ELB loadbalancer.
  • CUSTOMIZE: custom backend IP address.
CreatedAt string
The creation time of the DNAT rule.
Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt string
The latest update time of the DNAT rule.
BackendType string
The type of backend instance. The valid values are as follows:

  • COMPUTE: ECS instance.
  • VIP: VIP.
  • ELB: ELB loadbalancer.
  • ELBv3: ver.3 ELB loadbalancer.
  • CUSTOMIZE: custom backend IP address.
CreatedAt string
The creation time of the DNAT rule.
Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt string
The latest update time of the DNAT rule.
backendType String
The type of backend instance. The valid values are as follows:

  • COMPUTE: ECS instance.
  • VIP: VIP.
  • ELB: ELB loadbalancer.
  • ELBv3: ver.3 ELB loadbalancer.
  • CUSTOMIZE: custom backend IP address.
createdAt String
The creation time of the DNAT rule.
id String
The provider-assigned unique ID for this managed resource.
updatedAt String
The latest update time of the DNAT rule.
backendType string
The type of backend instance. The valid values are as follows:

  • COMPUTE: ECS instance.
  • VIP: VIP.
  • ELB: ELB loadbalancer.
  • ELBv3: ver.3 ELB loadbalancer.
  • CUSTOMIZE: custom backend IP address.
createdAt string
The creation time of the DNAT rule.
id string
The provider-assigned unique ID for this managed resource.
updatedAt string
The latest update time of the DNAT rule.
backend_type str
The type of backend instance. The valid values are as follows:

  • COMPUTE: ECS instance.
  • VIP: VIP.
  • ELB: ELB loadbalancer.
  • ELBv3: ver.3 ELB loadbalancer.
  • CUSTOMIZE: custom backend IP address.
created_at str
The creation time of the DNAT rule.
id str
The provider-assigned unique ID for this managed resource.
updated_at str
The latest update time of the DNAT rule.
backendType String
The type of backend instance. The valid values are as follows:

  • COMPUTE: ECS instance.
  • VIP: VIP.
  • ELB: ELB loadbalancer.
  • ELBv3: ver.3 ELB loadbalancer.
  • CUSTOMIZE: custom backend IP address.
createdAt String
The creation time of the DNAT rule.
id String
The provider-assigned unique ID for this managed resource.
updatedAt String
The latest update time of the DNAT rule.

Look up Existing NatPrivateDnatRule Resource

Get an existing NatPrivateDnatRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: NatPrivateDnatRuleState, opts?: CustomResourceOptions): NatPrivateDnatRule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        backend_interface_id: Optional[str] = None,
        backend_private_ip: Optional[str] = None,
        backend_type: Optional[str] = None,
        created_at: Optional[str] = None,
        description: Optional[str] = None,
        gateway_id: Optional[str] = None,
        internal_service_port: Optional[float] = None,
        nat_private_dnat_rule_id: Optional[str] = None,
        protocol: Optional[str] = None,
        region: Optional[str] = None,
        transit_ip_id: Optional[str] = None,
        transit_service_port: Optional[float] = None,
        updated_at: Optional[str] = None) -> NatPrivateDnatRule
func GetNatPrivateDnatRule(ctx *Context, name string, id IDInput, state *NatPrivateDnatRuleState, opts ...ResourceOption) (*NatPrivateDnatRule, error)
public static NatPrivateDnatRule Get(string name, Input<string> id, NatPrivateDnatRuleState? state, CustomResourceOptions? opts = null)
public static NatPrivateDnatRule get(String name, Output<String> id, NatPrivateDnatRuleState state, CustomResourceOptions options)
resources:  _:    type: flexibleengine:NatPrivateDnatRule    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
BackendInterfaceId string
Specifies the network interface ID of the transit IP for private NAT.
Exactly one of backend_interface_id and backend_private_ip must be set.
BackendPrivateIp string
Specifies the private IP address of the backend instance.
BackendType string
The type of backend instance. The valid values are as follows:

  • COMPUTE: ECS instance.
  • VIP: VIP.
  • ELB: ELB loadbalancer.
  • ELBv3: ver.3 ELB loadbalancer.
  • CUSTOMIZE: custom backend IP address.
CreatedAt string
The creation time of the DNAT rule.
Description string
Specifies the description of the DNAT rule, which contain maximum of 255 characters, and angle brackets (< and >) are not allowed.
GatewayId string
Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource.
InternalServicePort double

Specifies the port of the backend instance.

Defaults to 0 and the default port is only available for rules with the protocol any.

NatPrivateDnatRuleId string
The resource ID in UUID format.
Protocol string
Specifies the protocol type.
The valid values are tcp, udp and any. Defaults to any.
Region string
Specifies the region where the DNAT rule is located.
If omitted, the provider-level region will be used. Changing this will create a new resource.
TransitIpId string
Specifies the ID of the transit IP for private NAT.
TransitServicePort double

Specifies the port of the transit IP.

Defaults to 0 and the default port is only available for rules with the protocol any.

UpdatedAt string
The latest update time of the DNAT rule.
BackendInterfaceId string
Specifies the network interface ID of the transit IP for private NAT.
Exactly one of backend_interface_id and backend_private_ip must be set.
BackendPrivateIp string
Specifies the private IP address of the backend instance.
BackendType string
The type of backend instance. The valid values are as follows:

  • COMPUTE: ECS instance.
  • VIP: VIP.
  • ELB: ELB loadbalancer.
  • ELBv3: ver.3 ELB loadbalancer.
  • CUSTOMIZE: custom backend IP address.
CreatedAt string
The creation time of the DNAT rule.
Description string
Specifies the description of the DNAT rule, which contain maximum of 255 characters, and angle brackets (< and >) are not allowed.
GatewayId string
Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource.
InternalServicePort float64

Specifies the port of the backend instance.

Defaults to 0 and the default port is only available for rules with the protocol any.

NatPrivateDnatRuleId string
The resource ID in UUID format.
Protocol string
Specifies the protocol type.
The valid values are tcp, udp and any. Defaults to any.
Region string
Specifies the region where the DNAT rule is located.
If omitted, the provider-level region will be used. Changing this will create a new resource.
TransitIpId string
Specifies the ID of the transit IP for private NAT.
TransitServicePort float64

Specifies the port of the transit IP.

Defaults to 0 and the default port is only available for rules with the protocol any.

UpdatedAt string
The latest update time of the DNAT rule.
backendInterfaceId String
Specifies the network interface ID of the transit IP for private NAT.
Exactly one of backend_interface_id and backend_private_ip must be set.
backendPrivateIp String
Specifies the private IP address of the backend instance.
backendType String
The type of backend instance. The valid values are as follows:

  • COMPUTE: ECS instance.
  • VIP: VIP.
  • ELB: ELB loadbalancer.
  • ELBv3: ver.3 ELB loadbalancer.
  • CUSTOMIZE: custom backend IP address.
createdAt String
The creation time of the DNAT rule.
description String
Specifies the description of the DNAT rule, which contain maximum of 255 characters, and angle brackets (< and >) are not allowed.
gatewayId String
Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource.
internalServicePort Double

Specifies the port of the backend instance.

Defaults to 0 and the default port is only available for rules with the protocol any.

natPrivateDnatRuleId String
The resource ID in UUID format.
protocol String
Specifies the protocol type.
The valid values are tcp, udp and any. Defaults to any.
region String
Specifies the region where the DNAT rule is located.
If omitted, the provider-level region will be used. Changing this will create a new resource.
transitIpId String
Specifies the ID of the transit IP for private NAT.
transitServicePort Double

Specifies the port of the transit IP.

Defaults to 0 and the default port is only available for rules with the protocol any.

updatedAt String
The latest update time of the DNAT rule.
backendInterfaceId string
Specifies the network interface ID of the transit IP for private NAT.
Exactly one of backend_interface_id and backend_private_ip must be set.
backendPrivateIp string
Specifies the private IP address of the backend instance.
backendType string
The type of backend instance. The valid values are as follows:

  • COMPUTE: ECS instance.
  • VIP: VIP.
  • ELB: ELB loadbalancer.
  • ELBv3: ver.3 ELB loadbalancer.
  • CUSTOMIZE: custom backend IP address.
createdAt string
The creation time of the DNAT rule.
description string
Specifies the description of the DNAT rule, which contain maximum of 255 characters, and angle brackets (< and >) are not allowed.
gatewayId string
Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource.
internalServicePort number

Specifies the port of the backend instance.

Defaults to 0 and the default port is only available for rules with the protocol any.

natPrivateDnatRuleId string
The resource ID in UUID format.
protocol string
Specifies the protocol type.
The valid values are tcp, udp and any. Defaults to any.
region string
Specifies the region where the DNAT rule is located.
If omitted, the provider-level region will be used. Changing this will create a new resource.
transitIpId string
Specifies the ID of the transit IP for private NAT.
transitServicePort number

Specifies the port of the transit IP.

Defaults to 0 and the default port is only available for rules with the protocol any.

updatedAt string
The latest update time of the DNAT rule.
backend_interface_id str
Specifies the network interface ID of the transit IP for private NAT.
Exactly one of backend_interface_id and backend_private_ip must be set.
backend_private_ip str
Specifies the private IP address of the backend instance.
backend_type str
The type of backend instance. The valid values are as follows:

  • COMPUTE: ECS instance.
  • VIP: VIP.
  • ELB: ELB loadbalancer.
  • ELBv3: ver.3 ELB loadbalancer.
  • CUSTOMIZE: custom backend IP address.
created_at str
The creation time of the DNAT rule.
description str
Specifies the description of the DNAT rule, which contain maximum of 255 characters, and angle brackets (< and >) are not allowed.
gateway_id str
Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource.
internal_service_port float

Specifies the port of the backend instance.

Defaults to 0 and the default port is only available for rules with the protocol any.

nat_private_dnat_rule_id str
The resource ID in UUID format.
protocol str
Specifies the protocol type.
The valid values are tcp, udp and any. Defaults to any.
region str
Specifies the region where the DNAT rule is located.
If omitted, the provider-level region will be used. Changing this will create a new resource.
transit_ip_id str
Specifies the ID of the transit IP for private NAT.
transit_service_port float

Specifies the port of the transit IP.

Defaults to 0 and the default port is only available for rules with the protocol any.

updated_at str
The latest update time of the DNAT rule.
backendInterfaceId String
Specifies the network interface ID of the transit IP for private NAT.
Exactly one of backend_interface_id and backend_private_ip must be set.
backendPrivateIp String
Specifies the private IP address of the backend instance.
backendType String
The type of backend instance. The valid values are as follows:

  • COMPUTE: ECS instance.
  • VIP: VIP.
  • ELB: ELB loadbalancer.
  • ELBv3: ver.3 ELB loadbalancer.
  • CUSTOMIZE: custom backend IP address.
createdAt String
The creation time of the DNAT rule.
description String
Specifies the description of the DNAT rule, which contain maximum of 255 characters, and angle brackets (< and >) are not allowed.
gatewayId String
Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource.
internalServicePort Number

Specifies the port of the backend instance.

Defaults to 0 and the default port is only available for rules with the protocol any.

natPrivateDnatRuleId String
The resource ID in UUID format.
protocol String
Specifies the protocol type.
The valid values are tcp, udp and any. Defaults to any.
region String
Specifies the region where the DNAT rule is located.
If omitted, the provider-level region will be used. Changing this will create a new resource.
transitIpId String
Specifies the ID of the transit IP for private NAT.
transitServicePort Number

Specifies the port of the transit IP.

Defaults to 0 and the default port is only available for rules with the protocol any.

updatedAt String
The latest update time of the DNAT rule.

Import

DNAT rules can be imported using their id, e.g.

bash

$ pulumi import flexibleengine:index/natPrivateDnatRule:NatPrivateDnatRule test 19e3f4ed-fde0-406a-828d-7e0482400da9
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
License
Notes
This Pulumi package is based on the flexibleengine Terraform Provider.