1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. vpn
  5. getGateways
Alibaba Cloud v3.45.0 published on Monday, Nov 27, 2023 by Pulumi

alicloud.vpn.getGateways

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.45.0 published on Monday, Nov 27, 2023 by Pulumi

    The VPNs data source lists a number of VPNs resource information owned by an Alicloud account.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var vpnGateways = AliCloud.Vpn.GetGateways.Invoke(new()
        {
            BusinessStatus = "Normal",
            Ids = new[]
            {
                "fake-vpn-id1",
                "fake-vpn-id2",
            },
            IncludeReservationData = true,
            NameRegex = "testAcc*",
            OutputFile = "/tmp/vpns",
            Status = "Active",
            VpcId = "fake-vpc-id",
        });
    
    });
    
    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.GetGateways(ctx, &vpn.GetGatewaysArgs{
    			BusinessStatus: pulumi.StringRef("Normal"),
    			Ids: []string{
    				"fake-vpn-id1",
    				"fake-vpn-id2",
    			},
    			IncludeReservationData: pulumi.BoolRef(true),
    			NameRegex:              pulumi.StringRef("testAcc*"),
    			OutputFile:             pulumi.StringRef("/tmp/vpns"),
    			Status:                 pulumi.StringRef("Active"),
    			VpcId:                  pulumi.StringRef("fake-vpc-id"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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.GetGatewaysArgs;
    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 vpnGateways = VpnFunctions.getGateways(GetGatewaysArgs.builder()
                .businessStatus("Normal")
                .ids(            
                    "fake-vpn-id1",
                    "fake-vpn-id2")
                .includeReservationData(true)
                .nameRegex("testAcc*")
                .outputFile("/tmp/vpns")
                .status("Active")
                .vpcId("fake-vpc-id")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    vpn_gateways = alicloud.vpn.get_gateways(business_status="Normal",
        ids=[
            "fake-vpn-id1",
            "fake-vpn-id2",
        ],
        include_reservation_data=True,
        name_regex="testAcc*",
        output_file="/tmp/vpns",
        status="Active",
        vpc_id="fake-vpc-id")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const vpnGateways = alicloud.vpn.getGateways({
        businessStatus: "Normal",
        ids: [
            "fake-vpn-id1",
            "fake-vpn-id2",
        ],
        includeReservationData: true,
        nameRegex: "testAcc*",
        outputFile: "/tmp/vpns",
        status: "Active",
        vpcId: "fake-vpc-id",
    });
    
    variables:
      vpnGateways:
        fn::invoke:
          Function: alicloud:vpn:getGateways
          Arguments:
            businessStatus: Normal
            ids:
              - fake-vpn-id1
              - fake-vpn-id2
            includeReservationData: true
            nameRegex: testAcc*
            outputFile: /tmp/vpns
            status: Active
            vpcId: fake-vpc-id
    

    Using getGateways

    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 getGateways(args: GetGatewaysArgs, opts?: InvokeOptions): Promise<GetGatewaysResult>
    function getGatewaysOutput(args: GetGatewaysOutputArgs, opts?: InvokeOptions): Output<GetGatewaysResult>
    def get_gateways(business_status: Optional[str] = None,
                     enable_ipsec: Optional[bool] = None,
                     ids: Optional[Sequence[str]] = None,
                     include_reservation_data: Optional[bool] = None,
                     name_regex: Optional[str] = None,
                     output_file: Optional[str] = None,
                     status: Optional[str] = None,
                     vpc_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetGatewaysResult
    def get_gateways_output(business_status: Optional[pulumi.Input[str]] = None,
                     enable_ipsec: Optional[pulumi.Input[bool]] = None,
                     ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     include_reservation_data: Optional[pulumi.Input[bool]] = None,
                     name_regex: Optional[pulumi.Input[str]] = None,
                     output_file: Optional[pulumi.Input[str]] = None,
                     status: Optional[pulumi.Input[str]] = None,
                     vpc_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetGatewaysResult]
    func GetGateways(ctx *Context, args *GetGatewaysArgs, opts ...InvokeOption) (*GetGatewaysResult, error)
    func GetGatewaysOutput(ctx *Context, args *GetGatewaysOutputArgs, opts ...InvokeOption) GetGatewaysResultOutput

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

    public static class GetGateways 
    {
        public static Task<GetGatewaysResult> InvokeAsync(GetGatewaysArgs args, InvokeOptions? opts = null)
        public static Output<GetGatewaysResult> Invoke(GetGatewaysInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetGatewaysResult> getGateways(GetGatewaysArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:vpn/getGateways:getGateways
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BusinessStatus string

    Limit search to specific business status - valid value is "Normal", "FinancialLocked".

    EnableIpsec bool

    Indicates whether the IPsec-VPN feature is enabled.

    Deprecated:

    Field 'enable_ipsec' has been deprecated from provider version 1.193.0 and it will be removed in the future version.

    Ids List<string>

    IDs of the VPN.

    IncludeReservationData bool

    Include ineffective ordering data.

    NameRegex string

    A regex string of VPN name.

    OutputFile string

    Save the result to the file.

    Status string

    Limit search to specific status - valid value is "Init", "Provisioning", "Active", "Updating", "Deleting".

    VpcId string

    Use the VPC ID as the search key.

    BusinessStatus string

    Limit search to specific business status - valid value is "Normal", "FinancialLocked".

    EnableIpsec bool

    Indicates whether the IPsec-VPN feature is enabled.

    Deprecated:

    Field 'enable_ipsec' has been deprecated from provider version 1.193.0 and it will be removed in the future version.

    Ids []string

    IDs of the VPN.

    IncludeReservationData bool

    Include ineffective ordering data.

    NameRegex string

    A regex string of VPN name.

    OutputFile string

    Save the result to the file.

    Status string

    Limit search to specific status - valid value is "Init", "Provisioning", "Active", "Updating", "Deleting".

    VpcId string

    Use the VPC ID as the search key.

    businessStatus String

    Limit search to specific business status - valid value is "Normal", "FinancialLocked".

    enableIpsec Boolean

    Indicates whether the IPsec-VPN feature is enabled.

    Deprecated:

    Field 'enable_ipsec' has been deprecated from provider version 1.193.0 and it will be removed in the future version.

    ids List<String>

    IDs of the VPN.

    includeReservationData Boolean

    Include ineffective ordering data.

    nameRegex String

    A regex string of VPN name.

    outputFile String

    Save the result to the file.

    status String

    Limit search to specific status - valid value is "Init", "Provisioning", "Active", "Updating", "Deleting".

    vpcId String

    Use the VPC ID as the search key.

    businessStatus string

    Limit search to specific business status - valid value is "Normal", "FinancialLocked".

    enableIpsec boolean

    Indicates whether the IPsec-VPN feature is enabled.

    Deprecated:

    Field 'enable_ipsec' has been deprecated from provider version 1.193.0 and it will be removed in the future version.

    ids string[]

    IDs of the VPN.

    includeReservationData boolean

    Include ineffective ordering data.

    nameRegex string

    A regex string of VPN name.

    outputFile string

    Save the result to the file.

    status string

    Limit search to specific status - valid value is "Init", "Provisioning", "Active", "Updating", "Deleting".

    vpcId string

    Use the VPC ID as the search key.

    business_status str

    Limit search to specific business status - valid value is "Normal", "FinancialLocked".

    enable_ipsec bool

    Indicates whether the IPsec-VPN feature is enabled.

    Deprecated:

    Field 'enable_ipsec' has been deprecated from provider version 1.193.0 and it will be removed in the future version.

    ids Sequence[str]

    IDs of the VPN.

    include_reservation_data bool

    Include ineffective ordering data.

    name_regex str

    A regex string of VPN name.

    output_file str

    Save the result to the file.

    status str

    Limit search to specific status - valid value is "Init", "Provisioning", "Active", "Updating", "Deleting".

    vpc_id str

    Use the VPC ID as the search key.

    businessStatus String

    Limit search to specific business status - valid value is "Normal", "FinancialLocked".

    enableIpsec Boolean

    Indicates whether the IPsec-VPN feature is enabled.

    Deprecated:

    Field 'enable_ipsec' has been deprecated from provider version 1.193.0 and it will be removed in the future version.

    ids List<String>

    IDs of the VPN.

    includeReservationData Boolean

    Include ineffective ordering data.

    nameRegex String

    A regex string of VPN name.

    outputFile String

    Save the result to the file.

    status String

    Limit search to specific status - valid value is "Init", "Provisioning", "Active", "Updating", "Deleting".

    vpcId String

    Use the VPC ID as the search key.

    getGateways Result

    The following output properties are available:

    Gateways List<Pulumi.AliCloud.Vpn.Outputs.GetGatewaysGateway>

    A list of VPN gateways. Each element contains the following attributes:

    Id string

    The provider-assigned unique ID for this managed resource.

    Ids List<string>

    IDs of the VPN.

    Names List<string>

    names of the VPN.

    BusinessStatus string

    The business status of the VPN gateway.

    EnableIpsec bool

    Whether the ipsec function is enabled.

    Deprecated:

    Field 'enable_ipsec' has been deprecated from provider version 1.193.0 and it will be removed in the future version.

    IncludeReservationData bool
    NameRegex string
    OutputFile string
    Status string

    The status of the VPN

    VpcId string

    ID of the VPC that the VPN belongs.

    Gateways []GetGatewaysGateway

    A list of VPN gateways. Each element contains the following attributes:

    Id string

    The provider-assigned unique ID for this managed resource.

    Ids []string

    IDs of the VPN.

    Names []string

    names of the VPN.

    BusinessStatus string

    The business status of the VPN gateway.

    EnableIpsec bool

    Whether the ipsec function is enabled.

    Deprecated:

    Field 'enable_ipsec' has been deprecated from provider version 1.193.0 and it will be removed in the future version.

    IncludeReservationData bool
    NameRegex string
    OutputFile string
    Status string

    The status of the VPN

    VpcId string

    ID of the VPC that the VPN belongs.

    gateways List<GetGatewaysGateway>

    A list of VPN gateways. Each element contains the following attributes:

    id String

    The provider-assigned unique ID for this managed resource.

    ids List<String>

    IDs of the VPN.

    names List<String>

    names of the VPN.

    businessStatus String

    The business status of the VPN gateway.

    enableIpsec Boolean

    Whether the ipsec function is enabled.

    Deprecated:

    Field 'enable_ipsec' has been deprecated from provider version 1.193.0 and it will be removed in the future version.

    includeReservationData Boolean
    nameRegex String
    outputFile String
    status String

    The status of the VPN

    vpcId String

    ID of the VPC that the VPN belongs.

    gateways GetGatewaysGateway[]

    A list of VPN gateways. Each element contains the following attributes:

    id string

    The provider-assigned unique ID for this managed resource.

    ids string[]

    IDs of the VPN.

    names string[]

    names of the VPN.

    businessStatus string

    The business status of the VPN gateway.

    enableIpsec boolean

    Whether the ipsec function is enabled.

    Deprecated:

    Field 'enable_ipsec' has been deprecated from provider version 1.193.0 and it will be removed in the future version.

    includeReservationData boolean
    nameRegex string
    outputFile string
    status string

    The status of the VPN

    vpcId string

    ID of the VPC that the VPN belongs.

    gateways Sequence[GetGatewaysGateway]

    A list of VPN gateways. Each element contains the following attributes:

    id str

    The provider-assigned unique ID for this managed resource.

    ids Sequence[str]

    IDs of the VPN.

    names Sequence[str]

    names of the VPN.

    business_status str

    The business status of the VPN gateway.

    enable_ipsec bool

    Whether the ipsec function is enabled.

    Deprecated:

    Field 'enable_ipsec' has been deprecated from provider version 1.193.0 and it will be removed in the future version.

    include_reservation_data bool
    name_regex str
    output_file str
    status str

    The status of the VPN

    vpc_id str

    ID of the VPC that the VPN belongs.

    gateways List<Property Map>

    A list of VPN gateways. Each element contains the following attributes:

    id String

    The provider-assigned unique ID for this managed resource.

    ids List<String>

    IDs of the VPN.

    names List<String>

    names of the VPN.

    businessStatus String

    The business status of the VPN gateway.

    enableIpsec Boolean

    Whether the ipsec function is enabled.

    Deprecated:

    Field 'enable_ipsec' has been deprecated from provider version 1.193.0 and it will be removed in the future version.

    includeReservationData Boolean
    nameRegex String
    outputFile String
    status String

    The status of the VPN

    vpcId String

    ID of the VPC that the VPN belongs.

    Supporting Types

    GetGatewaysGateway

    AutoPropagate string

    Whether to automatically propagate BGP routes to the VPC. Valid values: true, false.

    BusinessStatus string

    Limit search to specific business status - valid value is "Normal", "FinancialLocked".

    CreateTime string

    The creation time of the VPN gateway.

    Description string

    The description of the VPN

    EnableIpsec string

    Indicates whether the IPsec-VPN feature is enabled.

    EnableSsl string

    Whether the ssl function is enabled.

    EndTime string

    The expiration time of the VPN gateway.

    Id string

    ID of the VPN.

    InstanceChargeType string

    The charge type of the VPN gateway.

    InternetIp string

    The internet ip of the VPN.

    Name string

    The name of the VPN.

    NetworkType string

    The network type of the VPN gateway.

    Specification string

    The Specification of the VPN

    SslConnections int

    Total count of ssl vpn connections.

    Status string

    Limit search to specific status - valid value is "Init", "Provisioning", "Active", "Updating", "Deleting".

    VpcId string

    Use the VPC ID as the search key.

    AutoPropagate string

    Whether to automatically propagate BGP routes to the VPC. Valid values: true, false.

    BusinessStatus string

    Limit search to specific business status - valid value is "Normal", "FinancialLocked".

    CreateTime string

    The creation time of the VPN gateway.

    Description string

    The description of the VPN

    EnableIpsec string

    Indicates whether the IPsec-VPN feature is enabled.

    EnableSsl string

    Whether the ssl function is enabled.

    EndTime string

    The expiration time of the VPN gateway.

    Id string

    ID of the VPN.

    InstanceChargeType string

    The charge type of the VPN gateway.

    InternetIp string

    The internet ip of the VPN.

    Name string

    The name of the VPN.

    NetworkType string

    The network type of the VPN gateway.

    Specification string

    The Specification of the VPN

    SslConnections int

    Total count of ssl vpn connections.

    Status string

    Limit search to specific status - valid value is "Init", "Provisioning", "Active", "Updating", "Deleting".

    VpcId string

    Use the VPC ID as the search key.

    autoPropagate String

    Whether to automatically propagate BGP routes to the VPC. Valid values: true, false.

    businessStatus String

    Limit search to specific business status - valid value is "Normal", "FinancialLocked".

    createTime String

    The creation time of the VPN gateway.

    description String

    The description of the VPN

    enableIpsec String

    Indicates whether the IPsec-VPN feature is enabled.

    enableSsl String

    Whether the ssl function is enabled.

    endTime String

    The expiration time of the VPN gateway.

    id String

    ID of the VPN.

    instanceChargeType String

    The charge type of the VPN gateway.

    internetIp String

    The internet ip of the VPN.

    name String

    The name of the VPN.

    networkType String

    The network type of the VPN gateway.

    specification String

    The Specification of the VPN

    sslConnections Integer

    Total count of ssl vpn connections.

    status String

    Limit search to specific status - valid value is "Init", "Provisioning", "Active", "Updating", "Deleting".

    vpcId String

    Use the VPC ID as the search key.

    autoPropagate string

    Whether to automatically propagate BGP routes to the VPC. Valid values: true, false.

    businessStatus string

    Limit search to specific business status - valid value is "Normal", "FinancialLocked".

    createTime string

    The creation time of the VPN gateway.

    description string

    The description of the VPN

    enableIpsec string

    Indicates whether the IPsec-VPN feature is enabled.

    enableSsl string

    Whether the ssl function is enabled.

    endTime string

    The expiration time of the VPN gateway.

    id string

    ID of the VPN.

    instanceChargeType string

    The charge type of the VPN gateway.

    internetIp string

    The internet ip of the VPN.

    name string

    The name of the VPN.

    networkType string

    The network type of the VPN gateway.

    specification string

    The Specification of the VPN

    sslConnections number

    Total count of ssl vpn connections.

    status string

    Limit search to specific status - valid value is "Init", "Provisioning", "Active", "Updating", "Deleting".

    vpcId string

    Use the VPC ID as the search key.

    auto_propagate str

    Whether to automatically propagate BGP routes to the VPC. Valid values: true, false.

    business_status str

    Limit search to specific business status - valid value is "Normal", "FinancialLocked".

    create_time str

    The creation time of the VPN gateway.

    description str

    The description of the VPN

    enable_ipsec str

    Indicates whether the IPsec-VPN feature is enabled.

    enable_ssl str

    Whether the ssl function is enabled.

    end_time str

    The expiration time of the VPN gateway.

    id str

    ID of the VPN.

    instance_charge_type str

    The charge type of the VPN gateway.

    internet_ip str

    The internet ip of the VPN.

    name str

    The name of the VPN.

    network_type str

    The network type of the VPN gateway.

    specification str

    The Specification of the VPN

    ssl_connections int

    Total count of ssl vpn connections.

    status str

    Limit search to specific status - valid value is "Init", "Provisioning", "Active", "Updating", "Deleting".

    vpc_id str

    Use the VPC ID as the search key.

    autoPropagate String

    Whether to automatically propagate BGP routes to the VPC. Valid values: true, false.

    businessStatus String

    Limit search to specific business status - valid value is "Normal", "FinancialLocked".

    createTime String

    The creation time of the VPN gateway.

    description String

    The description of the VPN

    enableIpsec String

    Indicates whether the IPsec-VPN feature is enabled.

    enableSsl String

    Whether the ssl function is enabled.

    endTime String

    The expiration time of the VPN gateway.

    id String

    ID of the VPN.

    instanceChargeType String

    The charge type of the VPN gateway.

    internetIp String

    The internet ip of the VPN.

    name String

    The name of the VPN.

    networkType String

    The network type of the VPN gateway.

    specification String

    The Specification of the VPN

    sslConnections Number

    Total count of ssl vpn connections.

    status String

    Limit search to specific status - valid value is "Init", "Provisioning", "Active", "Updating", "Deleting".

    vpcId String

    Use the VPC ID as the search key.

    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.45.0 published on Monday, Nov 27, 2023 by Pulumi