Listener
- Implements: IListener
This class encapsulates and extends the ROS resource type ALIYUN::ALB::ListenerThe , which resource type creates an HTTP, HTTPS, or QUIC listener for an Application Load Balancer (ALB) instance.
Initializers
import ros_cdk_alb
ros_cdk_alb.Listener(
scope: Construct,
id: str,
default_actions: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, DefaultActionsProperty]]],
listener_port: typing.Union[typing.Union[int, float], IResolvable],
listener_protocol: typing.Union[str, IResolvable],
load_balancer_id: typing.Union[str, IResolvable],
ca_certificates: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, CaCertificatesProperty]]] = None,
ca_enabled: typing.Union[bool, IResolvable] = None,
certificates: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, CertificatesProperty]]] = None,
gzip_enabled: typing.Union[bool, IResolvable] = None,
http2_enabled: typing.Union[bool, IResolvable] = None,
idle_timeout: typing.Union[typing.Union[int, float], IResolvable] = None,
listener_description: typing.Union[str, IResolvable] = None,
listener_status: typing.Union[str, IResolvable] = None,
log_config: typing.Union[IResolvable, LogConfigProperty] = None,
quic_config: typing.Union[IResolvable, QuicConfigProperty] = None,
request_timeout: typing.Union[typing.Union[int, float], IResolvable] = None,
security_policy_id: typing.Union[str, IResolvable] = None,
x_forwarded_for_config: typing.Union[IResolvable, XForwardedForConfigProperty] = None,
enable_resource_property_constraint: bool = None
)
| Name | Type | Description |
|---|---|---|
scope | ros_cdk_core.Construct | No description. |
id | str | No description. |
default_actions | typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, DefaultActionsProperty]]] | Property defaultActions: The actions of the rule. |
listener_port | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property listenerPort: The frontend port that is used by the ALB instance. |
listener_protocol | typing.Union[str, ros_cdk_core.IResolvable] | Property listenerProtocol: The listener protocol. |
load_balancer_id | typing.Union[str, ros_cdk_core.IResolvable] | Property loadBalancerId: The ID of the ALB instance. |
ca_certificates | typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, CaCertificatesProperty]]] | Property caCertificates: List of configured CA certificates for listener. |
ca_enabled | typing.Union[bool, ros_cdk_core.IResolvable] | Property caEnabled: Specifies whether to enable mutual authentication. |
certificates | typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, CertificatesProperty]]] | Property certificates: The list of SSL certificates for listener. |
gzip_enabled | typing.Union[bool, ros_cdk_core.IResolvable] | Property gzipEnabled: Specifies whether to enable gzip compression to compress files of a specific type. |
http2_enabled | typing.Union[bool, ros_cdk_core.IResolvable] | Property http2Enabled: Specifies whether to enable HTTP\/2. |
idle_timeout | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property idleTimeout: The timeout period of idle connections. |
listener_description | typing.Union[str, ros_cdk_core.IResolvable] | Property listenerDescription: The description of the listener. |
listener_status | typing.Union[str, ros_cdk_core.IResolvable] | Property listenerStatus: The status of the listener. |
log_config | typing.Union[ros_cdk_core.IResolvable, LogConfigProperty] | Property logConfig: The configuration information about the access log. |
quic_config | typing.Union[ros_cdk_core.IResolvable, QuicConfigProperty] | Property quicConfig: Select a QUIC listener and associate it with the ALB instance. |
request_timeout | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property requestTimeout: The timeout period of the request. |
security_policy_id | typing.Union[str, ros_cdk_core.IResolvable] | Property securityPolicyId: The ID of the security policy. |
x_forwarded_for_config | typing.Union[ros_cdk_core.IResolvable, XForwardedForConfigProperty] | Property xForwardedForConfig: The configuration of the XForward field. |
enable_resource_property_constraint | bool | No description. |
scopeRequired
- Type: ros_cdk_core.Construct
idRequired
- Type: str
default_actionsRequired
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, DefaultActionsProperty]]]
Property defaultActions: The actions of the rule.
listener_portRequired
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property listenerPort: The frontend port that is used by the ALB instance.
Valid values: 1 to 65535.
listener_protocolRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property listenerProtocol: The listener protocol.
Valid values: HTTP, HTTPS, and QUIC.
load_balancer_idRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property loadBalancerId: The ID of the ALB instance.
ca_certificatesOptional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, CaCertificatesProperty]]]
Property caCertificates: List of configured CA certificates for listener.
ca_enabledOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property caEnabled: Specifies whether to enable mutual authentication.
Default false.
certificatesOptional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, CertificatesProperty]]]
Property certificates: The list of SSL certificates for listener.
gzip_enabledOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property gzipEnabled: Specifies whether to enable gzip compression to compress files of a specific type.
Valid values: true and false. Default value: true.
http2_enabledOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property http2Enabled: Specifies whether to enable HTTP\/2.
Default value: on. Valid values: true and false. Default value: true. Note: Only HTTPS listeners support this parameter.
idle_timeoutOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property idleTimeout: The timeout period of idle connections.
Valid values: 1 to 3600. Unit: seconds. Default value: 15. If no requests are received within the specified timeout period, ALB closes the current connection. When a new request is received, ALB establishes a new connection.
listener_descriptionOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property listenerDescription: The description of the listener.
The description must be 2 to 256 characters in length.
listener_statusOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property listenerStatus: The status of the listener.
log_configOptional
- Type: typing.Union[ros_cdk_core.IResolvable, LogConfigProperty]
Property logConfig: The configuration information about the access log.
quic_configOptional
- Type: typing.Union[ros_cdk_core.IResolvable, QuicConfigProperty]
Property quicConfig: Select a QUIC listener and associate it with the ALB instance.
request_timeoutOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property requestTimeout: The timeout period of the request.
Valid values: 1 to 900. Unit: seconds. Default value: 60. If no response is received from the backend server during the request timeout period, ALB sends an HTTP 504 error code to the client.
security_policy_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property securityPolicyId: The ID of the security policy.
System security policies and custom security policies are supported. Default value: tls_cipher_policy_1_0. This value indicates a system security policy. Note: Only HTTPS listeners support this parameter.
x_forwarded_for_configOptional
- Type: typing.Union[ros_cdk_core.IResolvable, XForwardedForConfigProperty]
Property xForwardedForConfig: The configuration of the XForward field.
enable_resource_property_constraintOptional
- Type: bool
Methods
| Name | Description |
|---|---|
to_string | Returns a string representation of this construct. |
synthesize | Allows this construct to emit artifacts into the cloud assembly during synthesis. |
add_condition | No description. |
add_count | No description. |
add_dependency | No description. |
add_resource_desc | No description. |
apply_removal_policy | No description. |
fetch_condition | No description. |
fetch_dependency | No description. |
fetch_resource_desc | No description. |
get_att | No description. |
set_metadata | No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
synthesize
def synthesize(
session: ISynthesisSession
) -> None
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.
- Type: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
fetch_condition
def fetch_condition() -> RosCondition
fetch_dependency
def fetch_dependency() -> typing.List[str]
fetch_resource_desc
def fetch_resource_desc() -> str
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
| Name | Description |
|---|---|
is_construct | Return whether the given object is a Construct. |
is_construct
import ros_cdk_alb
ros_cdk_alb.Listener.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- Type: typing.Any
Properties
| Name | Type | Description |
|---|---|---|
node | ros_cdk_core.ConstructNode | The construct tree node associated with this construct. |
env | ros_cdk_core.IResourceEnvironment | The environment this resource belongs to. |
ref | str | No description. |
stack | ros_cdk_core.Stack | The stack in which this resource is defined. |
resource | ros_cdk_core.RosResource | No description. |
attr_listener_id | typing.Union[str, ros_cdk_core.IResolvable] | Attribute ListenerId: The ID of the listener. |
attr_load_balancer_id | typing.Union[str, ros_cdk_core.IResolvable] | Attribute LoadBalancerId: The ID of the ALB instance. |
props | ListenerProps | No description. |
nodeRequired
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
envRequired
env: IResourceEnvironment
- Type: ros_cdk_core.IResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
refRequired
ref: str
- Type: str
stackRequired
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resourceOptional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_listener_idRequired
attr_listener_id: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute ListenerId: The ID of the listener.
attr_load_balancer_idRequired
attr_load_balancer_id: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute LoadBalancerId: The ID of the ALB instance.
propsRequired
props: ListenerProps
- Type: ListenerProps