1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. NatGateway
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.NatGateway

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a NAT gateway.

    NOTE: If nat_product_version is 1, max_concurrent valid values is 1000000, 3000000, 10000000.

    NOTE: If set stock_public_ip_addresses_bandwidth_out, do not set the internet_max_bandwidth_out parameter of resource tencentcloud.Eip at the same time, otherwise conflicts may occur.

    Example Usage

    Create a traditional NAT gateway.

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
    const eipExample1 = new tencentcloud.Eip("eipExample1", {});
    const eipExample2 = new tencentcloud.Eip("eipExample2", {});
    const example = new tencentcloud.NatGateway("example", {
        vpcId: vpc.vpcId,
        natProductVersion: 1,
        bandwidth: 100,
        maxConcurrent: 1000000,
        assignedEipSets: [
            eipExample1.publicIp,
            eipExample2.publicIp,
        ],
        tags: {
            createBy: "terraform",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
    eip_example1 = tencentcloud.Eip("eipExample1")
    eip_example2 = tencentcloud.Eip("eipExample2")
    example = tencentcloud.NatGateway("example",
        vpc_id=vpc.vpc_id,
        nat_product_version=1,
        bandwidth=100,
        max_concurrent=1000000,
        assigned_eip_sets=[
            eip_example1.public_ip,
            eip_example2.public_ip,
        ],
        tags={
            "createBy": "terraform",
        })
    
    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 {
    		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
    			CidrBlock: pulumi.String("10.0.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		eipExample1, err := tencentcloud.NewEip(ctx, "eipExample1", nil)
    		if err != nil {
    			return err
    		}
    		eipExample2, err := tencentcloud.NewEip(ctx, "eipExample2", nil)
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewNatGateway(ctx, "example", &tencentcloud.NatGatewayArgs{
    			VpcId:             vpc.VpcId,
    			NatProductVersion: pulumi.Float64(1),
    			Bandwidth:         pulumi.Float64(100),
    			MaxConcurrent:     pulumi.Float64(1000000),
    			AssignedEipSets: pulumi.StringArray{
    				eipExample1.PublicIp,
    				eipExample2.PublicIp,
    			},
    			Tags: pulumi.StringMap{
    				"createBy": pulumi.String("terraform"),
    			},
    		})
    		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 vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "10.0.0.0/16",
        });
    
        var eipExample1 = new Tencentcloud.Eip("eipExample1");
    
        var eipExample2 = new Tencentcloud.Eip("eipExample2");
    
        var example = new Tencentcloud.NatGateway("example", new()
        {
            VpcId = vpc.VpcId,
            NatProductVersion = 1,
            Bandwidth = 100,
            MaxConcurrent = 1000000,
            AssignedEipSets = new[]
            {
                eipExample1.PublicIp,
                eipExample2.PublicIp,
            },
            Tags = 
            {
                { "createBy", "terraform" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.Vpc;
    import com.pulumi.tencentcloud.VpcArgs;
    import com.pulumi.tencentcloud.Eip;
    import com.pulumi.tencentcloud.NatGateway;
    import com.pulumi.tencentcloud.NatGatewayArgs;
    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 vpc = new Vpc("vpc", VpcArgs.builder()
                .cidrBlock("10.0.0.0/16")
                .build());
    
            var eipExample1 = new Eip("eipExample1");
    
            var eipExample2 = new Eip("eipExample2");
    
            var example = new NatGateway("example", NatGatewayArgs.builder()
                .vpcId(vpc.vpcId())
                .natProductVersion(1)
                .bandwidth(100)
                .maxConcurrent(1000000)
                .assignedEipSets(            
                    eipExample1.publicIp(),
                    eipExample2.publicIp())
                .tags(Map.of("createBy", "terraform"))
                .build());
    
        }
    }
    
    resources:
      vpc:
        type: tencentcloud:Vpc
        properties:
          cidrBlock: 10.0.0.0/16
      eipExample1:
        type: tencentcloud:Eip
      eipExample2:
        type: tencentcloud:Eip
      example:
        type: tencentcloud:NatGateway
        properties:
          vpcId: ${vpc.vpcId}
          natProductVersion: 1
          bandwidth: 100
          maxConcurrent: 1e+06
          assignedEipSets:
            - ${eipExample1.publicIp}
            - ${eipExample2.publicIp}
          tags:
            createBy: terraform
    

    Create a standard NAT gateway.

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
    const eipExample1 = new tencentcloud.Eip("eipExample1", {});
    const eipExample2 = new tencentcloud.Eip("eipExample2", {});
    const example = new tencentcloud.NatGateway("example", {
        vpcId: vpc.vpcId,
        natProductVersion: 2,
        assignedEipSets: [
            eipExample1.publicIp,
            eipExample2.publicIp,
        ],
        tags: {
            createBy: "terraform",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
    eip_example1 = tencentcloud.Eip("eipExample1")
    eip_example2 = tencentcloud.Eip("eipExample2")
    example = tencentcloud.NatGateway("example",
        vpc_id=vpc.vpc_id,
        nat_product_version=2,
        assigned_eip_sets=[
            eip_example1.public_ip,
            eip_example2.public_ip,
        ],
        tags={
            "createBy": "terraform",
        })
    
    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 {
    		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
    			CidrBlock: pulumi.String("10.0.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		eipExample1, err := tencentcloud.NewEip(ctx, "eipExample1", nil)
    		if err != nil {
    			return err
    		}
    		eipExample2, err := tencentcloud.NewEip(ctx, "eipExample2", nil)
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewNatGateway(ctx, "example", &tencentcloud.NatGatewayArgs{
    			VpcId:             vpc.VpcId,
    			NatProductVersion: pulumi.Float64(2),
    			AssignedEipSets: pulumi.StringArray{
    				eipExample1.PublicIp,
    				eipExample2.PublicIp,
    			},
    			Tags: pulumi.StringMap{
    				"createBy": pulumi.String("terraform"),
    			},
    		})
    		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 vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "10.0.0.0/16",
        });
    
        var eipExample1 = new Tencentcloud.Eip("eipExample1");
    
        var eipExample2 = new Tencentcloud.Eip("eipExample2");
    
        var example = new Tencentcloud.NatGateway("example", new()
        {
            VpcId = vpc.VpcId,
            NatProductVersion = 2,
            AssignedEipSets = new[]
            {
                eipExample1.PublicIp,
                eipExample2.PublicIp,
            },
            Tags = 
            {
                { "createBy", "terraform" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.Vpc;
    import com.pulumi.tencentcloud.VpcArgs;
    import com.pulumi.tencentcloud.Eip;
    import com.pulumi.tencentcloud.NatGateway;
    import com.pulumi.tencentcloud.NatGatewayArgs;
    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 vpc = new Vpc("vpc", VpcArgs.builder()
                .cidrBlock("10.0.0.0/16")
                .build());
    
            var eipExample1 = new Eip("eipExample1");
    
            var eipExample2 = new Eip("eipExample2");
    
            var example = new NatGateway("example", NatGatewayArgs.builder()
                .vpcId(vpc.vpcId())
                .natProductVersion(2)
                .assignedEipSets(            
                    eipExample1.publicIp(),
                    eipExample2.publicIp())
                .tags(Map.of("createBy", "terraform"))
                .build());
    
        }
    }
    
    resources:
      vpc:
        type: tencentcloud:Vpc
        properties:
          cidrBlock: 10.0.0.0/16
      eipExample1:
        type: tencentcloud:Eip
      eipExample2:
        type: tencentcloud:Eip
      example:
        type: tencentcloud:NatGateway
        properties:
          vpcId: ${vpc.vpcId}
          natProductVersion: 2
          assignedEipSets:
            - ${eipExample1.publicIp}
            - ${eipExample2.publicIp}
          tags:
            createBy: terraform
    

    Or set stock public ip addresses bandwidth out

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
    const eipExample1 = new tencentcloud.Eip("eipExample1", {});
    const eipExample2 = new tencentcloud.Eip("eipExample2", {});
    const example = new tencentcloud.NatGateway("example", {
        vpcId: vpc.vpcId,
        natProductVersion: 2,
        stockPublicIpAddressesBandwidthOut: 100,
        assignedEipSets: [
            eipExample1.publicIp,
            eipExample2.publicIp,
        ],
        tags: {
            createBy: "terraform",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
    eip_example1 = tencentcloud.Eip("eipExample1")
    eip_example2 = tencentcloud.Eip("eipExample2")
    example = tencentcloud.NatGateway("example",
        vpc_id=vpc.vpc_id,
        nat_product_version=2,
        stock_public_ip_addresses_bandwidth_out=100,
        assigned_eip_sets=[
            eip_example1.public_ip,
            eip_example2.public_ip,
        ],
        tags={
            "createBy": "terraform",
        })
    
    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 {
    		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
    			CidrBlock: pulumi.String("10.0.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		eipExample1, err := tencentcloud.NewEip(ctx, "eipExample1", nil)
    		if err != nil {
    			return err
    		}
    		eipExample2, err := tencentcloud.NewEip(ctx, "eipExample2", nil)
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewNatGateway(ctx, "example", &tencentcloud.NatGatewayArgs{
    			VpcId:                              vpc.VpcId,
    			NatProductVersion:                  pulumi.Float64(2),
    			StockPublicIpAddressesBandwidthOut: pulumi.Float64(100),
    			AssignedEipSets: pulumi.StringArray{
    				eipExample1.PublicIp,
    				eipExample2.PublicIp,
    			},
    			Tags: pulumi.StringMap{
    				"createBy": pulumi.String("terraform"),
    			},
    		})
    		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 vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "10.0.0.0/16",
        });
    
        var eipExample1 = new Tencentcloud.Eip("eipExample1");
    
        var eipExample2 = new Tencentcloud.Eip("eipExample2");
    
        var example = new Tencentcloud.NatGateway("example", new()
        {
            VpcId = vpc.VpcId,
            NatProductVersion = 2,
            StockPublicIpAddressesBandwidthOut = 100,
            AssignedEipSets = new[]
            {
                eipExample1.PublicIp,
                eipExample2.PublicIp,
            },
            Tags = 
            {
                { "createBy", "terraform" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.Vpc;
    import com.pulumi.tencentcloud.VpcArgs;
    import com.pulumi.tencentcloud.Eip;
    import com.pulumi.tencentcloud.NatGateway;
    import com.pulumi.tencentcloud.NatGatewayArgs;
    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 vpc = new Vpc("vpc", VpcArgs.builder()
                .cidrBlock("10.0.0.0/16")
                .build());
    
            var eipExample1 = new Eip("eipExample1");
    
            var eipExample2 = new Eip("eipExample2");
    
            var example = new NatGateway("example", NatGatewayArgs.builder()
                .vpcId(vpc.vpcId())
                .natProductVersion(2)
                .stockPublicIpAddressesBandwidthOut(100)
                .assignedEipSets(            
                    eipExample1.publicIp(),
                    eipExample2.publicIp())
                .tags(Map.of("createBy", "terraform"))
                .build());
    
        }
    }
    
    resources:
      vpc:
        type: tencentcloud:Vpc
        properties:
          cidrBlock: 10.0.0.0/16
      eipExample1:
        type: tencentcloud:Eip
      eipExample2:
        type: tencentcloud:Eip
      example:
        type: tencentcloud:NatGateway
        properties:
          vpcId: ${vpc.vpcId}
          natProductVersion: 2
          stockPublicIpAddressesBandwidthOut: 100
          assignedEipSets:
            - ${eipExample1.publicIp}
            - ${eipExample2.publicIp}
          tags:
            createBy: terraform
    

    Create NatGateway Resource

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

    Constructor syntax

    new NatGateway(name: string, args: NatGatewayArgs, opts?: CustomResourceOptions);
    @overload
    def NatGateway(resource_name: str,
                   args: NatGatewayArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def NatGateway(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   assigned_eip_sets: Optional[Sequence[str]] = None,
                   vpc_id: Optional[str] = None,
                   bandwidth: Optional[float] = None,
                   max_concurrent: Optional[float] = None,
                   name: Optional[str] = None,
                   nat_gateway_id: Optional[str] = None,
                   nat_product_version: Optional[float] = None,
                   stock_public_ip_addresses_bandwidth_out: Optional[float] = None,
                   subnet_id: Optional[str] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   zone: Optional[str] = None)
    func NewNatGateway(ctx *Context, name string, args NatGatewayArgs, opts ...ResourceOption) (*NatGateway, error)
    public NatGateway(string name, NatGatewayArgs args, CustomResourceOptions? opts = null)
    public NatGateway(String name, NatGatewayArgs args)
    public NatGateway(String name, NatGatewayArgs args, CustomResourceOptions options)
    
    type: tencentcloud:NatGateway
    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 NatGatewayArgs
    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 NatGatewayArgs
    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 NatGatewayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NatGatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NatGatewayArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    AssignedEipSets List<string>
    EIP IP address set bound to the gateway. The value of at least 1 and at most 10 if do not apply for a whitelist.
    VpcId string
    ID of the vpc.
    Bandwidth double
    The maximum public network output bandwidth of NAT gateway (unit: Mbps). Valid values: 20, 50, 100, 200, 500, 1000, 2000, 5000. Default is 100. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 5000.
    MaxConcurrent double
    The upper limit of concurrent connection of NAT gateway. Valid values: 1000000, 3000000, 10000000. Default is 1000000. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 2000000.
    Name string
    Name of the NAT gateway.
    NatGatewayId string
    ID of the resource.
    NatProductVersion double
    1: traditional NAT, 2: standard NAT, default value is 1.
    StockPublicIpAddressesBandwidthOut double
    The elastic public IP bandwidth value (unit: Mbps) for binding NAT gateway. When this parameter is not filled in, it defaults to the bandwidth value of the elastic public IP, and for some users, it defaults to the bandwidth limit of the elastic public IP of that user type.
    SubnetId string
    Subnet of NAT.
    Tags Dictionary<string, string>
    The available tags within this NAT gateway.
    Zone string
    The availability zone, such as ap-guangzhou-3.
    AssignedEipSets []string
    EIP IP address set bound to the gateway. The value of at least 1 and at most 10 if do not apply for a whitelist.
    VpcId string
    ID of the vpc.
    Bandwidth float64
    The maximum public network output bandwidth of NAT gateway (unit: Mbps). Valid values: 20, 50, 100, 200, 500, 1000, 2000, 5000. Default is 100. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 5000.
    MaxConcurrent float64
    The upper limit of concurrent connection of NAT gateway. Valid values: 1000000, 3000000, 10000000. Default is 1000000. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 2000000.
    Name string
    Name of the NAT gateway.
    NatGatewayId string
    ID of the resource.
    NatProductVersion float64
    1: traditional NAT, 2: standard NAT, default value is 1.
    StockPublicIpAddressesBandwidthOut float64
    The elastic public IP bandwidth value (unit: Mbps) for binding NAT gateway. When this parameter is not filled in, it defaults to the bandwidth value of the elastic public IP, and for some users, it defaults to the bandwidth limit of the elastic public IP of that user type.
    SubnetId string
    Subnet of NAT.
    Tags map[string]string
    The available tags within this NAT gateway.
    Zone string
    The availability zone, such as ap-guangzhou-3.
    assignedEipSets List<String>
    EIP IP address set bound to the gateway. The value of at least 1 and at most 10 if do not apply for a whitelist.
    vpcId String
    ID of the vpc.
    bandwidth Double
    The maximum public network output bandwidth of NAT gateway (unit: Mbps). Valid values: 20, 50, 100, 200, 500, 1000, 2000, 5000. Default is 100. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 5000.
    maxConcurrent Double
    The upper limit of concurrent connection of NAT gateway. Valid values: 1000000, 3000000, 10000000. Default is 1000000. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 2000000.
    name String
    Name of the NAT gateway.
    natGatewayId String
    ID of the resource.
    natProductVersion Double
    1: traditional NAT, 2: standard NAT, default value is 1.
    stockPublicIpAddressesBandwidthOut Double
    The elastic public IP bandwidth value (unit: Mbps) for binding NAT gateway. When this parameter is not filled in, it defaults to the bandwidth value of the elastic public IP, and for some users, it defaults to the bandwidth limit of the elastic public IP of that user type.
    subnetId String
    Subnet of NAT.
    tags Map<String,String>
    The available tags within this NAT gateway.
    zone String
    The availability zone, such as ap-guangzhou-3.
    assignedEipSets string[]
    EIP IP address set bound to the gateway. The value of at least 1 and at most 10 if do not apply for a whitelist.
    vpcId string
    ID of the vpc.
    bandwidth number
    The maximum public network output bandwidth of NAT gateway (unit: Mbps). Valid values: 20, 50, 100, 200, 500, 1000, 2000, 5000. Default is 100. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 5000.
    maxConcurrent number
    The upper limit of concurrent connection of NAT gateway. Valid values: 1000000, 3000000, 10000000. Default is 1000000. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 2000000.
    name string
    Name of the NAT gateway.
    natGatewayId string
    ID of the resource.
    natProductVersion number
    1: traditional NAT, 2: standard NAT, default value is 1.
    stockPublicIpAddressesBandwidthOut number
    The elastic public IP bandwidth value (unit: Mbps) for binding NAT gateway. When this parameter is not filled in, it defaults to the bandwidth value of the elastic public IP, and for some users, it defaults to the bandwidth limit of the elastic public IP of that user type.
    subnetId string
    Subnet of NAT.
    tags {[key: string]: string}
    The available tags within this NAT gateway.
    zone string
    The availability zone, such as ap-guangzhou-3.
    assigned_eip_sets Sequence[str]
    EIP IP address set bound to the gateway. The value of at least 1 and at most 10 if do not apply for a whitelist.
    vpc_id str
    ID of the vpc.
    bandwidth float
    The maximum public network output bandwidth of NAT gateway (unit: Mbps). Valid values: 20, 50, 100, 200, 500, 1000, 2000, 5000. Default is 100. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 5000.
    max_concurrent float
    The upper limit of concurrent connection of NAT gateway. Valid values: 1000000, 3000000, 10000000. Default is 1000000. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 2000000.
    name str
    Name of the NAT gateway.
    nat_gateway_id str
    ID of the resource.
    nat_product_version float
    1: traditional NAT, 2: standard NAT, default value is 1.
    stock_public_ip_addresses_bandwidth_out float
    The elastic public IP bandwidth value (unit: Mbps) for binding NAT gateway. When this parameter is not filled in, it defaults to the bandwidth value of the elastic public IP, and for some users, it defaults to the bandwidth limit of the elastic public IP of that user type.
    subnet_id str
    Subnet of NAT.
    tags Mapping[str, str]
    The available tags within this NAT gateway.
    zone str
    The availability zone, such as ap-guangzhou-3.
    assignedEipSets List<String>
    EIP IP address set bound to the gateway. The value of at least 1 and at most 10 if do not apply for a whitelist.
    vpcId String
    ID of the vpc.
    bandwidth Number
    The maximum public network output bandwidth of NAT gateway (unit: Mbps). Valid values: 20, 50, 100, 200, 500, 1000, 2000, 5000. Default is 100. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 5000.
    maxConcurrent Number
    The upper limit of concurrent connection of NAT gateway. Valid values: 1000000, 3000000, 10000000. Default is 1000000. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 2000000.
    name String
    Name of the NAT gateway.
    natGatewayId String
    ID of the resource.
    natProductVersion Number
    1: traditional NAT, 2: standard NAT, default value is 1.
    stockPublicIpAddressesBandwidthOut Number
    The elastic public IP bandwidth value (unit: Mbps) for binding NAT gateway. When this parameter is not filled in, it defaults to the bandwidth value of the elastic public IP, and for some users, it defaults to the bandwidth limit of the elastic public IP of that user type.
    subnetId String
    Subnet of NAT.
    tags Map<String>
    The available tags within this NAT gateway.
    zone String
    The availability zone, such as ap-guangzhou-3.

    Outputs

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

    CreatedTime string
    Create time of the NAT gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreatedTime string
    Create time of the NAT gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    createdTime String
    Create time of the NAT gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    createdTime string
    Create time of the NAT gateway.
    id string
    The provider-assigned unique ID for this managed resource.
    created_time str
    Create time of the NAT gateway.
    id str
    The provider-assigned unique ID for this managed resource.
    createdTime String
    Create time of the NAT gateway.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing NatGateway Resource

    Get an existing NatGateway 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?: NatGatewayState, opts?: CustomResourceOptions): NatGateway
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            assigned_eip_sets: Optional[Sequence[str]] = None,
            bandwidth: Optional[float] = None,
            created_time: Optional[str] = None,
            max_concurrent: Optional[float] = None,
            name: Optional[str] = None,
            nat_gateway_id: Optional[str] = None,
            nat_product_version: Optional[float] = None,
            stock_public_ip_addresses_bandwidth_out: Optional[float] = None,
            subnet_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            vpc_id: Optional[str] = None,
            zone: Optional[str] = None) -> NatGateway
    func GetNatGateway(ctx *Context, name string, id IDInput, state *NatGatewayState, opts ...ResourceOption) (*NatGateway, error)
    public static NatGateway Get(string name, Input<string> id, NatGatewayState? state, CustomResourceOptions? opts = null)
    public static NatGateway get(String name, Output<String> id, NatGatewayState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:NatGateway    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:
    AssignedEipSets List<string>
    EIP IP address set bound to the gateway. The value of at least 1 and at most 10 if do not apply for a whitelist.
    Bandwidth double
    The maximum public network output bandwidth of NAT gateway (unit: Mbps). Valid values: 20, 50, 100, 200, 500, 1000, 2000, 5000. Default is 100. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 5000.
    CreatedTime string
    Create time of the NAT gateway.
    MaxConcurrent double
    The upper limit of concurrent connection of NAT gateway. Valid values: 1000000, 3000000, 10000000. Default is 1000000. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 2000000.
    Name string
    Name of the NAT gateway.
    NatGatewayId string
    ID of the resource.
    NatProductVersion double
    1: traditional NAT, 2: standard NAT, default value is 1.
    StockPublicIpAddressesBandwidthOut double
    The elastic public IP bandwidth value (unit: Mbps) for binding NAT gateway. When this parameter is not filled in, it defaults to the bandwidth value of the elastic public IP, and for some users, it defaults to the bandwidth limit of the elastic public IP of that user type.
    SubnetId string
    Subnet of NAT.
    Tags Dictionary<string, string>
    The available tags within this NAT gateway.
    VpcId string
    ID of the vpc.
    Zone string
    The availability zone, such as ap-guangzhou-3.
    AssignedEipSets []string
    EIP IP address set bound to the gateway. The value of at least 1 and at most 10 if do not apply for a whitelist.
    Bandwidth float64
    The maximum public network output bandwidth of NAT gateway (unit: Mbps). Valid values: 20, 50, 100, 200, 500, 1000, 2000, 5000. Default is 100. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 5000.
    CreatedTime string
    Create time of the NAT gateway.
    MaxConcurrent float64
    The upper limit of concurrent connection of NAT gateway. Valid values: 1000000, 3000000, 10000000. Default is 1000000. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 2000000.
    Name string
    Name of the NAT gateway.
    NatGatewayId string
    ID of the resource.
    NatProductVersion float64
    1: traditional NAT, 2: standard NAT, default value is 1.
    StockPublicIpAddressesBandwidthOut float64
    The elastic public IP bandwidth value (unit: Mbps) for binding NAT gateway. When this parameter is not filled in, it defaults to the bandwidth value of the elastic public IP, and for some users, it defaults to the bandwidth limit of the elastic public IP of that user type.
    SubnetId string
    Subnet of NAT.
    Tags map[string]string
    The available tags within this NAT gateway.
    VpcId string
    ID of the vpc.
    Zone string
    The availability zone, such as ap-guangzhou-3.
    assignedEipSets List<String>
    EIP IP address set bound to the gateway. The value of at least 1 and at most 10 if do not apply for a whitelist.
    bandwidth Double
    The maximum public network output bandwidth of NAT gateway (unit: Mbps). Valid values: 20, 50, 100, 200, 500, 1000, 2000, 5000. Default is 100. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 5000.
    createdTime String
    Create time of the NAT gateway.
    maxConcurrent Double
    The upper limit of concurrent connection of NAT gateway. Valid values: 1000000, 3000000, 10000000. Default is 1000000. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 2000000.
    name String
    Name of the NAT gateway.
    natGatewayId String
    ID of the resource.
    natProductVersion Double
    1: traditional NAT, 2: standard NAT, default value is 1.
    stockPublicIpAddressesBandwidthOut Double
    The elastic public IP bandwidth value (unit: Mbps) for binding NAT gateway. When this parameter is not filled in, it defaults to the bandwidth value of the elastic public IP, and for some users, it defaults to the bandwidth limit of the elastic public IP of that user type.
    subnetId String
    Subnet of NAT.
    tags Map<String,String>
    The available tags within this NAT gateway.
    vpcId String
    ID of the vpc.
    zone String
    The availability zone, such as ap-guangzhou-3.
    assignedEipSets string[]
    EIP IP address set bound to the gateway. The value of at least 1 and at most 10 if do not apply for a whitelist.
    bandwidth number
    The maximum public network output bandwidth of NAT gateway (unit: Mbps). Valid values: 20, 50, 100, 200, 500, 1000, 2000, 5000. Default is 100. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 5000.
    createdTime string
    Create time of the NAT gateway.
    maxConcurrent number
    The upper limit of concurrent connection of NAT gateway. Valid values: 1000000, 3000000, 10000000. Default is 1000000. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 2000000.
    name string
    Name of the NAT gateway.
    natGatewayId string
    ID of the resource.
    natProductVersion number
    1: traditional NAT, 2: standard NAT, default value is 1.
    stockPublicIpAddressesBandwidthOut number
    The elastic public IP bandwidth value (unit: Mbps) for binding NAT gateway. When this parameter is not filled in, it defaults to the bandwidth value of the elastic public IP, and for some users, it defaults to the bandwidth limit of the elastic public IP of that user type.
    subnetId string
    Subnet of NAT.
    tags {[key: string]: string}
    The available tags within this NAT gateway.
    vpcId string
    ID of the vpc.
    zone string
    The availability zone, such as ap-guangzhou-3.
    assigned_eip_sets Sequence[str]
    EIP IP address set bound to the gateway. The value of at least 1 and at most 10 if do not apply for a whitelist.
    bandwidth float
    The maximum public network output bandwidth of NAT gateway (unit: Mbps). Valid values: 20, 50, 100, 200, 500, 1000, 2000, 5000. Default is 100. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 5000.
    created_time str
    Create time of the NAT gateway.
    max_concurrent float
    The upper limit of concurrent connection of NAT gateway. Valid values: 1000000, 3000000, 10000000. Default is 1000000. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 2000000.
    name str
    Name of the NAT gateway.
    nat_gateway_id str
    ID of the resource.
    nat_product_version float
    1: traditional NAT, 2: standard NAT, default value is 1.
    stock_public_ip_addresses_bandwidth_out float
    The elastic public IP bandwidth value (unit: Mbps) for binding NAT gateway. When this parameter is not filled in, it defaults to the bandwidth value of the elastic public IP, and for some users, it defaults to the bandwidth limit of the elastic public IP of that user type.
    subnet_id str
    Subnet of NAT.
    tags Mapping[str, str]
    The available tags within this NAT gateway.
    vpc_id str
    ID of the vpc.
    zone str
    The availability zone, such as ap-guangzhou-3.
    assignedEipSets List<String>
    EIP IP address set bound to the gateway. The value of at least 1 and at most 10 if do not apply for a whitelist.
    bandwidth Number
    The maximum public network output bandwidth of NAT gateway (unit: Mbps). Valid values: 20, 50, 100, 200, 500, 1000, 2000, 5000. Default is 100. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 5000.
    createdTime String
    Create time of the NAT gateway.
    maxConcurrent Number
    The upper limit of concurrent connection of NAT gateway. Valid values: 1000000, 3000000, 10000000. Default is 1000000. When the value of parameter nat_product_version is 2, which is the standard NAT type, this parameter does not need to be filled in and defaults to 2000000.
    name String
    Name of the NAT gateway.
    natGatewayId String
    ID of the resource.
    natProductVersion Number
    1: traditional NAT, 2: standard NAT, default value is 1.
    stockPublicIpAddressesBandwidthOut Number
    The elastic public IP bandwidth value (unit: Mbps) for binding NAT gateway. When this parameter is not filled in, it defaults to the bandwidth value of the elastic public IP, and for some users, it defaults to the bandwidth limit of the elastic public IP of that user type.
    subnetId String
    Subnet of NAT.
    tags Map<String>
    The available tags within this NAT gateway.
    vpcId String
    ID of the vpc.
    zone String
    The availability zone, such as ap-guangzhou-3.

    Import

    NAT gateway can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/natGateway:NatGateway example nat-1asg3t63
    

    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.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack