Listener
- Implements: IListener
This class encapsulates and extends the ROS resource type ALIYUN::NLB::Listener.
Initializers
import com.aliyun.ros.cdk.nlb.Listener;
Listener.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.listenerPort(java.lang.Number)
.listenerPort(IResolvable)
.listenerProtocol(java.lang.String)
.listenerProtocol(IResolvable)
.loadBalancerId(java.lang.String)
.loadBalancerId(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)
// .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)
// .serverGroupId(java.lang.String)
// .serverGroupId(IResolvable)
// .serverGroupTuples(IResolvable)
// .serverGroupTuples(java.util.List<IResolvable)
// .serverGroupTuples(ServerGroupTuplesProperty>)
// .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. |
listenerPort | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property listenerPort: Port of the listener,[0, 65535] the portRange setting need 0. |
listenerProtocol | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property listenerProtocol: Listening protocol. |
loadBalancerId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property loadBalancerId: ID of the LoadBalancer. |
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. |
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. |
serverGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property serverGroupId: ID of the ServerGroup. |
serverGroupTuples | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property serverGroupTuples: Multi-server group list. |
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
listenerPortRequired
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property listenerPort: Port of the listener,[0, 65535] the portRange setting need 0.
listenerProtocolRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property listenerProtocol: Listening protocol.
Values: TCP, UDP, or TCPSSL.
loadBalancerIdRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property loadBalancerId: ID of the LoadBalancer.
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.
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
- Type: com.aliyun.ros.cdk.core.IResolvable OR ProxyProtocolV2ConfigProperty
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.
serverGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property serverGroupId: ID of the ServerGroup.
serverGroupTuplesOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
ServerGroupTuplesProperty>
Property serverGroupTuples: Multi-server group list.
When the number of destination server groups is 1, the default value is 100 if no weight is specified. When the number of destination server groups is greater than 1, the user needs to specify the weight value.
startPortOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property startPort: StartPort of the portRange.
tagsOptional
- Type: java.util.List<TagsProperty>
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. |
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.
- 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
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)
- 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.nlb.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. |
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: Id of created Listener. |
attrListenerPort | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ListenerPort: ListenerPort of created Listener. |
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: Id of created Listener.
attrListenerPortRequired
public java.lang.Object getAttrListenerPort();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ListenerPort: ListenerPort of created Listener.
propsRequired
public ListenerProps getProps();
- Type: ListenerProps