createTargetGroup

Prev Next

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

개요

타겟 그룹을 생성합니다.
생성된 타겟 그룹은 로드밸런서 또는 Auto Scaling Group 에서 이용 가능합니다.

요청

요청 파라미터

파라미터명 필수 여부 타입 제약 사항 설명
regionCode No String - 리전 코드
타겟 그룹이 생성될 리전(Region) 결정 가능
regionCode는 getRegionList 액션을 통해 획득 가능
Default : getRegionList 조회 결과의 첫 번째 리전을 선택
vpcNo Yes String - VPC 번호
타겟 그룹이 생성될 VPC를 결정함
vpcNo는 getVpcList 액션을 통해 획득 가능
targetGroupName No String Min : 3, Max : 30
영어, 숫자, "-"의 특수문자만 허용하며 영어로 시작해야 함
영어 또는 숫자로 끝나야 함
- 타겟 그룹 이름
Default : NAVER Cloud Platform가 자동으로 부여함
targetTypeCode No String - 타겟 유형 코드
타겟 그룹에 추가될 타겟 유형 결정 가능
Options : VSVR (Server (VPC))
targetGroupProtocolTypeCode Yes String - 타겟 그룹 프로토콜 유형 코드
타겟 그룹의 프로토콜 유형 결정
Options : TCP | UDP | PROXY_TCP | HTTP | HTTPS
사용하는 프로토콜에 따라서 적용 가능한 로드밸런서의 유형이 결정됨
Network Load Balancer : TCP / UDP
Network Proxy Load Balancer : PROXY_TCP
Application Load Balancer : HTTP / HTTPS
UDP 프로토콜은 네이버 클라우드 플랫폼[공공기관용] 에서 이용 불가
targetGroupPort No Integer Min : 1, Max : 65534 - 타겟 그룹 포트
타겟 그룹에서 사용할 포트 번호 결정 가능
Default : 80
targetGroupDescription No String Min : 0, Max : 1000 Bytes 생성할 타겟 그룹에 대한 설명
healthCheckProtocolTypeCode Yes String - 헬스 체크 프로토콜 유형 코드
헬스 체크에 사용할 프로토콜 유형을 결정함
Options : TCP | HTTP | HTTPS
타겟 그룹 프로토콜 유형에 따라서 선택 가능한 헬스 체크 프로토콜 유형이 제한됨
TCP / PROXY_TCP : TCP
HTTP / HTTPS : HTTP / HTTPS
healthCheckPort No Integer Min : 1, Max : 65534 - 헬스 체크 포트
헬스 체크에 사용할 포트를 지정할 수 있음
Default : 80
healthCheckUrlPath No String - 헬스 체크 URL 경로
헬스 체크에 사용할 URL 경로를 지정할 수 있음
헬스 체크 프로토콜 유형이 HTTP 또는 HTTPS 인 경우에만 유효함
/ 문자로 시작하는 URL 경로를 입력함
Default : /
healthCheckHttpMethodTypeCode Conditional String - 헬스 체크 HTTP Method 유형 코드
헬스 체크에 사용할 HTTP Method 를 결정할 수 있음
헬스 체크 프로토콜 유형이 HTTP 또는 HTTPS 인 경우에는 반드시 입력함
Options : HEAD | GET
healthCheckCycle No Integer Min : 5, Max : 300 초 - 헬스 체크 주기
헬스 체크 주기를 결정할 수 있음
Default : 30 초
healthCheckUpThreshold No Integer Min : 2, Max : 10 - 헬스 체크 정상 임계값
헬스 체크를 정상 상태로 간주하기까지 필요한 연속적인 상태 확인 성공 횟수를 결정 할 수 있음
Default : 2
healthCheckDownThreshold No Integer Min : 2, Max : 10 - 헬스 체크 실패 임계값
헬스 체크를 실패 상태로 간주하기까지 필요한 연속적인 상태 확인 실패 횟수를 결정 할 수 있음
Default : 2
targetNoList.N No List<String> - 타겟 번호 리스트
타겟 그룹에 바인딩할 타겟 리스트 결정 가능
targetNo는 targetTypeCode에 해당하는 조회 액션을 통해 획득 가능
ex) --targetNoList 1234 --targetNoList 2345

응답

응답 데이터 타입

  • TargetGroupList 타입
TargetGroupList extends CommonResponse
private Integer totalRows;
private List targetGroupList = new ArrayList<>();
TargetGroup
private String targetGroupNo;
private String targetGroupName;
private CommonCode targetType;
private String vpcNo;
private CommonCode targetGroupProtocolType;
private Integer targetGroupPort;
private String targetGroupDescription;
private Boolean useStickySession;
private Boolean useProxyProtocol;
private CommonCode algorithmType;
private Date createDate;
private String regionCode;
private String loadBalancerInstanceNo;
private CommonCode healthCheckProtocolType;
private Integer healthCheckPort;
private String healthCheckUrlPath;
private CommonCode healthCheckHttpMethodType;
private Integer healthCheckCycle;
private Integer healthCheckUpThreshold;
private Integer healthCheckDownThreshold;
private TargetNoList targetNoList;
TargetNoList
private List targetNoList = new ArrayList<>();

예시

요청 예시

ncloud vloadbalancer createTargetGroup --regionCode KR --vpcNo ***04 --targetGroupName test-*** --targetTypeCode VSVR --targetGroupProtocolTypeCode VSVR --targetGroupPort 80 --healthCheckProtocolTypeCode HTTP --healthCheckPort 80 --healthCheckUrlPath / --healthCheckHttpMethodTypeCode GET --healthCheckCycle 30 --healthCheckUpThreshold 2 --healthCheckDownThreshold 2

응답 예시

<createTargetGroupResponse>
  <requestId>b644e5ed-6ca8-48d5-9b7f-2a3549ef3c96</requestId>
  <returnCode>0</returnCode>
  <returnMessage>success</returnMessage>
  <totalRows>1</totalRows>
  <targetGroupList>
    <targetGroup>
      <targetGroupNo>***095</targetGroupNo>
      <targetGroupName>test-***</targetGroupName>
      <targetType>
        <code>VSVR</code>
        <codeName>Server (VPC)</codeName>
      </targetType>
      <vpcNo>***04</vpcNo>
      <targetGroupProtocolType>
        <code>HTTP</code>
        <codeName>HTTP protocol</codeName>
      </targetGroupProtocolType>
      <targetGroupPort>80</targetGroupPort>
      <targetGroupDescription></targetGroupDescription>
      <useStickySession>false</useStickySession>
      <useProxyProtocol>false</useProxyProtocol>
      <algorithmType>
        <code>RR</code>
        <codeName>Round Robin</codeName>
      </algorithmType>
      <createDate>2020-12-17T21:06:45+0900</createDate>
      <regionCode>KR</regionCode>
      <loadBalancerInstanceNo></loadBalancerInstanceNo>
      <healthCheckProtocolType>
        <code>HTTP</code>
        <codeName>HTTP protocol</codeName>
      </healthCheckProtocolType>
      <healthCheckPort>80</healthCheckPort>
      <healthCheckUrlPath>/</healthCheckUrlPath>
      <healthCheckHttpMethodType>
        <code>GET</code>
        <codeName>get</codeName>
      </healthCheckHttpMethodType>
      <healthCheckCycle>30</healthCheckCycle>
      <healthCheckUpThreshold>2</healthCheckUpThreshold>
      <healthCheckDownThreshold>2</healthCheckDownThreshold>
      <targetNoList/>
    </targetGroup>
  </targetGroupList>
</createTargetGroupResponse>