tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
tencentcloud.getGaapHttpRules
Start a Neo task
Explain and create a tencentcloud.getGaapHttpRules resource
tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
Use this data source to query forward rule of layer7 listeners.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const fooGaapProxy = new tencentcloud.GaapProxy("foo", {
name: "ci-test-gaap-proxy",
bandwidth: 10,
concurrent: 2,
accessRegion: "SouthChina",
realserverRegion: "NorthChina",
});
const fooGaapLayer7Listener = new tencentcloud.GaapLayer7Listener("foo", {
protocol: "HTTP",
name: "ci-test-gaap-l7-listener",
port: 80,
proxyId: fooGaapProxy.gaapProxyId,
});
const fooGaapRealserver = new tencentcloud.GaapRealserver("foo", {
ip: "1.1.1.1",
name: "ci-test-gaap-realserver",
});
const fooGaapHttpRule = new tencentcloud.GaapHttpRule("foo", {
listenerId: fooGaapLayer7Listener.gaapLayer7ListenerId,
domain: "www.qq.com",
path: "/",
realserverType: "IP",
healthCheck: true,
realservers: [{
id: fooGaapRealserver.gaapRealserverId,
ip: fooGaapRealserver.ip,
port: 80,
}],
});
const foo = tencentcloud.getGaapHttpRulesOutput({
listenerId: fooGaapLayer7Listener.gaapLayer7ListenerId,
domain: fooGaapHttpRule.domain,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
foo_gaap_proxy = tencentcloud.GaapProxy("foo",
name="ci-test-gaap-proxy",
bandwidth=10,
concurrent=2,
access_region="SouthChina",
realserver_region="NorthChina")
foo_gaap_layer7_listener = tencentcloud.GaapLayer7Listener("foo",
protocol="HTTP",
name="ci-test-gaap-l7-listener",
port=80,
proxy_id=foo_gaap_proxy.gaap_proxy_id)
foo_gaap_realserver = tencentcloud.GaapRealserver("foo",
ip="1.1.1.1",
name="ci-test-gaap-realserver")
foo_gaap_http_rule = tencentcloud.GaapHttpRule("foo",
listener_id=foo_gaap_layer7_listener.gaap_layer7_listener_id,
domain="www.qq.com",
path="/",
realserver_type="IP",
health_check=True,
realservers=[{
"id": foo_gaap_realserver.gaap_realserver_id,
"ip": foo_gaap_realserver.ip,
"port": 80,
}])
foo = tencentcloud.get_gaap_http_rules_output(listener_id=foo_gaap_layer7_listener.gaap_layer7_listener_id,
domain=foo_gaap_http_rule.domain)
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, "foo", &tencentcloud.GaapProxyArgs{
Name: pulumi.String("ci-test-gaap-proxy"),
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, "foo", &tencentcloud.GaapLayer7ListenerArgs{
Protocol: pulumi.String("HTTP"),
Name: pulumi.String("ci-test-gaap-l7-listener"),
Port: pulumi.Float64(80),
ProxyId: fooGaapProxy.GaapProxyId,
})
if err != nil {
return err
}
fooGaapRealserver, err := tencentcloud.NewGaapRealserver(ctx, "foo", &tencentcloud.GaapRealserverArgs{
Ip: pulumi.String("1.1.1.1"),
Name: pulumi.String("ci-test-gaap-realserver"),
})
if err != nil {
return err
}
fooGaapHttpRule, err := tencentcloud.NewGaapHttpRule(ctx, "foo", &tencentcloud.GaapHttpRuleArgs{
ListenerId: fooGaapLayer7Listener.GaapLayer7ListenerId,
Domain: pulumi.String("www.qq.com"),
Path: pulumi.String("/"),
RealserverType: pulumi.String("IP"),
HealthCheck: pulumi.Bool(true),
Realservers: tencentcloud.GaapHttpRuleRealserverArray{
&tencentcloud.GaapHttpRuleRealserverArgs{
Id: fooGaapRealserver.GaapRealserverId,
Ip: fooGaapRealserver.Ip,
Port: pulumi.Float64(80),
},
},
})
if err != nil {
return err
}
_ = tencentcloud.GetGaapHttpRulesOutput(ctx, tencentcloud.GetGaapHttpRulesOutputArgs{
ListenerId: fooGaapLayer7Listener.GaapLayer7ListenerId,
Domain: fooGaapHttpRule.Domain,
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var fooGaapProxy = new Tencentcloud.GaapProxy("foo", new()
{
Name = "ci-test-gaap-proxy",
Bandwidth = 10,
Concurrent = 2,
AccessRegion = "SouthChina",
RealserverRegion = "NorthChina",
});
var fooGaapLayer7Listener = new Tencentcloud.GaapLayer7Listener("foo", new()
{
Protocol = "HTTP",
Name = "ci-test-gaap-l7-listener",
Port = 80,
ProxyId = fooGaapProxy.GaapProxyId,
});
var fooGaapRealserver = new Tencentcloud.GaapRealserver("foo", new()
{
Ip = "1.1.1.1",
Name = "ci-test-gaap-realserver",
});
var fooGaapHttpRule = new Tencentcloud.GaapHttpRule("foo", new()
{
ListenerId = fooGaapLayer7Listener.GaapLayer7ListenerId,
Domain = "www.qq.com",
Path = "/",
RealserverType = "IP",
HealthCheck = true,
Realservers = new[]
{
new Tencentcloud.Inputs.GaapHttpRuleRealserverArgs
{
Id = fooGaapRealserver.GaapRealserverId,
Ip = fooGaapRealserver.Ip,
Port = 80,
},
},
});
var foo = Tencentcloud.GetGaapHttpRules.Invoke(new()
{
ListenerId = fooGaapLayer7Listener.GaapLayer7ListenerId,
Domain = fooGaapHttpRule.Domain,
});
});
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.GaapHttpRule;
import com.pulumi.tencentcloud.GaapHttpRuleArgs;
import com.pulumi.tencentcloud.inputs.GaapHttpRuleRealserverArgs;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetGaapHttpRulesArgs;
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()
.name("ci-test-gaap-proxy")
.bandwidth(10.0)
.concurrent(2.0)
.accessRegion("SouthChina")
.realserverRegion("NorthChina")
.build());
var fooGaapLayer7Listener = new GaapLayer7Listener("fooGaapLayer7Listener", GaapLayer7ListenerArgs.builder()
.protocol("HTTP")
.name("ci-test-gaap-l7-listener")
.port(80.0)
.proxyId(fooGaapProxy.gaapProxyId())
.build());
var fooGaapRealserver = new GaapRealserver("fooGaapRealserver", GaapRealserverArgs.builder()
.ip("1.1.1.1")
.name("ci-test-gaap-realserver")
.build());
var fooGaapHttpRule = new GaapHttpRule("fooGaapHttpRule", GaapHttpRuleArgs.builder()
.listenerId(fooGaapLayer7Listener.gaapLayer7ListenerId())
.domain("www.qq.com")
.path("/")
.realserverType("IP")
.healthCheck(true)
.realservers(GaapHttpRuleRealserverArgs.builder()
.id(fooGaapRealserver.gaapRealserverId())
.ip(fooGaapRealserver.ip())
.port(80.0)
.build())
.build());
final var foo = TencentcloudFunctions.getGaapHttpRules(GetGaapHttpRulesArgs.builder()
.listenerId(fooGaapLayer7Listener.gaapLayer7ListenerId())
.domain(fooGaapHttpRule.domain())
.build());
}
}
resources:
fooGaapProxy:
type: tencentcloud:GaapProxy
name: foo
properties:
name: ci-test-gaap-proxy
bandwidth: 10
concurrent: 2
accessRegion: SouthChina
realserverRegion: NorthChina
fooGaapLayer7Listener:
type: tencentcloud:GaapLayer7Listener
name: foo
properties:
protocol: HTTP
name: ci-test-gaap-l7-listener
port: 80
proxyId: ${fooGaapProxy.gaapProxyId}
fooGaapRealserver:
type: tencentcloud:GaapRealserver
name: foo
properties:
ip: 1.1.1.1
name: ci-test-gaap-realserver
fooGaapHttpRule:
type: tencentcloud:GaapHttpRule
name: foo
properties:
listenerId: ${fooGaapLayer7Listener.gaapLayer7ListenerId}
domain: www.qq.com
path: /
realserverType: IP
healthCheck: true
realservers:
- id: ${fooGaapRealserver.gaapRealserverId}
ip: ${fooGaapRealserver.ip}
port: 80
variables:
foo:
fn::invoke:
function: tencentcloud:getGaapHttpRules
arguments:
listenerId: ${fooGaapLayer7Listener.gaapLayer7ListenerId}
domain: ${fooGaapHttpRule.domain}
Using getGaapHttpRules
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getGaapHttpRules(args: GetGaapHttpRulesArgs, opts?: InvokeOptions): Promise<GetGaapHttpRulesResult>
function getGaapHttpRulesOutput(args: GetGaapHttpRulesOutputArgs, opts?: InvokeOptions): Output<GetGaapHttpRulesResult>def get_gaap_http_rules(domain: Optional[str] = None,
forward_host: Optional[str] = None,
id: Optional[str] = None,
listener_id: Optional[str] = None,
path: Optional[str] = None,
result_output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetGaapHttpRulesResult
def get_gaap_http_rules_output(domain: Optional[pulumi.Input[str]] = None,
forward_host: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
listener_id: Optional[pulumi.Input[str]] = None,
path: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetGaapHttpRulesResult]func GetGaapHttpRules(ctx *Context, args *GetGaapHttpRulesArgs, opts ...InvokeOption) (*GetGaapHttpRulesResult, error)
func GetGaapHttpRulesOutput(ctx *Context, args *GetGaapHttpRulesOutputArgs, opts ...InvokeOption) GetGaapHttpRulesResultOutput> Note: This function is named GetGaapHttpRules in the Go SDK.
public static class GetGaapHttpRules
{
public static Task<GetGaapHttpRulesResult> InvokeAsync(GetGaapHttpRulesArgs args, InvokeOptions? opts = null)
public static Output<GetGaapHttpRulesResult> Invoke(GetGaapHttpRulesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetGaapHttpRulesResult> getGaapHttpRules(GetGaapHttpRulesArgs args, InvokeOptions options)
public static Output<GetGaapHttpRulesResult> getGaapHttpRules(GetGaapHttpRulesArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getGaapHttpRules:getGaapHttpRules
arguments:
# arguments dictionaryThe following arguments are supported:
- Listener
Id string - ID of the layer7 listener to be queried.
- Domain string
- Forward domain of the layer7 listener to be queried.
- Forward
Host string - Requested host which is forwarded to the realserver by the listener to be queried.
- Id string
- ID of the GAAP realserver.
- Path string
- Path of the forward rule to be queried.
- Result
Output stringFile - Used to save results.
- Listener
Id string - ID of the layer7 listener to be queried.
- Domain string
- Forward domain of the layer7 listener to be queried.
- Forward
Host string - Requested host which is forwarded to the realserver by the listener to be queried.
- Id string
- ID of the GAAP realserver.
- Path string
- Path of the forward rule to be queried.
- Result
Output stringFile - Used to save results.
- listener
Id String - ID of the layer7 listener to be queried.
- domain String
- Forward domain of the layer7 listener to be queried.
- forward
Host String - Requested host which is forwarded to the realserver by the listener to be queried.
- id String
- ID of the GAAP realserver.
- path String
- Path of the forward rule to be queried.
- result
Output StringFile - Used to save results.
- listener
Id string - ID of the layer7 listener to be queried.
- domain string
- Forward domain of the layer7 listener to be queried.
- forward
Host string - Requested host which is forwarded to the realserver by the listener to be queried.
- id string
- ID of the GAAP realserver.
- path string
- Path of the forward rule to be queried.
- result
Output stringFile - Used to save results.
- listener_
id str - ID of the layer7 listener to be queried.
- domain str
- Forward domain of the layer7 listener to be queried.
- forward_
host str - Requested host which is forwarded to the realserver by the listener to be queried.
- id str
- ID of the GAAP realserver.
- path str
- Path of the forward rule to be queried.
- result_
output_ strfile - Used to save results.
- listener
Id String - ID of the layer7 listener to be queried.
- domain String
- Forward domain of the layer7 listener to be queried.
- forward
Host String - Requested host which is forwarded to the realserver by the listener to be queried.
- id String
- ID of the GAAP realserver.
- path String
- Path of the forward rule to be queried.
- result
Output StringFile - Used to save results.
getGaapHttpRules Result
The following output properties are available:
- Id string
- ID of the GAAP realserver.
- Listener
Id string - ID of the layer7 listener.
- Rules
List<Get
Gaap Http Rules Rule> - An information list of forward rule of the layer7 listeners. Each element contains the following attributes:
- Domain string
- Domain of the GAAP realserver.
- Forward
Host string - Requested host which is forwarded to the realserver by the listener.
- Path string
- Path of the forward rule.
- Result
Output stringFile
- Id string
- ID of the GAAP realserver.
- Listener
Id string - ID of the layer7 listener.
- Rules
[]Get
Gaap Http Rules Rule - An information list of forward rule of the layer7 listeners. Each element contains the following attributes:
- Domain string
- Domain of the GAAP realserver.
- Forward
Host string - Requested host which is forwarded to the realserver by the listener.
- Path string
- Path of the forward rule.
- Result
Output stringFile
- id String
- ID of the GAAP realserver.
- listener
Id String - ID of the layer7 listener.
- rules
List<Get
Gaap Http Rules Rule> - An information list of forward rule of the layer7 listeners. Each element contains the following attributes:
- domain String
- Domain of the GAAP realserver.
- forward
Host String - Requested host which is forwarded to the realserver by the listener.
- path String
- Path of the forward rule.
- result
Output StringFile
- id string
- ID of the GAAP realserver.
- listener
Id string - ID of the layer7 listener.
- rules
Get
Gaap Http Rules Rule[] - An information list of forward rule of the layer7 listeners. Each element contains the following attributes:
- domain string
- Domain of the GAAP realserver.
- forward
Host string - Requested host which is forwarded to the realserver by the listener.
- path string
- Path of the forward rule.
- result
Output stringFile
- id str
- ID of the GAAP realserver.
- listener_
id str - ID of the layer7 listener.
- rules
Sequence[Get
Gaap Http Rules Rule] - An information list of forward rule of the layer7 listeners. Each element contains the following attributes:
- domain str
- Domain of the GAAP realserver.
- forward_
host str - Requested host which is forwarded to the realserver by the listener.
- path str
- Path of the forward rule.
- result_
output_ strfile
- id String
- ID of the GAAP realserver.
- listener
Id String - ID of the layer7 listener.
- rules List<Property Map>
- An information list of forward rule of the layer7 listeners. Each element contains the following attributes:
- domain String
- Domain of the GAAP realserver.
- forward
Host String - Requested host which is forwarded to the realserver by the listener.
- path String
- Path of the forward rule.
- result
Output StringFile
Supporting Types
GetGaapHttpRulesRule
- Connect
Timeout double - Timeout of the health check response.
- Domain string
- Forward domain of the layer7 listener to be queried.
- Forward
Host string - Requested host which is forwarded to the realserver by the listener to be queried.
- Health
Check bool - Indicates whether health check is enable.
- Health
Check stringMethod - Method of the health check.
- Health
Check stringPath - Path of health check.
- Health
Check List<double>Status Codes - Return code of confirmed normal.
- Id string
- ID of the GAAP realserver.
- Interval double
- Interval of the health check.
- Listener
Id string - ID of the layer7 listener to be queried.
- Path string
- Path of the forward rule to be queried.
- Realserver
Type string - Type of the realserver.
- Realservers
List<Get
Gaap Http Rules Rule Realserver> - An information list of GAAP realserver. Each element contains the following attributes:
- Scheduler string
- Scheduling policy of the forward rule.
- Sni string
- ServerNameIndication (SNI).
- Sni
Switch string - ServerNameIndication (SNI) switch.
- Connect
Timeout float64 - Timeout of the health check response.
- Domain string
- Forward domain of the layer7 listener to be queried.
- Forward
Host string - Requested host which is forwarded to the realserver by the listener to be queried.
- Health
Check bool - Indicates whether health check is enable.
- Health
Check stringMethod - Method of the health check.
- Health
Check stringPath - Path of health check.
- Health
Check []float64Status Codes - Return code of confirmed normal.
- Id string
- ID of the GAAP realserver.
- Interval float64
- Interval of the health check.
- Listener
Id string - ID of the layer7 listener to be queried.
- Path string
- Path of the forward rule to be queried.
- Realserver
Type string - Type of the realserver.
- Realservers
[]Get
Gaap Http Rules Rule Realserver - An information list of GAAP realserver. Each element contains the following attributes:
- Scheduler string
- Scheduling policy of the forward rule.
- Sni string
- ServerNameIndication (SNI).
- Sni
Switch string - ServerNameIndication (SNI) switch.
- connect
Timeout Double - Timeout of the health check response.
- domain String
- Forward domain of the layer7 listener to be queried.
- forward
Host String - Requested host which is forwarded to the realserver by the listener to be queried.
- health
Check Boolean - Indicates whether health check is enable.
- health
Check StringMethod - Method of the health check.
- health
Check StringPath - Path of health check.
- health
Check List<Double>Status Codes - Return code of confirmed normal.
- id String
- ID of the GAAP realserver.
- interval Double
- Interval of the health check.
- listener
Id String - ID of the layer7 listener to be queried.
- path String
- Path of the forward rule to be queried.
- realserver
Type String - Type of the realserver.
- realservers
List<Get
Gaap Http Rules Rule Realserver> - An information list of GAAP realserver. Each element contains the following attributes:
- scheduler String
- Scheduling policy of the forward rule.
- sni String
- ServerNameIndication (SNI).
- sni
Switch String - ServerNameIndication (SNI) switch.
- connect
Timeout number - Timeout of the health check response.
- domain string
- Forward domain of the layer7 listener to be queried.
- forward
Host string - Requested host which is forwarded to the realserver by the listener to be queried.
- health
Check boolean - Indicates whether health check is enable.
- health
Check stringMethod - Method of the health check.
- health
Check stringPath - Path of health check.
- health
Check number[]Status Codes - Return code of confirmed normal.
- id string
- ID of the GAAP realserver.
- interval number
- Interval of the health check.
- listener
Id string - ID of the layer7 listener to be queried.
- path string
- Path of the forward rule to be queried.
- realserver
Type string - Type of the realserver.
- realservers
Get
Gaap Http Rules Rule Realserver[] - An information list of GAAP realserver. Each element contains the following attributes:
- scheduler string
- Scheduling policy of the forward rule.
- sni string
- ServerNameIndication (SNI).
- sni
Switch string - ServerNameIndication (SNI) switch.
- connect_
timeout float - Timeout of the health check response.
- domain str
- Forward domain of the layer7 listener to be queried.
- forward_
host str - Requested host which is forwarded to the realserver by the listener to be queried.
- health_
check bool - Indicates whether health check is enable.
- health_
check_ strmethod - Method of the health check.
- health_
check_ strpath - Path of health check.
- health_
check_ Sequence[float]status_ codes - Return code of confirmed normal.
- id str
- ID of the GAAP realserver.
- interval float
- Interval of the health check.
- listener_
id str - ID of the layer7 listener to be queried.
- path str
- Path of the forward rule to be queried.
- realserver_
type str - Type of the realserver.
- realservers
Sequence[Get
Gaap Http Rules Rule Realserver] - An information list of GAAP realserver. Each element contains the following attributes:
- scheduler str
- Scheduling policy of the forward rule.
- sni str
- ServerNameIndication (SNI).
- sni_
switch str - ServerNameIndication (SNI) switch.
- connect
Timeout Number - Timeout of the health check response.
- domain String
- Forward domain of the layer7 listener to be queried.
- forward
Host String - Requested host which is forwarded to the realserver by the listener to be queried.
- health
Check Boolean - Indicates whether health check is enable.
- health
Check StringMethod - Method of the health check.
- health
Check StringPath - Path of health check.
- health
Check List<Number>Status Codes - Return code of confirmed normal.
- id String
- ID of the GAAP realserver.
- interval Number
- Interval of the health check.
- listener
Id String - ID of the layer7 listener to be queried.
- path String
- Path of the forward rule to be queried.
- realserver
Type String - Type of the realserver.
- realservers List<Property Map>
- An information list of GAAP realserver. Each element contains the following attributes:
- scheduler String
- Scheduling policy of the forward rule.
- sni String
- ServerNameIndication (SNI).
- sni
Switch String - ServerNameIndication (SNI) switch.
GetGaapHttpRulesRuleRealserver
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
