Viewing docs for ucloud 1.39.3
published on Wednesday, Mar 11, 2026 by ucloud
published on Wednesday, Mar 11, 2026 by ucloud
Viewing docs for ucloud 1.39.3
published on Wednesday, Mar 11, 2026 by ucloud
published on Wednesday, Mar 11, 2026 by ucloud
This data source providers a list of Nat Gateway resources according to their ID and name.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ucloud from "@pulumi/ucloud";
const example = ucloud.getNatGateways({});
export const first = example.then(example => example.natGateways?.[0]?.id);
import pulumi
import pulumi_ucloud as ucloud
example = ucloud.get_nat_gateways()
pulumi.export("first", example.nat_gateways[0].id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := ucloud.GetNatGateways(ctx, &ucloud.GetNatGatewaysArgs{}, nil)
if err != nil {
return err
}
ctx.Export("first", example.NatGateways[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ucloud = Pulumi.Ucloud;
return await Deployment.RunAsync(() =>
{
var example = Ucloud.GetNatGateways.Invoke();
return new Dictionary<string, object?>
{
["first"] = example.Apply(getNatGatewaysResult => getNatGatewaysResult.NatGateways[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ucloud.UcloudFunctions;
import com.pulumi.ucloud.inputs.GetNatGatewaysArgs;
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 example = UcloudFunctions.getNatGateways(GetNatGatewaysArgs.builder()
.build());
ctx.export("first", example.natGateways()[0].id());
}
}
variables:
example:
fn::invoke:
function: ucloud:getNatGateways
arguments: {}
outputs:
first: ${example.natGateways[0].id}
Using getNatGateways
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 getNatGateways(args: GetNatGatewaysArgs, opts?: InvokeOptions): Promise<GetNatGatewaysResult>
function getNatGatewaysOutput(args: GetNatGatewaysOutputArgs, opts?: InvokeOptions): Output<GetNatGatewaysResult>def get_nat_gateways(id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNatGatewaysResult
def get_nat_gateways_output(id: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNatGatewaysResult]func GetNatGateways(ctx *Context, args *GetNatGatewaysArgs, opts ...InvokeOption) (*GetNatGatewaysResult, error)
func GetNatGatewaysOutput(ctx *Context, args *GetNatGatewaysOutputArgs, opts ...InvokeOption) GetNatGatewaysResultOutput> Note: This function is named GetNatGateways in the Go SDK.
public static class GetNatGateways
{
public static Task<GetNatGatewaysResult> InvokeAsync(GetNatGatewaysArgs args, InvokeOptions? opts = null)
public static Output<GetNatGatewaysResult> Invoke(GetNatGatewaysInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNatGatewaysResult> getNatGateways(GetNatGatewaysArgs args, InvokeOptions options)
public static Output<GetNatGatewaysResult> getNatGateways(GetNatGatewaysArgs args, InvokeOptions options)
fn::invoke:
function: ucloud:index/getNatGateways:getNatGateways
arguments:
# arguments dictionaryThe following arguments are supported:
- Id string
- The ID of Nat Gateway.
- Ids List<string>
- A list of Nat Gateway IDs, all the Nat Gateways belongs to the defined region will be retrieved if this argument is
[]. - Name
Regex string - A regex string to filter resulting Nat Gateways by name.
- Output
File string - File name where to save data source results (after running
pulumi preview).
- Id string
- The ID of Nat Gateway.
- Ids []string
- A list of Nat Gateway IDs, all the Nat Gateways belongs to the defined region will be retrieved if this argument is
[]. - Name
Regex string - A regex string to filter resulting Nat Gateways by name.
- Output
File string - File name where to save data source results (after running
pulumi preview).
- id String
- The ID of Nat Gateway.
- ids List<String>
- A list of Nat Gateway IDs, all the Nat Gateways belongs to the defined region will be retrieved if this argument is
[]. - name
Regex String - A regex string to filter resulting Nat Gateways by name.
- output
File String - File name where to save data source results (after running
pulumi preview).
- id string
- The ID of Nat Gateway.
- ids string[]
- A list of Nat Gateway IDs, all the Nat Gateways belongs to the defined region will be retrieved if this argument is
[]. - name
Regex string - A regex string to filter resulting Nat Gateways by name.
- output
File string - File name where to save data source results (after running
pulumi preview).
- id str
- The ID of Nat Gateway.
- ids Sequence[str]
- A list of Nat Gateway IDs, all the Nat Gateways belongs to the defined region will be retrieved if this argument is
[]. - name_
regex str - A regex string to filter resulting Nat Gateways by name.
- output_
file str - File name where to save data source results (after running
pulumi preview).
- id String
- The ID of Nat Gateway.
- ids List<String>
- A list of Nat Gateway IDs, all the Nat Gateways belongs to the defined region will be retrieved if this argument is
[]. - name
Regex String - A regex string to filter resulting Nat Gateways by name.
- output
File String - File name where to save data source results (after running
pulumi preview).
getNatGateways Result
The following output properties are available:
- Id string
- The ID of Nat Gateway.
- Ids List<string>
- Nat
Gateways List<GetNat Gateways Nat Gateway> - It is a nested type. Nat Gateways documented below.
- Total
Count double - Total number of Nat Gateways that satisfy the condition.
- Name
Regex string - Output
File string
- Id string
- The ID of Nat Gateway.
- Ids []string
- Nat
Gateways []GetNat Gateways Nat Gateway - It is a nested type. Nat Gateways documented below.
- Total
Count float64 - Total number of Nat Gateways that satisfy the condition.
- Name
Regex string - Output
File string
- id String
- The ID of Nat Gateway.
- ids List<String>
- nat
Gateways List<GetNat Gateways Nat Gateway> - It is a nested type. Nat Gateways documented below.
- total
Count Double - Total number of Nat Gateways that satisfy the condition.
- name
Regex String - output
File String
- id string
- The ID of Nat Gateway.
- ids string[]
- nat
Gateways GetNat Gateways Nat Gateway[] - It is a nested type. Nat Gateways documented below.
- total
Count number - Total number of Nat Gateways that satisfy the condition.
- name
Regex string - output
File string
- id str
- The ID of Nat Gateway.
- ids Sequence[str]
- nat_
gateways Sequence[GetNat Gateways Nat Gateway] - It is a nested type. Nat Gateways documented below.
- total_
count float - Total number of Nat Gateways that satisfy the condition.
- name_
regex str - output_
file str
- id String
- The ID of Nat Gateway.
- ids List<String>
- nat
Gateways List<Property Map> - It is a nested type. Nat Gateways documented below.
- total
Count Number - Total number of Nat Gateways that satisfy the condition.
- name
Regex String - output
File String
Supporting Types
GetNatGatewaysNatGateway
- Create
Time string - The time of creation for Nat Gateway, formatted in RFC3339 time string.
- Id string
- The ID of Nat Gateway.
- Ip
Sets List<GetNat Gateways Nat Gateway Ip Set> - It is a nested type which documented below.
- Name string
- The name of the Nat Gateway.
- Remark string
- The remarks of Nat Gateway.
- Security
Group string - The ID of the associated security group.
- Subnet
Ids List<string> - The list of subnet ID under the VPC.
- Tag string
- A tag assigned to the Nat Gateway.
- Vpc
Id string - The ID of VPC linked to the Nat Gateway.
- Create
Time string - The time of creation for Nat Gateway, formatted in RFC3339 time string.
- Id string
- The ID of Nat Gateway.
- Ip
Sets []GetNat Gateways Nat Gateway Ip Set - It is a nested type which documented below.
- Name string
- The name of the Nat Gateway.
- Remark string
- The remarks of Nat Gateway.
- Security
Group string - The ID of the associated security group.
- Subnet
Ids []string - The list of subnet ID under the VPC.
- Tag string
- A tag assigned to the Nat Gateway.
- Vpc
Id string - The ID of VPC linked to the Nat Gateway.
- create
Time String - The time of creation for Nat Gateway, formatted in RFC3339 time string.
- id String
- The ID of Nat Gateway.
- ip
Sets List<GetNat Gateways Nat Gateway Ip Set> - It is a nested type which documented below.
- name String
- The name of the Nat Gateway.
- remark String
- The remarks of Nat Gateway.
- security
Group String - The ID of the associated security group.
- subnet
Ids List<String> - The list of subnet ID under the VPC.
- tag String
- A tag assigned to the Nat Gateway.
- vpc
Id String - The ID of VPC linked to the Nat Gateway.
- create
Time string - The time of creation for Nat Gateway, formatted in RFC3339 time string.
- id string
- The ID of Nat Gateway.
- ip
Sets GetNat Gateways Nat Gateway Ip Set[] - It is a nested type which documented below.
- name string
- The name of the Nat Gateway.
- remark string
- The remarks of Nat Gateway.
- security
Group string - The ID of the associated security group.
- subnet
Ids string[] - The list of subnet ID under the VPC.
- tag string
- A tag assigned to the Nat Gateway.
- vpc
Id string - The ID of VPC linked to the Nat Gateway.
- create_
time str - The time of creation for Nat Gateway, formatted in RFC3339 time string.
- id str
- The ID of Nat Gateway.
- ip_
sets Sequence[GetNat Gateways Nat Gateway Ip Set] - It is a nested type which documented below.
- name str
- The name of the Nat Gateway.
- remark str
- The remarks of Nat Gateway.
- security_
group str - The ID of the associated security group.
- subnet_
ids Sequence[str] - The list of subnet ID under the VPC.
- tag str
- A tag assigned to the Nat Gateway.
- vpc_
id str - The ID of VPC linked to the Nat Gateway.
- create
Time String - The time of creation for Nat Gateway, formatted in RFC3339 time string.
- id String
- The ID of Nat Gateway.
- ip
Sets List<Property Map> - It is a nested type which documented below.
- name String
- The name of the Nat Gateway.
- remark String
- The remarks of Nat Gateway.
- security
Group String - The ID of the associated security group.
- subnet
Ids List<String> - The list of subnet ID under the VPC.
- tag String
- A tag assigned to the Nat Gateway.
- vpc
Id String - The ID of VPC linked to the Nat Gateway.
GetNatGatewaysNatGatewayIpSet
- Internet
Type string - Type of Elastic IP routes.
- Ip string
- Elastic IP address.
- Internet
Type string - Type of Elastic IP routes.
- Ip string
- Elastic IP address.
- internet
Type String - Type of Elastic IP routes.
- ip String
- Elastic IP address.
- internet
Type string - Type of Elastic IP routes.
- ip string
- Elastic IP address.
- internet_
type str - Type of Elastic IP routes.
- ip str
- Elastic IP address.
- internet
Type String - Type of Elastic IP routes.
- ip String
- Elastic IP address.
Package Details
- Repository
- ucloud ucloud/terraform-provider-ucloud
- License
- Notes
- This Pulumi package is based on the
ucloudTerraform Provider.
Viewing docs for ucloud 1.39.3
published on Wednesday, Mar 11, 2026 by ucloud
published on Wednesday, Mar 11, 2026 by ucloud
