tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.getGaapHttpRules
Explore with Pulumi AI
tencentcloud 1.81.189 published on Wednesday, Apr 30, 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("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 fooGaapHttpRule = new tencentcloud.GaapHttpRule("fooGaapHttpRule", {
listenerId: fooGaapLayer7Listener.gaapLayer7ListenerId,
domain: "www.qq.com",
path: "/",
realserverType: "IP",
healthCheck: true,
realservers: [{
id: fooGaapRealserver.gaapRealserverId,
ip: fooGaapRealserver.ip,
port: 80,
}],
});
const fooGaapHttpRules = tencentcloud.getGaapHttpRulesOutput({
listenerId: fooGaapLayer7Listener.gaapLayer7ListenerId,
domain: fooGaapHttpRule.domain,
});
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")
foo_gaap_http_rule = tencentcloud.GaapHttpRule("fooGaapHttpRule",
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_gaap_http_rules = 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, "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
}
fooGaapHttpRule, err := tencentcloud.NewGaapHttpRule(ctx, "fooGaapHttpRule", &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("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 fooGaapHttpRule = new Tencentcloud.GaapHttpRule("fooGaapHttpRule", 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 fooGaapHttpRules = 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()
.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 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)
.build())
.build());
final var fooGaapHttpRules = TencentcloudFunctions.getGaapHttpRules(GetGaapHttpRulesArgs.builder()
.listenerId(fooGaapLayer7Listener.gaapLayer7ListenerId())
.domain(fooGaapHttpRule.domain())
.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
fooGaapHttpRule:
type: tencentcloud:GaapHttpRule
properties:
listenerId: ${fooGaapLayer7Listener.gaapLayer7ListenerId}
domain: www.qq.com
path: /
realserverType: IP
healthCheck: true
realservers:
- id: ${fooGaapRealserver.gaapRealserverId}
ip: ${fooGaapRealserver.ip}
port: 80
variables:
fooGaapHttpRules:
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 dictionary
The 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
tencentcloud
Terraform Provider.
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack