alicloud.ga.Listener
Explore with Pulumi AI
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 _default = new alicloud.ga.Accelerator("default", {
duration: 1,
autoUseCoupon: true,
spec: "1",
});
const defaultBandwidthPackage = new alicloud.ga.BandwidthPackage("default", {
bandwidth: 100,
type: "Basic",
bandwidthType: "Basic",
paymentType: "PayAsYouGo",
billingType: "PayBy95",
ratio: 30,
});
const defaultBandwidthPackageAttachment = new alicloud.ga.BandwidthPackageAttachment("default", {
acceleratorId: _default.id,
bandwidthPackageId: defaultBandwidthPackage.id,
});
const defaultListener = new alicloud.ga.Listener("default", {
acceleratorId: defaultBandwidthPackageAttachment.acceleratorId,
portRanges: [{
fromPort: 80,
toPort: 80,
}],
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.ga.Accelerator("default",
duration=1,
auto_use_coupon=True,
spec="1")
default_bandwidth_package = alicloud.ga.BandwidthPackage("default",
bandwidth=100,
type="Basic",
bandwidth_type="Basic",
payment_type="PayAsYouGo",
billing_type="PayBy95",
ratio=30)
default_bandwidth_package_attachment = alicloud.ga.BandwidthPackageAttachment("default",
accelerator_id=default.id,
bandwidth_package_id=default_bandwidth_package.id)
default_listener = alicloud.ga.Listener("default",
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 {
_, err := ga.NewAccelerator(ctx, "default", &ga.AcceleratorArgs{
Duration: pulumi.Int(1),
AutoUseCoupon: pulumi.Bool(true),
Spec: pulumi.String("1"),
})
if err != nil {
return err
}
defaultBandwidthPackage, err := ga.NewBandwidthPackage(ctx, "default", &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, "default", &ga.BandwidthPackageAttachmentArgs{
AcceleratorId: _default.ID(),
BandwidthPackageId: defaultBandwidthPackage.ID(),
})
if err != nil {
return err
}
_, err = ga.NewListener(ctx, "default", &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 @default = new AliCloud.Ga.Accelerator("default", new()
{
Duration = 1,
AutoUseCoupon = true,
Spec = "1",
});
var defaultBandwidthPackage = new AliCloud.Ga.BandwidthPackage("default", new()
{
Bandwidth = 100,
Type = "Basic",
BandwidthType = "Basic",
PaymentType = "PayAsYouGo",
BillingType = "PayBy95",
Ratio = 30,
});
var defaultBandwidthPackageAttachment = new AliCloud.Ga.BandwidthPackageAttachment("default", new()
{
AcceleratorId = @default.Id,
BandwidthPackageId = defaultBandwidthPackage.Id,
});
var defaultListener = new AliCloud.Ga.Listener("default", 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 default_ = new Accelerator("default", 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(default_.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:
default:
type: alicloud:ga:Accelerator
properties:
duration: 1
autoUseCoupon: true
spec: '1'
defaultBandwidthPackage:
type: alicloud:ga:BandwidthPackage
name: default
properties:
bandwidth: 100
type: Basic
bandwidthType: Basic
paymentType: PayAsYouGo
billingType: PayBy95
ratio: 30
defaultBandwidthPackageAttachment:
type: alicloud:ga:BandwidthPackageAttachment
name: default
properties:
acceleratorId: ${default.id}
bandwidthPackageId: ${defaultBandwidthPackage.id}
defaultListener:
type: alicloud:ga:Listener
name: default
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.
Constructor 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:
- Accelerator
Id string - The accelerator id.
- Port
Ranges List<Pulumi.Ali Cloud. Ga. Inputs. Listener Port Range> The portRanges of the listener. See
port_ranges
below.NOTE: For
HTTP
orHTTPS
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.
Ali Cloud. Ga. Inputs. Listener Certificate> The certificates of the listener. See
certificates
below.NOTE: This parameter needs to be configured only for monitoring of the
HTTPS
protocol.- Client
Affinity string - The clientAffinity of the listener. Default value:
NONE
. Valid values:NONE
: client affinity is not maintained, that is, connection requests from the same client cannot always be directed to the same terminal node.SOURCE_IP
: maintain client affinity. When a client accesses a stateful application, all requests from the same client can be directed to the same terminal node, regardless of the source port and protocol.
- Description string
- The description of the listener.
- Forwarded
For Pulumi.Config Ali Cloud. Ga. Inputs. Listener Forwarded For Config - The XForward headers. See
forwarded_for_config
below. - Http
Version string The maximum version of the HTTP protocol. Default Value:
http2
. Valid values:http1.1
,http2
,http3
.NOTE:
http_version
is only valid whenprotocol
isHTTPS
.- Listener
Type string - The routing type of the listener. Default Value:
Standard
. Valid values:Standard
: intelligent routing.CustomRouting
: custom routing.
- 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
. - Proxy
Protocol bool - The proxy protocol of the listener. Default value:
false
. Valid values: - Security
Policy stringId - The ID of the security policy. NOTE: Only
HTTPS
listeners support this parameter. Valid values:
- Accelerator
Id string - The accelerator id.
- Port
Ranges []ListenerPort Range Args The portRanges of the listener. See
port_ranges
below.NOTE: For
HTTP
orHTTPS
protocol monitoring, only one monitoring port can be configured, that is, the start monitoring port and end monitoring port should be the same.- Certificates
[]Listener
Certificate Args The certificates of the listener. See
certificates
below.NOTE: This parameter needs to be configured only for monitoring of the
HTTPS
protocol.- Client
Affinity string - The clientAffinity of the listener. Default value:
NONE
. Valid values:NONE
: client affinity is not maintained, that is, connection requests from the same client cannot always be directed to the same terminal node.SOURCE_IP
: maintain client affinity. When a client accesses a stateful application, all requests from the same client can be directed to the same terminal node, regardless of the source port and protocol.
- Description string
- The description of the listener.
- Forwarded
For ListenerConfig Forwarded For Config Args - The XForward headers. See
forwarded_for_config
below. - Http
Version string The maximum version of the HTTP protocol. Default Value:
http2
. Valid values:http1.1
,http2
,http3
.NOTE:
http_version
is only valid whenprotocol
isHTTPS
.- Listener
Type string - The routing type of the listener. Default Value:
Standard
. Valid values:Standard
: intelligent routing.CustomRouting
: custom routing.
- 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
. - Proxy
Protocol bool - The proxy protocol of the listener. Default value:
false
. Valid values: - Security
Policy stringId - The ID of the security policy. NOTE: Only
HTTPS
listeners support this parameter. Valid values:
- accelerator
Id String - The accelerator id.
- port
Ranges List<ListenerPort Range> The portRanges of the listener. See
port_ranges
below.NOTE: For
HTTP
orHTTPS
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<Listener
Certificate> The certificates of the listener. See
certificates
below.NOTE: This parameter needs to be configured only for monitoring of the
HTTPS
protocol.- client
Affinity String - The clientAffinity of the listener. Default value:
NONE
. Valid values:NONE
: client affinity is not maintained, that is, connection requests from the same client cannot always be directed to the same terminal node.SOURCE_IP
: maintain client affinity. When a client accesses a stateful application, all requests from the same client can be directed to the same terminal node, regardless of the source port and protocol.
- description String
- The description of the listener.
- forwarded
For ListenerConfig Forwarded For Config - The XForward headers. See
forwarded_for_config
below. - http
Version String The maximum version of the HTTP protocol. Default Value:
http2
. Valid values:http1.1
,http2
,http3
.NOTE:
http_version
is only valid whenprotocol
isHTTPS
.- listener
Type String - The routing type of the listener. Default Value:
Standard
. Valid values:Standard
: intelligent routing.CustomRouting
: custom routing.
- 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
. - proxy
Protocol Boolean - The proxy protocol of the listener. Default value:
false
. Valid values: - security
Policy StringId - The ID of the security policy. NOTE: Only
HTTPS
listeners support this parameter. Valid values:
- accelerator
Id string - The accelerator id.
- port
Ranges ListenerPort Range[] The portRanges of the listener. See
port_ranges
below.NOTE: For
HTTP
orHTTPS
protocol monitoring, only one monitoring port can be configured, that is, the start monitoring port and end monitoring port should be the same.- certificates
Listener
Certificate[] The certificates of the listener. See
certificates
below.NOTE: This parameter needs to be configured only for monitoring of the
HTTPS
protocol.- client
Affinity string - The clientAffinity of the listener. Default value:
NONE
. Valid values:NONE
: client affinity is not maintained, that is, connection requests from the same client cannot always be directed to the same terminal node.SOURCE_IP
: maintain client affinity. When a client accesses a stateful application, all requests from the same client can be directed to the same terminal node, regardless of the source port and protocol.
- description string
- The description of the listener.
- forwarded
For ListenerConfig Forwarded For Config - The XForward headers. See
forwarded_for_config
below. - http
Version string The maximum version of the HTTP protocol. Default Value:
http2
. Valid values:http1.1
,http2
,http3
.NOTE:
http_version
is only valid whenprotocol
isHTTPS
.- listener
Type string - The routing type of the listener. Default Value:
Standard
. Valid values:Standard
: intelligent routing.CustomRouting
: custom routing.
- 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
. - proxy
Protocol boolean - The proxy protocol of the listener. Default value:
false
. Valid values: - security
Policy stringId - The ID of the security policy. NOTE: Only
HTTPS
listeners support this parameter. Valid values:
- accelerator_
id str - The accelerator id.
- port_
ranges Sequence[ListenerPort Range Args] The portRanges of the listener. See
port_ranges
below.NOTE: For
HTTP
orHTTPS
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[Listener
Certificate Args] 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:NONE
: client affinity is not maintained, that is, connection requests from the same client cannot always be directed to the same terminal node.SOURCE_IP
: maintain client affinity. When a client accesses a stateful application, all requests from the same client can be directed to the same terminal node, regardless of the source port and protocol.
- description str
- The description of the listener.
- forwarded_
for_ Listenerconfig Forwarded For Config Args - 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 whenprotocol
isHTTPS
.- listener_
type str - The routing type of the listener. Default Value:
Standard
. Valid values:Standard
: intelligent routing.CustomRouting
: custom routing.
- 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_ strid - The ID of the security policy. NOTE: Only
HTTPS
listeners support this parameter. Valid values:
- accelerator
Id String - The accelerator id.
- port
Ranges List<Property Map> The portRanges of the listener. See
port_ranges
below.NOTE: For
HTTP
orHTTPS
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.- client
Affinity String - The clientAffinity of the listener. Default value:
NONE
. Valid values:NONE
: client affinity is not maintained, that is, connection requests from the same client cannot always be directed to the same terminal node.SOURCE_IP
: maintain client affinity. When a client accesses a stateful application, all requests from the same client can be directed to the same terminal node, regardless of the source port and protocol.
- description String
- The description of the listener.
- forwarded
For Property MapConfig - The XForward headers. See
forwarded_for_config
below. - http
Version String The maximum version of the HTTP protocol. Default Value:
http2
. Valid values:http1.1
,http2
,http3
.NOTE:
http_version
is only valid whenprotocol
isHTTPS
.- listener
Type String - The routing type of the listener. Default Value:
Standard
. Valid values:Standard
: intelligent routing.CustomRouting
: custom routing.
- 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
. - proxy
Protocol Boolean - The proxy protocol of the listener. Default value:
false
. Valid values: - security
Policy StringId - 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:
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.
- Accelerator
Id string - The accelerator id.
- Certificates
List<Pulumi.
Ali Cloud. Ga. Inputs. Listener Certificate> The certificates of the listener. See
certificates
below.NOTE: This parameter needs to be configured only for monitoring of the
HTTPS
protocol.- Client
Affinity string - The clientAffinity of the listener. Default value:
NONE
. Valid values:NONE
: client affinity is not maintained, that is, connection requests from the same client cannot always be directed to the same terminal node.SOURCE_IP
: maintain client affinity. When a client accesses a stateful application, all requests from the same client can be directed to the same terminal node, regardless of the source port and protocol.
- Description string
- The description of the listener.
- Forwarded
For Pulumi.Config Ali Cloud. Ga. Inputs. Listener Forwarded For Config - The XForward headers. See
forwarded_for_config
below. - Http
Version string The maximum version of the HTTP protocol. Default Value:
http2
. Valid values:http1.1
,http2
,http3
.NOTE:
http_version
is only valid whenprotocol
isHTTPS
.- Listener
Type string - The routing type of the listener. Default Value:
Standard
. Valid values:Standard
: intelligent routing.CustomRouting
: custom routing.
- 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.
- Port
Ranges List<Pulumi.Ali Cloud. Ga. Inputs. Listener Port Range> The portRanges of the listener. See
port_ranges
below.NOTE: For
HTTP
orHTTPS
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
. - Proxy
Protocol bool - The proxy protocol of the listener. Default value:
false
. Valid values: - Security
Policy stringId - The ID of the security policy. NOTE: Only
HTTPS
listeners support this parameter. Valid values: - Status string
- The status of the listener.
- Accelerator
Id string - The accelerator id.
- Certificates
[]Listener
Certificate Args The certificates of the listener. See
certificates
below.NOTE: This parameter needs to be configured only for monitoring of the
HTTPS
protocol.- Client
Affinity string - The clientAffinity of the listener. Default value:
NONE
. Valid values:NONE
: client affinity is not maintained, that is, connection requests from the same client cannot always be directed to the same terminal node.SOURCE_IP
: maintain client affinity. When a client accesses a stateful application, all requests from the same client can be directed to the same terminal node, regardless of the source port and protocol.
- Description string
- The description of the listener.
- Forwarded
For ListenerConfig Forwarded For Config Args - The XForward headers. See
forwarded_for_config
below. - Http
Version string The maximum version of the HTTP protocol. Default Value:
http2
. Valid values:http1.1
,http2
,http3
.NOTE:
http_version
is only valid whenprotocol
isHTTPS
.- Listener
Type string - The routing type of the listener. Default Value:
Standard
. Valid values:Standard
: intelligent routing.CustomRouting
: custom routing.
- 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.
- Port
Ranges []ListenerPort Range Args The portRanges of the listener. See
port_ranges
below.NOTE: For
HTTP
orHTTPS
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
. - Proxy
Protocol bool - The proxy protocol of the listener. Default value:
false
. Valid values: - Security
Policy stringId - The ID of the security policy. NOTE: Only
HTTPS
listeners support this parameter. Valid values: - Status string
- The status of the listener.
- accelerator
Id String - The accelerator id.
- certificates
List<Listener
Certificate> The certificates of the listener. See
certificates
below.NOTE: This parameter needs to be configured only for monitoring of the
HTTPS
protocol.- client
Affinity String - The clientAffinity of the listener. Default value:
NONE
. Valid values:NONE
: client affinity is not maintained, that is, connection requests from the same client cannot always be directed to the same terminal node.SOURCE_IP
: maintain client affinity. When a client accesses a stateful application, all requests from the same client can be directed to the same terminal node, regardless of the source port and protocol.
- description String
- The description of the listener.
- forwarded
For ListenerConfig Forwarded For Config - The XForward headers. See
forwarded_for_config
below. - http
Version String The maximum version of the HTTP protocol. Default Value:
http2
. Valid values:http1.1
,http2
,http3
.NOTE:
http_version
is only valid whenprotocol
isHTTPS
.- listener
Type String - The routing type of the listener. Default Value:
Standard
. Valid values:Standard
: intelligent routing.CustomRouting
: custom routing.
- 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.
- port
Ranges List<ListenerPort Range> The portRanges of the listener. See
port_ranges
below.NOTE: For
HTTP
orHTTPS
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
. - proxy
Protocol Boolean - The proxy protocol of the listener. Default value:
false
. Valid values: - security
Policy StringId - The ID of the security policy. NOTE: Only
HTTPS
listeners support this parameter. Valid values: - status String
- The status of the listener.
- accelerator
Id string - The accelerator id.
- certificates
Listener
Certificate[] The certificates of the listener. See
certificates
below.NOTE: This parameter needs to be configured only for monitoring of the
HTTPS
protocol.- client
Affinity string - The clientAffinity of the listener. Default value:
NONE
. Valid values:NONE
: client affinity is not maintained, that is, connection requests from the same client cannot always be directed to the same terminal node.SOURCE_IP
: maintain client affinity. When a client accesses a stateful application, all requests from the same client can be directed to the same terminal node, regardless of the source port and protocol.
- description string
- The description of the listener.
- forwarded
For ListenerConfig Forwarded For Config - The XForward headers. See
forwarded_for_config
below. - http
Version string The maximum version of the HTTP protocol. Default Value:
http2
. Valid values:http1.1
,http2
,http3
.NOTE:
http_version
is only valid whenprotocol
isHTTPS
.- listener
Type string - The routing type of the listener. Default Value:
Standard
. Valid values:Standard
: intelligent routing.CustomRouting
: custom routing.
- 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.
- port
Ranges ListenerPort Range[] The portRanges of the listener. See
port_ranges
below.NOTE: For
HTTP
orHTTPS
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
. - proxy
Protocol boolean - The proxy protocol of the listener. Default value:
false
. Valid values: - security
Policy stringId - 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[Listener
Certificate Args] 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:NONE
: client affinity is not maintained, that is, connection requests from the same client cannot always be directed to the same terminal node.SOURCE_IP
: maintain client affinity. When a client accesses a stateful application, all requests from the same client can be directed to the same terminal node, regardless of the source port and protocol.
- description str
- The description of the listener.
- forwarded_
for_ Listenerconfig Forwarded For Config Args - 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 whenprotocol
isHTTPS
.- listener_
type str - The routing type of the listener. Default Value:
Standard
. Valid values:Standard
: intelligent routing.CustomRouting
: custom routing.
- 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[ListenerPort Range Args] The portRanges of the listener. See
port_ranges
below.NOTE: For
HTTP
orHTTPS
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_ strid - The ID of the security policy. NOTE: Only
HTTPS
listeners support this parameter. Valid values: - status str
- The status of the listener.
- accelerator
Id 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.- client
Affinity String - The clientAffinity of the listener. Default value:
NONE
. Valid values:NONE
: client affinity is not maintained, that is, connection requests from the same client cannot always be directed to the same terminal node.SOURCE_IP
: maintain client affinity. When a client accesses a stateful application, all requests from the same client can be directed to the same terminal node, regardless of the source port and protocol.
- description String
- The description of the listener.
- forwarded
For Property MapConfig - The XForward headers. See
forwarded_for_config
below. - http
Version String The maximum version of the HTTP protocol. Default Value:
http2
. Valid values:http1.1
,http2
,http3
.NOTE:
http_version
is only valid whenprotocol
isHTTPS
.- listener
Type String - The routing type of the listener. Default Value:
Standard
. Valid values:Standard
: intelligent routing.CustomRouting
: custom routing.
- 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.
- port
Ranges List<Property Map> The portRanges of the listener. See
port_ranges
below.NOTE: For
HTTP
orHTTPS
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
. - proxy
Protocol Boolean - The proxy protocol of the listener. Default value:
false
. Valid values: - security
Policy StringId - 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
- Forwarded
For boolGa Ap Enabled - Specifies whether to use the GA-AP header to retrieve the information about acceleration regions. Default value:
false
. Valid values: - Forwarded
For boolGa Id Enabled - Specifies whether to use the GA-ID header to retrieve the ID of the GA instance. Default value:
false
. Valid values: - Forwarded
For boolPort Enabled - 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 boolProto Enabled - 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 boolEnabled - Specifies whether to use the X-Real-IP header to retrieve client IP addresses. Default value:
false
. Valid values:
- Forwarded
For boolGa Ap Enabled - Specifies whether to use the GA-AP header to retrieve the information about acceleration regions. Default value:
false
. Valid values: - Forwarded
For boolGa Id Enabled - Specifies whether to use the GA-ID header to retrieve the ID of the GA instance. Default value:
false
. Valid values: - Forwarded
For boolPort Enabled - 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 boolProto Enabled - 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 boolEnabled - Specifies whether to use the X-Real-IP header to retrieve client IP addresses. Default value:
false
. Valid values:
- forwarded
For BooleanGa Ap Enabled - Specifies whether to use the GA-AP header to retrieve the information about acceleration regions. Default value:
false
. Valid values: - forwarded
For BooleanGa Id Enabled - Specifies whether to use the GA-ID header to retrieve the ID of the GA instance. Default value:
false
. Valid values: - forwarded
For BooleanPort Enabled - 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 BooleanProto Enabled - 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 BooleanEnabled - Specifies whether to use the X-Real-IP header to retrieve client IP addresses. Default value:
false
. Valid values:
- forwarded
For booleanGa Ap Enabled - Specifies whether to use the GA-AP header to retrieve the information about acceleration regions. Default value:
false
. Valid values: - forwarded
For booleanGa Id Enabled - Specifies whether to use the GA-ID header to retrieve the ID of the GA instance. Default value:
false
. Valid values: - forwarded
For booleanPort Enabled - 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 booleanProto Enabled - 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 booleanEnabled - Specifies whether to use the X-Real-IP header to retrieve client IP addresses. Default value:
false
. Valid values:
- forwarded_
for_ boolga_ ap_ enabled - Specifies whether to use the GA-AP header to retrieve the information about acceleration regions. Default value:
false
. Valid values: - forwarded_
for_ boolga_ id_ enabled - Specifies whether to use the GA-ID header to retrieve the ID of the GA instance. Default value:
false
. Valid values: - forwarded_
for_ boolport_ enabled - 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_ boolproto_ enabled - 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_ boolenabled - Specifies whether to use the X-Real-IP header to retrieve client IP addresses. Default value:
false
. Valid values:
- forwarded
For BooleanGa Ap Enabled - Specifies whether to use the GA-AP header to retrieve the information about acceleration regions. Default value:
false
. Valid values: - forwarded
For BooleanGa Id Enabled - Specifies whether to use the GA-ID header to retrieve the ID of the GA instance. Default value:
false
. Valid values: - forwarded
For BooleanPort Enabled - 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 BooleanProto Enabled - 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 BooleanEnabled - Specifies whether to use the X-Real-IP header to retrieve client IP addresses. Default value:
false
. Valid values:
ListenerPortRange, ListenerPortRangeArgs
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.