tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.getGaapLayer4Listeners
Explore with Pulumi AI
tencentcloud 1.81.189 published on Wednesday, Apr 30, 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("fooGaapProxy", {
bandwidth: 10,
concurrent: 2,
accessRegion: "SouthChina",
realserverRegion: "NorthChina",
});
const fooGaapRealserver = new tencentcloud.GaapRealserver("fooGaapRealserver", {ip: "1.1.1.1"});
const fooGaapLayer4Listener = new tencentcloud.GaapLayer4Listener("fooGaapLayer4Listener", {
protocol: "TCP",
port: 80,
realserverType: "IP",
proxyId: fooGaapProxy.gaapProxyId,
healthCheck: true,
interval: 5,
connectTimeout: 2,
realserverBindSets: [{
id: fooGaapRealserver.gaapRealserverId,
ip: fooGaapRealserver.ip,
port: 80,
}],
});
const fooGaapLayer4Listeners = tencentcloud.getGaapLayer4ListenersOutput({
protocol: "TCP",
proxyId: fooGaapProxy.gaapProxyId,
listenerId: fooGaapLayer4Listener.gaapLayer4ListenerId,
});
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_realserver = tencentcloud.GaapRealserver("fooGaapRealserver", ip="1.1.1.1")
foo_gaap_layer4_listener = tencentcloud.GaapLayer4Listener("fooGaapLayer4Listener",
protocol="TCP",
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_gaap_layer4_listeners = 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, "fooGaapProxy", &tencentcloud.GaapProxyArgs{
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, "fooGaapRealserver", &tencentcloud.GaapRealserverArgs{
Ip: pulumi.String("1.1.1.1"),
})
if err != nil {
return err
}
fooGaapLayer4Listener, err := tencentcloud.NewGaapLayer4Listener(ctx, "fooGaapLayer4Listener", &tencentcloud.GaapLayer4ListenerArgs{
Protocol: pulumi.String("TCP"),
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("fooGaapProxy", new()
{
Bandwidth = 10,
Concurrent = 2,
AccessRegion = "SouthChina",
RealserverRegion = "NorthChina",
});
var fooGaapRealserver = new Tencentcloud.GaapRealserver("fooGaapRealserver", new()
{
Ip = "1.1.1.1",
});
var fooGaapLayer4Listener = new Tencentcloud.GaapLayer4Listener("fooGaapLayer4Listener", new()
{
Protocol = "TCP",
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 fooGaapLayer4Listeners = 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()
.bandwidth(10)
.concurrent(2)
.accessRegion("SouthChina")
.realserverRegion("NorthChina")
.build());
var fooGaapRealserver = new GaapRealserver("fooGaapRealserver", GaapRealserverArgs.builder()
.ip("1.1.1.1")
.build());
var fooGaapLayer4Listener = new GaapLayer4Listener("fooGaapLayer4Listener", GaapLayer4ListenerArgs.builder()
.protocol("TCP")
.port(80)
.realserverType("IP")
.proxyId(fooGaapProxy.gaapProxyId())
.healthCheck(true)
.interval(5)
.connectTimeout(2)
.realserverBindSets(GaapLayer4ListenerRealserverBindSetArgs.builder()
.id(fooGaapRealserver.gaapRealserverId())
.ip(fooGaapRealserver.ip())
.port(80)
.build())
.build());
final var fooGaapLayer4Listeners = TencentcloudFunctions.getGaapLayer4Listeners(GetGaapLayer4ListenersArgs.builder()
.protocol("TCP")
.proxyId(fooGaapProxy.gaapProxyId())
.listenerId(fooGaapLayer4Listener.gaapLayer4ListenerId())
.build());
}
}
resources:
fooGaapProxy:
type: tencentcloud:GaapProxy
properties:
bandwidth: 10
concurrent: 2
accessRegion: SouthChina
realserverRegion: NorthChina
fooGaapRealserver:
type: tencentcloud:GaapRealserver
properties:
ip: 1.1.1.1
fooGaapLayer4Listener:
type: tencentcloud:GaapLayer4Listener
properties:
protocol: TCP
port: 80
realserverType: IP
proxyId: ${fooGaapProxy.gaapProxyId}
healthCheck: true
interval: 5
connectTimeout: 2
realserverBindSets:
- id: ${fooGaapRealserver.gaapRealserverId}
ip: ${fooGaapRealserver.ip}
port: 80
variables:
fooGaapLayer4Listeners:
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 dictionary
The following arguments are supported:
- Protocol string
- Protocol of the layer4 listener to be queried. Valid values:
TCP
andUDP
. - 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:
TCP
andUDP
. - 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:
TCP
andUDP
. - 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:
TCP
andUDP
. - 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:
TCP
andUDP
. - 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:
TCP
andUDP
. - 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:
TCP
andUDP
. - 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:
TCP
andUDP
. - 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:
TCP
andUDP
. - 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:
TCP
andUDP
. - 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:
TCP
andUDP
. - 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:
TCP
andUDP
. - 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
tencentcloud
Terraform Provider.
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack