1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. vpn
  5. getCustomerGateways
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.vpn.getCustomerGateways

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

The VPN customers gateways data source lists a number of VPN customer gateways resource information owned by an Alicloud account.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const foo = alicloud.vpn.getCustomerGateways({
    nameRegex: "testAcc*",
    ids: [
        "fake-id1",
        "fake-id2",
    ],
    outputFile: "/tmp/cgws",
});
Copy
import pulumi
import pulumi_alicloud as alicloud

foo = alicloud.vpn.get_customer_gateways(name_regex="testAcc*",
    ids=[
        "fake-id1",
        "fake-id2",
    ],
    output_file="/tmp/cgws")
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpn"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vpn.GetCustomerGateways(ctx, &vpn.GetCustomerGatewaysArgs{
			NameRegex: pulumi.StringRef("testAcc*"),
			Ids: []string{
				"fake-id1",
				"fake-id2",
			},
			OutputFile: pulumi.StringRef("/tmp/cgws"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var foo = AliCloud.Vpn.GetCustomerGateways.Invoke(new()
    {
        NameRegex = "testAcc*",
        Ids = new[]
        {
            "fake-id1",
            "fake-id2",
        },
        OutputFile = "/tmp/cgws",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpn.VpnFunctions;
import com.pulumi.alicloud.vpn.inputs.GetCustomerGatewaysArgs;
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 foo = VpnFunctions.getCustomerGateways(GetCustomerGatewaysArgs.builder()
            .nameRegex("testAcc*")
            .ids(            
                "fake-id1",
                "fake-id2")
            .outputFile("/tmp/cgws")
            .build());

    }
}
Copy
variables:
  foo:
    fn::invoke:
      function: alicloud:vpn:getCustomerGateways
      arguments:
        nameRegex: testAcc*
        ids:
          - fake-id1
          - fake-id2
        outputFile: /tmp/cgws
Copy

Using getCustomerGateways

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 getCustomerGateways(args: GetCustomerGatewaysArgs, opts?: InvokeOptions): Promise<GetCustomerGatewaysResult>
function getCustomerGatewaysOutput(args: GetCustomerGatewaysOutputArgs, opts?: InvokeOptions): Output<GetCustomerGatewaysResult>
Copy
def get_customer_gateways(ids: Optional[Sequence[str]] = None,
                          name_regex: Optional[str] = None,
                          output_file: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetCustomerGatewaysResult
def get_customer_gateways_output(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[GetCustomerGatewaysResult]
Copy
func GetCustomerGateways(ctx *Context, args *GetCustomerGatewaysArgs, opts ...InvokeOption) (*GetCustomerGatewaysResult, error)
func GetCustomerGatewaysOutput(ctx *Context, args *GetCustomerGatewaysOutputArgs, opts ...InvokeOption) GetCustomerGatewaysResultOutput
Copy

> Note: This function is named GetCustomerGateways in the Go SDK.

public static class GetCustomerGateways 
{
    public static Task<GetCustomerGatewaysResult> InvokeAsync(GetCustomerGatewaysArgs args, InvokeOptions? opts = null)
    public static Output<GetCustomerGatewaysResult> Invoke(GetCustomerGatewaysInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetCustomerGatewaysResult> getCustomerGateways(GetCustomerGatewaysArgs args, InvokeOptions options)
public static Output<GetCustomerGatewaysResult> getCustomerGateways(GetCustomerGatewaysArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:vpn/getCustomerGateways:getCustomerGateways
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids Changes to this property will trigger replacement. List<string>
ID of the VPN customer gateways.
NameRegex Changes to this property will trigger replacement. string
A regex string of VPN customer gateways name.
OutputFile string
Save the result to the file.
Ids Changes to this property will trigger replacement. []string
ID of the VPN customer gateways.
NameRegex Changes to this property will trigger replacement. string
A regex string of VPN customer gateways name.
OutputFile string
Save the result to the file.
ids Changes to this property will trigger replacement. List<String>
ID of the VPN customer gateways.
nameRegex Changes to this property will trigger replacement. String
A regex string of VPN customer gateways name.
outputFile String
Save the result to the file.
ids Changes to this property will trigger replacement. string[]
ID of the VPN customer gateways.
nameRegex Changes to this property will trigger replacement. string
A regex string of VPN customer gateways name.
outputFile string
Save the result to the file.
ids Changes to this property will trigger replacement. Sequence[str]
ID of the VPN customer gateways.
name_regex Changes to this property will trigger replacement. str
A regex string of VPN customer gateways name.
output_file str
Save the result to the file.
ids Changes to this property will trigger replacement. List<String>
ID of the VPN customer gateways.
nameRegex Changes to this property will trigger replacement. String
A regex string of VPN customer gateways name.
outputFile String
Save the result to the file.

getCustomerGateways Result

The following output properties are available:

Gateways List<Pulumi.AliCloud.Vpn.Outputs.GetCustomerGatewaysGateway>
A list of VPN customer gateways. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
IDs of VPN customer gateway.
Names List<string>
names of VPN customer gateway.
NameRegex string
OutputFile string
Gateways []GetCustomerGatewaysGateway
A list of VPN customer gateways. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
IDs of VPN customer gateway.
Names []string
names of VPN customer gateway.
NameRegex string
OutputFile string
gateways List<GetCustomerGatewaysGateway>
A list of VPN customer gateways. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
IDs of VPN customer gateway.
names List<String>
names of VPN customer gateway.
nameRegex String
outputFile String
gateways GetCustomerGatewaysGateway[]
A list of VPN customer gateways. Each element contains the following attributes:
id string
The provider-assigned unique ID for this managed resource.
ids string[]
IDs of VPN customer gateway.
names string[]
names of VPN customer gateway.
nameRegex string
outputFile string
gateways Sequence[GetCustomerGatewaysGateway]
A list of VPN customer gateways. Each element contains the following attributes:
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
IDs of VPN customer gateway.
names Sequence[str]
names of VPN customer gateway.
name_regex str
output_file str
gateways List<Property Map>
A list of VPN customer gateways. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
IDs of VPN customer gateway.
names List<String>
names of VPN customer gateway.
nameRegex String
outputFile String

Supporting Types

GetCustomerGatewaysGateway

Asn This property is required. int
The autonomous system number of the local data center gateway device of the VPN customer gateway.
CreateTime This property is required. string
The creation time of the VPN customer gateway.
Description This property is required. string
The description of the VPN customer gateway.
Id This property is required. string
ID of the VPN customer gateway .
IpAddress This property is required. string
The ip address of the VPN customer gateway.
Name This property is required. string
The name of the VPN customer gateway.
Asn This property is required. int
The autonomous system number of the local data center gateway device of the VPN customer gateway.
CreateTime This property is required. string
The creation time of the VPN customer gateway.
Description This property is required. string
The description of the VPN customer gateway.
Id This property is required. string
ID of the VPN customer gateway .
IpAddress This property is required. string
The ip address of the VPN customer gateway.
Name This property is required. string
The name of the VPN customer gateway.
asn This property is required. Integer
The autonomous system number of the local data center gateway device of the VPN customer gateway.
createTime This property is required. String
The creation time of the VPN customer gateway.
description This property is required. String
The description of the VPN customer gateway.
id This property is required. String
ID of the VPN customer gateway .
ipAddress This property is required. String
The ip address of the VPN customer gateway.
name This property is required. String
The name of the VPN customer gateway.
asn This property is required. number
The autonomous system number of the local data center gateway device of the VPN customer gateway.
createTime This property is required. string
The creation time of the VPN customer gateway.
description This property is required. string
The description of the VPN customer gateway.
id This property is required. string
ID of the VPN customer gateway .
ipAddress This property is required. string
The ip address of the VPN customer gateway.
name This property is required. string
The name of the VPN customer gateway.
asn This property is required. int
The autonomous system number of the local data center gateway device of the VPN customer gateway.
create_time This property is required. str
The creation time of the VPN customer gateway.
description This property is required. str
The description of the VPN customer gateway.
id This property is required. str
ID of the VPN customer gateway .
ip_address This property is required. str
The ip address of the VPN customer gateway.
name This property is required. str
The name of the VPN customer gateway.
asn This property is required. Number
The autonomous system number of the local data center gateway device of the VPN customer gateway.
createTime This property is required. String
The creation time of the VPN customer gateway.
description This property is required. String
The description of the VPN customer gateway.
id This property is required. String
ID of the VPN customer gateway .
ipAddress This property is required. String
The ip address of the VPN customer gateway.
name This property is required. String
The name of the VPN customer gateway.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi