1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. NatDnatRuleV2
opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud

opentelekomcloud.NatDnatRuleV2

Explore with Pulumi AI

Up-to-date reference of API arguments for NAT DNAT you can get at documentation portal

Manages a V2 DNAT rule resource within OpenTelekomCloud.

Example Usage

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

const config = new pulumi.Config();
const natGwId = config.requireObject("natGwId");
const floatingIpId = config.requireObject("floatingIpId");
const privateIp = config.requireObject("privateIp");
const dnat1 = new opentelekomcloud.NatDnatRuleV2("dnat1", {
    floatingIpId: floatingIpId,
    natGatewayId: natGwId,
    privateIp: _var.private_id,
    internalServicePort: 993,
    protocol: "tcp",
    externalServicePort: 242,
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

config = pulumi.Config()
nat_gw_id = config.require_object("natGwId")
floating_ip_id = config.require_object("floatingIpId")
private_ip = config.require_object("privateIp")
dnat1 = opentelekomcloud.NatDnatRuleV2("dnat1",
    floating_ip_id=floating_ip_id,
    nat_gateway_id=nat_gw_id,
    private_ip=var["private_id"],
    internal_service_port=993,
    protocol="tcp",
    external_service_port=242)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
	"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, "")
		natGwId := cfg.RequireObject("natGwId")
		floatingIpId := cfg.RequireObject("floatingIpId")
		privateIp := cfg.RequireObject("privateIp")
		_, err := opentelekomcloud.NewNatDnatRuleV2(ctx, "dnat1", &opentelekomcloud.NatDnatRuleV2Args{
			FloatingIpId:        pulumi.Any(floatingIpId),
			NatGatewayId:        pulumi.Any(natGwId),
			PrivateIp:           pulumi.Any(_var.Private_id),
			InternalServicePort: pulumi.Float64(993),
			Protocol:            pulumi.String("tcp"),
			ExternalServicePort: pulumi.Float64(242),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var natGwId = config.RequireObject<dynamic>("natGwId");
    var floatingIpId = config.RequireObject<dynamic>("floatingIpId");
    var privateIp = config.RequireObject<dynamic>("privateIp");
    var dnat1 = new Opentelekomcloud.NatDnatRuleV2("dnat1", new()
    {
        FloatingIpId = floatingIpId,
        NatGatewayId = natGwId,
        PrivateIp = @var.Private_id,
        InternalServicePort = 993,
        Protocol = "tcp",
        ExternalServicePort = 242,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.NatDnatRuleV2;
import com.pulumi.opentelekomcloud.NatDnatRuleV2Args;
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 natGwId = config.get("natGwId");
        final var floatingIpId = config.get("floatingIpId");
        final var privateIp = config.get("privateIp");
        var dnat1 = new NatDnatRuleV2("dnat1", NatDnatRuleV2Args.builder()
            .floatingIpId(floatingIpId)
            .natGatewayId(natGwId)
            .privateIp(var_.private_id())
            .internalServicePort(993)
            .protocol("tcp")
            .externalServicePort(242)
            .build());

    }
}
Copy
configuration:
  natGwId:
    type: dynamic
  floatingIpId:
    type: dynamic
  privateIp:
    type: dynamic
resources:
  dnat1:
    type: opentelekomcloud:NatDnatRuleV2
    properties:
      floatingIpId: ${floatingIpId}
      natGatewayId: ${natGwId}
      privateIp: ${var.private_id}
      internalServicePort: 993
      protocol: tcp
      externalServicePort: 242
Copy

Create NatDnatRuleV2 Resource

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

Constructor syntax

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

@overload
def NatDnatRuleV2(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  external_service_port: Optional[float] = None,
                  floating_ip_id: Optional[str] = None,
                  internal_service_port: Optional[float] = None,
                  nat_gateway_id: Optional[str] = None,
                  protocol: Optional[str] = None,
                  nat_dnat_rule_v2_id: Optional[str] = None,
                  port_id: Optional[str] = None,
                  private_ip: Optional[str] = None,
                  timeouts: Optional[NatDnatRuleV2TimeoutsArgs] = None)
func NewNatDnatRuleV2(ctx *Context, name string, args NatDnatRuleV2Args, opts ...ResourceOption) (*NatDnatRuleV2, error)
public NatDnatRuleV2(string name, NatDnatRuleV2Args args, CustomResourceOptions? opts = null)
public NatDnatRuleV2(String name, NatDnatRuleV2Args args)
public NatDnatRuleV2(String name, NatDnatRuleV2Args args, CustomResourceOptions options)
type: opentelekomcloud:NatDnatRuleV2
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. NatDnatRuleV2Args
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. NatDnatRuleV2Args
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. NatDnatRuleV2Args
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. NatDnatRuleV2Args
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. NatDnatRuleV2Args
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 natDnatRuleV2Resource = new Opentelekomcloud.NatDnatRuleV2("natDnatRuleV2Resource", new()
{
    ExternalServicePort = 0,
    FloatingIpId = "string",
    InternalServicePort = 0,
    NatGatewayId = "string",
    Protocol = "string",
    NatDnatRuleV2Id = "string",
    PortId = "string",
    PrivateIp = "string",
    Timeouts = new Opentelekomcloud.Inputs.NatDnatRuleV2TimeoutsArgs
    {
        Create = "string",
        Delete = "string",
    },
});
Copy
example, err := opentelekomcloud.NewNatDnatRuleV2(ctx, "natDnatRuleV2Resource", &opentelekomcloud.NatDnatRuleV2Args{
ExternalServicePort: pulumi.Float64(0),
FloatingIpId: pulumi.String("string"),
InternalServicePort: pulumi.Float64(0),
NatGatewayId: pulumi.String("string"),
Protocol: pulumi.String("string"),
NatDnatRuleV2Id: pulumi.String("string"),
PortId: pulumi.String("string"),
PrivateIp: pulumi.String("string"),
Timeouts: &.NatDnatRuleV2TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
})
Copy
var natDnatRuleV2Resource = new NatDnatRuleV2("natDnatRuleV2Resource", NatDnatRuleV2Args.builder()
    .externalServicePort(0)
    .floatingIpId("string")
    .internalServicePort(0)
    .natGatewayId("string")
    .protocol("string")
    .natDnatRuleV2Id("string")
    .portId("string")
    .privateIp("string")
    .timeouts(NatDnatRuleV2TimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .build())
    .build());
Copy
nat_dnat_rule_v2_resource = opentelekomcloud.NatDnatRuleV2("natDnatRuleV2Resource",
    external_service_port=0,
    floating_ip_id="string",
    internal_service_port=0,
    nat_gateway_id="string",
    protocol="string",
    nat_dnat_rule_v2_id="string",
    port_id="string",
    private_ip="string",
    timeouts={
        "create": "string",
        "delete": "string",
    })
Copy
const natDnatRuleV2Resource = new opentelekomcloud.NatDnatRuleV2("natDnatRuleV2Resource", {
    externalServicePort: 0,
    floatingIpId: "string",
    internalServicePort: 0,
    natGatewayId: "string",
    protocol: "string",
    natDnatRuleV2Id: "string",
    portId: "string",
    privateIp: "string",
    timeouts: {
        create: "string",
        "delete": "string",
    },
});
Copy
type: opentelekomcloud:NatDnatRuleV2
properties:
    externalServicePort: 0
    floatingIpId: string
    internalServicePort: 0
    natDnatRuleV2Id: string
    natGatewayId: string
    portId: string
    privateIp: string
    protocol: string
    timeouts:
        create: string
        delete: string
Copy

NatDnatRuleV2 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 NatDnatRuleV2 resource accepts the following input properties:

ExternalServicePort This property is required. double
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new DNAT rule.
FloatingIpId This property is required. string
Specifies the ID of the floating IP address. Changing this creates a new resource.
InternalServicePort This property is required. double
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new resource.
NatGatewayId This property is required. string

ID of the NAT gateway this DNAT rule belongs to. Changing this creates a new DNAT rule.

You can create a DNAT rule only when status of the NAT gateway is set to ACTIVE and admin_state_up of the NAT gateway administrator to True.

Protocol This property is required. string

Specifies the protocol type. Currently, tcp, udp, and any are supported. Changing this creates a new DNAT rule.

If you create a rule that applies to all port types, set internal_service_port to 0, external_service_port to 0, and protocol to any.

NatDnatRuleV2Id string
PortId string

Specifies the port ID of an ECS or a BMS. This parameter and private_ip are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the VPC scenario, use port_id parameter.

PrivateIp string

Specifies the private IP address of a user, for example, the IP address of a VPC for dedicated connection. This parameter and port_id are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the Direct Connect scenario, use private_ip parameter.

Timeouts NatDnatRuleV2Timeouts
ExternalServicePort This property is required. float64
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new DNAT rule.
FloatingIpId This property is required. string
Specifies the ID of the floating IP address. Changing this creates a new resource.
InternalServicePort This property is required. float64
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new resource.
NatGatewayId This property is required. string

ID of the NAT gateway this DNAT rule belongs to. Changing this creates a new DNAT rule.

You can create a DNAT rule only when status of the NAT gateway is set to ACTIVE and admin_state_up of the NAT gateway administrator to True.

Protocol This property is required. string

Specifies the protocol type. Currently, tcp, udp, and any are supported. Changing this creates a new DNAT rule.

If you create a rule that applies to all port types, set internal_service_port to 0, external_service_port to 0, and protocol to any.

NatDnatRuleV2Id string
PortId string

Specifies the port ID of an ECS or a BMS. This parameter and private_ip are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the VPC scenario, use port_id parameter.

PrivateIp string

Specifies the private IP address of a user, for example, the IP address of a VPC for dedicated connection. This parameter and port_id are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the Direct Connect scenario, use private_ip parameter.

Timeouts NatDnatRuleV2TimeoutsArgs
externalServicePort This property is required. Double
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new DNAT rule.
floatingIpId This property is required. String
Specifies the ID of the floating IP address. Changing this creates a new resource.
internalServicePort This property is required. Double
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new resource.
natGatewayId This property is required. String

ID of the NAT gateway this DNAT rule belongs to. Changing this creates a new DNAT rule.

You can create a DNAT rule only when status of the NAT gateway is set to ACTIVE and admin_state_up of the NAT gateway administrator to True.

protocol This property is required. String

Specifies the protocol type. Currently, tcp, udp, and any are supported. Changing this creates a new DNAT rule.

If you create a rule that applies to all port types, set internal_service_port to 0, external_service_port to 0, and protocol to any.

natDnatRuleV2Id String
portId String

Specifies the port ID of an ECS or a BMS. This parameter and private_ip are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the VPC scenario, use port_id parameter.

privateIp String

Specifies the private IP address of a user, for example, the IP address of a VPC for dedicated connection. This parameter and port_id are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the Direct Connect scenario, use private_ip parameter.

timeouts NatDnatRuleV2Timeouts
externalServicePort This property is required. number
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new DNAT rule.
floatingIpId This property is required. string
Specifies the ID of the floating IP address. Changing this creates a new resource.
internalServicePort This property is required. number
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new resource.
natGatewayId This property is required. string

ID of the NAT gateway this DNAT rule belongs to. Changing this creates a new DNAT rule.

You can create a DNAT rule only when status of the NAT gateway is set to ACTIVE and admin_state_up of the NAT gateway administrator to True.

protocol This property is required. string

Specifies the protocol type. Currently, tcp, udp, and any are supported. Changing this creates a new DNAT rule.

If you create a rule that applies to all port types, set internal_service_port to 0, external_service_port to 0, and protocol to any.

natDnatRuleV2Id string
portId string

Specifies the port ID of an ECS or a BMS. This parameter and private_ip are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the VPC scenario, use port_id parameter.

privateIp string

Specifies the private IP address of a user, for example, the IP address of a VPC for dedicated connection. This parameter and port_id are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the Direct Connect scenario, use private_ip parameter.

timeouts NatDnatRuleV2Timeouts
external_service_port This property is required. float
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new DNAT rule.
floating_ip_id This property is required. str
Specifies the ID of the floating IP address. Changing this creates a new resource.
internal_service_port This property is required. float
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new resource.
nat_gateway_id This property is required. str

ID of the NAT gateway this DNAT rule belongs to. Changing this creates a new DNAT rule.

You can create a DNAT rule only when status of the NAT gateway is set to ACTIVE and admin_state_up of the NAT gateway administrator to True.

protocol This property is required. str

Specifies the protocol type. Currently, tcp, udp, and any are supported. Changing this creates a new DNAT rule.

If you create a rule that applies to all port types, set internal_service_port to 0, external_service_port to 0, and protocol to any.

nat_dnat_rule_v2_id str
port_id str

Specifies the port ID of an ECS or a BMS. This parameter and private_ip are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the VPC scenario, use port_id parameter.

private_ip str

Specifies the private IP address of a user, for example, the IP address of a VPC for dedicated connection. This parameter and port_id are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the Direct Connect scenario, use private_ip parameter.

timeouts NatDnatRuleV2TimeoutsArgs
externalServicePort This property is required. Number
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new DNAT rule.
floatingIpId This property is required. String
Specifies the ID of the floating IP address. Changing this creates a new resource.
internalServicePort This property is required. Number
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new resource.
natGatewayId This property is required. String

ID of the NAT gateway this DNAT rule belongs to. Changing this creates a new DNAT rule.

You can create a DNAT rule only when status of the NAT gateway is set to ACTIVE and admin_state_up of the NAT gateway administrator to True.

protocol This property is required. String

Specifies the protocol type. Currently, tcp, udp, and any are supported. Changing this creates a new DNAT rule.

If you create a rule that applies to all port types, set internal_service_port to 0, external_service_port to 0, and protocol to any.

natDnatRuleV2Id String
portId String

Specifies the port ID of an ECS or a BMS. This parameter and private_ip are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the VPC scenario, use port_id parameter.

privateIp String

Specifies the private IP address of a user, for example, the IP address of a VPC for dedicated connection. This parameter and port_id are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the Direct Connect scenario, use private_ip parameter.

timeouts Property Map

Outputs

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

CreatedAt string
DNAT rule creation time.
FloatingIpAddress string
The actual floating IP address.
Id string
The provider-assigned unique ID for this managed resource.
Status string
DNAT rule status.
TenantId string
CreatedAt string
DNAT rule creation time.
FloatingIpAddress string
The actual floating IP address.
Id string
The provider-assigned unique ID for this managed resource.
Status string
DNAT rule status.
TenantId string
createdAt String
DNAT rule creation time.
floatingIpAddress String
The actual floating IP address.
id String
The provider-assigned unique ID for this managed resource.
status String
DNAT rule status.
tenantId String
createdAt string
DNAT rule creation time.
floatingIpAddress string
The actual floating IP address.
id string
The provider-assigned unique ID for this managed resource.
status string
DNAT rule status.
tenantId string
created_at str
DNAT rule creation time.
floating_ip_address str
The actual floating IP address.
id str
The provider-assigned unique ID for this managed resource.
status str
DNAT rule status.
tenant_id str
createdAt String
DNAT rule creation time.
floatingIpAddress String
The actual floating IP address.
id String
The provider-assigned unique ID for this managed resource.
status String
DNAT rule status.
tenantId String

Look up Existing NatDnatRuleV2 Resource

Get an existing NatDnatRuleV2 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?: NatDnatRuleV2State, opts?: CustomResourceOptions): NatDnatRuleV2
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_at: Optional[str] = None,
        external_service_port: Optional[float] = None,
        floating_ip_address: Optional[str] = None,
        floating_ip_id: Optional[str] = None,
        internal_service_port: Optional[float] = None,
        nat_dnat_rule_v2_id: Optional[str] = None,
        nat_gateway_id: Optional[str] = None,
        port_id: Optional[str] = None,
        private_ip: Optional[str] = None,
        protocol: Optional[str] = None,
        status: Optional[str] = None,
        tenant_id: Optional[str] = None,
        timeouts: Optional[NatDnatRuleV2TimeoutsArgs] = None) -> NatDnatRuleV2
func GetNatDnatRuleV2(ctx *Context, name string, id IDInput, state *NatDnatRuleV2State, opts ...ResourceOption) (*NatDnatRuleV2, error)
public static NatDnatRuleV2 Get(string name, Input<string> id, NatDnatRuleV2State? state, CustomResourceOptions? opts = null)
public static NatDnatRuleV2 get(String name, Output<String> id, NatDnatRuleV2State state, CustomResourceOptions options)
resources:  _:    type: opentelekomcloud:NatDnatRuleV2    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:
CreatedAt string
DNAT rule creation time.
ExternalServicePort double
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new DNAT rule.
FloatingIpAddress string
The actual floating IP address.
FloatingIpId string
Specifies the ID of the floating IP address. Changing this creates a new resource.
InternalServicePort double
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new resource.
NatDnatRuleV2Id string
NatGatewayId string

ID of the NAT gateway this DNAT rule belongs to. Changing this creates a new DNAT rule.

You can create a DNAT rule only when status of the NAT gateway is set to ACTIVE and admin_state_up of the NAT gateway administrator to True.

PortId string

Specifies the port ID of an ECS or a BMS. This parameter and private_ip are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the VPC scenario, use port_id parameter.

PrivateIp string

Specifies the private IP address of a user, for example, the IP address of a VPC for dedicated connection. This parameter and port_id are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the Direct Connect scenario, use private_ip parameter.

Protocol string

Specifies the protocol type. Currently, tcp, udp, and any are supported. Changing this creates a new DNAT rule.

If you create a rule that applies to all port types, set internal_service_port to 0, external_service_port to 0, and protocol to any.

Status string
DNAT rule status.
TenantId string
Timeouts NatDnatRuleV2Timeouts
CreatedAt string
DNAT rule creation time.
ExternalServicePort float64
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new DNAT rule.
FloatingIpAddress string
The actual floating IP address.
FloatingIpId string
Specifies the ID of the floating IP address. Changing this creates a new resource.
InternalServicePort float64
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new resource.
NatDnatRuleV2Id string
NatGatewayId string

ID of the NAT gateway this DNAT rule belongs to. Changing this creates a new DNAT rule.

You can create a DNAT rule only when status of the NAT gateway is set to ACTIVE and admin_state_up of the NAT gateway administrator to True.

PortId string

Specifies the port ID of an ECS or a BMS. This parameter and private_ip are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the VPC scenario, use port_id parameter.

PrivateIp string

Specifies the private IP address of a user, for example, the IP address of a VPC for dedicated connection. This parameter and port_id are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the Direct Connect scenario, use private_ip parameter.

Protocol string

Specifies the protocol type. Currently, tcp, udp, and any are supported. Changing this creates a new DNAT rule.

If you create a rule that applies to all port types, set internal_service_port to 0, external_service_port to 0, and protocol to any.

Status string
DNAT rule status.
TenantId string
Timeouts NatDnatRuleV2TimeoutsArgs
createdAt String
DNAT rule creation time.
externalServicePort Double
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new DNAT rule.
floatingIpAddress String
The actual floating IP address.
floatingIpId String
Specifies the ID of the floating IP address. Changing this creates a new resource.
internalServicePort Double
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new resource.
natDnatRuleV2Id String
natGatewayId String

ID of the NAT gateway this DNAT rule belongs to. Changing this creates a new DNAT rule.

You can create a DNAT rule only when status of the NAT gateway is set to ACTIVE and admin_state_up of the NAT gateway administrator to True.

portId String

Specifies the port ID of an ECS or a BMS. This parameter and private_ip are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the VPC scenario, use port_id parameter.

privateIp String

Specifies the private IP address of a user, for example, the IP address of a VPC for dedicated connection. This parameter and port_id are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the Direct Connect scenario, use private_ip parameter.

protocol String

Specifies the protocol type. Currently, tcp, udp, and any are supported. Changing this creates a new DNAT rule.

If you create a rule that applies to all port types, set internal_service_port to 0, external_service_port to 0, and protocol to any.

status String
DNAT rule status.
tenantId String
timeouts NatDnatRuleV2Timeouts
createdAt string
DNAT rule creation time.
externalServicePort number
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new DNAT rule.
floatingIpAddress string
The actual floating IP address.
floatingIpId string
Specifies the ID of the floating IP address. Changing this creates a new resource.
internalServicePort number
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new resource.
natDnatRuleV2Id string
natGatewayId string

ID of the NAT gateway this DNAT rule belongs to. Changing this creates a new DNAT rule.

You can create a DNAT rule only when status of the NAT gateway is set to ACTIVE and admin_state_up of the NAT gateway administrator to True.

portId string

Specifies the port ID of an ECS or a BMS. This parameter and private_ip are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the VPC scenario, use port_id parameter.

privateIp string

Specifies the private IP address of a user, for example, the IP address of a VPC for dedicated connection. This parameter and port_id are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the Direct Connect scenario, use private_ip parameter.

protocol string

Specifies the protocol type. Currently, tcp, udp, and any are supported. Changing this creates a new DNAT rule.

If you create a rule that applies to all port types, set internal_service_port to 0, external_service_port to 0, and protocol to any.

status string
DNAT rule status.
tenantId string
timeouts NatDnatRuleV2Timeouts
created_at str
DNAT rule creation time.
external_service_port float
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new DNAT rule.
floating_ip_address str
The actual floating IP address.
floating_ip_id str
Specifies the ID of the floating IP address. Changing this creates a new resource.
internal_service_port float
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new resource.
nat_dnat_rule_v2_id str
nat_gateway_id str

ID of the NAT gateway this DNAT rule belongs to. Changing this creates a new DNAT rule.

You can create a DNAT rule only when status of the NAT gateway is set to ACTIVE and admin_state_up of the NAT gateway administrator to True.

port_id str

Specifies the port ID of an ECS or a BMS. This parameter and private_ip are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the VPC scenario, use port_id parameter.

private_ip str

Specifies the private IP address of a user, for example, the IP address of a VPC for dedicated connection. This parameter and port_id are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the Direct Connect scenario, use private_ip parameter.

protocol str

Specifies the protocol type. Currently, tcp, udp, and any are supported. Changing this creates a new DNAT rule.

If you create a rule that applies to all port types, set internal_service_port to 0, external_service_port to 0, and protocol to any.

status str
DNAT rule status.
tenant_id str
timeouts NatDnatRuleV2TimeoutsArgs
createdAt String
DNAT rule creation time.
externalServicePort Number
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new DNAT rule.
floatingIpAddress String
The actual floating IP address.
floatingIpId String
Specifies the ID of the floating IP address. Changing this creates a new resource.
internalServicePort Number
Specifies port used by ECSs or BMSs to provide services for external systems. Changing this creates a new resource.
natDnatRuleV2Id String
natGatewayId String

ID of the NAT gateway this DNAT rule belongs to. Changing this creates a new DNAT rule.

You can create a DNAT rule only when status of the NAT gateway is set to ACTIVE and admin_state_up of the NAT gateway administrator to True.

portId String

Specifies the port ID of an ECS or a BMS. This parameter and private_ip are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the VPC scenario, use port_id parameter.

privateIp String

Specifies the private IP address of a user, for example, the IP address of a VPC for dedicated connection. This parameter and port_id are alternative. Changing this creates a new DNAT rule.

-> When the DNAT rule is used in the Direct Connect scenario, use private_ip parameter.

protocol String

Specifies the protocol type. Currently, tcp, udp, and any are supported. Changing this creates a new DNAT rule.

If you create a rule that applies to all port types, set internal_service_port to 0, external_service_port to 0, and protocol to any.

status String
DNAT rule status.
tenantId String
timeouts Property Map

Supporting Types

NatDnatRuleV2Timeouts
, NatDnatRuleV2TimeoutsArgs

Create string
Delete string
Create string
Delete string
create String
delete String
create string
delete string
create str
delete str
create String
delete String

Import

DNAT can be imported using the following format:

$ pulumi import opentelekomcloud:index/natDnatRuleV2:NatDnatRuleV2 dnat_1 f4f783a7-b908-4215-b018-724960e5df4a
Copy

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

Package Details

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