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 This property is required. string - The time of creation for VPN Connection, formatted in RFC3339 time string.
- Customer
Gateway Id This property is required. string - The ID of VPN Customer Gateway.
- Id
This property is required. string - The ID of VPN Connection.
- Ike
Configs This property is required. List<GetVpn Connections Vpn Connection Ike Config> - It is a nested type which documented below.
- Ipsec
Configs This property is required. List<GetVpn Connections Vpn Connection Ipsec Config> - It is a nested type which documented below.
- Name
This property is required. string - The name of the VPN Connection.
- Remark
This property is required. string - The remarks of VPN Connection.
- Tag
This property is required. string - A tag assigned to VPN Connection.
- Vpc
Id This property is required. string - The ID of VPC linked to the VPN Connection.
- Vpn
Gateway Id This property is required. string - The ID of VPN Gateway.
- Create
Time This property is required. string - The time of creation for VPN Connection, formatted in RFC3339 time string.
- Customer
Gateway Id This property is required. string - The ID of VPN Customer Gateway.
- Id
This property is required. string - The ID of VPN Connection.
- Ike
Configs This property is required. []GetVpn Connections Vpn Connection Ike Config - It is a nested type which documented below.
- Ipsec
Configs This property is required. []GetVpn Connections Vpn Connection Ipsec Config - It is a nested type which documented below.
- Name
This property is required. string - The name of the VPN Connection.
- Remark
This property is required. string - The remarks of VPN Connection.
- Tag
This property is required. string - A tag assigned to VPN Connection.
- Vpc
Id This property is required. string - The ID of VPC linked to the VPN Connection.
- Vpn
Gateway Id This property is required. string - The ID of VPN Gateway.
- create
Time This property is required. String - The time of creation for VPN Connection, formatted in RFC3339 time string.
- customer
Gateway Id This property is required. String - The ID of VPN Customer Gateway.
- id
This property is required. String - The ID of VPN Connection.
- ike
Configs This property is required. List<GetVpn Connections Vpn Connection Ike Config> - It is a nested type which documented below.
- ipsec
Configs This property is required. List<GetVpn Connections Vpn Connection Ipsec Config> - It is a nested type which documented below.
- name
This property is required. String - The name of the VPN Connection.
- remark
This property is required. String - The remarks of VPN Connection.
- tag
This property is required. String - A tag assigned to VPN Connection.
- vpc
Id This property is required. String - The ID of VPC linked to the VPN Connection.
- vpn
Gateway Id This property is required. String - The ID of VPN Gateway.
- create
Time This property is required. string - The time of creation for VPN Connection, formatted in RFC3339 time string.
- customer
Gateway Id This property is required. string - The ID of VPN Customer Gateway.
- id
This property is required. string - The ID of VPN Connection.
- ike
Configs This property is required. GetVpn Connections Vpn Connection Ike Config[] - It is a nested type which documented below.
- ipsec
Configs This property is required. GetVpn Connections Vpn Connection Ipsec Config[] - It is a nested type which documented below.
- name
This property is required. string - The name of the VPN Connection.
- remark
This property is required. string - The remarks of VPN Connection.
- tag
This property is required. string - A tag assigned to VPN Connection.
- vpc
Id This property is required. string - The ID of VPC linked to the VPN Connection.
- vpn
Gateway Id This property is required. string - The ID of VPN Gateway.
- create_
time This property is required. str - The time of creation for VPN Connection, formatted in RFC3339 time string.
- customer_
gateway_ id This property is required. str - The ID of VPN Customer Gateway.
- id
This property is required. str - The ID of VPN Connection.
- ike_
configs This property is required. Sequence[GetVpn Connections Vpn Connection Ike Config] - It is a nested type which documented below.
- ipsec_
configs This property is required. Sequence[GetVpn Connections Vpn Connection Ipsec Config] - It is a nested type which documented below.
- name
This property is required. str - The name of the VPN Connection.
- remark
This property is required. str - The remarks of VPN Connection.
- tag
This property is required. str - A tag assigned to VPN Connection.
- vpc_
id This property is required. str - The ID of VPC linked to the VPN Connection.
- vpn_
gateway_ id This property is required. str - The ID of VPN Gateway.
- create
Time This property is required. String - The time of creation for VPN Connection, formatted in RFC3339 time string.
- customer
Gateway Id This property is required. String - The ID of VPN Customer Gateway.
- id
This property is required. String - The ID of VPN Connection.
- ike
Configs This property is required. List<Property Map> - It is a nested type which documented below.
- ipsec
Configs This property is required. List<Property Map> - It is a nested type which documented below.
- name
This property is required. String - The name of the VPN Connection.
- remark
This property is required. String - The remarks of VPN Connection.
- tag
This property is required. String - A tag assigned to VPN Connection.
- vpc
Id This property is required. String - The ID of VPC linked to the VPN Connection.
- vpn
Gateway Id This property is required. String - The ID of VPN Gateway.
GetVpnConnectionsVpnConnectionIkeConfig
- Authentication
Algorithm This property is required. string - The authentication algorithm of IPSec negotiation.
- Dh
Group This property is required. string - The Diffie-Hellman group used by IKE negotiation.
- Encryption
Algorithm This property is required. string - The encryption algorithm of IPSec negotiation.
- Exchange
Mode This property is required. string - The negotiation exchange mode of IKE V1 of VPN gateway.
- Ike
Version This property is required. string - The version of the IKE protocol.
- Local
Id This property is required. string - The identification of the VPN gateway.
This property is required. string- The key used for authentication between the VPN gateway and the Customer gateway.
- Remote
Id This property is required. string - The identification of the Customer gateway.
- Sa
Life Time This property is required. double - The Security Association lifecycle as the result of IPSec negotiation.
- Authentication
Algorithm This property is required. string - The authentication algorithm of IPSec negotiation.
- Dh
Group This property is required. string - The Diffie-Hellman group used by IKE negotiation.
- Encryption
Algorithm This property is required. string - The encryption algorithm of IPSec negotiation.
- Exchange
Mode This property is required. string - The negotiation exchange mode of IKE V1 of VPN gateway.
- Ike
Version This property is required. string - The version of the IKE protocol.
- Local
Id This property is required. string - The identification of the VPN gateway.
This property is required. string- The key used for authentication between the VPN gateway and the Customer gateway.
- Remote
Id This property is required. string - The identification of the Customer gateway.
- Sa
Life Time This property is required. float64 - The Security Association lifecycle as the result of IPSec negotiation.
- authentication
Algorithm This property is required. String - The authentication algorithm of IPSec negotiation.
- dh
Group This property is required. String - The Diffie-Hellman group used by IKE negotiation.
- encryption
Algorithm This property is required. String - The encryption algorithm of IPSec negotiation.
- exchange
Mode This property is required. String - The negotiation exchange mode of IKE V1 of VPN gateway.
- ike
Version This property is required. String - The version of the IKE protocol.
- local
Id This property is required. String - The identification of the VPN gateway.
This property is required. String- The key used for authentication between the VPN gateway and the Customer gateway.
- remote
Id This property is required. String - The identification of the Customer gateway.
- sa
Life Time This property is required. Double - The Security Association lifecycle as the result of IPSec negotiation.
- authentication
Algorithm This property is required. string - The authentication algorithm of IPSec negotiation.
- dh
Group This property is required. string - The Diffie-Hellman group used by IKE negotiation.
- encryption
Algorithm This property is required. string - The encryption algorithm of IPSec negotiation.
- exchange
Mode This property is required. string - The negotiation exchange mode of IKE V1 of VPN gateway.
- ike
Version This property is required. string - The version of the IKE protocol.
- local
Id This property is required. string - The identification of the VPN gateway.
This property is required. string- The key used for authentication between the VPN gateway and the Customer gateway.
- remote
Id This property is required. string - The identification of the Customer gateway.
- sa
Life Time This property is required. number - The Security Association lifecycle as the result of IPSec negotiation.
- authentication_
algorithm This property is required. str - The authentication algorithm of IPSec negotiation.
- dh_
group This property is required. str - The Diffie-Hellman group used by IKE negotiation.
- encryption_
algorithm This property is required. str - The encryption algorithm of IPSec negotiation.
- exchange_
mode This property is required. str - The negotiation exchange mode of IKE V1 of VPN gateway.
- ike_
version This property is required. str - The version of the IKE protocol.
- local_
id This property is required. str - The identification of the VPN gateway.
This property is required. str- The key used for authentication between the VPN gateway and the Customer gateway.
- remote_
id This property is required. str - The identification of the Customer gateway.
- sa_
life_ time This property is required. float - The Security Association lifecycle as the result of IPSec negotiation.
- authentication
Algorithm This property is required. String - The authentication algorithm of IPSec negotiation.
- dh
Group This property is required. String - The Diffie-Hellman group used by IKE negotiation.
- encryption
Algorithm This property is required. String - The encryption algorithm of IPSec negotiation.
- exchange
Mode This property is required. String - The negotiation exchange mode of IKE V1 of VPN gateway.
- ike
Version This property is required. String - The version of the IKE protocol.
- local
Id This property is required. String - The identification of the VPN gateway.
This property is required. String- The key used for authentication between the VPN gateway and the Customer gateway.
- remote
Id This property is required. String - The identification of the Customer gateway.
- sa
Life Time This property is required. Number - The Security Association lifecycle as the result of IPSec negotiation.
GetVpnConnectionsVpnConnectionIpsecConfig
- Authentication
Algorithm This property is required. string - The authentication algorithm of IPSec negotiation.
- Encryption
Algorithm This property is required. string - The encryption algorithm of IPSec negotiation.
- Local
Subnet Ids This property is required. List<string> - The id list of Local subnet.
- Pfs
Dh Group This property is required. string - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. - Protocol
This property is required. string - The security protocol of IPSec negotiation.
- Remote
Subnets This property is required. List<string> - The ip address list of remote subnet.
- Sa
Life Time This property is required. double - The Security Association lifecycle as the result of IPSec negotiation.
- Sa
Life Time Bytes This property is required. double - The Security Association lifecycle in bytes as the result of IPSec negotiation.
- Authentication
Algorithm This property is required. string - The authentication algorithm of IPSec negotiation.
- Encryption
Algorithm This property is required. string - The encryption algorithm of IPSec negotiation.
- Local
Subnet Ids This property is required. []string - The id list of Local subnet.
- Pfs
Dh Group This property is required. string - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. - Protocol
This property is required. string - The security protocol of IPSec negotiation.
- Remote
Subnets This property is required. []string - The ip address list of remote subnet.
- Sa
Life Time This property is required. float64 - The Security Association lifecycle as the result of IPSec negotiation.
- Sa
Life Time Bytes This property is required. float64 - The Security Association lifecycle in bytes as the result of IPSec negotiation.
- authentication
Algorithm This property is required. String - The authentication algorithm of IPSec negotiation.
- encryption
Algorithm This property is required. String - The encryption algorithm of IPSec negotiation.
- local
Subnet Ids This property is required. List<String> - The id list of Local subnet.
- pfs
Dh Group This property is required. String - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. - protocol
This property is required. String - The security protocol of IPSec negotiation.
- remote
Subnets This property is required. List<String> - The ip address list of remote subnet.
- sa
Life Time This property is required. Double - The Security Association lifecycle as the result of IPSec negotiation.
- sa
Life Time Bytes This property is required. Double - The Security Association lifecycle in bytes as the result of IPSec negotiation.
- authentication
Algorithm This property is required. string - The authentication algorithm of IPSec negotiation.
- encryption
Algorithm This property is required. string - The encryption algorithm of IPSec negotiation.
- local
Subnet Ids This property is required. string[] - The id list of Local subnet.
- pfs
Dh Group This property is required. string - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. - protocol
This property is required. string - The security protocol of IPSec negotiation.
- remote
Subnets This property is required. string[] - The ip address list of remote subnet.
- sa
Life Time This property is required. number - The Security Association lifecycle as the result of IPSec negotiation.
- sa
Life Time Bytes This property is required. number - The Security Association lifecycle in bytes as the result of IPSec negotiation.
- authentication_
algorithm This property is required. str - The authentication algorithm of IPSec negotiation.
- encryption_
algorithm This property is required. str - The encryption algorithm of IPSec negotiation.
- local_
subnet_ ids This property is required. Sequence[str] - The id list of Local subnet.
- pfs_
dh_ group This property is required. str - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. - protocol
This property is required. str - The security protocol of IPSec negotiation.
- remote_
subnets This property is required. Sequence[str] - The ip address list of remote subnet.
- sa_
life_ time This property is required. float - The Security Association lifecycle as the result of IPSec negotiation.
- sa_
life_ time_ bytes This property is required. float - The Security Association lifecycle in bytes as the result of IPSec negotiation.
- authentication
Algorithm This property is required. String - The authentication algorithm of IPSec negotiation.
- encryption
Algorithm This property is required. String - The encryption algorithm of IPSec negotiation.
- local
Subnet Ids This property is required. List<String> - The id list of Local subnet.
- pfs
Dh Group This property is required. String - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. - protocol
This property is required. String - The security protocol of IPSec negotiation.
- remote
Subnets This property is required. List<String> - The ip address list of remote subnet.
- sa
Life Time This property is required. Number - The Security Association lifecycle as the result of IPSec negotiation.
- sa
Life Time Bytes This property is required. Number - 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.