1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ga
  5. Listener
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.ga.Listener

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    Provides a Global Accelerator (GA) Listener resource.

    For information about Global Accelerator (GA) Listener and how to use it, see What is Listener.

    NOTE: Available since v1.111.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const defaultAccelerator = new alicloud.ga.Accelerator("defaultAccelerator", {
        duration: 1,
        autoUseCoupon: true,
        spec: "1",
    });
    const defaultBandwidthPackage = new alicloud.ga.BandwidthPackage("defaultBandwidthPackage", {
        bandwidth: 100,
        type: "Basic",
        bandwidthType: "Basic",
        paymentType: "PayAsYouGo",
        billingType: "PayBy95",
        ratio: 30,
    });
    const defaultBandwidthPackageAttachment = new alicloud.ga.BandwidthPackageAttachment("defaultBandwidthPackageAttachment", {
        acceleratorId: defaultAccelerator.id,
        bandwidthPackageId: defaultBandwidthPackage.id,
    });
    const defaultListener = new alicloud.ga.Listener("defaultListener", {
        acceleratorId: defaultBandwidthPackageAttachment.acceleratorId,
        portRanges: [{
            fromPort: 80,
            toPort: 80,
        }],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default_accelerator = alicloud.ga.Accelerator("defaultAccelerator",
        duration=1,
        auto_use_coupon=True,
        spec="1")
    default_bandwidth_package = alicloud.ga.BandwidthPackage("defaultBandwidthPackage",
        bandwidth=100,
        type="Basic",
        bandwidth_type="Basic",
        payment_type="PayAsYouGo",
        billing_type="PayBy95",
        ratio=30)
    default_bandwidth_package_attachment = alicloud.ga.BandwidthPackageAttachment("defaultBandwidthPackageAttachment",
        accelerator_id=default_accelerator.id,
        bandwidth_package_id=default_bandwidth_package.id)
    default_listener = alicloud.ga.Listener("defaultListener",
        accelerator_id=default_bandwidth_package_attachment.accelerator_id,
        port_ranges=[alicloud.ga.ListenerPortRangeArgs(
            from_port=80,
            to_port=80,
        )])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ga"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		defaultAccelerator, err := ga.NewAccelerator(ctx, "defaultAccelerator", &ga.AcceleratorArgs{
    			Duration:      pulumi.Int(1),
    			AutoUseCoupon: pulumi.Bool(true),
    			Spec:          pulumi.String("1"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultBandwidthPackage, err := ga.NewBandwidthPackage(ctx, "defaultBandwidthPackage", &ga.BandwidthPackageArgs{
    			Bandwidth:     pulumi.Int(100),
    			Type:          pulumi.String("Basic"),
    			BandwidthType: pulumi.String("Basic"),
    			PaymentType:   pulumi.String("PayAsYouGo"),
    			BillingType:   pulumi.String("PayBy95"),
    			Ratio:         pulumi.Int(30),
    		})
    		if err != nil {
    			return err
    		}
    		defaultBandwidthPackageAttachment, err := ga.NewBandwidthPackageAttachment(ctx, "defaultBandwidthPackageAttachment", &ga.BandwidthPackageAttachmentArgs{
    			AcceleratorId:      defaultAccelerator.ID(),
    			BandwidthPackageId: defaultBandwidthPackage.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ga.NewListener(ctx, "defaultListener", &ga.ListenerArgs{
    			AcceleratorId: defaultBandwidthPackageAttachment.AcceleratorId,
    			PortRanges: ga.ListenerPortRangeArray{
    				&ga.ListenerPortRangeArgs{
    					FromPort: pulumi.Int(80),
    					ToPort:   pulumi.Int(80),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultAccelerator = new AliCloud.Ga.Accelerator("defaultAccelerator", new()
        {
            Duration = 1,
            AutoUseCoupon = true,
            Spec = "1",
        });
    
        var defaultBandwidthPackage = new AliCloud.Ga.BandwidthPackage("defaultBandwidthPackage", new()
        {
            Bandwidth = 100,
            Type = "Basic",
            BandwidthType = "Basic",
            PaymentType = "PayAsYouGo",
            BillingType = "PayBy95",
            Ratio = 30,
        });
    
        var defaultBandwidthPackageAttachment = new AliCloud.Ga.BandwidthPackageAttachment("defaultBandwidthPackageAttachment", new()
        {
            AcceleratorId = defaultAccelerator.Id,
            BandwidthPackageId = defaultBandwidthPackage.Id,
        });
    
        var defaultListener = new AliCloud.Ga.Listener("defaultListener", new()
        {
            AcceleratorId = defaultBandwidthPackageAttachment.AcceleratorId,
            PortRanges = new[]
            {
                new AliCloud.Ga.Inputs.ListenerPortRangeArgs
                {
                    FromPort = 80,
                    ToPort = 80,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ga.Accelerator;
    import com.pulumi.alicloud.ga.AcceleratorArgs;
    import com.pulumi.alicloud.ga.BandwidthPackage;
    import com.pulumi.alicloud.ga.BandwidthPackageArgs;
    import com.pulumi.alicloud.ga.BandwidthPackageAttachment;
    import com.pulumi.alicloud.ga.BandwidthPackageAttachmentArgs;
    import com.pulumi.alicloud.ga.Listener;
    import com.pulumi.alicloud.ga.ListenerArgs;
    import com.pulumi.alicloud.ga.inputs.ListenerPortRangeArgs;
    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 defaultAccelerator = new Accelerator("defaultAccelerator", AcceleratorArgs.builder()        
                .duration(1)
                .autoUseCoupon(true)
                .spec("1")
                .build());
    
            var defaultBandwidthPackage = new BandwidthPackage("defaultBandwidthPackage", BandwidthPackageArgs.builder()        
                .bandwidth(100)
                .type("Basic")
                .bandwidthType("Basic")
                .paymentType("PayAsYouGo")
                .billingType("PayBy95")
                .ratio(30)
                .build());
    
            var defaultBandwidthPackageAttachment = new BandwidthPackageAttachment("defaultBandwidthPackageAttachment", BandwidthPackageAttachmentArgs.builder()        
                .acceleratorId(defaultAccelerator.id())
                .bandwidthPackageId(defaultBandwidthPackage.id())
                .build());
    
            var defaultListener = new Listener("defaultListener", ListenerArgs.builder()        
                .acceleratorId(defaultBandwidthPackageAttachment.acceleratorId())
                .portRanges(ListenerPortRangeArgs.builder()
                    .fromPort(80)
                    .toPort(80)
                    .build())
                .build());
    
        }
    }
    
    resources:
      defaultAccelerator:
        type: alicloud:ga:Accelerator
        properties:
          duration: 1
          autoUseCoupon: true
          spec: '1'
      defaultBandwidthPackage:
        type: alicloud:ga:BandwidthPackage
        properties:
          bandwidth: 100
          type: Basic
          bandwidthType: Basic
          paymentType: PayAsYouGo
          billingType: PayBy95
          ratio: 30
      defaultBandwidthPackageAttachment:
        type: alicloud:ga:BandwidthPackageAttachment
        properties:
          acceleratorId: ${defaultAccelerator.id}
          bandwidthPackageId: ${defaultBandwidthPackage.id}
      defaultListener:
        type: alicloud:ga:Listener
        properties:
          acceleratorId: ${defaultBandwidthPackageAttachment.acceleratorId}
          portRanges:
            - fromPort: 80
              toPort: 80
    

    Create Listener Resource

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

    Constructor syntax

    new Listener(name: string, args: ListenerArgs, opts?: CustomResourceOptions);
    @overload
    def Listener(resource_name: str,
                 args: ListenerArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Listener(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 accelerator_id: Optional[str] = None,
                 port_ranges: Optional[Sequence[ListenerPortRangeArgs]] = None,
                 certificates: Optional[Sequence[ListenerCertificateArgs]] = None,
                 client_affinity: Optional[str] = None,
                 description: Optional[str] = None,
                 forwarded_for_config: Optional[ListenerForwardedForConfigArgs] = None,
                 http_version: Optional[str] = None,
                 listener_type: Optional[str] = None,
                 name: Optional[str] = None,
                 protocol: Optional[str] = None,
                 proxy_protocol: Optional[bool] = None,
                 security_policy_id: Optional[str] = None)
    func NewListener(ctx *Context, name string, args ListenerArgs, opts ...ResourceOption) (*Listener, error)
    public Listener(string name, ListenerArgs args, CustomResourceOptions? opts = null)
    public Listener(String name, ListenerArgs args)
    public Listener(String name, ListenerArgs args, CustomResourceOptions options)
    
    type: alicloud:ga:Listener
    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 ListenerArgs
    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 ListenerArgs
    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 ListenerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ListenerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ListenerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var alicloudListenerResource = new AliCloud.Ga.Listener("alicloudListenerResource", new()
    {
        AcceleratorId = "string",
        PortRanges = new[]
        {
            new AliCloud.Ga.Inputs.ListenerPortRangeArgs
            {
                FromPort = 0,
                ToPort = 0,
            },
        },
        Certificates = new[]
        {
            new AliCloud.Ga.Inputs.ListenerCertificateArgs
            {
                Id = "string",
            },
        },
        ClientAffinity = "string",
        Description = "string",
        ForwardedForConfig = new AliCloud.Ga.Inputs.ListenerForwardedForConfigArgs
        {
            ForwardedForGaApEnabled = false,
            ForwardedForGaIdEnabled = false,
            ForwardedForPortEnabled = false,
            ForwardedForProtoEnabled = false,
            RealIpEnabled = false,
        },
        HttpVersion = "string",
        ListenerType = "string",
        Name = "string",
        Protocol = "string",
        ProxyProtocol = false,
        SecurityPolicyId = "string",
    });
    
    example, err := ga.NewListener(ctx, "alicloudListenerResource", &ga.ListenerArgs{
    	AcceleratorId: pulumi.String("string"),
    	PortRanges: ga.ListenerPortRangeArray{
    		&ga.ListenerPortRangeArgs{
    			FromPort: pulumi.Int(0),
    			ToPort:   pulumi.Int(0),
    		},
    	},
    	Certificates: ga.ListenerCertificateArray{
    		&ga.ListenerCertificateArgs{
    			Id: pulumi.String("string"),
    		},
    	},
    	ClientAffinity: pulumi.String("string"),
    	Description:    pulumi.String("string"),
    	ForwardedForConfig: &ga.ListenerForwardedForConfigArgs{
    		ForwardedForGaApEnabled:  pulumi.Bool(false),
    		ForwardedForGaIdEnabled:  pulumi.Bool(false),
    		ForwardedForPortEnabled:  pulumi.Bool(false),
    		ForwardedForProtoEnabled: pulumi.Bool(false),
    		RealIpEnabled:            pulumi.Bool(false),
    	},
    	HttpVersion:      pulumi.String("string"),
    	ListenerType:     pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	Protocol:         pulumi.String("string"),
    	ProxyProtocol:    pulumi.Bool(false),
    	SecurityPolicyId: pulumi.String("string"),
    })
    
    var alicloudListenerResource = new Listener("alicloudListenerResource", ListenerArgs.builder()        
        .acceleratorId("string")
        .portRanges(ListenerPortRangeArgs.builder()
            .fromPort(0)
            .toPort(0)
            .build())
        .certificates(ListenerCertificateArgs.builder()
            .id("string")
            .build())
        .clientAffinity("string")
        .description("string")
        .forwardedForConfig(ListenerForwardedForConfigArgs.builder()
            .forwardedForGaApEnabled(false)
            .forwardedForGaIdEnabled(false)
            .forwardedForPortEnabled(false)
            .forwardedForProtoEnabled(false)
            .realIpEnabled(false)
            .build())
        .httpVersion("string")
        .listenerType("string")
        .name("string")
        .protocol("string")
        .proxyProtocol(false)
        .securityPolicyId("string")
        .build());
    
    alicloud_listener_resource = alicloud.ga.Listener("alicloudListenerResource",
        accelerator_id="string",
        port_ranges=[alicloud.ga.ListenerPortRangeArgs(
            from_port=0,
            to_port=0,
        )],
        certificates=[alicloud.ga.ListenerCertificateArgs(
            id="string",
        )],
        client_affinity="string",
        description="string",
        forwarded_for_config=alicloud.ga.ListenerForwardedForConfigArgs(
            forwarded_for_ga_ap_enabled=False,
            forwarded_for_ga_id_enabled=False,
            forwarded_for_port_enabled=False,
            forwarded_for_proto_enabled=False,
            real_ip_enabled=False,
        ),
        http_version="string",
        listener_type="string",
        name="string",
        protocol="string",
        proxy_protocol=False,
        security_policy_id="string")
    
    const alicloudListenerResource = new alicloud.ga.Listener("alicloudListenerResource", {
        acceleratorId: "string",
        portRanges: [{
            fromPort: 0,
            toPort: 0,
        }],
        certificates: [{
            id: "string",
        }],
        clientAffinity: "string",
        description: "string",
        forwardedForConfig: {
            forwardedForGaApEnabled: false,
            forwardedForGaIdEnabled: false,
            forwardedForPortEnabled: false,
            forwardedForProtoEnabled: false,
            realIpEnabled: false,
        },
        httpVersion: "string",
        listenerType: "string",
        name: "string",
        protocol: "string",
        proxyProtocol: false,
        securityPolicyId: "string",
    });
    
    type: alicloud:ga:Listener
    properties:
        acceleratorId: string
        certificates:
            - id: string
        clientAffinity: string
        description: string
        forwardedForConfig:
            forwardedForGaApEnabled: false
            forwardedForGaIdEnabled: false
            forwardedForPortEnabled: false
            forwardedForProtoEnabled: false
            realIpEnabled: false
        httpVersion: string
        listenerType: string
        name: string
        portRanges:
            - fromPort: 0
              toPort: 0
        protocol: string
        proxyProtocol: false
        securityPolicyId: string
    

    Listener Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Listener resource accepts the following input properties:

    AcceleratorId string
    The accelerator id.
    PortRanges List<Pulumi.AliCloud.Ga.Inputs.ListenerPortRange>

    The portRanges of the listener. See port_ranges below.

    NOTE: For HTTP or HTTPS protocol monitoring, only one monitoring port can be configured, that is, the start monitoring port and end monitoring port should be the same.

    Certificates List<Pulumi.AliCloud.Ga.Inputs.ListenerCertificate>

    The certificates of the listener. See certificates below.

    NOTE: This parameter needs to be configured only for monitoring of the HTTPS protocol.

    ClientAffinity string
    The clientAffinity of the listener. Default value: NONE. Valid values:
    Description string
    The description of the listener.
    ForwardedForConfig Pulumi.AliCloud.Ga.Inputs.ListenerForwardedForConfig
    The XForward headers. See forwarded_for_config below.
    HttpVersion string

    The maximum version of the HTTP protocol. Default Value: http2. Valid values: http1.1, http2, http3.

    NOTE: http_version is only valid when protocol is HTTPS.

    ListenerType string
    The routing type of the listener. Default Value: Standard. Valid values:
    Name string
    The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.
    Protocol string
    Type of network transport protocol monitored. Default value: TCP. Valid values: TCP, UDP, HTTP, HTTPS.
    ProxyProtocol bool
    The proxy protocol of the listener. Default value: false. Valid values:
    SecurityPolicyId string
    The ID of the security policy. NOTE: Only HTTPS listeners support this parameter. Valid values:
    AcceleratorId string
    The accelerator id.
    PortRanges []ListenerPortRangeArgs

    The portRanges of the listener. See port_ranges below.

    NOTE: For HTTP or HTTPS protocol monitoring, only one monitoring port can be configured, that is, the start monitoring port and end monitoring port should be the same.

    Certificates []ListenerCertificateArgs

    The certificates of the listener. See certificates below.

    NOTE: This parameter needs to be configured only for monitoring of the HTTPS protocol.

    ClientAffinity string
    The clientAffinity of the listener. Default value: NONE. Valid values:
    Description string
    The description of the listener.
    ForwardedForConfig ListenerForwardedForConfigArgs
    The XForward headers. See forwarded_for_config below.
    HttpVersion string

    The maximum version of the HTTP protocol. Default Value: http2. Valid values: http1.1, http2, http3.

    NOTE: http_version is only valid when protocol is HTTPS.

    ListenerType string
    The routing type of the listener. Default Value: Standard. Valid values:
    Name string
    The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.
    Protocol string
    Type of network transport protocol monitored. Default value: TCP. Valid values: TCP, UDP, HTTP, HTTPS.
    ProxyProtocol bool
    The proxy protocol of the listener. Default value: false. Valid values:
    SecurityPolicyId string
    The ID of the security policy. NOTE: Only HTTPS listeners support this parameter. Valid values:
    acceleratorId String
    The accelerator id.
    portRanges List<ListenerPortRange>

    The portRanges of the listener. See port_ranges below.

    NOTE: For HTTP or HTTPS protocol monitoring, only one monitoring port can be configured, that is, the start monitoring port and end monitoring port should be the same.

    certificates List<ListenerCertificate>

    The certificates of the listener. See certificates below.

    NOTE: This parameter needs to be configured only for monitoring of the HTTPS protocol.

    clientAffinity String
    The clientAffinity of the listener. Default value: NONE. Valid values:
    description String
    The description of the listener.
    forwardedForConfig ListenerForwardedForConfig
    The XForward headers. See forwarded_for_config below.
    httpVersion String

    The maximum version of the HTTP protocol. Default Value: http2. Valid values: http1.1, http2, http3.

    NOTE: http_version is only valid when protocol is HTTPS.

    listenerType String
    The routing type of the listener. Default Value: Standard. Valid values:
    name String
    The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.
    protocol String
    Type of network transport protocol monitored. Default value: TCP. Valid values: TCP, UDP, HTTP, HTTPS.
    proxyProtocol Boolean
    The proxy protocol of the listener. Default value: false. Valid values:
    securityPolicyId String
    The ID of the security policy. NOTE: Only HTTPS listeners support this parameter. Valid values:
    acceleratorId string
    The accelerator id.
    portRanges ListenerPortRange[]

    The portRanges of the listener. See port_ranges below.

    NOTE: For HTTP or HTTPS protocol monitoring, only one monitoring port can be configured, that is, the start monitoring port and end monitoring port should be the same.

    certificates ListenerCertificate[]

    The certificates of the listener. See certificates below.

    NOTE: This parameter needs to be configured only for monitoring of the HTTPS protocol.

    clientAffinity string
    The clientAffinity of the listener. Default value: NONE. Valid values:
    description string
    The description of the listener.
    forwardedForConfig ListenerForwardedForConfig
    The XForward headers. See forwarded_for_config below.
    httpVersion string

    The maximum version of the HTTP protocol. Default Value: http2. Valid values: http1.1, http2, http3.

    NOTE: http_version is only valid when protocol is HTTPS.

    listenerType string
    The routing type of the listener. Default Value: Standard. Valid values:
    name string
    The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.
    protocol string
    Type of network transport protocol monitored. Default value: TCP. Valid values: TCP, UDP, HTTP, HTTPS.
    proxyProtocol boolean
    The proxy protocol of the listener. Default value: false. Valid values:
    securityPolicyId string
    The ID of the security policy. NOTE: Only HTTPS listeners support this parameter. Valid values:
    accelerator_id str
    The accelerator id.
    port_ranges Sequence[ListenerPortRangeArgs]

    The portRanges of the listener. See port_ranges below.

    NOTE: For HTTP or HTTPS protocol monitoring, only one monitoring port can be configured, that is, the start monitoring port and end monitoring port should be the same.

    certificates Sequence[ListenerCertificateArgs]

    The certificates of the listener. See certificates below.

    NOTE: This parameter needs to be configured only for monitoring of the HTTPS protocol.

    client_affinity str
    The clientAffinity of the listener. Default value: NONE. Valid values:
    description str
    The description of the listener.
    forwarded_for_config ListenerForwardedForConfigArgs
    The XForward headers. See forwarded_for_config below.
    http_version str

    The maximum version of the HTTP protocol. Default Value: http2. Valid values: http1.1, http2, http3.

    NOTE: http_version is only valid when protocol is HTTPS.

    listener_type str
    The routing type of the listener. Default Value: Standard. Valid values:
    name str
    The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.
    protocol str
    Type of network transport protocol monitored. Default value: TCP. Valid values: TCP, UDP, HTTP, HTTPS.
    proxy_protocol bool
    The proxy protocol of the listener. Default value: false. Valid values:
    security_policy_id str
    The ID of the security policy. NOTE: Only HTTPS listeners support this parameter. Valid values:
    acceleratorId String
    The accelerator id.
    portRanges List<Property Map>

    The portRanges of the listener. See port_ranges below.

    NOTE: For HTTP or HTTPS protocol monitoring, only one monitoring port can be configured, that is, the start monitoring port and end monitoring port should be the same.

    certificates List<Property Map>

    The certificates of the listener. See certificates below.

    NOTE: This parameter needs to be configured only for monitoring of the HTTPS protocol.

    clientAffinity String
    The clientAffinity of the listener. Default value: NONE. Valid values:
    description String
    The description of the listener.
    forwardedForConfig Property Map
    The XForward headers. See forwarded_for_config below.
    httpVersion String

    The maximum version of the HTTP protocol. Default Value: http2. Valid values: http1.1, http2, http3.

    NOTE: http_version is only valid when protocol is HTTPS.

    listenerType String
    The routing type of the listener. Default Value: Standard. Valid values:
    name String
    The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.
    protocol String
    Type of network transport protocol monitored. Default value: TCP. Valid values: TCP, UDP, HTTP, HTTPS.
    proxyProtocol Boolean
    The proxy protocol of the listener. Default value: false. Valid values:
    securityPolicyId String
    The ID of the security policy. NOTE: Only HTTPS listeners support this parameter. Valid values:

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the listener.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the listener.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the listener.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the listener.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the listener.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the listener.

    Look up Existing Listener Resource

    Get an existing Listener 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?: ListenerState, opts?: CustomResourceOptions): Listener
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            accelerator_id: Optional[str] = None,
            certificates: Optional[Sequence[ListenerCertificateArgs]] = None,
            client_affinity: Optional[str] = None,
            description: Optional[str] = None,
            forwarded_for_config: Optional[ListenerForwardedForConfigArgs] = None,
            http_version: Optional[str] = None,
            listener_type: Optional[str] = None,
            name: Optional[str] = None,
            port_ranges: Optional[Sequence[ListenerPortRangeArgs]] = None,
            protocol: Optional[str] = None,
            proxy_protocol: Optional[bool] = None,
            security_policy_id: Optional[str] = None,
            status: Optional[str] = None) -> Listener
    func GetListener(ctx *Context, name string, id IDInput, state *ListenerState, opts ...ResourceOption) (*Listener, error)
    public static Listener Get(string name, Input<string> id, ListenerState? state, CustomResourceOptions? opts = null)
    public static Listener get(String name, Output<String> id, ListenerState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    AcceleratorId string
    The accelerator id.
    Certificates List<Pulumi.AliCloud.Ga.Inputs.ListenerCertificate>

    The certificates of the listener. See certificates below.

    NOTE: This parameter needs to be configured only for monitoring of the HTTPS protocol.

    ClientAffinity string
    The clientAffinity of the listener. Default value: NONE. Valid values:
    Description string
    The description of the listener.
    ForwardedForConfig Pulumi.AliCloud.Ga.Inputs.ListenerForwardedForConfig
    The XForward headers. See forwarded_for_config below.
    HttpVersion string

    The maximum version of the HTTP protocol. Default Value: http2. Valid values: http1.1, http2, http3.

    NOTE: http_version is only valid when protocol is HTTPS.

    ListenerType string
    The routing type of the listener. Default Value: Standard. Valid values:
    Name string
    The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.
    PortRanges List<Pulumi.AliCloud.Ga.Inputs.ListenerPortRange>

    The portRanges of the listener. See port_ranges below.

    NOTE: For HTTP or HTTPS protocol monitoring, only one monitoring port can be configured, that is, the start monitoring port and end monitoring port should be the same.

    Protocol string
    Type of network transport protocol monitored. Default value: TCP. Valid values: TCP, UDP, HTTP, HTTPS.
    ProxyProtocol bool
    The proxy protocol of the listener. Default value: false. Valid values:
    SecurityPolicyId string
    The ID of the security policy. NOTE: Only HTTPS listeners support this parameter. Valid values:
    Status string
    The status of the listener.
    AcceleratorId string
    The accelerator id.
    Certificates []ListenerCertificateArgs

    The certificates of the listener. See certificates below.

    NOTE: This parameter needs to be configured only for monitoring of the HTTPS protocol.

    ClientAffinity string
    The clientAffinity of the listener. Default value: NONE. Valid values:
    Description string
    The description of the listener.
    ForwardedForConfig ListenerForwardedForConfigArgs
    The XForward headers. See forwarded_for_config below.
    HttpVersion string

    The maximum version of the HTTP protocol. Default Value: http2. Valid values: http1.1, http2, http3.

    NOTE: http_version is only valid when protocol is HTTPS.

    ListenerType string
    The routing type of the listener. Default Value: Standard. Valid values:
    Name string
    The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.
    PortRanges []ListenerPortRangeArgs

    The portRanges of the listener. See port_ranges below.

    NOTE: For HTTP or HTTPS protocol monitoring, only one monitoring port can be configured, that is, the start monitoring port and end monitoring port should be the same.

    Protocol string
    Type of network transport protocol monitored. Default value: TCP. Valid values: TCP, UDP, HTTP, HTTPS.
    ProxyProtocol bool
    The proxy protocol of the listener. Default value: false. Valid values:
    SecurityPolicyId string
    The ID of the security policy. NOTE: Only HTTPS listeners support this parameter. Valid values:
    Status string
    The status of the listener.
    acceleratorId String
    The accelerator id.
    certificates List<ListenerCertificate>

    The certificates of the listener. See certificates below.

    NOTE: This parameter needs to be configured only for monitoring of the HTTPS protocol.

    clientAffinity String
    The clientAffinity of the listener. Default value: NONE. Valid values:
    description String
    The description of the listener.
    forwardedForConfig ListenerForwardedForConfig
    The XForward headers. See forwarded_for_config below.
    httpVersion String

    The maximum version of the HTTP protocol. Default Value: http2. Valid values: http1.1, http2, http3.

    NOTE: http_version is only valid when protocol is HTTPS.

    listenerType String
    The routing type of the listener. Default Value: Standard. Valid values:
    name String
    The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.
    portRanges List<ListenerPortRange>

    The portRanges of the listener. See port_ranges below.

    NOTE: For HTTP or HTTPS protocol monitoring, only one monitoring port can be configured, that is, the start monitoring port and end monitoring port should be the same.

    protocol String
    Type of network transport protocol monitored. Default value: TCP. Valid values: TCP, UDP, HTTP, HTTPS.
    proxyProtocol Boolean
    The proxy protocol of the listener. Default value: false. Valid values:
    securityPolicyId String
    The ID of the security policy. NOTE: Only HTTPS listeners support this parameter. Valid values:
    status String
    The status of the listener.
    acceleratorId string
    The accelerator id.
    certificates ListenerCertificate[]

    The certificates of the listener. See certificates below.

    NOTE: This parameter needs to be configured only for monitoring of the HTTPS protocol.

    clientAffinity string
    The clientAffinity of the listener. Default value: NONE. Valid values:
    description string
    The description of the listener.
    forwardedForConfig ListenerForwardedForConfig
    The XForward headers. See forwarded_for_config below.
    httpVersion string

    The maximum version of the HTTP protocol. Default Value: http2. Valid values: http1.1, http2, http3.

    NOTE: http_version is only valid when protocol is HTTPS.

    listenerType string
    The routing type of the listener. Default Value: Standard. Valid values:
    name string
    The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.
    portRanges ListenerPortRange[]

    The portRanges of the listener. See port_ranges below.

    NOTE: For HTTP or HTTPS protocol monitoring, only one monitoring port can be configured, that is, the start monitoring port and end monitoring port should be the same.

    protocol string
    Type of network transport protocol monitored. Default value: TCP. Valid values: TCP, UDP, HTTP, HTTPS.
    proxyProtocol boolean
    The proxy protocol of the listener. Default value: false. Valid values:
    securityPolicyId string
    The ID of the security policy. NOTE: Only HTTPS listeners support this parameter. Valid values:
    status string
    The status of the listener.
    accelerator_id str
    The accelerator id.
    certificates Sequence[ListenerCertificateArgs]

    The certificates of the listener. See certificates below.

    NOTE: This parameter needs to be configured only for monitoring of the HTTPS protocol.

    client_affinity str
    The clientAffinity of the listener. Default value: NONE. Valid values:
    description str
    The description of the listener.
    forwarded_for_config ListenerForwardedForConfigArgs
    The XForward headers. See forwarded_for_config below.
    http_version str

    The maximum version of the HTTP protocol. Default Value: http2. Valid values: http1.1, http2, http3.

    NOTE: http_version is only valid when protocol is HTTPS.

    listener_type str
    The routing type of the listener. Default Value: Standard. Valid values:
    name str
    The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.
    port_ranges Sequence[ListenerPortRangeArgs]

    The portRanges of the listener. See port_ranges below.

    NOTE: For HTTP or HTTPS protocol monitoring, only one monitoring port can be configured, that is, the start monitoring port and end monitoring port should be the same.

    protocol str
    Type of network transport protocol monitored. Default value: TCP. Valid values: TCP, UDP, HTTP, HTTPS.
    proxy_protocol bool
    The proxy protocol of the listener. Default value: false. Valid values:
    security_policy_id str
    The ID of the security policy. NOTE: Only HTTPS listeners support this parameter. Valid values:
    status str
    The status of the listener.
    acceleratorId String
    The accelerator id.
    certificates List<Property Map>

    The certificates of the listener. See certificates below.

    NOTE: This parameter needs to be configured only for monitoring of the HTTPS protocol.

    clientAffinity String
    The clientAffinity of the listener. Default value: NONE. Valid values:
    description String
    The description of the listener.
    forwardedForConfig Property Map
    The XForward headers. See forwarded_for_config below.
    httpVersion String

    The maximum version of the HTTP protocol. Default Value: http2. Valid values: http1.1, http2, http3.

    NOTE: http_version is only valid when protocol is HTTPS.

    listenerType String
    The routing type of the listener. Default Value: Standard. Valid values:
    name String
    The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.
    portRanges List<Property Map>

    The portRanges of the listener. See port_ranges below.

    NOTE: For HTTP or HTTPS protocol monitoring, only one monitoring port can be configured, that is, the start monitoring port and end monitoring port should be the same.

    protocol String
    Type of network transport protocol monitored. Default value: TCP. Valid values: TCP, UDP, HTTP, HTTPS.
    proxyProtocol Boolean
    The proxy protocol of the listener. Default value: false. Valid values:
    securityPolicyId String
    The ID of the security policy. NOTE: Only HTTPS listeners support this parameter. Valid values:
    status String
    The status of the listener.

    Supporting Types

    ListenerCertificate, ListenerCertificateArgs

    Id string
    The id of the certificate.
    Id string
    The id of the certificate.
    id String
    The id of the certificate.
    id string
    The id of the certificate.
    id str
    The id of the certificate.
    id String
    The id of the certificate.

    ListenerForwardedForConfig, ListenerForwardedForConfigArgs

    ForwardedForGaApEnabled bool
    Specifies whether to use the GA-AP header to retrieve the information about acceleration regions. Default value: false. Valid values:
    ForwardedForGaIdEnabled bool
    Specifies whether to use the GA-ID header to retrieve the ID of the GA instance. Default value: false. Valid values:
    ForwardedForPortEnabled bool
    Specifies whether to use the GA-X-Forward-Port header to retrieve the listener ports of the GA instance. Default value: false. Valid values:
    ForwardedForProtoEnabled bool
    Specifies whether to use the GA-X-Forward-Proto header to retrieve the listener protocol of the GA instance. Default value: false. Valid values:
    RealIpEnabled bool
    Specifies whether to use the X-Real-IP header to retrieve client IP addresses. Default value: false. Valid values:
    ForwardedForGaApEnabled bool
    Specifies whether to use the GA-AP header to retrieve the information about acceleration regions. Default value: false. Valid values:
    ForwardedForGaIdEnabled bool
    Specifies whether to use the GA-ID header to retrieve the ID of the GA instance. Default value: false. Valid values:
    ForwardedForPortEnabled bool
    Specifies whether to use the GA-X-Forward-Port header to retrieve the listener ports of the GA instance. Default value: false. Valid values:
    ForwardedForProtoEnabled bool
    Specifies whether to use the GA-X-Forward-Proto header to retrieve the listener protocol of the GA instance. Default value: false. Valid values:
    RealIpEnabled bool
    Specifies whether to use the X-Real-IP header to retrieve client IP addresses. Default value: false. Valid values:
    forwardedForGaApEnabled Boolean
    Specifies whether to use the GA-AP header to retrieve the information about acceleration regions. Default value: false. Valid values:
    forwardedForGaIdEnabled Boolean
    Specifies whether to use the GA-ID header to retrieve the ID of the GA instance. Default value: false. Valid values:
    forwardedForPortEnabled Boolean
    Specifies whether to use the GA-X-Forward-Port header to retrieve the listener ports of the GA instance. Default value: false. Valid values:
    forwardedForProtoEnabled Boolean
    Specifies whether to use the GA-X-Forward-Proto header to retrieve the listener protocol of the GA instance. Default value: false. Valid values:
    realIpEnabled Boolean
    Specifies whether to use the X-Real-IP header to retrieve client IP addresses. Default value: false. Valid values:
    forwardedForGaApEnabled boolean
    Specifies whether to use the GA-AP header to retrieve the information about acceleration regions. Default value: false. Valid values:
    forwardedForGaIdEnabled boolean
    Specifies whether to use the GA-ID header to retrieve the ID of the GA instance. Default value: false. Valid values:
    forwardedForPortEnabled boolean
    Specifies whether to use the GA-X-Forward-Port header to retrieve the listener ports of the GA instance. Default value: false. Valid values:
    forwardedForProtoEnabled boolean
    Specifies whether to use the GA-X-Forward-Proto header to retrieve the listener protocol of the GA instance. Default value: false. Valid values:
    realIpEnabled boolean
    Specifies whether to use the X-Real-IP header to retrieve client IP addresses. Default value: false. Valid values:
    forwarded_for_ga_ap_enabled bool
    Specifies whether to use the GA-AP header to retrieve the information about acceleration regions. Default value: false. Valid values:
    forwarded_for_ga_id_enabled bool
    Specifies whether to use the GA-ID header to retrieve the ID of the GA instance. Default value: false. Valid values:
    forwarded_for_port_enabled bool
    Specifies whether to use the GA-X-Forward-Port header to retrieve the listener ports of the GA instance. Default value: false. Valid values:
    forwarded_for_proto_enabled bool
    Specifies whether to use the GA-X-Forward-Proto header to retrieve the listener protocol of the GA instance. Default value: false. Valid values:
    real_ip_enabled bool
    Specifies whether to use the X-Real-IP header to retrieve client IP addresses. Default value: false. Valid values:
    forwardedForGaApEnabled Boolean
    Specifies whether to use the GA-AP header to retrieve the information about acceleration regions. Default value: false. Valid values:
    forwardedForGaIdEnabled Boolean
    Specifies whether to use the GA-ID header to retrieve the ID of the GA instance. Default value: false. Valid values:
    forwardedForPortEnabled Boolean
    Specifies whether to use the GA-X-Forward-Port header to retrieve the listener ports of the GA instance. Default value: false. Valid values:
    forwardedForProtoEnabled Boolean
    Specifies whether to use the GA-X-Forward-Proto header to retrieve the listener protocol of the GA instance. Default value: false. Valid values:
    realIpEnabled Boolean
    Specifies whether to use the X-Real-IP header to retrieve client IP addresses. Default value: false. Valid values:

    ListenerPortRange, ListenerPortRangeArgs

    FromPort int
    The initial listening port used to receive requests and forward them to terminal nodes.
    ToPort int
    The end listening port used to receive requests and forward them to terminal nodes.
    FromPort int
    The initial listening port used to receive requests and forward them to terminal nodes.
    ToPort int
    The end listening port used to receive requests and forward them to terminal nodes.
    fromPort Integer
    The initial listening port used to receive requests and forward them to terminal nodes.
    toPort Integer
    The end listening port used to receive requests and forward them to terminal nodes.
    fromPort number
    The initial listening port used to receive requests and forward them to terminal nodes.
    toPort number
    The end listening port used to receive requests and forward them to terminal nodes.
    from_port int
    The initial listening port used to receive requests and forward them to terminal nodes.
    to_port int
    The end listening port used to receive requests and forward them to terminal nodes.
    fromPort Number
    The initial listening port used to receive requests and forward them to terminal nodes.
    toPort Number
    The end listening port used to receive requests and forward them to terminal nodes.

    Import

    Ga Listener can be imported using the id, e.g.

    $ pulumi import alicloud:ga/listener:Listener example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi