1. Packages
  2. Packages
  3. Tencentcloud Provider
  4. API Docs
  5. Ga2Listener
Viewing docs for tencentcloud 1.83.7
published on Tuesday, Jun 30, 2026 by tencentcloudstack
Viewing docs for tencentcloud 1.83.7
published on Tuesday, Jun 30, 2026 by tencentcloudstack

    Provides a resource to create a Tencent Cloud Global Accelerator V2 (GA2) listener.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.Ga2GlobalAccelerator("example", {
        name: "tf-example",
        instanceChargeType: "POSTPAID",
        description: "tf example global accelerator",
        tags: {
            createdBy: "Terraform",
        },
    });
    const exampleGa2AccelerateArea = new tencentcloud.Ga2AccelerateArea("example", {
        globalAcceleratorId: example.ga2GlobalAcceleratorId,
        accelerateRegion: "ap-guangzhou",
        bandwidth: 10,
        ispType: "BGP",
        ipVersion: "IPv4",
    });
    const example1 = new tencentcloud.Ga2Listener("example1", {
        globalAcceleratorId: exampleGa2AccelerateArea.globalAcceleratorId,
        name: "tf-example-tcp",
        protocol: "TCP",
        portRanges: {
            fromPort: 80,
            toPort: 80,
        },
        description: "tf example listener",
        getRealIpType: "ProxyProtocol",
        clientAffinity: "Open",
        listenerType: "Standard",
        idleTimeout: 900,
    });
    const example2 = new tencentcloud.Ga2Listener("example2", {
        globalAcceleratorId: exampleGa2AccelerateArea.globalAcceleratorId,
        name: "tf-example-http",
        protocol: "HTTP",
        portRanges: {
            fromPort: 90,
            toPort: 90,
        },
        description: "tf example listener",
        idleTimeout: 15,
        requestTimeout: 60,
        listenerType: "Standard",
        xForwardedForRealIp: true,
    }, {
        dependsOn: [example1],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.Ga2GlobalAccelerator("example",
        name="tf-example",
        instance_charge_type="POSTPAID",
        description="tf example global accelerator",
        tags={
            "createdBy": "Terraform",
        })
    example_ga2_accelerate_area = tencentcloud.Ga2AccelerateArea("example",
        global_accelerator_id=example.ga2_global_accelerator_id,
        accelerate_region="ap-guangzhou",
        bandwidth=10,
        isp_type="BGP",
        ip_version="IPv4")
    example1 = tencentcloud.Ga2Listener("example1",
        global_accelerator_id=example_ga2_accelerate_area.global_accelerator_id,
        name="tf-example-tcp",
        protocol="TCP",
        port_ranges={
            "from_port": 80,
            "to_port": 80,
        },
        description="tf example listener",
        get_real_ip_type="ProxyProtocol",
        client_affinity="Open",
        listener_type="Standard",
        idle_timeout=900)
    example2 = tencentcloud.Ga2Listener("example2",
        global_accelerator_id=example_ga2_accelerate_area.global_accelerator_id,
        name="tf-example-http",
        protocol="HTTP",
        port_ranges={
            "from_port": 90,
            "to_port": 90,
        },
        description="tf example listener",
        idle_timeout=15,
        request_timeout=60,
        listener_type="Standard",
        x_forwarded_for_real_ip=True,
        opts = pulumi.ResourceOptions(depends_on=[example1]))
    
    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 {
    		example, err := tencentcloud.NewGa2GlobalAccelerator(ctx, "example", &tencentcloud.Ga2GlobalAcceleratorArgs{
    			Name:               pulumi.String("tf-example"),
    			InstanceChargeType: pulumi.String("POSTPAID"),
    			Description:        pulumi.String("tf example global accelerator"),
    			Tags: pulumi.StringMap{
    				"createdBy": pulumi.String("Terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleGa2AccelerateArea, err := tencentcloud.NewGa2AccelerateArea(ctx, "example", &tencentcloud.Ga2AccelerateAreaArgs{
    			GlobalAcceleratorId: example.Ga2GlobalAcceleratorId,
    			AccelerateRegion:    pulumi.String("ap-guangzhou"),
    			Bandwidth:           pulumi.Float64(10),
    			IspType:             pulumi.String("BGP"),
    			IpVersion:           pulumi.String("IPv4"),
    		})
    		if err != nil {
    			return err
    		}
    		example1, err := tencentcloud.NewGa2Listener(ctx, "example1", &tencentcloud.Ga2ListenerArgs{
    			GlobalAcceleratorId: exampleGa2AccelerateArea.GlobalAcceleratorId,
    			Name:                pulumi.String("tf-example-tcp"),
    			Protocol:            pulumi.String("TCP"),
    			PortRanges: &tencentcloud.Ga2ListenerPortRangesArgs{
    				FromPort: pulumi.Float64(80),
    				ToPort:   pulumi.Float64(80),
    			},
    			Description:    pulumi.String("tf example listener"),
    			GetRealIpType:  pulumi.String("ProxyProtocol"),
    			ClientAffinity: pulumi.String("Open"),
    			ListenerType:   pulumi.String("Standard"),
    			IdleTimeout:    pulumi.Float64(900),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewGa2Listener(ctx, "example2", &tencentcloud.Ga2ListenerArgs{
    			GlobalAcceleratorId: exampleGa2AccelerateArea.GlobalAcceleratorId,
    			Name:                pulumi.String("tf-example-http"),
    			Protocol:            pulumi.String("HTTP"),
    			PortRanges: &tencentcloud.Ga2ListenerPortRangesArgs{
    				FromPort: pulumi.Float64(90),
    				ToPort:   pulumi.Float64(90),
    			},
    			Description:         pulumi.String("tf example listener"),
    			IdleTimeout:         pulumi.Float64(15),
    			RequestTimeout:      pulumi.Float64(60),
    			ListenerType:        pulumi.String("Standard"),
    			XForwardedForRealIp: pulumi.Bool(true),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			example1,
    		}))
    		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 example = new Tencentcloud.Ga2GlobalAccelerator("example", new()
        {
            Name = "tf-example",
            InstanceChargeType = "POSTPAID",
            Description = "tf example global accelerator",
            Tags = 
            {
                { "createdBy", "Terraform" },
            },
        });
    
        var exampleGa2AccelerateArea = new Tencentcloud.Ga2AccelerateArea("example", new()
        {
            GlobalAcceleratorId = example.Ga2GlobalAcceleratorId,
            AccelerateRegion = "ap-guangzhou",
            Bandwidth = 10,
            IspType = "BGP",
            IpVersion = "IPv4",
        });
    
        var example1 = new Tencentcloud.Ga2Listener("example1", new()
        {
            GlobalAcceleratorId = exampleGa2AccelerateArea.GlobalAcceleratorId,
            Name = "tf-example-tcp",
            Protocol = "TCP",
            PortRanges = new Tencentcloud.Inputs.Ga2ListenerPortRangesArgs
            {
                FromPort = 80,
                ToPort = 80,
            },
            Description = "tf example listener",
            GetRealIpType = "ProxyProtocol",
            ClientAffinity = "Open",
            ListenerType = "Standard",
            IdleTimeout = 900,
        });
    
        var example2 = new Tencentcloud.Ga2Listener("example2", new()
        {
            GlobalAcceleratorId = exampleGa2AccelerateArea.GlobalAcceleratorId,
            Name = "tf-example-http",
            Protocol = "HTTP",
            PortRanges = new Tencentcloud.Inputs.Ga2ListenerPortRangesArgs
            {
                FromPort = 90,
                ToPort = 90,
            },
            Description = "tf example listener",
            IdleTimeout = 15,
            RequestTimeout = 60,
            ListenerType = "Standard",
            XForwardedForRealIp = true,
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                example1,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.Ga2GlobalAccelerator;
    import com.pulumi.tencentcloud.Ga2GlobalAcceleratorArgs;
    import com.pulumi.tencentcloud.Ga2AccelerateArea;
    import com.pulumi.tencentcloud.Ga2AccelerateAreaArgs;
    import com.pulumi.tencentcloud.Ga2Listener;
    import com.pulumi.tencentcloud.Ga2ListenerArgs;
    import com.pulumi.tencentcloud.inputs.Ga2ListenerPortRangesArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 example = new Ga2GlobalAccelerator("example", Ga2GlobalAcceleratorArgs.builder()
                .name("tf-example")
                .instanceChargeType("POSTPAID")
                .description("tf example global accelerator")
                .tags(Map.of("createdBy", "Terraform"))
                .build());
    
            var exampleGa2AccelerateArea = new Ga2AccelerateArea("exampleGa2AccelerateArea", Ga2AccelerateAreaArgs.builder()
                .globalAcceleratorId(example.ga2GlobalAcceleratorId())
                .accelerateRegion("ap-guangzhou")
                .bandwidth(10.0)
                .ispType("BGP")
                .ipVersion("IPv4")
                .build());
    
            var example1 = new Ga2Listener("example1", Ga2ListenerArgs.builder()
                .globalAcceleratorId(exampleGa2AccelerateArea.globalAcceleratorId())
                .name("tf-example-tcp")
                .protocol("TCP")
                .portRanges(Ga2ListenerPortRangesArgs.builder()
                    .fromPort(80.0)
                    .toPort(80.0)
                    .build())
                .description("tf example listener")
                .getRealIpType("ProxyProtocol")
                .clientAffinity("Open")
                .listenerType("Standard")
                .idleTimeout(900.0)
                .build());
    
            var example2 = new Ga2Listener("example2", Ga2ListenerArgs.builder()
                .globalAcceleratorId(exampleGa2AccelerateArea.globalAcceleratorId())
                .name("tf-example-http")
                .protocol("HTTP")
                .portRanges(Ga2ListenerPortRangesArgs.builder()
                    .fromPort(90.0)
                    .toPort(90.0)
                    .build())
                .description("tf example listener")
                .idleTimeout(15.0)
                .requestTimeout(60.0)
                .listenerType("Standard")
                .xForwardedForRealIp(true)
                .build(), CustomResourceOptions.builder()
                    .dependsOn(example1)
                    .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:Ga2GlobalAccelerator
        properties:
          name: tf-example
          instanceChargeType: POSTPAID
          description: tf example global accelerator
          tags:
            createdBy: Terraform
      exampleGa2AccelerateArea:
        type: tencentcloud:Ga2AccelerateArea
        name: example
        properties:
          globalAcceleratorId: ${example.ga2GlobalAcceleratorId}
          accelerateRegion: ap-guangzhou
          bandwidth: 10
          ispType: BGP
          ipVersion: IPv4
      example1:
        type: tencentcloud:Ga2Listener
        properties:
          globalAcceleratorId: ${exampleGa2AccelerateArea.globalAcceleratorId}
          name: tf-example-tcp
          protocol: TCP
          portRanges:
            fromPort: 80
            toPort: 80
          description: tf example listener
          getRealIpType: ProxyProtocol
          clientAffinity: Open
          listenerType: Standard
          idleTimeout: 900
      example2:
        type: tencentcloud:Ga2Listener
        properties:
          globalAcceleratorId: ${exampleGa2AccelerateArea.globalAcceleratorId}
          name: tf-example-http
          protocol: HTTP
          portRanges:
            fromPort: 90
            toPort: 90
          description: tf example listener
          idleTimeout: 15
          requestTimeout: 60
          listenerType: Standard
          xForwardedForRealIp: true
        options:
          dependsOn:
            - ${example1}
    
    Example coming soon!
    

    Create Ga2Listener Resource

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

    Constructor syntax

    new Ga2Listener(name: string, args: Ga2ListenerArgs, opts?: CustomResourceOptions);
    @overload
    def Ga2Listener(resource_name: str,
                    args: Ga2ListenerArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Ga2Listener(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    port_ranges: Optional[Ga2ListenerPortRangesArgs] = None,
                    global_accelerator_id: Optional[str] = None,
                    listener_type: Optional[str] = None,
                    name: Optional[str] = None,
                    client_ca_certificates: Optional[Sequence[str]] = None,
                    description: Optional[str] = None,
                    ga2_listener_id: Optional[str] = None,
                    get_real_ip_type: Optional[str] = None,
                    client_affinity_time: Optional[float] = None,
                    cipher_policy_id: Optional[str] = None,
                    idle_timeout: Optional[float] = None,
                    client_affinity: Optional[str] = None,
                    certification_type: Optional[str] = None,
                    protocol: Optional[str] = None,
                    request_timeout: Optional[float] = None,
                    server_certificates: Optional[Sequence[str]] = None,
                    timeouts: Optional[Ga2ListenerTimeoutsArgs] = None,
                    x_forwarded_for_real_ip: Optional[bool] = None)
    func NewGa2Listener(ctx *Context, name string, args Ga2ListenerArgs, opts ...ResourceOption) (*Ga2Listener, error)
    public Ga2Listener(string name, Ga2ListenerArgs args, CustomResourceOptions? opts = null)
    public Ga2Listener(String name, Ga2ListenerArgs args)
    public Ga2Listener(String name, Ga2ListenerArgs args, CustomResourceOptions options)
    
    type: tencentcloud:Ga2Listener
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "tencentcloud_ga2listener" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args Ga2ListenerArgs
    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 Ga2ListenerArgs
    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 Ga2ListenerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args Ga2ListenerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args Ga2ListenerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    GlobalAcceleratorId string
    Global accelerator instance ID this listener belongs to.
    PortRanges Ga2ListenerPortRanges
    Listening port range. Cannot be modified after creation; modifying it forces a new resource.
    CertificationType string
    SSL authentication mode. Valid values: UNIDIRECTIONAL, MUTUAL.
    CipherPolicyId string
    TLS cipher policy ID.
    ClientAffinity string
    Whether to enable session stickiness.
    ClientAffinityTime double
    Session-stickiness duration in seconds. NOTE: this field is silently ignored on Create (the SDK CreateListener API has no equivalent slot) and forwarded only on Update via ModifyListener.
    ClientCaCertificates List<string>
    Client CA certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    Description string
    Listener description. Maximum length is 100 bytes.
    Ga2ListenerId string
    ID of the resource.
    GetRealIpType string
    Layer-4 real-IP method. Valid values: TOA, ProxyProtocol.
    IdleTimeout double
    Connection idle timeout in seconds.
    ListenerType string
    Listener routing type. Defaults to smart routing. Cannot be modified after creation.
    Name string
    Listener name. Maximum length is 60 bytes.
    Protocol string
    Listener protocol. Valid values: TCP, UDP, HTTP, HTTPS. Default: TCP. Cannot be modified after creation.
    RequestTimeout double
    Request timeout in seconds.
    ServerCertificates List<string>
    Server certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    Timeouts Ga2ListenerTimeouts
    XForwardedForRealIp bool
    Whether to enable layer-7 real-IP forwarding.
    GlobalAcceleratorId string
    Global accelerator instance ID this listener belongs to.
    PortRanges Ga2ListenerPortRangesArgs
    Listening port range. Cannot be modified after creation; modifying it forces a new resource.
    CertificationType string
    SSL authentication mode. Valid values: UNIDIRECTIONAL, MUTUAL.
    CipherPolicyId string
    TLS cipher policy ID.
    ClientAffinity string
    Whether to enable session stickiness.
    ClientAffinityTime float64
    Session-stickiness duration in seconds. NOTE: this field is silently ignored on Create (the SDK CreateListener API has no equivalent slot) and forwarded only on Update via ModifyListener.
    ClientCaCertificates []string
    Client CA certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    Description string
    Listener description. Maximum length is 100 bytes.
    Ga2ListenerId string
    ID of the resource.
    GetRealIpType string
    Layer-4 real-IP method. Valid values: TOA, ProxyProtocol.
    IdleTimeout float64
    Connection idle timeout in seconds.
    ListenerType string
    Listener routing type. Defaults to smart routing. Cannot be modified after creation.
    Name string
    Listener name. Maximum length is 60 bytes.
    Protocol string
    Listener protocol. Valid values: TCP, UDP, HTTP, HTTPS. Default: TCP. Cannot be modified after creation.
    RequestTimeout float64
    Request timeout in seconds.
    ServerCertificates []string
    Server certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    Timeouts Ga2ListenerTimeoutsArgs
    XForwardedForRealIp bool
    Whether to enable layer-7 real-IP forwarding.
    global_accelerator_id string
    Global accelerator instance ID this listener belongs to.
    port_ranges object
    Listening port range. Cannot be modified after creation; modifying it forces a new resource.
    certification_type string
    SSL authentication mode. Valid values: UNIDIRECTIONAL, MUTUAL.
    cipher_policy_id string
    TLS cipher policy ID.
    client_affinity string
    Whether to enable session stickiness.
    client_affinity_time number
    Session-stickiness duration in seconds. NOTE: this field is silently ignored on Create (the SDK CreateListener API has no equivalent slot) and forwarded only on Update via ModifyListener.
    client_ca_certificates list(string)
    Client CA certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    description string
    Listener description. Maximum length is 100 bytes.
    ga2_listener_id string
    ID of the resource.
    get_real_ip_type string
    Layer-4 real-IP method. Valid values: TOA, ProxyProtocol.
    idle_timeout number
    Connection idle timeout in seconds.
    listener_type string
    Listener routing type. Defaults to smart routing. Cannot be modified after creation.
    name string
    Listener name. Maximum length is 60 bytes.
    protocol string
    Listener protocol. Valid values: TCP, UDP, HTTP, HTTPS. Default: TCP. Cannot be modified after creation.
    request_timeout number
    Request timeout in seconds.
    server_certificates list(string)
    Server certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    timeouts object
    x_forwarded_for_real_ip bool
    Whether to enable layer-7 real-IP forwarding.
    globalAcceleratorId String
    Global accelerator instance ID this listener belongs to.
    portRanges Ga2ListenerPortRanges
    Listening port range. Cannot be modified after creation; modifying it forces a new resource.
    certificationType String
    SSL authentication mode. Valid values: UNIDIRECTIONAL, MUTUAL.
    cipherPolicyId String
    TLS cipher policy ID.
    clientAffinity String
    Whether to enable session stickiness.
    clientAffinityTime Double
    Session-stickiness duration in seconds. NOTE: this field is silently ignored on Create (the SDK CreateListener API has no equivalent slot) and forwarded only on Update via ModifyListener.
    clientCaCertificates List<String>
    Client CA certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    description String
    Listener description. Maximum length is 100 bytes.
    ga2ListenerId String
    ID of the resource.
    getRealIpType String
    Layer-4 real-IP method. Valid values: TOA, ProxyProtocol.
    idleTimeout Double
    Connection idle timeout in seconds.
    listenerType String
    Listener routing type. Defaults to smart routing. Cannot be modified after creation.
    name String
    Listener name. Maximum length is 60 bytes.
    protocol String
    Listener protocol. Valid values: TCP, UDP, HTTP, HTTPS. Default: TCP. Cannot be modified after creation.
    requestTimeout Double
    Request timeout in seconds.
    serverCertificates List<String>
    Server certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    timeouts Ga2ListenerTimeouts
    xForwardedForRealIp Boolean
    Whether to enable layer-7 real-IP forwarding.
    globalAcceleratorId string
    Global accelerator instance ID this listener belongs to.
    portRanges Ga2ListenerPortRanges
    Listening port range. Cannot be modified after creation; modifying it forces a new resource.
    certificationType string
    SSL authentication mode. Valid values: UNIDIRECTIONAL, MUTUAL.
    cipherPolicyId string
    TLS cipher policy ID.
    clientAffinity string
    Whether to enable session stickiness.
    clientAffinityTime number
    Session-stickiness duration in seconds. NOTE: this field is silently ignored on Create (the SDK CreateListener API has no equivalent slot) and forwarded only on Update via ModifyListener.
    clientCaCertificates string[]
    Client CA certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    description string
    Listener description. Maximum length is 100 bytes.
    ga2ListenerId string
    ID of the resource.
    getRealIpType string
    Layer-4 real-IP method. Valid values: TOA, ProxyProtocol.
    idleTimeout number
    Connection idle timeout in seconds.
    listenerType string
    Listener routing type. Defaults to smart routing. Cannot be modified after creation.
    name string
    Listener name. Maximum length is 60 bytes.
    protocol string
    Listener protocol. Valid values: TCP, UDP, HTTP, HTTPS. Default: TCP. Cannot be modified after creation.
    requestTimeout number
    Request timeout in seconds.
    serverCertificates string[]
    Server certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    timeouts Ga2ListenerTimeouts
    xForwardedForRealIp boolean
    Whether to enable layer-7 real-IP forwarding.
    global_accelerator_id str
    Global accelerator instance ID this listener belongs to.
    port_ranges Ga2ListenerPortRangesArgs
    Listening port range. Cannot be modified after creation; modifying it forces a new resource.
    certification_type str
    SSL authentication mode. Valid values: UNIDIRECTIONAL, MUTUAL.
    cipher_policy_id str
    TLS cipher policy ID.
    client_affinity str
    Whether to enable session stickiness.
    client_affinity_time float
    Session-stickiness duration in seconds. NOTE: this field is silently ignored on Create (the SDK CreateListener API has no equivalent slot) and forwarded only on Update via ModifyListener.
    client_ca_certificates Sequence[str]
    Client CA certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    description str
    Listener description. Maximum length is 100 bytes.
    ga2_listener_id str
    ID of the resource.
    get_real_ip_type str
    Layer-4 real-IP method. Valid values: TOA, ProxyProtocol.
    idle_timeout float
    Connection idle timeout in seconds.
    listener_type str
    Listener routing type. Defaults to smart routing. Cannot be modified after creation.
    name str
    Listener name. Maximum length is 60 bytes.
    protocol str
    Listener protocol. Valid values: TCP, UDP, HTTP, HTTPS. Default: TCP. Cannot be modified after creation.
    request_timeout float
    Request timeout in seconds.
    server_certificates Sequence[str]
    Server certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    timeouts Ga2ListenerTimeoutsArgs
    x_forwarded_for_real_ip bool
    Whether to enable layer-7 real-IP forwarding.
    globalAcceleratorId String
    Global accelerator instance ID this listener belongs to.
    portRanges Property Map
    Listening port range. Cannot be modified after creation; modifying it forces a new resource.
    certificationType String
    SSL authentication mode. Valid values: UNIDIRECTIONAL, MUTUAL.
    cipherPolicyId String
    TLS cipher policy ID.
    clientAffinity String
    Whether to enable session stickiness.
    clientAffinityTime Number
    Session-stickiness duration in seconds. NOTE: this field is silently ignored on Create (the SDK CreateListener API has no equivalent slot) and forwarded only on Update via ModifyListener.
    clientCaCertificates List<String>
    Client CA certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    description String
    Listener description. Maximum length is 100 bytes.
    ga2ListenerId String
    ID of the resource.
    getRealIpType String
    Layer-4 real-IP method. Valid values: TOA, ProxyProtocol.
    idleTimeout Number
    Connection idle timeout in seconds.
    listenerType String
    Listener routing type. Defaults to smart routing. Cannot be modified after creation.
    name String
    Listener name. Maximum length is 60 bytes.
    protocol String
    Listener protocol. Valid values: TCP, UDP, HTTP, HTTPS. Default: TCP. Cannot be modified after creation.
    requestTimeout Number
    Request timeout in seconds.
    serverCertificates List<String>
    Server certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    timeouts Property Map
    xForwardedForRealIp Boolean
    Whether to enable layer-7 real-IP forwarding.

    Outputs

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

    CreateTime string
    Listener creation time.
    EndpointGroupCounts double
    Number of endpoint groups attached to this listener.
    HttpVersion string
    HTTP version negotiated for this listener.
    Id string
    The provider-assigned unique ID for this managed resource.
    ListenerId string
    Listener instance ID.
    Status string
    Listener operational status.
    CreateTime string
    Listener creation time.
    EndpointGroupCounts float64
    Number of endpoint groups attached to this listener.
    HttpVersion string
    HTTP version negotiated for this listener.
    Id string
    The provider-assigned unique ID for this managed resource.
    ListenerId string
    Listener instance ID.
    Status string
    Listener operational status.
    create_time string
    Listener creation time.
    endpoint_group_counts number
    Number of endpoint groups attached to this listener.
    http_version string
    HTTP version negotiated for this listener.
    id string
    The provider-assigned unique ID for this managed resource.
    listener_id string
    Listener instance ID.
    status string
    Listener operational status.
    createTime String
    Listener creation time.
    endpointGroupCounts Double
    Number of endpoint groups attached to this listener.
    httpVersion String
    HTTP version negotiated for this listener.
    id String
    The provider-assigned unique ID for this managed resource.
    listenerId String
    Listener instance ID.
    status String
    Listener operational status.
    createTime string
    Listener creation time.
    endpointGroupCounts number
    Number of endpoint groups attached to this listener.
    httpVersion string
    HTTP version negotiated for this listener.
    id string
    The provider-assigned unique ID for this managed resource.
    listenerId string
    Listener instance ID.
    status string
    Listener operational status.
    create_time str
    Listener creation time.
    endpoint_group_counts float
    Number of endpoint groups attached to this listener.
    http_version str
    HTTP version negotiated for this listener.
    id str
    The provider-assigned unique ID for this managed resource.
    listener_id str
    Listener instance ID.
    status str
    Listener operational status.
    createTime String
    Listener creation time.
    endpointGroupCounts Number
    Number of endpoint groups attached to this listener.
    httpVersion String
    HTTP version negotiated for this listener.
    id String
    The provider-assigned unique ID for this managed resource.
    listenerId String
    Listener instance ID.
    status String
    Listener operational status.

    Look up Existing Ga2Listener Resource

    Get an existing Ga2Listener 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?: Ga2ListenerState, opts?: CustomResourceOptions): Ga2Listener
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            certification_type: Optional[str] = None,
            cipher_policy_id: Optional[str] = None,
            client_affinity: Optional[str] = None,
            client_affinity_time: Optional[float] = None,
            client_ca_certificates: Optional[Sequence[str]] = None,
            create_time: Optional[str] = None,
            description: Optional[str] = None,
            endpoint_group_counts: Optional[float] = None,
            ga2_listener_id: Optional[str] = None,
            get_real_ip_type: Optional[str] = None,
            global_accelerator_id: Optional[str] = None,
            http_version: Optional[str] = None,
            idle_timeout: Optional[float] = None,
            listener_id: Optional[str] = None,
            listener_type: Optional[str] = None,
            name: Optional[str] = None,
            port_ranges: Optional[Ga2ListenerPortRangesArgs] = None,
            protocol: Optional[str] = None,
            request_timeout: Optional[float] = None,
            server_certificates: Optional[Sequence[str]] = None,
            status: Optional[str] = None,
            timeouts: Optional[Ga2ListenerTimeoutsArgs] = None,
            x_forwarded_for_real_ip: Optional[bool] = None) -> Ga2Listener
    func GetGa2Listener(ctx *Context, name string, id IDInput, state *Ga2ListenerState, opts ...ResourceOption) (*Ga2Listener, error)
    public static Ga2Listener Get(string name, Input<string> id, Ga2ListenerState? state, CustomResourceOptions? opts = null)
    public static Ga2Listener get(String name, Output<String> id, Ga2ListenerState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:Ga2Listener    get:      id: ${id}
    import {
      to = tencentcloud_ga2listener.example
      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:
    CertificationType string
    SSL authentication mode. Valid values: UNIDIRECTIONAL, MUTUAL.
    CipherPolicyId string
    TLS cipher policy ID.
    ClientAffinity string
    Whether to enable session stickiness.
    ClientAffinityTime double
    Session-stickiness duration in seconds. NOTE: this field is silently ignored on Create (the SDK CreateListener API has no equivalent slot) and forwarded only on Update via ModifyListener.
    ClientCaCertificates List<string>
    Client CA certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    CreateTime string
    Listener creation time.
    Description string
    Listener description. Maximum length is 100 bytes.
    EndpointGroupCounts double
    Number of endpoint groups attached to this listener.
    Ga2ListenerId string
    ID of the resource.
    GetRealIpType string
    Layer-4 real-IP method. Valid values: TOA, ProxyProtocol.
    GlobalAcceleratorId string
    Global accelerator instance ID this listener belongs to.
    HttpVersion string
    HTTP version negotiated for this listener.
    IdleTimeout double
    Connection idle timeout in seconds.
    ListenerId string
    Listener instance ID.
    ListenerType string
    Listener routing type. Defaults to smart routing. Cannot be modified after creation.
    Name string
    Listener name. Maximum length is 60 bytes.
    PortRanges Ga2ListenerPortRanges
    Listening port range. Cannot be modified after creation; modifying it forces a new resource.
    Protocol string
    Listener protocol. Valid values: TCP, UDP, HTTP, HTTPS. Default: TCP. Cannot be modified after creation.
    RequestTimeout double
    Request timeout in seconds.
    ServerCertificates List<string>
    Server certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    Status string
    Listener operational status.
    Timeouts Ga2ListenerTimeouts
    XForwardedForRealIp bool
    Whether to enable layer-7 real-IP forwarding.
    CertificationType string
    SSL authentication mode. Valid values: UNIDIRECTIONAL, MUTUAL.
    CipherPolicyId string
    TLS cipher policy ID.
    ClientAffinity string
    Whether to enable session stickiness.
    ClientAffinityTime float64
    Session-stickiness duration in seconds. NOTE: this field is silently ignored on Create (the SDK CreateListener API has no equivalent slot) and forwarded only on Update via ModifyListener.
    ClientCaCertificates []string
    Client CA certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    CreateTime string
    Listener creation time.
    Description string
    Listener description. Maximum length is 100 bytes.
    EndpointGroupCounts float64
    Number of endpoint groups attached to this listener.
    Ga2ListenerId string
    ID of the resource.
    GetRealIpType string
    Layer-4 real-IP method. Valid values: TOA, ProxyProtocol.
    GlobalAcceleratorId string
    Global accelerator instance ID this listener belongs to.
    HttpVersion string
    HTTP version negotiated for this listener.
    IdleTimeout float64
    Connection idle timeout in seconds.
    ListenerId string
    Listener instance ID.
    ListenerType string
    Listener routing type. Defaults to smart routing. Cannot be modified after creation.
    Name string
    Listener name. Maximum length is 60 bytes.
    PortRanges Ga2ListenerPortRangesArgs
    Listening port range. Cannot be modified after creation; modifying it forces a new resource.
    Protocol string
    Listener protocol. Valid values: TCP, UDP, HTTP, HTTPS. Default: TCP. Cannot be modified after creation.
    RequestTimeout float64
    Request timeout in seconds.
    ServerCertificates []string
    Server certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    Status string
    Listener operational status.
    Timeouts Ga2ListenerTimeoutsArgs
    XForwardedForRealIp bool
    Whether to enable layer-7 real-IP forwarding.
    certification_type string
    SSL authentication mode. Valid values: UNIDIRECTIONAL, MUTUAL.
    cipher_policy_id string
    TLS cipher policy ID.
    client_affinity string
    Whether to enable session stickiness.
    client_affinity_time number
    Session-stickiness duration in seconds. NOTE: this field is silently ignored on Create (the SDK CreateListener API has no equivalent slot) and forwarded only on Update via ModifyListener.
    client_ca_certificates list(string)
    Client CA certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    create_time string
    Listener creation time.
    description string
    Listener description. Maximum length is 100 bytes.
    endpoint_group_counts number
    Number of endpoint groups attached to this listener.
    ga2_listener_id string
    ID of the resource.
    get_real_ip_type string
    Layer-4 real-IP method. Valid values: TOA, ProxyProtocol.
    global_accelerator_id string
    Global accelerator instance ID this listener belongs to.
    http_version string
    HTTP version negotiated for this listener.
    idle_timeout number
    Connection idle timeout in seconds.
    listener_id string
    Listener instance ID.
    listener_type string
    Listener routing type. Defaults to smart routing. Cannot be modified after creation.
    name string
    Listener name. Maximum length is 60 bytes.
    port_ranges object
    Listening port range. Cannot be modified after creation; modifying it forces a new resource.
    protocol string
    Listener protocol. Valid values: TCP, UDP, HTTP, HTTPS. Default: TCP. Cannot be modified after creation.
    request_timeout number
    Request timeout in seconds.
    server_certificates list(string)
    Server certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    status string
    Listener operational status.
    timeouts object
    x_forwarded_for_real_ip bool
    Whether to enable layer-7 real-IP forwarding.
    certificationType String
    SSL authentication mode. Valid values: UNIDIRECTIONAL, MUTUAL.
    cipherPolicyId String
    TLS cipher policy ID.
    clientAffinity String
    Whether to enable session stickiness.
    clientAffinityTime Double
    Session-stickiness duration in seconds. NOTE: this field is silently ignored on Create (the SDK CreateListener API has no equivalent slot) and forwarded only on Update via ModifyListener.
    clientCaCertificates List<String>
    Client CA certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    createTime String
    Listener creation time.
    description String
    Listener description. Maximum length is 100 bytes.
    endpointGroupCounts Double
    Number of endpoint groups attached to this listener.
    ga2ListenerId String
    ID of the resource.
    getRealIpType String
    Layer-4 real-IP method. Valid values: TOA, ProxyProtocol.
    globalAcceleratorId String
    Global accelerator instance ID this listener belongs to.
    httpVersion String
    HTTP version negotiated for this listener.
    idleTimeout Double
    Connection idle timeout in seconds.
    listenerId String
    Listener instance ID.
    listenerType String
    Listener routing type. Defaults to smart routing. Cannot be modified after creation.
    name String
    Listener name. Maximum length is 60 bytes.
    portRanges Ga2ListenerPortRanges
    Listening port range. Cannot be modified after creation; modifying it forces a new resource.
    protocol String
    Listener protocol. Valid values: TCP, UDP, HTTP, HTTPS. Default: TCP. Cannot be modified after creation.
    requestTimeout Double
    Request timeout in seconds.
    serverCertificates List<String>
    Server certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    status String
    Listener operational status.
    timeouts Ga2ListenerTimeouts
    xForwardedForRealIp Boolean
    Whether to enable layer-7 real-IP forwarding.
    certificationType string
    SSL authentication mode. Valid values: UNIDIRECTIONAL, MUTUAL.
    cipherPolicyId string
    TLS cipher policy ID.
    clientAffinity string
    Whether to enable session stickiness.
    clientAffinityTime number
    Session-stickiness duration in seconds. NOTE: this field is silently ignored on Create (the SDK CreateListener API has no equivalent slot) and forwarded only on Update via ModifyListener.
    clientCaCertificates string[]
    Client CA certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    createTime string
    Listener creation time.
    description string
    Listener description. Maximum length is 100 bytes.
    endpointGroupCounts number
    Number of endpoint groups attached to this listener.
    ga2ListenerId string
    ID of the resource.
    getRealIpType string
    Layer-4 real-IP method. Valid values: TOA, ProxyProtocol.
    globalAcceleratorId string
    Global accelerator instance ID this listener belongs to.
    httpVersion string
    HTTP version negotiated for this listener.
    idleTimeout number
    Connection idle timeout in seconds.
    listenerId string
    Listener instance ID.
    listenerType string
    Listener routing type. Defaults to smart routing. Cannot be modified after creation.
    name string
    Listener name. Maximum length is 60 bytes.
    portRanges Ga2ListenerPortRanges
    Listening port range. Cannot be modified after creation; modifying it forces a new resource.
    protocol string
    Listener protocol. Valid values: TCP, UDP, HTTP, HTTPS. Default: TCP. Cannot be modified after creation.
    requestTimeout number
    Request timeout in seconds.
    serverCertificates string[]
    Server certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    status string
    Listener operational status.
    timeouts Ga2ListenerTimeouts
    xForwardedForRealIp boolean
    Whether to enable layer-7 real-IP forwarding.
    certification_type str
    SSL authentication mode. Valid values: UNIDIRECTIONAL, MUTUAL.
    cipher_policy_id str
    TLS cipher policy ID.
    client_affinity str
    Whether to enable session stickiness.
    client_affinity_time float
    Session-stickiness duration in seconds. NOTE: this field is silently ignored on Create (the SDK CreateListener API has no equivalent slot) and forwarded only on Update via ModifyListener.
    client_ca_certificates Sequence[str]
    Client CA certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    create_time str
    Listener creation time.
    description str
    Listener description. Maximum length is 100 bytes.
    endpoint_group_counts float
    Number of endpoint groups attached to this listener.
    ga2_listener_id str
    ID of the resource.
    get_real_ip_type str
    Layer-4 real-IP method. Valid values: TOA, ProxyProtocol.
    global_accelerator_id str
    Global accelerator instance ID this listener belongs to.
    http_version str
    HTTP version negotiated for this listener.
    idle_timeout float
    Connection idle timeout in seconds.
    listener_id str
    Listener instance ID.
    listener_type str
    Listener routing type. Defaults to smart routing. Cannot be modified after creation.
    name str
    Listener name. Maximum length is 60 bytes.
    port_ranges Ga2ListenerPortRangesArgs
    Listening port range. Cannot be modified after creation; modifying it forces a new resource.
    protocol str
    Listener protocol. Valid values: TCP, UDP, HTTP, HTTPS. Default: TCP. Cannot be modified after creation.
    request_timeout float
    Request timeout in seconds.
    server_certificates Sequence[str]
    Server certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    status str
    Listener operational status.
    timeouts Ga2ListenerTimeoutsArgs
    x_forwarded_for_real_ip bool
    Whether to enable layer-7 real-IP forwarding.
    certificationType String
    SSL authentication mode. Valid values: UNIDIRECTIONAL, MUTUAL.
    cipherPolicyId String
    TLS cipher policy ID.
    clientAffinity String
    Whether to enable session stickiness.
    clientAffinityTime Number
    Session-stickiness duration in seconds. NOTE: this field is silently ignored on Create (the SDK CreateListener API has no equivalent slot) and forwarded only on Update via ModifyListener.
    clientCaCertificates List<String>
    Client CA certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    createTime String
    Listener creation time.
    description String
    Listener description. Maximum length is 100 bytes.
    endpointGroupCounts Number
    Number of endpoint groups attached to this listener.
    ga2ListenerId String
    ID of the resource.
    getRealIpType String
    Layer-4 real-IP method. Valid values: TOA, ProxyProtocol.
    globalAcceleratorId String
    Global accelerator instance ID this listener belongs to.
    httpVersion String
    HTTP version negotiated for this listener.
    idleTimeout Number
    Connection idle timeout in seconds.
    listenerId String
    Listener instance ID.
    listenerType String
    Listener routing type. Defaults to smart routing. Cannot be modified after creation.
    name String
    Listener name. Maximum length is 60 bytes.
    portRanges Property Map
    Listening port range. Cannot be modified after creation; modifying it forces a new resource.
    protocol String
    Listener protocol. Valid values: TCP, UDP, HTTP, HTTPS. Default: TCP. Cannot be modified after creation.
    requestTimeout Number
    Request timeout in seconds.
    serverCertificates List<String>
    Server certificate ID list. Treated as an unordered set; HCL element order has no semantic meaning.
    status String
    Listener operational status.
    timeouts Property Map
    xForwardedForRealIp Boolean
    Whether to enable layer-7 real-IP forwarding.

    Supporting Types

    Ga2ListenerPortRanges, Ga2ListenerPortRangesArgs

    FromPort double
    Inclusive start port.
    ToPort double
    Inclusive end port.
    FromPort float64
    Inclusive start port.
    ToPort float64
    Inclusive end port.
    from_port number
    Inclusive start port.
    to_port number
    Inclusive end port.
    fromPort Double
    Inclusive start port.
    toPort Double
    Inclusive end port.
    fromPort number
    Inclusive start port.
    toPort number
    Inclusive end port.
    from_port float
    Inclusive start port.
    to_port float
    Inclusive end port.
    fromPort Number
    Inclusive start port.
    toPort Number
    Inclusive end port.

    Ga2ListenerTimeouts, Ga2ListenerTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create string
    delete string
    update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    Import

    GA2 listener can be imported using the composite id <global_accelerator_id>#<listener_id>, e.g.

    $ pulumi import tencentcloud:index/ga2Listener:Ga2Listener example ga-4mredmiu#lsr-llr0dng1
    

    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.
    Viewing docs for tencentcloud 1.83.7
    published on Tuesday, Jun 30, 2026 by tencentcloudstack

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial