1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getVpnCustomerGateways
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getVpnCustomerGateways

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query detailed information of VPN customer gateways.

    Example Usage

    Query all customer gateways

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getVpnCustomerGateways({});
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_vpn_customer_gateways()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.GetVpnCustomerGateways(ctx, &tencentcloud.GetVpnCustomerGatewaysArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Tencentcloud.GetVpnCustomerGateways.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.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 = TencentcloudFunctions.getVpnCustomerGateways();
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getVpnCustomerGateways
          arguments: {}
    

    Query customer gateways by filters

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getVpnCustomerGateways({
        id: "cgw-r1g6c8fr",
        name: "tf-example",
        publicIpAddress: "1.1.1.1",
        tags: {
            createBy: "Terraform",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_vpn_customer_gateways(id="cgw-r1g6c8fr",
        name="tf-example",
        public_ip_address="1.1.1.1",
        tags={
            "createBy": "Terraform",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.GetVpnCustomerGateways(ctx, &tencentcloud.GetVpnCustomerGatewaysArgs{
    			Id:              pulumi.StringRef("cgw-r1g6c8fr"),
    			Name:            pulumi.StringRef("tf-example"),
    			PublicIpAddress: pulumi.StringRef("1.1.1.1"),
    			Tags: map[string]interface{}{
    				"createBy": "Terraform",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Tencentcloud.GetVpnCustomerGateways.Invoke(new()
        {
            Id = "cgw-r1g6c8fr",
            Name = "tf-example",
            PublicIpAddress = "1.1.1.1",
            Tags = 
            {
                { "createBy", "Terraform" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.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 = TencentcloudFunctions.getVpnCustomerGateways(GetVpnCustomerGatewaysArgs.builder()
                .id("cgw-r1g6c8fr")
                .name("tf-example")
                .publicIpAddress("1.1.1.1")
                .tags(Map.of("createBy", "Terraform"))
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getVpnCustomerGateways
          arguments:
            id: cgw-r1g6c8fr
            name: tf-example
            publicIpAddress: 1.1.1.1
            tags:
              createBy: Terraform
    

    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,
                                  name: Optional[str] = None,
                                  public_ip_address: Optional[str] = None,
                                  result_output_file: Optional[str] = None,
                                  tags: Optional[Mapping[str, str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetVpnCustomerGatewaysResult
    def get_vpn_customer_gateways_output(id: Optional[pulumi.Input[str]] = None,
                                  name: Optional[pulumi.Input[str]] = None,
                                  public_ip_address: Optional[pulumi.Input[str]] = None,
                                  result_output_file: Optional[pulumi.Input[str]] = None,
                                  tags: Optional[pulumi.Input[Mapping[str, 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: tencentcloud:index/getVpnCustomerGateways:getVpnCustomerGateways
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    ID of the VPN customer gateway.
    Name string
    Name of the customer gateway. The length of character is limited to 1-60.
    PublicIpAddress string
    Public ip address of the VPN customer gateway.
    ResultOutputFile string
    Used to save results.
    Tags Dictionary<string, string>
    Tags of the VPN customer gateway to be queried.
    Id string
    ID of the VPN customer gateway.
    Name string
    Name of the customer gateway. The length of character is limited to 1-60.
    PublicIpAddress string
    Public ip address of the VPN customer gateway.
    ResultOutputFile string
    Used to save results.
    Tags map[string]string
    Tags of the VPN customer gateway to be queried.
    id String
    ID of the VPN customer gateway.
    name String
    Name of the customer gateway. The length of character is limited to 1-60.
    publicIpAddress String
    Public ip address of the VPN customer gateway.
    resultOutputFile String
    Used to save results.
    tags Map<String,String>
    Tags of the VPN customer gateway to be queried.
    id string
    ID of the VPN customer gateway.
    name string
    Name of the customer gateway. The length of character is limited to 1-60.
    publicIpAddress string
    Public ip address of the VPN customer gateway.
    resultOutputFile string
    Used to save results.
    tags {[key: string]: string}
    Tags of the VPN customer gateway to be queried.
    id str
    ID of the VPN customer gateway.
    name str
    Name of the customer gateway. The length of character is limited to 1-60.
    public_ip_address str
    Public ip address of the VPN customer gateway.
    result_output_file str
    Used to save results.
    tags Mapping[str, str]
    Tags of the VPN customer gateway to be queried.
    id String
    ID of the VPN customer gateway.
    name String
    Name of the customer gateway. The length of character is limited to 1-60.
    publicIpAddress String
    Public ip address of the VPN customer gateway.
    resultOutputFile String
    Used to save results.
    tags Map<String>
    Tags of the VPN customer gateway to be queried.

    getVpnCustomerGateways Result

    The following output properties are available:

    GatewayLists List<GetVpnCustomerGatewaysGatewayList>
    Information list of the dedicated gateways.
    Id string
    ID of the VPN customer gateway.
    Name string
    Name of the VPN customer gateway.
    PublicIpAddress string
    Public ip address of the VPN customer gateway.
    ResultOutputFile string
    Tags Dictionary<string, string>
    Tags of the VPN customer gateway.
    GatewayLists []GetVpnCustomerGatewaysGatewayList
    Information list of the dedicated gateways.
    Id string
    ID of the VPN customer gateway.
    Name string
    Name of the VPN customer gateway.
    PublicIpAddress string
    Public ip address of the VPN customer gateway.
    ResultOutputFile string
    Tags map[string]string
    Tags of the VPN customer gateway.
    gatewayLists List<GetVpnCustomerGatewaysGatewayList>
    Information list of the dedicated gateways.
    id String
    ID of the VPN customer gateway.
    name String
    Name of the VPN customer gateway.
    publicIpAddress String
    Public ip address of the VPN customer gateway.
    resultOutputFile String
    tags Map<String,String>
    Tags of the VPN customer gateway.
    gatewayLists GetVpnCustomerGatewaysGatewayList[]
    Information list of the dedicated gateways.
    id string
    ID of the VPN customer gateway.
    name string
    Name of the VPN customer gateway.
    publicIpAddress string
    Public ip address of the VPN customer gateway.
    resultOutputFile string
    tags {[key: string]: string}
    Tags of the VPN customer gateway.
    gateway_lists Sequence[GetVpnCustomerGatewaysGatewayList]
    Information list of the dedicated gateways.
    id str
    ID of the VPN customer gateway.
    name str
    Name of the VPN customer gateway.
    public_ip_address str
    Public ip address of the VPN customer gateway.
    result_output_file str
    tags Mapping[str, str]
    Tags of the VPN customer gateway.
    gatewayLists List<Property Map>
    Information list of the dedicated gateways.
    id String
    ID of the VPN customer gateway.
    name String
    Name of the VPN customer gateway.
    publicIpAddress String
    Public ip address of the VPN customer gateway.
    resultOutputFile String
    tags Map<String>
    Tags of the VPN customer gateway.

    Supporting Types

    GetVpnCustomerGatewaysGatewayList

    CreateTime string
    Create time of the VPN customer gateway.
    Id string
    ID of the VPN customer gateway.
    Name string
    Name of the customer gateway. The length of character is limited to 1-60.
    PublicIpAddress string
    Public ip address of the VPN customer gateway.
    Tags Dictionary<string, string>
    Tags of the VPN customer gateway to be queried.
    CreateTime string
    Create time of the VPN customer gateway.
    Id string
    ID of the VPN customer gateway.
    Name string
    Name of the customer gateway. The length of character is limited to 1-60.
    PublicIpAddress string
    Public ip address of the VPN customer gateway.
    Tags map[string]string
    Tags of the VPN customer gateway to be queried.
    createTime String
    Create time of the VPN customer gateway.
    id String
    ID of the VPN customer gateway.
    name String
    Name of the customer gateway. The length of character is limited to 1-60.
    publicIpAddress String
    Public ip address of the VPN customer gateway.
    tags Map<String,String>
    Tags of the VPN customer gateway to be queried.
    createTime string
    Create time of the VPN customer gateway.
    id string
    ID of the VPN customer gateway.
    name string
    Name of the customer gateway. The length of character is limited to 1-60.
    publicIpAddress string
    Public ip address of the VPN customer gateway.
    tags {[key: string]: string}
    Tags of the VPN customer gateway to be queried.
    create_time str
    Create time of the VPN customer gateway.
    id str
    ID of the VPN customer gateway.
    name str
    Name of the customer gateway. The length of character is limited to 1-60.
    public_ip_address str
    Public ip address of the VPN customer gateway.
    tags Mapping[str, str]
    Tags of the VPN customer gateway to be queried.
    createTime String
    Create time of the VPN customer gateway.
    id String
    ID of the VPN customer gateway.
    name String
    Name of the customer gateway. The length of character is limited to 1-60.
    publicIpAddress String
    Public ip address of the VPN customer gateway.
    tags Map<String>
    Tags of the VPN customer gateway to be queried.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack