ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud
ucloud.getVpnConnections
Explore with Pulumi AI
This data source providers a list of VPN Connection resources according to their ID, name and tag.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ucloud from "@pulumi/ucloud";
const example = ucloud.getVpnConnections({});
export const first = example.then(example => example.vpnConnections?.[0]?.id);
import pulumi
import pulumi_ucloud as ucloud
example = ucloud.get_vpn_connections()
pulumi.export("first", example.vpn_connections[0].id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := ucloud.GetVpnConnections(ctx, &ucloud.GetVpnConnectionsArgs{}, nil)
if err != nil {
return err
}
ctx.Export("first", example.VpnConnections[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ucloud = Pulumi.Ucloud;
return await Deployment.RunAsync(() =>
{
var example = Ucloud.GetVpnConnections.Invoke();
return new Dictionary<string, object?>
{
["first"] = example.Apply(getVpnConnectionsResult => getVpnConnectionsResult.VpnConnections[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ucloud.UcloudFunctions;
import com.pulumi.ucloud.inputs.GetVpnConnectionsArgs;
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 example = UcloudFunctions.getVpnConnections();
ctx.export("first", example.applyValue(getVpnConnectionsResult -> getVpnConnectionsResult.vpnConnections()[0].id()));
}
}
variables:
example:
fn::invoke:
function: ucloud:getVpnConnections
arguments: {}
outputs:
first: ${example.vpnConnections[0].id}
Using getVpnConnections
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 getVpnConnections(args: GetVpnConnectionsArgs, opts?: InvokeOptions): Promise<GetVpnConnectionsResult>
function getVpnConnectionsOutput(args: GetVpnConnectionsOutputArgs, opts?: InvokeOptions): Output<GetVpnConnectionsResult>
def get_vpn_connections(id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
tag: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVpnConnectionsResult
def get_vpn_connections_output(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,
tag: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVpnConnectionsResult]
func GetVpnConnections(ctx *Context, args *GetVpnConnectionsArgs, opts ...InvokeOption) (*GetVpnConnectionsResult, error)
func GetVpnConnectionsOutput(ctx *Context, args *GetVpnConnectionsOutputArgs, opts ...InvokeOption) GetVpnConnectionsResultOutput
> Note: This function is named GetVpnConnections
in the Go SDK.
public static class GetVpnConnections
{
public static Task<GetVpnConnectionsResult> InvokeAsync(GetVpnConnectionsArgs args, InvokeOptions? opts = null)
public static Output<GetVpnConnectionsResult> Invoke(GetVpnConnectionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVpnConnectionsResult> getVpnConnections(GetVpnConnectionsArgs args, InvokeOptions options)
public static Output<GetVpnConnectionsResult> getVpnConnections(GetVpnConnectionsArgs args, InvokeOptions options)
fn::invoke:
function: ucloud:index/getVpnConnections:getVpnConnections
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- The ID of VPN Connection.
- Ids List<string>
- A list of VPN Connection IDs, all the VPN Connections belongs to the defined region will be retrieved if this argument is
[]
. - Name
Regex string - A regex string to filter resulting VPN Connections by name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Tag string
- A tag assigned to VPN Connection.
- Id string
- The ID of VPN Connection.
- Ids []string
- A list of VPN Connection IDs, all the VPN Connections belongs to the defined region will be retrieved if this argument is
[]
. - Name
Regex string - A regex string to filter resulting VPN Connections by name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Tag string
- A tag assigned to VPN Connection.
- id String
- The ID of VPN Connection.
- ids List<String>
- A list of VPN Connection IDs, all the VPN Connections belongs to the defined region will be retrieved if this argument is
[]
. - name
Regex String - A regex string to filter resulting VPN Connections by name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - tag String
- A tag assigned to VPN Connection.
- id string
- The ID of VPN Connection.
- ids string[]
- A list of VPN Connection IDs, all the VPN Connections belongs to the defined region will be retrieved if this argument is
[]
. - name
Regex string - A regex string to filter resulting VPN Connections by name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - tag string
- A tag assigned to VPN Connection.
- id str
- The ID of VPN Connection.
- ids Sequence[str]
- A list of VPN Connection IDs, all the VPN Connections belongs to the defined region will be retrieved if this argument is
[]
. - name_
regex str - A regex string to filter resulting VPN Connections by name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - tag str
- A tag assigned to VPN Connection.
- id String
- The ID of VPN Connection.
- ids List<String>
- A list of VPN Connection IDs, all the VPN Connections belongs to the defined region will be retrieved if this argument is
[]
. - name
Regex String - A regex string to filter resulting VPN Connections by name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - tag String
- A tag assigned to VPN Connection.
getVpnConnections Result
The following output properties are available:
- Id string
- The ID of VPN Connection.
- Ids List<string>
- Total
Count double - Total number of VPN Connections that satisfy the condition.
- Vpn
Connections List<GetVpn Connections Vpn Connection> - It is a nested type. VPN Connections documented below.
- Name
Regex string - Output
File string - Tag string
- A tag assigned to the VPN Connection.
- Id string
- The ID of VPN Connection.
- Ids []string
- Total
Count float64 - Total number of VPN Connections that satisfy the condition.
- Vpn
Connections []GetVpn Connections Vpn Connection - It is a nested type. VPN Connections documented below.
- Name
Regex string - Output
File string - Tag string
- A tag assigned to the VPN Connection.
- id String
- The ID of VPN Connection.
- ids List<String>
- total
Count Double - Total number of VPN Connections that satisfy the condition.
- vpn
Connections List<GetVpn Connections Vpn Connection> - It is a nested type. VPN Connections documented below.
- name
Regex String - output
File String - tag String
- A tag assigned to the VPN Connection.
- id string
- The ID of VPN Connection.
- ids string[]
- total
Count number - Total number of VPN Connections that satisfy the condition.
- vpn
Connections GetVpn Connections Vpn Connection[] - It is a nested type. VPN Connections documented below.
- name
Regex string - output
File string - tag string
- A tag assigned to the VPN Connection.
- id str
- The ID of VPN Connection.
- ids Sequence[str]
- total_
count float - Total number of VPN Connections that satisfy the condition.
- vpn_
connections Sequence[GetVpn Connections Vpn Connection] - It is a nested type. VPN Connections documented below.
- name_
regex str - output_
file str - tag str
- A tag assigned to the VPN Connection.
- id String
- The ID of VPN Connection.
- ids List<String>
- total
Count Number - Total number of VPN Connections that satisfy the condition.
- vpn
Connections List<Property Map> - It is a nested type. VPN Connections documented below.
- name
Regex String - output
File String - tag String
- A tag assigned to the VPN Connection.
Supporting Types
GetVpnConnectionsVpnConnection
- Create
Time string - The time of creation for VPN Connection, formatted in RFC3339 time string.
- Customer
Gateway stringId - The ID of VPN Customer Gateway.
- Id string
- The ID of VPN Connection.
- Ike
Configs List<GetVpn Connections Vpn Connection Ike Config> - It is a nested type which documented below.
- Ipsec
Configs List<GetVpn Connections Vpn Connection Ipsec Config> - It is a nested type which documented below.
- Name string
- The name of the VPN Connection.
- Remark string
- The remarks of VPN Connection.
- Tag string
- A tag assigned to VPN Connection.
- Vpc
Id string - The ID of VPC linked to the VPN Connection.
- Vpn
Gateway stringId - The ID of VPN Gateway.
- Create
Time string - The time of creation for VPN Connection, formatted in RFC3339 time string.
- Customer
Gateway stringId - The ID of VPN Customer Gateway.
- Id string
- The ID of VPN Connection.
- Ike
Configs []GetVpn Connections Vpn Connection Ike Config - It is a nested type which documented below.
- Ipsec
Configs []GetVpn Connections Vpn Connection Ipsec Config - It is a nested type which documented below.
- Name string
- The name of the VPN Connection.
- Remark string
- The remarks of VPN Connection.
- Tag string
- A tag assigned to VPN Connection.
- Vpc
Id string - The ID of VPC linked to the VPN Connection.
- Vpn
Gateway stringId - The ID of VPN Gateway.
- create
Time String - The time of creation for VPN Connection, formatted in RFC3339 time string.
- customer
Gateway StringId - The ID of VPN Customer Gateway.
- id String
- The ID of VPN Connection.
- ike
Configs List<GetVpn Connections Vpn Connection Ike Config> - It is a nested type which documented below.
- ipsec
Configs List<GetVpn Connections Vpn Connection Ipsec Config> - It is a nested type which documented below.
- name String
- The name of the VPN Connection.
- remark String
- The remarks of VPN Connection.
- tag String
- A tag assigned to VPN Connection.
- vpc
Id String - The ID of VPC linked to the VPN Connection.
- vpn
Gateway StringId - The ID of VPN Gateway.
- create
Time string - The time of creation for VPN Connection, formatted in RFC3339 time string.
- customer
Gateway stringId - The ID of VPN Customer Gateway.
- id string
- The ID of VPN Connection.
- ike
Configs GetVpn Connections Vpn Connection Ike Config[] - It is a nested type which documented below.
- ipsec
Configs GetVpn Connections Vpn Connection Ipsec Config[] - It is a nested type which documented below.
- name string
- The name of the VPN Connection.
- remark string
- The remarks of VPN Connection.
- tag string
- A tag assigned to VPN Connection.
- vpc
Id string - The ID of VPC linked to the VPN Connection.
- vpn
Gateway stringId - The ID of VPN Gateway.
- create_
time str - The time of creation for VPN Connection, formatted in RFC3339 time string.
- customer_
gateway_ strid - The ID of VPN Customer Gateway.
- id str
- The ID of VPN Connection.
- ike_
configs Sequence[GetVpn Connections Vpn Connection Ike Config] - It is a nested type which documented below.
- ipsec_
configs Sequence[GetVpn Connections Vpn Connection Ipsec Config] - It is a nested type which documented below.
- name str
- The name of the VPN Connection.
- remark str
- The remarks of VPN Connection.
- tag str
- A tag assigned to VPN Connection.
- vpc_
id str - The ID of VPC linked to the VPN Connection.
- vpn_
gateway_ strid - The ID of VPN Gateway.
- create
Time String - The time of creation for VPN Connection, formatted in RFC3339 time string.
- customer
Gateway StringId - The ID of VPN Customer Gateway.
- id String
- The ID of VPN Connection.
- ike
Configs List<Property Map> - It is a nested type which documented below.
- ipsec
Configs List<Property Map> - It is a nested type which documented below.
- name String
- The name of the VPN Connection.
- remark String
- The remarks of VPN Connection.
- tag String
- A tag assigned to VPN Connection.
- vpc
Id String - The ID of VPC linked to the VPN Connection.
- vpn
Gateway StringId - The ID of VPN Gateway.
GetVpnConnectionsVpnConnectionIkeConfig
- Authentication
Algorithm string - The authentication algorithm of IPSec negotiation.
- Dh
Group string - The Diffie-Hellman group used by IKE negotiation.
- Encryption
Algorithm string - The encryption algorithm of IPSec negotiation.
- Exchange
Mode string - The negotiation exchange mode of IKE V1 of VPN gateway.
- Ike
Version string - The version of the IKE protocol.
- Local
Id string - The identification of the VPN gateway.
- string
- The key used for authentication between the VPN gateway and the Customer gateway.
- Remote
Id string - The identification of the Customer gateway.
- Sa
Life doubleTime - The Security Association lifecycle as the result of IPSec negotiation.
- Authentication
Algorithm string - The authentication algorithm of IPSec negotiation.
- Dh
Group string - The Diffie-Hellman group used by IKE negotiation.
- Encryption
Algorithm string - The encryption algorithm of IPSec negotiation.
- Exchange
Mode string - The negotiation exchange mode of IKE V1 of VPN gateway.
- Ike
Version string - The version of the IKE protocol.
- Local
Id string - The identification of the VPN gateway.
- string
- The key used for authentication between the VPN gateway and the Customer gateway.
- Remote
Id string - The identification of the Customer gateway.
- Sa
Life float64Time - The Security Association lifecycle as the result of IPSec negotiation.
- authentication
Algorithm String - The authentication algorithm of IPSec negotiation.
- dh
Group String - The Diffie-Hellman group used by IKE negotiation.
- encryption
Algorithm String - The encryption algorithm of IPSec negotiation.
- exchange
Mode String - The negotiation exchange mode of IKE V1 of VPN gateway.
- ike
Version String - The version of the IKE protocol.
- local
Id String - The identification of the VPN gateway.
- String
- The key used for authentication between the VPN gateway and the Customer gateway.
- remote
Id String - The identification of the Customer gateway.
- sa
Life DoubleTime - The Security Association lifecycle as the result of IPSec negotiation.
- authentication
Algorithm string - The authentication algorithm of IPSec negotiation.
- dh
Group string - The Diffie-Hellman group used by IKE negotiation.
- encryption
Algorithm string - The encryption algorithm of IPSec negotiation.
- exchange
Mode string - The negotiation exchange mode of IKE V1 of VPN gateway.
- ike
Version string - The version of the IKE protocol.
- local
Id string - The identification of the VPN gateway.
- string
- The key used for authentication between the VPN gateway and the Customer gateway.
- remote
Id string - The identification of the Customer gateway.
- sa
Life numberTime - The Security Association lifecycle as the result of IPSec negotiation.
- authentication_
algorithm str - The authentication algorithm of IPSec negotiation.
- dh_
group str - The Diffie-Hellman group used by IKE negotiation.
- encryption_
algorithm str - The encryption algorithm of IPSec negotiation.
- exchange_
mode str - The negotiation exchange mode of IKE V1 of VPN gateway.
- ike_
version str - The version of the IKE protocol.
- local_
id str - The identification of the VPN gateway.
- str
- The key used for authentication between the VPN gateway and the Customer gateway.
- remote_
id str - The identification of the Customer gateway.
- sa_
life_ floattime - The Security Association lifecycle as the result of IPSec negotiation.
- authentication
Algorithm String - The authentication algorithm of IPSec negotiation.
- dh
Group String - The Diffie-Hellman group used by IKE negotiation.
- encryption
Algorithm String - The encryption algorithm of IPSec negotiation.
- exchange
Mode String - The negotiation exchange mode of IKE V1 of VPN gateway.
- ike
Version String - The version of the IKE protocol.
- local
Id String - The identification of the VPN gateway.
- String
- The key used for authentication between the VPN gateway and the Customer gateway.
- remote
Id String - The identification of the Customer gateway.
- sa
Life NumberTime - The Security Association lifecycle as the result of IPSec negotiation.
GetVpnConnectionsVpnConnectionIpsecConfig
- Authentication
Algorithm string - The authentication algorithm of IPSec negotiation.
- Encryption
Algorithm string - The encryption algorithm of IPSec negotiation.
- Local
Subnet List<string>Ids - The id list of Local subnet.
- Pfs
Dh stringGroup - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. - Protocol string
- The security protocol of IPSec negotiation.
- Remote
Subnets List<string> - The ip address list of remote subnet.
- Sa
Life doubleTime - The Security Association lifecycle as the result of IPSec negotiation.
- Sa
Life doubleTime Bytes - The Security Association lifecycle in bytes as the result of IPSec negotiation.
- Authentication
Algorithm string - The authentication algorithm of IPSec negotiation.
- Encryption
Algorithm string - The encryption algorithm of IPSec negotiation.
- Local
Subnet []stringIds - The id list of Local subnet.
- Pfs
Dh stringGroup - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. - Protocol string
- The security protocol of IPSec negotiation.
- Remote
Subnets []string - The ip address list of remote subnet.
- Sa
Life float64Time - The Security Association lifecycle as the result of IPSec negotiation.
- Sa
Life float64Time Bytes - The Security Association lifecycle in bytes as the result of IPSec negotiation.
- authentication
Algorithm String - The authentication algorithm of IPSec negotiation.
- encryption
Algorithm String - The encryption algorithm of IPSec negotiation.
- local
Subnet List<String>Ids - The id list of Local subnet.
- pfs
Dh StringGroup - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. - protocol String
- The security protocol of IPSec negotiation.
- remote
Subnets List<String> - The ip address list of remote subnet.
- sa
Life DoubleTime - The Security Association lifecycle as the result of IPSec negotiation.
- sa
Life DoubleTime Bytes - The Security Association lifecycle in bytes as the result of IPSec negotiation.
- authentication
Algorithm string - The authentication algorithm of IPSec negotiation.
- encryption
Algorithm string - The encryption algorithm of IPSec negotiation.
- local
Subnet string[]Ids - The id list of Local subnet.
- pfs
Dh stringGroup - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. - protocol string
- The security protocol of IPSec negotiation.
- remote
Subnets string[] - The ip address list of remote subnet.
- sa
Life numberTime - The Security Association lifecycle as the result of IPSec negotiation.
- sa
Life numberTime Bytes - The Security Association lifecycle in bytes as the result of IPSec negotiation.
- authentication_
algorithm str - The authentication algorithm of IPSec negotiation.
- encryption_
algorithm str - The encryption algorithm of IPSec negotiation.
- local_
subnet_ Sequence[str]ids - The id list of Local subnet.
- pfs_
dh_ strgroup - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. - protocol str
- The security protocol of IPSec negotiation.
- remote_
subnets Sequence[str] - The ip address list of remote subnet.
- sa_
life_ floattime - The Security Association lifecycle as the result of IPSec negotiation.
- sa_
life_ floattime_ bytes - The Security Association lifecycle in bytes as the result of IPSec negotiation.
- authentication
Algorithm String - The authentication algorithm of IPSec negotiation.
- encryption
Algorithm String - The encryption algorithm of IPSec negotiation.
- local
Subnet List<String>Ids - The id list of Local subnet.
- pfs
Dh StringGroup - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. - protocol String
- The security protocol of IPSec negotiation.
- remote
Subnets List<String> - The ip address list of remote subnet.
- sa
Life NumberTime - The Security Association lifecycle as the result of IPSec negotiation.
- sa
Life NumberTime Bytes - The Security Association lifecycle in bytes as the result of IPSec negotiation.
Package Details
- Repository
- ucloud ucloud/terraform-provider-ucloud
- License
- Notes
- This Pulumi package is based on the
ucloud
Terraform Provider.