1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. DcGateway
Viewing docs for tencentcloud 1.82.73
published on Friday, Mar 6, 2026 by tencentcloudstack
tencentcloud logo
Viewing docs for tencentcloud 1.82.73
published on Friday, Mar 6, 2026 by tencentcloudstack

    Provides a resource to creating direct connect gateway instance.

    NOTE: Currently, it is not supported to set cnn_route_type to BGP simultaneously during the creation of resource tencentcloud.DcGateway(only configuration modification is supported); This feature requires contacting the VPC product team to be added to the whitelist.

    Example Usage

    If network_type is VPC

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    // create vpc
    const vpc = new tencentcloud.Vpc("vpc", {
        cidrBlock: "10.0.0.0/16",
        name: "vpc",
    });
    // create dc gateway
    const example = new tencentcloud.DcGateway("example", {
        name: "tf-example",
        networkInstanceId: vpc.vpcId,
        networkType: "VPC",
        gatewayType: "NORMAL",
        tags: {
            Environment: "production",
            Owner: "ops-team",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    # create vpc
    vpc = tencentcloud.Vpc("vpc",
        cidr_block="10.0.0.0/16",
        name="vpc")
    # create dc gateway
    example = tencentcloud.DcGateway("example",
        name="tf-example",
        network_instance_id=vpc.vpc_id,
        network_type="VPC",
        gateway_type="NORMAL",
        tags={
            "Environment": "production",
            "Owner": "ops-team",
        })
    
    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 {
    		// create vpc
    		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
    			CidrBlock: pulumi.String("10.0.0.0/16"),
    			Name:      pulumi.String("vpc"),
    		})
    		if err != nil {
    			return err
    		}
    		// create dc gateway
    		_, err = tencentcloud.NewDcGateway(ctx, "example", &tencentcloud.DcGatewayArgs{
    			Name:              pulumi.String("tf-example"),
    			NetworkInstanceId: vpc.VpcId,
    			NetworkType:       pulumi.String("VPC"),
    			GatewayType:       pulumi.String("NORMAL"),
    			Tags: pulumi.StringMap{
    				"Environment": pulumi.String("production"),
    				"Owner":       pulumi.String("ops-team"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        // create vpc
        var vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "10.0.0.0/16",
            Name = "vpc",
        });
    
        // create dc gateway
        var example = new Tencentcloud.DcGateway("example", new()
        {
            Name = "tf-example",
            NetworkInstanceId = vpc.VpcId,
            NetworkType = "VPC",
            GatewayType = "NORMAL",
            Tags = 
            {
                { "Environment", "production" },
                { "Owner", "ops-team" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.Vpc;
    import com.pulumi.tencentcloud.VpcArgs;
    import com.pulumi.tencentcloud.DcGateway;
    import com.pulumi.tencentcloud.DcGatewayArgs;
    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) {
            // create vpc
            var vpc = new Vpc("vpc", VpcArgs.builder()
                .cidrBlock("10.0.0.0/16")
                .name("vpc")
                .build());
    
            // create dc gateway
            var example = new DcGateway("example", DcGatewayArgs.builder()
                .name("tf-example")
                .networkInstanceId(vpc.vpcId())
                .networkType("VPC")
                .gatewayType("NORMAL")
                .tags(Map.ofEntries(
                    Map.entry("Environment", "production"),
                    Map.entry("Owner", "ops-team")
                ))
                .build());
    
        }
    }
    
    resources:
      # create vpc
      vpc:
        type: tencentcloud:Vpc
        properties:
          cidrBlock: 10.0.0.0/16
          name: vpc
      # create dc gateway
      example:
        type: tencentcloud:DcGateway
        properties:
          name: tf-example
          networkInstanceId: ${vpc.vpcId}
          networkType: VPC
          gatewayType: NORMAL
          tags:
            Environment: production
            Owner: ops-team
    

    If network_type is CCN

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    // create ccn
    const ccn = new tencentcloud.Ccn("ccn", {
        name: "tf-example",
        description: "desc.",
        qos: "AG",
        chargeType: "PREPAID",
        bandwidthLimitType: "INTER_REGION_LIMIT",
        tags: {
            createBy: "terraform",
        },
    });
    // create dc gateway
    const example = new tencentcloud.DcGateway("example", {
        name: "tf-example",
        networkInstanceId: ccn.ccnId,
        networkType: "CCN",
        gatewayType: "NORMAL",
        tags: {
            Team: "networking",
            Purpose: "production",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    # create ccn
    ccn = tencentcloud.Ccn("ccn",
        name="tf-example",
        description="desc.",
        qos="AG",
        charge_type="PREPAID",
        bandwidth_limit_type="INTER_REGION_LIMIT",
        tags={
            "createBy": "terraform",
        })
    # create dc gateway
    example = tencentcloud.DcGateway("example",
        name="tf-example",
        network_instance_id=ccn.ccn_id,
        network_type="CCN",
        gateway_type="NORMAL",
        tags={
            "Team": "networking",
            "Purpose": "production",
        })
    
    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 {
    		// create ccn
    		ccn, err := tencentcloud.NewCcn(ctx, "ccn", &tencentcloud.CcnArgs{
    			Name:               pulumi.String("tf-example"),
    			Description:        pulumi.String("desc."),
    			Qos:                pulumi.String("AG"),
    			ChargeType:         pulumi.String("PREPAID"),
    			BandwidthLimitType: pulumi.String("INTER_REGION_LIMIT"),
    			Tags: pulumi.StringMap{
    				"createBy": pulumi.String("terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// create dc gateway
    		_, err = tencentcloud.NewDcGateway(ctx, "example", &tencentcloud.DcGatewayArgs{
    			Name:              pulumi.String("tf-example"),
    			NetworkInstanceId: ccn.CcnId,
    			NetworkType:       pulumi.String("CCN"),
    			GatewayType:       pulumi.String("NORMAL"),
    			Tags: pulumi.StringMap{
    				"Team":    pulumi.String("networking"),
    				"Purpose": pulumi.String("production"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        // create ccn
        var ccn = new Tencentcloud.Ccn("ccn", new()
        {
            Name = "tf-example",
            Description = "desc.",
            Qos = "AG",
            ChargeType = "PREPAID",
            BandwidthLimitType = "INTER_REGION_LIMIT",
            Tags = 
            {
                { "createBy", "terraform" },
            },
        });
    
        // create dc gateway
        var example = new Tencentcloud.DcGateway("example", new()
        {
            Name = "tf-example",
            NetworkInstanceId = ccn.CcnId,
            NetworkType = "CCN",
            GatewayType = "NORMAL",
            Tags = 
            {
                { "Team", "networking" },
                { "Purpose", "production" },
            },
        });
    
    });
    
    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 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) {
            // create ccn
            var ccn = new Ccn("ccn", CcnArgs.builder()
                .name("tf-example")
                .description("desc.")
                .qos("AG")
                .chargeType("PREPAID")
                .bandwidthLimitType("INTER_REGION_LIMIT")
                .tags(Map.of("createBy", "terraform"))
                .build());
    
            // create dc gateway
            var example = new DcGateway("example", DcGatewayArgs.builder()
                .name("tf-example")
                .networkInstanceId(ccn.ccnId())
                .networkType("CCN")
                .gatewayType("NORMAL")
                .tags(Map.ofEntries(
                    Map.entry("Team", "networking"),
                    Map.entry("Purpose", "production")
                ))
                .build());
    
        }
    }
    
    resources:
      # create ccn
      ccn:
        type: tencentcloud:Ccn
        properties:
          name: tf-example
          description: desc.
          qos: AG
          chargeType: PREPAID
          bandwidthLimitType: INTER_REGION_LIMIT
          tags:
            createBy: terraform
      # create dc gateway
      example:
        type: tencentcloud:DcGateway
        properties:
          name: tf-example
          networkInstanceId: ${ccn.ccnId}
          networkType: CCN
          gatewayType: NORMAL
          tags:
            Team: networking
            Purpose: production
    

    Update tags

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.DcGateway("example", {
        name: "tf-example",
        networkInstanceId: ccn.id,
        networkType: "CCN",
        gatewayType: "NORMAL",
        tags: {
            Environment: "staging",
            Team: "devops",
            CostCenter: "IT-001",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.DcGateway("example",
        name="tf-example",
        network_instance_id=ccn["id"],
        network_type="CCN",
        gateway_type="NORMAL",
        tags={
            "Environment": "staging",
            "Team": "devops",
            "CostCenter": "IT-001",
        })
    
    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.NewDcGateway(ctx, "example", &tencentcloud.DcGatewayArgs{
    			Name:              pulumi.String("tf-example"),
    			NetworkInstanceId: pulumi.Any(ccn.Id),
    			NetworkType:       pulumi.String("CCN"),
    			GatewayType:       pulumi.String("NORMAL"),
    			Tags: pulumi.StringMap{
    				"Environment": pulumi.String("staging"),
    				"Team":        pulumi.String("devops"),
    				"CostCenter":  pulumi.String("IT-001"),
    			},
    		})
    		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 = new Tencentcloud.DcGateway("example", new()
        {
            Name = "tf-example",
            NetworkInstanceId = ccn.Id,
            NetworkType = "CCN",
            GatewayType = "NORMAL",
            Tags = 
            {
                { "Environment", "staging" },
                { "Team", "devops" },
                { "CostCenter", "IT-001" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.DcGateway;
    import com.pulumi.tencentcloud.DcGatewayArgs;
    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 example = new DcGateway("example", DcGatewayArgs.builder()
                .name("tf-example")
                .networkInstanceId(ccn.id())
                .networkType("CCN")
                .gatewayType("NORMAL")
                .tags(Map.ofEntries(
                    Map.entry("Environment", "staging"),
                    Map.entry("Team", "devops"),
                    Map.entry("CostCenter", "IT-001")
                ))
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:DcGateway
        properties:
          name: tf-example
          networkInstanceId: ${ccn.id}
          networkType: CCN
          gatewayType: NORMAL
          tags:
            Environment: staging
            Team: devops
            CostCenter: IT-001
    

    Create DcGateway Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DcGateway(name: string, args: DcGatewayArgs, opts?: CustomResourceOptions);
    @overload
    def DcGateway(resource_name: str,
                  args: DcGatewayArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def DcGateway(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  network_instance_id: Optional[str] = None,
                  network_type: Optional[str] = None,
                  cnn_route_type: Optional[str] = None,
                  dc_gateway_id: Optional[str] = None,
                  gateway_asn: Optional[float] = None,
                  gateway_type: Optional[str] = None,
                  ha_zone_group_id: Optional[str] = None,
                  mode_type: Optional[str] = None,
                  name: Optional[str] = None,
                  tags: Optional[Mapping[str, str]] = None,
                  zone: Optional[str] = None)
    func NewDcGateway(ctx *Context, name string, args DcGatewayArgs, opts ...ResourceOption) (*DcGateway, error)
    public DcGateway(string name, DcGatewayArgs args, CustomResourceOptions? opts = null)
    public DcGateway(String name, DcGatewayArgs args)
    public DcGateway(String name, DcGatewayArgs args, CustomResourceOptions options)
    
    type: tencentcloud:DcGateway
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DcGatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DcGatewayArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DcGatewayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DcGatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DcGatewayArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    DcGateway Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The DcGateway resource accepts the following input properties:

    NetworkInstanceId string
    If the network_type value is VPC, the available value is VPC ID. But when the network_type value is CCN, the available value is CCN instance ID.
    NetworkType string
    Type of associated network. Valid value: VPC and CCN.
    CnnRouteType string
    Type of CCN route. Valid value: BGP and STATIC. The property is available when the DCG type is CCN gateway and BGP enabled.
    DcGatewayId string
    ID of the resource.
    GatewayAsn double
    Dedicated connection gateway custom ASN, range: 45090, 64512-65534 and 4200000000-4294967294.
    GatewayType string
    Type of the gateway. Valid value: NORMAL and NAT. Default is NORMAL. NOTES: CCN only supports NORMAL and a VPC can create two DCGs, the one is NAT type and the other is non-NAT type.
    HaZoneGroupId string
    ID of DC highly available placement group.
    ModeType string
    CCN route publishing method. Valid values: standard and exquisite. This parameter is only valid for the CCN direct connect gateway.
    Name string
    Name of the DCG.
    Tags Dictionary<string, string>
    Tag key-value pairs for the DC gateway. Multiple tags can be set.
    Zone string
    Availability zone where the direct connect gateway resides.
    NetworkInstanceId string
    If the network_type value is VPC, the available value is VPC ID. But when the network_type value is CCN, the available value is CCN instance ID.
    NetworkType string
    Type of associated network. Valid value: VPC and CCN.
    CnnRouteType string
    Type of CCN route. Valid value: BGP and STATIC. The property is available when the DCG type is CCN gateway and BGP enabled.
    DcGatewayId string
    ID of the resource.
    GatewayAsn float64
    Dedicated connection gateway custom ASN, range: 45090, 64512-65534 and 4200000000-4294967294.
    GatewayType string
    Type of the gateway. Valid value: NORMAL and NAT. Default is NORMAL. NOTES: CCN only supports NORMAL and a VPC can create two DCGs, the one is NAT type and the other is non-NAT type.
    HaZoneGroupId string
    ID of DC highly available placement group.
    ModeType string
    CCN route publishing method. Valid values: standard and exquisite. This parameter is only valid for the CCN direct connect gateway.
    Name string
    Name of the DCG.
    Tags map[string]string
    Tag key-value pairs for the DC gateway. Multiple tags can be set.
    Zone string
    Availability zone where the direct connect gateway resides.
    networkInstanceId String
    If the network_type value is VPC, the available value is VPC ID. But when the network_type value is CCN, the available value is CCN instance ID.
    networkType String
    Type of associated network. Valid value: VPC and CCN.
    cnnRouteType String
    Type of CCN route. Valid value: BGP and STATIC. The property is available when the DCG type is CCN gateway and BGP enabled.
    dcGatewayId String
    ID of the resource.
    gatewayAsn Double
    Dedicated connection gateway custom ASN, range: 45090, 64512-65534 and 4200000000-4294967294.
    gatewayType String
    Type of the gateway. Valid value: NORMAL and NAT. Default is NORMAL. NOTES: CCN only supports NORMAL and a VPC can create two DCGs, the one is NAT type and the other is non-NAT type.
    haZoneGroupId String
    ID of DC highly available placement group.
    modeType String
    CCN route publishing method. Valid values: standard and exquisite. This parameter is only valid for the CCN direct connect gateway.
    name String
    Name of the DCG.
    tags Map<String,String>
    Tag key-value pairs for the DC gateway. Multiple tags can be set.
    zone String
    Availability zone where the direct connect gateway resides.
    networkInstanceId string
    If the network_type value is VPC, the available value is VPC ID. But when the network_type value is CCN, the available value is CCN instance ID.
    networkType string
    Type of associated network. Valid value: VPC and CCN.
    cnnRouteType string
    Type of CCN route. Valid value: BGP and STATIC. The property is available when the DCG type is CCN gateway and BGP enabled.
    dcGatewayId string
    ID of the resource.
    gatewayAsn number
    Dedicated connection gateway custom ASN, range: 45090, 64512-65534 and 4200000000-4294967294.
    gatewayType string
    Type of the gateway. Valid value: NORMAL and NAT. Default is NORMAL. NOTES: CCN only supports NORMAL and a VPC can create two DCGs, the one is NAT type and the other is non-NAT type.
    haZoneGroupId string
    ID of DC highly available placement group.
    modeType string
    CCN route publishing method. Valid values: standard and exquisite. This parameter is only valid for the CCN direct connect gateway.
    name string
    Name of the DCG.
    tags {[key: string]: string}
    Tag key-value pairs for the DC gateway. Multiple tags can be set.
    zone string
    Availability zone where the direct connect gateway resides.
    network_instance_id str
    If the network_type value is VPC, the available value is VPC ID. But when the network_type value is CCN, the available value is CCN instance ID.
    network_type str
    Type of associated network. Valid value: VPC and CCN.
    cnn_route_type str
    Type of CCN route. Valid value: BGP and STATIC. The property is available when the DCG type is CCN gateway and BGP enabled.
    dc_gateway_id str
    ID of the resource.
    gateway_asn float
    Dedicated connection gateway custom ASN, range: 45090, 64512-65534 and 4200000000-4294967294.
    gateway_type str
    Type of the gateway. Valid value: NORMAL and NAT. Default is NORMAL. NOTES: CCN only supports NORMAL and a VPC can create two DCGs, the one is NAT type and the other is non-NAT type.
    ha_zone_group_id str
    ID of DC highly available placement group.
    mode_type str
    CCN route publishing method. Valid values: standard and exquisite. This parameter is only valid for the CCN direct connect gateway.
    name str
    Name of the DCG.
    tags Mapping[str, str]
    Tag key-value pairs for the DC gateway. Multiple tags can be set.
    zone str
    Availability zone where the direct connect gateway resides.
    networkInstanceId String
    If the network_type value is VPC, the available value is VPC ID. But when the network_type value is CCN, the available value is CCN instance ID.
    networkType String
    Type of associated network. Valid value: VPC and CCN.
    cnnRouteType String
    Type of CCN route. Valid value: BGP and STATIC. The property is available when the DCG type is CCN gateway and BGP enabled.
    dcGatewayId String
    ID of the resource.
    gatewayAsn Number
    Dedicated connection gateway custom ASN, range: 45090, 64512-65534 and 4200000000-4294967294.
    gatewayType String
    Type of the gateway. Valid value: NORMAL and NAT. Default is NORMAL. NOTES: CCN only supports NORMAL and a VPC can create two DCGs, the one is NAT type and the other is non-NAT type.
    haZoneGroupId String
    ID of DC highly available placement group.
    modeType String
    CCN route publishing method. Valid values: standard and exquisite. This parameter is only valid for the CCN direct connect gateway.
    name String
    Name of the DCG.
    tags Map<String>
    Tag key-value pairs for the DC gateway. Multiple tags can be set.
    zone String
    Availability zone where the direct connect gateway resides.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DcGateway resource produces the following output properties:

    CreateTime string
    Creation time of resource.
    EnableBgp bool
    Indicates whether the BGP is enabled.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreateTime string
    Creation time of resource.
    EnableBgp bool
    Indicates whether the BGP is enabled.
    Id string
    The provider-assigned unique ID for this managed resource.
    createTime String
    Creation time of resource.
    enableBgp Boolean
    Indicates whether the BGP is enabled.
    id String
    The provider-assigned unique ID for this managed resource.
    createTime string
    Creation time of resource.
    enableBgp boolean
    Indicates whether the BGP is enabled.
    id string
    The provider-assigned unique ID for this managed resource.
    create_time str
    Creation time of resource.
    enable_bgp bool
    Indicates whether the BGP is enabled.
    id str
    The provider-assigned unique ID for this managed resource.
    createTime String
    Creation time of resource.
    enableBgp Boolean
    Indicates whether the BGP is enabled.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DcGateway Resource

    Get an existing DcGateway resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DcGatewayState, opts?: CustomResourceOptions): DcGateway
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cnn_route_type: Optional[str] = None,
            create_time: Optional[str] = None,
            dc_gateway_id: Optional[str] = None,
            enable_bgp: Optional[bool] = None,
            gateway_asn: Optional[float] = None,
            gateway_type: Optional[str] = None,
            ha_zone_group_id: Optional[str] = None,
            mode_type: Optional[str] = None,
            name: Optional[str] = None,
            network_instance_id: Optional[str] = None,
            network_type: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            zone: Optional[str] = None) -> DcGateway
    func GetDcGateway(ctx *Context, name string, id IDInput, state *DcGatewayState, opts ...ResourceOption) (*DcGateway, error)
    public static DcGateway Get(string name, Input<string> id, DcGatewayState? state, CustomResourceOptions? opts = null)
    public static DcGateway get(String name, Output<String> id, DcGatewayState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:DcGateway    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CnnRouteType string
    Type of CCN route. Valid value: BGP and STATIC. The property is available when the DCG type is CCN gateway and BGP enabled.
    CreateTime string
    Creation time of resource.
    DcGatewayId string
    ID of the resource.
    EnableBgp bool
    Indicates whether the BGP is enabled.
    GatewayAsn double
    Dedicated connection gateway custom ASN, range: 45090, 64512-65534 and 4200000000-4294967294.
    GatewayType string
    Type of the gateway. Valid value: NORMAL and NAT. Default is NORMAL. NOTES: CCN only supports NORMAL and a VPC can create two DCGs, the one is NAT type and the other is non-NAT type.
    HaZoneGroupId string
    ID of DC highly available placement group.
    ModeType string
    CCN route publishing method. Valid values: standard and exquisite. This parameter is only valid for the CCN direct connect gateway.
    Name string
    Name of the DCG.
    NetworkInstanceId string
    If the network_type value is VPC, the available value is VPC ID. But when the network_type value is CCN, the available value is CCN instance ID.
    NetworkType string
    Type of associated network. Valid value: VPC and CCN.
    Tags Dictionary<string, string>
    Tag key-value pairs for the DC gateway. Multiple tags can be set.
    Zone string
    Availability zone where the direct connect gateway resides.
    CnnRouteType string
    Type of CCN route. Valid value: BGP and STATIC. The property is available when the DCG type is CCN gateway and BGP enabled.
    CreateTime string
    Creation time of resource.
    DcGatewayId string
    ID of the resource.
    EnableBgp bool
    Indicates whether the BGP is enabled.
    GatewayAsn float64
    Dedicated connection gateway custom ASN, range: 45090, 64512-65534 and 4200000000-4294967294.
    GatewayType string
    Type of the gateway. Valid value: NORMAL and NAT. Default is NORMAL. NOTES: CCN only supports NORMAL and a VPC can create two DCGs, the one is NAT type and the other is non-NAT type.
    HaZoneGroupId string
    ID of DC highly available placement group.
    ModeType string
    CCN route publishing method. Valid values: standard and exquisite. This parameter is only valid for the CCN direct connect gateway.
    Name string
    Name of the DCG.
    NetworkInstanceId string
    If the network_type value is VPC, the available value is VPC ID. But when the network_type value is CCN, the available value is CCN instance ID.
    NetworkType string
    Type of associated network. Valid value: VPC and CCN.
    Tags map[string]string
    Tag key-value pairs for the DC gateway. Multiple tags can be set.
    Zone string
    Availability zone where the direct connect gateway resides.
    cnnRouteType String
    Type of CCN route. Valid value: BGP and STATIC. The property is available when the DCG type is CCN gateway and BGP enabled.
    createTime String
    Creation time of resource.
    dcGatewayId String
    ID of the resource.
    enableBgp Boolean
    Indicates whether the BGP is enabled.
    gatewayAsn Double
    Dedicated connection gateway custom ASN, range: 45090, 64512-65534 and 4200000000-4294967294.
    gatewayType String
    Type of the gateway. Valid value: NORMAL and NAT. Default is NORMAL. NOTES: CCN only supports NORMAL and a VPC can create two DCGs, the one is NAT type and the other is non-NAT type.
    haZoneGroupId String
    ID of DC highly available placement group.
    modeType String
    CCN route publishing method. Valid values: standard and exquisite. This parameter is only valid for the CCN direct connect gateway.
    name String
    Name of the DCG.
    networkInstanceId String
    If the network_type value is VPC, the available value is VPC ID. But when the network_type value is CCN, the available value is CCN instance ID.
    networkType String
    Type of associated network. Valid value: VPC and CCN.
    tags Map<String,String>
    Tag key-value pairs for the DC gateway. Multiple tags can be set.
    zone String
    Availability zone where the direct connect gateway resides.
    cnnRouteType string
    Type of CCN route. Valid value: BGP and STATIC. The property is available when the DCG type is CCN gateway and BGP enabled.
    createTime string
    Creation time of resource.
    dcGatewayId string
    ID of the resource.
    enableBgp boolean
    Indicates whether the BGP is enabled.
    gatewayAsn number
    Dedicated connection gateway custom ASN, range: 45090, 64512-65534 and 4200000000-4294967294.
    gatewayType string
    Type of the gateway. Valid value: NORMAL and NAT. Default is NORMAL. NOTES: CCN only supports NORMAL and a VPC can create two DCGs, the one is NAT type and the other is non-NAT type.
    haZoneGroupId string
    ID of DC highly available placement group.
    modeType string
    CCN route publishing method. Valid values: standard and exquisite. This parameter is only valid for the CCN direct connect gateway.
    name string
    Name of the DCG.
    networkInstanceId string
    If the network_type value is VPC, the available value is VPC ID. But when the network_type value is CCN, the available value is CCN instance ID.
    networkType string
    Type of associated network. Valid value: VPC and CCN.
    tags {[key: string]: string}
    Tag key-value pairs for the DC gateway. Multiple tags can be set.
    zone string
    Availability zone where the direct connect gateway resides.
    cnn_route_type str
    Type of CCN route. Valid value: BGP and STATIC. The property is available when the DCG type is CCN gateway and BGP enabled.
    create_time str
    Creation time of resource.
    dc_gateway_id str
    ID of the resource.
    enable_bgp bool
    Indicates whether the BGP is enabled.
    gateway_asn float
    Dedicated connection gateway custom ASN, range: 45090, 64512-65534 and 4200000000-4294967294.
    gateway_type str
    Type of the gateway. Valid value: NORMAL and NAT. Default is NORMAL. NOTES: CCN only supports NORMAL and a VPC can create two DCGs, the one is NAT type and the other is non-NAT type.
    ha_zone_group_id str
    ID of DC highly available placement group.
    mode_type str
    CCN route publishing method. Valid values: standard and exquisite. This parameter is only valid for the CCN direct connect gateway.
    name str
    Name of the DCG.
    network_instance_id str
    If the network_type value is VPC, the available value is VPC ID. But when the network_type value is CCN, the available value is CCN instance ID.
    network_type str
    Type of associated network. Valid value: VPC and CCN.
    tags Mapping[str, str]
    Tag key-value pairs for the DC gateway. Multiple tags can be set.
    zone str
    Availability zone where the direct connect gateway resides.
    cnnRouteType String
    Type of CCN route. Valid value: BGP and STATIC. The property is available when the DCG type is CCN gateway and BGP enabled.
    createTime String
    Creation time of resource.
    dcGatewayId String
    ID of the resource.
    enableBgp Boolean
    Indicates whether the BGP is enabled.
    gatewayAsn Number
    Dedicated connection gateway custom ASN, range: 45090, 64512-65534 and 4200000000-4294967294.
    gatewayType String
    Type of the gateway. Valid value: NORMAL and NAT. Default is NORMAL. NOTES: CCN only supports NORMAL and a VPC can create two DCGs, the one is NAT type and the other is non-NAT type.
    haZoneGroupId String
    ID of DC highly available placement group.
    modeType String
    CCN route publishing method. Valid values: standard and exquisite. This parameter is only valid for the CCN direct connect gateway.
    name String
    Name of the DCG.
    networkInstanceId String
    If the network_type value is VPC, the available value is VPC ID. But when the network_type value is CCN, the available value is CCN instance ID.
    networkType String
    Type of associated network. Valid value: VPC and CCN.
    tags Map<String>
    Tag key-value pairs for the DC gateway. Multiple tags can be set.
    zone String
    Availability zone where the direct connect gateway resides.

    Import

    Direct connect gateway instance can be imported, e.g. Tags will be imported automatically.

    $ pulumi import tencentcloud:index/dcGateway:DcGateway example dcg-dr1y0hu7
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    Viewing docs for tencentcloud 1.82.73
    published on Friday, Mar 6, 2026 by tencentcloudstack
      Try Pulumi Cloud free. Your team will thank you.