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

tencentcloud.GaapLayer4Listener

Explore with Pulumi AI

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

    Provides a resource to create a layer4 listener of GAAP.

    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 bar = new tencentcloud.GaapRealserver("bar", {ip: "119.29.29.29"});
    const fooGaapLayer4Listener = new tencentcloud.GaapLayer4Listener("fooGaapLayer4Listener", {
        protocol: "TCP",
        port: 80,
        realserverType: "IP",
        proxyId: fooGaapProxy.gaapProxyId,
        healthCheck: true,
        realserverBindSets: [
            {
                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_realserver = tencentcloud.GaapRealserver("fooGaapRealserver", ip="1.1.1.1")
    bar = tencentcloud.GaapRealserver("bar", ip="119.29.29.29")
    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,
        realserver_bind_sets=[
            {
                "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
    		}
    		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("119.29.29.29"),
    		})
    		if err != nil {
    			return err
    		}
    		_, 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),
    			RealserverBindSets: tencentcloud.GaapLayer4ListenerRealserverBindSetArray{
    				&tencentcloud.GaapLayer4ListenerRealserverBindSetArgs{
    					Id:   fooGaapRealserver.GaapRealserverId,
    					Ip:   fooGaapRealserver.Ip,
    					Port: pulumi.Float64(80),
    				},
    				&tencentcloud.GaapLayer4ListenerRealserverBindSetArgs{
    					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 fooGaapRealserver = new Tencentcloud.GaapRealserver("fooGaapRealserver", new()
        {
            Ip = "1.1.1.1",
        });
    
        var bar = new Tencentcloud.GaapRealserver("bar", new()
        {
            Ip = "119.29.29.29",
        });
    
        var fooGaapLayer4Listener = new Tencentcloud.GaapLayer4Listener("fooGaapLayer4Listener", new()
        {
            Protocol = "TCP",
            Port = 80,
            RealserverType = "IP",
            ProxyId = fooGaapProxy.GaapProxyId,
            HealthCheck = true,
            RealserverBindSets = new[]
            {
                new Tencentcloud.Inputs.GaapLayer4ListenerRealserverBindSetArgs
                {
                    Id = fooGaapRealserver.GaapRealserverId,
                    Ip = fooGaapRealserver.Ip,
                    Port = 80,
                },
                new Tencentcloud.Inputs.GaapLayer4ListenerRealserverBindSetArgs
                {
                    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.GaapRealserver;
    import com.pulumi.tencentcloud.GaapRealserverArgs;
    import com.pulumi.tencentcloud.GaapLayer4Listener;
    import com.pulumi.tencentcloud.GaapLayer4ListenerArgs;
    import com.pulumi.tencentcloud.inputs.GaapLayer4ListenerRealserverBindSetArgs;
    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 bar = new GaapRealserver("bar", GaapRealserverArgs.builder()
                .ip("119.29.29.29")
                .build());
    
            var fooGaapLayer4Listener = new GaapLayer4Listener("fooGaapLayer4Listener", GaapLayer4ListenerArgs.builder()
                .protocol("TCP")
                .port(80)
                .realserverType("IP")
                .proxyId(fooGaapProxy.gaapProxyId())
                .healthCheck(true)
                .realserverBindSets(            
                    GaapLayer4ListenerRealserverBindSetArgs.builder()
                        .id(fooGaapRealserver.gaapRealserverId())
                        .ip(fooGaapRealserver.ip())
                        .port(80)
                        .build(),
                    GaapLayer4ListenerRealserverBindSetArgs.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
      fooGaapRealserver:
        type: tencentcloud:GaapRealserver
        properties:
          ip: 1.1.1.1
      bar:
        type: tencentcloud:GaapRealserver
        properties:
          ip: 119.29.29.29
      fooGaapLayer4Listener:
        type: tencentcloud:GaapLayer4Listener
        properties:
          protocol: TCP
          port: 80
          realserverType: IP
          proxyId: ${fooGaapProxy.gaapProxyId}
          healthCheck: true
          realserverBindSets:
            - id: ${fooGaapRealserver.gaapRealserverId}
              ip: ${fooGaapRealserver.ip}
              port: 80
            - id: ${bar.gaapRealserverId}
              ip: ${bar.ip}
              port: 80
    

    Create GaapLayer4Listener Resource

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

    Constructor syntax

    new GaapLayer4Listener(name: string, args: GaapLayer4ListenerArgs, opts?: CustomResourceOptions);
    @overload
    def GaapLayer4Listener(resource_name: str,
                           args: GaapLayer4ListenerArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def GaapLayer4Listener(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           port: Optional[float] = None,
                           realserver_type: Optional[str] = None,
                           proxy_id: Optional[str] = None,
                           protocol: Optional[str] = None,
                           context_type: Optional[str] = None,
                           connect_timeout: Optional[float] = None,
                           health_check: Optional[bool] = None,
                           healthy_threshold: Optional[float] = None,
                           interval: Optional[float] = None,
                           name: Optional[str] = None,
                           check_port: Optional[float] = None,
                           gaap_layer4_listener_id: Optional[str] = None,
                           client_ip_method: Optional[float] = None,
                           realserver_bind_sets: Optional[Sequence[GaapLayer4ListenerRealserverBindSetArgs]] = None,
                           check_type: Optional[str] = None,
                           recv_context: Optional[str] = None,
                           scheduler: Optional[str] = None,
                           send_context: Optional[str] = None,
                           unhealthy_threshold: Optional[float] = None)
    func NewGaapLayer4Listener(ctx *Context, name string, args GaapLayer4ListenerArgs, opts ...ResourceOption) (*GaapLayer4Listener, error)
    public GaapLayer4Listener(string name, GaapLayer4ListenerArgs args, CustomResourceOptions? opts = null)
    public GaapLayer4Listener(String name, GaapLayer4ListenerArgs args)
    public GaapLayer4Listener(String name, GaapLayer4ListenerArgs args, CustomResourceOptions options)
    
    type: tencentcloud:GaapLayer4Listener
    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 GaapLayer4ListenerArgs
    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 GaapLayer4ListenerArgs
    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 GaapLayer4ListenerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GaapLayer4ListenerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GaapLayer4ListenerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Port double
    Port of the layer4 listener.
    Protocol string
    Protocol of the layer4 listener. Valid value: TCP and UDP.
    ProxyId string
    ID of the GAAP proxy.
    RealserverType string
    Type of the realserver. Valid value: IP and DOMAIN. NOTES: when the protocol is specified as TCP and the scheduler is specified as wrr, the item can only be set to IP.
    CheckPort double
    UDP origin station health check probe port.
    CheckType string
    UDP origin server health type. PORT means check port, and PING means PING.
    ClientIpMethod double
    The way the listener gets the client IP, 0 for TOA, 1 for Proxy Protocol, default value is 0. NOTES: Only supports listeners of TCP protocol.
    ConnectTimeout double
    Timeout of the health check response, should less than interval, default value is 2s. NOTES: Require less than interval.
    ContextType string
    UDP source station health check port probe message type: TEXT represents text. Only used when the health check type is PORT.
    GaapLayer4ListenerId string
    ID of the resource.
    HealthCheck bool
    Indicates whether health check is enable, default value is false.
    HealthyThreshold double
    Health threshold, which indicates how many consecutive inspections are successful, the source station is determined to be healthy. Range from 1 to 10. Default value is 1.
    Interval double
    Interval of the health check, default value is 5s.
    Name string
    Name of the layer4 listener, the maximum length is 30.
    RealserverBindSets List<GaapLayer4ListenerRealserverBindSet>
    An information list of GAAP realserver.
    RecvContext string
    UDP source server health check port detects received messages. Only used when the health check type is PORT.
    Scheduler string
    Scheduling policy of the layer4 listener, default value is rr. Valid value: rr, wrr and lc.
    SendContext string
    UDP source server health check port detection sends messages. Only used when health check type is PORT.
    UnhealthyThreshold double
    Unhealthy threshold, which indicates how many consecutive check failures the source station is considered unhealthy. Range from 1 to 10. Default value is 1.
    Port float64
    Port of the layer4 listener.
    Protocol string
    Protocol of the layer4 listener. Valid value: TCP and UDP.
    ProxyId string
    ID of the GAAP proxy.
    RealserverType string
    Type of the realserver. Valid value: IP and DOMAIN. NOTES: when the protocol is specified as TCP and the scheduler is specified as wrr, the item can only be set to IP.
    CheckPort float64
    UDP origin station health check probe port.
    CheckType string
    UDP origin server health type. PORT means check port, and PING means PING.
    ClientIpMethod float64
    The way the listener gets the client IP, 0 for TOA, 1 for Proxy Protocol, default value is 0. NOTES: Only supports listeners of TCP protocol.
    ConnectTimeout float64
    Timeout of the health check response, should less than interval, default value is 2s. NOTES: Require less than interval.
    ContextType string
    UDP source station health check port probe message type: TEXT represents text. Only used when the health check type is PORT.
    GaapLayer4ListenerId string
    ID of the resource.
    HealthCheck bool
    Indicates whether health check is enable, default value is false.
    HealthyThreshold float64
    Health threshold, which indicates how many consecutive inspections are successful, the source station is determined to be healthy. Range from 1 to 10. Default value is 1.
    Interval float64
    Interval of the health check, default value is 5s.
    Name string
    Name of the layer4 listener, the maximum length is 30.
    RealserverBindSets []GaapLayer4ListenerRealserverBindSetArgs
    An information list of GAAP realserver.
    RecvContext string
    UDP source server health check port detects received messages. Only used when the health check type is PORT.
    Scheduler string
    Scheduling policy of the layer4 listener, default value is rr. Valid value: rr, wrr and lc.
    SendContext string
    UDP source server health check port detection sends messages. Only used when health check type is PORT.
    UnhealthyThreshold float64
    Unhealthy threshold, which indicates how many consecutive check failures the source station is considered unhealthy. Range from 1 to 10. Default value is 1.
    port Double
    Port of the layer4 listener.
    protocol String
    Protocol of the layer4 listener. Valid value: TCP and UDP.
    proxyId String
    ID of the GAAP proxy.
    realserverType String
    Type of the realserver. Valid value: IP and DOMAIN. NOTES: when the protocol is specified as TCP and the scheduler is specified as wrr, the item can only be set to IP.
    checkPort Double
    UDP origin station health check probe port.
    checkType String
    UDP origin server health type. PORT means check port, and PING means PING.
    clientIpMethod Double
    The way the listener gets the client IP, 0 for TOA, 1 for Proxy Protocol, default value is 0. NOTES: Only supports listeners of TCP protocol.
    connectTimeout Double
    Timeout of the health check response, should less than interval, default value is 2s. NOTES: Require less than interval.
    contextType String
    UDP source station health check port probe message type: TEXT represents text. Only used when the health check type is PORT.
    gaapLayer4ListenerId String
    ID of the resource.
    healthCheck Boolean
    Indicates whether health check is enable, default value is false.
    healthyThreshold Double
    Health threshold, which indicates how many consecutive inspections are successful, the source station is determined to be healthy. Range from 1 to 10. Default value is 1.
    interval Double
    Interval of the health check, default value is 5s.
    name String
    Name of the layer4 listener, the maximum length is 30.
    realserverBindSets List<GaapLayer4ListenerRealserverBindSet>
    An information list of GAAP realserver.
    recvContext String
    UDP source server health check port detects received messages. Only used when the health check type is PORT.
    scheduler String
    Scheduling policy of the layer4 listener, default value is rr. Valid value: rr, wrr and lc.
    sendContext String
    UDP source server health check port detection sends messages. Only used when health check type is PORT.
    unhealthyThreshold Double
    Unhealthy threshold, which indicates how many consecutive check failures the source station is considered unhealthy. Range from 1 to 10. Default value is 1.
    port number
    Port of the layer4 listener.
    protocol string
    Protocol of the layer4 listener. Valid value: TCP and UDP.
    proxyId string
    ID of the GAAP proxy.
    realserverType string
    Type of the realserver. Valid value: IP and DOMAIN. NOTES: when the protocol is specified as TCP and the scheduler is specified as wrr, the item can only be set to IP.
    checkPort number
    UDP origin station health check probe port.
    checkType string
    UDP origin server health type. PORT means check port, and PING means PING.
    clientIpMethod number
    The way the listener gets the client IP, 0 for TOA, 1 for Proxy Protocol, default value is 0. NOTES: Only supports listeners of TCP protocol.
    connectTimeout number
    Timeout of the health check response, should less than interval, default value is 2s. NOTES: Require less than interval.
    contextType string
    UDP source station health check port probe message type: TEXT represents text. Only used when the health check type is PORT.
    gaapLayer4ListenerId string
    ID of the resource.
    healthCheck boolean
    Indicates whether health check is enable, default value is false.
    healthyThreshold number
    Health threshold, which indicates how many consecutive inspections are successful, the source station is determined to be healthy. Range from 1 to 10. Default value is 1.
    interval number
    Interval of the health check, default value is 5s.
    name string
    Name of the layer4 listener, the maximum length is 30.
    realserverBindSets GaapLayer4ListenerRealserverBindSet[]
    An information list of GAAP realserver.
    recvContext string
    UDP source server health check port detects received messages. Only used when the health check type is PORT.
    scheduler string
    Scheduling policy of the layer4 listener, default value is rr. Valid value: rr, wrr and lc.
    sendContext string
    UDP source server health check port detection sends messages. Only used when health check type is PORT.
    unhealthyThreshold number
    Unhealthy threshold, which indicates how many consecutive check failures the source station is considered unhealthy. Range from 1 to 10. Default value is 1.
    port float
    Port of the layer4 listener.
    protocol str
    Protocol of the layer4 listener. Valid value: TCP and UDP.
    proxy_id str
    ID of the GAAP proxy.
    realserver_type str
    Type of the realserver. Valid value: IP and DOMAIN. NOTES: when the protocol is specified as TCP and the scheduler is specified as wrr, the item can only be set to IP.
    check_port float
    UDP origin station health check probe port.
    check_type str
    UDP origin server health type. PORT means check port, and PING means PING.
    client_ip_method float
    The way the listener gets the client IP, 0 for TOA, 1 for Proxy Protocol, default value is 0. NOTES: Only supports listeners of TCP protocol.
    connect_timeout float
    Timeout of the health check response, should less than interval, default value is 2s. NOTES: Require less than interval.
    context_type str
    UDP source station health check port probe message type: TEXT represents text. Only used when the health check type is PORT.
    gaap_layer4_listener_id str
    ID of the resource.
    health_check bool
    Indicates whether health check is enable, default value is false.
    healthy_threshold float
    Health threshold, which indicates how many consecutive inspections are successful, the source station is determined to be healthy. Range from 1 to 10. Default value is 1.
    interval float
    Interval of the health check, default value is 5s.
    name str
    Name of the layer4 listener, the maximum length is 30.
    realserver_bind_sets Sequence[GaapLayer4ListenerRealserverBindSetArgs]
    An information list of GAAP realserver.
    recv_context str
    UDP source server health check port detects received messages. Only used when the health check type is PORT.
    scheduler str
    Scheduling policy of the layer4 listener, default value is rr. Valid value: rr, wrr and lc.
    send_context str
    UDP source server health check port detection sends messages. Only used when health check type is PORT.
    unhealthy_threshold float
    Unhealthy threshold, which indicates how many consecutive check failures the source station is considered unhealthy. Range from 1 to 10. Default value is 1.
    port Number
    Port of the layer4 listener.
    protocol String
    Protocol of the layer4 listener. Valid value: TCP and UDP.
    proxyId String
    ID of the GAAP proxy.
    realserverType String
    Type of the realserver. Valid value: IP and DOMAIN. NOTES: when the protocol is specified as TCP and the scheduler is specified as wrr, the item can only be set to IP.
    checkPort Number
    UDP origin station health check probe port.
    checkType String
    UDP origin server health type. PORT means check port, and PING means PING.
    clientIpMethod Number
    The way the listener gets the client IP, 0 for TOA, 1 for Proxy Protocol, default value is 0. NOTES: Only supports listeners of TCP protocol.
    connectTimeout Number
    Timeout of the health check response, should less than interval, default value is 2s. NOTES: Require less than interval.
    contextType String
    UDP source station health check port probe message type: TEXT represents text. Only used when the health check type is PORT.
    gaapLayer4ListenerId String
    ID of the resource.
    healthCheck Boolean
    Indicates whether health check is enable, default value is false.
    healthyThreshold Number
    Health threshold, which indicates how many consecutive inspections are successful, the source station is determined to be healthy. Range from 1 to 10. Default value is 1.
    interval Number
    Interval of the health check, default value is 5s.
    name String
    Name of the layer4 listener, the maximum length is 30.
    realserverBindSets List<Property Map>
    An information list of GAAP realserver.
    recvContext String
    UDP source server health check port detects received messages. Only used when the health check type is PORT.
    scheduler String
    Scheduling policy of the layer4 listener, default value is rr. Valid value: rr, wrr and lc.
    sendContext String
    UDP source server health check port detection sends messages. Only used when health check type is PORT.
    unhealthyThreshold Number
    Unhealthy threshold, which indicates how many consecutive check failures the source station is considered unhealthy. Range from 1 to 10. Default value is 1.

    Outputs

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

    CreateTime string
    Creation time of the layer4 listener.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status double
    Status of the layer4 listener.
    CreateTime string
    Creation time of the layer4 listener.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status float64
    Status of the layer4 listener.
    createTime String
    Creation time of the layer4 listener.
    id String
    The provider-assigned unique ID for this managed resource.
    status Double
    Status of the layer4 listener.
    createTime string
    Creation time of the layer4 listener.
    id string
    The provider-assigned unique ID for this managed resource.
    status number
    Status of the layer4 listener.
    create_time str
    Creation time of the layer4 listener.
    id str
    The provider-assigned unique ID for this managed resource.
    status float
    Status of the layer4 listener.
    createTime String
    Creation time of the layer4 listener.
    id String
    The provider-assigned unique ID for this managed resource.
    status Number
    Status of the layer4 listener.

    Look up Existing GaapLayer4Listener Resource

    Get an existing GaapLayer4Listener 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?: GaapLayer4ListenerState, opts?: CustomResourceOptions): GaapLayer4Listener
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            check_port: Optional[float] = None,
            check_type: Optional[str] = None,
            client_ip_method: Optional[float] = None,
            connect_timeout: Optional[float] = None,
            context_type: Optional[str] = None,
            create_time: Optional[str] = None,
            gaap_layer4_listener_id: Optional[str] = None,
            health_check: Optional[bool] = None,
            healthy_threshold: Optional[float] = None,
            interval: Optional[float] = None,
            name: Optional[str] = None,
            port: Optional[float] = None,
            protocol: Optional[str] = None,
            proxy_id: Optional[str] = None,
            realserver_bind_sets: Optional[Sequence[GaapLayer4ListenerRealserverBindSetArgs]] = None,
            realserver_type: Optional[str] = None,
            recv_context: Optional[str] = None,
            scheduler: Optional[str] = None,
            send_context: Optional[str] = None,
            status: Optional[float] = None,
            unhealthy_threshold: Optional[float] = None) -> GaapLayer4Listener
    func GetGaapLayer4Listener(ctx *Context, name string, id IDInput, state *GaapLayer4ListenerState, opts ...ResourceOption) (*GaapLayer4Listener, error)
    public static GaapLayer4Listener Get(string name, Input<string> id, GaapLayer4ListenerState? state, CustomResourceOptions? opts = null)
    public static GaapLayer4Listener get(String name, Output<String> id, GaapLayer4ListenerState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:GaapLayer4Listener    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:
    CheckPort double
    UDP origin station health check probe port.
    CheckType string
    UDP origin server health type. PORT means check port, and PING means PING.
    ClientIpMethod double
    The way the listener gets the client IP, 0 for TOA, 1 for Proxy Protocol, default value is 0. NOTES: Only supports listeners of TCP protocol.
    ConnectTimeout double
    Timeout of the health check response, should less than interval, default value is 2s. NOTES: Require less than interval.
    ContextType string
    UDP source station health check port probe message type: TEXT represents text. Only used when the health check type is PORT.
    CreateTime string
    Creation time of the layer4 listener.
    GaapLayer4ListenerId string
    ID of the resource.
    HealthCheck bool
    Indicates whether health check is enable, default value is false.
    HealthyThreshold double
    Health threshold, which indicates how many consecutive inspections are successful, the source station is determined to be healthy. Range from 1 to 10. Default value is 1.
    Interval double
    Interval of the health check, default value is 5s.
    Name string
    Name of the layer4 listener, the maximum length is 30.
    Port double
    Port of the layer4 listener.
    Protocol string
    Protocol of the layer4 listener. Valid value: TCP and UDP.
    ProxyId string
    ID of the GAAP proxy.
    RealserverBindSets List<GaapLayer4ListenerRealserverBindSet>
    An information list of GAAP realserver.
    RealserverType string
    Type of the realserver. Valid value: IP and DOMAIN. NOTES: when the protocol is specified as TCP and the scheduler is specified as wrr, the item can only be set to IP.
    RecvContext string
    UDP source server health check port detects received messages. Only used when the health check type is PORT.
    Scheduler string
    Scheduling policy of the layer4 listener, default value is rr. Valid value: rr, wrr and lc.
    SendContext string
    UDP source server health check port detection sends messages. Only used when health check type is PORT.
    Status double
    Status of the layer4 listener.
    UnhealthyThreshold double
    Unhealthy threshold, which indicates how many consecutive check failures the source station is considered unhealthy. Range from 1 to 10. Default value is 1.
    CheckPort float64
    UDP origin station health check probe port.
    CheckType string
    UDP origin server health type. PORT means check port, and PING means PING.
    ClientIpMethod float64
    The way the listener gets the client IP, 0 for TOA, 1 for Proxy Protocol, default value is 0. NOTES: Only supports listeners of TCP protocol.
    ConnectTimeout float64
    Timeout of the health check response, should less than interval, default value is 2s. NOTES: Require less than interval.
    ContextType string
    UDP source station health check port probe message type: TEXT represents text. Only used when the health check type is PORT.
    CreateTime string
    Creation time of the layer4 listener.
    GaapLayer4ListenerId string
    ID of the resource.
    HealthCheck bool
    Indicates whether health check is enable, default value is false.
    HealthyThreshold float64
    Health threshold, which indicates how many consecutive inspections are successful, the source station is determined to be healthy. Range from 1 to 10. Default value is 1.
    Interval float64
    Interval of the health check, default value is 5s.
    Name string
    Name of the layer4 listener, the maximum length is 30.
    Port float64
    Port of the layer4 listener.
    Protocol string
    Protocol of the layer4 listener. Valid value: TCP and UDP.
    ProxyId string
    ID of the GAAP proxy.
    RealserverBindSets []GaapLayer4ListenerRealserverBindSetArgs
    An information list of GAAP realserver.
    RealserverType string
    Type of the realserver. Valid value: IP and DOMAIN. NOTES: when the protocol is specified as TCP and the scheduler is specified as wrr, the item can only be set to IP.
    RecvContext string
    UDP source server health check port detects received messages. Only used when the health check type is PORT.
    Scheduler string
    Scheduling policy of the layer4 listener, default value is rr. Valid value: rr, wrr and lc.
    SendContext string
    UDP source server health check port detection sends messages. Only used when health check type is PORT.
    Status float64
    Status of the layer4 listener.
    UnhealthyThreshold float64
    Unhealthy threshold, which indicates how many consecutive check failures the source station is considered unhealthy. Range from 1 to 10. Default value is 1.
    checkPort Double
    UDP origin station health check probe port.
    checkType String
    UDP origin server health type. PORT means check port, and PING means PING.
    clientIpMethod Double
    The way the listener gets the client IP, 0 for TOA, 1 for Proxy Protocol, default value is 0. NOTES: Only supports listeners of TCP protocol.
    connectTimeout Double
    Timeout of the health check response, should less than interval, default value is 2s. NOTES: Require less than interval.
    contextType String
    UDP source station health check port probe message type: TEXT represents text. Only used when the health check type is PORT.
    createTime String
    Creation time of the layer4 listener.
    gaapLayer4ListenerId String
    ID of the resource.
    healthCheck Boolean
    Indicates whether health check is enable, default value is false.
    healthyThreshold Double
    Health threshold, which indicates how many consecutive inspections are successful, the source station is determined to be healthy. Range from 1 to 10. Default value is 1.
    interval Double
    Interval of the health check, default value is 5s.
    name String
    Name of the layer4 listener, the maximum length is 30.
    port Double
    Port of the layer4 listener.
    protocol String
    Protocol of the layer4 listener. Valid value: TCP and UDP.
    proxyId String
    ID of the GAAP proxy.
    realserverBindSets List<GaapLayer4ListenerRealserverBindSet>
    An information list of GAAP realserver.
    realserverType String
    Type of the realserver. Valid value: IP and DOMAIN. NOTES: when the protocol is specified as TCP and the scheduler is specified as wrr, the item can only be set to IP.
    recvContext String
    UDP source server health check port detects received messages. Only used when the health check type is PORT.
    scheduler String
    Scheduling policy of the layer4 listener, default value is rr. Valid value: rr, wrr and lc.
    sendContext String
    UDP source server health check port detection sends messages. Only used when health check type is PORT.
    status Double
    Status of the layer4 listener.
    unhealthyThreshold Double
    Unhealthy threshold, which indicates how many consecutive check failures the source station is considered unhealthy. Range from 1 to 10. Default value is 1.
    checkPort number
    UDP origin station health check probe port.
    checkType string
    UDP origin server health type. PORT means check port, and PING means PING.
    clientIpMethod number
    The way the listener gets the client IP, 0 for TOA, 1 for Proxy Protocol, default value is 0. NOTES: Only supports listeners of TCP protocol.
    connectTimeout number
    Timeout of the health check response, should less than interval, default value is 2s. NOTES: Require less than interval.
    contextType string
    UDP source station health check port probe message type: TEXT represents text. Only used when the health check type is PORT.
    createTime string
    Creation time of the layer4 listener.
    gaapLayer4ListenerId string
    ID of the resource.
    healthCheck boolean
    Indicates whether health check is enable, default value is false.
    healthyThreshold number
    Health threshold, which indicates how many consecutive inspections are successful, the source station is determined to be healthy. Range from 1 to 10. Default value is 1.
    interval number
    Interval of the health check, default value is 5s.
    name string
    Name of the layer4 listener, the maximum length is 30.
    port number
    Port of the layer4 listener.
    protocol string
    Protocol of the layer4 listener. Valid value: TCP and UDP.
    proxyId string
    ID of the GAAP proxy.
    realserverBindSets GaapLayer4ListenerRealserverBindSet[]
    An information list of GAAP realserver.
    realserverType string
    Type of the realserver. Valid value: IP and DOMAIN. NOTES: when the protocol is specified as TCP and the scheduler is specified as wrr, the item can only be set to IP.
    recvContext string
    UDP source server health check port detects received messages. Only used when the health check type is PORT.
    scheduler string
    Scheduling policy of the layer4 listener, default value is rr. Valid value: rr, wrr and lc.
    sendContext string
    UDP source server health check port detection sends messages. Only used when health check type is PORT.
    status number
    Status of the layer4 listener.
    unhealthyThreshold number
    Unhealthy threshold, which indicates how many consecutive check failures the source station is considered unhealthy. Range from 1 to 10. Default value is 1.
    check_port float
    UDP origin station health check probe port.
    check_type str
    UDP origin server health type. PORT means check port, and PING means PING.
    client_ip_method float
    The way the listener gets the client IP, 0 for TOA, 1 for Proxy Protocol, default value is 0. NOTES: Only supports listeners of TCP protocol.
    connect_timeout float
    Timeout of the health check response, should less than interval, default value is 2s. NOTES: Require less than interval.
    context_type str
    UDP source station health check port probe message type: TEXT represents text. Only used when the health check type is PORT.
    create_time str
    Creation time of the layer4 listener.
    gaap_layer4_listener_id str
    ID of the resource.
    health_check bool
    Indicates whether health check is enable, default value is false.
    healthy_threshold float
    Health threshold, which indicates how many consecutive inspections are successful, the source station is determined to be healthy. Range from 1 to 10. Default value is 1.
    interval float
    Interval of the health check, default value is 5s.
    name str
    Name of the layer4 listener, the maximum length is 30.
    port float
    Port of the layer4 listener.
    protocol str
    Protocol of the layer4 listener. Valid value: TCP and UDP.
    proxy_id str
    ID of the GAAP proxy.
    realserver_bind_sets Sequence[GaapLayer4ListenerRealserverBindSetArgs]
    An information list of GAAP realserver.
    realserver_type str
    Type of the realserver. Valid value: IP and DOMAIN. NOTES: when the protocol is specified as TCP and the scheduler is specified as wrr, the item can only be set to IP.
    recv_context str
    UDP source server health check port detects received messages. Only used when the health check type is PORT.
    scheduler str
    Scheduling policy of the layer4 listener, default value is rr. Valid value: rr, wrr and lc.
    send_context str
    UDP source server health check port detection sends messages. Only used when health check type is PORT.
    status float
    Status of the layer4 listener.
    unhealthy_threshold float
    Unhealthy threshold, which indicates how many consecutive check failures the source station is considered unhealthy. Range from 1 to 10. Default value is 1.
    checkPort Number
    UDP origin station health check probe port.
    checkType String
    UDP origin server health type. PORT means check port, and PING means PING.
    clientIpMethod Number
    The way the listener gets the client IP, 0 for TOA, 1 for Proxy Protocol, default value is 0. NOTES: Only supports listeners of TCP protocol.
    connectTimeout Number
    Timeout of the health check response, should less than interval, default value is 2s. NOTES: Require less than interval.
    contextType String
    UDP source station health check port probe message type: TEXT represents text. Only used when the health check type is PORT.
    createTime String
    Creation time of the layer4 listener.
    gaapLayer4ListenerId String
    ID of the resource.
    healthCheck Boolean
    Indicates whether health check is enable, default value is false.
    healthyThreshold Number
    Health threshold, which indicates how many consecutive inspections are successful, the source station is determined to be healthy. Range from 1 to 10. Default value is 1.
    interval Number
    Interval of the health check, default value is 5s.
    name String
    Name of the layer4 listener, the maximum length is 30.
    port Number
    Port of the layer4 listener.
    protocol String
    Protocol of the layer4 listener. Valid value: TCP and UDP.
    proxyId String
    ID of the GAAP proxy.
    realserverBindSets List<Property Map>
    An information list of GAAP realserver.
    realserverType String
    Type of the realserver. Valid value: IP and DOMAIN. NOTES: when the protocol is specified as TCP and the scheduler is specified as wrr, the item can only be set to IP.
    recvContext String
    UDP source server health check port detects received messages. Only used when the health check type is PORT.
    scheduler String
    Scheduling policy of the layer4 listener, default value is rr. Valid value: rr, wrr and lc.
    sendContext String
    UDP source server health check port detection sends messages. Only used when health check type is PORT.
    status Number
    Status of the layer4 listener.
    unhealthyThreshold Number
    Unhealthy threshold, which indicates how many consecutive check failures the source station is considered unhealthy. Range from 1 to 10. Default value is 1.

    Supporting Types

    GaapLayer4ListenerRealserverBindSet, GaapLayer4ListenerRealserverBindSetArgs

    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. The range of values is [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. The range of values is [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. The range of values is [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. The range of values is [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. The range of values is [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. The range of values is [1,100].

    Import

    GAAP layer4 listener can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/gaapLayer4Listener:GaapLayer4Listener  tencentcloud_gaap_layer4_listener.foo listener-11112222
    

    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