tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.getDcGatewayInstances
Explore with Pulumi AI
tencentcloud 1.81.189 published on Wednesday, Apr 30, 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", {
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,
});
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)
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
})
}
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,
});
});
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());
}
}
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}
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 dictionary
The 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:
BGP
andSTATIC
. - 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:
NORMAL
andNAT
. Default isNORMAL
. - Name string
- Name of the DCG to be queried.
- Network
Instance stringId - Type of associated network. Valid values:
VPC
andCCN
. - Network
Type string - IP of the DCG.
- Cnn
Route stringType - Type of CCN route. Valid values:
BGP
andSTATIC
. - 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:
NORMAL
andNAT
. Default isNORMAL
. - Name string
- Name of the DCG to be queried.
- Network
Instance stringId - Type of associated network. Valid values:
VPC
andCCN
. - Network
Type string - IP of the DCG.
- cnn
Route StringType - Type of CCN route. Valid values:
BGP
andSTATIC
. - 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:
NORMAL
andNAT
. Default isNORMAL
. - name String
- Name of the DCG to be queried.
- network
Instance StringId - Type of associated network. Valid values:
VPC
andCCN
. - network
Type String - IP of the DCG.
- cnn
Route stringType - Type of CCN route. Valid values:
BGP
andSTATIC
. - 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:
NORMAL
andNAT
. Default isNORMAL
. - name string
- Name of the DCG to be queried.
- network
Instance stringId - Type of associated network. Valid values:
VPC
andCCN
. - network
Type string - IP of the DCG.
- cnn_
route_ strtype - Type of CCN route. Valid values:
BGP
andSTATIC
. - 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:
NORMAL
andNAT
. Default isNORMAL
. - name str
- Name of the DCG to be queried.
- network_
instance_ strid - Type of associated network. Valid values:
VPC
andCCN
. - network_
type str - IP of the DCG.
- cnn
Route StringType - Type of CCN route. Valid values:
BGP
andSTATIC
. - 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:
NORMAL
andNAT
. Default isNORMAL
. - name String
- Name of the DCG to be queried.
- network
Instance StringId - Type of associated network. Valid values:
VPC
andCCN
. - network
Type 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.
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack