Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.vpn.getCustomerGateways
Explore with Pulumi AI
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",
});
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")
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
	})
}
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",
    });
});
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());
    }
}
variables:
  foo:
    fn::invoke:
      Function: alicloud:vpn:getCustomerGateways
      Arguments:
        nameRegex: testAcc*
        ids:
          - fake-id1
          - fake-id2
        outputFile: /tmp/cgws
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>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]func GetCustomerGateways(ctx *Context, args *GetCustomerGatewaysArgs, opts ...InvokeOption) (*GetCustomerGatewaysResult, error)
func GetCustomerGatewaysOutput(ctx *Context, args *GetCustomerGatewaysOutputArgs, opts ...InvokeOption) GetCustomerGatewaysResultOutput> 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)
}public static CompletableFuture<GetCustomerGatewaysResult> getCustomerGateways(GetCustomerGatewaysArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:vpn/getCustomerGateways:getCustomerGateways
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Ids List<string>
 - ID of the VPN customer gateways.
 - Name
Regex string - A regex string of VPN customer gateways name.
 - Output
File string - Save the result to the file.
 
- Ids []string
 - ID of the VPN customer gateways.
 - Name
Regex string - A regex string of VPN customer gateways name.
 - Output
File string - Save the result to the file.
 
- ids List<String>
 - ID of the VPN customer gateways.
 - name
Regex String - A regex string of VPN customer gateways name.
 - output
File String - Save the result to the file.
 
- ids string[]
 - ID of the VPN customer gateways.
 - name
Regex string - A regex string of VPN customer gateways name.
 - output
File string - Save the result to the file.
 
- ids Sequence[str]
 - ID of the VPN customer gateways.
 - name_
regex str - A regex string of VPN customer gateways name.
 - output_
file str - Save the result to the file.
 
- ids List<String>
 - ID of the VPN customer gateways.
 - name
Regex String - A regex string of VPN customer gateways name.
 - output
File String - Save the result to the file.
 
getCustomerGateways Result
The following output properties are available:
- Gateways
List<Pulumi.
Ali Cloud. Vpn. Outputs. Get Customer Gateways Gateway>  - 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.
 - Name
Regex string - Output
File string 
- Gateways
[]Get
Customer Gateways Gateway  - 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.
 - Name
Regex string - Output
File string 
- gateways
List<Get
Customer Gateways Gateway>  - 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.
 - name
Regex String - output
File String 
- gateways
Get
Customer Gateways Gateway[]  - 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.
 - name
Regex string - output
File string 
- gateways
Sequence[Get
Customer Gateways Gateway]  - 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.
 - name
Regex String - output
File String 
Supporting Types
GetCustomerGatewaysGateway   
- Asn int
 - The autonomous system number of the local data center gateway device of the VPN customer gateway.
 - Create
Time string - The creation time of the VPN customer gateway.
 - Description string
 - The description of the VPN customer gateway.
 - Id string
 - ID of the VPN customer gateway .
 - Ip
Address string - The ip address of the VPN customer gateway.
 - Name string
 - The name of the VPN customer gateway.
 
- Asn int
 - The autonomous system number of the local data center gateway device of the VPN customer gateway.
 - Create
Time string - The creation time of the VPN customer gateway.
 - Description string
 - The description of the VPN customer gateway.
 - Id string
 - ID of the VPN customer gateway .
 - Ip
Address string - The ip address of the VPN customer gateway.
 - Name string
 - The name of the VPN customer gateway.
 
- asn Integer
 - The autonomous system number of the local data center gateway device of the VPN customer gateway.
 - create
Time String - The creation time of the VPN customer gateway.
 - description String
 - The description of the VPN customer gateway.
 - id String
 - ID of the VPN customer gateway .
 - ip
Address String - The ip address of the VPN customer gateway.
 - name String
 - The name of the VPN customer gateway.
 
- asn number
 - The autonomous system number of the local data center gateway device of the VPN customer gateway.
 - create
Time string - The creation time of the VPN customer gateway.
 - description string
 - The description of the VPN customer gateway.
 - id string
 - ID of the VPN customer gateway .
 - ip
Address string - The ip address of the VPN customer gateway.
 - name string
 - The name of the VPN customer gateway.
 
- asn int
 - The autonomous system number of the local data center gateway device of the VPN customer gateway.
 - create_
time str - The creation time of the VPN customer gateway.
 - description str
 - The description of the VPN customer gateway.
 - id str
 - ID of the VPN customer gateway .
 - ip_
address str - The ip address of the VPN customer gateway.
 - name str
 - The name of the VPN customer gateway.
 
- asn Number
 - The autonomous system number of the local data center gateway device of the VPN customer gateway.
 - create
Time String - The creation time of the VPN customer gateway.
 - description String
 - The description of the VPN customer gateway.
 - id String
 - ID of the VPN customer gateway .
 - ip
Address String - The ip address of the VPN customer gateway.
 - name 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 
alicloudTerraform Provider.