Available in VPC
Create a new listener to register with a load balancer.
Syntax
The createLoadBalancerListener syntax is as follows:
./ncloud vloadbalancer createLoadBalancerListener \
--loadBalancerInstanceNo <load-balancer-instance-no> \
--protocolTypeCode <HTTP|HTTPS|TCP|UDP|TLS> \
--port <port> \
--targetGroupNo <target-group-no> \
[--useHttp2 <true|false>] \
[--sslCertificateNo <ssl-certificate-no>] \
[--tlsMinVersionTypeCode <TLSV10|TLSV11|TLSV12>] \
[--cipherSuiteList <cipher-suite-list>] \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
Options
This section describes the options available when running createLoadBalancerListener.
Required options
The following options are required for createLoadBalancerListener.
| Options | Type | Required | Description |
|---|---|---|---|
--loadBalancerInstanceNo |
String | Required | Load balancer instance number |
--protocolTypeCode |
String | Required | Load balancer listener protocol type
|
--port |
Integer | Required | Listener port
|
--targetGroupNo |
String | Required | Target group number
|
--sslCertificateNo |
String | Conditional | SSL certificate number
|
Optional options
These are the optional options for createLoadBalancerListener. Options that are not specified will use their default values.
| Options | Type | Required | Description |
|---|---|---|---|
--useHttp2 |
Boolean | Optional | Whether to use the HTTP/2 protocol
|
--tlsMinVersionTypeCode |
String | Optional | Minimum supported TLS version
|
--cipherSuiteList |
List | Optional | List of cipher suites provided by the load balancer during encryption negotiation with the client
|
Common options
For information about the options common to all vloadbalancer subcommands, see Load Balancer (VPC) options.
Examples
If the request to create a load balancer listener is successful, the configuration information for the listener registered with the load balancer is returned.
Command
The command example is as follows:
./ncloud vloadbalancer createLoadBalancerListener \
--loadBalancerInstanceNo 41112223 \
--protocolTypeCode HTTP \
--port 8080 \
--targetGroupNo 55667799 \
--regionCode KR \
--output json
Output
The output example is as follows:
{
"createLoadBalancerListenerResponse": {
"totalRows": 2,
"loadBalancerListenerList": [
{
"loadBalancerInstanceNo": "41112223",
"loadBalancerListenerNo": "60001111",
"protocolType": {
"code": "HTTP",
"codeName": "HTTP protocol"
},
"port": 80,
"useHttp2": false,
"sslCertificateNo": "",
"tlsMinVersionType": {},
"loadBalancerRuleNoList": [
"70001111"
],
"cipherSuiteList": []
},
{
"loadBalancerInstanceNo": "41112223",
"loadBalancerListenerNo": "60002222",
"protocolType": {
"code": "HTTP",
"codeName": "HTTP protocol"
},
"port": 8080,
"useHttp2": false,
"sslCertificateNo": "",
"tlsMinVersionType": {},
"loadBalancerRuleNoList": [
"70002222"
],
"cipherSuiteList": []
}
],
"requestId": "b8c9d0e1-f2a3-4567-bcde-890123456789",
"returnCode": "0",
"returnMessage": "success"
}
}