1. Packages
  2. Volcengine
  3. API Docs
  4. nat
  5. Ips
Volcengine v0.0.39 published on Friday, Nov 21, 2025 by Volcengine
volcengine logo
Volcengine v0.0.39 published on Friday, Nov 21, 2025 by Volcengine
    Deprecated: volcengine.nat.Ips has been deprecated in favor of volcengine.nat.getIps

    Use this data source to query detailed information of nat ips

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    import * as volcengine from "@volcengine/pulumi";
    
    const fooZones = volcengine.ecs.getZones({});
    const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
        vpcName: "acc-test-vpc",
        cidrBlock: "172.16.0.0/16",
    });
    const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
        subnetName: "acc-test-subnet",
        cidrBlock: "172.16.0.0/24",
        zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
        vpcId: fooVpc.id,
    });
    const intranetNatGateway = new volcengine.nat.Gateway("intranetNatGateway", {
        vpcId: fooVpc.id,
        subnetId: fooSubnet.id,
        natGatewayName: "acc-test-intranet_ng",
        description: "acc-test",
        networkType: "intranet",
        billingType: "PostPaidByUsage",
        projectName: "default",
        tags: [{
            key: "k1",
            value: "v1",
        }],
    });
    const fooIp = new volcengine.nat.Ip("fooIp", {
        natGatewayId: intranetNatGateway.id,
        natIpName: "acc-test-nat-ip",
        natIpDescription: "acc-test",
        natIp: "172.16.0.3",
    });
    const fooIps = volcengine.nat.getIpsOutput({
        natGatewayId: intranetNatGateway.id,
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo_zones = volcengine.ecs.get_zones()
    foo_vpc = volcengine.vpc.Vpc("fooVpc",
        vpc_name="acc-test-vpc",
        cidr_block="172.16.0.0/16")
    foo_subnet = volcengine.vpc.Subnet("fooSubnet",
        subnet_name="acc-test-subnet",
        cidr_block="172.16.0.0/24",
        zone_id=foo_zones.zones[0].id,
        vpc_id=foo_vpc.id)
    intranet_nat_gateway = volcengine.nat.Gateway("intranetNatGateway",
        vpc_id=foo_vpc.id,
        subnet_id=foo_subnet.id,
        nat_gateway_name="acc-test-intranet_ng",
        description="acc-test",
        network_type="intranet",
        billing_type="PostPaidByUsage",
        project_name="default",
        tags=[volcengine.nat.GatewayTagArgs(
            key="k1",
            value="v1",
        )])
    foo_ip = volcengine.nat.Ip("fooIp",
        nat_gateway_id=intranet_nat_gateway.id,
        nat_ip_name="acc-test-nat-ip",
        nat_ip_description="acc-test",
        nat_ip="172.16.0.3")
    foo_ips = volcengine.nat.get_ips_output(nat_gateway_id=intranet_nat_gateway.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/nat"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fooZones, err := ecs.GetZones(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
    			VpcName:   pulumi.String("acc-test-vpc"),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
    			SubnetName: pulumi.String("acc-test-subnet"),
    			CidrBlock:  pulumi.String("172.16.0.0/24"),
    			ZoneId:     pulumi.String(fooZones.Zones[0].Id),
    			VpcId:      fooVpc.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		intranetNatGateway, err := nat.NewGateway(ctx, "intranetNatGateway", &nat.GatewayArgs{
    			VpcId:          fooVpc.ID(),
    			SubnetId:       fooSubnet.ID(),
    			NatGatewayName: pulumi.String("acc-test-intranet_ng"),
    			Description:    pulumi.String("acc-test"),
    			NetworkType:    pulumi.String("intranet"),
    			BillingType:    pulumi.String("PostPaidByUsage"),
    			ProjectName:    pulumi.String("default"),
    			Tags: nat.GatewayTagArray{
    				&nat.GatewayTagArgs{
    					Key:   pulumi.String("k1"),
    					Value: pulumi.String("v1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = nat.NewIp(ctx, "fooIp", &nat.IpArgs{
    			NatGatewayId:     intranetNatGateway.ID(),
    			NatIpName:        pulumi.String("acc-test-nat-ip"),
    			NatIpDescription: pulumi.String("acc-test"),
    			NatIp:            pulumi.String("172.16.0.3"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = nat.GetIpsOutput(ctx, nat.GetIpsOutputArgs{
    			NatGatewayId: intranetNatGateway.ID(),
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var fooZones = Volcengine.Ecs.GetZones.Invoke();
    
        var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
        {
            VpcName = "acc-test-vpc",
            CidrBlock = "172.16.0.0/16",
        });
    
        var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
        {
            SubnetName = "acc-test-subnet",
            CidrBlock = "172.16.0.0/24",
            ZoneId = fooZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            VpcId = fooVpc.Id,
        });
    
        var intranetNatGateway = new Volcengine.Nat.Gateway("intranetNatGateway", new()
        {
            VpcId = fooVpc.Id,
            SubnetId = fooSubnet.Id,
            NatGatewayName = "acc-test-intranet_ng",
            Description = "acc-test",
            NetworkType = "intranet",
            BillingType = "PostPaidByUsage",
            ProjectName = "default",
            Tags = new[]
            {
                new Volcengine.Nat.Inputs.GatewayTagArgs
                {
                    Key = "k1",
                    Value = "v1",
                },
            },
        });
    
        var fooIp = new Volcengine.Nat.Ip("fooIp", new()
        {
            NatGatewayId = intranetNatGateway.Id,
            NatIpName = "acc-test-nat-ip",
            NatIpDescription = "acc-test",
            NatIp = "172.16.0.3",
        });
    
        var fooIps = Volcengine.Nat.GetIps.Invoke(new()
        {
            NatGatewayId = intranetNatGateway.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.ecs.EcsFunctions;
    import com.pulumi.volcengine.ecs.inputs.GetZonesArgs;
    import com.pulumi.volcengine.vpc.Vpc;
    import com.pulumi.volcengine.vpc.VpcArgs;
    import com.pulumi.volcengine.vpc.Subnet;
    import com.pulumi.volcengine.vpc.SubnetArgs;
    import com.pulumi.volcengine.nat.Gateway;
    import com.pulumi.volcengine.nat.GatewayArgs;
    import com.pulumi.volcengine.nat.inputs.GatewayTagArgs;
    import com.pulumi.volcengine.nat.Ip;
    import com.pulumi.volcengine.nat.IpArgs;
    import com.pulumi.volcengine.nat.NatFunctions;
    import com.pulumi.volcengine.nat.inputs.GetIpsArgs;
    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 fooZones = EcsFunctions.getZones();
    
            var fooVpc = new Vpc("fooVpc", VpcArgs.builder()        
                .vpcName("acc-test-vpc")
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()        
                .subnetName("acc-test-subnet")
                .cidrBlock("172.16.0.0/24")
                .zoneId(fooZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .vpcId(fooVpc.id())
                .build());
    
            var intranetNatGateway = new Gateway("intranetNatGateway", GatewayArgs.builder()        
                .vpcId(fooVpc.id())
                .subnetId(fooSubnet.id())
                .natGatewayName("acc-test-intranet_ng")
                .description("acc-test")
                .networkType("intranet")
                .billingType("PostPaidByUsage")
                .projectName("default")
                .tags(GatewayTagArgs.builder()
                    .key("k1")
                    .value("v1")
                    .build())
                .build());
    
            var fooIp = new Ip("fooIp", IpArgs.builder()        
                .natGatewayId(intranetNatGateway.id())
                .natIpName("acc-test-nat-ip")
                .natIpDescription("acc-test")
                .natIp("172.16.0.3")
                .build());
    
            final var fooIps = NatFunctions.getIps(GetIpsArgs.builder()
                .natGatewayId(intranetNatGateway.id())
                .build());
    
        }
    }
    
    resources:
      fooVpc:
        type: volcengine:vpc:Vpc
        properties:
          vpcName: acc-test-vpc
          cidrBlock: 172.16.0.0/16
      fooSubnet:
        type: volcengine:vpc:Subnet
        properties:
          subnetName: acc-test-subnet
          cidrBlock: 172.16.0.0/24
          zoneId: ${fooZones.zones[0].id}
          vpcId: ${fooVpc.id}
      intranetNatGateway:
        type: volcengine:nat:Gateway
        properties:
          vpcId: ${fooVpc.id}
          subnetId: ${fooSubnet.id}
          natGatewayName: acc-test-intranet_ng
          description: acc-test
          networkType: intranet
          billingType: PostPaidByUsage
          projectName: default
          tags:
            - key: k1
              value: v1
      fooIp:
        type: volcengine:nat:Ip
        properties:
          natGatewayId: ${intranetNatGateway.id}
          natIpName: acc-test-nat-ip
          natIpDescription: acc-test
          natIp: 172.16.0.3
    variables:
      fooZones:
        fn::invoke:
          Function: volcengine:ecs:getZones
          Arguments: {}
      fooIps:
        fn::invoke:
          Function: volcengine:nat:getIps
          Arguments:
            natGatewayId: ${intranetNatGateway.id}
    

    Using Ips

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function ips(args: IpsArgs, opts?: InvokeOptions): Promise<IpsResult>
    function ipsOutput(args: IpsOutputArgs, opts?: InvokeOptions): Output<IpsResult>
    def ips(ids: Optional[Sequence[str]] = None,
            name_regex: Optional[str] = None,
            nat_gateway_id: Optional[str] = None,
            nat_ip_name: Optional[str] = None,
            output_file: Optional[str] = None,
            opts: Optional[InvokeOptions] = None) -> IpsResult
    def ips_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            name_regex: Optional[pulumi.Input[str]] = None,
            nat_gateway_id: Optional[pulumi.Input[str]] = None,
            nat_ip_name: Optional[pulumi.Input[str]] = None,
            output_file: Optional[pulumi.Input[str]] = None,
            opts: Optional[InvokeOptions] = None) -> Output[IpsResult]
    func Ips(ctx *Context, args *IpsArgs, opts ...InvokeOption) (*IpsResult, error)
    func IpsOutput(ctx *Context, args *IpsOutputArgs, opts ...InvokeOption) IpsResultOutput
    public static class Ips 
    {
        public static Task<IpsResult> InvokeAsync(IpsArgs args, InvokeOptions? opts = null)
        public static Output<IpsResult> Invoke(IpsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<IpsResult> ips(IpsArgs args, InvokeOptions options)
    public static Output<IpsResult> ips(IpsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:nat:Ips
      arguments:
        # arguments dictionary

    The following arguments are supported:

    NatGatewayId string
    The id of the Nat gateway.
    Ids List<string>
    A list of Nat IP ids.
    NameRegex string
    The Name Regex of Nat ip.
    NatIpName string
    The name of the Nat IP.
    OutputFile string
    File name where to save data source results.
    NatGatewayId string
    The id of the Nat gateway.
    Ids []string
    A list of Nat IP ids.
    NameRegex string
    The Name Regex of Nat ip.
    NatIpName string
    The name of the Nat IP.
    OutputFile string
    File name where to save data source results.
    natGatewayId String
    The id of the Nat gateway.
    ids List<String>
    A list of Nat IP ids.
    nameRegex String
    The Name Regex of Nat ip.
    natIpName String
    The name of the Nat IP.
    outputFile String
    File name where to save data source results.
    natGatewayId string
    The id of the Nat gateway.
    ids string[]
    A list of Nat IP ids.
    nameRegex string
    The Name Regex of Nat ip.
    natIpName string
    The name of the Nat IP.
    outputFile string
    File name where to save data source results.
    nat_gateway_id str
    The id of the Nat gateway.
    ids Sequence[str]
    A list of Nat IP ids.
    name_regex str
    The Name Regex of Nat ip.
    nat_ip_name str
    The name of the Nat IP.
    output_file str
    File name where to save data source results.
    natGatewayId String
    The id of the Nat gateway.
    ids List<String>
    A list of Nat IP ids.
    nameRegex String
    The Name Regex of Nat ip.
    natIpName String
    The name of the Nat IP.
    outputFile String
    File name where to save data source results.

    Ips Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    NatGatewayId string
    The id of the Nat gateway.
    NatIps List<IpsNatIp>
    The collection of query.
    TotalCount int
    The total count of query.
    Ids List<string>
    NameRegex string
    NatIpName string
    The name of the Nat Ip.
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    NatGatewayId string
    The id of the Nat gateway.
    NatIps []IpsNatIp
    The collection of query.
    TotalCount int
    The total count of query.
    Ids []string
    NameRegex string
    NatIpName string
    The name of the Nat Ip.
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    natGatewayId String
    The id of the Nat gateway.
    natIps List<IpsNatIp>
    The collection of query.
    totalCount Integer
    The total count of query.
    ids List<String>
    nameRegex String
    natIpName String
    The name of the Nat Ip.
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    natGatewayId string
    The id of the Nat gateway.
    natIps IpsNatIp[]
    The collection of query.
    totalCount number
    The total count of query.
    ids string[]
    nameRegex string
    natIpName string
    The name of the Nat Ip.
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    nat_gateway_id str
    The id of the Nat gateway.
    nat_ips Sequence[IpsNatIp]
    The collection of query.
    total_count int
    The total count of query.
    ids Sequence[str]
    name_regex str
    nat_ip_name str
    The name of the Nat Ip.
    output_file str
    id String
    The provider-assigned unique ID for this managed resource.
    natGatewayId String
    The id of the Nat gateway.
    natIps List<Property Map>
    The collection of query.
    totalCount Number
    The total count of query.
    ids List<String>
    nameRegex String
    natIpName String
    The name of the Nat Ip.
    outputFile String

    Supporting Types

    IpsNatIp

    Id string
    The id of the Nat Ip.
    IsDefault bool
    Whether the Ip is the default Nat Ip.
    NatGatewayId string
    The id of the Nat gateway.
    NatIp string
    The ip address of the Nat Ip.
    NatIpDescription string
    The description of the Nat Ip.
    NatIpId string
    The id of the Nat Ip.
    NatIpName string
    The name of the Nat IP.
    Status string
    The status of the Nat Ip.
    UsingStatus string
    The using status of the Nat Ip.
    Id string
    The id of the Nat Ip.
    IsDefault bool
    Whether the Ip is the default Nat Ip.
    NatGatewayId string
    The id of the Nat gateway.
    NatIp string
    The ip address of the Nat Ip.
    NatIpDescription string
    The description of the Nat Ip.
    NatIpId string
    The id of the Nat Ip.
    NatIpName string
    The name of the Nat IP.
    Status string
    The status of the Nat Ip.
    UsingStatus string
    The using status of the Nat Ip.
    id String
    The id of the Nat Ip.
    isDefault Boolean
    Whether the Ip is the default Nat Ip.
    natGatewayId String
    The id of the Nat gateway.
    natIp String
    The ip address of the Nat Ip.
    natIpDescription String
    The description of the Nat Ip.
    natIpId String
    The id of the Nat Ip.
    natIpName String
    The name of the Nat IP.
    status String
    The status of the Nat Ip.
    usingStatus String
    The using status of the Nat Ip.
    id string
    The id of the Nat Ip.
    isDefault boolean
    Whether the Ip is the default Nat Ip.
    natGatewayId string
    The id of the Nat gateway.
    natIp string
    The ip address of the Nat Ip.
    natIpDescription string
    The description of the Nat Ip.
    natIpId string
    The id of the Nat Ip.
    natIpName string
    The name of the Nat IP.
    status string
    The status of the Nat Ip.
    usingStatus string
    The using status of the Nat Ip.
    id str
    The id of the Nat Ip.
    is_default bool
    Whether the Ip is the default Nat Ip.
    nat_gateway_id str
    The id of the Nat gateway.
    nat_ip str
    The ip address of the Nat Ip.
    nat_ip_description str
    The description of the Nat Ip.
    nat_ip_id str
    The id of the Nat Ip.
    nat_ip_name str
    The name of the Nat IP.
    status str
    The status of the Nat Ip.
    using_status str
    The using status of the Nat Ip.
    id String
    The id of the Nat Ip.
    isDefault Boolean
    Whether the Ip is the default Nat Ip.
    natGatewayId String
    The id of the Nat gateway.
    natIp String
    The ip address of the Nat Ip.
    natIpDescription String
    The description of the Nat Ip.
    natIpId String
    The id of the Nat Ip.
    natIpName String
    The name of the Nat IP.
    status String
    The status of the Nat Ip.
    usingStatus String
    The using status of the Nat Ip.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.39 published on Friday, Nov 21, 2025 by Volcengine
      Meet Neo: Your AI Platform Teammate