Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.27.0 published on Monday, Aug 8, 2022 by Pulumi

getConnections

The VPN connections data source lists lots of VPN connections resource information owned by an Alicloud account.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = Output.Create(AliCloud.Vpn.GetConnections.InvokeAsync(new AliCloud.Vpn.GetConnectionsArgs
        {
            CustomerGatewayId = "fake-cgw-id",
            Ids = 
            {
                "fake-conn-id",
            },
            OutputFile = "/tmp/vpnconn",
            VpnGatewayId = "fake-vpn-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.GetConnections(ctx, &vpn.GetConnectionsArgs{
			CustomerGatewayId: pulumi.StringRef("fake-cgw-id"),
			Ids: []string{
				"fake-conn-id",
			},
			OutputFile:   pulumi.StringRef("/tmp/vpnconn"),
			VpnGatewayId: pulumi.StringRef("fake-vpn-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.kvstore.inputs.GetConnectionsArgs;
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.getConnections(GetConnectionsArgs.builder()
            .customerGatewayId("fake-cgw-id")
            .ids("fake-conn-id")
            .outputFile("/tmp/vpnconn")
            .vpnGatewayId("fake-vpn-id")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

foo = alicloud.vpn.get_connections(customer_gateway_id="fake-cgw-id",
    ids=["fake-conn-id"],
    output_file="/tmp/vpnconn",
    vpn_gateway_id="fake-vpn-id")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const foo = pulumi.output(alicloud.vpn.getConnections({
    customerGatewayId: "fake-cgw-id",
    ids: ["fake-conn-id"],
    outputFile: "/tmp/vpnconn",
    vpnGatewayId: "fake-vpn-id",
}));
variables:
  foo:
    Fn::Invoke:
      Function: alicloud:vpn:getConnections
      Arguments:
        customerGatewayId: fake-cgw-id
        ids:
          - fake-conn-id
        outputFile: /tmp/vpnconn
        vpnGatewayId: fake-vpn-id

Using getConnections

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 getConnections(args: GetConnectionsArgs, opts?: InvokeOptions): Promise<GetConnectionsResult>
function getConnectionsOutput(args: GetConnectionsOutputArgs, opts?: InvokeOptions): Output<GetConnectionsResult>
def get_connections(customer_gateway_id: Optional[str] = None,
                    ids: Optional[Sequence[str]] = None,
                    name_regex: Optional[str] = None,
                    output_file: Optional[str] = None,
                    vpn_gateway_id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetConnectionsResult
def get_connections_output(customer_gateway_id: Optional[pulumi.Input[str]] = None,
                    ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                    name_regex: Optional[pulumi.Input[str]] = None,
                    output_file: Optional[pulumi.Input[str]] = None,
                    vpn_gateway_id: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetConnectionsResult]
func GetConnections(ctx *Context, args *GetConnectionsArgs, opts ...InvokeOption) (*GetConnectionsResult, error)
func GetConnectionsOutput(ctx *Context, args *GetConnectionsOutputArgs, opts ...InvokeOption) GetConnectionsResultOutput

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

public static class GetConnections 
{
    public static Task<GetConnectionsResult> InvokeAsync(GetConnectionsArgs args, InvokeOptions? opts = null)
    public static Output<GetConnectionsResult> Invoke(GetConnectionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetConnectionsResult> getConnections(GetConnectionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:vpn/getConnections:getConnections
  Arguments:
    # Arguments dictionary

The following arguments are supported:

CustomerGatewayId string

Use the VPN customer gateway ID as the search key.

Ids List<string>

IDs of the VPN connections.

NameRegex string

A regex string of VPN connection name.

OutputFile string

Save the result to the file.

VpnGatewayId string

Use the VPN gateway ID as the search key.

CustomerGatewayId string

Use the VPN customer gateway ID as the search key.

Ids []string

IDs of the VPN connections.

NameRegex string

A regex string of VPN connection name.

OutputFile string

Save the result to the file.

VpnGatewayId string

Use the VPN gateway ID as the search key.

customerGatewayId String

Use the VPN customer gateway ID as the search key.

ids List<String>

IDs of the VPN connections.

nameRegex String

A regex string of VPN connection name.

outputFile String

Save the result to the file.

vpnGatewayId String

Use the VPN gateway ID as the search key.

customerGatewayId string

Use the VPN customer gateway ID as the search key.

ids string[]

IDs of the VPN connections.

nameRegex string

A regex string of VPN connection name.

outputFile string

Save the result to the file.

vpnGatewayId string

Use the VPN gateway ID as the search key.

customer_gateway_id str

Use the VPN customer gateway ID as the search key.

ids Sequence[str]

IDs of the VPN connections.

name_regex str

A regex string of VPN connection name.

output_file str

Save the result to the file.

vpn_gateway_id str

Use the VPN gateway ID as the search key.

customerGatewayId String

Use the VPN customer gateway ID as the search key.

ids List<String>

IDs of the VPN connections.

nameRegex String

A regex string of VPN connection name.

outputFile String

Save the result to the file.

vpnGatewayId String

Use the VPN gateway ID as the search key.

getConnections Result

The following output properties are available:

Connections List<Pulumi.AliCloud.Vpn.Outputs.GetConnectionsConnection>

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

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

(Optional) IDs of the VPN connections.

Names List<string>

(Optional) names of the VPN connections.

CustomerGatewayId string

ID of the VPN customer gateway.

NameRegex string
OutputFile string
VpnGatewayId string

ID of the VPN gateway.

Connections []GetConnectionsConnection

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

Id string

The provider-assigned unique ID for this managed resource.

Ids []string

(Optional) IDs of the VPN connections.

Names []string

(Optional) names of the VPN connections.

CustomerGatewayId string

ID of the VPN customer gateway.

NameRegex string
OutputFile string
VpnGatewayId string

ID of the VPN gateway.

connections List<GetConnectionsConnection>

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

id String

The provider-assigned unique ID for this managed resource.

ids List<String>

(Optional) IDs of the VPN connections.

names List<String>

(Optional) names of the VPN connections.

customerGatewayId String

ID of the VPN customer gateway.

nameRegex String
outputFile String
vpnGatewayId String

ID of the VPN gateway.

connections GetConnectionsConnection[]

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

id string

The provider-assigned unique ID for this managed resource.

ids string[]

(Optional) IDs of the VPN connections.

names string[]

(Optional) names of the VPN connections.

customerGatewayId string

ID of the VPN customer gateway.

nameRegex string
outputFile string
vpnGatewayId string

ID of the VPN gateway.

connections Sequence[GetConnectionsConnection]

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

id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]

(Optional) IDs of the VPN connections.

names Sequence[str]

(Optional) names of the VPN connections.

customer_gateway_id str

ID of the VPN customer gateway.

name_regex str
output_file str
vpn_gateway_id str

ID of the VPN gateway.

connections List<Property Map>

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

id String

The provider-assigned unique ID for this managed resource.

ids List<String>

(Optional) IDs of the VPN connections.

names List<String>

(Optional) names of the VPN connections.

customerGatewayId String

ID of the VPN customer gateway.

nameRegex String
outputFile String
vpnGatewayId String

ID of the VPN gateway.

Supporting Types

GetConnectionsConnection

CreateTime string
CustomerGatewayId string

Use the VPN customer gateway ID as the search key.

EffectImmediately bool
Id string

ID of the VPN connection.

LocalSubnet string

The local subnet of the VPN connection.

Name string

The name of the VPN connection.

RemoteSubnet string

The remote subnet of the VPN connection.

Status string

The status of the VPN connection, valid value:ike_sa_not_established, ike_sa_established, ipsec_sa_not_established, ipsec_sa_established.

VpnGatewayId string

Use the VPN gateway ID as the search key.

IkeConfigs List<Pulumi.AliCloud.Vpn.Inputs.GetConnectionsConnectionIkeConfig>

The configurations of phase-one negotiation.

IpsecConfigs List<Pulumi.AliCloud.Vpn.Inputs.GetConnectionsConnectionIpsecConfig>

The configurations of phase-two negotiation.

CreateTime string
CustomerGatewayId string

Use the VPN customer gateway ID as the search key.

EffectImmediately bool
Id string

ID of the VPN connection.

LocalSubnet string

The local subnet of the VPN connection.

Name string

The name of the VPN connection.

RemoteSubnet string

The remote subnet of the VPN connection.

Status string

The status of the VPN connection, valid value:ike_sa_not_established, ike_sa_established, ipsec_sa_not_established, ipsec_sa_established.

VpnGatewayId string

Use the VPN gateway ID as the search key.

IkeConfigs []GetConnectionsConnectionIkeConfig

The configurations of phase-one negotiation.

IpsecConfigs []GetConnectionsConnectionIpsecConfig

The configurations of phase-two negotiation.

createTime String
customerGatewayId String

Use the VPN customer gateway ID as the search key.

effectImmediately Boolean
id String

ID of the VPN connection.

localSubnet String

The local subnet of the VPN connection.

name String

The name of the VPN connection.

remoteSubnet String

The remote subnet of the VPN connection.

status String

The status of the VPN connection, valid value:ike_sa_not_established, ike_sa_established, ipsec_sa_not_established, ipsec_sa_established.

vpnGatewayId String

Use the VPN gateway ID as the search key.

ikeConfigs List<GetConnectionsConnectionIkeConfig>

The configurations of phase-one negotiation.

ipsecConfigs List<GetConnectionsConnectionIpsecConfig>

The configurations of phase-two negotiation.

createTime string
customerGatewayId string

Use the VPN customer gateway ID as the search key.

effectImmediately boolean
id string

ID of the VPN connection.

localSubnet string

The local subnet of the VPN connection.

name string

The name of the VPN connection.

remoteSubnet string

The remote subnet of the VPN connection.

status string

The status of the VPN connection, valid value:ike_sa_not_established, ike_sa_established, ipsec_sa_not_established, ipsec_sa_established.

vpnGatewayId string

Use the VPN gateway ID as the search key.

ikeConfigs GetConnectionsConnectionIkeConfig[]

The configurations of phase-one negotiation.

ipsecConfigs GetConnectionsConnectionIpsecConfig[]

The configurations of phase-two negotiation.

create_time str
customer_gateway_id str

Use the VPN customer gateway ID as the search key.

effect_immediately bool
id str

ID of the VPN connection.

local_subnet str

The local subnet of the VPN connection.

name str

The name of the VPN connection.

remote_subnet str

The remote subnet of the VPN connection.

status str

The status of the VPN connection, valid value:ike_sa_not_established, ike_sa_established, ipsec_sa_not_established, ipsec_sa_established.

vpn_gateway_id str

Use the VPN gateway ID as the search key.

ike_configs Sequence[GetConnectionsConnectionIkeConfig]

The configurations of phase-one negotiation.

ipsec_configs Sequence[GetConnectionsConnectionIpsecConfig]

The configurations of phase-two negotiation.

createTime String
customerGatewayId String

Use the VPN customer gateway ID as the search key.

effectImmediately Boolean
id String

ID of the VPN connection.

localSubnet String

The local subnet of the VPN connection.

name String

The name of the VPN connection.

remoteSubnet String

The remote subnet of the VPN connection.

status String

The status of the VPN connection, valid value:ike_sa_not_established, ike_sa_established, ipsec_sa_not_established, ipsec_sa_established.

vpnGatewayId String

Use the VPN gateway ID as the search key.

ikeConfigs List<Property Map>

The configurations of phase-one negotiation.

ipsecConfigs List<Property Map>

The configurations of phase-two negotiation.

GetConnectionsConnectionIkeConfig

IkeAuthAlg string

The authentication algorithm of phase-one negotiation.

IkeEncAlg string

The encryption algorithm of phase-one negotiation.

IkeLifetime int

The SA lifecycle as the result of phase-one negotiation.

IkeLocalId string

The identification of the VPN gateway.

IkeMode string

The negotiation mode of IKE phase-one.

IkePfs string

The Diffie-Hellman key exchange algorithm used by phase-one negotiation.

IkeRemoteId string

The identification of the customer gateway.

IkeVersion string

The version of the IKE protocol.

Psk string

Used for authentication between the IPsec VPN gateway and the customer gateway.

IkeAuthAlg string

The authentication algorithm of phase-one negotiation.

IkeEncAlg string

The encryption algorithm of phase-one negotiation.

IkeLifetime int

The SA lifecycle as the result of phase-one negotiation.

IkeLocalId string

The identification of the VPN gateway.

IkeMode string

The negotiation mode of IKE phase-one.

IkePfs string

The Diffie-Hellman key exchange algorithm used by phase-one negotiation.

IkeRemoteId string

The identification of the customer gateway.

IkeVersion string

The version of the IKE protocol.

Psk string

Used for authentication between the IPsec VPN gateway and the customer gateway.

ikeAuthAlg String

The authentication algorithm of phase-one negotiation.

ikeEncAlg String

The encryption algorithm of phase-one negotiation.

ikeLifetime Integer

The SA lifecycle as the result of phase-one negotiation.

ikeLocalId String

The identification of the VPN gateway.

ikeMode String

The negotiation mode of IKE phase-one.

ikePfs String

The Diffie-Hellman key exchange algorithm used by phase-one negotiation.

ikeRemoteId String

The identification of the customer gateway.

ikeVersion String

The version of the IKE protocol.

psk String

Used for authentication between the IPsec VPN gateway and the customer gateway.

ikeAuthAlg string

The authentication algorithm of phase-one negotiation.

ikeEncAlg string

The encryption algorithm of phase-one negotiation.

ikeLifetime number

The SA lifecycle as the result of phase-one negotiation.

ikeLocalId string

The identification of the VPN gateway.

ikeMode string

The negotiation mode of IKE phase-one.

ikePfs string

The Diffie-Hellman key exchange algorithm used by phase-one negotiation.

ikeRemoteId string

The identification of the customer gateway.

ikeVersion string

The version of the IKE protocol.

psk string

Used for authentication between the IPsec VPN gateway and the customer gateway.

ike_auth_alg str

The authentication algorithm of phase-one negotiation.

ike_enc_alg str

The encryption algorithm of phase-one negotiation.

ike_lifetime int

The SA lifecycle as the result of phase-one negotiation.

ike_local_id str

The identification of the VPN gateway.

ike_mode str

The negotiation mode of IKE phase-one.

ike_pfs str

The Diffie-Hellman key exchange algorithm used by phase-one negotiation.

ike_remote_id str

The identification of the customer gateway.

ike_version str

The version of the IKE protocol.

psk str

Used for authentication between the IPsec VPN gateway and the customer gateway.

ikeAuthAlg String

The authentication algorithm of phase-one negotiation.

ikeEncAlg String

The encryption algorithm of phase-one negotiation.

ikeLifetime Number

The SA lifecycle as the result of phase-one negotiation.

ikeLocalId String

The identification of the VPN gateway.

ikeMode String

The negotiation mode of IKE phase-one.

ikePfs String

The Diffie-Hellman key exchange algorithm used by phase-one negotiation.

ikeRemoteId String

The identification of the customer gateway.

ikeVersion String

The version of the IKE protocol.

psk String

Used for authentication between the IPsec VPN gateway and the customer gateway.

GetConnectionsConnectionIpsecConfig

IpsecAuthAlg string

The authentication algorithm of phase-two negotiation.

IpsecEncAlg string

The encryption algorithm of phase-two negotiation.

IpsecLifetime int

The SA lifecycle as the result of phase-two negotiation.

IpsecPfs string

The Diffie-Hellman key exchange algorithm used by phase-two negotiation.

IpsecAuthAlg string

The authentication algorithm of phase-two negotiation.

IpsecEncAlg string

The encryption algorithm of phase-two negotiation.

IpsecLifetime int

The SA lifecycle as the result of phase-two negotiation.

IpsecPfs string

The Diffie-Hellman key exchange algorithm used by phase-two negotiation.

ipsecAuthAlg String

The authentication algorithm of phase-two negotiation.

ipsecEncAlg String

The encryption algorithm of phase-two negotiation.

ipsecLifetime Integer

The SA lifecycle as the result of phase-two negotiation.

ipsecPfs String

The Diffie-Hellman key exchange algorithm used by phase-two negotiation.

ipsecAuthAlg string

The authentication algorithm of phase-two negotiation.

ipsecEncAlg string

The encryption algorithm of phase-two negotiation.

ipsecLifetime number

The SA lifecycle as the result of phase-two negotiation.

ipsecPfs string

The Diffie-Hellman key exchange algorithm used by phase-two negotiation.

ipsec_auth_alg str

The authentication algorithm of phase-two negotiation.

ipsec_enc_alg str

The encryption algorithm of phase-two negotiation.

ipsec_lifetime int

The SA lifecycle as the result of phase-two negotiation.

ipsec_pfs str

The Diffie-Hellman key exchange algorithm used by phase-two negotiation.

ipsecAuthAlg String

The authentication algorithm of phase-two negotiation.

ipsecEncAlg String

The encryption algorithm of phase-two negotiation.

ipsecLifetime Number

The SA lifecycle as the result of phase-two negotiation.

ipsecPfs String

The Diffie-Hellman key exchange algorithm used by phase-two negotiation.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.