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,
});
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)
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
})
}
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,
});
});
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());
}
}
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
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,
});
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)
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
})
}
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,
});
});
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());
}
}
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
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",
});
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")
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
})
}
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",
});
});
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());
}
}
configuration:
gatewayId:
type: dynamic
transitIpId:
type: dynamic
resources:
test:
type: flexibleengine:NatPrivateDnatRule
properties:
gatewayId: ${gatewayId}
protocol: any
transitIpId: ${transitIpId}
backendPrivateIp: 172.168.0.69
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 string
- The unique name of the resource.
- args NatPrivateDnatRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args NatPrivateDnatRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NatPrivateDnatRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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,
});
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),
})
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());
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)
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,
});
type: flexibleengine:NatPrivateDnatRule
properties:
backendInterfaceId: string
backendPrivateIp: string
description: string
gatewayId: string
internalServicePort: 0
natPrivateDnatRuleId: string
protocol: string
region: string
transitIpId: string
transitServicePort: 0
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:
- Gateway
Id string - Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource. - Transit
Ip stringId - Specifies the ID of the transit IP for private NAT.
- Backend
Interface stringId - Specifies the network interface ID of the transit IP for private NAT.
Exactly one ofbackend_interface_id
andbackend_private_ip
must be set. - Backend
Private stringIp - 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. - Internal
Service doublePort 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 stringDnat Rule Id - 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. - Transit
Service doublePort 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 string - Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource. - Transit
Ip stringId - Specifies the ID of the transit IP for private NAT.
- Backend
Interface stringId - Specifies the network interface ID of the transit IP for private NAT.
Exactly one ofbackend_interface_id
andbackend_private_ip
must be set. - Backend
Private stringIp - 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. - Internal
Service float64Port 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 stringDnat Rule Id - 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. - Transit
Service float64Port 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 String - Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource. - transit
Ip StringId - Specifies the ID of the transit IP for private NAT.
- backend
Interface StringId - Specifies the network interface ID of the transit IP for private NAT.
Exactly one ofbackend_interface_id
andbackend_private_ip
must be set. - backend
Private StringIp - 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. - internal
Service DoublePort 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 StringDnat Rule Id - 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. - transit
Service DoublePort 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 string - Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource. - transit
Ip stringId - Specifies the ID of the transit IP for private NAT.
- backend
Interface stringId - Specifies the network interface ID of the transit IP for private NAT.
Exactly one ofbackend_interface_id
andbackend_private_ip
must be set. - backend
Private stringIp - 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. - internal
Service numberPort 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 stringDnat Rule Id - 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. - transit
Service numberPort 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 str - Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource. - transit_
ip_ strid - Specifies the ID of the transit IP for private NAT.
- backend_
interface_ strid - Specifies the network interface ID of the transit IP for private NAT.
Exactly one ofbackend_interface_id
andbackend_private_ip
must be set. - backend_
private_ strip - 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_ floatport 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_ strdnat_ rule_ id - 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_ floatport 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 String - Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource. - transit
Ip StringId - Specifies the ID of the transit IP for private NAT.
- backend
Interface StringId - Specifies the network interface ID of the transit IP for private NAT.
Exactly one ofbackend_interface_id
andbackend_private_ip
must be set. - backend
Private StringIp - 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. - internal
Service NumberPort 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 StringDnat Rule Id - 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. - transit
Service NumberPort 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:
- Backend
Type 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.
- Created
At string - The creation time of the DNAT rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
At string - The latest update time of the DNAT rule.
- Backend
Type 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.
- Created
At string - The creation time of the DNAT rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
At string - The latest update time of the DNAT rule.
- backend
Type 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.
- created
At String - The creation time of the DNAT rule.
- id String
- The provider-assigned unique ID for this managed resource.
- updated
At String - The latest update time of the DNAT rule.
- backend
Type 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.
- created
At string - The creation time of the DNAT rule.
- id string
- The provider-assigned unique ID for this managed resource.
- updated
At 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.
- backend
Type 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.
- created
At String - The creation time of the DNAT rule.
- id String
- The provider-assigned unique ID for this managed resource.
- updated
At 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Backend
Interface stringId - Specifies the network interface ID of the transit IP for private NAT.
Exactly one ofbackend_interface_id
andbackend_private_ip
must be set. - Backend
Private stringIp - Specifies the private IP address of the backend instance.
- Backend
Type 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.
- Created
At 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. - Gateway
Id string - Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource. - Internal
Service doublePort 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 stringDnat Rule Id - 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. - Transit
Ip stringId - Specifies the ID of the transit IP for private NAT.
- Transit
Service doublePort 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 string - The latest update time of the DNAT rule.
- Backend
Interface stringId - Specifies the network interface ID of the transit IP for private NAT.
Exactly one ofbackend_interface_id
andbackend_private_ip
must be set. - Backend
Private stringIp - Specifies the private IP address of the backend instance.
- Backend
Type 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.
- Created
At 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. - Gateway
Id string - Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource. - Internal
Service float64Port 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 stringDnat Rule Id - 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. - Transit
Ip stringId - Specifies the ID of the transit IP for private NAT.
- Transit
Service float64Port 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 string - The latest update time of the DNAT rule.
- backend
Interface StringId - Specifies the network interface ID of the transit IP for private NAT.
Exactly one ofbackend_interface_id
andbackend_private_ip
must be set. - backend
Private StringIp - Specifies the private IP address of the backend instance.
- backend
Type 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.
- created
At 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. - gateway
Id String - Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource. - internal
Service DoublePort 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 StringDnat Rule Id - 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. - transit
Ip StringId - Specifies the ID of the transit IP for private NAT.
- transit
Service DoublePort 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 String - The latest update time of the DNAT rule.
- backend
Interface stringId - Specifies the network interface ID of the transit IP for private NAT.
Exactly one ofbackend_interface_id
andbackend_private_ip
must be set. - backend
Private stringIp - Specifies the private IP address of the backend instance.
- backend
Type 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.
- created
At 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. - gateway
Id string - Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource. - internal
Service numberPort 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 stringDnat Rule Id - 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. - transit
Ip stringId - Specifies the ID of the transit IP for private NAT.
- transit
Service numberPort 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 string - The latest update time of the DNAT rule.
- backend_
interface_ strid - Specifies the network interface ID of the transit IP for private NAT.
Exactly one ofbackend_interface_id
andbackend_private_ip
must be set. - backend_
private_ strip - 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_ floatport 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_ strdnat_ rule_ id - 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_ strid - Specifies the ID of the transit IP for private NAT.
- transit_
service_ floatport 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.
- backend
Interface StringId - Specifies the network interface ID of the transit IP for private NAT.
Exactly one ofbackend_interface_id
andbackend_private_ip
must be set. - backend
Private StringIp - Specifies the private IP address of the backend instance.
- backend
Type 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.
- created
At 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. - gateway
Id String - Specifies the private NAT gateway ID to which the DNAT rule belongs.
Changing this will create a new resource. - internal
Service NumberPort 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 StringDnat Rule Id - 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. - transit
Ip StringId - Specifies the ID of the transit IP for private NAT.
- transit
Service NumberPort 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 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
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.