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

tencentcloud.TseCngwRoute

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a tse cngw_route

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const config = new pulumi.Config();
    const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
    const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
    const subnet = new tencentcloud.Subnet("subnet", {
        vpcId: vpc.vpcId,
        availabilityZone: availabilityZone,
        cidrBlock: "10.0.1.0/24",
    });
    const cngwGateway = new tencentcloud.TseCngwGateway("cngwGateway", {
        description: "terraform test1",
        enableCls: true,
        engineRegion: "ap-guangzhou",
        featureVersion: "STANDARD",
        gatewayVersion: "2.5.1",
        ingressClassName: "tse-nginx-ingress",
        internetMaxBandwidthOut: 0,
        tradeType: 0,
        type: "kong",
        nodeConfig: {
            number: 2,
            specification: "1c2g",
        },
        vpcConfig: {
            subnetId: subnet.subnetId,
            vpcId: vpc.vpcId,
        },
        tags: {
            createdBy: "terraform",
        },
    });
    const cngwService = new tencentcloud.TseCngwService("cngwService", {
        gatewayId: cngwGateway.tseCngwGatewayId,
        path: "/test",
        protocol: "http",
        retries: 5,
        timeout: 60000,
        upstreamType: "HostIP",
        upstreamInfo: {
            algorithm: "round-robin",
            autoScalingCvmPort: 0,
            host: "arunma.cn",
            port: 8012,
            slowStart: 0,
        },
    });
    const cngwRoute = new tencentcloud.TseCngwRoute("cngwRoute", {
        destinationPorts: [],
        gatewayId: cngwGateway.tseCngwGatewayId,
        hosts: ["192.168.0.1:9090"],
        httpsRedirectStatusCode: 426,
        paths: ["/user"],
        headers: [{
            key: "req",
            value: "terraform",
        }],
        preserveHost: false,
        protocols: [
            "http",
            "https",
        ],
        routeName: "terraform-route",
        serviceId: cngwService.serviceId,
        stripPath: true,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    config = pulumi.Config()
    availability_zone = config.get("availabilityZone")
    if availability_zone is None:
        availability_zone = "ap-guangzhou-4"
    vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
    subnet = tencentcloud.Subnet("subnet",
        vpc_id=vpc.vpc_id,
        availability_zone=availability_zone,
        cidr_block="10.0.1.0/24")
    cngw_gateway = tencentcloud.TseCngwGateway("cngwGateway",
        description="terraform test1",
        enable_cls=True,
        engine_region="ap-guangzhou",
        feature_version="STANDARD",
        gateway_version="2.5.1",
        ingress_class_name="tse-nginx-ingress",
        internet_max_bandwidth_out=0,
        trade_type=0,
        type="kong",
        node_config={
            "number": 2,
            "specification": "1c2g",
        },
        vpc_config={
            "subnet_id": subnet.subnet_id,
            "vpc_id": vpc.vpc_id,
        },
        tags={
            "createdBy": "terraform",
        })
    cngw_service = tencentcloud.TseCngwService("cngwService",
        gateway_id=cngw_gateway.tse_cngw_gateway_id,
        path="/test",
        protocol="http",
        retries=5,
        timeout=60000,
        upstream_type="HostIP",
        upstream_info={
            "algorithm": "round-robin",
            "auto_scaling_cvm_port": 0,
            "host": "arunma.cn",
            "port": 8012,
            "slow_start": 0,
        })
    cngw_route = tencentcloud.TseCngwRoute("cngwRoute",
        destination_ports=[],
        gateway_id=cngw_gateway.tse_cngw_gateway_id,
        hosts=["192.168.0.1:9090"],
        https_redirect_status_code=426,
        paths=["/user"],
        headers=[{
            "key": "req",
            "value": "terraform",
        }],
        preserve_host=False,
        protocols=[
            "http",
            "https",
        ],
        route_name="terraform-route",
        service_id=cngw_service.service_id,
        strip_path=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		availabilityZone := "ap-guangzhou-4"
    		if param := cfg.Get("availabilityZone"); param != "" {
    			availabilityZone = param
    		}
    		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
    			CidrBlock: pulumi.String("10.0.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
    			VpcId:            vpc.VpcId,
    			AvailabilityZone: pulumi.String(availabilityZone),
    			CidrBlock:        pulumi.String("10.0.1.0/24"),
    		})
    		if err != nil {
    			return err
    		}
    		cngwGateway, err := tencentcloud.NewTseCngwGateway(ctx, "cngwGateway", &tencentcloud.TseCngwGatewayArgs{
    			Description:             pulumi.String("terraform test1"),
    			EnableCls:               pulumi.Bool(true),
    			EngineRegion:            pulumi.String("ap-guangzhou"),
    			FeatureVersion:          pulumi.String("STANDARD"),
    			GatewayVersion:          pulumi.String("2.5.1"),
    			IngressClassName:        pulumi.String("tse-nginx-ingress"),
    			InternetMaxBandwidthOut: pulumi.Float64(0),
    			TradeType:               pulumi.Float64(0),
    			Type:                    pulumi.String("kong"),
    			NodeConfig: &tencentcloud.TseCngwGatewayNodeConfigArgs{
    				Number:        pulumi.Float64(2),
    				Specification: pulumi.String("1c2g"),
    			},
    			VpcConfig: &tencentcloud.TseCngwGatewayVpcConfigArgs{
    				SubnetId: subnet.SubnetId,
    				VpcId:    vpc.VpcId,
    			},
    			Tags: pulumi.StringMap{
    				"createdBy": pulumi.String("terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		cngwService, err := tencentcloud.NewTseCngwService(ctx, "cngwService", &tencentcloud.TseCngwServiceArgs{
    			GatewayId:    cngwGateway.TseCngwGatewayId,
    			Path:         pulumi.String("/test"),
    			Protocol:     pulumi.String("http"),
    			Retries:      pulumi.Float64(5),
    			Timeout:      pulumi.Float64(60000),
    			UpstreamType: pulumi.String("HostIP"),
    			UpstreamInfo: &tencentcloud.TseCngwServiceUpstreamInfoArgs{
    				Algorithm:          pulumi.String("round-robin"),
    				AutoScalingCvmPort: pulumi.Float64(0),
    				Host:               pulumi.String("arunma.cn"),
    				Port:               pulumi.Float64(8012),
    				SlowStart:          pulumi.Float64(0),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewTseCngwRoute(ctx, "cngwRoute", &tencentcloud.TseCngwRouteArgs{
    			DestinationPorts: pulumi.Float64Array{},
    			GatewayId:        cngwGateway.TseCngwGatewayId,
    			Hosts: pulumi.StringArray{
    				pulumi.String("192.168.0.1:9090"),
    			},
    			HttpsRedirectStatusCode: pulumi.Float64(426),
    			Paths: pulumi.StringArray{
    				pulumi.String("/user"),
    			},
    			Headers: tencentcloud.TseCngwRouteHeaderArray{
    				&tencentcloud.TseCngwRouteHeaderArgs{
    					Key:   pulumi.String("req"),
    					Value: pulumi.String("terraform"),
    				},
    			},
    			PreserveHost: pulumi.Bool(false),
    			Protocols: pulumi.StringArray{
    				pulumi.String("http"),
    				pulumi.String("https"),
    			},
    			RouteName: pulumi.String("terraform-route"),
    			ServiceId: cngwService.ServiceId,
    			StripPath: pulumi.Bool(true),
    		})
    		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 config = new Config();
        var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
        var vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "10.0.0.0/16",
        });
    
        var subnet = new Tencentcloud.Subnet("subnet", new()
        {
            VpcId = vpc.VpcId,
            AvailabilityZone = availabilityZone,
            CidrBlock = "10.0.1.0/24",
        });
    
        var cngwGateway = new Tencentcloud.TseCngwGateway("cngwGateway", new()
        {
            Description = "terraform test1",
            EnableCls = true,
            EngineRegion = "ap-guangzhou",
            FeatureVersion = "STANDARD",
            GatewayVersion = "2.5.1",
            IngressClassName = "tse-nginx-ingress",
            InternetMaxBandwidthOut = 0,
            TradeType = 0,
            Type = "kong",
            NodeConfig = new Tencentcloud.Inputs.TseCngwGatewayNodeConfigArgs
            {
                Number = 2,
                Specification = "1c2g",
            },
            VpcConfig = new Tencentcloud.Inputs.TseCngwGatewayVpcConfigArgs
            {
                SubnetId = subnet.SubnetId,
                VpcId = vpc.VpcId,
            },
            Tags = 
            {
                { "createdBy", "terraform" },
            },
        });
    
        var cngwService = new Tencentcloud.TseCngwService("cngwService", new()
        {
            GatewayId = cngwGateway.TseCngwGatewayId,
            Path = "/test",
            Protocol = "http",
            Retries = 5,
            Timeout = 60000,
            UpstreamType = "HostIP",
            UpstreamInfo = new Tencentcloud.Inputs.TseCngwServiceUpstreamInfoArgs
            {
                Algorithm = "round-robin",
                AutoScalingCvmPort = 0,
                Host = "arunma.cn",
                Port = 8012,
                SlowStart = 0,
            },
        });
    
        var cngwRoute = new Tencentcloud.TseCngwRoute("cngwRoute", new()
        {
            DestinationPorts = new[] {},
            GatewayId = cngwGateway.TseCngwGatewayId,
            Hosts = new[]
            {
                "192.168.0.1:9090",
            },
            HttpsRedirectStatusCode = 426,
            Paths = new[]
            {
                "/user",
            },
            Headers = new[]
            {
                new Tencentcloud.Inputs.TseCngwRouteHeaderArgs
                {
                    Key = "req",
                    Value = "terraform",
                },
            },
            PreserveHost = false,
            Protocols = new[]
            {
                "http",
                "https",
            },
            RouteName = "terraform-route",
            ServiceId = cngwService.ServiceId,
            StripPath = true,
        });
    
    });
    
    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.Subnet;
    import com.pulumi.tencentcloud.SubnetArgs;
    import com.pulumi.tencentcloud.TseCngwGateway;
    import com.pulumi.tencentcloud.TseCngwGatewayArgs;
    import com.pulumi.tencentcloud.inputs.TseCngwGatewayNodeConfigArgs;
    import com.pulumi.tencentcloud.inputs.TseCngwGatewayVpcConfigArgs;
    import com.pulumi.tencentcloud.TseCngwService;
    import com.pulumi.tencentcloud.TseCngwServiceArgs;
    import com.pulumi.tencentcloud.inputs.TseCngwServiceUpstreamInfoArgs;
    import com.pulumi.tencentcloud.TseCngwRoute;
    import com.pulumi.tencentcloud.TseCngwRouteArgs;
    import com.pulumi.tencentcloud.inputs.TseCngwRouteHeaderArgs;
    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) {
            final var config = ctx.config();
            final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
            var vpc = new Vpc("vpc", VpcArgs.builder()
                .cidrBlock("10.0.0.0/16")
                .build());
    
            var subnet = new Subnet("subnet", SubnetArgs.builder()
                .vpcId(vpc.vpcId())
                .availabilityZone(availabilityZone)
                .cidrBlock("10.0.1.0/24")
                .build());
    
            var cngwGateway = new TseCngwGateway("cngwGateway", TseCngwGatewayArgs.builder()
                .description("terraform test1")
                .enableCls(true)
                .engineRegion("ap-guangzhou")
                .featureVersion("STANDARD")
                .gatewayVersion("2.5.1")
                .ingressClassName("tse-nginx-ingress")
                .internetMaxBandwidthOut(0)
                .tradeType(0)
                .type("kong")
                .nodeConfig(TseCngwGatewayNodeConfigArgs.builder()
                    .number(2)
                    .specification("1c2g")
                    .build())
                .vpcConfig(TseCngwGatewayVpcConfigArgs.builder()
                    .subnetId(subnet.subnetId())
                    .vpcId(vpc.vpcId())
                    .build())
                .tags(Map.of("createdBy", "terraform"))
                .build());
    
            var cngwService = new TseCngwService("cngwService", TseCngwServiceArgs.builder()
                .gatewayId(cngwGateway.tseCngwGatewayId())
                .path("/test")
                .protocol("http")
                .retries(5)
                .timeout(60000)
                .upstreamType("HostIP")
                .upstreamInfo(TseCngwServiceUpstreamInfoArgs.builder()
                    .algorithm("round-robin")
                    .autoScalingCvmPort(0)
                    .host("arunma.cn")
                    .port(8012)
                    .slowStart(0)
                    .build())
                .build());
    
            var cngwRoute = new TseCngwRoute("cngwRoute", TseCngwRouteArgs.builder()
                .destinationPorts()
                .gatewayId(cngwGateway.tseCngwGatewayId())
                .hosts("192.168.0.1:9090")
                .httpsRedirectStatusCode(426)
                .paths("/user")
                .headers(TseCngwRouteHeaderArgs.builder()
                    .key("req")
                    .value("terraform")
                    .build())
                .preserveHost(false)
                .protocols(            
                    "http",
                    "https")
                .routeName("terraform-route")
                .serviceId(cngwService.serviceId())
                .stripPath(true)
                .build());
    
        }
    }
    
    configuration:
      availabilityZone:
        type: string
        default: ap-guangzhou-4
    resources:
      vpc:
        type: tencentcloud:Vpc
        properties:
          cidrBlock: 10.0.0.0/16
      subnet:
        type: tencentcloud:Subnet
        properties:
          vpcId: ${vpc.vpcId}
          availabilityZone: ${availabilityZone}
          cidrBlock: 10.0.1.0/24
      cngwGateway:
        type: tencentcloud:TseCngwGateway
        properties:
          description: terraform test1
          enableCls: true
          engineRegion: ap-guangzhou
          featureVersion: STANDARD
          gatewayVersion: 2.5.1
          ingressClassName: tse-nginx-ingress
          internetMaxBandwidthOut: 0
          tradeType: 0
          type: kong
          nodeConfig:
            number: 2
            specification: 1c2g
          vpcConfig:
            subnetId: ${subnet.subnetId}
            vpcId: ${vpc.vpcId}
          tags:
            createdBy: terraform
      cngwService:
        type: tencentcloud:TseCngwService
        properties:
          gatewayId: ${cngwGateway.tseCngwGatewayId}
          path: /test
          protocol: http
          retries: 5
          timeout: 60000
          upstreamType: HostIP
          upstreamInfo:
            algorithm: round-robin
            autoScalingCvmPort: 0
            host: arunma.cn
            port: 8012
            slowStart: 0
      cngwRoute:
        type: tencentcloud:TseCngwRoute
        properties:
          destinationPorts: []
          gatewayId: ${cngwGateway.tseCngwGatewayId}
          hosts:
            - 192.168.0.1:9090
          httpsRedirectStatusCode: 426
          paths:
            - /user
          headers:
            - key: req
              value: terraform
          preserveHost: false
          protocols:
            - http
            - https
          routeName: terraform-route
          serviceId: ${cngwService.serviceId}
          stripPath: true
    

    Create TseCngwRoute Resource

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

    Constructor syntax

    new TseCngwRoute(name: string, args: TseCngwRouteArgs, opts?: CustomResourceOptions);
    @overload
    def TseCngwRoute(resource_name: str,
                     args: TseCngwRouteArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def TseCngwRoute(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     gateway_id: Optional[str] = None,
                     service_id: Optional[str] = None,
                     methods: Optional[Sequence[str]] = None,
                     headers: Optional[Sequence[TseCngwRouteHeaderArgs]] = None,
                     hosts: Optional[Sequence[str]] = None,
                     https_redirect_status_code: Optional[float] = None,
                     destination_ports: Optional[Sequence[float]] = None,
                     paths: Optional[Sequence[str]] = None,
                     preserve_host: Optional[bool] = None,
                     protocols: Optional[Sequence[str]] = None,
                     route_name: Optional[str] = None,
                     force_https: Optional[bool] = None,
                     strip_path: Optional[bool] = None,
                     tse_cngw_route_id: Optional[str] = None)
    func NewTseCngwRoute(ctx *Context, name string, args TseCngwRouteArgs, opts ...ResourceOption) (*TseCngwRoute, error)
    public TseCngwRoute(string name, TseCngwRouteArgs args, CustomResourceOptions? opts = null)
    public TseCngwRoute(String name, TseCngwRouteArgs args)
    public TseCngwRoute(String name, TseCngwRouteArgs args, CustomResourceOptions options)
    
    type: tencentcloud:TseCngwRoute
    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 TseCngwRouteArgs
    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 TseCngwRouteArgs
    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 TseCngwRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TseCngwRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TseCngwRouteArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    TseCngwRoute 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 TseCngwRoute resource accepts the following input properties:

    GatewayId string
    gateway ID.
    ServiceId string
    ID of the service which the route belongs to.
    DestinationPorts List<double>
    destination port for Layer 4 matching.
    ForceHttps bool
    This field has been deprecated and will be deleted in subsequent versions. whether to enable forced HTTPS, no longer use.

    Deprecated: Deprecated

    Headers List<TseCngwRouteHeader>
    the headers of route.
    Hosts List<string>
    host list.
    HttpsRedirectStatusCode double
    https redirection status code.
    Methods List<string>
    route methods. Reference value:GET,POST,DELETE,PUT,OPTIONS,PATCH,HEAD,ANY,TRACE,COPY,MOVE,PROPFIND,PROPPATCH,MKCOL,LOCK,UNLOCK.
    Paths List<string>
    path list.
    PreserveHost bool
    whether to keep the host when forwarding to the backend.
    Protocols List<string>
    the protocol list of route.Reference value:https,http.
    RouteName string
    the name of the route, unique in the instance.
    StripPath bool
    whether to strip path when forwarding to the backend.
    TseCngwRouteId string
    ID of the resource.
    GatewayId string
    gateway ID.
    ServiceId string
    ID of the service which the route belongs to.
    DestinationPorts []float64
    destination port for Layer 4 matching.
    ForceHttps bool
    This field has been deprecated and will be deleted in subsequent versions. whether to enable forced HTTPS, no longer use.

    Deprecated: Deprecated

    Headers []TseCngwRouteHeaderArgs
    the headers of route.
    Hosts []string
    host list.
    HttpsRedirectStatusCode float64
    https redirection status code.
    Methods []string
    route methods. Reference value:GET,POST,DELETE,PUT,OPTIONS,PATCH,HEAD,ANY,TRACE,COPY,MOVE,PROPFIND,PROPPATCH,MKCOL,LOCK,UNLOCK.
    Paths []string
    path list.
    PreserveHost bool
    whether to keep the host when forwarding to the backend.
    Protocols []string
    the protocol list of route.Reference value:https,http.
    RouteName string
    the name of the route, unique in the instance.
    StripPath bool
    whether to strip path when forwarding to the backend.
    TseCngwRouteId string
    ID of the resource.
    gatewayId String
    gateway ID.
    serviceId String
    ID of the service which the route belongs to.
    destinationPorts List<Double>
    destination port for Layer 4 matching.
    forceHttps Boolean
    This field has been deprecated and will be deleted in subsequent versions. whether to enable forced HTTPS, no longer use.

    Deprecated: Deprecated

    headers List<TseCngwRouteHeader>
    the headers of route.
    hosts List<String>
    host list.
    httpsRedirectStatusCode Double
    https redirection status code.
    methods List<String>
    route methods. Reference value:GET,POST,DELETE,PUT,OPTIONS,PATCH,HEAD,ANY,TRACE,COPY,MOVE,PROPFIND,PROPPATCH,MKCOL,LOCK,UNLOCK.
    paths List<String>
    path list.
    preserveHost Boolean
    whether to keep the host when forwarding to the backend.
    protocols List<String>
    the protocol list of route.Reference value:https,http.
    routeName String
    the name of the route, unique in the instance.
    stripPath Boolean
    whether to strip path when forwarding to the backend.
    tseCngwRouteId String
    ID of the resource.
    gatewayId string
    gateway ID.
    serviceId string
    ID of the service which the route belongs to.
    destinationPorts number[]
    destination port for Layer 4 matching.
    forceHttps boolean
    This field has been deprecated and will be deleted in subsequent versions. whether to enable forced HTTPS, no longer use.

    Deprecated: Deprecated

    headers TseCngwRouteHeader[]
    the headers of route.
    hosts string[]
    host list.
    httpsRedirectStatusCode number
    https redirection status code.
    methods string[]
    route methods. Reference value:GET,POST,DELETE,PUT,OPTIONS,PATCH,HEAD,ANY,TRACE,COPY,MOVE,PROPFIND,PROPPATCH,MKCOL,LOCK,UNLOCK.
    paths string[]
    path list.
    preserveHost boolean
    whether to keep the host when forwarding to the backend.
    protocols string[]
    the protocol list of route.Reference value:https,http.
    routeName string
    the name of the route, unique in the instance.
    stripPath boolean
    whether to strip path when forwarding to the backend.
    tseCngwRouteId string
    ID of the resource.
    gateway_id str
    gateway ID.
    service_id str
    ID of the service which the route belongs to.
    destination_ports Sequence[float]
    destination port for Layer 4 matching.
    force_https bool
    This field has been deprecated and will be deleted in subsequent versions. whether to enable forced HTTPS, no longer use.

    Deprecated: Deprecated

    headers Sequence[TseCngwRouteHeaderArgs]
    the headers of route.
    hosts Sequence[str]
    host list.
    https_redirect_status_code float
    https redirection status code.
    methods Sequence[str]
    route methods. Reference value:GET,POST,DELETE,PUT,OPTIONS,PATCH,HEAD,ANY,TRACE,COPY,MOVE,PROPFIND,PROPPATCH,MKCOL,LOCK,UNLOCK.
    paths Sequence[str]
    path list.
    preserve_host bool
    whether to keep the host when forwarding to the backend.
    protocols Sequence[str]
    the protocol list of route.Reference value:https,http.
    route_name str
    the name of the route, unique in the instance.
    strip_path bool
    whether to strip path when forwarding to the backend.
    tse_cngw_route_id str
    ID of the resource.
    gatewayId String
    gateway ID.
    serviceId String
    ID of the service which the route belongs to.
    destinationPorts List<Number>
    destination port for Layer 4 matching.
    forceHttps Boolean
    This field has been deprecated and will be deleted in subsequent versions. whether to enable forced HTTPS, no longer use.

    Deprecated: Deprecated

    headers List<Property Map>
    the headers of route.
    hosts List<String>
    host list.
    httpsRedirectStatusCode Number
    https redirection status code.
    methods List<String>
    route methods. Reference value:GET,POST,DELETE,PUT,OPTIONS,PATCH,HEAD,ANY,TRACE,COPY,MOVE,PROPFIND,PROPPATCH,MKCOL,LOCK,UNLOCK.
    paths List<String>
    path list.
    preserveHost Boolean
    whether to keep the host when forwarding to the backend.
    protocols List<String>
    the protocol list of route.Reference value:https,http.
    routeName String
    the name of the route, unique in the instance.
    stripPath Boolean
    whether to strip path when forwarding to the backend.
    tseCngwRouteId String
    ID of the resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    RouteId string
    the id of the route, unique in the instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    RouteId string
    the id of the route, unique in the instance.
    id String
    The provider-assigned unique ID for this managed resource.
    routeId String
    the id of the route, unique in the instance.
    id string
    The provider-assigned unique ID for this managed resource.
    routeId string
    the id of the route, unique in the instance.
    id str
    The provider-assigned unique ID for this managed resource.
    route_id str
    the id of the route, unique in the instance.
    id String
    The provider-assigned unique ID for this managed resource.
    routeId String
    the id of the route, unique in the instance.

    Look up Existing TseCngwRoute Resource

    Get an existing TseCngwRoute 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?: TseCngwRouteState, opts?: CustomResourceOptions): TseCngwRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            destination_ports: Optional[Sequence[float]] = None,
            force_https: Optional[bool] = None,
            gateway_id: Optional[str] = None,
            headers: Optional[Sequence[TseCngwRouteHeaderArgs]] = None,
            hosts: Optional[Sequence[str]] = None,
            https_redirect_status_code: Optional[float] = None,
            methods: Optional[Sequence[str]] = None,
            paths: Optional[Sequence[str]] = None,
            preserve_host: Optional[bool] = None,
            protocols: Optional[Sequence[str]] = None,
            route_id: Optional[str] = None,
            route_name: Optional[str] = None,
            service_id: Optional[str] = None,
            strip_path: Optional[bool] = None,
            tse_cngw_route_id: Optional[str] = None) -> TseCngwRoute
    func GetTseCngwRoute(ctx *Context, name string, id IDInput, state *TseCngwRouteState, opts ...ResourceOption) (*TseCngwRoute, error)
    public static TseCngwRoute Get(string name, Input<string> id, TseCngwRouteState? state, CustomResourceOptions? opts = null)
    public static TseCngwRoute get(String name, Output<String> id, TseCngwRouteState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:TseCngwRoute    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:
    DestinationPorts List<double>
    destination port for Layer 4 matching.
    ForceHttps bool
    This field has been deprecated and will be deleted in subsequent versions. whether to enable forced HTTPS, no longer use.

    Deprecated: Deprecated

    GatewayId string
    gateway ID.
    Headers List<TseCngwRouteHeader>
    the headers of route.
    Hosts List<string>
    host list.
    HttpsRedirectStatusCode double
    https redirection status code.
    Methods List<string>
    route methods. Reference value:GET,POST,DELETE,PUT,OPTIONS,PATCH,HEAD,ANY,TRACE,COPY,MOVE,PROPFIND,PROPPATCH,MKCOL,LOCK,UNLOCK.
    Paths List<string>
    path list.
    PreserveHost bool
    whether to keep the host when forwarding to the backend.
    Protocols List<string>
    the protocol list of route.Reference value:https,http.
    RouteId string
    the id of the route, unique in the instance.
    RouteName string
    the name of the route, unique in the instance.
    ServiceId string
    ID of the service which the route belongs to.
    StripPath bool
    whether to strip path when forwarding to the backend.
    TseCngwRouteId string
    ID of the resource.
    DestinationPorts []float64
    destination port for Layer 4 matching.
    ForceHttps bool
    This field has been deprecated and will be deleted in subsequent versions. whether to enable forced HTTPS, no longer use.

    Deprecated: Deprecated

    GatewayId string
    gateway ID.
    Headers []TseCngwRouteHeaderArgs
    the headers of route.
    Hosts []string
    host list.
    HttpsRedirectStatusCode float64
    https redirection status code.
    Methods []string
    route methods. Reference value:GET,POST,DELETE,PUT,OPTIONS,PATCH,HEAD,ANY,TRACE,COPY,MOVE,PROPFIND,PROPPATCH,MKCOL,LOCK,UNLOCK.
    Paths []string
    path list.
    PreserveHost bool
    whether to keep the host when forwarding to the backend.
    Protocols []string
    the protocol list of route.Reference value:https,http.
    RouteId string
    the id of the route, unique in the instance.
    RouteName string
    the name of the route, unique in the instance.
    ServiceId string
    ID of the service which the route belongs to.
    StripPath bool
    whether to strip path when forwarding to the backend.
    TseCngwRouteId string
    ID of the resource.
    destinationPorts List<Double>
    destination port for Layer 4 matching.
    forceHttps Boolean
    This field has been deprecated and will be deleted in subsequent versions. whether to enable forced HTTPS, no longer use.

    Deprecated: Deprecated

    gatewayId String
    gateway ID.
    headers List<TseCngwRouteHeader>
    the headers of route.
    hosts List<String>
    host list.
    httpsRedirectStatusCode Double
    https redirection status code.
    methods List<String>
    route methods. Reference value:GET,POST,DELETE,PUT,OPTIONS,PATCH,HEAD,ANY,TRACE,COPY,MOVE,PROPFIND,PROPPATCH,MKCOL,LOCK,UNLOCK.
    paths List<String>
    path list.
    preserveHost Boolean
    whether to keep the host when forwarding to the backend.
    protocols List<String>
    the protocol list of route.Reference value:https,http.
    routeId String
    the id of the route, unique in the instance.
    routeName String
    the name of the route, unique in the instance.
    serviceId String
    ID of the service which the route belongs to.
    stripPath Boolean
    whether to strip path when forwarding to the backend.
    tseCngwRouteId String
    ID of the resource.
    destinationPorts number[]
    destination port for Layer 4 matching.
    forceHttps boolean
    This field has been deprecated and will be deleted in subsequent versions. whether to enable forced HTTPS, no longer use.

    Deprecated: Deprecated

    gatewayId string
    gateway ID.
    headers TseCngwRouteHeader[]
    the headers of route.
    hosts string[]
    host list.
    httpsRedirectStatusCode number
    https redirection status code.
    methods string[]
    route methods. Reference value:GET,POST,DELETE,PUT,OPTIONS,PATCH,HEAD,ANY,TRACE,COPY,MOVE,PROPFIND,PROPPATCH,MKCOL,LOCK,UNLOCK.
    paths string[]
    path list.
    preserveHost boolean
    whether to keep the host when forwarding to the backend.
    protocols string[]
    the protocol list of route.Reference value:https,http.
    routeId string
    the id of the route, unique in the instance.
    routeName string
    the name of the route, unique in the instance.
    serviceId string
    ID of the service which the route belongs to.
    stripPath boolean
    whether to strip path when forwarding to the backend.
    tseCngwRouteId string
    ID of the resource.
    destination_ports Sequence[float]
    destination port for Layer 4 matching.
    force_https bool
    This field has been deprecated and will be deleted in subsequent versions. whether to enable forced HTTPS, no longer use.

    Deprecated: Deprecated

    gateway_id str
    gateway ID.
    headers Sequence[TseCngwRouteHeaderArgs]
    the headers of route.
    hosts Sequence[str]
    host list.
    https_redirect_status_code float
    https redirection status code.
    methods Sequence[str]
    route methods. Reference value:GET,POST,DELETE,PUT,OPTIONS,PATCH,HEAD,ANY,TRACE,COPY,MOVE,PROPFIND,PROPPATCH,MKCOL,LOCK,UNLOCK.
    paths Sequence[str]
    path list.
    preserve_host bool
    whether to keep the host when forwarding to the backend.
    protocols Sequence[str]
    the protocol list of route.Reference value:https,http.
    route_id str
    the id of the route, unique in the instance.
    route_name str
    the name of the route, unique in the instance.
    service_id str
    ID of the service which the route belongs to.
    strip_path bool
    whether to strip path when forwarding to the backend.
    tse_cngw_route_id str
    ID of the resource.
    destinationPorts List<Number>
    destination port for Layer 4 matching.
    forceHttps Boolean
    This field has been deprecated and will be deleted in subsequent versions. whether to enable forced HTTPS, no longer use.

    Deprecated: Deprecated

    gatewayId String
    gateway ID.
    headers List<Property Map>
    the headers of route.
    hosts List<String>
    host list.
    httpsRedirectStatusCode Number
    https redirection status code.
    methods List<String>
    route methods. Reference value:GET,POST,DELETE,PUT,OPTIONS,PATCH,HEAD,ANY,TRACE,COPY,MOVE,PROPFIND,PROPPATCH,MKCOL,LOCK,UNLOCK.
    paths List<String>
    path list.
    preserveHost Boolean
    whether to keep the host when forwarding to the backend.
    protocols List<String>
    the protocol list of route.Reference value:https,http.
    routeId String
    the id of the route, unique in the instance.
    routeName String
    the name of the route, unique in the instance.
    serviceId String
    ID of the service which the route belongs to.
    stripPath Boolean
    whether to strip path when forwarding to the backend.
    tseCngwRouteId String
    ID of the resource.

    Supporting Types

    TseCngwRouteHeader, TseCngwRouteHeaderArgs

    Key string
    key of header.
    Value string
    value of header.
    Key string
    key of header.
    Value string
    value of header.
    key String
    key of header.
    value String
    value of header.
    key string
    key of header.
    value string
    value of header.
    key str
    key of header.
    value str
    value of header.
    key String
    key of header.
    value String
    value of header.

    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