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

tencentcloud.getDcGatewayInstances

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 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:

    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 string
    Type of CCN route. Valid values: BGP and STATIC.
    CreateTime string
    Creation time of resource.
    DcgId string
    ID of the DCG to be queried.
    DcgIp string
    IP of the DCG.
    EnableBgp bool
    Indicates whether the BGP is enabled.
    GatewayType string
    Type of the gateway. Valid values: NORMAL and NAT. Default is NORMAL.
    Name string
    Name of the DCG to be queried.
    NetworkInstanceId string
    Type of associated network. Valid values: VPC and CCN.
    NetworkType string
    IP of the DCG.
    CnnRouteType string
    Type of CCN route. Valid values: BGP and STATIC.
    CreateTime string
    Creation time of resource.
    DcgId string
    ID of the DCG to be queried.
    DcgIp string
    IP of the DCG.
    EnableBgp bool
    Indicates whether the BGP is enabled.
    GatewayType string
    Type of the gateway. Valid values: NORMAL and NAT. Default is NORMAL.
    Name string
    Name of the DCG to be queried.
    NetworkInstanceId string
    Type of associated network. Valid values: VPC and CCN.
    NetworkType string
    IP of the DCG.
    cnnRouteType String
    Type of CCN route. Valid values: BGP and STATIC.
    createTime String
    Creation time of resource.
    dcgId String
    ID of the DCG to be queried.
    dcgIp String
    IP of the DCG.
    enableBgp Boolean
    Indicates whether the BGP is enabled.
    gatewayType String
    Type of the gateway. Valid values: NORMAL and NAT. Default is NORMAL.
    name String
    Name of the DCG to be queried.
    networkInstanceId String
    Type of associated network. Valid values: VPC and CCN.
    networkType String
    IP of the DCG.
    cnnRouteType string
    Type of CCN route. Valid values: BGP and STATIC.
    createTime string
    Creation time of resource.
    dcgId string
    ID of the DCG to be queried.
    dcgIp string
    IP of the DCG.
    enableBgp boolean
    Indicates whether the BGP is enabled.
    gatewayType string
    Type of the gateway. Valid values: NORMAL and NAT. Default is NORMAL.
    name string
    Name of the DCG to be queried.
    networkInstanceId string
    Type of associated network. Valid values: VPC and CCN.
    networkType string
    IP of the DCG.
    cnn_route_type str
    Type of CCN route. Valid values: BGP and STATIC.
    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 and NAT. Default is NORMAL.
    name str
    Name of the DCG to be queried.
    network_instance_id str
    Type of associated network. Valid values: VPC and CCN.
    network_type str
    IP of the DCG.
    cnnRouteType String
    Type of CCN route. Valid values: BGP and STATIC.
    createTime String
    Creation time of resource.
    dcgId String
    ID of the DCG to be queried.
    dcgIp String
    IP of the DCG.
    enableBgp Boolean
    Indicates whether the BGP is enabled.
    gatewayType String
    Type of the gateway. Valid values: NORMAL and NAT. Default is NORMAL.
    name String
    Name of the DCG to be queried.
    networkInstanceId String
    Type of associated network. Valid values: VPC and CCN.
    networkType 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 logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack