tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
tencentcloud.getDcGatewayInstances
Start a Neo task
Explain and create a tencentcloud.getDcGatewayInstances resource
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
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", {
name: "ci-temp-test-ccn",
description: "ci-temp-test-ccn-des",
qos: "AG",
});
const ccnMain = new tencentcloud.DcGateway("ccn_main", {
name: "ci-cdg-ccn-test",
networkInstanceId: main.ccnId,
networkType: "CCN",
gatewayType: "NORMAL",
});
//You need to sleep for a few seconds because there is a cache on the server
const nameSelect = tencentcloud.getDcGatewayInstancesOutput({
name: ccnMain.name,
});
const idSelect = tencentcloud.getDcGatewayInstancesOutput({
dcgId: ccnMain.dcGatewayId,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
main = tencentcloud.Ccn("main",
name="ci-temp-test-ccn",
description="ci-temp-test-ccn-des",
qos="AG")
ccn_main = tencentcloud.DcGateway("ccn_main",
name="ci-cdg-ccn-test",
network_instance_id=main.ccn_id,
network_type="CCN",
gateway_type="NORMAL")
#You need to sleep for a few seconds because there is a cache on the server
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)
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{
Name: pulumi.String("ci-temp-test-ccn"),
Description: pulumi.String("ci-temp-test-ccn-des"),
Qos: pulumi.String("AG"),
})
if err != nil {
return err
}
ccnMain, err := tencentcloud.NewDcGateway(ctx, "ccn_main", &tencentcloud.DcGatewayArgs{
Name: pulumi.String("ci-cdg-ccn-test"),
NetworkInstanceId: main.CcnId,
NetworkType: pulumi.String("CCN"),
GatewayType: pulumi.String("NORMAL"),
})
if err != nil {
return err
}
// You need to sleep for a few seconds because there is a cache on the server
_ = tencentcloud.GetDcGatewayInstancesOutput(ctx, tencentcloud.GetDcGatewayInstancesOutputArgs{
Name: ccnMain.Name,
}, nil)
_ = tencentcloud.GetDcGatewayInstancesOutput(ctx, tencentcloud.GetDcGatewayInstancesOutputArgs{
DcgId: ccnMain.DcGatewayId,
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var main = new Tencentcloud.Ccn("main", new()
{
Name = "ci-temp-test-ccn",
Description = "ci-temp-test-ccn-des",
Qos = "AG",
});
var ccnMain = new Tencentcloud.DcGateway("ccn_main", new()
{
Name = "ci-cdg-ccn-test",
NetworkInstanceId = main.CcnId,
NetworkType = "CCN",
GatewayType = "NORMAL",
});
//You need to sleep for a few seconds because there is a cache on the server
var nameSelect = Tencentcloud.GetDcGatewayInstances.Invoke(new()
{
Name = ccnMain.Name,
});
var idSelect = Tencentcloud.GetDcGatewayInstances.Invoke(new()
{
DcgId = ccnMain.DcGatewayId,
});
});
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()
.name("ci-temp-test-ccn")
.description("ci-temp-test-ccn-des")
.qos("AG")
.build());
var ccnMain = new DcGateway("ccnMain", DcGatewayArgs.builder()
.name("ci-cdg-ccn-test")
.networkInstanceId(main.ccnId())
.networkType("CCN")
.gatewayType("NORMAL")
.build());
//You need to sleep for a few seconds because there is a cache on the server
final var nameSelect = TencentcloudFunctions.getDcGatewayInstances(GetDcGatewayInstancesArgs.builder()
.name(ccnMain.name())
.build());
final var idSelect = TencentcloudFunctions.getDcGatewayInstances(GetDcGatewayInstancesArgs.builder()
.dcgId(ccnMain.dcGatewayId())
.build());
}
}
resources:
main:
type: tencentcloud:Ccn
properties:
name: ci-temp-test-ccn
description: ci-temp-test-ccn-des
qos: AG
ccnMain:
type: tencentcloud:DcGateway
name: ccn_main
properties:
name: ci-cdg-ccn-test
networkInstanceId: ${main.ccnId}
networkType: CCN
gatewayType: NORMAL
variables:
#You need to sleep for a few seconds because there is a cache on the server
nameSelect:
fn::invoke:
function: tencentcloud:getDcGatewayInstances
arguments:
name: ${ccnMain.name}
idSelect:
fn::invoke:
function: tencentcloud:getDcGatewayInstances
arguments:
dcgId: ${ccnMain.dcGatewayId}
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>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]func GetDcGatewayInstances(ctx *Context, args *GetDcGatewayInstancesArgs, opts ...InvokeOption) (*GetDcGatewayInstancesResult, error)
func GetDcGatewayInstancesOutput(ctx *Context, args *GetDcGatewayInstancesOutputArgs, opts ...InvokeOption) GetDcGatewayInstancesResultOutput> 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)
}public static CompletableFuture<GetDcGatewayInstancesResult> getDcGatewayInstances(GetDcGatewayInstancesArgs args, InvokeOptions options)
public static Output<GetDcGatewayInstancesResult> getDcGatewayInstances(GetDcGatewayInstancesArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getDcGatewayInstances:getDcGatewayInstances
arguments:
# arguments dictionaryThe following arguments are supported:
- Dcg
Id string - ID of the DCG to be queried.
- Id string
- Name string
- Name of the DCG to be queried.
- Result
Output stringFile - Used to save results.
- Dcg
Id string - ID of the DCG to be queried.
- Id string
- Name string
- Name of the DCG to be queried.
- Result
Output stringFile - Used to save results.
- dcg
Id String - ID of the DCG to be queried.
- id String
- name String
- Name of the DCG to be queried.
- result
Output StringFile - Used to save results.
- dcg
Id string - ID of the DCG to be queried.
- id string
- name string
- Name of the DCG to be queried.
- result
Output stringFile - 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_ strfile - Used to save results.
- dcg
Id String - ID of the DCG to be queried.
- id String
- name String
- Name of the DCG to be queried.
- result
Output StringFile - Used to save results.
getDcGatewayInstances Result
The following output properties are available:
- Id string
- Instance
Lists List<GetDc Gateway Instances Instance List> - Information list of the DCG.
- Dcg
Id string - ID of the DCG.
- Name string
- Name of the DCG.
- Result
Output stringFile
- Id string
- Instance
Lists []GetDc Gateway Instances Instance List - Information list of the DCG.
- Dcg
Id string - ID of the DCG.
- Name string
- Name of the DCG.
- Result
Output stringFile
- id String
- instance
Lists List<GetDc Gateway Instances Instance List> - Information list of the DCG.
- dcg
Id String - ID of the DCG.
- name String
- Name of the DCG.
- result
Output StringFile
- id string
- instance
Lists GetDc Gateway Instances Instance List[] - Information list of the DCG.
- dcg
Id string - ID of the DCG.
- name string
- Name of the DCG.
- result
Output stringFile
- id str
- instance_
lists Sequence[GetDc Gateway Instances Instance List] - Information list of the DCG.
- dcg_
id str - ID of the DCG.
- name str
- Name of the DCG.
- result_
output_ strfile
- id String
- instance
Lists List<Property Map> - Information list of the DCG.
- dcg
Id String - ID of the DCG.
- name String
- Name of the DCG.
- result
Output StringFile
Supporting Types
GetDcGatewayInstancesInstanceList
- Cnn
Route stringType - Type of CCN route. Valid values:
BGPandSTATIC. - Create
Time string - Creation time of resource.
- Dcg
Id string - ID of the DCG to be queried.
- Dcg
Ip string - IP of the DCG.
- Enable
Bgp bool - Indicates whether the BGP is enabled.
- Gateway
Type string - Type of the gateway. Valid values:
NORMALandNAT. Default isNORMAL. - Name string
- Name of the DCG to be queried.
- Network
Instance stringId - Type of associated network. Valid values:
VPCandCCN. - Network
Type string - IP of the DCG.
- Cnn
Route stringType - Type of CCN route. Valid values:
BGPandSTATIC. - Create
Time string - Creation time of resource.
- Dcg
Id string - ID of the DCG to be queried.
- Dcg
Ip string - IP of the DCG.
- Enable
Bgp bool - Indicates whether the BGP is enabled.
- Gateway
Type string - Type of the gateway. Valid values:
NORMALandNAT. Default isNORMAL. - Name string
- Name of the DCG to be queried.
- Network
Instance stringId - Type of associated network. Valid values:
VPCandCCN. - Network
Type string - IP of the DCG.
- cnn
Route StringType - Type of CCN route. Valid values:
BGPandSTATIC. - create
Time String - Creation time of resource.
- dcg
Id String - ID of the DCG to be queried.
- dcg
Ip String - IP of the DCG.
- enable
Bgp Boolean - Indicates whether the BGP is enabled.
- gateway
Type String - Type of the gateway. Valid values:
NORMALandNAT. Default isNORMAL. - name String
- Name of the DCG to be queried.
- network
Instance StringId - Type of associated network. Valid values:
VPCandCCN. - network
Type String - IP of the DCG.
- cnn
Route stringType - Type of CCN route. Valid values:
BGPandSTATIC. - create
Time string - Creation time of resource.
- dcg
Id string - ID of the DCG to be queried.
- dcg
Ip string - IP of the DCG.
- enable
Bgp boolean - Indicates whether the BGP is enabled.
- gateway
Type string - Type of the gateway. Valid values:
NORMALandNAT. Default isNORMAL. - name string
- Name of the DCG to be queried.
- network
Instance stringId - Type of associated network. Valid values:
VPCandCCN. - network
Type string - IP of the DCG.
- cnn_
route_ strtype - Type of CCN route. Valid values:
BGPandSTATIC. - create_
time str - Creation time of resource.
- dcg_
id str - ID of the DCG to be queried.
- dcg_
ip str - IP of the DCG.
- enable_
bgp bool - Indicates whether the BGP is enabled.
- gateway_
type str - Type of the gateway. Valid values:
NORMALandNAT. Default isNORMAL. - name str
- Name of the DCG to be queried.
- network_
instance_ strid - Type of associated network. Valid values:
VPCandCCN. - network_
type str - IP of the DCG.
- cnn
Route StringType - Type of CCN route. Valid values:
BGPandSTATIC. - create
Time String - Creation time of resource.
- dcg
Id String - ID of the DCG to be queried.
- dcg
Ip String - IP of the DCG.
- enable
Bgp Boolean - Indicates whether the BGP is enabled.
- gateway
Type String - Type of the gateway. Valid values:
NORMALandNAT. Default isNORMAL. - name String
- Name of the DCG to be queried.
- network
Instance StringId - Type of associated network. Valid values:
VPCandCCN. - network
Type String - IP of the DCG.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
