1. Packages
  2. Ucloud Provider
  3. API Docs
  4. getVpnCustomerGateways
ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud

ucloud.getVpnCustomerGateways

Explore with Pulumi AI

ucloud logo
ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud

    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 [].
    NameRegex string
    A regex string to filter resulting VPN Customer Gateways by name.
    OutputFile 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 [].
    NameRegex string
    A regex string to filter resulting VPN Customer Gateways by name.
    OutputFile 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 [].
    nameRegex String
    A regex string to filter resulting VPN Customer Gateways by name.
    outputFile 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 [].
    nameRegex string
    A regex string to filter resulting VPN Customer Gateways by name.
    outputFile 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 [].
    nameRegex String
    A regex string to filter resulting VPN Customer Gateways by name.
    outputFile 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>
    TotalCount double
    Total number of VPN Customer Gateways that satisfy the condition.
    VpnCustomerGateways List<GetVpnCustomerGatewaysVpnCustomerGateway>
    It is a nested type. VPN Customer Gateways documented below.
    NameRegex string
    OutputFile string
    Tag string
    A tag assigned to the VPN Customer Gateway.
    Id string
    The ID of VPN Customer Gateway.
    Ids []string
    TotalCount float64
    Total number of VPN Customer Gateways that satisfy the condition.
    VpnCustomerGateways []GetVpnCustomerGatewaysVpnCustomerGateway
    It is a nested type. VPN Customer Gateways documented below.
    NameRegex string
    OutputFile string
    Tag string
    A tag assigned to the VPN Customer Gateway.
    id String
    The ID of VPN Customer Gateway.
    ids List<String>
    totalCount Double
    Total number of VPN Customer Gateways that satisfy the condition.
    vpnCustomerGateways List<GetVpnCustomerGatewaysVpnCustomerGateway>
    It is a nested type. VPN Customer Gateways documented below.
    nameRegex String
    outputFile String
    tag String
    A tag assigned to the VPN Customer Gateway.
    id string
    The ID of VPN Customer Gateway.
    ids string[]
    totalCount number
    Total number of VPN Customer Gateways that satisfy the condition.
    vpnCustomerGateways GetVpnCustomerGatewaysVpnCustomerGateway[]
    It is a nested type. VPN Customer Gateways documented below.
    nameRegex string
    outputFile 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_gateways Sequence[GetVpnCustomerGatewaysVpnCustomerGateway]
    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>
    totalCount Number
    Total number of VPN Customer Gateways that satisfy the condition.
    vpnCustomerGateways List<Property Map>
    It is a nested type. VPN Customer Gateways documented below.
    nameRegex String
    outputFile String
    tag String
    A tag assigned to the VPN Customer Gateway.

    Supporting Types

    GetVpnCustomerGatewaysVpnCustomerGateway

    CreateTime string
    The time of creation for VPN Customer Gateway, formatted in RFC3339 time string.
    Id string
    The ID of VPN Customer Gateway.
    IpAddress 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.
    CreateTime string
    The time of creation for VPN Customer Gateway, formatted in RFC3339 time string.
    Id string
    The ID of VPN Customer Gateway.
    IpAddress 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.
    createTime String
    The time of creation for VPN Customer Gateway, formatted in RFC3339 time string.
    id String
    The ID of VPN Customer Gateway.
    ipAddress 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.
    createTime string
    The time of creation for VPN Customer Gateway, formatted in RFC3339 time string.
    id string
    The ID of VPN Customer Gateway.
    ipAddress 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.
    createTime String
    The time of creation for VPN Customer Gateway, formatted in RFC3339 time string.
    id String
    The ID of VPN Customer Gateway.
    ipAddress 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.
    ucloud logo
    ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud