1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getDcGatewayInstances
tencentcloud 1.81.182 published on Monday, Apr 14, 2025 by tencentcloudstack

tencentcloud.getDcGatewayInstances

Explore with Pulumi AI

Use this data source to query detailed information of direct connect gateway instances.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const main = new tencentcloud.Ccn("main", {
    description: "ci-temp-test-ccn-des",
    qos: "AG",
});
const ccnMain = new tencentcloud.DcGateway("ccnMain", {
    networkInstanceId: main.ccnId,
    networkType: "CCN",
    gatewayType: "NORMAL",
});
const nameSelect = tencentcloud.getDcGatewayInstancesOutput({
    name: ccnMain.name,
});
const idSelect = tencentcloud.getDcGatewayInstancesOutput({
    dcgId: ccnMain.dcGatewayId,
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

main = tencentcloud.Ccn("main",
    description="ci-temp-test-ccn-des",
    qos="AG")
ccn_main = tencentcloud.DcGateway("ccnMain",
    network_instance_id=main.ccn_id,
    network_type="CCN",
    gateway_type="NORMAL")
name_select = tencentcloud.get_dc_gateway_instances_output(name=ccn_main.name)
id_select = tencentcloud.get_dc_gateway_instances_output(dcg_id=ccn_main.dc_gateway_id)
Copy
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 {
		main, err := tencentcloud.NewCcn(ctx, "main", &tencentcloud.CcnArgs{
			Description: pulumi.String("ci-temp-test-ccn-des"),
			Qos:         pulumi.String("AG"),
		})
		if err != nil {
			return err
		}
		ccnMain, err := tencentcloud.NewDcGateway(ctx, "ccnMain", &tencentcloud.DcGatewayArgs{
			NetworkInstanceId: main.CcnId,
			NetworkType:       pulumi.String("CCN"),
			GatewayType:       pulumi.String("NORMAL"),
		})
		if err != nil {
			return err
		}
		_ = tencentcloud.GetDcGatewayInstancesOutput(ctx, tencentcloud.GetDcGatewayInstancesOutputArgs{
			Name: ccnMain.Name,
		}, nil)
		_ = tencentcloud.GetDcGatewayInstancesOutput(ctx, tencentcloud.GetDcGatewayInstancesOutputArgs{
			DcgId: ccnMain.DcGatewayId,
		}, nil)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var main = new Tencentcloud.Ccn("main", new()
    {
        Description = "ci-temp-test-ccn-des",
        Qos = "AG",
    });

    var ccnMain = new Tencentcloud.DcGateway("ccnMain", new()
    {
        NetworkInstanceId = main.CcnId,
        NetworkType = "CCN",
        GatewayType = "NORMAL",
    });

    var nameSelect = Tencentcloud.GetDcGatewayInstances.Invoke(new()
    {
        Name = ccnMain.Name,
    });

    var idSelect = Tencentcloud.GetDcGatewayInstances.Invoke(new()
    {
        DcgId = ccnMain.DcGatewayId,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Ccn;
import com.pulumi.tencentcloud.CcnArgs;
import com.pulumi.tencentcloud.DcGateway;
import com.pulumi.tencentcloud.DcGatewayArgs;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetDcGatewayInstancesArgs;
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) {
        var main = new Ccn("main", CcnArgs.builder()
            .description("ci-temp-test-ccn-des")
            .qos("AG")
            .build());

        var ccnMain = new DcGateway("ccnMain", DcGatewayArgs.builder()
            .networkInstanceId(main.ccnId())
            .networkType("CCN")
            .gatewayType("NORMAL")
            .build());

        final var nameSelect = TencentcloudFunctions.getDcGatewayInstances(GetDcGatewayInstancesArgs.builder()
            .name(ccnMain.name())
            .build());

        final var idSelect = TencentcloudFunctions.getDcGatewayInstances(GetDcGatewayInstancesArgs.builder()
            .dcgId(ccnMain.dcGatewayId())
            .build());

    }
}
Copy
resources:
  main:
    type: tencentcloud:Ccn
    properties:
      description: ci-temp-test-ccn-des
      qos: AG
  ccnMain:
    type: tencentcloud:DcGateway
    properties:
      networkInstanceId: ${main.ccnId}
      networkType: CCN
      gatewayType: NORMAL
variables:
  nameSelect:
    fn::invoke:
      function: tencentcloud:getDcGatewayInstances
      arguments:
        name: ${ccnMain.name}
  idSelect:
    fn::invoke:
      function: tencentcloud:getDcGatewayInstances
      arguments:
        dcgId: ${ccnMain.dcGatewayId}
Copy

Using getDcGatewayInstances

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 getDcGatewayInstances(args: GetDcGatewayInstancesArgs, opts?: InvokeOptions): Promise<GetDcGatewayInstancesResult>
function getDcGatewayInstancesOutput(args: GetDcGatewayInstancesOutputArgs, opts?: InvokeOptions): Output<GetDcGatewayInstancesResult>
Copy
def get_dc_gateway_instances(dcg_id: Optional[str] = None,
                             id: Optional[str] = None,
                             name: Optional[str] = None,
                             result_output_file: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetDcGatewayInstancesResult
def get_dc_gateway_instances_output(dcg_id: Optional[pulumi.Input[str]] = None,
                             id: Optional[pulumi.Input[str]] = None,
                             name: Optional[pulumi.Input[str]] = None,
                             result_output_file: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetDcGatewayInstancesResult]
Copy
func GetDcGatewayInstances(ctx *Context, args *GetDcGatewayInstancesArgs, opts ...InvokeOption) (*GetDcGatewayInstancesResult, error)
func GetDcGatewayInstancesOutput(ctx *Context, args *GetDcGatewayInstancesOutputArgs, opts ...InvokeOption) GetDcGatewayInstancesResultOutput
Copy

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

public static class GetDcGatewayInstances 
{
    public static Task<GetDcGatewayInstancesResult> InvokeAsync(GetDcGatewayInstancesArgs args, InvokeOptions? opts = null)
    public static Output<GetDcGatewayInstancesResult> Invoke(GetDcGatewayInstancesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDcGatewayInstancesResult> getDcGatewayInstances(GetDcGatewayInstancesArgs args, InvokeOptions options)
public static Output<GetDcGatewayInstancesResult> getDcGatewayInstances(GetDcGatewayInstancesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: tencentcloud:index/getDcGatewayInstances:getDcGatewayInstances
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DcgId string
ID of the DCG to be queried.
Id string
Name string
Name of the DCG to be queried.
ResultOutputFile string
Used to save results.
DcgId string
ID of the DCG to be queried.
Id string
Name string
Name of the DCG to be queried.
ResultOutputFile string
Used to save results.
dcgId String
ID of the DCG to be queried.
id String
name String
Name of the DCG to be queried.
resultOutputFile String
Used to save results.
dcgId string
ID of the DCG to be queried.
id string
name string
Name of the DCG to be queried.
resultOutputFile string
Used to save results.
dcg_id str
ID of the DCG to be queried.
id str
name str
Name of the DCG to be queried.
result_output_file str
Used to save results.
dcgId String
ID of the DCG to be queried.
id String
name String
Name of the DCG to be queried.
resultOutputFile String
Used to save results.

getDcGatewayInstances Result

The following output properties are available:

Id string
InstanceLists List<GetDcGatewayInstancesInstanceList>
Information list of the DCG.
DcgId string
ID of the DCG.
Name string
Name of the DCG.
ResultOutputFile string
Id string
InstanceLists []GetDcGatewayInstancesInstanceList
Information list of the DCG.
DcgId string
ID of the DCG.
Name string
Name of the DCG.
ResultOutputFile string
id String
instanceLists List<GetDcGatewayInstancesInstanceList>
Information list of the DCG.
dcgId String
ID of the DCG.
name String
Name of the DCG.
resultOutputFile String
id string
instanceLists GetDcGatewayInstancesInstanceList[]
Information list of the DCG.
dcgId string
ID of the DCG.
name string
Name of the DCG.
resultOutputFile string
id str
instance_lists Sequence[GetDcGatewayInstancesInstanceList]
Information list of the DCG.
dcg_id str
ID of the DCG.
name str
Name of the DCG.
result_output_file str
id String
instanceLists List<Property Map>
Information list of the DCG.
dcgId String
ID of the DCG.
name String
Name of the DCG.
resultOutputFile String

Supporting Types

GetDcGatewayInstancesInstanceList

CnnRouteType This property is required. string
Type of CCN route. Valid values: BGP and STATIC.
CreateTime This property is required. string
Creation time of resource.
DcgId This property is required. string
ID of the DCG to be queried.
DcgIp This property is required. string
IP of the DCG.
EnableBgp This property is required. bool
Indicates whether the BGP is enabled.
GatewayType This property is required. string
Type of the gateway. Valid values: NORMAL and NAT. Default is NORMAL.
Name This property is required. string
Name of the DCG to be queried.
NetworkInstanceId This property is required. string
Type of associated network. Valid values: VPC and CCN.
NetworkType This property is required. string
IP of the DCG.
CnnRouteType This property is required. string
Type of CCN route. Valid values: BGP and STATIC.
CreateTime This property is required. string
Creation time of resource.
DcgId This property is required. string
ID of the DCG to be queried.
DcgIp This property is required. string
IP of the DCG.
EnableBgp This property is required. bool
Indicates whether the BGP is enabled.
GatewayType This property is required. string
Type of the gateway. Valid values: NORMAL and NAT. Default is NORMAL.
Name This property is required. string
Name of the DCG to be queried.
NetworkInstanceId This property is required. string
Type of associated network. Valid values: VPC and CCN.
NetworkType This property is required. string
IP of the DCG.
cnnRouteType This property is required. String
Type of CCN route. Valid values: BGP and STATIC.
createTime This property is required. String
Creation time of resource.
dcgId This property is required. String
ID of the DCG to be queried.
dcgIp This property is required. String
IP of the DCG.
enableBgp This property is required. Boolean
Indicates whether the BGP is enabled.
gatewayType This property is required. String
Type of the gateway. Valid values: NORMAL and NAT. Default is NORMAL.
name This property is required. String
Name of the DCG to be queried.
networkInstanceId This property is required. String
Type of associated network. Valid values: VPC and CCN.
networkType This property is required. String
IP of the DCG.
cnnRouteType This property is required. string
Type of CCN route. Valid values: BGP and STATIC.
createTime This property is required. string
Creation time of resource.
dcgId This property is required. string
ID of the DCG to be queried.
dcgIp This property is required. string
IP of the DCG.
enableBgp This property is required. boolean
Indicates whether the BGP is enabled.
gatewayType This property is required. string
Type of the gateway. Valid values: NORMAL and NAT. Default is NORMAL.
name This property is required. string
Name of the DCG to be queried.
networkInstanceId This property is required. string
Type of associated network. Valid values: VPC and CCN.
networkType This property is required. string
IP of the DCG.
cnn_route_type This property is required. str
Type of CCN route. Valid values: BGP and STATIC.
create_time This property is required. str
Creation time of resource.
dcg_id This property is required. str
ID of the DCG to be queried.
dcg_ip This property is required. str
IP of the DCG.
enable_bgp This property is required. bool
Indicates whether the BGP is enabled.
gateway_type This property is required. str
Type of the gateway. Valid values: NORMAL and NAT. Default is NORMAL.
name This property is required. str
Name of the DCG to be queried.
network_instance_id This property is required. str
Type of associated network. Valid values: VPC and CCN.
network_type This property is required. str
IP of the DCG.
cnnRouteType This property is required. String
Type of CCN route. Valid values: BGP and STATIC.
createTime This property is required. String
Creation time of resource.
dcgId This property is required. String
ID of the DCG to be queried.
dcgIp This property is required. String
IP of the DCG.
enableBgp This property is required. Boolean
Indicates whether the BGP is enabled.
gatewayType This property is required. String
Type of the gateway. Valid values: NORMAL and NAT. Default is NORMAL.
name This property is required. String
Name of the DCG to be queried.
networkInstanceId This property is required. String
Type of associated network. Valid values: VPC and CCN.
networkType This property is required. String
IP of the DCG.

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.