1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. VpcPrivateNatGatewayTranslationNatRule
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack

tencentcloud.VpcPrivateNatGatewayTranslationNatRule

Start a Neo task
Explain and create a tencentcloud.VpcPrivateNatGatewayTranslationNatRule resource
tencentcloud logo
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack

    Provides a resource to create a VPC private nat gateway translation nat rule

    NOTE: This resource must exclusive in one share unit, do not declare additional translation nat rules resources of this nat gateway elsewhere.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.VpcPrivateNatGatewayTranslationNatRule("example", {
        natGatewayId: "intranat-r46f6pxl",
        translationNatRules: [
            {
                translationDirection: "LOCAL",
                translationType: "NETWORK_LAYER",
                translationIp: "2.2.2.2",
                description: "remark.",
                originalIp: "1.1.1.1",
            },
            {
                translationDirection: "LOCAL",
                translationType: "TRANSPORT_LAYER",
                translationIp: "3.3.3.3",
                description: "remark.",
            },
        ],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.VpcPrivateNatGatewayTranslationNatRule("example",
        nat_gateway_id="intranat-r46f6pxl",
        translation_nat_rules=[
            {
                "translation_direction": "LOCAL",
                "translation_type": "NETWORK_LAYER",
                "translation_ip": "2.2.2.2",
                "description": "remark.",
                "original_ip": "1.1.1.1",
            },
            {
                "translation_direction": "LOCAL",
                "translation_type": "TRANSPORT_LAYER",
                "translation_ip": "3.3.3.3",
                "description": "remark.",
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewVpcPrivateNatGatewayTranslationNatRule(ctx, "example", &tencentcloud.VpcPrivateNatGatewayTranslationNatRuleArgs{
    			NatGatewayId: pulumi.String("intranat-r46f6pxl"),
    			TranslationNatRules: tencentcloud.VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArray{
    				&tencentcloud.VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs{
    					TranslationDirection: pulumi.String("LOCAL"),
    					TranslationType:      pulumi.String("NETWORK_LAYER"),
    					TranslationIp:        pulumi.String("2.2.2.2"),
    					Description:          pulumi.String("remark."),
    					OriginalIp:           pulumi.String("1.1.1.1"),
    				},
    				&tencentcloud.VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs{
    					TranslationDirection: pulumi.String("LOCAL"),
    					TranslationType:      pulumi.String("TRANSPORT_LAYER"),
    					TranslationIp:        pulumi.String("3.3.3.3"),
    					Description:          pulumi.String("remark."),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Tencentcloud.VpcPrivateNatGatewayTranslationNatRule("example", new()
        {
            NatGatewayId = "intranat-r46f6pxl",
            TranslationNatRules = new[]
            {
                new Tencentcloud.Inputs.VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs
                {
                    TranslationDirection = "LOCAL",
                    TranslationType = "NETWORK_LAYER",
                    TranslationIp = "2.2.2.2",
                    Description = "remark.",
                    OriginalIp = "1.1.1.1",
                },
                new Tencentcloud.Inputs.VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs
                {
                    TranslationDirection = "LOCAL",
                    TranslationType = "TRANSPORT_LAYER",
                    TranslationIp = "3.3.3.3",
                    Description = "remark.",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.VpcPrivateNatGatewayTranslationNatRule;
    import com.pulumi.tencentcloud.VpcPrivateNatGatewayTranslationNatRuleArgs;
    import com.pulumi.tencentcloud.inputs.VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new VpcPrivateNatGatewayTranslationNatRule("example", VpcPrivateNatGatewayTranslationNatRuleArgs.builder()
                .natGatewayId("intranat-r46f6pxl")
                .translationNatRules(            
                    VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs.builder()
                        .translationDirection("LOCAL")
                        .translationType("NETWORK_LAYER")
                        .translationIp("2.2.2.2")
                        .description("remark.")
                        .originalIp("1.1.1.1")
                        .build(),
                    VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs.builder()
                        .translationDirection("LOCAL")
                        .translationType("TRANSPORT_LAYER")
                        .translationIp("3.3.3.3")
                        .description("remark.")
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:VpcPrivateNatGatewayTranslationNatRule
        properties:
          natGatewayId: intranat-r46f6pxl
          translationNatRules:
            - translationDirection: LOCAL
              translationType: NETWORK_LAYER
              translationIp: 2.2.2.2
              description: remark.
              originalIp: 1.1.1.1
            - translationDirection: LOCAL
              translationType: TRANSPORT_LAYER
              translationIp: 3.3.3.3
              description: remark.
    

    Create VpcPrivateNatGatewayTranslationNatRule Resource

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

    Constructor syntax

    new VpcPrivateNatGatewayTranslationNatRule(name: string, args: VpcPrivateNatGatewayTranslationNatRuleArgs, opts?: CustomResourceOptions);
    @overload
    def VpcPrivateNatGatewayTranslationNatRule(resource_name: str,
                                               args: VpcPrivateNatGatewayTranslationNatRuleArgs,
                                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcPrivateNatGatewayTranslationNatRule(resource_name: str,
                                               opts: Optional[ResourceOptions] = None,
                                               nat_gateway_id: Optional[str] = None,
                                               translation_nat_rules: Optional[Sequence[VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs]] = None,
                                               vpc_private_nat_gateway_translation_nat_rule_id: Optional[str] = None)
    func NewVpcPrivateNatGatewayTranslationNatRule(ctx *Context, name string, args VpcPrivateNatGatewayTranslationNatRuleArgs, opts ...ResourceOption) (*VpcPrivateNatGatewayTranslationNatRule, error)
    public VpcPrivateNatGatewayTranslationNatRule(string name, VpcPrivateNatGatewayTranslationNatRuleArgs args, CustomResourceOptions? opts = null)
    public VpcPrivateNatGatewayTranslationNatRule(String name, VpcPrivateNatGatewayTranslationNatRuleArgs args)
    public VpcPrivateNatGatewayTranslationNatRule(String name, VpcPrivateNatGatewayTranslationNatRuleArgs args, CustomResourceOptions options)
    
    type: tencentcloud:VpcPrivateNatGatewayTranslationNatRule
    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 VpcPrivateNatGatewayTranslationNatRuleArgs
    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 VpcPrivateNatGatewayTranslationNatRuleArgs
    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 VpcPrivateNatGatewayTranslationNatRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcPrivateNatGatewayTranslationNatRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcPrivateNatGatewayTranslationNatRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    NatGatewayId string
    Private NAT gateway unique ID, such as: intranat-xxxxxxxx.
    TranslationNatRules List<VpcPrivateNatGatewayTranslationNatRuleTranslationNatRule>
    Translation rule object array.
    VpcPrivateNatGatewayTranslationNatRuleId string
    ID of the resource.
    NatGatewayId string
    Private NAT gateway unique ID, such as: intranat-xxxxxxxx.
    TranslationNatRules []VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs
    Translation rule object array.
    VpcPrivateNatGatewayTranslationNatRuleId string
    ID of the resource.
    natGatewayId String
    Private NAT gateway unique ID, such as: intranat-xxxxxxxx.
    translationNatRules List<VpcPrivateNatGatewayTranslationNatRuleTranslationNatRule>
    Translation rule object array.
    vpcPrivateNatGatewayTranslationNatRuleId String
    ID of the resource.
    natGatewayId string
    Private NAT gateway unique ID, such as: intranat-xxxxxxxx.
    translationNatRules VpcPrivateNatGatewayTranslationNatRuleTranslationNatRule[]
    Translation rule object array.
    vpcPrivateNatGatewayTranslationNatRuleId string
    ID of the resource.
    nat_gateway_id str
    Private NAT gateway unique ID, such as: intranat-xxxxxxxx.
    translation_nat_rules Sequence[VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs]
    Translation rule object array.
    vpc_private_nat_gateway_translation_nat_rule_id str
    ID of the resource.
    natGatewayId String
    Private NAT gateway unique ID, such as: intranat-xxxxxxxx.
    translationNatRules List<Property Map>
    Translation rule object array.
    vpcPrivateNatGatewayTranslationNatRuleId String
    ID of the resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing VpcPrivateNatGatewayTranslationNatRule Resource

    Get an existing VpcPrivateNatGatewayTranslationNatRule 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?: VpcPrivateNatGatewayTranslationNatRuleState, opts?: CustomResourceOptions): VpcPrivateNatGatewayTranslationNatRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            nat_gateway_id: Optional[str] = None,
            translation_nat_rules: Optional[Sequence[VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs]] = None,
            vpc_private_nat_gateway_translation_nat_rule_id: Optional[str] = None) -> VpcPrivateNatGatewayTranslationNatRule
    func GetVpcPrivateNatGatewayTranslationNatRule(ctx *Context, name string, id IDInput, state *VpcPrivateNatGatewayTranslationNatRuleState, opts ...ResourceOption) (*VpcPrivateNatGatewayTranslationNatRule, error)
    public static VpcPrivateNatGatewayTranslationNatRule Get(string name, Input<string> id, VpcPrivateNatGatewayTranslationNatRuleState? state, CustomResourceOptions? opts = null)
    public static VpcPrivateNatGatewayTranslationNatRule get(String name, Output<String> id, VpcPrivateNatGatewayTranslationNatRuleState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:VpcPrivateNatGatewayTranslationNatRule    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.
    The following state arguments are supported:
    NatGatewayId string
    Private NAT gateway unique ID, such as: intranat-xxxxxxxx.
    TranslationNatRules List<VpcPrivateNatGatewayTranslationNatRuleTranslationNatRule>
    Translation rule object array.
    VpcPrivateNatGatewayTranslationNatRuleId string
    ID of the resource.
    NatGatewayId string
    Private NAT gateway unique ID, such as: intranat-xxxxxxxx.
    TranslationNatRules []VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs
    Translation rule object array.
    VpcPrivateNatGatewayTranslationNatRuleId string
    ID of the resource.
    natGatewayId String
    Private NAT gateway unique ID, such as: intranat-xxxxxxxx.
    translationNatRules List<VpcPrivateNatGatewayTranslationNatRuleTranslationNatRule>
    Translation rule object array.
    vpcPrivateNatGatewayTranslationNatRuleId String
    ID of the resource.
    natGatewayId string
    Private NAT gateway unique ID, such as: intranat-xxxxxxxx.
    translationNatRules VpcPrivateNatGatewayTranslationNatRuleTranslationNatRule[]
    Translation rule object array.
    vpcPrivateNatGatewayTranslationNatRuleId string
    ID of the resource.
    nat_gateway_id str
    Private NAT gateway unique ID, such as: intranat-xxxxxxxx.
    translation_nat_rules Sequence[VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs]
    Translation rule object array.
    vpc_private_nat_gateway_translation_nat_rule_id str
    ID of the resource.
    natGatewayId String
    Private NAT gateway unique ID, such as: intranat-xxxxxxxx.
    translationNatRules List<Property Map>
    Translation rule object array.
    vpcPrivateNatGatewayTranslationNatRuleId String
    ID of the resource.

    Supporting Types

    VpcPrivateNatGatewayTranslationNatRuleTranslationNatRule, VpcPrivateNatGatewayTranslationNatRuleTranslationNatRuleArgs

    Description string
    Translation rule description.
    TranslationDirection string
    Translation rule target, optional values "LOCAL","PEER".
    TranslationIp string
    Translation IP, when translation rule type is transport layer, it is an IP pool.
    TranslationType string
    Translation rule type, optional values "NETWORK_LAYER","TRANSPORT_LAYER".
    OriginalIp string
    Source IP, valid when translation rule type is network layer.
    Description string
    Translation rule description.
    TranslationDirection string
    Translation rule target, optional values "LOCAL","PEER".
    TranslationIp string
    Translation IP, when translation rule type is transport layer, it is an IP pool.
    TranslationType string
    Translation rule type, optional values "NETWORK_LAYER","TRANSPORT_LAYER".
    OriginalIp string
    Source IP, valid when translation rule type is network layer.
    description String
    Translation rule description.
    translationDirection String
    Translation rule target, optional values "LOCAL","PEER".
    translationIp String
    Translation IP, when translation rule type is transport layer, it is an IP pool.
    translationType String
    Translation rule type, optional values "NETWORK_LAYER","TRANSPORT_LAYER".
    originalIp String
    Source IP, valid when translation rule type is network layer.
    description string
    Translation rule description.
    translationDirection string
    Translation rule target, optional values "LOCAL","PEER".
    translationIp string
    Translation IP, when translation rule type is transport layer, it is an IP pool.
    translationType string
    Translation rule type, optional values "NETWORK_LAYER","TRANSPORT_LAYER".
    originalIp string
    Source IP, valid when translation rule type is network layer.
    description str
    Translation rule description.
    translation_direction str
    Translation rule target, optional values "LOCAL","PEER".
    translation_ip str
    Translation IP, when translation rule type is transport layer, it is an IP pool.
    translation_type str
    Translation rule type, optional values "NETWORK_LAYER","TRANSPORT_LAYER".
    original_ip str
    Source IP, valid when translation rule type is network layer.
    description String
    Translation rule description.
    translationDirection String
    Translation rule target, optional values "LOCAL","PEER".
    translationIp String
    Translation IP, when translation rule type is transport layer, it is an IP pool.
    translationType String
    Translation rule type, optional values "NETWORK_LAYER","TRANSPORT_LAYER".
    originalIp String
    Source IP, valid when translation rule type is network layer.

    Import

    VPC private nat gateway translation nat rule can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/vpcPrivateNatGatewayTranslationNatRule:VpcPrivateNatGatewayTranslationNatRule example intranat-r46f6pxl
    

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

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
      Meet Neo: Your AI Platform Teammate