1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. vpc
  5. NatGateway
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.vpc.NatGateway

Explore with Pulumi AI

Provides a resource to create a VPC NAT Gateway.

NOTE: Resource bandwidth packages will not be supported since 00:00 on November 4, 2017, and public IP can be replaced be elastic IPs. If a Nat Gateway has already bought some bandwidth packages, it can not bind elastic IP and you have to submit the work order to solve. If you want to add public IP, you can use resource ‘alicloud_eip_association’ to bind several elastic IPs for one Nat Gateway.

NOTE: From version 1.7.1, this resource has deprecated bandwidth packages. But, in order to manage stock bandwidth packages, version 1.13.0 re-support configuring ‘bandwidth_packages’.

NOTE: When you create an enhanced NAT gateway for the first time, the system automatically creates the service-linked role AliyunServiceRoleForNatgw. Then, the system attaches the permission policy AliyunServiceRolePolicyForNatgw to the role. This allows the NAT gateway to access other resources on Alibaba Cloud. For more information, see Service-linked roles.

NOTE: After you create an enhanced Internet NAT gateway, a route entry is automatically added to the route table of the VPC. The destination CIDR block of the route entry is 0.0.0.0/0 and the next hop is the NAT gateway. This ensures that traffic is routed to the NAT gateway.

NOTE: Available since v1.37.0.

Example Usage

Basic usage

  • create enhanced nat gateway
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "tf_example";
const _default = alicloud.vpc.getEnhancedNatAvailableZones({});
const defaultNetwork = new alicloud.vpc.Network("default", {
    vpcName: name,
    cidrBlock: "10.0.0.0/8",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
    vswitchName: name,
    zoneId: _default.then(_default => _default.zones?.[0]?.zoneId),
    cidrBlock: "10.10.0.0/20",
    vpcId: defaultNetwork.id,
});
const defaultNatGateway = new alicloud.vpc.NatGateway("default", {
    vpcId: defaultNetwork.id,
    natGatewayName: name,
    paymentType: "PayAsYouGo",
    vswitchId: defaultSwitch.id,
    natType: "Enhanced",
});
Copy
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "tf_example"
default = alicloud.vpc.get_enhanced_nat_available_zones()
default_network = alicloud.vpc.Network("default",
    vpc_name=name,
    cidr_block="10.0.0.0/8")
default_switch = alicloud.vpc.Switch("default",
    vswitch_name=name,
    zone_id=default.zones[0].zone_id,
    cidr_block="10.10.0.0/20",
    vpc_id=default_network.id)
default_nat_gateway = alicloud.vpc.NatGateway("default",
    vpc_id=default_network.id,
    nat_gateway_name=name,
    payment_type="PayAsYouGo",
    vswitch_id=default_switch.id,
    nat_type="Enhanced")
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"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, "")
		name := "tf_example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		_default, err := vpc.GetEnhancedNatAvailableZones(ctx, &vpc.GetEnhancedNatAvailableZonesArgs{}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
			VpcName:   pulumi.String(name),
			CidrBlock: pulumi.String("10.0.0.0/8"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
			VswitchName: pulumi.String(name),
			ZoneId:      pulumi.String(_default.Zones[0].ZoneId),
			CidrBlock:   pulumi.String("10.10.0.0/20"),
			VpcId:       defaultNetwork.ID(),
		})
		if err != nil {
			return err
		}
		_, err = vpc.NewNatGateway(ctx, "default", &vpc.NatGatewayArgs{
			VpcId:          defaultNetwork.ID(),
			NatGatewayName: pulumi.String(name),
			PaymentType:    pulumi.String("PayAsYouGo"),
			VswitchId:      defaultSwitch.ID(),
			NatType:        pulumi.String("Enhanced"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "tf_example";
    var @default = AliCloud.Vpc.GetEnhancedNatAvailableZones.Invoke();

    var defaultNetwork = new AliCloud.Vpc.Network("default", new()
    {
        VpcName = name,
        CidrBlock = "10.0.0.0/8",
    });

    var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
    {
        VswitchName = name,
        ZoneId = @default.Apply(@default => @default.Apply(getEnhancedNatAvailableZonesResult => getEnhancedNatAvailableZonesResult.Zones[0]?.ZoneId)),
        CidrBlock = "10.10.0.0/20",
        VpcId = defaultNetwork.Id,
    });

    var defaultNatGateway = new AliCloud.Vpc.NatGateway("default", new()
    {
        VpcId = defaultNetwork.Id,
        NatGatewayName = name,
        PaymentType = "PayAsYouGo",
        VswitchId = defaultSwitch.Id,
        NatType = "Enhanced",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetEnhancedNatAvailableZonesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.vpc.NatGateway;
import com.pulumi.alicloud.vpc.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) {
        final var config = ctx.config();
        final var name = config.get("name").orElse("tf_example");
        final var default = VpcFunctions.getEnhancedNatAvailableZones();

        var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
            .vpcName(name)
            .cidrBlock("10.0.0.0/8")
            .build());

        var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
            .vswitchName(name)
            .zoneId(default_.zones()[0].zoneId())
            .cidrBlock("10.10.0.0/20")
            .vpcId(defaultNetwork.id())
            .build());

        var defaultNatGateway = new NatGateway("defaultNatGateway", NatGatewayArgs.builder()
            .vpcId(defaultNetwork.id())
            .natGatewayName(name)
            .paymentType("PayAsYouGo")
            .vswitchId(defaultSwitch.id())
            .natType("Enhanced")
            .build());

    }
}
Copy
configuration:
  name:
    type: string
    default: tf_example
resources:
  defaultNetwork:
    type: alicloud:vpc:Network
    name: default
    properties:
      vpcName: ${name}
      cidrBlock: 10.0.0.0/8
  defaultSwitch:
    type: alicloud:vpc:Switch
    name: default
    properties:
      vswitchName: ${name}
      zoneId: ${default.zones[0].zoneId}
      cidrBlock: 10.10.0.0/20
      vpcId: ${defaultNetwork.id}
  defaultNatGateway:
    type: alicloud:vpc:NatGateway
    name: default
    properties:
      vpcId: ${defaultNetwork.id}
      natGatewayName: ${name}
      paymentType: PayAsYouGo
      vswitchId: ${defaultSwitch.id}
      natType: Enhanced
variables:
  default:
    fn::invoke:
      function: alicloud:vpc:getEnhancedNatAvailableZones
      arguments: {}
Copy
  • transform nat from Normal to Enhanced

NOTE: You must set nat_type to Enhanced and set vswitch_id.

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

const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const _default = alicloud.vpc.getEnhancedNatAvailableZones({});
const defaultNetwork = new alicloud.vpc.Network("default", {
    vpcName: name,
    cidrBlock: "10.0.0.0/8",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
    vswitchName: name,
    zoneId: _default.then(_default => _default.zones?.[0]?.zoneId),
    cidrBlock: "10.10.0.0/20",
    vpcId: defaultNetwork.id,
});
const defaultNatGateway = new alicloud.vpc.NatGateway("default", {
    vpcId: defaultNetwork.id,
    natGatewayName: name,
    vswitchId: defaultSwitch.id,
    natType: "Enhanced",
});
Copy
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "tf-example"
default = alicloud.vpc.get_enhanced_nat_available_zones()
default_network = alicloud.vpc.Network("default",
    vpc_name=name,
    cidr_block="10.0.0.0/8")
default_switch = alicloud.vpc.Switch("default",
    vswitch_name=name,
    zone_id=default.zones[0].zone_id,
    cidr_block="10.10.0.0/20",
    vpc_id=default_network.id)
default_nat_gateway = alicloud.vpc.NatGateway("default",
    vpc_id=default_network.id,
    nat_gateway_name=name,
    vswitch_id=default_switch.id,
    nat_type="Enhanced")
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"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, "")
		name := "tf-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		_default, err := vpc.GetEnhancedNatAvailableZones(ctx, &vpc.GetEnhancedNatAvailableZonesArgs{}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
			VpcName:   pulumi.String(name),
			CidrBlock: pulumi.String("10.0.0.0/8"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
			VswitchName: pulumi.String(name),
			ZoneId:      pulumi.String(_default.Zones[0].ZoneId),
			CidrBlock:   pulumi.String("10.10.0.0/20"),
			VpcId:       defaultNetwork.ID(),
		})
		if err != nil {
			return err
		}
		_, err = vpc.NewNatGateway(ctx, "default", &vpc.NatGatewayArgs{
			VpcId:          defaultNetwork.ID(),
			NatGatewayName: pulumi.String(name),
			VswitchId:      defaultSwitch.ID(),
			NatType:        pulumi.String("Enhanced"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "tf-example";
    var @default = AliCloud.Vpc.GetEnhancedNatAvailableZones.Invoke();

    var defaultNetwork = new AliCloud.Vpc.Network("default", new()
    {
        VpcName = name,
        CidrBlock = "10.0.0.0/8",
    });

    var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
    {
        VswitchName = name,
        ZoneId = @default.Apply(@default => @default.Apply(getEnhancedNatAvailableZonesResult => getEnhancedNatAvailableZonesResult.Zones[0]?.ZoneId)),
        CidrBlock = "10.10.0.0/20",
        VpcId = defaultNetwork.Id,
    });

    var defaultNatGateway = new AliCloud.Vpc.NatGateway("default", new()
    {
        VpcId = defaultNetwork.Id,
        NatGatewayName = name,
        VswitchId = defaultSwitch.Id,
        NatType = "Enhanced",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetEnhancedNatAvailableZonesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.vpc.NatGateway;
import com.pulumi.alicloud.vpc.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) {
        final var config = ctx.config();
        final var name = config.get("name").orElse("tf-example");
        final var default = VpcFunctions.getEnhancedNatAvailableZones();

        var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
            .vpcName(name)
            .cidrBlock("10.0.0.0/8")
            .build());

        var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
            .vswitchName(name)
            .zoneId(default_.zones()[0].zoneId())
            .cidrBlock("10.10.0.0/20")
            .vpcId(defaultNetwork.id())
            .build());

        var defaultNatGateway = new NatGateway("defaultNatGateway", NatGatewayArgs.builder()
            .vpcId(defaultNetwork.id())
            .natGatewayName(name)
            .vswitchId(defaultSwitch.id())
            .natType("Enhanced")
            .build());

    }
}
Copy
configuration:
  name:
    type: string
    default: tf-example
resources:
  defaultNetwork:
    type: alicloud:vpc:Network
    name: default
    properties:
      vpcName: ${name}
      cidrBlock: 10.0.0.0/8
  defaultSwitch:
    type: alicloud:vpc:Switch
    name: default
    properties:
      vswitchName: ${name}
      zoneId: ${default.zones[0].zoneId}
      cidrBlock: 10.10.0.0/20
      vpcId: ${defaultNetwork.id}
  defaultNatGateway:
    type: alicloud:vpc:NatGateway
    name: default
    properties:
      vpcId: ${defaultNetwork.id}
      natGatewayName: ${name}
      vswitchId: ${defaultSwitch.id}
      natType: Enhanced
variables:
  default:
    fn::invoke:
      function: alicloud:vpc:getEnhancedNatAvailableZones
      arguments: {}
Copy

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,
               vpc_id: Optional[str] = None,
               nat_gateway_name: Optional[str] = None,
               nat_type: Optional[str] = None,
               dry_run: Optional[bool] = None,
               access_mode: Optional[NatGatewayAccessModeArgs] = None,
               force: Optional[bool] = None,
               icmp_reply_enabled: Optional[bool] = None,
               instance_charge_type: Optional[str] = None,
               internet_charge_type: Optional[str] = None,
               description: Optional[str] = None,
               name: Optional[str] = None,
               eip_bind_mode: Optional[str] = None,
               network_type: Optional[str] = None,
               payment_type: Optional[str] = None,
               period: Optional[int] = None,
               private_link_enabled: Optional[bool] = None,
               specification: Optional[str] = None,
               tags: Optional[Mapping[str, str]] = None,
               deletion_protection: Optional[bool] = None,
               vswitch_id: 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: alicloud:vpc:NatGateway
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. NatGatewayArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. NatGatewayArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. NatGatewayArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. NatGatewayArgs
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 alicloudNatGatewayResource = new AliCloud.Vpc.NatGateway("alicloudNatGatewayResource", new()
{
    VpcId = "string",
    NatGatewayName = "string",
    NatType = "string",
    DryRun = false,
    AccessMode = new AliCloud.Vpc.Inputs.NatGatewayAccessModeArgs
    {
        ModeValue = "string",
        TunnelType = "string",
    },
    Force = false,
    IcmpReplyEnabled = false,
    InternetChargeType = "string",
    Description = "string",
    EipBindMode = "string",
    NetworkType = "string",
    PaymentType = "string",
    Period = 0,
    PrivateLinkEnabled = false,
    Specification = "string",
    Tags = 
    {
        { "string", "string" },
    },
    DeletionProtection = false,
    VswitchId = "string",
});
Copy
example, err := vpc.NewNatGateway(ctx, "alicloudNatGatewayResource", &vpc.NatGatewayArgs{
	VpcId:          pulumi.String("string"),
	NatGatewayName: pulumi.String("string"),
	NatType:        pulumi.String("string"),
	DryRun:         pulumi.Bool(false),
	AccessMode: &vpc.NatGatewayAccessModeArgs{
		ModeValue:  pulumi.String("string"),
		TunnelType: pulumi.String("string"),
	},
	Force:              pulumi.Bool(false),
	IcmpReplyEnabled:   pulumi.Bool(false),
	InternetChargeType: pulumi.String("string"),
	Description:        pulumi.String("string"),
	EipBindMode:        pulumi.String("string"),
	NetworkType:        pulumi.String("string"),
	PaymentType:        pulumi.String("string"),
	Period:             pulumi.Int(0),
	PrivateLinkEnabled: pulumi.Bool(false),
	Specification:      pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	DeletionProtection: pulumi.Bool(false),
	VswitchId:          pulumi.String("string"),
})
Copy
var alicloudNatGatewayResource = new NatGateway("alicloudNatGatewayResource", NatGatewayArgs.builder()
    .vpcId("string")
    .natGatewayName("string")
    .natType("string")
    .dryRun(false)
    .accessMode(NatGatewayAccessModeArgs.builder()
        .modeValue("string")
        .tunnelType("string")
        .build())
    .force(false)
    .icmpReplyEnabled(false)
    .internetChargeType("string")
    .description("string")
    .eipBindMode("string")
    .networkType("string")
    .paymentType("string")
    .period(0)
    .privateLinkEnabled(false)
    .specification("string")
    .tags(Map.of("string", "string"))
    .deletionProtection(false)
    .vswitchId("string")
    .build());
Copy
alicloud_nat_gateway_resource = alicloud.vpc.NatGateway("alicloudNatGatewayResource",
    vpc_id="string",
    nat_gateway_name="string",
    nat_type="string",
    dry_run=False,
    access_mode={
        "mode_value": "string",
        "tunnel_type": "string",
    },
    force=False,
    icmp_reply_enabled=False,
    internet_charge_type="string",
    description="string",
    eip_bind_mode="string",
    network_type="string",
    payment_type="string",
    period=0,
    private_link_enabled=False,
    specification="string",
    tags={
        "string": "string",
    },
    deletion_protection=False,
    vswitch_id="string")
Copy
const alicloudNatGatewayResource = new alicloud.vpc.NatGateway("alicloudNatGatewayResource", {
    vpcId: "string",
    natGatewayName: "string",
    natType: "string",
    dryRun: false,
    accessMode: {
        modeValue: "string",
        tunnelType: "string",
    },
    force: false,
    icmpReplyEnabled: false,
    internetChargeType: "string",
    description: "string",
    eipBindMode: "string",
    networkType: "string",
    paymentType: "string",
    period: 0,
    privateLinkEnabled: false,
    specification: "string",
    tags: {
        string: "string",
    },
    deletionProtection: false,
    vswitchId: "string",
});
Copy
type: alicloud:vpc:NatGateway
properties:
    accessMode:
        modeValue: string
        tunnelType: string
    deletionProtection: false
    description: string
    dryRun: false
    eipBindMode: string
    force: false
    icmpReplyEnabled: false
    internetChargeType: string
    natGatewayName: string
    natType: string
    networkType: string
    paymentType: string
    period: 0
    privateLinkEnabled: false
    specification: string
    tags:
        string: string
    vpcId: string
    vswitchId: string
Copy

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:

VpcId
This property is required.
Changes to this property will trigger replacement.
string
The VPC ID.
AccessMode Changes to this property will trigger replacement. Pulumi.AliCloud.Vpc.Inputs.NatGatewayAccessMode
The access mode for reverse access to the VPC NAT gateway. See access_mode below.
DeletionProtection bool
Whether enable the deletion protection or not. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
Description string
Description of the nat gateway, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Defaults to null.
DryRun bool
Specifies whether to only precheck this request. Default value: false.
EipBindMode string
The EIP binding mode of the NAT gateway. Default value: MULTI_BINDED. Valid values:

  • MULTI_BINDED: Multi EIP network card visible mode.
  • NAT: EIP normal mode, compatible with IPv4 gateway.
Force bool
Specifies whether to forcefully delete the NAT gateway.
IcmpReplyEnabled bool
Specifies whether to enable ICMP retrieval. Default value: true. Valid values:
InstanceChargeType Changes to this property will trigger replacement. string
Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

Deprecated: Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

InternetChargeType Changes to this property will trigger replacement. string
The internet charge type. Valid values PayByLcu. The PayByLcu is only support enhanced NAT. NOTE: From version 1.137.0, internet_charge_type cannot be set to PayBySpec.
Name string
Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

Deprecated: Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

NatGatewayName string
Name of the nat gateway. The value can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Defaults to null.
NatType string
The type of NAT gateway. Valid values: Enhanced. NOTE: From version 1.137.0, nat_type cannot be set to Normal.
NetworkType string
Indicates the type of the created NAT gateway. Valid values internet and intranet. internet: Internet NAT Gateway. intranet: VPC NAT Gateway.
PaymentType Changes to this property will trigger replacement. string
The billing method of the NAT gateway. Valid values are PayAsYouGo. Default to PayAsYouGo.
Period int

The duration that you will buy the resource, in month. It is valid when payment_type is Subscription. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console. NOTE: International station only supports Subscription.

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

PrivateLinkEnabled Changes to this property will trigger replacement. bool
Specifies whether to enable PrivateLink. Default value: false. Valid values:
Specification string
The specification of the nat gateway. Valid values are Small, Middle and Large. Effective when internet_charge_type is PayBySpec and network_type is internet. Details refer to Nat Gateway Specification.
Tags Dictionary<string, string>
The tags of NAT gateway.
VswitchId string
The id of VSwitch.
VpcId
This property is required.
Changes to this property will trigger replacement.
string
The VPC ID.
AccessMode Changes to this property will trigger replacement. NatGatewayAccessModeArgs
The access mode for reverse access to the VPC NAT gateway. See access_mode below.
DeletionProtection bool
Whether enable the deletion protection or not. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
Description string
Description of the nat gateway, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Defaults to null.
DryRun bool
Specifies whether to only precheck this request. Default value: false.
EipBindMode string
The EIP binding mode of the NAT gateway. Default value: MULTI_BINDED. Valid values:

  • MULTI_BINDED: Multi EIP network card visible mode.
  • NAT: EIP normal mode, compatible with IPv4 gateway.
Force bool
Specifies whether to forcefully delete the NAT gateway.
IcmpReplyEnabled bool
Specifies whether to enable ICMP retrieval. Default value: true. Valid values:
InstanceChargeType Changes to this property will trigger replacement. string
Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

Deprecated: Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

InternetChargeType Changes to this property will trigger replacement. string
The internet charge type. Valid values PayByLcu. The PayByLcu is only support enhanced NAT. NOTE: From version 1.137.0, internet_charge_type cannot be set to PayBySpec.
Name string
Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

Deprecated: Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

NatGatewayName string
Name of the nat gateway. The value can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Defaults to null.
NatType string
The type of NAT gateway. Valid values: Enhanced. NOTE: From version 1.137.0, nat_type cannot be set to Normal.
NetworkType string
Indicates the type of the created NAT gateway. Valid values internet and intranet. internet: Internet NAT Gateway. intranet: VPC NAT Gateway.
PaymentType Changes to this property will trigger replacement. string
The billing method of the NAT gateway. Valid values are PayAsYouGo. Default to PayAsYouGo.
Period int

The duration that you will buy the resource, in month. It is valid when payment_type is Subscription. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console. NOTE: International station only supports Subscription.

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

PrivateLinkEnabled Changes to this property will trigger replacement. bool
Specifies whether to enable PrivateLink. Default value: false. Valid values:
Specification string
The specification of the nat gateway. Valid values are Small, Middle and Large. Effective when internet_charge_type is PayBySpec and network_type is internet. Details refer to Nat Gateway Specification.
Tags map[string]string
The tags of NAT gateway.
VswitchId string
The id of VSwitch.
vpcId
This property is required.
Changes to this property will trigger replacement.
String
The VPC ID.
accessMode Changes to this property will trigger replacement. NatGatewayAccessMode
The access mode for reverse access to the VPC NAT gateway. See access_mode below.
deletionProtection Boolean
Whether enable the deletion protection or not. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
description String
Description of the nat gateway, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Defaults to null.
dryRun Boolean
Specifies whether to only precheck this request. Default value: false.
eipBindMode String
The EIP binding mode of the NAT gateway. Default value: MULTI_BINDED. Valid values:

  • MULTI_BINDED: Multi EIP network card visible mode.
  • NAT: EIP normal mode, compatible with IPv4 gateway.
force Boolean
Specifies whether to forcefully delete the NAT gateway.
icmpReplyEnabled Boolean
Specifies whether to enable ICMP retrieval. Default value: true. Valid values:
instanceChargeType Changes to this property will trigger replacement. String
Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

Deprecated: Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

internetChargeType Changes to this property will trigger replacement. String
The internet charge type. Valid values PayByLcu. The PayByLcu is only support enhanced NAT. NOTE: From version 1.137.0, internet_charge_type cannot be set to PayBySpec.
name String
Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

Deprecated: Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

natGatewayName String
Name of the nat gateway. The value can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Defaults to null.
natType String
The type of NAT gateway. Valid values: Enhanced. NOTE: From version 1.137.0, nat_type cannot be set to Normal.
networkType String
Indicates the type of the created NAT gateway. Valid values internet and intranet. internet: Internet NAT Gateway. intranet: VPC NAT Gateway.
paymentType Changes to this property will trigger replacement. String
The billing method of the NAT gateway. Valid values are PayAsYouGo. Default to PayAsYouGo.
period Integer

The duration that you will buy the resource, in month. It is valid when payment_type is Subscription. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console. NOTE: International station only supports Subscription.

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

privateLinkEnabled Changes to this property will trigger replacement. Boolean
Specifies whether to enable PrivateLink. Default value: false. Valid values:
specification String
The specification of the nat gateway. Valid values are Small, Middle and Large. Effective when internet_charge_type is PayBySpec and network_type is internet. Details refer to Nat Gateway Specification.
tags Map<String,String>
The tags of NAT gateway.
vswitchId String
The id of VSwitch.
vpcId
This property is required.
Changes to this property will trigger replacement.
string
The VPC ID.
accessMode Changes to this property will trigger replacement. NatGatewayAccessMode
The access mode for reverse access to the VPC NAT gateway. See access_mode below.
deletionProtection boolean
Whether enable the deletion protection or not. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
description string
Description of the nat gateway, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Defaults to null.
dryRun boolean
Specifies whether to only precheck this request. Default value: false.
eipBindMode string
The EIP binding mode of the NAT gateway. Default value: MULTI_BINDED. Valid values:

  • MULTI_BINDED: Multi EIP network card visible mode.
  • NAT: EIP normal mode, compatible with IPv4 gateway.
force boolean
Specifies whether to forcefully delete the NAT gateway.
icmpReplyEnabled boolean
Specifies whether to enable ICMP retrieval. Default value: true. Valid values:
instanceChargeType Changes to this property will trigger replacement. string
Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

Deprecated: Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

internetChargeType Changes to this property will trigger replacement. string
The internet charge type. Valid values PayByLcu. The PayByLcu is only support enhanced NAT. NOTE: From version 1.137.0, internet_charge_type cannot be set to PayBySpec.
name string
Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

Deprecated: Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

natGatewayName string
Name of the nat gateway. The value can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Defaults to null.
natType string
The type of NAT gateway. Valid values: Enhanced. NOTE: From version 1.137.0, nat_type cannot be set to Normal.
networkType string
Indicates the type of the created NAT gateway. Valid values internet and intranet. internet: Internet NAT Gateway. intranet: VPC NAT Gateway.
paymentType Changes to this property will trigger replacement. string
The billing method of the NAT gateway. Valid values are PayAsYouGo. Default to PayAsYouGo.
period number

The duration that you will buy the resource, in month. It is valid when payment_type is Subscription. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console. NOTE: International station only supports Subscription.

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

privateLinkEnabled Changes to this property will trigger replacement. boolean
Specifies whether to enable PrivateLink. Default value: false. Valid values:
specification string
The specification of the nat gateway. Valid values are Small, Middle and Large. Effective when internet_charge_type is PayBySpec and network_type is internet. Details refer to Nat Gateway Specification.
tags {[key: string]: string}
The tags of NAT gateway.
vswitchId string
The id of VSwitch.
vpc_id
This property is required.
Changes to this property will trigger replacement.
str
The VPC ID.
access_mode Changes to this property will trigger replacement. NatGatewayAccessModeArgs
The access mode for reverse access to the VPC NAT gateway. See access_mode below.
deletion_protection bool
Whether enable the deletion protection or not. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
description str
Description of the nat gateway, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Defaults to null.
dry_run bool
Specifies whether to only precheck this request. Default value: false.
eip_bind_mode str
The EIP binding mode of the NAT gateway. Default value: MULTI_BINDED. Valid values:

  • MULTI_BINDED: Multi EIP network card visible mode.
  • NAT: EIP normal mode, compatible with IPv4 gateway.
force bool
Specifies whether to forcefully delete the NAT gateway.
icmp_reply_enabled bool
Specifies whether to enable ICMP retrieval. Default value: true. Valid values:
instance_charge_type Changes to this property will trigger replacement. str
Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

Deprecated: Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

internet_charge_type Changes to this property will trigger replacement. str
The internet charge type. Valid values PayByLcu. The PayByLcu is only support enhanced NAT. NOTE: From version 1.137.0, internet_charge_type cannot be set to PayBySpec.
name str
Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

Deprecated: Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

nat_gateway_name str
Name of the nat gateway. The value can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Defaults to null.
nat_type str
The type of NAT gateway. Valid values: Enhanced. NOTE: From version 1.137.0, nat_type cannot be set to Normal.
network_type str
Indicates the type of the created NAT gateway. Valid values internet and intranet. internet: Internet NAT Gateway. intranet: VPC NAT Gateway.
payment_type Changes to this property will trigger replacement. str
The billing method of the NAT gateway. Valid values are PayAsYouGo. Default to PayAsYouGo.
period int

The duration that you will buy the resource, in month. It is valid when payment_type is Subscription. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console. NOTE: International station only supports Subscription.

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

private_link_enabled Changes to this property will trigger replacement. bool
Specifies whether to enable PrivateLink. Default value: false. Valid values:
specification str
The specification of the nat gateway. Valid values are Small, Middle and Large. Effective when internet_charge_type is PayBySpec and network_type is internet. Details refer to Nat Gateway Specification.
tags Mapping[str, str]
The tags of NAT gateway.
vswitch_id str
The id of VSwitch.
vpcId
This property is required.
Changes to this property will trigger replacement.
String
The VPC ID.
accessMode Changes to this property will trigger replacement. Property Map
The access mode for reverse access to the VPC NAT gateway. See access_mode below.
deletionProtection Boolean
Whether enable the deletion protection or not. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
description String
Description of the nat gateway, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Defaults to null.
dryRun Boolean
Specifies whether to only precheck this request. Default value: false.
eipBindMode String
The EIP binding mode of the NAT gateway. Default value: MULTI_BINDED. Valid values:

  • MULTI_BINDED: Multi EIP network card visible mode.
  • NAT: EIP normal mode, compatible with IPv4 gateway.
force Boolean
Specifies whether to forcefully delete the NAT gateway.
icmpReplyEnabled Boolean
Specifies whether to enable ICMP retrieval. Default value: true. Valid values:
instanceChargeType Changes to this property will trigger replacement. String
Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

Deprecated: Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

internetChargeType Changes to this property will trigger replacement. String
The internet charge type. Valid values PayByLcu. The PayByLcu is only support enhanced NAT. NOTE: From version 1.137.0, internet_charge_type cannot be set to PayBySpec.
name String
Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

Deprecated: Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

natGatewayName String
Name of the nat gateway. The value can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Defaults to null.
natType String
The type of NAT gateway. Valid values: Enhanced. NOTE: From version 1.137.0, nat_type cannot be set to Normal.
networkType String
Indicates the type of the created NAT gateway. Valid values internet and intranet. internet: Internet NAT Gateway. intranet: VPC NAT Gateway.
paymentType Changes to this property will trigger replacement. String
The billing method of the NAT gateway. Valid values are PayAsYouGo. Default to PayAsYouGo.
period Number

The duration that you will buy the resource, in month. It is valid when payment_type is Subscription. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console. NOTE: International station only supports Subscription.

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

privateLinkEnabled Changes to this property will trigger replacement. Boolean
Specifies whether to enable PrivateLink. Default value: false. Valid values:
specification String
The specification of the nat gateway. Valid values are Small, Middle and Large. Effective when internet_charge_type is PayBySpec and network_type is internet. Details refer to Nat Gateway Specification.
tags Map<String>
The tags of NAT gateway.
vswitchId String
The id of VSwitch.

Outputs

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

ForwardTableIds string
The nat gateway will auto create a forward item.
Id string
The provider-assigned unique ID for this managed resource.
SnatTableIds string
The nat gateway will auto create a snat item.
Status string
(Available since v1.121.0) The status of NAT gateway.
ForwardTableIds string
The nat gateway will auto create a forward item.
Id string
The provider-assigned unique ID for this managed resource.
SnatTableIds string
The nat gateway will auto create a snat item.
Status string
(Available since v1.121.0) The status of NAT gateway.
forwardTableIds String
The nat gateway will auto create a forward item.
id String
The provider-assigned unique ID for this managed resource.
snatTableIds String
The nat gateway will auto create a snat item.
status String
(Available since v1.121.0) The status of NAT gateway.
forwardTableIds string
The nat gateway will auto create a forward item.
id string
The provider-assigned unique ID for this managed resource.
snatTableIds string
The nat gateway will auto create a snat item.
status string
(Available since v1.121.0) The status of NAT gateway.
forward_table_ids str
The nat gateway will auto create a forward item.
id str
The provider-assigned unique ID for this managed resource.
snat_table_ids str
The nat gateway will auto create a snat item.
status str
(Available since v1.121.0) The status of NAT gateway.
forwardTableIds String
The nat gateway will auto create a forward item.
id String
The provider-assigned unique ID for this managed resource.
snatTableIds String
The nat gateway will auto create a snat item.
status String
(Available since v1.121.0) The status of NAT gateway.

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,
        access_mode: Optional[NatGatewayAccessModeArgs] = None,
        deletion_protection: Optional[bool] = None,
        description: Optional[str] = None,
        dry_run: Optional[bool] = None,
        eip_bind_mode: Optional[str] = None,
        force: Optional[bool] = None,
        forward_table_ids: Optional[str] = None,
        icmp_reply_enabled: Optional[bool] = None,
        instance_charge_type: Optional[str] = None,
        internet_charge_type: Optional[str] = None,
        name: Optional[str] = None,
        nat_gateway_name: Optional[str] = None,
        nat_type: Optional[str] = None,
        network_type: Optional[str] = None,
        payment_type: Optional[str] = None,
        period: Optional[int] = None,
        private_link_enabled: Optional[bool] = None,
        snat_table_ids: Optional[str] = None,
        specification: Optional[str] = None,
        status: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        vpc_id: Optional[str] = None,
        vswitch_id: 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: alicloud:vpc:NatGateway    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AccessMode Changes to this property will trigger replacement. Pulumi.AliCloud.Vpc.Inputs.NatGatewayAccessMode
The access mode for reverse access to the VPC NAT gateway. See access_mode below.
DeletionProtection bool
Whether enable the deletion protection or not. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
Description string
Description of the nat gateway, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Defaults to null.
DryRun bool
Specifies whether to only precheck this request. Default value: false.
EipBindMode string
The EIP binding mode of the NAT gateway. Default value: MULTI_BINDED. Valid values:

  • MULTI_BINDED: Multi EIP network card visible mode.
  • NAT: EIP normal mode, compatible with IPv4 gateway.
Force bool
Specifies whether to forcefully delete the NAT gateway.
ForwardTableIds string
The nat gateway will auto create a forward item.
IcmpReplyEnabled bool
Specifies whether to enable ICMP retrieval. Default value: true. Valid values:
InstanceChargeType Changes to this property will trigger replacement. string
Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

Deprecated: Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

InternetChargeType Changes to this property will trigger replacement. string
The internet charge type. Valid values PayByLcu. The PayByLcu is only support enhanced NAT. NOTE: From version 1.137.0, internet_charge_type cannot be set to PayBySpec.
Name string
Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

Deprecated: Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

NatGatewayName string
Name of the nat gateway. The value can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Defaults to null.
NatType string
The type of NAT gateway. Valid values: Enhanced. NOTE: From version 1.137.0, nat_type cannot be set to Normal.
NetworkType string
Indicates the type of the created NAT gateway. Valid values internet and intranet. internet: Internet NAT Gateway. intranet: VPC NAT Gateway.
PaymentType Changes to this property will trigger replacement. string
The billing method of the NAT gateway. Valid values are PayAsYouGo. Default to PayAsYouGo.
Period int

The duration that you will buy the resource, in month. It is valid when payment_type is Subscription. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console. NOTE: International station only supports Subscription.

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

PrivateLinkEnabled Changes to this property will trigger replacement. bool
Specifies whether to enable PrivateLink. Default value: false. Valid values:
SnatTableIds string
The nat gateway will auto create a snat item.
Specification string
The specification of the nat gateway. Valid values are Small, Middle and Large. Effective when internet_charge_type is PayBySpec and network_type is internet. Details refer to Nat Gateway Specification.
Status string
(Available since v1.121.0) The status of NAT gateway.
Tags Dictionary<string, string>
The tags of NAT gateway.
VpcId Changes to this property will trigger replacement. string
The VPC ID.
VswitchId string
The id of VSwitch.
AccessMode Changes to this property will trigger replacement. NatGatewayAccessModeArgs
The access mode for reverse access to the VPC NAT gateway. See access_mode below.
DeletionProtection bool
Whether enable the deletion protection or not. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
Description string
Description of the nat gateway, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Defaults to null.
DryRun bool
Specifies whether to only precheck this request. Default value: false.
EipBindMode string
The EIP binding mode of the NAT gateway. Default value: MULTI_BINDED. Valid values:

  • MULTI_BINDED: Multi EIP network card visible mode.
  • NAT: EIP normal mode, compatible with IPv4 gateway.
Force bool
Specifies whether to forcefully delete the NAT gateway.
ForwardTableIds string
The nat gateway will auto create a forward item.
IcmpReplyEnabled bool
Specifies whether to enable ICMP retrieval. Default value: true. Valid values:
InstanceChargeType Changes to this property will trigger replacement. string
Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

Deprecated: Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

InternetChargeType Changes to this property will trigger replacement. string
The internet charge type. Valid values PayByLcu. The PayByLcu is only support enhanced NAT. NOTE: From version 1.137.0, internet_charge_type cannot be set to PayBySpec.
Name string
Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

Deprecated: Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

NatGatewayName string
Name of the nat gateway. The value can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Defaults to null.
NatType string
The type of NAT gateway. Valid values: Enhanced. NOTE: From version 1.137.0, nat_type cannot be set to Normal.
NetworkType string
Indicates the type of the created NAT gateway. Valid values internet and intranet. internet: Internet NAT Gateway. intranet: VPC NAT Gateway.
PaymentType Changes to this property will trigger replacement. string
The billing method of the NAT gateway. Valid values are PayAsYouGo. Default to PayAsYouGo.
Period int

The duration that you will buy the resource, in month. It is valid when payment_type is Subscription. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console. NOTE: International station only supports Subscription.

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

PrivateLinkEnabled Changes to this property will trigger replacement. bool
Specifies whether to enable PrivateLink. Default value: false. Valid values:
SnatTableIds string
The nat gateway will auto create a snat item.
Specification string
The specification of the nat gateway. Valid values are Small, Middle and Large. Effective when internet_charge_type is PayBySpec and network_type is internet. Details refer to Nat Gateway Specification.
Status string
(Available since v1.121.0) The status of NAT gateway.
Tags map[string]string
The tags of NAT gateway.
VpcId Changes to this property will trigger replacement. string
The VPC ID.
VswitchId string
The id of VSwitch.
accessMode Changes to this property will trigger replacement. NatGatewayAccessMode
The access mode for reverse access to the VPC NAT gateway. See access_mode below.
deletionProtection Boolean
Whether enable the deletion protection or not. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
description String
Description of the nat gateway, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Defaults to null.
dryRun Boolean
Specifies whether to only precheck this request. Default value: false.
eipBindMode String
The EIP binding mode of the NAT gateway. Default value: MULTI_BINDED. Valid values:

  • MULTI_BINDED: Multi EIP network card visible mode.
  • NAT: EIP normal mode, compatible with IPv4 gateway.
force Boolean
Specifies whether to forcefully delete the NAT gateway.
forwardTableIds String
The nat gateway will auto create a forward item.
icmpReplyEnabled Boolean
Specifies whether to enable ICMP retrieval. Default value: true. Valid values:
instanceChargeType Changes to this property will trigger replacement. String
Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

Deprecated: Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

internetChargeType Changes to this property will trigger replacement. String
The internet charge type. Valid values PayByLcu. The PayByLcu is only support enhanced NAT. NOTE: From version 1.137.0, internet_charge_type cannot be set to PayBySpec.
name String
Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

Deprecated: Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

natGatewayName String
Name of the nat gateway. The value can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Defaults to null.
natType String
The type of NAT gateway. Valid values: Enhanced. NOTE: From version 1.137.0, nat_type cannot be set to Normal.
networkType String
Indicates the type of the created NAT gateway. Valid values internet and intranet. internet: Internet NAT Gateway. intranet: VPC NAT Gateway.
paymentType Changes to this property will trigger replacement. String
The billing method of the NAT gateway. Valid values are PayAsYouGo. Default to PayAsYouGo.
period Integer

The duration that you will buy the resource, in month. It is valid when payment_type is Subscription. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console. NOTE: International station only supports Subscription.

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

privateLinkEnabled Changes to this property will trigger replacement. Boolean
Specifies whether to enable PrivateLink. Default value: false. Valid values:
snatTableIds String
The nat gateway will auto create a snat item.
specification String
The specification of the nat gateway. Valid values are Small, Middle and Large. Effective when internet_charge_type is PayBySpec and network_type is internet. Details refer to Nat Gateway Specification.
status String
(Available since v1.121.0) The status of NAT gateway.
tags Map<String,String>
The tags of NAT gateway.
vpcId Changes to this property will trigger replacement. String
The VPC ID.
vswitchId String
The id of VSwitch.
accessMode Changes to this property will trigger replacement. NatGatewayAccessMode
The access mode for reverse access to the VPC NAT gateway. See access_mode below.
deletionProtection boolean
Whether enable the deletion protection or not. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
description string
Description of the nat gateway, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Defaults to null.
dryRun boolean
Specifies whether to only precheck this request. Default value: false.
eipBindMode string
The EIP binding mode of the NAT gateway. Default value: MULTI_BINDED. Valid values:

  • MULTI_BINDED: Multi EIP network card visible mode.
  • NAT: EIP normal mode, compatible with IPv4 gateway.
force boolean
Specifies whether to forcefully delete the NAT gateway.
forwardTableIds string
The nat gateway will auto create a forward item.
icmpReplyEnabled boolean
Specifies whether to enable ICMP retrieval. Default value: true. Valid values:
instanceChargeType Changes to this property will trigger replacement. string
Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

Deprecated: Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

internetChargeType Changes to this property will trigger replacement. string
The internet charge type. Valid values PayByLcu. The PayByLcu is only support enhanced NAT. NOTE: From version 1.137.0, internet_charge_type cannot be set to PayBySpec.
name string
Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

Deprecated: Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

natGatewayName string
Name of the nat gateway. The value can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Defaults to null.
natType string
The type of NAT gateway. Valid values: Enhanced. NOTE: From version 1.137.0, nat_type cannot be set to Normal.
networkType string
Indicates the type of the created NAT gateway. Valid values internet and intranet. internet: Internet NAT Gateway. intranet: VPC NAT Gateway.
paymentType Changes to this property will trigger replacement. string
The billing method of the NAT gateway. Valid values are PayAsYouGo. Default to PayAsYouGo.
period number

The duration that you will buy the resource, in month. It is valid when payment_type is Subscription. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console. NOTE: International station only supports Subscription.

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

privateLinkEnabled Changes to this property will trigger replacement. boolean
Specifies whether to enable PrivateLink. Default value: false. Valid values:
snatTableIds string
The nat gateway will auto create a snat item.
specification string
The specification of the nat gateway. Valid values are Small, Middle and Large. Effective when internet_charge_type is PayBySpec and network_type is internet. Details refer to Nat Gateway Specification.
status string
(Available since v1.121.0) The status of NAT gateway.
tags {[key: string]: string}
The tags of NAT gateway.
vpcId Changes to this property will trigger replacement. string
The VPC ID.
vswitchId string
The id of VSwitch.
access_mode Changes to this property will trigger replacement. NatGatewayAccessModeArgs
The access mode for reverse access to the VPC NAT gateway. See access_mode below.
deletion_protection bool
Whether enable the deletion protection or not. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
description str
Description of the nat gateway, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Defaults to null.
dry_run bool
Specifies whether to only precheck this request. Default value: false.
eip_bind_mode str
The EIP binding mode of the NAT gateway. Default value: MULTI_BINDED. Valid values:

  • MULTI_BINDED: Multi EIP network card visible mode.
  • NAT: EIP normal mode, compatible with IPv4 gateway.
force bool
Specifies whether to forcefully delete the NAT gateway.
forward_table_ids str
The nat gateway will auto create a forward item.
icmp_reply_enabled bool
Specifies whether to enable ICMP retrieval. Default value: true. Valid values:
instance_charge_type Changes to this property will trigger replacement. str
Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

Deprecated: Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

internet_charge_type Changes to this property will trigger replacement. str
The internet charge type. Valid values PayByLcu. The PayByLcu is only support enhanced NAT. NOTE: From version 1.137.0, internet_charge_type cannot be set to PayBySpec.
name str
Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

Deprecated: Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

nat_gateway_name str
Name of the nat gateway. The value can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Defaults to null.
nat_type str
The type of NAT gateway. Valid values: Enhanced. NOTE: From version 1.137.0, nat_type cannot be set to Normal.
network_type str
Indicates the type of the created NAT gateway. Valid values internet and intranet. internet: Internet NAT Gateway. intranet: VPC NAT Gateway.
payment_type Changes to this property will trigger replacement. str
The billing method of the NAT gateway. Valid values are PayAsYouGo. Default to PayAsYouGo.
period int

The duration that you will buy the resource, in month. It is valid when payment_type is Subscription. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console. NOTE: International station only supports Subscription.

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

private_link_enabled Changes to this property will trigger replacement. bool
Specifies whether to enable PrivateLink. Default value: false. Valid values:
snat_table_ids str
The nat gateway will auto create a snat item.
specification str
The specification of the nat gateway. Valid values are Small, Middle and Large. Effective when internet_charge_type is PayBySpec and network_type is internet. Details refer to Nat Gateway Specification.
status str
(Available since v1.121.0) The status of NAT gateway.
tags Mapping[str, str]
The tags of NAT gateway.
vpc_id Changes to this property will trigger replacement. str
The VPC ID.
vswitch_id str
The id of VSwitch.
accessMode Changes to this property will trigger replacement. Property Map
The access mode for reverse access to the VPC NAT gateway. See access_mode below.
deletionProtection Boolean
Whether enable the deletion protection or not. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
description String
Description of the nat gateway, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Defaults to null.
dryRun Boolean
Specifies whether to only precheck this request. Default value: false.
eipBindMode String
The EIP binding mode of the NAT gateway. Default value: MULTI_BINDED. Valid values:

  • MULTI_BINDED: Multi EIP network card visible mode.
  • NAT: EIP normal mode, compatible with IPv4 gateway.
force Boolean
Specifies whether to forcefully delete the NAT gateway.
forwardTableIds String
The nat gateway will auto create a forward item.
icmpReplyEnabled Boolean
Specifies whether to enable ICMP retrieval. Default value: true. Valid values:
instanceChargeType Changes to this property will trigger replacement. String
Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

Deprecated: Field instance_charge_type has been deprecated from provider version 1.121.0. New field payment_type instead.

internetChargeType Changes to this property will trigger replacement. String
The internet charge type. Valid values PayByLcu. The PayByLcu is only support enhanced NAT. NOTE: From version 1.137.0, internet_charge_type cannot be set to PayBySpec.
name String
Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

Deprecated: Field name has been deprecated from provider version 1.121.0. New field nat_gateway_name instead.

natGatewayName String
Name of the nat gateway. The value can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Defaults to null.
natType String
The type of NAT gateway. Valid values: Enhanced. NOTE: From version 1.137.0, nat_type cannot be set to Normal.
networkType String
Indicates the type of the created NAT gateway. Valid values internet and intranet. internet: Internet NAT Gateway. intranet: VPC NAT Gateway.
paymentType Changes to this property will trigger replacement. String
The billing method of the NAT gateway. Valid values are PayAsYouGo. Default to PayAsYouGo.
period Number

The duration that you will buy the resource, in month. It is valid when payment_type is Subscription. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console. NOTE: International station only supports Subscription.

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

privateLinkEnabled Changes to this property will trigger replacement. Boolean
Specifies whether to enable PrivateLink. Default value: false. Valid values:
snatTableIds String
The nat gateway will auto create a snat item.
specification String
The specification of the nat gateway. Valid values are Small, Middle and Large. Effective when internet_charge_type is PayBySpec and network_type is internet. Details refer to Nat Gateway Specification.
status String
(Available since v1.121.0) The status of NAT gateway.
tags Map<String>
The tags of NAT gateway.
vpcId Changes to this property will trigger replacement. String
The VPC ID.
vswitchId String
The id of VSwitch.

Supporting Types

NatGatewayAccessMode
, NatGatewayAccessModeArgs

ModeValue Changes to this property will trigger replacement. string
The mode of Access. Valid values:
TunnelType Changes to this property will trigger replacement. string
The type of Tunnel. Valid values: geneve. NOTE: tunnel_type takes effect only if mode_value is set to tunnel.
ModeValue Changes to this property will trigger replacement. string
The mode of Access. Valid values:
TunnelType Changes to this property will trigger replacement. string
The type of Tunnel. Valid values: geneve. NOTE: tunnel_type takes effect only if mode_value is set to tunnel.
modeValue Changes to this property will trigger replacement. String
The mode of Access. Valid values:
tunnelType Changes to this property will trigger replacement. String
The type of Tunnel. Valid values: geneve. NOTE: tunnel_type takes effect only if mode_value is set to tunnel.
modeValue Changes to this property will trigger replacement. string
The mode of Access. Valid values:
tunnelType Changes to this property will trigger replacement. string
The type of Tunnel. Valid values: geneve. NOTE: tunnel_type takes effect only if mode_value is set to tunnel.
mode_value Changes to this property will trigger replacement. str
The mode of Access. Valid values:
tunnel_type Changes to this property will trigger replacement. str
The type of Tunnel. Valid values: geneve. NOTE: tunnel_type takes effect only if mode_value is set to tunnel.
modeValue Changes to this property will trigger replacement. String
The mode of Access. Valid values:
tunnelType Changes to this property will trigger replacement. String
The type of Tunnel. Valid values: geneve. NOTE: tunnel_type takes effect only if mode_value is set to tunnel.

Import

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

$ pulumi import alicloud:vpc/natGateway:NatGateway example <id>
Copy

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

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.