ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud
ucloud.getVpnCustomerGateways
Explore with Pulumi AI
This data source providers a list of VPN Customer Gateway resources according to their ID, name and tag.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ucloud from "@pulumi/ucloud";
const example = ucloud.getVpnCustomerGateways({});
export const first = example.then(example => example.vpnCustomerGateways?.[0]?.id);
import pulumi
import pulumi_ucloud as ucloud
example = ucloud.get_vpn_customer_gateways()
pulumi.export("first", example.vpn_customer_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.GetVpnCustomerGateways(ctx, &ucloud.GetVpnCustomerGatewaysArgs{}, nil)
if err != nil {
return err
}
ctx.Export("first", example.VpnCustomerGateways[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ucloud = Pulumi.Ucloud;
return await Deployment.RunAsync(() =>
{
var example = Ucloud.GetVpnCustomerGateways.Invoke();
return new Dictionary<string, object?>
{
["first"] = example.Apply(getVpnCustomerGatewaysResult => getVpnCustomerGatewaysResult.VpnCustomerGateways[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.GetVpnCustomerGatewaysArgs;
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.getVpnCustomerGateways();
ctx.export("first", example.applyValue(getVpnCustomerGatewaysResult -> getVpnCustomerGatewaysResult.vpnCustomerGateways()[0].id()));
}
}
variables:
example:
fn::invoke:
function: ucloud:getVpnCustomerGateways
arguments: {}
outputs:
first: ${example.vpnCustomerGateways[0].id}
Using getVpnCustomerGateways
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 getVpnCustomerGateways(args: GetVpnCustomerGatewaysArgs, opts?: InvokeOptions): Promise<GetVpnCustomerGatewaysResult>
function getVpnCustomerGatewaysOutput(args: GetVpnCustomerGatewaysOutputArgs, opts?: InvokeOptions): Output<GetVpnCustomerGatewaysResult>
def get_vpn_customer_gateways(id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
tag: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVpnCustomerGatewaysResult
def get_vpn_customer_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,
tag: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVpnCustomerGatewaysResult]
func GetVpnCustomerGateways(ctx *Context, args *GetVpnCustomerGatewaysArgs, opts ...InvokeOption) (*GetVpnCustomerGatewaysResult, error)
func GetVpnCustomerGatewaysOutput(ctx *Context, args *GetVpnCustomerGatewaysOutputArgs, opts ...InvokeOption) GetVpnCustomerGatewaysResultOutput
> Note: This function is named GetVpnCustomerGateways
in the Go SDK.
public static class GetVpnCustomerGateways
{
public static Task<GetVpnCustomerGatewaysResult> InvokeAsync(GetVpnCustomerGatewaysArgs args, InvokeOptions? opts = null)
public static Output<GetVpnCustomerGatewaysResult> Invoke(GetVpnCustomerGatewaysInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVpnCustomerGatewaysResult> getVpnCustomerGateways(GetVpnCustomerGatewaysArgs args, InvokeOptions options)
public static Output<GetVpnCustomerGatewaysResult> getVpnCustomerGateways(GetVpnCustomerGatewaysArgs args, InvokeOptions options)
fn::invoke:
function: ucloud:index/getVpnCustomerGateways:getVpnCustomerGateways
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- The ID of VPN Customer Gateway.
- Ids List<string>
- A list of VPN Customer Gateway IDs, all the VPN Customer Gateways belongs to the defined region will be retrieved if this argument is
[]
. - Name
Regex string - A regex string to filter resulting VPN Customer Gateways by name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Tag string
- A tag assigned to VPN Customer Gateway.
- Id string
- The ID of VPN Customer Gateway.
- Ids []string
- A list of VPN Customer Gateway IDs, all the VPN Customer Gateways belongs to the defined region will be retrieved if this argument is
[]
. - Name
Regex string - A regex string to filter resulting VPN Customer Gateways by name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Tag string
- A tag assigned to VPN Customer Gateway.
- id String
- The ID of VPN Customer Gateway.
- ids List<String>
- A list of VPN Customer Gateway IDs, all the VPN Customer Gateways belongs to the defined region will be retrieved if this argument is
[]
. - name
Regex String - A regex string to filter resulting VPN Customer Gateways by name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - tag String
- A tag assigned to VPN Customer Gateway.
- id string
- The ID of VPN Customer Gateway.
- ids string[]
- A list of VPN Customer Gateway IDs, all the VPN Customer Gateways belongs to the defined region will be retrieved if this argument is
[]
. - name
Regex string - A regex string to filter resulting VPN Customer Gateways by name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - tag string
- A tag assigned to VPN Customer Gateway.
- id str
- The ID of VPN Customer Gateway.
- ids Sequence[str]
- A list of VPN Customer Gateway IDs, all the VPN Customer Gateways belongs to the defined region will be retrieved if this argument is
[]
. - name_
regex str - A regex string to filter resulting VPN Customer Gateways by name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - tag str
- A tag assigned to VPN Customer Gateway.
- id String
- The ID of VPN Customer Gateway.
- ids List<String>
- A list of VPN Customer Gateway IDs, all the VPN Customer Gateways belongs to the defined region will be retrieved if this argument is
[]
. - name
Regex String - A regex string to filter resulting VPN Customer Gateways by name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - tag String
- A tag assigned to VPN Customer Gateway.
getVpnCustomerGateways Result
The following output properties are available:
- Id string
- The ID of VPN Customer Gateway.
- Ids List<string>
- Total
Count double - Total number of VPN Customer Gateways that satisfy the condition.
- Vpn
Customer List<GetGateways Vpn Customer Gateways Vpn Customer Gateway> - It is a nested type. VPN Customer Gateways documented below.
- Name
Regex string - Output
File string - Tag string
- A tag assigned to the VPN Customer Gateway.
- Id string
- The ID of VPN Customer Gateway.
- Ids []string
- Total
Count float64 - Total number of VPN Customer Gateways that satisfy the condition.
- Vpn
Customer []GetGateways Vpn Customer Gateways Vpn Customer Gateway - It is a nested type. VPN Customer Gateways documented below.
- Name
Regex string - Output
File string - Tag string
- A tag assigned to the VPN Customer Gateway.
- id String
- The ID of VPN Customer Gateway.
- ids List<String>
- total
Count Double - Total number of VPN Customer Gateways that satisfy the condition.
- vpn
Customer List<GetGateways Vpn Customer Gateways Vpn Customer Gateway> - It is a nested type. VPN Customer Gateways documented below.
- name
Regex String - output
File String - tag String
- A tag assigned to the VPN Customer Gateway.
- id string
- The ID of VPN Customer Gateway.
- ids string[]
- total
Count number - Total number of VPN Customer Gateways that satisfy the condition.
- vpn
Customer GetGateways Vpn Customer Gateways Vpn Customer Gateway[] - It is a nested type. VPN Customer Gateways documented below.
- name
Regex string - output
File string - tag string
- A tag assigned to the VPN Customer Gateway.
- id str
- The ID of VPN Customer Gateway.
- ids Sequence[str]
- total_
count float - Total number of VPN Customer Gateways that satisfy the condition.
- vpn_
customer_ Sequence[Getgateways Vpn Customer Gateways Vpn Customer Gateway] - It is a nested type. VPN Customer Gateways documented below.
- name_
regex str - output_
file str - tag str
- A tag assigned to the VPN Customer Gateway.
- id String
- The ID of VPN Customer Gateway.
- ids List<String>
- total
Count Number - Total number of VPN Customer Gateways that satisfy the condition.
- vpn
Customer List<Property Map>Gateways - It is a nested type. VPN Customer Gateways documented below.
- name
Regex String - output
File String - tag String
- A tag assigned to the VPN Customer Gateway.
Supporting Types
GetVpnCustomerGatewaysVpnCustomerGateway
- Create
Time string - The time of creation for VPN Customer Gateway, formatted in RFC3339 time string.
- Id string
- The ID of VPN Customer Gateway.
- Ip
Address string - The ip address of the VPN Customer Gateway.
- Name string
- The name of the VPN Customer Gateway.
- Remark string
- The remarks of VPN Customer Gateway.
- Tag string
- A tag assigned to VPN Customer Gateway.
- Create
Time string - The time of creation for VPN Customer Gateway, formatted in RFC3339 time string.
- Id string
- The ID of VPN Customer Gateway.
- Ip
Address string - The ip address of the VPN Customer Gateway.
- Name string
- The name of the VPN Customer Gateway.
- Remark string
- The remarks of VPN Customer Gateway.
- Tag string
- A tag assigned to VPN Customer Gateway.
- create
Time String - The time of creation for VPN Customer Gateway, formatted in RFC3339 time string.
- id String
- The ID of VPN Customer Gateway.
- ip
Address String - The ip address of the VPN Customer Gateway.
- name String
- The name of the VPN Customer Gateway.
- remark String
- The remarks of VPN Customer Gateway.
- tag String
- A tag assigned to VPN Customer Gateway.
- create
Time string - The time of creation for VPN Customer Gateway, formatted in RFC3339 time string.
- id string
- The ID of VPN Customer Gateway.
- ip
Address string - The ip address of the VPN Customer Gateway.
- name string
- The name of the VPN Customer Gateway.
- remark string
- The remarks of VPN Customer Gateway.
- tag string
- A tag assigned to VPN Customer Gateway.
- create_
time str - The time of creation for VPN Customer Gateway, formatted in RFC3339 time string.
- id str
- The ID of VPN Customer Gateway.
- ip_
address str - The ip address of the VPN Customer Gateway.
- name str
- The name of the VPN Customer Gateway.
- remark str
- The remarks of VPN Customer Gateway.
- tag str
- A tag assigned to VPN Customer Gateway.
- create
Time String - The time of creation for VPN Customer Gateway, formatted in RFC3339 time string.
- id String
- The ID of VPN Customer Gateway.
- ip
Address String - The ip address of the VPN Customer Gateway.
- name String
- The name of the VPN Customer Gateway.
- remark String
- The remarks of VPN Customer Gateway.
- tag String
- A tag assigned to VPN Customer Gateway.
Package Details
- Repository
- ucloud ucloud/terraform-provider-ucloud
- License
- Notes
- This Pulumi package is based on the
ucloud
Terraform Provider.