published on Saturday, Mar 14, 2026 by Pulumi
published on Saturday, Mar 14, 2026 by Pulumi
Provides a Nat Gateway Nat Ip Cidr resource.
NAT IP address segment.
For information about Nat Gateway Nat Ip Cidr and how to use it, see What is Nat Ip Cidr.
NOTE: Available since v1.136.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.getZones({
availableResourceCreation: "VSwitch",
});
const defaultNetwork = new alicloud.vpc.Network("default", {
vpcName: "terraform-example",
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: "terraform-example",
});
const defaultNatGateway = new alicloud.vpc.NatGateway("default", {
vpcId: defaultNetwork.id,
internetChargeType: "PayByLcu",
natGatewayName: "terraform-example",
description: "terraform-example",
natType: "Enhanced",
vswitchId: defaultSwitch.id,
networkType: "intranet",
});
const defaultNatIpCidr = new alicloud.vpc.NatIpCidr("default", {
natGatewayId: defaultNatGateway.id,
natIpCidrName: "terraform-example",
natIpCidr: "192.168.0.0/16",
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.get_zones(available_resource_creation="VSwitch")
default_network = alicloud.vpc.Network("default",
vpc_name="terraform-example",
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="terraform-example")
default_nat_gateway = alicloud.vpc.NatGateway("default",
vpc_id=default_network.id,
internet_charge_type="PayByLcu",
nat_gateway_name="terraform-example",
description="terraform-example",
nat_type="Enhanced",
vswitch_id=default_switch.id,
network_type="intranet")
default_nat_ip_cidr = alicloud.vpc.NatIpCidr("default",
nat_gateway_id=default_nat_gateway.id,
nat_ip_cidr_name="terraform-example",
nat_ip_cidr="192.168.0.0/16")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_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("terraform-example"),
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("terraform-example"),
})
if err != nil {
return err
}
defaultNatGateway, err := vpc.NewNatGateway(ctx, "default", &vpc.NatGatewayArgs{
VpcId: defaultNetwork.ID(),
InternetChargeType: pulumi.String("PayByLcu"),
NatGatewayName: pulumi.String("terraform-example"),
Description: pulumi.String("terraform-example"),
NatType: pulumi.String("Enhanced"),
VswitchId: defaultSwitch.ID(),
NetworkType: pulumi.String("intranet"),
})
if err != nil {
return err
}
_, err = vpc.NewNatIpCidr(ctx, "default", &vpc.NatIpCidrArgs{
NatGatewayId: defaultNatGateway.ID(),
NatIpCidrName: pulumi.String("terraform-example"),
NatIpCidr: pulumi.String("192.168.0.0/16"),
})
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 @default = AliCloud.GetZones.Invoke(new()
{
AvailableResourceCreation = "VSwitch",
});
var defaultNetwork = new AliCloud.Vpc.Network("default", new()
{
VpcName = "terraform-example",
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 = "terraform-example",
});
var defaultNatGateway = new AliCloud.Vpc.NatGateway("default", new()
{
VpcId = defaultNetwork.Id,
InternetChargeType = "PayByLcu",
NatGatewayName = "terraform-example",
Description = "terraform-example",
NatType = "Enhanced",
VswitchId = defaultSwitch.Id,
NetworkType = "intranet",
});
var defaultNatIpCidr = new AliCloud.Vpc.NatIpCidr("default", new()
{
NatGatewayId = defaultNatGateway.Id,
NatIpCidrName = "terraform-example",
NatIpCidrBlock = "192.168.0.0/16",
});
});
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.vpc.NatIpCidr;
import com.pulumi.alicloud.vpc.NatIpCidrArgs;
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 default = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("VSwitch")
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName("terraform-example")
.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("terraform-example")
.build());
var defaultNatGateway = new NatGateway("defaultNatGateway", NatGatewayArgs.builder()
.vpcId(defaultNetwork.id())
.internetChargeType("PayByLcu")
.natGatewayName("terraform-example")
.description("terraform-example")
.natType("Enhanced")
.vswitchId(defaultSwitch.id())
.networkType("intranet")
.build());
var defaultNatIpCidr = new NatIpCidr("defaultNatIpCidr", NatIpCidrArgs.builder()
.natGatewayId(defaultNatGateway.id())
.natIpCidrName("terraform-example")
.natIpCidr("192.168.0.0/16")
.build());
}
}
resources:
defaultNetwork:
type: alicloud:vpc:Network
name: default
properties:
vpcName: terraform-example
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: terraform-example
defaultNatGateway:
type: alicloud:vpc:NatGateway
name: default
properties:
vpcId: ${defaultNetwork.id}
internetChargeType: PayByLcu
natGatewayName: terraform-example
description: terraform-example
natType: Enhanced
vswitchId: ${defaultSwitch.id}
networkType: intranet
defaultNatIpCidr:
type: alicloud:vpc:NatIpCidr
name: default
properties:
natGatewayId: ${defaultNatGateway.id}
natIpCidrName: terraform-example
natIpCidr: 192.168.0.0/16
variables:
default:
fn::invoke:
function: alicloud:getZones
arguments:
availableResourceCreation: VSwitch
📚 Need more examples? VIEW MORE EXAMPLES
Create NatIpCidr Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NatIpCidr(name: string, args: NatIpCidrArgs, opts?: CustomResourceOptions);@overload
def NatIpCidr(resource_name: str,
args: NatIpCidrArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NatIpCidr(resource_name: str,
opts: Optional[ResourceOptions] = None,
nat_gateway_id: Optional[str] = None,
nat_ip_cidr: Optional[str] = None,
nat_ip_cidr_name: Optional[str] = None,
dry_run: Optional[bool] = None,
nat_ip_cidr_description: Optional[str] = None)func NewNatIpCidr(ctx *Context, name string, args NatIpCidrArgs, opts ...ResourceOption) (*NatIpCidr, error)public NatIpCidr(string name, NatIpCidrArgs args, CustomResourceOptions? opts = null)
public NatIpCidr(String name, NatIpCidrArgs args)
public NatIpCidr(String name, NatIpCidrArgs args, CustomResourceOptions options)
type: alicloud:vpc:NatIpCidr
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 NatIpCidrArgs
- 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 NatIpCidrArgs
- 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 NatIpCidrArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NatIpCidrArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NatIpCidrArgs
- 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 natIpCidrResource = new AliCloud.Vpc.NatIpCidr("natIpCidrResource", new()
{
NatGatewayId = "string",
NatIpCidrBlock = "string",
NatIpCidrName = "string",
DryRun = false,
NatIpCidrDescription = "string",
});
example, err := vpc.NewNatIpCidr(ctx, "natIpCidrResource", &vpc.NatIpCidrArgs{
NatGatewayId: pulumi.String("string"),
NatIpCidr: pulumi.String("string"),
NatIpCidrName: pulumi.String("string"),
DryRun: pulumi.Bool(false),
NatIpCidrDescription: pulumi.String("string"),
})
var natIpCidrResource = new NatIpCidr("natIpCidrResource", NatIpCidrArgs.builder()
.natGatewayId("string")
.natIpCidr("string")
.natIpCidrName("string")
.dryRun(false)
.natIpCidrDescription("string")
.build());
nat_ip_cidr_resource = alicloud.vpc.NatIpCidr("natIpCidrResource",
nat_gateway_id="string",
nat_ip_cidr="string",
nat_ip_cidr_name="string",
dry_run=False,
nat_ip_cidr_description="string")
const natIpCidrResource = new alicloud.vpc.NatIpCidr("natIpCidrResource", {
natGatewayId: "string",
natIpCidr: "string",
natIpCidrName: "string",
dryRun: false,
natIpCidrDescription: "string",
});
type: alicloud:vpc:NatIpCidr
properties:
dryRun: false
natGatewayId: string
natIpCidr: string
natIpCidrDescription: string
natIpCidrName: string
NatIpCidr 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 NatIpCidr resource accepts the following input properties:
- Nat
Gateway stringId - The ID of the VPC NAT gateway instance to which the NAT IP address block belongs.
- Nat
Ip stringCidr Block The NAT IP CIDR block to create.
The newly created CIDR block must meet the following requirements:
- It must belong to the 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 CIDR blocks or their subnets.
- The subnet mask length must be between 16 and 32 bits.
- It must not overlap with the private CIDR block of the VPC to which the VPC NAT gateway belongs. If you need to translate a private IP address to another address within the VPC's private CIDR block, create a vSwitch in the corresponding VPC private CIDR block and then create a new VPC NAT gateway in that vSwitch to provide private address translation.
- If you want to use a public CIDR block as the NAT IP CIDR block, the CIDR block must belong to the customer CIDR block of the VPC to which the VPC NAT gateway belongs. For more information about customer CIDR blocks, see What is a customer CIDR block?.
- Nat
Ip stringCidr Name - The name of the NAT IP address block.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or a Chinese character, and cannot start with
http://orhttps://. - Dry
Run bool - Specifies whether to only precheck this request. Valid values:
- Nat
Ip stringCidr Description - The description of the NAT IP CIDR block to modify.
The description must be 2 to 256 characters in length, start with a letter or Chinese character, and cannot start with
http://orhttps://.
- Nat
Gateway stringId - The ID of the VPC NAT gateway instance to which the NAT IP address block belongs.
- Nat
Ip stringCidr The NAT IP CIDR block to create.
The newly created CIDR block must meet the following requirements:
- It must belong to the 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 CIDR blocks or their subnets.
- The subnet mask length must be between 16 and 32 bits.
- It must not overlap with the private CIDR block of the VPC to which the VPC NAT gateway belongs. If you need to translate a private IP address to another address within the VPC's private CIDR block, create a vSwitch in the corresponding VPC private CIDR block and then create a new VPC NAT gateway in that vSwitch to provide private address translation.
- If you want to use a public CIDR block as the NAT IP CIDR block, the CIDR block must belong to the customer CIDR block of the VPC to which the VPC NAT gateway belongs. For more information about customer CIDR blocks, see What is a customer CIDR block?.
- Nat
Ip stringCidr Name - The name of the NAT IP address block.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or a Chinese character, and cannot start with
http://orhttps://. - Dry
Run bool - Specifies whether to only precheck this request. Valid values:
- Nat
Ip stringCidr Description - The description of the NAT IP CIDR block to modify.
The description must be 2 to 256 characters in length, start with a letter or Chinese character, and cannot start with
http://orhttps://.
- nat
Gateway StringId - The ID of the VPC NAT gateway instance to which the NAT IP address block belongs.
- nat
Ip StringCidr The NAT IP CIDR block to create.
The newly created CIDR block must meet the following requirements:
- It must belong to the 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 CIDR blocks or their subnets.
- The subnet mask length must be between 16 and 32 bits.
- It must not overlap with the private CIDR block of the VPC to which the VPC NAT gateway belongs. If you need to translate a private IP address to another address within the VPC's private CIDR block, create a vSwitch in the corresponding VPC private CIDR block and then create a new VPC NAT gateway in that vSwitch to provide private address translation.
- If you want to use a public CIDR block as the NAT IP CIDR block, the CIDR block must belong to the customer CIDR block of the VPC to which the VPC NAT gateway belongs. For more information about customer CIDR blocks, see What is a customer CIDR block?.
- nat
Ip StringCidr Name - The name of the NAT IP address block.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or a Chinese character, and cannot start with
http://orhttps://. - dry
Run Boolean - Specifies whether to only precheck this request. Valid values:
- nat
Ip StringCidr Description - The description of the NAT IP CIDR block to modify.
The description must be 2 to 256 characters in length, start with a letter or Chinese character, and cannot start with
http://orhttps://.
- nat
Gateway stringId - The ID of the VPC NAT gateway instance to which the NAT IP address block belongs.
- nat
Ip stringCidr The NAT IP CIDR block to create.
The newly created CIDR block must meet the following requirements:
- It must belong to the 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 CIDR blocks or their subnets.
- The subnet mask length must be between 16 and 32 bits.
- It must not overlap with the private CIDR block of the VPC to which the VPC NAT gateway belongs. If you need to translate a private IP address to another address within the VPC's private CIDR block, create a vSwitch in the corresponding VPC private CIDR block and then create a new VPC NAT gateway in that vSwitch to provide private address translation.
- If you want to use a public CIDR block as the NAT IP CIDR block, the CIDR block must belong to the customer CIDR block of the VPC to which the VPC NAT gateway belongs. For more information about customer CIDR blocks, see What is a customer CIDR block?.
- nat
Ip stringCidr Name - The name of the NAT IP address block.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or a Chinese character, and cannot start with
http://orhttps://. - dry
Run boolean - Specifies whether to only precheck this request. Valid values:
- nat
Ip stringCidr Description - The description of the NAT IP CIDR block to modify.
The description must be 2 to 256 characters in length, start with a letter or Chinese character, and cannot start with
http://orhttps://.
- nat_
gateway_ strid - The ID of the VPC NAT gateway instance to which the NAT IP address block belongs.
- nat_
ip_ strcidr The NAT IP CIDR block to create.
The newly created CIDR block must meet the following requirements:
- It must belong to the 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 CIDR blocks or their subnets.
- The subnet mask length must be between 16 and 32 bits.
- It must not overlap with the private CIDR block of the VPC to which the VPC NAT gateway belongs. If you need to translate a private IP address to another address within the VPC's private CIDR block, create a vSwitch in the corresponding VPC private CIDR block and then create a new VPC NAT gateway in that vSwitch to provide private address translation.
- If you want to use a public CIDR block as the NAT IP CIDR block, the CIDR block must belong to the customer CIDR block of the VPC to which the VPC NAT gateway belongs. For more information about customer CIDR blocks, see What is a customer CIDR block?.
- nat_
ip_ strcidr_ name - The name of the NAT IP address block.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or a Chinese character, and cannot start with
http://orhttps://. - dry_
run bool - Specifies whether to only precheck this request. Valid values:
- nat_
ip_ strcidr_ description - The description of the NAT IP CIDR block to modify.
The description must be 2 to 256 characters in length, start with a letter or Chinese character, and cannot start with
http://orhttps://.
- nat
Gateway StringId - The ID of the VPC NAT gateway instance to which the NAT IP address block belongs.
- nat
Ip StringCidr The NAT IP CIDR block to create.
The newly created CIDR block must meet the following requirements:
- It must belong to the 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 CIDR blocks or their subnets.
- The subnet mask length must be between 16 and 32 bits.
- It must not overlap with the private CIDR block of the VPC to which the VPC NAT gateway belongs. If you need to translate a private IP address to another address within the VPC's private CIDR block, create a vSwitch in the corresponding VPC private CIDR block and then create a new VPC NAT gateway in that vSwitch to provide private address translation.
- If you want to use a public CIDR block as the NAT IP CIDR block, the CIDR block must belong to the customer CIDR block of the VPC to which the VPC NAT gateway belongs. For more information about customer CIDR blocks, see What is a customer CIDR block?.
- nat
Ip StringCidr Name - The name of the NAT IP address block.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or a Chinese character, and cannot start with
http://orhttps://. - dry
Run Boolean - Specifies whether to only precheck this request. Valid values:
- nat
Ip StringCidr Description - The description of the NAT IP CIDR block to modify.
The description must be 2 to 256 characters in length, start with a letter or Chinese character, and cannot start with
http://orhttps://.
Outputs
All input properties are implicitly available as output properties. Additionally, the NatIpCidr resource produces the following output properties:
- Create
Time string - (Available since v1.273.0) The time when the NAT IP CIDR block was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of the NAT IP CIDR block to query.
- Create
Time string - (Available since v1.273.0) The time when the NAT IP CIDR block was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of the NAT IP CIDR block to query.
- create
Time String - (Available since v1.273.0) The time when the NAT IP CIDR block was created.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of the NAT IP CIDR block to query.
- create
Time string - (Available since v1.273.0) The time when the NAT IP CIDR block was created.
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- The status of the NAT IP CIDR block to query.
- create_
time str - (Available since v1.273.0) The time when the NAT IP CIDR block was created.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- The status of the NAT IP CIDR block to query.
- create
Time String - (Available since v1.273.0) The time when the NAT IP CIDR block was created.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of the NAT IP CIDR block to query.
Look up Existing NatIpCidr Resource
Get an existing NatIpCidr 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?: NatIpCidrState, opts?: CustomResourceOptions): NatIpCidr@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
dry_run: Optional[bool] = None,
nat_gateway_id: Optional[str] = None,
nat_ip_cidr: Optional[str] = None,
nat_ip_cidr_description: Optional[str] = None,
nat_ip_cidr_name: Optional[str] = None,
status: Optional[str] = None) -> NatIpCidrfunc GetNatIpCidr(ctx *Context, name string, id IDInput, state *NatIpCidrState, opts ...ResourceOption) (*NatIpCidr, error)public static NatIpCidr Get(string name, Input<string> id, NatIpCidrState? state, CustomResourceOptions? opts = null)public static NatIpCidr get(String name, Output<String> id, NatIpCidrState state, CustomResourceOptions options)resources: _: type: alicloud:vpc:NatIpCidr 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.
- Create
Time string - (Available since v1.273.0) The time when the NAT IP CIDR block was created.
- Dry
Run bool - Specifies whether to only precheck this request. Valid values:
- Nat
Gateway stringId - The ID of the VPC NAT gateway instance to which the NAT IP address block belongs.
- Nat
Ip stringCidr Block The NAT IP CIDR block to create.
The newly created CIDR block must meet the following requirements:
- It must belong to the 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 CIDR blocks or their subnets.
- The subnet mask length must be between 16 and 32 bits.
- It must not overlap with the private CIDR block of the VPC to which the VPC NAT gateway belongs. If you need to translate a private IP address to another address within the VPC's private CIDR block, create a vSwitch in the corresponding VPC private CIDR block and then create a new VPC NAT gateway in that vSwitch to provide private address translation.
- If you want to use a public CIDR block as the NAT IP CIDR block, the CIDR block must belong to the customer CIDR block of the VPC to which the VPC NAT gateway belongs. For more information about customer CIDR blocks, see What is a customer CIDR block?.
- Nat
Ip stringCidr Description - The description of the NAT IP CIDR block to modify.
The description must be 2 to 256 characters in length, start with a letter or Chinese character, and cannot start with
http://orhttps://. - Nat
Ip stringCidr Name - The name of the NAT IP address block.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or a Chinese character, and cannot start with
http://orhttps://. - Status string
- The status of the NAT IP CIDR block to query.
- Create
Time string - (Available since v1.273.0) The time when the NAT IP CIDR block was created.
- Dry
Run bool - Specifies whether to only precheck this request. Valid values:
- Nat
Gateway stringId - The ID of the VPC NAT gateway instance to which the NAT IP address block belongs.
- Nat
Ip stringCidr The NAT IP CIDR block to create.
The newly created CIDR block must meet the following requirements:
- It must belong to the 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 CIDR blocks or their subnets.
- The subnet mask length must be between 16 and 32 bits.
- It must not overlap with the private CIDR block of the VPC to which the VPC NAT gateway belongs. If you need to translate a private IP address to another address within the VPC's private CIDR block, create a vSwitch in the corresponding VPC private CIDR block and then create a new VPC NAT gateway in that vSwitch to provide private address translation.
- If you want to use a public CIDR block as the NAT IP CIDR block, the CIDR block must belong to the customer CIDR block of the VPC to which the VPC NAT gateway belongs. For more information about customer CIDR blocks, see What is a customer CIDR block?.
- Nat
Ip stringCidr Description - The description of the NAT IP CIDR block to modify.
The description must be 2 to 256 characters in length, start with a letter or Chinese character, and cannot start with
http://orhttps://. - Nat
Ip stringCidr Name - The name of the NAT IP address block.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or a Chinese character, and cannot start with
http://orhttps://. - Status string
- The status of the NAT IP CIDR block to query.
- create
Time String - (Available since v1.273.0) The time when the NAT IP CIDR block was created.
- dry
Run Boolean - Specifies whether to only precheck this request. Valid values:
- nat
Gateway StringId - The ID of the VPC NAT gateway instance to which the NAT IP address block belongs.
- nat
Ip StringCidr The NAT IP CIDR block to create.
The newly created CIDR block must meet the following requirements:
- It must belong to the 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 CIDR blocks or their subnets.
- The subnet mask length must be between 16 and 32 bits.
- It must not overlap with the private CIDR block of the VPC to which the VPC NAT gateway belongs. If you need to translate a private IP address to another address within the VPC's private CIDR block, create a vSwitch in the corresponding VPC private CIDR block and then create a new VPC NAT gateway in that vSwitch to provide private address translation.
- If you want to use a public CIDR block as the NAT IP CIDR block, the CIDR block must belong to the customer CIDR block of the VPC to which the VPC NAT gateway belongs. For more information about customer CIDR blocks, see What is a customer CIDR block?.
- nat
Ip StringCidr Description - The description of the NAT IP CIDR block to modify.
The description must be 2 to 256 characters in length, start with a letter or Chinese character, and cannot start with
http://orhttps://. - nat
Ip StringCidr Name - The name of the NAT IP address block.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or a Chinese character, and cannot start with
http://orhttps://. - status String
- The status of the NAT IP CIDR block to query.
- create
Time string - (Available since v1.273.0) The time when the NAT IP CIDR block was created.
- dry
Run boolean - Specifies whether to only precheck this request. Valid values:
- nat
Gateway stringId - The ID of the VPC NAT gateway instance to which the NAT IP address block belongs.
- nat
Ip stringCidr The NAT IP CIDR block to create.
The newly created CIDR block must meet the following requirements:
- It must belong to the 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 CIDR blocks or their subnets.
- The subnet mask length must be between 16 and 32 bits.
- It must not overlap with the private CIDR block of the VPC to which the VPC NAT gateway belongs. If you need to translate a private IP address to another address within the VPC's private CIDR block, create a vSwitch in the corresponding VPC private CIDR block and then create a new VPC NAT gateway in that vSwitch to provide private address translation.
- If you want to use a public CIDR block as the NAT IP CIDR block, the CIDR block must belong to the customer CIDR block of the VPC to which the VPC NAT gateway belongs. For more information about customer CIDR blocks, see What is a customer CIDR block?.
- nat
Ip stringCidr Description - The description of the NAT IP CIDR block to modify.
The description must be 2 to 256 characters in length, start with a letter or Chinese character, and cannot start with
http://orhttps://. - nat
Ip stringCidr Name - The name of the NAT IP address block.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or a Chinese character, and cannot start with
http://orhttps://. - status string
- The status of the NAT IP CIDR block to query.
- create_
time str - (Available since v1.273.0) The time when the NAT IP CIDR block was created.
- dry_
run bool - Specifies whether to only precheck this request. Valid values:
- nat_
gateway_ strid - The ID of the VPC NAT gateway instance to which the NAT IP address block belongs.
- nat_
ip_ strcidr The NAT IP CIDR block to create.
The newly created CIDR block must meet the following requirements:
- It must belong to the 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 CIDR blocks or their subnets.
- The subnet mask length must be between 16 and 32 bits.
- It must not overlap with the private CIDR block of the VPC to which the VPC NAT gateway belongs. If you need to translate a private IP address to another address within the VPC's private CIDR block, create a vSwitch in the corresponding VPC private CIDR block and then create a new VPC NAT gateway in that vSwitch to provide private address translation.
- If you want to use a public CIDR block as the NAT IP CIDR block, the CIDR block must belong to the customer CIDR block of the VPC to which the VPC NAT gateway belongs. For more information about customer CIDR blocks, see What is a customer CIDR block?.
- nat_
ip_ strcidr_ description - The description of the NAT IP CIDR block to modify.
The description must be 2 to 256 characters in length, start with a letter or Chinese character, and cannot start with
http://orhttps://. - nat_
ip_ strcidr_ name - The name of the NAT IP address block.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or a Chinese character, and cannot start with
http://orhttps://. - status str
- The status of the NAT IP CIDR block to query.
- create
Time String - (Available since v1.273.0) The time when the NAT IP CIDR block was created.
- dry
Run Boolean - Specifies whether to only precheck this request. Valid values:
- nat
Gateway StringId - The ID of the VPC NAT gateway instance to which the NAT IP address block belongs.
- nat
Ip StringCidr The NAT IP CIDR block to create.
The newly created CIDR block must meet the following requirements:
- It must belong to the 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 CIDR blocks or their subnets.
- The subnet mask length must be between 16 and 32 bits.
- It must not overlap with the private CIDR block of the VPC to which the VPC NAT gateway belongs. If you need to translate a private IP address to another address within the VPC's private CIDR block, create a vSwitch in the corresponding VPC private CIDR block and then create a new VPC NAT gateway in that vSwitch to provide private address translation.
- If you want to use a public CIDR block as the NAT IP CIDR block, the CIDR block must belong to the customer CIDR block of the VPC to which the VPC NAT gateway belongs. For more information about customer CIDR blocks, see What is a customer CIDR block?.
- nat
Ip StringCidr Description - The description of the NAT IP CIDR block to modify.
The description must be 2 to 256 characters in length, start with a letter or Chinese character, and cannot start with
http://orhttps://. - nat
Ip StringCidr Name - The name of the NAT IP address block.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or a Chinese character, and cannot start with
http://orhttps://. - status String
- The status of the NAT IP CIDR block to query.
Import
Nat Gateway Nat Ip Cidr can be imported using the id, e.g.
$ pulumi import alicloud:vpc/natIpCidr:NatIpCidr example <nat_gateway_id>:<nat_ip_cidr>
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.
published on Saturday, Mar 14, 2026 by Pulumi
