Skip to content

Listener

This class encapsulates and extends the ROS resource type ALIYUN::NLB::Listener, which is used to create a listener.

Initializers

import com.aliyun.ros.cdk.nlb.Listener;
Listener.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .listenerProtocol(java.lang.String)
    .listenerProtocol(IResolvable)
    .loadBalancerId(java.lang.String)
    .loadBalancerId(IResolvable)
    .serverGroupId(java.lang.String)
    .serverGroupId(IResolvable)
//  .alpnEnabled(java.lang.Boolean)
//  .alpnEnabled(IResolvable)
//  .alpnPolicy(java.lang.String)
//  .alpnPolicy(IResolvable)
//  .caCertificateIds(IResolvable)
//  .caCertificateIds(java.util.List<java.lang.String)
//  .caCertificateIds(IResolvable>)
//  .caEnabled(java.lang.Boolean)
//  .caEnabled(IResolvable)
//  .certificateIds(IResolvable)
//  .certificateIds(java.util.List<java.lang.String)
//  .certificateIds(IResolvable>)
//  .cps(java.lang.Number)
//  .cps(IResolvable)
//  .enable(java.lang.Boolean)
//  .enable(IResolvable)
//  .endPort(java.lang.Number)
//  .endPort(IResolvable)
//  .idleTimeout(java.lang.Number)
//  .idleTimeout(IResolvable)
//  .listenerDescription(java.lang.String)
//  .listenerDescription(IResolvable)
//  .listenerPort(java.lang.Number)
//  .listenerPort(IResolvable)
//  .mss(java.lang.Number)
//  .mss(IResolvable)
//  .proxyProtocolEnabled(java.lang.Boolean)
//  .proxyProtocolEnabled(IResolvable)
//  .proxyProtocolV2Config(IResolvable)
//  .proxyProtocolV2Config(ProxyProtocolV2ConfigProperty)
//  .secSensorEnabled(java.lang.Boolean)
//  .secSensorEnabled(IResolvable)
//  .securityPolicyId(java.lang.String)
//  .securityPolicyId(IResolvable)
//  .startPort(java.lang.Number)
//  .startPort(IResolvable)
//  .tags(java.util.List<TagsProperty>)
    .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.
listenerProtocol java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property listenerProtocol: undefined.
loadBalancerId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property loadBalancerId: ID of the LoadBalancer.
serverGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property serverGroupId: ID of the ServerGroup.
alpnEnabled java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property alpnEnabled: undefined.
alpnPolicy java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property alpnPolicy: Proxy of alpn.
caCertificateIds com.aliyun.ros.cdk.core.IResolvable OR java.util.List Property caCertificateIds: List of the ca certificate ids.
caEnabled java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property caEnabled: Whether to open CA.
certificateIds com.aliyun.ros.cdk.core.IResolvable OR java.util.List Property certificateIds: List of the certificate ids.
cps java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property cps: New connection rate limit of Instance.
enable java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property enable: Whether to start listener or not.
endPort java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property endPort: EndPort of the portRange.
idleTimeout java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property idleTimeout: Specifies the connection idle timeout.
listenerDescription java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property listenerDescription: Description of the listener, [2, 256] characters.
listenerPort java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property listenerPort: Port of the listener,[0, 65535] the portRange setting need 0.
mss java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property mss: Max length of the TCP packet.
proxyProtocolEnabled java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property proxyProtocolEnabled: Whether to enable ppv2 function.
proxyProtocolV2Config com.aliyun.ros.cdk.core.IResolvable OR ProxyProtocolV2ConfigProperty Property proxyProtocolV2Config: ProxyProtocolV2Config of the listener.
secSensorEnabled java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property secSensorEnabled: Whether to enable the second-level monitoring function.
securityPolicyId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property securityPolicyId: Only valid for TcpSSL protocol monitoring.
startPort java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property startPort: StartPort of the portRange.
tags java.util.List<TagsProperty> Property tags: Tags to attach to instance.

scopeRequired

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

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

listenerProtocolRequired

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

Property listenerProtocol: undefined.


loadBalancerIdRequired

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

Property loadBalancerId: ID of the LoadBalancer.


serverGroupIdRequired

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

Property serverGroupId: ID of the ServerGroup.


alpnEnabledOptional

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

Property alpnEnabled: undefined.


alpnPolicyOptional

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

Property alpnPolicy: Proxy of alpn.


caCertificateIdsOptional

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

Property caCertificateIds: List of the ca certificate ids.


caEnabledOptional

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

Property caEnabled: Whether to open CA.


certificateIdsOptional

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

Property certificateIds: List of the certificate ids.


cpsOptional

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

Property cps: New connection rate limit of Instance.


enableOptional

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

Property enable: Whether to start listener or not.

Default True.


endPortOptional

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

Property endPort: EndPort of the portRange.


idleTimeoutOptional

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

Property idleTimeout: Specifies the connection idle timeout.


listenerDescriptionOptional

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

Property listenerDescription: Description of the listener, [2, 256] characters.


listenerPortOptional

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

Property listenerPort: Port of the listener,[0, 65535] the portRange setting need 0.


mssOptional

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

Property mss: Max length of the TCP packet.


proxyProtocolEnabledOptional

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

Property proxyProtocolEnabled: Whether to enable ppv2 function.


proxyProtocolV2ConfigOptional

Property proxyProtocolV2Config: ProxyProtocolV2Config of the listener.


secSensorEnabledOptional

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

Property secSensorEnabled: Whether to enable the second-level monitoring function.


securityPolicyIdOptional

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

Property securityPolicyId: Only valid for TcpSSL protocol monitoring.


startPortOptional

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

Property startPort: StartPort of the portRange.


tagsOptional

Property tags: Tags to attach to instance.

Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.


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.

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

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.nlb.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.
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: Id of created Listener.
attrListenerPort com.aliyun.ros.cdk.core.IResolvable Attribute ListenerPort: ListenerPort of created Listener.

nodeRequired

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

The construct tree node associated with this construct.


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 IResolvable getAttrListenerId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute ListenerId: Id of created Listener.


attrListenerPortRequired

public IResolvable getAttrListenerPort();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute ListenerPort: ListenerPort of created Listener.