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

tencentcloud.GaapHttpRule

Explore with Pulumi AI

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

    Provides a resource to create a forward rule of layer7 listener.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const fooGaapProxy = new tencentcloud.GaapProxy("fooGaapProxy", {
        bandwidth: 10,
        concurrent: 2,
        accessRegion: "SouthChina",
        realserverRegion: "NorthChina",
    });
    const fooGaapLayer7Listener = new tencentcloud.GaapLayer7Listener("fooGaapLayer7Listener", {
        protocol: "HTTP",
        port: 80,
        proxyId: fooGaapProxy.gaapProxyId,
    });
    const fooGaapRealserver = new tencentcloud.GaapRealserver("fooGaapRealserver", {ip: "1.1.1.1"});
    const bar = new tencentcloud.GaapRealserver("bar", {ip: "8.8.8.8"});
    const fooGaapHttpDomain = new tencentcloud.GaapHttpDomain("fooGaapHttpDomain", {
        listenerId: fooGaapLayer7Listener.gaapLayer7ListenerId,
        domain: "www.qq.com",
    });
    const fooGaapHttpRule = new tencentcloud.GaapHttpRule("fooGaapHttpRule", {
        listenerId: fooGaapLayer7Listener.gaapLayer7ListenerId,
        domain: fooGaapHttpDomain.domain,
        path: "/",
        realserverType: "IP",
        healthCheck: true,
        healthCheckPath: "/",
        healthCheckMethod: "GET",
        healthCheckStatusCodes: [200],
        realservers: [
            {
                id: fooGaapRealserver.gaapRealserverId,
                ip: fooGaapRealserver.ip,
                port: 80,
            },
            {
                id: bar.gaapRealserverId,
                ip: bar.ip,
                port: 80,
            },
        ],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    foo_gaap_proxy = tencentcloud.GaapProxy("fooGaapProxy",
        bandwidth=10,
        concurrent=2,
        access_region="SouthChina",
        realserver_region="NorthChina")
    foo_gaap_layer7_listener = tencentcloud.GaapLayer7Listener("fooGaapLayer7Listener",
        protocol="HTTP",
        port=80,
        proxy_id=foo_gaap_proxy.gaap_proxy_id)
    foo_gaap_realserver = tencentcloud.GaapRealserver("fooGaapRealserver", ip="1.1.1.1")
    bar = tencentcloud.GaapRealserver("bar", ip="8.8.8.8")
    foo_gaap_http_domain = tencentcloud.GaapHttpDomain("fooGaapHttpDomain",
        listener_id=foo_gaap_layer7_listener.gaap_layer7_listener_id,
        domain="www.qq.com")
    foo_gaap_http_rule = tencentcloud.GaapHttpRule("fooGaapHttpRule",
        listener_id=foo_gaap_layer7_listener.gaap_layer7_listener_id,
        domain=foo_gaap_http_domain.domain,
        path="/",
        realserver_type="IP",
        health_check=True,
        health_check_path="/",
        health_check_method="GET",
        health_check_status_codes=[200],
        realservers=[
            {
                "id": foo_gaap_realserver.gaap_realserver_id,
                "ip": foo_gaap_realserver.ip,
                "port": 80,
            },
            {
                "id": bar.gaap_realserver_id,
                "ip": bar.ip,
                "port": 80,
            },
        ])
    
    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 {
    		fooGaapProxy, err := tencentcloud.NewGaapProxy(ctx, "fooGaapProxy", &tencentcloud.GaapProxyArgs{
    			Bandwidth:        pulumi.Float64(10),
    			Concurrent:       pulumi.Float64(2),
    			AccessRegion:     pulumi.String("SouthChina"),
    			RealserverRegion: pulumi.String("NorthChina"),
    		})
    		if err != nil {
    			return err
    		}
    		fooGaapLayer7Listener, err := tencentcloud.NewGaapLayer7Listener(ctx, "fooGaapLayer7Listener", &tencentcloud.GaapLayer7ListenerArgs{
    			Protocol: pulumi.String("HTTP"),
    			Port:     pulumi.Float64(80),
    			ProxyId:  fooGaapProxy.GaapProxyId,
    		})
    		if err != nil {
    			return err
    		}
    		fooGaapRealserver, err := tencentcloud.NewGaapRealserver(ctx, "fooGaapRealserver", &tencentcloud.GaapRealserverArgs{
    			Ip: pulumi.String("1.1.1.1"),
    		})
    		if err != nil {
    			return err
    		}
    		bar, err := tencentcloud.NewGaapRealserver(ctx, "bar", &tencentcloud.GaapRealserverArgs{
    			Ip: pulumi.String("8.8.8.8"),
    		})
    		if err != nil {
    			return err
    		}
    		fooGaapHttpDomain, err := tencentcloud.NewGaapHttpDomain(ctx, "fooGaapHttpDomain", &tencentcloud.GaapHttpDomainArgs{
    			ListenerId: fooGaapLayer7Listener.GaapLayer7ListenerId,
    			Domain:     pulumi.String("www.qq.com"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewGaapHttpRule(ctx, "fooGaapHttpRule", &tencentcloud.GaapHttpRuleArgs{
    			ListenerId:        fooGaapLayer7Listener.GaapLayer7ListenerId,
    			Domain:            fooGaapHttpDomain.Domain,
    			Path:              pulumi.String("/"),
    			RealserverType:    pulumi.String("IP"),
    			HealthCheck:       pulumi.Bool(true),
    			HealthCheckPath:   pulumi.String("/"),
    			HealthCheckMethod: pulumi.String("GET"),
    			HealthCheckStatusCodes: pulumi.Float64Array{
    				pulumi.Float64(200),
    			},
    			Realservers: tencentcloud.GaapHttpRuleRealserverArray{
    				&tencentcloud.GaapHttpRuleRealserverArgs{
    					Id:   fooGaapRealserver.GaapRealserverId,
    					Ip:   fooGaapRealserver.Ip,
    					Port: pulumi.Float64(80),
    				},
    				&tencentcloud.GaapHttpRuleRealserverArgs{
    					Id:   bar.GaapRealserverId,
    					Ip:   bar.Ip,
    					Port: pulumi.Float64(80),
    				},
    			},
    		})
    		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 fooGaapProxy = new Tencentcloud.GaapProxy("fooGaapProxy", new()
        {
            Bandwidth = 10,
            Concurrent = 2,
            AccessRegion = "SouthChina",
            RealserverRegion = "NorthChina",
        });
    
        var fooGaapLayer7Listener = new Tencentcloud.GaapLayer7Listener("fooGaapLayer7Listener", new()
        {
            Protocol = "HTTP",
            Port = 80,
            ProxyId = fooGaapProxy.GaapProxyId,
        });
    
        var fooGaapRealserver = new Tencentcloud.GaapRealserver("fooGaapRealserver", new()
        {
            Ip = "1.1.1.1",
        });
    
        var bar = new Tencentcloud.GaapRealserver("bar", new()
        {
            Ip = "8.8.8.8",
        });
    
        var fooGaapHttpDomain = new Tencentcloud.GaapHttpDomain("fooGaapHttpDomain", new()
        {
            ListenerId = fooGaapLayer7Listener.GaapLayer7ListenerId,
            Domain = "www.qq.com",
        });
    
        var fooGaapHttpRule = new Tencentcloud.GaapHttpRule("fooGaapHttpRule", new()
        {
            ListenerId = fooGaapLayer7Listener.GaapLayer7ListenerId,
            Domain = fooGaapHttpDomain.Domain,
            Path = "/",
            RealserverType = "IP",
            HealthCheck = true,
            HealthCheckPath = "/",
            HealthCheckMethod = "GET",
            HealthCheckStatusCodes = new[]
            {
                200,
            },
            Realservers = new[]
            {
                new Tencentcloud.Inputs.GaapHttpRuleRealserverArgs
                {
                    Id = fooGaapRealserver.GaapRealserverId,
                    Ip = fooGaapRealserver.Ip,
                    Port = 80,
                },
                new Tencentcloud.Inputs.GaapHttpRuleRealserverArgs
                {
                    Id = bar.GaapRealserverId,
                    Ip = bar.Ip,
                    Port = 80,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.GaapProxy;
    import com.pulumi.tencentcloud.GaapProxyArgs;
    import com.pulumi.tencentcloud.GaapLayer7Listener;
    import com.pulumi.tencentcloud.GaapLayer7ListenerArgs;
    import com.pulumi.tencentcloud.GaapRealserver;
    import com.pulumi.tencentcloud.GaapRealserverArgs;
    import com.pulumi.tencentcloud.GaapHttpDomain;
    import com.pulumi.tencentcloud.GaapHttpDomainArgs;
    import com.pulumi.tencentcloud.GaapHttpRule;
    import com.pulumi.tencentcloud.GaapHttpRuleArgs;
    import com.pulumi.tencentcloud.inputs.GaapHttpRuleRealserverArgs;
    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 fooGaapProxy = new GaapProxy("fooGaapProxy", GaapProxyArgs.builder()
                .bandwidth(10)
                .concurrent(2)
                .accessRegion("SouthChina")
                .realserverRegion("NorthChina")
                .build());
    
            var fooGaapLayer7Listener = new GaapLayer7Listener("fooGaapLayer7Listener", GaapLayer7ListenerArgs.builder()
                .protocol("HTTP")
                .port(80)
                .proxyId(fooGaapProxy.gaapProxyId())
                .build());
    
            var fooGaapRealserver = new GaapRealserver("fooGaapRealserver", GaapRealserverArgs.builder()
                .ip("1.1.1.1")
                .build());
    
            var bar = new GaapRealserver("bar", GaapRealserverArgs.builder()
                .ip("8.8.8.8")
                .build());
    
            var fooGaapHttpDomain = new GaapHttpDomain("fooGaapHttpDomain", GaapHttpDomainArgs.builder()
                .listenerId(fooGaapLayer7Listener.gaapLayer7ListenerId())
                .domain("www.qq.com")
                .build());
    
            var fooGaapHttpRule = new GaapHttpRule("fooGaapHttpRule", GaapHttpRuleArgs.builder()
                .listenerId(fooGaapLayer7Listener.gaapLayer7ListenerId())
                .domain(fooGaapHttpDomain.domain())
                .path("/")
                .realserverType("IP")
                .healthCheck(true)
                .healthCheckPath("/")
                .healthCheckMethod("GET")
                .healthCheckStatusCodes(200)
                .realservers(            
                    GaapHttpRuleRealserverArgs.builder()
                        .id(fooGaapRealserver.gaapRealserverId())
                        .ip(fooGaapRealserver.ip())
                        .port(80)
                        .build(),
                    GaapHttpRuleRealserverArgs.builder()
                        .id(bar.gaapRealserverId())
                        .ip(bar.ip())
                        .port(80)
                        .build())
                .build());
    
        }
    }
    
    resources:
      fooGaapProxy:
        type: tencentcloud:GaapProxy
        properties:
          bandwidth: 10
          concurrent: 2
          accessRegion: SouthChina
          realserverRegion: NorthChina
      fooGaapLayer7Listener:
        type: tencentcloud:GaapLayer7Listener
        properties:
          protocol: HTTP
          port: 80
          proxyId: ${fooGaapProxy.gaapProxyId}
      fooGaapRealserver:
        type: tencentcloud:GaapRealserver
        properties:
          ip: 1.1.1.1
      bar:
        type: tencentcloud:GaapRealserver
        properties:
          ip: 8.8.8.8
      fooGaapHttpDomain:
        type: tencentcloud:GaapHttpDomain
        properties:
          listenerId: ${fooGaapLayer7Listener.gaapLayer7ListenerId}
          domain: www.qq.com
      fooGaapHttpRule:
        type: tencentcloud:GaapHttpRule
        properties:
          listenerId: ${fooGaapLayer7Listener.gaapLayer7ListenerId}
          domain: ${fooGaapHttpDomain.domain}
          path: /
          realserverType: IP
          healthCheck: true
          healthCheckPath: /
          healthCheckMethod: GET
          healthCheckStatusCodes:
            - 200
          realservers:
            - id: ${fooGaapRealserver.gaapRealserverId}
              ip: ${fooGaapRealserver.ip}
              port: 80
            - id: ${bar.gaapRealserverId}
              ip: ${bar.ip}
              port: 80
    

    Create GaapHttpRule Resource

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

    Constructor syntax

    new GaapHttpRule(name: string, args: GaapHttpRuleArgs, opts?: CustomResourceOptions);
    @overload
    def GaapHttpRule(resource_name: str,
                     args: GaapHttpRuleArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def GaapHttpRule(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     listener_id: Optional[str] = None,
                     domain: Optional[str] = None,
                     realserver_type: Optional[str] = None,
                     path: Optional[str] = None,
                     health_check: Optional[bool] = None,
                     interval: Optional[float] = None,
                     health_check_path: Optional[str] = None,
                     health_check_status_codes: Optional[Sequence[float]] = None,
                     connect_timeout: Optional[float] = None,
                     health_check_method: Optional[str] = None,
                     gaap_http_rule_id: Optional[str] = None,
                     forward_host: Optional[str] = None,
                     realservers: Optional[Sequence[GaapHttpRuleRealserverArgs]] = None,
                     scheduler: Optional[str] = None,
                     sni: Optional[str] = None,
                     sni_switch: Optional[str] = None)
    func NewGaapHttpRule(ctx *Context, name string, args GaapHttpRuleArgs, opts ...ResourceOption) (*GaapHttpRule, error)
    public GaapHttpRule(string name, GaapHttpRuleArgs args, CustomResourceOptions? opts = null)
    public GaapHttpRule(String name, GaapHttpRuleArgs args)
    public GaapHttpRule(String name, GaapHttpRuleArgs args, CustomResourceOptions options)
    
    type: tencentcloud:GaapHttpRule
    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 GaapHttpRuleArgs
    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 GaapHttpRuleArgs
    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 GaapHttpRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GaapHttpRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GaapHttpRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Domain string
    Forward domain of the forward rule.
    HealthCheck bool
    Indicates whether health check is enable.
    ListenerId string
    ID of the layer7 listener.
    Path string
    Path of the forward rule. Maximum length is 80.
    RealserverType string
    Type of the realserver. Valid value: IP and DOMAIN.
    ConnectTimeout double
    Timeout of the health check response, default value is 2s.
    ForwardHost string
    The default value of requested host which is forwarded to the realserver by the listener is default.
    GaapHttpRuleId string
    ID of the resource.
    HealthCheckMethod string
    Method of the health check. Valid value: GET and HEAD.
    HealthCheckPath string
    Path of health check. Maximum length is 80.
    HealthCheckStatusCodes List<double>
    Return code of confirmed normal. Valid value: 100, 200, 300, 400 and 500.
    Interval double
    Interval of the health check, default value is 5s.
    Realservers List<GaapHttpRuleRealserver>
    An information list of GAAP realserver.
    Scheduler string
    Scheduling policy of the forward rule, default value is rr. Valid value: rr, wrr and lc.
    Sni string
    ServerNameIndication (SNI) is required when the SNI switch is turned on.
    SniSwitch string
    ServerNameIndication (SNI) switch. ON means on and OFF means off.
    Domain string
    Forward domain of the forward rule.
    HealthCheck bool
    Indicates whether health check is enable.
    ListenerId string
    ID of the layer7 listener.
    Path string
    Path of the forward rule. Maximum length is 80.
    RealserverType string
    Type of the realserver. Valid value: IP and DOMAIN.
    ConnectTimeout float64
    Timeout of the health check response, default value is 2s.
    ForwardHost string
    The default value of requested host which is forwarded to the realserver by the listener is default.
    GaapHttpRuleId string
    ID of the resource.
    HealthCheckMethod string
    Method of the health check. Valid value: GET and HEAD.
    HealthCheckPath string
    Path of health check. Maximum length is 80.
    HealthCheckStatusCodes []float64
    Return code of confirmed normal. Valid value: 100, 200, 300, 400 and 500.
    Interval float64
    Interval of the health check, default value is 5s.
    Realservers []GaapHttpRuleRealserverArgs
    An information list of GAAP realserver.
    Scheduler string
    Scheduling policy of the forward rule, default value is rr. Valid value: rr, wrr and lc.
    Sni string
    ServerNameIndication (SNI) is required when the SNI switch is turned on.
    SniSwitch string
    ServerNameIndication (SNI) switch. ON means on and OFF means off.
    domain String
    Forward domain of the forward rule.
    healthCheck Boolean
    Indicates whether health check is enable.
    listenerId String
    ID of the layer7 listener.
    path String
    Path of the forward rule. Maximum length is 80.
    realserverType String
    Type of the realserver. Valid value: IP and DOMAIN.
    connectTimeout Double
    Timeout of the health check response, default value is 2s.
    forwardHost String
    The default value of requested host which is forwarded to the realserver by the listener is default.
    gaapHttpRuleId String
    ID of the resource.
    healthCheckMethod String
    Method of the health check. Valid value: GET and HEAD.
    healthCheckPath String
    Path of health check. Maximum length is 80.
    healthCheckStatusCodes List<Double>
    Return code of confirmed normal. Valid value: 100, 200, 300, 400 and 500.
    interval Double
    Interval of the health check, default value is 5s.
    realservers List<GaapHttpRuleRealserver>
    An information list of GAAP realserver.
    scheduler String
    Scheduling policy of the forward rule, default value is rr. Valid value: rr, wrr and lc.
    sni String
    ServerNameIndication (SNI) is required when the SNI switch is turned on.
    sniSwitch String
    ServerNameIndication (SNI) switch. ON means on and OFF means off.
    domain string
    Forward domain of the forward rule.
    healthCheck boolean
    Indicates whether health check is enable.
    listenerId string
    ID of the layer7 listener.
    path string
    Path of the forward rule. Maximum length is 80.
    realserverType string
    Type of the realserver. Valid value: IP and DOMAIN.
    connectTimeout number
    Timeout of the health check response, default value is 2s.
    forwardHost string
    The default value of requested host which is forwarded to the realserver by the listener is default.
    gaapHttpRuleId string
    ID of the resource.
    healthCheckMethod string
    Method of the health check. Valid value: GET and HEAD.
    healthCheckPath string
    Path of health check. Maximum length is 80.
    healthCheckStatusCodes number[]
    Return code of confirmed normal. Valid value: 100, 200, 300, 400 and 500.
    interval number
    Interval of the health check, default value is 5s.
    realservers GaapHttpRuleRealserver[]
    An information list of GAAP realserver.
    scheduler string
    Scheduling policy of the forward rule, default value is rr. Valid value: rr, wrr and lc.
    sni string
    ServerNameIndication (SNI) is required when the SNI switch is turned on.
    sniSwitch string
    ServerNameIndication (SNI) switch. ON means on and OFF means off.
    domain str
    Forward domain of the forward rule.
    health_check bool
    Indicates whether health check is enable.
    listener_id str
    ID of the layer7 listener.
    path str
    Path of the forward rule. Maximum length is 80.
    realserver_type str
    Type of the realserver. Valid value: IP and DOMAIN.
    connect_timeout float
    Timeout of the health check response, default value is 2s.
    forward_host str
    The default value of requested host which is forwarded to the realserver by the listener is default.
    gaap_http_rule_id str
    ID of the resource.
    health_check_method str
    Method of the health check. Valid value: GET and HEAD.
    health_check_path str
    Path of health check. Maximum length is 80.
    health_check_status_codes Sequence[float]
    Return code of confirmed normal. Valid value: 100, 200, 300, 400 and 500.
    interval float
    Interval of the health check, default value is 5s.
    realservers Sequence[GaapHttpRuleRealserverArgs]
    An information list of GAAP realserver.
    scheduler str
    Scheduling policy of the forward rule, default value is rr. Valid value: rr, wrr and lc.
    sni str
    ServerNameIndication (SNI) is required when the SNI switch is turned on.
    sni_switch str
    ServerNameIndication (SNI) switch. ON means on and OFF means off.
    domain String
    Forward domain of the forward rule.
    healthCheck Boolean
    Indicates whether health check is enable.
    listenerId String
    ID of the layer7 listener.
    path String
    Path of the forward rule. Maximum length is 80.
    realserverType String
    Type of the realserver. Valid value: IP and DOMAIN.
    connectTimeout Number
    Timeout of the health check response, default value is 2s.
    forwardHost String
    The default value of requested host which is forwarded to the realserver by the listener is default.
    gaapHttpRuleId String
    ID of the resource.
    healthCheckMethod String
    Method of the health check. Valid value: GET and HEAD.
    healthCheckPath String
    Path of health check. Maximum length is 80.
    healthCheckStatusCodes List<Number>
    Return code of confirmed normal. Valid value: 100, 200, 300, 400 and 500.
    interval Number
    Interval of the health check, default value is 5s.
    realservers List<Property Map>
    An information list of GAAP realserver.
    scheduler String
    Scheduling policy of the forward rule, default value is rr. Valid value: rr, wrr and lc.
    sni String
    ServerNameIndication (SNI) is required when the SNI switch is turned on.
    sniSwitch String
    ServerNameIndication (SNI) switch. ON means on and OFF means off.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing GaapHttpRule Resource

    Get an existing GaapHttpRule 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?: GaapHttpRuleState, opts?: CustomResourceOptions): GaapHttpRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            connect_timeout: Optional[float] = None,
            domain: Optional[str] = None,
            forward_host: Optional[str] = None,
            gaap_http_rule_id: Optional[str] = None,
            health_check: Optional[bool] = None,
            health_check_method: Optional[str] = None,
            health_check_path: Optional[str] = None,
            health_check_status_codes: Optional[Sequence[float]] = None,
            interval: Optional[float] = None,
            listener_id: Optional[str] = None,
            path: Optional[str] = None,
            realserver_type: Optional[str] = None,
            realservers: Optional[Sequence[GaapHttpRuleRealserverArgs]] = None,
            scheduler: Optional[str] = None,
            sni: Optional[str] = None,
            sni_switch: Optional[str] = None) -> GaapHttpRule
    func GetGaapHttpRule(ctx *Context, name string, id IDInput, state *GaapHttpRuleState, opts ...ResourceOption) (*GaapHttpRule, error)
    public static GaapHttpRule Get(string name, Input<string> id, GaapHttpRuleState? state, CustomResourceOptions? opts = null)
    public static GaapHttpRule get(String name, Output<String> id, GaapHttpRuleState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:GaapHttpRule    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:
    ConnectTimeout double
    Timeout of the health check response, default value is 2s.
    Domain string
    Forward domain of the forward rule.
    ForwardHost string
    The default value of requested host which is forwarded to the realserver by the listener is default.
    GaapHttpRuleId string
    ID of the resource.
    HealthCheck bool
    Indicates whether health check is enable.
    HealthCheckMethod string
    Method of the health check. Valid value: GET and HEAD.
    HealthCheckPath string
    Path of health check. Maximum length is 80.
    HealthCheckStatusCodes List<double>
    Return code of confirmed normal. Valid value: 100, 200, 300, 400 and 500.
    Interval double
    Interval of the health check, default value is 5s.
    ListenerId string
    ID of the layer7 listener.
    Path string
    Path of the forward rule. Maximum length is 80.
    RealserverType string
    Type of the realserver. Valid value: IP and DOMAIN.
    Realservers List<GaapHttpRuleRealserver>
    An information list of GAAP realserver.
    Scheduler string
    Scheduling policy of the forward rule, default value is rr. Valid value: rr, wrr and lc.
    Sni string
    ServerNameIndication (SNI) is required when the SNI switch is turned on.
    SniSwitch string
    ServerNameIndication (SNI) switch. ON means on and OFF means off.
    ConnectTimeout float64
    Timeout of the health check response, default value is 2s.
    Domain string
    Forward domain of the forward rule.
    ForwardHost string
    The default value of requested host which is forwarded to the realserver by the listener is default.
    GaapHttpRuleId string
    ID of the resource.
    HealthCheck bool
    Indicates whether health check is enable.
    HealthCheckMethod string
    Method of the health check. Valid value: GET and HEAD.
    HealthCheckPath string
    Path of health check. Maximum length is 80.
    HealthCheckStatusCodes []float64
    Return code of confirmed normal. Valid value: 100, 200, 300, 400 and 500.
    Interval float64
    Interval of the health check, default value is 5s.
    ListenerId string
    ID of the layer7 listener.
    Path string
    Path of the forward rule. Maximum length is 80.
    RealserverType string
    Type of the realserver. Valid value: IP and DOMAIN.
    Realservers []GaapHttpRuleRealserverArgs
    An information list of GAAP realserver.
    Scheduler string
    Scheduling policy of the forward rule, default value is rr. Valid value: rr, wrr and lc.
    Sni string
    ServerNameIndication (SNI) is required when the SNI switch is turned on.
    SniSwitch string
    ServerNameIndication (SNI) switch. ON means on and OFF means off.
    connectTimeout Double
    Timeout of the health check response, default value is 2s.
    domain String
    Forward domain of the forward rule.
    forwardHost String
    The default value of requested host which is forwarded to the realserver by the listener is default.
    gaapHttpRuleId String
    ID of the resource.
    healthCheck Boolean
    Indicates whether health check is enable.
    healthCheckMethod String
    Method of the health check. Valid value: GET and HEAD.
    healthCheckPath String
    Path of health check. Maximum length is 80.
    healthCheckStatusCodes List<Double>
    Return code of confirmed normal. Valid value: 100, 200, 300, 400 and 500.
    interval Double
    Interval of the health check, default value is 5s.
    listenerId String
    ID of the layer7 listener.
    path String
    Path of the forward rule. Maximum length is 80.
    realserverType String
    Type of the realserver. Valid value: IP and DOMAIN.
    realservers List<GaapHttpRuleRealserver>
    An information list of GAAP realserver.
    scheduler String
    Scheduling policy of the forward rule, default value is rr. Valid value: rr, wrr and lc.
    sni String
    ServerNameIndication (SNI) is required when the SNI switch is turned on.
    sniSwitch String
    ServerNameIndication (SNI) switch. ON means on and OFF means off.
    connectTimeout number
    Timeout of the health check response, default value is 2s.
    domain string
    Forward domain of the forward rule.
    forwardHost string
    The default value of requested host which is forwarded to the realserver by the listener is default.
    gaapHttpRuleId string
    ID of the resource.
    healthCheck boolean
    Indicates whether health check is enable.
    healthCheckMethod string
    Method of the health check. Valid value: GET and HEAD.
    healthCheckPath string
    Path of health check. Maximum length is 80.
    healthCheckStatusCodes number[]
    Return code of confirmed normal. Valid value: 100, 200, 300, 400 and 500.
    interval number
    Interval of the health check, default value is 5s.
    listenerId string
    ID of the layer7 listener.
    path string
    Path of the forward rule. Maximum length is 80.
    realserverType string
    Type of the realserver. Valid value: IP and DOMAIN.
    realservers GaapHttpRuleRealserver[]
    An information list of GAAP realserver.
    scheduler string
    Scheduling policy of the forward rule, default value is rr. Valid value: rr, wrr and lc.
    sni string
    ServerNameIndication (SNI) is required when the SNI switch is turned on.
    sniSwitch string
    ServerNameIndication (SNI) switch. ON means on and OFF means off.
    connect_timeout float
    Timeout of the health check response, default value is 2s.
    domain str
    Forward domain of the forward rule.
    forward_host str
    The default value of requested host which is forwarded to the realserver by the listener is default.
    gaap_http_rule_id str
    ID of the resource.
    health_check bool
    Indicates whether health check is enable.
    health_check_method str
    Method of the health check. Valid value: GET and HEAD.
    health_check_path str
    Path of health check. Maximum length is 80.
    health_check_status_codes Sequence[float]
    Return code of confirmed normal. Valid value: 100, 200, 300, 400 and 500.
    interval float
    Interval of the health check, default value is 5s.
    listener_id str
    ID of the layer7 listener.
    path str
    Path of the forward rule. Maximum length is 80.
    realserver_type str
    Type of the realserver. Valid value: IP and DOMAIN.
    realservers Sequence[GaapHttpRuleRealserverArgs]
    An information list of GAAP realserver.
    scheduler str
    Scheduling policy of the forward rule, default value is rr. Valid value: rr, wrr and lc.
    sni str
    ServerNameIndication (SNI) is required when the SNI switch is turned on.
    sni_switch str
    ServerNameIndication (SNI) switch. ON means on and OFF means off.
    connectTimeout Number
    Timeout of the health check response, default value is 2s.
    domain String
    Forward domain of the forward rule.
    forwardHost String
    The default value of requested host which is forwarded to the realserver by the listener is default.
    gaapHttpRuleId String
    ID of the resource.
    healthCheck Boolean
    Indicates whether health check is enable.
    healthCheckMethod String
    Method of the health check. Valid value: GET and HEAD.
    healthCheckPath String
    Path of health check. Maximum length is 80.
    healthCheckStatusCodes List<Number>
    Return code of confirmed normal. Valid value: 100, 200, 300, 400 and 500.
    interval Number
    Interval of the health check, default value is 5s.
    listenerId String
    ID of the layer7 listener.
    path String
    Path of the forward rule. Maximum length is 80.
    realserverType String
    Type of the realserver. Valid value: IP and DOMAIN.
    realservers List<Property Map>
    An information list of GAAP realserver.
    scheduler String
    Scheduling policy of the forward rule, default value is rr. Valid value: rr, wrr and lc.
    sni String
    ServerNameIndication (SNI) is required when the SNI switch is turned on.
    sniSwitch String
    ServerNameIndication (SNI) switch. ON means on and OFF means off.

    Supporting Types

    GaapHttpRuleRealserver, GaapHttpRuleRealserverArgs

    Id string
    ID of the GAAP realserver.
    Ip string
    IP of the GAAP realserver.
    Port double
    Port of the GAAP realserver.
    Weight double
    Scheduling weight, default value is 1. Valid value ranges: (1~100).
    Id string
    ID of the GAAP realserver.
    Ip string
    IP of the GAAP realserver.
    Port float64
    Port of the GAAP realserver.
    Weight float64
    Scheduling weight, default value is 1. Valid value ranges: (1~100).
    id String
    ID of the GAAP realserver.
    ip String
    IP of the GAAP realserver.
    port Double
    Port of the GAAP realserver.
    weight Double
    Scheduling weight, default value is 1. Valid value ranges: (1~100).
    id string
    ID of the GAAP realserver.
    ip string
    IP of the GAAP realserver.
    port number
    Port of the GAAP realserver.
    weight number
    Scheduling weight, default value is 1. Valid value ranges: (1~100).
    id str
    ID of the GAAP realserver.
    ip str
    IP of the GAAP realserver.
    port float
    Port of the GAAP realserver.
    weight float
    Scheduling weight, default value is 1. Valid value ranges: (1~100).
    id String
    ID of the GAAP realserver.
    ip String
    IP of the GAAP realserver.
    port Number
    Port of the GAAP realserver.
    weight Number
    Scheduling weight, default value is 1. Valid value ranges: (1~100).

    Import

    GAAP http rule can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/gaapHttpRule:GaapHttpRule  tencentcloud_gaap_http_rule.foo rule-3bsuu01r
    

    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
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack