1. Packages
  2. Alicloud Provider
  3. API Docs
  4. vpn
  5. getCustomerGateways
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.vpn.getCustomerGateways

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 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",
    });
    
    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 dictionary

    The following arguments are supported:

    Ids List<string>
    ID of the VPN customer gateways.
    NameRegex string
    A regex string of VPN customer gateways name.
    OutputFile string
    Save the result to the file.
    Ids []string
    ID of the VPN customer gateways.
    NameRegex string
    A regex string of VPN customer gateways name.
    OutputFile string
    Save the result to the file.
    ids List<String>
    ID of the VPN customer gateways.
    nameRegex String
    A regex string of VPN customer gateways name.
    outputFile String
    Save the result to the file.
    ids string[]
    ID of the VPN customer gateways.
    nameRegex string
    A regex string of VPN customer gateways name.
    outputFile 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.
    nameRegex 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 int
    The autonomous system number of the local data center gateway device of the VPN customer gateway.
    CreateTime 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 .
    IpAddress 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.
    CreateTime 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 .
    IpAddress 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.
    createTime 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 .
    ipAddress 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.
    createTime 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 .
    ipAddress 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.
    createTime 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 .
    ipAddress 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 alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi