Skip to content

ListenerProps

Properties for defining a Listener.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-ga-listener

Initializer

import ros_cdk_ga
ros_cdk_ga.ListenerProps(
  accelerator_id: typing.Union[str, IResolvable],
  port_ranges: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, PortRangesProperty]]],
  protocol: typing.Union[str, IResolvable],
  certificates: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, CertificatesProperty]]] = None,
  client_affinity: typing.Union[str, IResolvable] = None,
  description: typing.Union[str, IResolvable] = None,
  http_version: typing.Union[str, IResolvable] = None,
  idle_timeout: typing.Union[typing.Union[int, float], IResolvable] = None,
  name: typing.Union[str, IResolvable] = None,
  proxy_protocol: typing.Union[bool, IResolvable] = None,
  request_timeout: typing.Union[typing.Union[int, float], IResolvable] = None,
  security_policy_id: typing.Union[str, IResolvable] = None,
  type: typing.Union[str, IResolvable] = None,
  x_forwarded_for_config: typing.Union[IResolvable, XForwardedForConfigProperty] = None
)

Properties

Name Type Description
accelerator_id typing.Union[str, ros_cdk_core.IResolvable] Property acceleratorId: The ID of the Global Accelerator instance to which the listener will be added.
port_ranges typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, PortRangesProperty]]] Property portRanges:.
protocol typing.Union[str, ros_cdk_core.IResolvable] Property protocol: The network transmission protocol of the listener.
certificates typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, CertificatesProperty]]] Property certificates:.
client_affinity typing.Union[str, ros_cdk_core.IResolvable] Property clientAffinity: Specifies whether to enable client affinity for the listener.
description typing.Union[str, ros_cdk_core.IResolvable] Property description: The description of the listener.
http_version typing.Union[str, ros_cdk_core.IResolvable] Property httpVersion: The maximum version of the HTTP protocol.
idle_timeout typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property idleTimeout: The connection idle timeout period.
name typing.Union[str, ros_cdk_core.IResolvable] Property name: The name of the listener.
proxy_protocol typing.Union[bool, ros_cdk_core.IResolvable] Property proxyProtocol: Specifies whether to preserve client IP addresses.
request_timeout typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property requestTimeout: The HTTP request timeout period.
security_policy_id typing.Union[str, ros_cdk_core.IResolvable] Property securityPolicyId: The ID of the security policy.
type typing.Union[str, ros_cdk_core.IResolvable] Property type: The listener routing type.
x_forwarded_for_config typing.Union[ros_cdk_core.IResolvable, XForwardedForConfigProperty] Property xForwardedForConfig: The configuration of the XForward field.

accelerator_idRequired

accelerator_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property acceleratorId: The ID of the Global Accelerator instance to which the listener will be added.


port_rangesRequired

port_ranges: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, PortRangesProperty]]]
  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, PortRangesProperty]]]

Property portRanges:.


protocolRequired

protocol: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property protocol: The network transmission protocol of the listener.

Valid values: tcp: TCP protocol udp: UDP protocol http: HTTP protocolhttps: HTTPS protocol.


certificatesOptional

certificates: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, CertificatesProperty]]]
  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, CertificatesProperty]]]

Property certificates:.


client_affinityOptional

client_affinity: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property clientAffinity: Specifies whether to enable client affinity for the listener.

If you do not specify the default value in the parameter, client affinity is disabled. When client affinity is disabled, the connections from a specific source (client) IP address are not always routed to the same endpoint. If you set the value to SOURCE_IP, client affinity is enabled. When client affinity is enabled, the connections from a specific source (client) IP address are always routed to the same endpoint.


descriptionOptional

description: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property description: The description of the listener.


http_versionOptional

http_version: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property httpVersion: The maximum version of the HTTP protocol.

Valid values: http1.1 http2 http3 Note Only HTTPS listeners support this parameter.


idle_timeoutOptional

idle_timeout: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property idleTimeout: The connection idle timeout period.

Unit: seconds. Valid values: TCP listener: 10 to 900 UDP listener: 10 to 20 HTTP or HTTPS listener: 1 to 60 Note Only listeners support this parameter.


nameOptional

name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property name: The name of the listener.

The name must be 2 to 128 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter or Chinese character.


proxy_protocolOptional

proxy_protocol: typing.Union[bool, IResolvable]
  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property proxyProtocol: Specifies whether to preserve client IP addresses.

Valid values: true: preserves client IP addresses. After this feature is enabled, backend servers can retrieve client IP addresses. false (default): does not preserve client IP addresses.


request_timeoutOptional

request_timeout: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property requestTimeout: The HTTP request timeout period.

Unit: seconds. Valid values: 1 to 180. Default value: 60. Note Only HTTP and HTTPS listeners support this parameter.


security_policy_idOptional

security_policy_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property securityPolicyId: The ID of the security policy.

Valid values: tls_cipher_policy_1_0 tls_cipher_policy_1_1 tls_cipher_policy_1_2 tls_cipher_policy_1_2_strict tls_cipher_policy_1_2_strict_with_1_3 Note Only HTTPS listeners support this parameter.


typeOptional

type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property type: The listener routing type.

Valid values: Standard: the standard routing type CustomRouting: the custom routing type


x_forwarded_for_configOptional

x_forwarded_for_config: typing.Union[IResolvable, XForwardedForConfigProperty]

Property xForwardedForConfig: The configuration of the XForward field.