tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
tencentcloud.getGaapLayer4Listeners
Start a Neo task
Explain and create a tencentcloud.getGaapLayer4Listeners resource
tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
Use this data source to query gaap layer4 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 fooGaapRealserver = new tencentcloud.GaapRealserver("foo", {
ip: "1.1.1.1",
name: "ci-test-gaap-realserver",
});
const fooGaapLayer4Listener = new tencentcloud.GaapLayer4Listener("foo", {
protocol: "TCP",
name: "ci-test-gaap-4-listener",
port: 80,
realserverType: "IP",
proxyId: fooGaapProxy.gaapProxyId,
healthCheck: true,
interval: 5,
connectTimeout: 2,
realserverBindSets: [{
id: fooGaapRealserver.gaapRealserverId,
ip: fooGaapRealserver.ip,
port: 80,
}],
});
const foo = tencentcloud.getGaapLayer4ListenersOutput({
protocol: "TCP",
proxyId: fooGaapProxy.gaapProxyId,
listenerId: fooGaapLayer4Listener.gaapLayer4ListenerId,
});
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_realserver = tencentcloud.GaapRealserver("foo",
ip="1.1.1.1",
name="ci-test-gaap-realserver")
foo_gaap_layer4_listener = tencentcloud.GaapLayer4Listener("foo",
protocol="TCP",
name="ci-test-gaap-4-listener",
port=80,
realserver_type="IP",
proxy_id=foo_gaap_proxy.gaap_proxy_id,
health_check=True,
interval=5,
connect_timeout=2,
realserver_bind_sets=[{
"id": foo_gaap_realserver.gaap_realserver_id,
"ip": foo_gaap_realserver.ip,
"port": 80,
}])
foo = tencentcloud.get_gaap_layer4_listeners_output(protocol="TCP",
proxy_id=foo_gaap_proxy.gaap_proxy_id,
listener_id=foo_gaap_layer4_listener.gaap_layer4_listener_id)
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
}
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
}
fooGaapLayer4Listener, err := tencentcloud.NewGaapLayer4Listener(ctx, "foo", &tencentcloud.GaapLayer4ListenerArgs{
Protocol: pulumi.String("TCP"),
Name: pulumi.String("ci-test-gaap-4-listener"),
Port: pulumi.Float64(80),
RealserverType: pulumi.String("IP"),
ProxyId: fooGaapProxy.GaapProxyId,
HealthCheck: pulumi.Bool(true),
Interval: pulumi.Float64(5),
ConnectTimeout: pulumi.Float64(2),
RealserverBindSets: tencentcloud.GaapLayer4ListenerRealserverBindSetArray{
&tencentcloud.GaapLayer4ListenerRealserverBindSetArgs{
Id: fooGaapRealserver.GaapRealserverId,
Ip: fooGaapRealserver.Ip,
Port: pulumi.Float64(80),
},
},
})
if err != nil {
return err
}
_ = tencentcloud.GetGaapLayer4ListenersOutput(ctx, tencentcloud.GetGaapLayer4ListenersOutputArgs{
Protocol: pulumi.String("TCP"),
ProxyId: fooGaapProxy.GaapProxyId,
ListenerId: fooGaapLayer4Listener.GaapLayer4ListenerId,
}, 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 fooGaapRealserver = new Tencentcloud.GaapRealserver("foo", new()
{
Ip = "1.1.1.1",
Name = "ci-test-gaap-realserver",
});
var fooGaapLayer4Listener = new Tencentcloud.GaapLayer4Listener("foo", new()
{
Protocol = "TCP",
Name = "ci-test-gaap-4-listener",
Port = 80,
RealserverType = "IP",
ProxyId = fooGaapProxy.GaapProxyId,
HealthCheck = true,
Interval = 5,
ConnectTimeout = 2,
RealserverBindSets = new[]
{
new Tencentcloud.Inputs.GaapLayer4ListenerRealserverBindSetArgs
{
Id = fooGaapRealserver.GaapRealserverId,
Ip = fooGaapRealserver.Ip,
Port = 80,
},
},
});
var foo = Tencentcloud.GetGaapLayer4Listeners.Invoke(new()
{
Protocol = "TCP",
ProxyId = fooGaapProxy.GaapProxyId,
ListenerId = fooGaapLayer4Listener.GaapLayer4ListenerId,
});
});
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.GaapRealserver;
import com.pulumi.tencentcloud.GaapRealserverArgs;
import com.pulumi.tencentcloud.GaapLayer4Listener;
import com.pulumi.tencentcloud.GaapLayer4ListenerArgs;
import com.pulumi.tencentcloud.inputs.GaapLayer4ListenerRealserverBindSetArgs;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetGaapLayer4ListenersArgs;
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 fooGaapRealserver = new GaapRealserver("fooGaapRealserver", GaapRealserverArgs.builder()
.ip("1.1.1.1")
.name("ci-test-gaap-realserver")
.build());
var fooGaapLayer4Listener = new GaapLayer4Listener("fooGaapLayer4Listener", GaapLayer4ListenerArgs.builder()
.protocol("TCP")
.name("ci-test-gaap-4-listener")
.port(80.0)
.realserverType("IP")
.proxyId(fooGaapProxy.gaapProxyId())
.healthCheck(true)
.interval(5.0)
.connectTimeout(2.0)
.realserverBindSets(GaapLayer4ListenerRealserverBindSetArgs.builder()
.id(fooGaapRealserver.gaapRealserverId())
.ip(fooGaapRealserver.ip())
.port(80.0)
.build())
.build());
final var foo = TencentcloudFunctions.getGaapLayer4Listeners(GetGaapLayer4ListenersArgs.builder()
.protocol("TCP")
.proxyId(fooGaapProxy.gaapProxyId())
.listenerId(fooGaapLayer4Listener.gaapLayer4ListenerId())
.build());
}
}
resources:
fooGaapProxy:
type: tencentcloud:GaapProxy
name: foo
properties:
name: ci-test-gaap-proxy
bandwidth: 10
concurrent: 2
accessRegion: SouthChina
realserverRegion: NorthChina
fooGaapRealserver:
type: tencentcloud:GaapRealserver
name: foo
properties:
ip: 1.1.1.1
name: ci-test-gaap-realserver
fooGaapLayer4Listener:
type: tencentcloud:GaapLayer4Listener
name: foo
properties:
protocol: TCP
name: ci-test-gaap-4-listener
port: 80
realserverType: IP
proxyId: ${fooGaapProxy.gaapProxyId}
healthCheck: true
interval: 5
connectTimeout: 2
realserverBindSets:
- id: ${fooGaapRealserver.gaapRealserverId}
ip: ${fooGaapRealserver.ip}
port: 80
variables:
foo:
fn::invoke:
function: tencentcloud:getGaapLayer4Listeners
arguments:
protocol: TCP
proxyId: ${fooGaapProxy.gaapProxyId}
listenerId: ${fooGaapLayer4Listener.gaapLayer4ListenerId}
Using getGaapLayer4Listeners
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 getGaapLayer4Listeners(args: GetGaapLayer4ListenersArgs, opts?: InvokeOptions): Promise<GetGaapLayer4ListenersResult>
function getGaapLayer4ListenersOutput(args: GetGaapLayer4ListenersOutputArgs, opts?: InvokeOptions): Output<GetGaapLayer4ListenersResult>def get_gaap_layer4_listeners(id: Optional[str] = None,
listener_id: Optional[str] = None,
listener_name: Optional[str] = None,
port: Optional[float] = None,
protocol: Optional[str] = None,
proxy_id: Optional[str] = None,
result_output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetGaapLayer4ListenersResult
def get_gaap_layer4_listeners_output(id: Optional[pulumi.Input[str]] = None,
listener_id: Optional[pulumi.Input[str]] = None,
listener_name: Optional[pulumi.Input[str]] = None,
port: Optional[pulumi.Input[float]] = None,
protocol: Optional[pulumi.Input[str]] = None,
proxy_id: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetGaapLayer4ListenersResult]func GetGaapLayer4Listeners(ctx *Context, args *GetGaapLayer4ListenersArgs, opts ...InvokeOption) (*GetGaapLayer4ListenersResult, error)
func GetGaapLayer4ListenersOutput(ctx *Context, args *GetGaapLayer4ListenersOutputArgs, opts ...InvokeOption) GetGaapLayer4ListenersResultOutput> Note: This function is named GetGaapLayer4Listeners in the Go SDK.
public static class GetGaapLayer4Listeners
{
public static Task<GetGaapLayer4ListenersResult> InvokeAsync(GetGaapLayer4ListenersArgs args, InvokeOptions? opts = null)
public static Output<GetGaapLayer4ListenersResult> Invoke(GetGaapLayer4ListenersInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetGaapLayer4ListenersResult> getGaapLayer4Listeners(GetGaapLayer4ListenersArgs args, InvokeOptions options)
public static Output<GetGaapLayer4ListenersResult> getGaapLayer4Listeners(GetGaapLayer4ListenersArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getGaapLayer4Listeners:getGaapLayer4Listeners
arguments:
# arguments dictionaryThe following arguments are supported:
- Protocol string
- Protocol of the layer4 listener to be queried. Valid values:
TCPandUDP. - Id string
- ID of the layer4 listener.
- Listener
Id string - ID of the layer4 listener to be queried.
- Listener
Name string - Name of the layer4 listener to be queried.
- Port double
- Port of the layer4 listener to be queried.
- Proxy
Id string - ID of the GAAP proxy to be queried.
- Result
Output stringFile - Used to save results.
- Protocol string
- Protocol of the layer4 listener to be queried. Valid values:
TCPandUDP. - Id string
- ID of the layer4 listener.
- Listener
Id string - ID of the layer4 listener to be queried.
- Listener
Name string - Name of the layer4 listener to be queried.
- Port float64
- Port of the layer4 listener to be queried.
- Proxy
Id string - ID of the GAAP proxy to be queried.
- Result
Output stringFile - Used to save results.
- protocol String
- Protocol of the layer4 listener to be queried. Valid values:
TCPandUDP. - id String
- ID of the layer4 listener.
- listener
Id String - ID of the layer4 listener to be queried.
- listener
Name String - Name of the layer4 listener to be queried.
- port Double
- Port of the layer4 listener to be queried.
- proxy
Id String - ID of the GAAP proxy to be queried.
- result
Output StringFile - Used to save results.
- protocol string
- Protocol of the layer4 listener to be queried. Valid values:
TCPandUDP. - id string
- ID of the layer4 listener.
- listener
Id string - ID of the layer4 listener to be queried.
- listener
Name string - Name of the layer4 listener to be queried.
- port number
- Port of the layer4 listener to be queried.
- proxy
Id string - ID of the GAAP proxy to be queried.
- result
Output stringFile - Used to save results.
- protocol str
- Protocol of the layer4 listener to be queried. Valid values:
TCPandUDP. - id str
- ID of the layer4 listener.
- listener_
id str - ID of the layer4 listener to be queried.
- listener_
name str - Name of the layer4 listener to be queried.
- port float
- Port of the layer4 listener to be queried.
- proxy_
id str - ID of the GAAP proxy to be queried.
- result_
output_ strfile - Used to save results.
- protocol String
- Protocol of the layer4 listener to be queried. Valid values:
TCPandUDP. - id String
- ID of the layer4 listener.
- listener
Id String - ID of the layer4 listener to be queried.
- listener
Name String - Name of the layer4 listener to be queried.
- port Number
- Port of the layer4 listener to be queried.
- proxy
Id String - ID of the GAAP proxy to be queried.
- result
Output StringFile - Used to save results.
getGaapLayer4Listeners Result
The following output properties are available:
- Id string
- ID of the layer4 listener.
- Listeners
List<Get
Gaap Layer4Listeners Listener> - An information list of layer4 listeners. Each element contains the following attributes:
- Protocol string
- Protocol of the layer4 listener.
- Listener
Id string - Listener
Name string - Port double
- Port of the layer4 listener.
- Proxy
Id string - ID of the GAAP proxy.
- Result
Output stringFile
- Id string
- ID of the layer4 listener.
- Listeners
[]Get
Gaap Layer4Listeners Listener - An information list of layer4 listeners. Each element contains the following attributes:
- Protocol string
- Protocol of the layer4 listener.
- Listener
Id string - Listener
Name string - Port float64
- Port of the layer4 listener.
- Proxy
Id string - ID of the GAAP proxy.
- Result
Output stringFile
- id String
- ID of the layer4 listener.
- listeners
List<Get
Gaap Layer4Listeners Listener> - An information list of layer4 listeners. Each element contains the following attributes:
- protocol String
- Protocol of the layer4 listener.
- listener
Id String - listener
Name String - port Double
- Port of the layer4 listener.
- proxy
Id String - ID of the GAAP proxy.
- result
Output StringFile
- id string
- ID of the layer4 listener.
- listeners
Get
Gaap Layer4Listeners Listener[] - An information list of layer4 listeners. Each element contains the following attributes:
- protocol string
- Protocol of the layer4 listener.
- listener
Id string - listener
Name string - port number
- Port of the layer4 listener.
- proxy
Id string - ID of the GAAP proxy.
- result
Output stringFile
- id str
- ID of the layer4 listener.
- listeners
Sequence[Get
Gaap Layer4Listeners Listener] - An information list of layer4 listeners. Each element contains the following attributes:
- protocol str
- Protocol of the layer4 listener.
- listener_
id str - listener_
name str - port float
- Port of the layer4 listener.
- proxy_
id str - ID of the GAAP proxy.
- result_
output_ strfile
- id String
- ID of the layer4 listener.
- listeners List<Property Map>
- An information list of layer4 listeners. Each element contains the following attributes:
- protocol String
- Protocol of the layer4 listener.
- listener
Id String - listener
Name String - port Number
- Port of the layer4 listener.
- proxy
Id String - ID of the GAAP proxy.
- result
Output StringFile
Supporting Types
GetGaapLayer4ListenersListener
- Connect
Timeout double - Timeout of the health check response.
- Create
Time string - Creation time of the layer4 listener.
- Health
Check bool - Indicates whether health check is enable.
- Id string
- ID of the layer4 listener.
- Interval double
- Interval of the health check.
- Name string
- Name of the layer4 listener.
- Port double
- Port of the layer4 listener to be queried.
- Protocol string
- Protocol of the layer4 listener to be queried. Valid values:
TCPandUDP. - Proxy
Id string - ID of the GAAP proxy to be queried.
- Realserver
Type string - Type of the realserver.
- Scheduler string
- Scheduling policy of the layer4 listener.
- Status double
- Status of the layer4 listener.
- Connect
Timeout float64 - Timeout of the health check response.
- Create
Time string - Creation time of the layer4 listener.
- Health
Check bool - Indicates whether health check is enable.
- Id string
- ID of the layer4 listener.
- Interval float64
- Interval of the health check.
- Name string
- Name of the layer4 listener.
- Port float64
- Port of the layer4 listener to be queried.
- Protocol string
- Protocol of the layer4 listener to be queried. Valid values:
TCPandUDP. - Proxy
Id string - ID of the GAAP proxy to be queried.
- Realserver
Type string - Type of the realserver.
- Scheduler string
- Scheduling policy of the layer4 listener.
- Status float64
- Status of the layer4 listener.
- connect
Timeout Double - Timeout of the health check response.
- create
Time String - Creation time of the layer4 listener.
- health
Check Boolean - Indicates whether health check is enable.
- id String
- ID of the layer4 listener.
- interval Double
- Interval of the health check.
- name String
- Name of the layer4 listener.
- port Double
- Port of the layer4 listener to be queried.
- protocol String
- Protocol of the layer4 listener to be queried. Valid values:
TCPandUDP. - proxy
Id String - ID of the GAAP proxy to be queried.
- realserver
Type String - Type of the realserver.
- scheduler String
- Scheduling policy of the layer4 listener.
- status Double
- Status of the layer4 listener.
- connect
Timeout number - Timeout of the health check response.
- create
Time string - Creation time of the layer4 listener.
- health
Check boolean - Indicates whether health check is enable.
- id string
- ID of the layer4 listener.
- interval number
- Interval of the health check.
- name string
- Name of the layer4 listener.
- port number
- Port of the layer4 listener to be queried.
- protocol string
- Protocol of the layer4 listener to be queried. Valid values:
TCPandUDP. - proxy
Id string - ID of the GAAP proxy to be queried.
- realserver
Type string - Type of the realserver.
- scheduler string
- Scheduling policy of the layer4 listener.
- status number
- Status of the layer4 listener.
- connect_
timeout float - Timeout of the health check response.
- create_
time str - Creation time of the layer4 listener.
- health_
check bool - Indicates whether health check is enable.
- id str
- ID of the layer4 listener.
- interval float
- Interval of the health check.
- name str
- Name of the layer4 listener.
- port float
- Port of the layer4 listener to be queried.
- protocol str
- Protocol of the layer4 listener to be queried. Valid values:
TCPandUDP. - proxy_
id str - ID of the GAAP proxy to be queried.
- realserver_
type str - Type of the realserver.
- scheduler str
- Scheduling policy of the layer4 listener.
- status float
- Status of the layer4 listener.
- connect
Timeout Number - Timeout of the health check response.
- create
Time String - Creation time of the layer4 listener.
- health
Check Boolean - Indicates whether health check is enable.
- id String
- ID of the layer4 listener.
- interval Number
- Interval of the health check.
- name String
- Name of the layer4 listener.
- port Number
- Port of the layer4 listener to be queried.
- protocol String
- Protocol of the layer4 listener to be queried. Valid values:
TCPandUDP. - proxy
Id String - ID of the GAAP proxy to be queried.
- realserver
Type String - Type of the realserver.
- scheduler String
- Scheduling policy of the layer4 listener.
- status Number
- Status of the layer4 listener.
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
