1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getVpnGatewayRoutes
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getVpnGatewayRoutes

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query detailed information of VPN gateways routes.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getVpnGatewayRoutes({
        destinationCidr: "10.0.0.0/8",
        instanceId: "vpnx-m16m4sw4",
        instanceType: "VPNCONN",
        vpnGatewayId: "vpngw-8dua3tbl",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_vpn_gateway_routes(destination_cidr="10.0.0.0/8",
        instance_id="vpnx-m16m4sw4",
        instance_type="VPNCONN",
        vpn_gateway_id="vpngw-8dua3tbl")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.GetVpnGatewayRoutes(ctx, &tencentcloud.GetVpnGatewayRoutesArgs{
    			DestinationCidr: pulumi.StringRef("10.0.0.0/8"),
    			InstanceId:      pulumi.StringRef("vpnx-m16m4sw4"),
    			InstanceType:    pulumi.StringRef("VPNCONN"),
    			VpnGatewayId:    "vpngw-8dua3tbl",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Tencentcloud.GetVpnGatewayRoutes.Invoke(new()
        {
            DestinationCidr = "10.0.0.0/8",
            InstanceId = "vpnx-m16m4sw4",
            InstanceType = "VPNCONN",
            VpnGatewayId = "vpngw-8dua3tbl",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetVpnGatewayRoutesArgs;
    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 = TencentcloudFunctions.getVpnGatewayRoutes(GetVpnGatewayRoutesArgs.builder()
                .destinationCidr("10.0.0.0/8")
                .instanceId("vpnx-m16m4sw4")
                .instanceType("VPNCONN")
                .vpnGatewayId("vpngw-8dua3tbl")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getVpnGatewayRoutes
          arguments:
            destinationCidr: 10.0.0.0/8
            instanceId: vpnx-m16m4sw4
            instanceType: VPNCONN
            vpnGatewayId: vpngw-8dua3tbl
    

    Using getVpnGatewayRoutes

    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 getVpnGatewayRoutes(args: GetVpnGatewayRoutesArgs, opts?: InvokeOptions): Promise<GetVpnGatewayRoutesResult>
    function getVpnGatewayRoutesOutput(args: GetVpnGatewayRoutesOutputArgs, opts?: InvokeOptions): Output<GetVpnGatewayRoutesResult>
    def get_vpn_gateway_routes(destination_cidr: Optional[str] = None,
                               id: Optional[str] = None,
                               instance_id: Optional[str] = None,
                               instance_type: Optional[str] = None,
                               result_output_file: Optional[str] = None,
                               vpn_gateway_id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetVpnGatewayRoutesResult
    def get_vpn_gateway_routes_output(destination_cidr: Optional[pulumi.Input[str]] = None,
                               id: Optional[pulumi.Input[str]] = None,
                               instance_id: Optional[pulumi.Input[str]] = None,
                               instance_type: Optional[pulumi.Input[str]] = None,
                               result_output_file: Optional[pulumi.Input[str]] = None,
                               vpn_gateway_id: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetVpnGatewayRoutesResult]
    func GetVpnGatewayRoutes(ctx *Context, args *GetVpnGatewayRoutesArgs, opts ...InvokeOption) (*GetVpnGatewayRoutesResult, error)
    func GetVpnGatewayRoutesOutput(ctx *Context, args *GetVpnGatewayRoutesOutputArgs, opts ...InvokeOption) GetVpnGatewayRoutesResultOutput

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

    public static class GetVpnGatewayRoutes 
    {
        public static Task<GetVpnGatewayRoutesResult> InvokeAsync(GetVpnGatewayRoutesArgs args, InvokeOptions? opts = null)
        public static Output<GetVpnGatewayRoutesResult> Invoke(GetVpnGatewayRoutesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVpnGatewayRoutesResult> getVpnGatewayRoutes(GetVpnGatewayRoutesArgs args, InvokeOptions options)
    public static Output<GetVpnGatewayRoutesResult> getVpnGatewayRoutes(GetVpnGatewayRoutesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getVpnGatewayRoutes:getVpnGatewayRoutes
      arguments:
        # arguments dictionary

    The following arguments are supported:

    VpnGatewayId string
    VPN gateway ID.
    DestinationCidr string
    Destination IDC IP range.
    Id string
    InstanceId string
    Instance ID of the next hop.
    InstanceType string
    Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
    ResultOutputFile string
    Used to save results.
    VpnGatewayId string
    VPN gateway ID.
    DestinationCidr string
    Destination IDC IP range.
    Id string
    InstanceId string
    Instance ID of the next hop.
    InstanceType string
    Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
    ResultOutputFile string
    Used to save results.
    vpnGatewayId String
    VPN gateway ID.
    destinationCidr String
    Destination IDC IP range.
    id String
    instanceId String
    Instance ID of the next hop.
    instanceType String
    Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
    resultOutputFile String
    Used to save results.
    vpnGatewayId string
    VPN gateway ID.
    destinationCidr string
    Destination IDC IP range.
    id string
    instanceId string
    Instance ID of the next hop.
    instanceType string
    Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
    resultOutputFile string
    Used to save results.
    vpn_gateway_id str
    VPN gateway ID.
    destination_cidr str
    Destination IDC IP range.
    id str
    instance_id str
    Instance ID of the next hop.
    instance_type str
    Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
    result_output_file str
    Used to save results.
    vpnGatewayId String
    VPN gateway ID.
    destinationCidr String
    Destination IDC IP range.
    id String
    instanceId String
    Instance ID of the next hop.
    instanceType String
    Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
    resultOutputFile String
    Used to save results.

    getVpnGatewayRoutes Result

    The following output properties are available:

    Id string
    VpnGatewayId string
    VpnGatewayRouteLists []GetVpnGatewayRoutesVpnGatewayRouteList
    Information list of the vpn gateway routes.
    DestinationCidr string
    InstanceId string
    InstanceType string
    ResultOutputFile string
    id string
    vpnGatewayId string
    vpnGatewayRouteLists GetVpnGatewayRoutesVpnGatewayRouteList[]
    Information list of the vpn gateway routes.
    destinationCidr string
    instanceId string
    instanceType string
    resultOutputFile string
    id String
    vpnGatewayId String
    vpnGatewayRouteLists List<Property Map>
    Information list of the vpn gateway routes.
    destinationCidr String
    instanceId String
    instanceType String
    resultOutputFile String

    Supporting Types

    GetVpnGatewayRoutesVpnGatewayRouteList

    CreateTime string
    Create time.
    DestinationCidrBlock string
    InstanceId string
    Instance ID of the next hop.
    InstanceType string
    Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
    Priority double
    RouteId string
    Route ID.
    Status string
    Type string
    Route type. Default value: Static.
    UpdateTime string
    Update time.
    VpnGatewayId string
    VPN gateway ID.
    CreateTime string
    Create time.
    DestinationCidrBlock string
    InstanceId string
    Instance ID of the next hop.
    InstanceType string
    Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
    Priority float64
    RouteId string
    Route ID.
    Status string
    Type string
    Route type. Default value: Static.
    UpdateTime string
    Update time.
    VpnGatewayId string
    VPN gateway ID.
    createTime String
    Create time.
    destinationCidrBlock String
    instanceId String
    Instance ID of the next hop.
    instanceType String
    Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
    priority Double
    routeId String
    Route ID.
    status String
    type String
    Route type. Default value: Static.
    updateTime String
    Update time.
    vpnGatewayId String
    VPN gateway ID.
    createTime string
    Create time.
    destinationCidrBlock string
    instanceId string
    Instance ID of the next hop.
    instanceType string
    Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
    priority number
    routeId string
    Route ID.
    status string
    type string
    Route type. Default value: Static.
    updateTime string
    Update time.
    vpnGatewayId string
    VPN gateway ID.
    create_time str
    Create time.
    destination_cidr_block str
    instance_id str
    Instance ID of the next hop.
    instance_type str
    Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
    priority float
    route_id str
    Route ID.
    status str
    type str
    Route type. Default value: Static.
    update_time str
    Update time.
    vpn_gateway_id str
    VPN gateway ID.
    createTime String
    Create time.
    destinationCidrBlock String
    instanceId String
    Instance ID of the next hop.
    instanceType String
    Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
    priority Number
    routeId String
    Route ID.
    status String
    type String
    Route type. Default value: Static.
    updateTime String
    Update time.
    vpnGatewayId String
    VPN gateway ID.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack