Skip to content

Listener

This class encapsulates and extends the ROS resource type ALIYUN::ALB::Listener.

Initializers

import com.aliyun.ros.cdk.alb.Listener;
Listener.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .defaultActions(IResolvable)
    .defaultActions(java.util.List<IResolvable)
    .defaultActions(DefaultActionsProperty>)
    .listenerPort(java.lang.Number)
    .listenerPort(IResolvable)
    .listenerProtocol(java.lang.String)
    .listenerProtocol(IResolvable)
    .loadBalancerId(java.lang.String)
    .loadBalancerId(IResolvable)
//  .caCertificates(IResolvable)
//  .caCertificates(java.util.List<IResolvable)
//  .caCertificates(CaCertificatesProperty>)
//  .caEnabled(java.lang.Boolean)
//  .caEnabled(IResolvable)
//  .certificates(IResolvable)
//  .certificates(java.util.List<IResolvable)
//  .certificates(CertificatesProperty>)
//  .gzipEnabled(java.lang.Boolean)
//  .gzipEnabled(IResolvable)
//  .http2Enabled(java.lang.Boolean)
//  .http2Enabled(IResolvable)
//  .idleTimeout(java.lang.Number)
//  .idleTimeout(IResolvable)
//  .listenerDescription(java.lang.String)
//  .listenerDescription(IResolvable)
//  .listenerStatus(java.lang.String)
//  .listenerStatus(IResolvable)
//  .logConfig(IResolvable)
//  .logConfig(LogConfigProperty)
//  .quicConfig(IResolvable)
//  .quicConfig(QuicConfigProperty)
//  .requestTimeout(java.lang.Number)
//  .requestTimeout(IResolvable)
//  .securityPolicyId(java.lang.String)
//  .securityPolicyId(IResolvable)
//  .xForwardedForConfig(IResolvable)
//  .xForwardedForConfig(XForwardedForConfigProperty)
    .build();
Name Type Description
scope com.aliyun.ros.cdk.core.Construct No description.
id java.lang.String No description.
enableResourcePropertyConstraint java.lang.Boolean No description.
defaultActions com.aliyun.ros.cdk.core.IResolvable OR java.util.ListDefaultActionsProperty> Property defaultActions: The default actions for the listener.
listenerPort java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property listenerPort: The frontend port that is used by the ALB instance.
listenerProtocol java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property listenerProtocol: The listener protocol.
loadBalancerId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property loadBalancerId: The ID of the ALB instance.
caCertificates com.aliyun.ros.cdk.core.IResolvable OR java.util.ListCaCertificatesProperty> Property caCertificates: A list of CA certificates for the listener.
caEnabled java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property caEnabled: Specifies whether to enable mutual authentication.
certificates com.aliyun.ros.cdk.core.IResolvable OR java.util.ListCertificatesProperty> Property certificates: A list of server certificates.
gzipEnabled java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property gzipEnabled: Specifies whether to enable gzip compression to compress files of a specific type.
http2Enabled java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property http2Enabled: Specifies whether to enable HTTP\/2.
idleTimeout java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property idleTimeout: The idle timeout in seconds.
listenerDescription java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property listenerDescription: A custom name for the listener.
listenerStatus java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property listenerStatus: The status of the listener.
logConfig com.aliyun.ros.cdk.core.IResolvable OR LogConfigProperty Property logConfig: The configuration information about the access log.
quicConfig com.aliyun.ros.cdk.core.IResolvable OR QuicConfigProperty Property quicConfig: Select a QUIC listener and associate it with the ALB instance.
requestTimeout java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property requestTimeout: The request timeout in seconds.
securityPolicyId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property securityPolicyId: The ID of the security policy.
xForwardedForConfig com.aliyun.ros.cdk.core.IResolvable OR XForwardedForConfigProperty Property xForwardedForConfig: The configuration of X-Forwarded-* headers.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

defaultActionsRequired

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListDefaultActionsProperty>

Property defaultActions: The default actions for the listener.


listenerPortRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property listenerPort: The frontend port that is used by the ALB instance.

Valid values: 1 to 65535.


listenerProtocolRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property listenerProtocol: The listener protocol.

Valid values: HTTP, HTTPS, and QUIC.


loadBalancerIdRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property loadBalancerId: The ID of the ALB instance.


caCertificatesOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListCaCertificatesProperty>

Property caCertificates: A list of CA certificates for the listener.

Only one CA certificate is supported.


caEnabledOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property caEnabled: Specifies whether to enable mutual authentication.

Default false.


certificatesOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListCertificatesProperty>

Property certificates: A list of server certificates.


gzipEnabledOptional

  • Type: java.lang.Boolean OR com.aliyun.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.


http2EnabledOptional

  • Type: java.lang.Boolean OR com.aliyun.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.


idleTimeoutOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property idleTimeout: The idle timeout in seconds.

Valid values: 1 to 600. Default value: 15. If no requests are received on a connection within the idle timeout, the load balancer closes the connection. A new connection is established for the next request.

You can request a quota increase to a maximum of 3,600 seconds.


listenerDescriptionOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property listenerDescription: A custom name for the listener.

The name must be 2 to 256 characters long and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), underscores (_), and Chinese characters.


listenerStatusOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property listenerStatus: The status of the listener.


logConfigOptional

Property logConfig: The configuration information about the access log.


quicConfigOptional

Property quicConfig: Select a QUIC listener and associate it with the ALB instance.


requestTimeoutOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property requestTimeout: The request timeout in seconds.

Valid values: 1 to 600. Default value: 60. If a backend server does not respond within the timeout period, the load balancer returns an HTTP 504 error to the client.

You can request a quota increase to a maximum of 3,600 seconds.


securityPolicyIdOptional

  • Type: java.lang.String OR com.aliyun.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.


xForwardedForConfigOptional

Property xForwardedForConfig: The configuration of X-Forwarded-* headers.


Methods

Name Description
toString Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
addCondition No description.
addCount No description.
addDependency No description.
addResourceDesc No description.
applyRemovalPolicy No description.
fetchCondition No description.
fetchDependency No description.
fetchResourceDesc No description.
getAtt No description.
setMetadata No description.

toString

public java.lang.String toString()

Returns a string representation of this construct.

synthesize

public void synthesize(ISynthesisSession session)

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.

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

fetchCondition

public RosCondition fetchCondition()

fetchDependency

public java.util.List<java.lang.String> fetchDependency()

fetchResourceDesc

public java.lang.String fetchResourceDesc()

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • Type: java.lang.Object

Static Functions

Name Description
isConstruct Return whether the given object is a Construct.

isConstruct

import com.aliyun.ros.cdk.alb.Listener;
Listener.isConstruct(java.lang.Object x)

Return whether the given object is a Construct.

xRequired

  • Type: java.lang.Object

Properties

Name Type Description
node com.aliyun.ros.cdk.core.ConstructNode The construct tree node associated with this construct.
env com.aliyun.ros.cdk.core.IResourceEnvironment The environment this resource belongs to.
ref java.lang.String No description.
stack com.aliyun.ros.cdk.core.Stack The stack in which this resource is defined.
resource com.aliyun.ros.cdk.core.RosResource No description.
attrListenerId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute ListenerId: The ID of the listener.
attrLoadBalancerId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute LoadBalancerId: The ID of the ALB instance.
props ListenerProps No description.

nodeRequired

public ConstructNode getNode();
  • Type: com.aliyun.ros.cdk.core.ConstructNode

The construct tree node associated with this construct.


envRequired

public IResourceEnvironment getEnv();
  • Type: com.aliyun.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

public java.lang.String getRef();
  • Type: java.lang.String

stackRequired

public Stack getStack();
  • Type: com.aliyun.ros.cdk.core.Stack

The stack in which this resource is defined.


resourceOptional

public RosResource getResource();
  • Type: com.aliyun.ros.cdk.core.RosResource

attrListenerIdRequired

public java.lang.Object getAttrListenerId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute ListenerId: The ID of the listener.


attrLoadBalancerIdRequired

public java.lang.Object getAttrLoadBalancerId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute LoadBalancerId: The ID of the ALB instance.


propsRequired

public ListenerProps getProps();