createLoadBalancerInstance

Prev Next

Available in Classic

Create a load balancer instance.

Request

The following describes the request format for the endpoint. The request format is as follows:

Method URI
GET /createLoadBalancerInstance

Request headers

For headers common to all Load Balancer APIs, see Load Balancer common headers.

Request query parameters

The following describes the parameters.

Field Type Required Description
loadBalancerName String Optional Name of the load balancer to create
  • Granted automatically by NAVER Cloud Platform (default)
  • 3 to 30 characters
loadBalancerAlgorithmTypeCode String Optional Type of algorithm to use for load balancing
  • RR (default) | SIPHS | LC
    • RR: Round Robin
    • SIPHS: Source IP Hash
    • LC: Least Connection
loadBalancerDescription String Optional Load balancer description (byte)
  • 0 - 1000
networkUsageTypeCode String Optional Network type of the load balancer
  • PBLIP (default) | PRVT
    • PBLIP (Public): public IP
    • PRVT (Private): private IP
serverInstanceNoList.N String Optional List of server instance numbers to bind to the load balancer
loadBalancerRuleList.N.protocolTypeCode String Required Protocol type of the load balancer rule
  • HTTP | HTTPS | TCP | SSL
loadBalancerRuleList.N.loadBalancerPort Integer Required Port of the load balancer rule
  • 1 - 65534
  • No port duplication on the same load balancer
  • Ports 22, 3389, 64000, 65130, 65131, and 18080 - 18095 are unavailable since they're for load balancer management
loadBalancerRuleList.N.serverPort Integer Required Server port of the load balancer rule
  • 1~65534
  • Ports can be duplicated on the same load balancer
loadBalancerRuleList.N.l7HealthCheckPath String Conditional Health check path of the load balancer rule
  • / (default)
  • URL path that starts with /
  • Required if loadBalancerRuleList.N.protocolTypeCode is HTTP or HTTPS
loadBalancerRuleList.N.certificateName String Conditional Load balancer's SSL certificate name
Entry is required if loadBalancerRuleList.N.protocloTypeCode is SSL or HTTPS
loadBalancerRuleList.N.proxyProtocolUseYn String Optional Whether to use proxy protocol
  • Y | N
    • Y: enable
    • N: disable
  • It can be enabled if loadBalancerRuleList.N.protocloTypeCode is TCP or SSL
loadBalancerRuleList.N.stickySessionUseYn String Optional Whether to use per-session access
  • Y | N
    • Y: enable
    • N: disable
  • It can be enabled if loadBalancerRuleList.N.protocloTypeCode is HTTP or HTTPS
loadBalancerRuleList.N.http2UseYn String Optional Whether to use HTTP/2 protocol
  • Y | N
    • Y: enable
    • N: disable
  • It can be enabled if loadBalancerRuleList.N.protocloTypeCode is HTTPS
loadBalancerRuleList.N.serverProtocolTypeCode String Optional Server's protocol type
  • HTTP (default) | HTTPS
  • It can be set if loadBalancerRuleList.N.protocloTypeCode is HTTPS=
regionNo String Optional Number of the Region in which you want to create the load balancer
  • Check through getRegionList
  • Randomly assigned to a zone in the Korea Region if neither Region nor Zone is entered
  • zoneNoList List<String> Optional List of zone numbers for which you want to create the load balancer
    • Check zoneNo through getRegionList
    • Private IP load balancers can only select 1 zone, and multi-zone support will be available soon

    Request example

    The following is a sample request.

    curl --location 'https://ncloud.apigw.ntruss.com/loadbalancer/v2/createLoadBalancerInstance
    ?loadBalancerRuleList.1.l7HealthCheckPath=/
    &loadBalancerRuleList.1.loadBalancerPort=80
    &loadBalancerRuleList.1.protocolTypeCode=HTTP
    &loadBalancerRuleList.1.serverPort=80'
    --header 'x-ncp-apigw-timestamp: {Timestamp}'
    --header 'x-ncp-iam-access-key: {Access Key}'
    --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
    

    Response

    The following describes the response format.

    Response body

    See LoadBalancerInstance for the response body.

    Response status codes

    For response status codes common to NAVER Cloud Platform, see Ncloud API response status codes.

    Response example

    The following is a sample response.

    <createLoadBalancerInstanceResponse>
        <requestId>1e3eac26-c57e-4c8b-b6b0-ba3fe2330a61</requestId>
        <returnCode>0</returnCode>
        <returnMessage>success</returnMessage>
        <totalRows>1</totalRows>
        <loadBalancerInstanceList>
            <loadBalancerInstance>
                <loadBalancerInstanceNo>********</loadBalancerInstanceNo>
                <virtualIp>***.***.***.***,**.***.***.***</virtualIp>
                <loadBalancerName>YOUR_LOAD_BALANCER</loadBalancerName>
                <loadBalancerAlgorithmType>
                    <code>RR</code>
                    <codeName>Round Robin</codeName>
                </loadBalancerAlgorithmType>
                <loadBalancerDescription></loadBalancerDescription>
                <createDate>2024-06-07T19:28:24+0900</createDate>
                <domainName>slb-24784632.ncloudslb.com</domainName>
                <loadBalancerInstanceStatusName>creating</loadBalancerInstanceStatusName>
                <loadBalancerInstanceStatus>
                    <code>INIT</code>
                    <codeName>NET INIT state</codeName>
                </loadBalancerInstanceStatus>
                <loadBalancerInstanceOperation>
                    <code>USE</code>
                    <codeName>NET USE OP</codeName>
                </loadBalancerInstanceOperation>
                <networkUsageType>
                    <code>PBLIP</code>
                    <codeName>Public</codeName>
                </networkUsageType>
                <isHttpKeepAlive>false</isHttpKeepAlive>
                <connectionTimeout>60</connectionTimeout>
                <certificateName></certificateName>
                <region>
                    <regionNo>1</regionNo>
                    <regionCode>KR</regionCode>
                    <regionName>Korea</regionName>
                </region>
                <zoneList>
                    <zone>
                        <zoneNo>2</zoneNo>
                        <zoneName>KR-1</zoneName>
                        <zoneCode>KR-1</zoneCode>
                        <zoneDescription>Gasan zone</zoneDescription>
                        <regionNo>1</regionNo>
                    </zone>
                </zoneList>
                <loadBalancerRuleList>
                    <loadBalancerRule>
                        <protocolType>
                            <code>HTTP</code>
                            <codeName>http</codeName>
                        </protocolType>
                        <loadBalancerPort>80</loadBalancerPort>
                        <serverPort>80</serverPort>
                        <l7HealthCheckPath>/</l7HealthCheckPath>
                        <certificateName></certificateName>
                        <proxyProtocolUseYn>N</proxyProtocolUseYn>
                        <stickySessionUseYn>N</stickySessionUseYn>
                        <http2UseYn>N</http2UseYn>
                    </loadBalancerRule>
                </loadBalancerRuleList>
                <loadBalancedServerInstanceList/>
            </loadBalancerInstance>
        </loadBalancerInstanceList>
    </createLoadBalancerInstanceResponse>
    

    Response status codes

    The following describes the response status codes.

    HTTP status code Code Message Description
    400 10300 Instance name is already in use. please use other name Instance name can't be duplicated
    400 10105 Unable to create load balancer anymore since contract limitation setting has been exceeded. Number of contract limitation: {0} Number of current contracts: {1} Service usage limit exceeded
    400 23011 We are sorry that {0} cannot be used for load balancer ports since the ports are in use for load balancer management The port already in use for load balancer management
    400 23017 This version of the load balancer can not create with private IP Load balancer that can't be created with private IP addresses
    400 23018 Can not create the load balancer Load balancer creation error
    400 23019 There is no resource for the load balancer No resources on the load balancer
    400 24063 The number of load balancer settings has been exceeded Load balancer setting limits exceeded
    400 24064 The range of usable {0} port is from 1 to 66534 The port number must be between 1 and 66534
    400 24065 {0} Duplicated port number. Port number : {1} Port numbers can't be duplicated
    400 24066 When setting load balancer, Health Check route must be configured to HTTP protocol Required to enter a health check path if the protocol type of the load balancer rule is HTTP
    400 24091 No IP address is assigned to the server instance (no. {0}). No IP address assigned to the server instance
    400 24099 When setting load balancer, Health Check route must be configured to HTTP or HTTPS protocol Required to enter a health check path if the protocol type of the load balancer rule is HTTP or HTTPS
    400 24109 The input parameter instance number is invalid Invalid instance number
    400 24111 The input parameter zone number is invalid Invalid zone number
    400 24120 The input parameter server instance number is invalid Invalid server instance number
    400 24130 The input parameter load balancing algorithm is invalid. Invalid load balancing algorithm
    400 24131 The field {0} in the load balancer rule parameter is invalid The {0} field in the load balancer rule is invalid
    400 24132 The field healthCheckPath in the load balancer rule parameter is invalid. If the protocol is HTTP, it is required. it must start with slash ("/") and contain no blank Health check path required if the protocol type of the load balancer rule is HTTP. The URL path must start with "/" and contain no spaces
    400 24133 The field healthCheckPath in the load balancer rule parameter is invalid. If the protocol is NOT HTTP, it must not be specified Health check path can't be specified unless the protocol type of the load balancer rule is HTTP
    400 24134 The number of input parameter load balancer rules is the minimum of 1, maximum of 5 Character length limit: 1 to 5
    400 24173 Only one zone can be selected for private IP load balancer Only one zone can be entered for load balancers with private IP addresses
    400 24300 The length constraints of the parameter description (memo) were violated. The minimum length is 0 byte, the maximum, 1000 bytes Description must be between 1 and 1000 bytes
    400 25050 (Other)Unable to operate load balancer since use is manipulating the applying server. Unavailable because the server is being applied to a load balancer
    400 25051 Server is already being applied to load balancer The server is already applied by the load balancer
    400 25052 Server {0} is unable to apply to load balancer since it is either in operation or not being suspended The server is running or not stopped and therefore not applicable to the load balancer
    400 26034 An error occurred during certificate verification Certificate verification error
    400 26035 Not found memberNo OR certificateName. Please check your input parameter Unable to find the member ID or the certificate name
    400 26036 Not found memberNo OR certificateName OR privateKey OR publicKeyCertificate. Please check your input parameter Unable to find member ID, certificate name, secret key, or public key
    400 26037 Certificate is being used in another loadBalancer Certificate already in use by another load balancer
    400 26002 The issuer certificate of a looked up certificate could not be found. This normally means the list of trusted certificates is not complete Unable to find the certificate issuer
    400 26003 The CRL of a certificate could not be found Unable to find the CRL
    400 26004 The certificate signature could not be decrypted. This means that the actual signature value could not be determined rather than it not matching the expected value, this is only meaningful for RSA keys Certificate signature decryption failed
    400 26005 The CRL signature could not be decrypted: this means that the actual signature value could not be determined rather than it not matching the expected value. Unused CRL signature decryption failed
    400 26006 The public key in the certificate SubjectPublicKeyInfo could not be read Unable to read the certificate public key
    400 26007 The signature of the certificate is invalid Invalid certificate signature
    400 26008 The signature of the certificate is invalid Invalid certificate signature
    400 26009 The certificate is not yet valid: the notBefore date is after the current time Certificate validity start date is set beyond the current date
    400 26010 The certificate has expired: that is the notAfter date is before the current time Certificate validity expiration date is set before the current date
    400 26011 The CRL is not yet valid Invalid CRL
    400 26012 The CRL has expired Expired CRL
    400 26013 The certificate notBefore field contains an invalid time Invalid certificate validity start date and time
    400 26014 The certificate notAfter field contains an invalid time Invalid certificate validity expiration date and time
    400 26015 The CRL lastUpdate field contains an invalid time CRL's last update date and time is invalid
    400 26016 The CRL nextUpdate field contains an invalid time CRL's next update date and time is invalid
    400 26017 An error occurred trying to allocate memory. This should never happen Memory allocation error
    400 26018 The passed certificate is self signed and the same certificate cannot be found in the list of trusted certificates Self-signed certificate not found in the list of trusted certificates
    400 26019 The certificate chain could be built up using the untrusted certificates but the root could not be found locally Root certificate not found on local computer
    400 26020 The issuer certificate could not be found: this occurs if the issuer certificate of an untrusted certificate cannot be found Unable to find the certificate issuer
    400 26021 No signatures could be verified because the chain contains only one certificate and it is not self signed Signature authentication failed
    400 26022 The certificate chain length is greater than the supplied maximum depth. Unused Certificate chain length limit exceeded
    400 26023 The certificate has been revoked Certificate revoked
    400 26024 A CA certificate is invalid. Either it is not a CA or its extensions are not consistent with the supplied purpose Invalid CA certificate
    400 26025 The basicConstraints path length parameter has been exceeded Authentication path length limit exceeded
    400 26026 The supplied certificate cannot be used for the specified purpose Certificate not available for this purpose
    400 26027 The root CA is not marked as trusted for the specified purpose Root CA certificate not trusted
    400 26028 The root CA is marked to reject the specified purpose Root CA certificate request denied
    400 26029 The current candidate issuer certificate was rejected because its subject name did not match the issuer name of the current certificate. Only displayed when the -issuer_checks option is set Certificate request rejected because subject does not match issuer
    400 26030 The current candidate issuer certificate was rejected because its subject key identifier was present and did not match the authority key identifier current certificate. Only displayed when the -issuer_checks option is set Certificate request rejected because subject key identifier does not match authority key identifier
    400 26031 The current candidate issuer certificate was rejected because its issuer name and serial number was present and did not match the authority key identifier of the current certificate. Only displayed when the -issuer_checks option is set Certificate request rejected because the certificate issuer and serial number do not match the authority key identifier
    400 26032 The current candidate issuer certificate was rejected because its keyUsage extension does not permit certificate signing Certificate request rejected because key purpose extension does not allow signing
    400 26033 An application specific error. Unused Application error
    400 26034 An error occurred during certificate verification Certificate verification error
    400 26035 Not found memberNo OR certificateName. Please check your input parameter Unable to find the member ID or the certificate name
    400 26036 Not found memberNo OR certificateName OR privateKey OR publicKeyCertificate. Please check your input parameter Unable to find member ID, certificate name, secret key, or public key
    400 26037 Certificate is being used in another loadBalancer Certificate already in use by another load balancer
    400 26038 The certificate name required for SSL/HTTPS. Please check your input parameter Certificate name required if the protocol type of the load balancer rule is SSL or HTTPS
    400 26042 Proxy protocol can be set only with TCP, SSL protocols Proxy protocol can only be set if the protocol type of the load balancer rule is TCP or SSL