1. Packages
  2. Bytepluscc Provider
  3. API Docs
  4. natgateway
  5. NatIp
bytepluscc v0.0.11 published on Wednesday, Jan 21, 2026 by Byteplus
bytepluscc logo
bytepluscc v0.0.11 published on Wednesday, Jan 21, 2026 by Byteplus

    从私网NAT网关所属子网分配,用于IP地址转换。

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
    
    const natGatewayNatIpDemo = new bytepluscc.natgateway.NatIp("NatGatewayNatIpDemo", {
        natGatewayId: "ngw-2hgk22kpfp5a874wjohxxxxx",
        natIpDescription: "NatGatewayNatIpDemo description",
        natIpName: "NatGatewayNatIpDemo",
        natIp: "192.168.xxx.xx",
    });
    
    import pulumi
    import pulumi_bytepluscc as bytepluscc
    
    nat_gateway_nat_ip_demo = bytepluscc.natgateway.NatIp("NatGatewayNatIpDemo",
        nat_gateway_id="ngw-2hgk22kpfp5a874wjohxxxxx",
        nat_ip_description="NatGatewayNatIpDemo description",
        nat_ip_name="NatGatewayNatIpDemo",
        nat_ip="192.168.xxx.xx")
    
    package main
    
    import (
    	"github.com/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc/natgateway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := natgateway.NewNatIp(ctx, "NatGatewayNatIpDemo", &natgateway.NatIpArgs{
    			NatGatewayId:     pulumi.String("ngw-2hgk22kpfp5a874wjohxxxxx"),
    			NatIpDescription: pulumi.String("NatGatewayNatIpDemo description"),
    			NatIpName:        pulumi.String("NatGatewayNatIpDemo"),
    			NatIp:            pulumi.String("192.168.xxx.xx"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Bytepluscc = Byteplus.Pulumi.Bytepluscc;
    
    return await Deployment.RunAsync(() => 
    {
        var natGatewayNatIpDemo = new Bytepluscc.Natgateway.NatIp("NatGatewayNatIpDemo", new()
        {
            NatGatewayId = "ngw-2hgk22kpfp5a874wjohxxxxx",
            NatIpDescription = "NatGatewayNatIpDemo description",
            NatIpName = "NatGatewayNatIpDemo",
            NatIpValue = "192.168.xxx.xx",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.byteplus.bytepluscc.natgateway.NatIp;
    import com.byteplus.bytepluscc.natgateway.NatIpArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var natGatewayNatIpDemo = new NatIp("natGatewayNatIpDemo", NatIpArgs.builder()
                .natGatewayId("ngw-2hgk22kpfp5a874wjohxxxxx")
                .natIpDescription("NatGatewayNatIpDemo description")
                .natIpName("NatGatewayNatIpDemo")
                .natIp("192.168.xxx.xx")
                .build());
    
        }
    }
    
    resources:
      natGatewayNatIpDemo:
        type: bytepluscc:natgateway:NatIp
        name: NatGatewayNatIpDemo
        properties:
          natGatewayId: ngw-2hgk22kpfp5a874wjohxxxxx
          natIpDescription: NatGatewayNatIpDemo description
          natIpName: NatGatewayNatIpDemo
          natIp: 192.168.xxx.xx
    

    Create NatIp Resource

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

    Constructor syntax

    new NatIp(name: string, args: NatIpArgs, opts?: CustomResourceOptions);
    @overload
    def NatIp(resource_name: str,
              args: NatIpArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def NatIp(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              nat_gateway_id: Optional[str] = None,
              nat_ip: Optional[str] = None,
              nat_ip_description: Optional[str] = None,
              nat_ip_name: Optional[str] = None)
    func NewNatIp(ctx *Context, name string, args NatIpArgs, opts ...ResourceOption) (*NatIp, error)
    public NatIp(string name, NatIpArgs args, CustomResourceOptions? opts = null)
    public NatIp(String name, NatIpArgs args)
    public NatIp(String name, NatIpArgs args, CustomResourceOptions options)
    
    type: bytepluscc:natgateway:NatIp
    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 NatIpArgs
    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 NatIpArgs
    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 NatIpArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NatIpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NatIpArgs
    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 natIpResource = new Bytepluscc.Natgateway.NatIp("natIpResource", new()
    {
        NatGatewayId = "string",
        NatIpValue = "string",
        NatIpDescription = "string",
        NatIpName = "string",
    });
    
    example, err := natgateway.NewNatIp(ctx, "natIpResource", &natgateway.NatIpArgs{
    	NatGatewayId:     pulumi.String("string"),
    	NatIp:            pulumi.String("string"),
    	NatIpDescription: pulumi.String("string"),
    	NatIpName:        pulumi.String("string"),
    })
    
    var natIpResource = new NatIp("natIpResource", NatIpArgs.builder()
        .natGatewayId("string")
        .natIp("string")
        .natIpDescription("string")
        .natIpName("string")
        .build());
    
    nat_ip_resource = bytepluscc.natgateway.NatIp("natIpResource",
        nat_gateway_id="string",
        nat_ip="string",
        nat_ip_description="string",
        nat_ip_name="string")
    
    const natIpResource = new bytepluscc.natgateway.NatIp("natIpResource", {
        natGatewayId: "string",
        natIp: "string",
        natIpDescription: "string",
        natIpName: "string",
    });
    
    type: bytepluscc:natgateway:NatIp
    properties:
        natGatewayId: string
        natIp: string
        natIpDescription: string
        natIpName: string
    

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

    NatGatewayId string
    私网NAT网关ID。
    NatIpDescription string
    中转IP的描述。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。
    NatIpName string
    中转IP的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短划线(-)。不填默认为中转IP的ID。
    NatIpValue string
    中转IP的地址。若不填,则系统自动从私网NAT网关所在子网随机分配一个空闲的IP地址。
    NatGatewayId string
    私网NAT网关ID。
    NatIp string
    中转IP的地址。若不填,则系统自动从私网NAT网关所在子网随机分配一个空闲的IP地址。
    NatIpDescription string
    中转IP的描述。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。
    NatIpName string
    中转IP的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短划线(-)。不填默认为中转IP的ID。
    natGatewayId String
    私网NAT网关ID。
    natIp String
    中转IP的地址。若不填,则系统自动从私网NAT网关所在子网随机分配一个空闲的IP地址。
    natIpDescription String
    中转IP的描述。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。
    natIpName String
    中转IP的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短划线(-)。不填默认为中转IP的ID。
    natGatewayId string
    私网NAT网关ID。
    natIp string
    中转IP的地址。若不填,则系统自动从私网NAT网关所在子网随机分配一个空闲的IP地址。
    natIpDescription string
    中转IP的描述。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。
    natIpName string
    中转IP的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短划线(-)。不填默认为中转IP的ID。
    nat_gateway_id str
    私网NAT网关ID。
    nat_ip str
    中转IP的地址。若不填,则系统自动从私网NAT网关所在子网随机分配一个空闲的IP地址。
    nat_ip_description str
    中转IP的描述。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。
    nat_ip_name str
    中转IP的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短划线(-)。不填默认为中转IP的ID。
    natGatewayId String
    私网NAT网关ID。
    natIp String
    中转IP的地址。若不填,则系统自动从私网NAT网关所在子网随机分配一个空闲的IP地址。
    natIpDescription String
    中转IP的描述。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。
    natIpName String
    中转IP的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短划线(-)。不填默认为中转IP的ID。

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    IsDefault bool
    是否为默认中转IP。true:是。false:否。
    NatIpId string
    中转IP的ID。
    Status string
    中转IP的状态。Creating:创建中。Available:可用。Deleting:删除中。Deleted:已删除。
    UsingStatus string
    中转IP的使用状态。Idle:未使用。UsedBySnat:被SNAT规则使用。UsedByDnat:被DNAT规则使用。UsedByNat:被SNAT/DNAT规则同时使用。
    Id string
    The provider-assigned unique ID for this managed resource.
    IsDefault bool
    是否为默认中转IP。true:是。false:否。
    NatIpId string
    中转IP的ID。
    Status string
    中转IP的状态。Creating:创建中。Available:可用。Deleting:删除中。Deleted:已删除。
    UsingStatus string
    中转IP的使用状态。Idle:未使用。UsedBySnat:被SNAT规则使用。UsedByDnat:被DNAT规则使用。UsedByNat:被SNAT/DNAT规则同时使用。
    id String
    The provider-assigned unique ID for this managed resource.
    isDefault Boolean
    是否为默认中转IP。true:是。false:否。
    natIpId String
    中转IP的ID。
    status String
    中转IP的状态。Creating:创建中。Available:可用。Deleting:删除中。Deleted:已删除。
    usingStatus String
    中转IP的使用状态。Idle:未使用。UsedBySnat:被SNAT规则使用。UsedByDnat:被DNAT规则使用。UsedByNat:被SNAT/DNAT规则同时使用。
    id string
    The provider-assigned unique ID for this managed resource.
    isDefault boolean
    是否为默认中转IP。true:是。false:否。
    natIpId string
    中转IP的ID。
    status string
    中转IP的状态。Creating:创建中。Available:可用。Deleting:删除中。Deleted:已删除。
    usingStatus string
    中转IP的使用状态。Idle:未使用。UsedBySnat:被SNAT规则使用。UsedByDnat:被DNAT规则使用。UsedByNat:被SNAT/DNAT规则同时使用。
    id str
    The provider-assigned unique ID for this managed resource.
    is_default bool
    是否为默认中转IP。true:是。false:否。
    nat_ip_id str
    中转IP的ID。
    status str
    中转IP的状态。Creating:创建中。Available:可用。Deleting:删除中。Deleted:已删除。
    using_status str
    中转IP的使用状态。Idle:未使用。UsedBySnat:被SNAT规则使用。UsedByDnat:被DNAT规则使用。UsedByNat:被SNAT/DNAT规则同时使用。
    id String
    The provider-assigned unique ID for this managed resource.
    isDefault Boolean
    是否为默认中转IP。true:是。false:否。
    natIpId String
    中转IP的ID。
    status String
    中转IP的状态。Creating:创建中。Available:可用。Deleting:删除中。Deleted:已删除。
    usingStatus String
    中转IP的使用状态。Idle:未使用。UsedBySnat:被SNAT规则使用。UsedByDnat:被DNAT规则使用。UsedByNat:被SNAT/DNAT规则同时使用。

    Look up Existing NatIp Resource

    Get an existing NatIp 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?: NatIpState, opts?: CustomResourceOptions): NatIp
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            is_default: Optional[bool] = None,
            nat_gateway_id: Optional[str] = None,
            nat_ip: Optional[str] = None,
            nat_ip_description: Optional[str] = None,
            nat_ip_id: Optional[str] = None,
            nat_ip_name: Optional[str] = None,
            status: Optional[str] = None,
            using_status: Optional[str] = None) -> NatIp
    func GetNatIp(ctx *Context, name string, id IDInput, state *NatIpState, opts ...ResourceOption) (*NatIp, error)
    public static NatIp Get(string name, Input<string> id, NatIpState? state, CustomResourceOptions? opts = null)
    public static NatIp get(String name, Output<String> id, NatIpState state, CustomResourceOptions options)
    resources:  _:    type: bytepluscc:natgateway:NatIp    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    IsDefault bool
    是否为默认中转IP。true:是。false:否。
    NatGatewayId string
    私网NAT网关ID。
    NatIpDescription string
    中转IP的描述。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。
    NatIpId string
    中转IP的ID。
    NatIpName string
    中转IP的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短划线(-)。不填默认为中转IP的ID。
    NatIpValue string
    中转IP的地址。若不填,则系统自动从私网NAT网关所在子网随机分配一个空闲的IP地址。
    Status string
    中转IP的状态。Creating:创建中。Available:可用。Deleting:删除中。Deleted:已删除。
    UsingStatus string
    中转IP的使用状态。Idle:未使用。UsedBySnat:被SNAT规则使用。UsedByDnat:被DNAT规则使用。UsedByNat:被SNAT/DNAT规则同时使用。
    IsDefault bool
    是否为默认中转IP。true:是。false:否。
    NatGatewayId string
    私网NAT网关ID。
    NatIp string
    中转IP的地址。若不填,则系统自动从私网NAT网关所在子网随机分配一个空闲的IP地址。
    NatIpDescription string
    中转IP的描述。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。
    NatIpId string
    中转IP的ID。
    NatIpName string
    中转IP的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短划线(-)。不填默认为中转IP的ID。
    Status string
    中转IP的状态。Creating:创建中。Available:可用。Deleting:删除中。Deleted:已删除。
    UsingStatus string
    中转IP的使用状态。Idle:未使用。UsedBySnat:被SNAT规则使用。UsedByDnat:被DNAT规则使用。UsedByNat:被SNAT/DNAT规则同时使用。
    isDefault Boolean
    是否为默认中转IP。true:是。false:否。
    natGatewayId String
    私网NAT网关ID。
    natIp String
    中转IP的地址。若不填,则系统自动从私网NAT网关所在子网随机分配一个空闲的IP地址。
    natIpDescription String
    中转IP的描述。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。
    natIpId String
    中转IP的ID。
    natIpName String
    中转IP的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短划线(-)。不填默认为中转IP的ID。
    status String
    中转IP的状态。Creating:创建中。Available:可用。Deleting:删除中。Deleted:已删除。
    usingStatus String
    中转IP的使用状态。Idle:未使用。UsedBySnat:被SNAT规则使用。UsedByDnat:被DNAT规则使用。UsedByNat:被SNAT/DNAT规则同时使用。
    isDefault boolean
    是否为默认中转IP。true:是。false:否。
    natGatewayId string
    私网NAT网关ID。
    natIp string
    中转IP的地址。若不填,则系统自动从私网NAT网关所在子网随机分配一个空闲的IP地址。
    natIpDescription string
    中转IP的描述。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。
    natIpId string
    中转IP的ID。
    natIpName string
    中转IP的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短划线(-)。不填默认为中转IP的ID。
    status string
    中转IP的状态。Creating:创建中。Available:可用。Deleting:删除中。Deleted:已删除。
    usingStatus string
    中转IP的使用状态。Idle:未使用。UsedBySnat:被SNAT规则使用。UsedByDnat:被DNAT规则使用。UsedByNat:被SNAT/DNAT规则同时使用。
    is_default bool
    是否为默认中转IP。true:是。false:否。
    nat_gateway_id str
    私网NAT网关ID。
    nat_ip str
    中转IP的地址。若不填,则系统自动从私网NAT网关所在子网随机分配一个空闲的IP地址。
    nat_ip_description str
    中转IP的描述。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。
    nat_ip_id str
    中转IP的ID。
    nat_ip_name str
    中转IP的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短划线(-)。不填默认为中转IP的ID。
    status str
    中转IP的状态。Creating:创建中。Available:可用。Deleting:删除中。Deleted:已删除。
    using_status str
    中转IP的使用状态。Idle:未使用。UsedBySnat:被SNAT规则使用。UsedByDnat:被DNAT规则使用。UsedByNat:被SNAT/DNAT规则同时使用。
    isDefault Boolean
    是否为默认中转IP。true:是。false:否。
    natGatewayId String
    私网NAT网关ID。
    natIp String
    中转IP的地址。若不填,则系统自动从私网NAT网关所在子网随机分配一个空闲的IP地址。
    natIpDescription String
    中转IP的描述。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。
    natIpId String
    中转IP的ID。
    natIpName String
    中转IP的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短划线(-)。不填默认为中转IP的ID。
    status String
    中转IP的状态。Creating:创建中。Available:可用。Deleting:删除中。Deleted:已删除。
    usingStatus String
    中转IP的使用状态。Idle:未使用。UsedBySnat:被SNAT规则使用。UsedByDnat:被DNAT规则使用。UsedByNat:被SNAT/DNAT规则同时使用。

    Import

    $ pulumi import bytepluscc:natgateway/natIp:NatIp example "nat_ip_id"
    

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

    Package Details

    Repository
    bytepluscc byteplus-sdk/pulumi-bytepluscc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the bytepluscc Terraform Provider.
    bytepluscc logo
    bytepluscc v0.0.11 published on Wednesday, Jan 21, 2026 by Byteplus
      Meet Neo: Your AI Platform Teammate