Listener
This class encapsulates and extends the ROS resource type ALIYUN::ALB::Listener
, which is used to create an HTTP, HTTPS, or Quick UDP Internet Connections (QUIC) 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)
// .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.List |
Property defaultActions: The actions of the rule. |
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.List |
Property caCertificates: List of configured CA certificates for 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.List |
Property certificates: The list of SSL certificates for listener. |
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 timeout period of idle connections. |
listenerDescription |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property listenerDescription: The description of the listener. |
listenerStatus |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property listenerStatus: The status of the listener. |
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 timeout period of the request. |
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 the XForward field. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
defaultActions
Required
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
DefaultActionsProperty>
Property defaultActions: The actions of the rule.
listenerPort
Required
- 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.
listenerProtocol
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property listenerProtocol: The listener protocol.
Valid values: HTTP, HTTPS, and QUIC.
loadBalancerId
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property loadBalancerId: The ID of the ALB instance.
caCertificates
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
CaCertificatesProperty>
Property caCertificates: List of configured CA certificates for listener.
caEnabled
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property caEnabled: Specifies whether to enable mutual authentication.
Default false.
certificates
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
CertificatesProperty>
Property certificates: The list of SSL certificates for listener.
gzipEnabled
Optional
- 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.
http2Enabled
Optional
- 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.
idleTimeout
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property idleTimeout: The timeout period of idle connections.
Valid values: 1 to 180. Unit: seconds. Default value: 15. If no request is received within the specified timeout period, ALB closes the connection. ALB recreates the connection when a new connection request is received.
listenerDescription
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property listenerDescription: The description of the listener.
The description must be 2 to 256 characters in length.
listenerStatus
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property listenerStatus: The status of the listener.
quicConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR QuicConfigProperty
Property quicConfig: Select a QUIC listener and associate it with the ALB instance.
requestTimeout
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property requestTimeout: The timeout period of the request.
Valid values: 1 to 180. 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.
securityPolicyId
Optional
- 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.
xForwardedForConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR XForwardedForConfigProperty
Property xForwardedForConfig: The configuration of the XForward field.
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. |
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.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- 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.
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node |
com.aliyun.ros.cdk.core.ConstructNode |
The construct tree node associated with this construct. |
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 |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ListenerId: The ID of the listener. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrListenerId
Required
public IResolvable getAttrListenerId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ListenerId: The ID of the listener.