Volcengine v0.0.39 published on Friday, Nov 21, 2025 by Volcengine
Volcengine v0.0.39 published on Friday, Nov 21, 2025 by Volcengine
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 getIps
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 getIps(args: GetIpsArgs, opts?: InvokeOptions): Promise<GetIpsResult>
function getIpsOutput(args: GetIpsOutputArgs, opts?: InvokeOptions): Output<GetIpsResult>def get_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) -> GetIpsResult
def get_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[GetIpsResult]func GetIps(ctx *Context, args *GetIpsArgs, opts ...InvokeOption) (*GetIpsResult, error)
func GetIpsOutput(ctx *Context, args *GetIpsOutputArgs, opts ...InvokeOption) GetIpsResultOutput> Note: This function is named GetIps in the Go SDK.
public static class GetIps
{
public static Task<GetIpsResult> InvokeAsync(GetIpsArgs args, InvokeOptions? opts = null)
public static Output<GetIpsResult> Invoke(GetIpsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetIpsResult> getIps(GetIpsArgs args, InvokeOptions options)
public static Output<GetIpsResult> getIps(GetIpsArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:nat/getIps:getIps
arguments:
# arguments dictionaryThe following arguments are supported:
- Nat
Gateway stringId - The id of the Nat gateway.
- Ids List<string>
- A list of Nat IP ids.
- Name
Regex string - The Name Regex of Nat ip.
- Nat
Ip stringName - The name of the Nat IP.
- Output
File string - File name where to save data source results.
- Nat
Gateway stringId - The id of the Nat gateway.
- Ids []string
- A list of Nat IP ids.
- Name
Regex string - The Name Regex of Nat ip.
- Nat
Ip stringName - The name of the Nat IP.
- Output
File string - File name where to save data source results.
- nat
Gateway StringId - The id of the Nat gateway.
- ids List<String>
- A list of Nat IP ids.
- name
Regex String - The Name Regex of Nat ip.
- nat
Ip StringName - The name of the Nat IP.
- output
File String - File name where to save data source results.
- nat
Gateway stringId - The id of the Nat gateway.
- ids string[]
- A list of Nat IP ids.
- name
Regex string - The Name Regex of Nat ip.
- nat
Ip stringName - The name of the Nat IP.
- output
File string - File name where to save data source results.
- nat_
gateway_ strid - 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_ strname - The name of the Nat IP.
- output_
file str - File name where to save data source results.
- nat
Gateway StringId - The id of the Nat gateway.
- ids List<String>
- A list of Nat IP ids.
- name
Regex String - The Name Regex of Nat ip.
- nat
Ip StringName - The name of the Nat IP.
- output
File String - File name where to save data source results.
getIps Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Nat
Gateway stringId - The id of the Nat gateway.
- Nat
Ips List<GetIps Nat Ip> - The collection of query.
- Total
Count int - The total count of query.
- Ids List<string>
- Name
Regex string - Nat
Ip stringName - The name of the Nat Ip.
- Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Nat
Gateway stringId - The id of the Nat gateway.
- Nat
Ips []GetIps Nat Ip - The collection of query.
- Total
Count int - The total count of query.
- Ids []string
- Name
Regex string - Nat
Ip stringName - The name of the Nat Ip.
- Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- nat
Gateway StringId - The id of the Nat gateway.
- nat
Ips List<GetIps Nat Ip> - The collection of query.
- total
Count Integer - The total count of query.
- ids List<String>
- name
Regex String - nat
Ip StringName - The name of the Nat Ip.
- output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- nat
Gateway stringId - The id of the Nat gateway.
- nat
Ips GetIps Nat Ip[] - The collection of query.
- total
Count number - The total count of query.
- ids string[]
- name
Regex string - nat
Ip stringName - The name of the Nat Ip.
- output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- nat_
gateway_ strid - The id of the Nat gateway.
- nat_
ips Sequence[GetIps Nat Ip] - The collection of query.
- total_
count int - The total count of query.
- ids Sequence[str]
- name_
regex str - nat_
ip_ strname - The name of the Nat Ip.
- output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- nat
Gateway StringId - The id of the Nat gateway.
- nat
Ips List<Property Map> - The collection of query.
- total
Count Number - The total count of query.
- ids List<String>
- name
Regex String - nat
Ip StringName - The name of the Nat Ip.
- output
File String
Supporting Types
GetIpsNatIp
- Id string
- The id of the Nat Ip.
- Is
Default bool - Whether the Ip is the default Nat Ip.
- Nat
Gateway stringId - The id of the Nat gateway.
- Nat
Ip string - The ip address of the Nat Ip.
- Nat
Ip stringDescription - The description of the Nat Ip.
- Nat
Ip stringId - The id of the Nat Ip.
- Nat
Ip stringName - The name of the Nat IP.
- Status string
- The status of the Nat Ip.
- Using
Status string - The using status of the Nat Ip.
- Id string
- The id of the Nat Ip.
- Is
Default bool - Whether the Ip is the default Nat Ip.
- Nat
Gateway stringId - The id of the Nat gateway.
- Nat
Ip string - The ip address of the Nat Ip.
- Nat
Ip stringDescription - The description of the Nat Ip.
- Nat
Ip stringId - The id of the Nat Ip.
- Nat
Ip stringName - The name of the Nat IP.
- Status string
- The status of the Nat Ip.
- Using
Status string - The using status of the Nat Ip.
- id String
- The id of the Nat Ip.
- is
Default Boolean - Whether the Ip is the default Nat Ip.
- nat
Gateway StringId - The id of the Nat gateway.
- nat
Ip String - The ip address of the Nat Ip.
- nat
Ip StringDescription - The description of the Nat Ip.
- nat
Ip StringId - The id of the Nat Ip.
- nat
Ip StringName - The name of the Nat IP.
- status String
- The status of the Nat Ip.
- using
Status String - The using status of the Nat Ip.
- id string
- The id of the Nat Ip.
- is
Default boolean - Whether the Ip is the default Nat Ip.
- nat
Gateway stringId - The id of the Nat gateway.
- nat
Ip string - The ip address of the Nat Ip.
- nat
Ip stringDescription - The description of the Nat Ip.
- nat
Ip stringId - The id of the Nat Ip.
- nat
Ip stringName - The name of the Nat IP.
- status string
- The status of the Nat Ip.
- using
Status 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_ strid - The id of the Nat gateway.
- nat_
ip str - The ip address of the Nat Ip.
- nat_
ip_ strdescription - The description of the Nat Ip.
- nat_
ip_ strid - The id of the Nat Ip.
- nat_
ip_ strname - 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.
- is
Default Boolean - Whether the Ip is the default Nat Ip.
- nat
Gateway StringId - The id of the Nat gateway.
- nat
Ip String - The ip address of the Nat Ip.
- nat
Ip StringDescription - The description of the Nat Ip.
- nat
Ip StringId - The id of the Nat Ip.
- nat
Ip StringName - The name of the Nat IP.
- status String
- The status of the Nat Ip.
- using
Status 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
volcengineTerraform Provider.
Volcengine v0.0.39 published on Friday, Nov 21, 2025 by Volcengine
