alicloud.vpc.SnatEntry
Explore with Pulumi AI
Provides a NAT Gateway Snat Entry resource.
For information about NAT Gateway Snat Entry and how to use it, see What is Snat Entry.
NOTE: Available since v1.119.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = alicloud.getZones({
    availableResourceCreation: "VSwitch",
});
const defaultNetwork = new alicloud.vpc.Network("default", {
    vpcName: name,
    cidrBlock: "172.16.0.0/12",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
    vpcId: defaultNetwork.id,
    cidrBlock: "172.16.0.0/21",
    zoneId: _default.then(_default => _default.zones?.[0]?.id),
    vswitchName: name,
});
const defaultNatGateway = new alicloud.vpc.NatGateway("default", {
    vpcId: defaultNetwork.id,
    natGatewayName: name,
    paymentType: "PayAsYouGo",
    vswitchId: defaultSwitch.id,
    natType: "Enhanced",
});
const defaultEipAddress = new alicloud.ecs.EipAddress("default", {addressName: name});
const defaultEipAssociation = new alicloud.ecs.EipAssociation("default", {
    allocationId: defaultEipAddress.id,
    instanceId: defaultNatGateway.id,
});
const defaultSnatEntry = new alicloud.vpc.SnatEntry("default", {
    snatTableId: defaultNatGateway.snatTableIds,
    sourceVswitchId: defaultSwitch.id,
    snatIp: defaultEipAddress.ipAddress,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "terraform-example"
default = alicloud.get_zones(available_resource_creation="VSwitch")
default_network = alicloud.vpc.Network("default",
    vpc_name=name,
    cidr_block="172.16.0.0/12")
default_switch = alicloud.vpc.Switch("default",
    vpc_id=default_network.id,
    cidr_block="172.16.0.0/21",
    zone_id=default.zones[0].id,
    vswitch_name=name)
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")
default_eip_address = alicloud.ecs.EipAddress("default", address_name=name)
default_eip_association = alicloud.ecs.EipAssociation("default",
    allocation_id=default_eip_address.id,
    instance_id=default_nat_gateway.id)
default_snat_entry = alicloud.vpc.SnatEntry("default",
    snat_table_id=default_nat_gateway.snat_table_ids,
    source_vswitch_id=default_switch.id,
    snat_ip=default_eip_address.ip_address)
package main
import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
	"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 := "terraform-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
		}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
			VpcName:   pulumi.String(name),
			CidrBlock: pulumi.String("172.16.0.0/12"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
			VpcId:       defaultNetwork.ID(),
			CidrBlock:   pulumi.String("172.16.0.0/21"),
			ZoneId:      pulumi.String(_default.Zones[0].Id),
			VswitchName: pulumi.String(name),
		})
		if err != nil {
			return err
		}
		defaultNatGateway, 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
		}
		defaultEipAddress, err := ecs.NewEipAddress(ctx, "default", &ecs.EipAddressArgs{
			AddressName: pulumi.String(name),
		})
		if err != nil {
			return err
		}
		_, err = ecs.NewEipAssociation(ctx, "default", &ecs.EipAssociationArgs{
			AllocationId: defaultEipAddress.ID(),
			InstanceId:   defaultNatGateway.ID(),
		})
		if err != nil {
			return err
		}
		_, err = vpc.NewSnatEntry(ctx, "default", &vpc.SnatEntryArgs{
			SnatTableId:     defaultNatGateway.SnatTableIds,
			SourceVswitchId: defaultSwitch.ID(),
			SnatIp:          defaultEipAddress.IpAddress,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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") ?? "terraform-example";
    var @default = AliCloud.GetZones.Invoke(new()
    {
        AvailableResourceCreation = "VSwitch",
    });
    var defaultNetwork = new AliCloud.Vpc.Network("default", new()
    {
        VpcName = name,
        CidrBlock = "172.16.0.0/12",
    });
    var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
    {
        VpcId = defaultNetwork.Id,
        CidrBlock = "172.16.0.0/21",
        ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
        VswitchName = name,
    });
    var defaultNatGateway = new AliCloud.Vpc.NatGateway("default", new()
    {
        VpcId = defaultNetwork.Id,
        NatGatewayName = name,
        PaymentType = "PayAsYouGo",
        VswitchId = defaultSwitch.Id,
        NatType = "Enhanced",
    });
    var defaultEipAddress = new AliCloud.Ecs.EipAddress("default", new()
    {
        AddressName = name,
    });
    var defaultEipAssociation = new AliCloud.Ecs.EipAssociation("default", new()
    {
        AllocationId = defaultEipAddress.Id,
        InstanceId = defaultNatGateway.Id,
    });
    var defaultSnatEntry = new AliCloud.Vpc.SnatEntry("default", new()
    {
        SnatTableId = defaultNatGateway.SnatTableIds,
        SourceVswitchId = defaultSwitch.Id,
        SnatIp = defaultEipAddress.IpAddress,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
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 com.pulumi.alicloud.ecs.EipAddress;
import com.pulumi.alicloud.ecs.EipAddressArgs;
import com.pulumi.alicloud.ecs.EipAssociation;
import com.pulumi.alicloud.ecs.EipAssociationArgs;
import com.pulumi.alicloud.vpc.SnatEntry;
import com.pulumi.alicloud.vpc.SnatEntryArgs;
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("terraform-example");
        final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
            .availableResourceCreation("VSwitch")
            .build());
        var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
            .vpcName(name)
            .cidrBlock("172.16.0.0/12")
            .build());
        var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
            .vpcId(defaultNetwork.id())
            .cidrBlock("172.16.0.0/21")
            .zoneId(default_.zones()[0].id())
            .vswitchName(name)
            .build());
        var defaultNatGateway = new NatGateway("defaultNatGateway", NatGatewayArgs.builder()
            .vpcId(defaultNetwork.id())
            .natGatewayName(name)
            .paymentType("PayAsYouGo")
            .vswitchId(defaultSwitch.id())
            .natType("Enhanced")
            .build());
        var defaultEipAddress = new EipAddress("defaultEipAddress", EipAddressArgs.builder()
            .addressName(name)
            .build());
        var defaultEipAssociation = new EipAssociation("defaultEipAssociation", EipAssociationArgs.builder()
            .allocationId(defaultEipAddress.id())
            .instanceId(defaultNatGateway.id())
            .build());
        var defaultSnatEntry = new SnatEntry("defaultSnatEntry", SnatEntryArgs.builder()
            .snatTableId(defaultNatGateway.snatTableIds())
            .sourceVswitchId(defaultSwitch.id())
            .snatIp(defaultEipAddress.ipAddress())
            .build());
    }
}
configuration:
  name:
    type: string
    default: terraform-example
resources:
  defaultNetwork:
    type: alicloud:vpc:Network
    name: default
    properties:
      vpcName: ${name}
      cidrBlock: 172.16.0.0/12
  defaultSwitch:
    type: alicloud:vpc:Switch
    name: default
    properties:
      vpcId: ${defaultNetwork.id}
      cidrBlock: 172.16.0.0/21
      zoneId: ${default.zones[0].id}
      vswitchName: ${name}
  defaultNatGateway:
    type: alicloud:vpc:NatGateway
    name: default
    properties:
      vpcId: ${defaultNetwork.id}
      natGatewayName: ${name}
      paymentType: PayAsYouGo
      vswitchId: ${defaultSwitch.id}
      natType: Enhanced
  defaultEipAddress:
    type: alicloud:ecs:EipAddress
    name: default
    properties:
      addressName: ${name}
  defaultEipAssociation:
    type: alicloud:ecs:EipAssociation
    name: default
    properties:
      allocationId: ${defaultEipAddress.id}
      instanceId: ${defaultNatGateway.id}
  defaultSnatEntry:
    type: alicloud:vpc:SnatEntry
    name: default
    properties:
      snatTableId: ${defaultNatGateway.snatTableIds}
      sourceVswitchId: ${defaultSwitch.id}
      snatIp: ${defaultEipAddress.ipAddress}
variables:
  default:
    fn::invoke:
      function: alicloud:getZones
      arguments:
        availableResourceCreation: VSwitch
Create SnatEntry Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SnatEntry(name: string, args: SnatEntryArgs, opts?: CustomResourceOptions);@overload
def SnatEntry(resource_name: str,
              args: SnatEntryArgs,
              opts: Optional[ResourceOptions] = None)
@overload
def SnatEntry(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              snat_ip: Optional[str] = None,
              snat_table_id: Optional[str] = None,
              eip_affinity: Optional[int] = None,
              snat_entry_name: Optional[str] = None,
              source_cidr: Optional[str] = None,
              source_vswitch_id: Optional[str] = None)func NewSnatEntry(ctx *Context, name string, args SnatEntryArgs, opts ...ResourceOption) (*SnatEntry, error)public SnatEntry(string name, SnatEntryArgs args, CustomResourceOptions? opts = null)
public SnatEntry(String name, SnatEntryArgs args)
public SnatEntry(String name, SnatEntryArgs args, CustomResourceOptions options)
type: alicloud:vpc:SnatEntry
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 SnatEntryArgs
- 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 SnatEntryArgs
- 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 SnatEntryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SnatEntryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SnatEntryArgs
- 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 alicloudSnatEntryResource = new AliCloud.Vpc.SnatEntry("alicloudSnatEntryResource", new()
{
    SnatIp = "string",
    SnatTableId = "string",
    EipAffinity = 0,
    SnatEntryName = "string",
    SourceCidr = "string",
    SourceVswitchId = "string",
});
example, err := vpc.NewSnatEntry(ctx, "alicloudSnatEntryResource", &vpc.SnatEntryArgs{
	SnatIp:          pulumi.String("string"),
	SnatTableId:     pulumi.String("string"),
	EipAffinity:     pulumi.Int(0),
	SnatEntryName:   pulumi.String("string"),
	SourceCidr:      pulumi.String("string"),
	SourceVswitchId: pulumi.String("string"),
})
var alicloudSnatEntryResource = new SnatEntry("alicloudSnatEntryResource", SnatEntryArgs.builder()
    .snatIp("string")
    .snatTableId("string")
    .eipAffinity(0)
    .snatEntryName("string")
    .sourceCidr("string")
    .sourceVswitchId("string")
    .build());
alicloud_snat_entry_resource = alicloud.vpc.SnatEntry("alicloudSnatEntryResource",
    snat_ip="string",
    snat_table_id="string",
    eip_affinity=0,
    snat_entry_name="string",
    source_cidr="string",
    source_vswitch_id="string")
const alicloudSnatEntryResource = new alicloud.vpc.SnatEntry("alicloudSnatEntryResource", {
    snatIp: "string",
    snatTableId: "string",
    eipAffinity: 0,
    snatEntryName: "string",
    sourceCidr: "string",
    sourceVswitchId: "string",
});
type: alicloud:vpc:SnatEntry
properties:
    eipAffinity: 0
    snatEntryName: string
    snatIp: string
    snatTableId: string
    sourceCidr: string
    sourceVswitchId: string
SnatEntry 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 SnatEntry resource accepts the following input properties:
- SnatIp string
- The IP of a SNAT entry. Separate multiple EIP or NAT IP addresses with commas (,). NOTE: From version 1.241.0, snat_ipcan be modified.
- SnatTable stringId 
- The ID of the SNAT table.
- EipAffinity int
- Specifies whether to enable EIP affinity. Default value: 0. Valid values:
- SnatEntry stringName 
- The name of the SNAT entry. The name must be 2to128characters in length. It must start with a letter but cannot start withhttp://orhttps://.
- SourceCidr string
- The source CIDR block specified in the SNAT entry.
- SourceVswitch stringId 
- The ID of the vSwitch.
- SnatIp string
- The IP of a SNAT entry. Separate multiple EIP or NAT IP addresses with commas (,). NOTE: From version 1.241.0, snat_ipcan be modified.
- SnatTable stringId 
- The ID of the SNAT table.
- EipAffinity int
- Specifies whether to enable EIP affinity. Default value: 0. Valid values:
- SnatEntry stringName 
- The name of the SNAT entry. The name must be 2to128characters in length. It must start with a letter but cannot start withhttp://orhttps://.
- SourceCidr string
- The source CIDR block specified in the SNAT entry.
- SourceVswitch stringId 
- The ID of the vSwitch.
- snatIp String
- The IP of a SNAT entry. Separate multiple EIP or NAT IP addresses with commas (,). NOTE: From version 1.241.0, snat_ipcan be modified.
- snatTable StringId 
- The ID of the SNAT table.
- eipAffinity Integer
- Specifies whether to enable EIP affinity. Default value: 0. Valid values:
- snatEntry StringName 
- The name of the SNAT entry. The name must be 2to128characters in length. It must start with a letter but cannot start withhttp://orhttps://.
- sourceCidr String
- The source CIDR block specified in the SNAT entry.
- sourceVswitch StringId 
- The ID of the vSwitch.
- snatIp string
- The IP of a SNAT entry. Separate multiple EIP or NAT IP addresses with commas (,). NOTE: From version 1.241.0, snat_ipcan be modified.
- snatTable stringId 
- The ID of the SNAT table.
- eipAffinity number
- Specifies whether to enable EIP affinity. Default value: 0. Valid values:
- snatEntry stringName 
- The name of the SNAT entry. The name must be 2to128characters in length. It must start with a letter but cannot start withhttp://orhttps://.
- sourceCidr string
- The source CIDR block specified in the SNAT entry.
- sourceVswitch stringId 
- The ID of the vSwitch.
- snat_ip str
- The IP of a SNAT entry. Separate multiple EIP or NAT IP addresses with commas (,). NOTE: From version 1.241.0, snat_ipcan be modified.
- snat_table_ strid 
- The ID of the SNAT table.
- eip_affinity int
- Specifies whether to enable EIP affinity. Default value: 0. Valid values:
- snat_entry_ strname 
- The name of the SNAT entry. The name must be 2to128characters in length. It must start with a letter but cannot start withhttp://orhttps://.
- source_cidr str
- The source CIDR block specified in the SNAT entry.
- source_vswitch_ strid 
- The ID of the vSwitch.
- snatIp String
- The IP of a SNAT entry. Separate multiple EIP or NAT IP addresses with commas (,). NOTE: From version 1.241.0, snat_ipcan be modified.
- snatTable StringId 
- The ID of the SNAT table.
- eipAffinity Number
- Specifies whether to enable EIP affinity. Default value: 0. Valid values:
- snatEntry StringName 
- The name of the SNAT entry. The name must be 2to128characters in length. It must start with a letter but cannot start withhttp://orhttps://.
- sourceCidr String
- The source CIDR block specified in the SNAT entry.
- sourceVswitch StringId 
- The ID of the vSwitch.
Outputs
All input properties are implicitly available as output properties. Additionally, the SnatEntry resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- SnatEntry stringId 
- The id of the snat entry on the server.
- Status string
- (Available since v1.119.1) The ID of the SNAT entry.
- Id string
- The provider-assigned unique ID for this managed resource.
- SnatEntry stringId 
- The id of the snat entry on the server.
- Status string
- (Available since v1.119.1) The ID of the SNAT entry.
- id String
- The provider-assigned unique ID for this managed resource.
- snatEntry StringId 
- The id of the snat entry on the server.
- status String
- (Available since v1.119.1) The ID of the SNAT entry.
- id string
- The provider-assigned unique ID for this managed resource.
- snatEntry stringId 
- The id of the snat entry on the server.
- status string
- (Available since v1.119.1) The ID of the SNAT entry.
- id str
- The provider-assigned unique ID for this managed resource.
- snat_entry_ strid 
- The id of the snat entry on the server.
- status str
- (Available since v1.119.1) The ID of the SNAT entry.
- id String
- The provider-assigned unique ID for this managed resource.
- snatEntry StringId 
- The id of the snat entry on the server.
- status String
- (Available since v1.119.1) The ID of the SNAT entry.
Look up Existing SnatEntry Resource
Get an existing SnatEntry 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?: SnatEntryState, opts?: CustomResourceOptions): SnatEntry@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        eip_affinity: Optional[int] = None,
        snat_entry_id: Optional[str] = None,
        snat_entry_name: Optional[str] = None,
        snat_ip: Optional[str] = None,
        snat_table_id: Optional[str] = None,
        source_cidr: Optional[str] = None,
        source_vswitch_id: Optional[str] = None,
        status: Optional[str] = None) -> SnatEntryfunc GetSnatEntry(ctx *Context, name string, id IDInput, state *SnatEntryState, opts ...ResourceOption) (*SnatEntry, error)public static SnatEntry Get(string name, Input<string> id, SnatEntryState? state, CustomResourceOptions? opts = null)public static SnatEntry get(String name, Output<String> id, SnatEntryState state, CustomResourceOptions options)resources:  _:    type: alicloud:vpc:SnatEntry    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.
- EipAffinity int
- Specifies whether to enable EIP affinity. Default value: 0. Valid values:
- SnatEntry stringId 
- The id of the snat entry on the server.
- SnatEntry stringName 
- The name of the SNAT entry. The name must be 2to128characters in length. It must start with a letter but cannot start withhttp://orhttps://.
- SnatIp string
- The IP of a SNAT entry. Separate multiple EIP or NAT IP addresses with commas (,). NOTE: From version 1.241.0, snat_ipcan be modified.
- SnatTable stringId 
- The ID of the SNAT table.
- SourceCidr string
- The source CIDR block specified in the SNAT entry.
- SourceVswitch stringId 
- The ID of the vSwitch.
- Status string
- (Available since v1.119.1) The ID of the SNAT entry.
- EipAffinity int
- Specifies whether to enable EIP affinity. Default value: 0. Valid values:
- SnatEntry stringId 
- The id of the snat entry on the server.
- SnatEntry stringName 
- The name of the SNAT entry. The name must be 2to128characters in length. It must start with a letter but cannot start withhttp://orhttps://.
- SnatIp string
- The IP of a SNAT entry. Separate multiple EIP or NAT IP addresses with commas (,). NOTE: From version 1.241.0, snat_ipcan be modified.
- SnatTable stringId 
- The ID of the SNAT table.
- SourceCidr string
- The source CIDR block specified in the SNAT entry.
- SourceVswitch stringId 
- The ID of the vSwitch.
- Status string
- (Available since v1.119.1) The ID of the SNAT entry.
- eipAffinity Integer
- Specifies whether to enable EIP affinity. Default value: 0. Valid values:
- snatEntry StringId 
- The id of the snat entry on the server.
- snatEntry StringName 
- The name of the SNAT entry. The name must be 2to128characters in length. It must start with a letter but cannot start withhttp://orhttps://.
- snatIp String
- The IP of a SNAT entry. Separate multiple EIP or NAT IP addresses with commas (,). NOTE: From version 1.241.0, snat_ipcan be modified.
- snatTable StringId 
- The ID of the SNAT table.
- sourceCidr String
- The source CIDR block specified in the SNAT entry.
- sourceVswitch StringId 
- The ID of the vSwitch.
- status String
- (Available since v1.119.1) The ID of the SNAT entry.
- eipAffinity number
- Specifies whether to enable EIP affinity. Default value: 0. Valid values:
- snatEntry stringId 
- The id of the snat entry on the server.
- snatEntry stringName 
- The name of the SNAT entry. The name must be 2to128characters in length. It must start with a letter but cannot start withhttp://orhttps://.
- snatIp string
- The IP of a SNAT entry. Separate multiple EIP or NAT IP addresses with commas (,). NOTE: From version 1.241.0, snat_ipcan be modified.
- snatTable stringId 
- The ID of the SNAT table.
- sourceCidr string
- The source CIDR block specified in the SNAT entry.
- sourceVswitch stringId 
- The ID of the vSwitch.
- status string
- (Available since v1.119.1) The ID of the SNAT entry.
- eip_affinity int
- Specifies whether to enable EIP affinity. Default value: 0. Valid values:
- snat_entry_ strid 
- The id of the snat entry on the server.
- snat_entry_ strname 
- The name of the SNAT entry. The name must be 2to128characters in length. It must start with a letter but cannot start withhttp://orhttps://.
- snat_ip str
- The IP of a SNAT entry. Separate multiple EIP or NAT IP addresses with commas (,). NOTE: From version 1.241.0, snat_ipcan be modified.
- snat_table_ strid 
- The ID of the SNAT table.
- source_cidr str
- The source CIDR block specified in the SNAT entry.
- source_vswitch_ strid 
- The ID of the vSwitch.
- status str
- (Available since v1.119.1) The ID of the SNAT entry.
- eipAffinity Number
- Specifies whether to enable EIP affinity. Default value: 0. Valid values:
- snatEntry StringId 
- The id of the snat entry on the server.
- snatEntry StringName 
- The name of the SNAT entry. The name must be 2to128characters in length. It must start with a letter but cannot start withhttp://orhttps://.
- snatIp String
- The IP of a SNAT entry. Separate multiple EIP or NAT IP addresses with commas (,). NOTE: From version 1.241.0, snat_ipcan be modified.
- snatTable StringId 
- The ID of the SNAT table.
- sourceCidr String
- The source CIDR block specified in the SNAT entry.
- sourceVswitch StringId 
- The ID of the vSwitch.
- status String
- (Available since v1.119.1) The ID of the SNAT entry.
Import
NAT Gateway Snat Entry can be imported using the id, e.g.
$ pulumi import alicloud:vpc/snatEntry:SnatEntry example <snat_table_id>:<snat_entry_id>
$ pulumi import alicloud:vpc/snatEntry:SnatEntry example <snat_entry_id>
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 alicloudTerraform Provider.