createLoadBalancerInstance
    • PDF

    createLoadBalancerInstance

    • PDF

    Article Summary

    Classic 환경에서 이용 가능합니다.

    개요

    로드밸런서 인스턴스를 생성합니다.

    요청

    요청 헤더

    헤더명설명
    x-ncp-apigw-timestamp1970년 1월 1일 00:00:00 협정 세계시(UTC)부터의 경과 시간을 밀리초(Millisecond)로 나타낸 것
    API Gateway 서버와 시간 차가 5분 이상 나는 경우 유효하지 않은 요청으로 간주
    x-ncp-apigw-api-keyAPI Gateway에서 발급받은 키(v2버전에서는 넣을 필요 없음)
    x-ncp-iam-access-key네이버 클라우드 플랫폼에서 발급받은 API Key 또는 IAM에서 발급받은 AccessKey
    x-ncp-apigw-signature-v2Body를 AccessKey와 맵핑되는 SecretKey로 암호화한 서명
    HMAC 암호화 알고리즘은 HmacSHA256 사용

    요청 파라미터

    파라미터명필수 여부타입제약 사항설명
    loadBalancerNameNoStringMin : 3
    Max : 30
    생성할 로드밸런서명 default : NAVER Cloud Platform에서 알아서 배정
    loadBalancerAlgorithmTypeCodeNoStringMin : 1
    Max : 5
    - 로드밸런서알고리즘구분코드
    입력 가능한 알고리즘:
    RR (ROUND ROBIN)
    LC (LEAST_CONNECTION)
    SIPHS (Source IP Hash)
    default : RR (Round Robin)
    loadBalancerDescriptionNoStringMin : 1
    Max : 1000
    로드밸런서설명
    networkUsageTypeCodeNoStringMin : 1
    Max : 5
    - 네트워크용도구분코드
    공인/사설 IP를 가진 로드밸런서로 생성할지 선택 가능
    PBLIP(공인 IP 로드밸런서) PRVT(사설IP 로드밸런서)
    default : PBLIP(공인 IP 로드밸런서)
    serverInstanceNoList.NNoString중복 불가- 로드밸런서에 바인드할 서버인스턴스 번호리스트
    getLoadBalancancerTargetServerInstanceList 액션을 통해서 서버 인스턴스 번호 조회 가능
    loadBalancerRuleList.N.protocolTypeCodeYesStringMin : 1
    Max : 5
    로드밸런서 RULE에 프로토콜구분코드를 입력
    프로토콜구분코드는 다음 코드가 입력될 수 있음
    HTTP HTTPS TCP SSL
    loadBalancerRuleList.N.loadBalancerPortYesIntegerMin : 1
    Max : 65534
    로드밸런서 RULE에 로드밸런서 포트 설정
    하나의 로드밸런서에서 로드밸런서 포트는 겹침이 없어야 함
    22, 3389, 64000, 65130, 65131, 18080~18095 포트는 로드밸런서 관리용으로 사용되어 이용할 수 없음
    loadBalancerRuleList.N.serverPortYesIntegerMin : 1
    Max : 65534
    - 로드밸런서 RULE의 서버 포트
    하나의 로드밸런서에서 서버 포트는 겹침이 허용됨
    loadBalancerRuleList.N.l7HealthCheckPathConditionalStringMin : 1
    Max : 600
    - 로드밸런서 RULE의 헬스 체크 경로
    loadBalancerRuleList.N.protocolTypeCode 값이 HTTP HTTPS인 경우에는 필수 항목
    loadBalancerRuleList.N.certificateNameConditionalStringMin : 1
    Max : 300
    로드밸런서의 SSL 공인인증서 이름을 입력
    loadBalancerRuleList.N.protocloTypeCode 값이 SSL HTTPS인 경우에는 필수 항목
    loadBalancerRuleList.N.proxyProtocolUseYnNoString- 프록시 프로토콜 사용 여부
    loadBalancerRuleList.N.protocloTypeCode 값이 TCP SSL 인 경우에만 설정 가능
    Options : Y(설정) | N(해제)
    loadBalancerRuleList.N.stickySessionUseYnNoString- 세션별 접근 사용 여부
    loadBalancerRuleList.N.protocloTypeCode 값이 HTTP HTTPS 인 경우에만 설정 가능
    Options : Y(설정) | N(해제)
    loadBalancerRuleList.N.http2UseYnNoString- HTTP/2 프로토콜 사용 여부
    loadBalancerRuleList.N.protocloTypeCode 값이 HTTPS 인 경우에만 설정 가능
    Options : Y(설정) | N(해제)
    loadBalancerRuleList.N.serverProtocolTypeCodeNoString- 서버 프로토콜 구분 코드
    loadBalancerRuleList.N.protocloTypeCode 값이 HTTPS 인 경우에만 설정 가능
    Options : HTTP HTTPS
    Default : HTTP
    regionNoNoString로드밸런서 생성 시 리전 번호를 받아 특정리전에 로드밸런서를 생성
    리전 번호는 getRegionList 액션을 통해서 획득 가능
    리전과 존을 모두 입력하지 않으면 KR 리전의 임의의 존에 배정
    zoneNoListNoList로드밸런서 생성 시 존번호를 받아 특정존에 로드밸런서 생성
    존번호는 getZoneList 액션을 통해 획득 가능
    사설 IP 로드밸런서는 1개의 존만 선택 가능 멀티 존 기능은 지원 예정

    응답

    응답 바디

    예시

    요청 예시

    GET {LOADBALANCER_API_URL}/loadbalancer/v2/createLoadBalancerInstance?loadBalancerRuleList.1.l7HealthCheckPath=/l7check.html&loadBalancerRuleList.1.loadBalancerPort=80&loadBalancerRuleList.1.protocolTypeCode=HTTP&loadBalancerRuleList.1.serverPort=80
    

    응답 예시

    <createLoadBalancerInstanceResponse>
      <requestId>db3af87b-4d25-4cdd-b12a-caf220e1fee2</requestId>
      <returnCode>0</returnCode>
      <returnMessage>success</returnMessage>
      <totalRows>1</totalRows>
      <loadBalancerInstanceList>
        <loadBalancerInstance>
          <loadBalancerInstanceNo>1083198</loadBalancerInstanceNo>
          <virtualIp>49.236.150.49,49.236.151.137</virtualIp>
          <loadBalancerName>loadb1674dfbe5f4</loadBalancerName>
          <zoneList>
            <zone>
              <zoneNo>2</zoneNo>
              <zoneName>KR-1</zoneName>
              <zoneCode>KR-1</zoneCode>
              <zoneDescription>가산 zone</zoneDescription>
              <regionNo>1</regionNo>
            </zone>
            <zone>
              <zoneNo>3</zoneNo>
              <zoneName>KR-2</zoneName>
              <zoneCode>KR-2</zoneCode>
              <zoneDescription>평촌 zone</zoneDescription>
              <regionNo>1</regionNo>
            </zone>
          </zoneList>
          <region>
            <regionNo>1</regionNo>
            <regionCode>KR</regionCode>
            <regionName>Korea</regionName>
          </region>
          <loadBalancerAlgorithmType>
            <code>RR</code>
            <codeName>Round Robin</codeName>
          </loadBalancerAlgorithmType>
          <loadBalancerDescription></loadBalancerDescription>
          <createDate>2018-11-26T12:06:53+0900</createDate>
          <domainName>slb-1083198.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>
          <loadBalancerRuleList>
            <loadBalancerRule>
              <protocolType>
                <code>HTTP</code>
                <codeName>http</codeName>
              </protocolType>
              <loadBalancerPort>80</loadBalancerPort>
              <serverPort>80</serverPort>
              <l7HealthCheckPath>/l7check.html</l7HealthCheckPath>
              <certificateName></certificateName>
              <proxyProtocolUseYn>N</proxyProtocolUseYn>
              <stickySessionUseYn>N</stickySessionUseYn>
              <http2UseYn>N</http2UseYn>
            </loadBalancerRule>
          </loadBalancerRuleList>
          <loadBalancedServerInstanceList/>
        </loadBalancerInstance>
      </loadBalancerInstanceList>
    </createLoadBalancerInstanceResponse>
    

    오류 코드

    아래 오류 코드는 이 액션(Action)에서 특징적으로 발생하는 오류입니다. 공통적으로 발생하는 오류에 대한 상세한 설명은 NAVER Cloud Platform API를 참고해주세요

    HTTP Response Code리턴 코드리턴 메시지
    40010300Instance name is already in use. please use other name.
    40010105Unable to create load balancer anymore since contract limitation setting has been exceeded. Number of contract limitation: {0} Number of current contracts : {1}
    40023011We are sorry that {0} cannot be used for load balancer ports since the ports are in use for load balancer management.
    40023017This version of the load balancer can not create with private IP.
    40023018Can not create the load balancer.
    40023019There is no resource for the load balancer.
    40024063The number of load balancer settings has been exceeded.
    40024064The range of usable {0} port is from 1 to 66534.
    40024065{0} Duplicated port number. Port number : {1}
    40024066When setting load balancer, Health Check route must be configured to HTTP protocol.
    40024091No IP address is assigned to the server instance (no. {0}).
    40024099When setting load balancer, Health Check route must be configured to HTTP or HTTPS protocol.
    40024109The input parameter instance number is invalid
    40024111The input parameter zone number is invalid.
    40024120The input parameter server instance number is invalid.
    40024130The input parameter load balancing algorithm is invalid.
    40024131The field {0} in the load balancer rule parameter is invalid.
    40024132The 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.
    40024133The field healthCheckPath in the load balancer rule parameter is invalid. If the protocol is NOT HTTP, it must not be specified.
    40024134The number of input parameter load balancer rules is the minimum of 1, maximum of 5.
    40024173Only one zone can be selected for private IP load balancer.
    40024300The length constraints of the parameter description (memo) were violated. The minimum length is 0 byte, the maximum, 1,000 bytes.
    40025050(Other)Unable to operate load balancer since use is manipulating the applying server.
    40025051Server is already being applied to load balancer.
    40025052Server {0} is unable to apply to load balancer since it is either in operation or not being suspended.
    40026034An error occurred during certificate verification.
    40026035Not found memberNo OR certificateName. Please check your input parameter.
    40026036Not found memberNo OR certificateName OR privateKey OR publicKeyCertificate. Please check your input parameter.
    40026037Certificate is being used in another loadBalancer.
    40026002The issuer certificate of a looked up certificate could not be found. This normally means the list of trusted certificates is not complete.
    40026003The CRL of a certificate could not be found.
    40026004The 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.
    40026005The 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.
    40026006The public key in the certificate SubjectPublicKeyInfo could not be read.
    40026007The signature of the certificate is invalid.
    40026008The signature of the certificate is invalid.
    40026009The certificate is not yet valid: the notBefore date is after the current time.
    40026010The certificate has expired: that is the notAfter date is before the current time.
    40026011The CRL is not yet valid.
    40026012The CRL has expired.
    40026013The certificate notBefore field contains an invalid time.
    40026014The certificate notAfter field contains an invalid time.
    40026015The CRL lastUpdate field contains an invalid time.
    40026016The CRL nextUpdate field contains an invalid time.
    40026017An error occurred trying to allocate memory. This should never happen.
    40026018The passed certificate is self signed and the same certificate cannot be found in the list of trusted certificates.
    40026019The certificate chain could be built up using the untrusted certificates but the root could not be found locally.
    40026020The issuer certificate could not be found: this occurs if the issuer certificate of an untrusted certificate cannot be found.
    40026021No signatures could be verified because the chain contains only one certificate and it is not self signed.
    40026022The certificate chain length is greater than the supplied maximum depth. Unused.
    40026023The certificate has been revoked.
    40026024A CA certificate is invalid. Either it is not a CA or its extensions are not consistent with the supplied purpose.
    40026025The basicConstraints pathlength parameter has been exceeded.
    40026026The supplied certificate cannot be used for the specified purpose.
    40026027The root CA is not marked as trusted for the specified purpose.
    40026028The root CA is marked to reject the specified purpose.
    40026029The 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.
    40026030The 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.
    40026031The 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.
    40026032The current candidate issuer certificate was rejected because its keyUsage extension does not permit certificate signing.
    40026033An application specific error. Unused.
    40026034An error occurred during certificate verification.
    40026035Not found memberNo OR certificateName. Please check your input parameter.
    40026036Not found memberNo OR certificateName OR privateKey OR publicKeyCertificate. Please check your input parameter.
    40026037Certificate is being used in another loadBalancer.
    40026038The certificate name required for SSL/HTTPS. Please check your input parameter.
    40026042Proxy protocol can be set only with TCP, SSL protocols.

    이 문서가 도움이 되었습니까?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.