createAutoScalingGroup

Prev Next

개요

Auto Scaling Group을 생성합니다.

요청

요청 파라미터

파라미터명 필수 여부 타입 제약 사항 설명
regionCode No String - 리전 코드
Auto Scaling Group이 생성될 리전(Region) 결정 가능
regionCode는 getRegionList 액션을 통해 획득 가능
Default : getRegionList 조회 결과의 첫 번째 리전을 선택
launchConfigurationNo Yes String - Launch Configuration 번호
Scale-out 으로 생성될 서버 관련 정보를 담고 있는 Launch Configuration을 결정함
launchConfigurationNo는 getLaunchConfigurationList 액션을 통해 획득 가능
autoScalingGroupName No String Min : 1, Max : 255
소문자, 숫자, "-"의 특수문자만 허용하며 알파벳 문자로 시작해야 함
영어 또는 숫자로 끝나야 함
- Auto Scaling Group 이름
Default : NAVER Cloud Platform가 자동으로 부여함
vpcNo Yes String - VPC 번호
Auto Scaling이 수행될 VPC를 결정함
vpcNo는 getVpcList 액션을 통해 획득 가능
subnetNo Yes String - Subnet 번호
Auto Scaling이 수행될 Subnet을 결정함
subnetNo는 getSubnetList 액션을 통해 획득 가능
accessControlGroupNoList.N Yes List<String> Min : 1, Max : 3 개 - Scale-out 에 의해 생성되는 서버 그룹에 적용되는 ACG 번호 리스트
최대 3개의 ACG 적용 가능
accessControlGroupNo는 getAccessControlGroupList 액션을 통해 획득 가능
ex) accessControlGroupNoList.1=1234&accessControlGroupNoList.2=2345
serverNamePrefix No String Min : 3, Max : 7
소문자, 숫자, "-"의 특수문자만 허용하며 알파벳 문자로 시작해야 함
영어 또는 숫자로 끝나야 함
- Scale-out 에 의해 생성되는 서버 이름의 Prefix
서버의 이름 규칙은 [Prefix]-[영문|숫자] 로, 설정한 Prefix를 제외한 나머지 영문, 숫자는 무작위로 자동 생성됨
Default : s
minSize Yes Integer Min : 0, Max : 30 - 최소 용량
Auto Scaling Group의 최소 서버 수이며 항상 이 값보다 크거나 같은 서버 수가 유지됨
서버를 한 대도 보유하지 않을 수 있게하려면 0으로 설정함
maxSize 보다 작거나 같은 값이어야 함
maxSize Yes Integer Min : 0, Max : 30 - 최대 용량
Auto Scaling Group에서 생성 가능한 최대 서버 수
minSize 보다 크거나 같은 값이어야 함
desiredCapacity No Integer Min : 0, Max : 30 - 기대 용량
기대 용량값에 따라서 서버의 수가 조정됨
minSize 보다 크거나 같고, maxSize 보다 작거나 같은 값이어야 함
Default : minSize와 같은 값
defaultCoolDown No Integer Min : 0, Max : 2147483647 - 쿨다운 기본값
새로운 서버가 생성되었다고 해도, 초기화 스크립트 실행이나 업데이트 설치 등의 이유로 실제 서비스를 수행할 수 있을 정도로 준비되기까지는 시간이 소요될 수 있음
쿨다운(Cooldown) 시간이란 실제 Scaling이 수행 중이거나 수행 완료된 이후에 모니터링 이벤트 알람이 발생하더라도 반응하지 않고 무시하도록 설정한 기간
Default : 300 초
healthCheckGracePeriod Conditional Integer Min : 0, Max : 2147483647 - 헬스 체크 보류 기간
서버 인스턴스가 생성되어 상태가 ‘운영 중’으로 변했더라도, 서버의 업데이트 설치 등 작업에 의해서 헬스 체크에 정상 응답하지 못하는 경우가 생길 수 있음
이런 경우 헬스 체크 보류 기간을 지정하면 해당 기간 동안에는 헬스 체크에 실패하더라도 서버 헬스에 이상이 있다고 판단하지 않음
healthCheckTypeCode 가 LOADB 인 경우 반드시 입력함
Default : 300 초
healthCheckTypeCode No String - 헬스 체크 유형 코드
헬스 체크 유형 결정 가능
LOADB 인 경우 healthCheckGracePeriod 값을 반드시 입력해야 하며 타겟 그룹 리스트를 지정할 수 있고, 각 타겟 그룹의 헬스 체크 방식과 기준에 따라 서버의 상태를 판단함
Options : SVR (Server) | LOADB (Load Balancer)
Default : SVR
targetGroupNoList.N No List<String> - 타겟 그룹 번호 리스트
healthCheckTypeCode 가 LOADB 인 경우에만 유효하며 각 타겟 그룹의 헬스 체크 방식과 기준에 따라 서버의 상태 판단 가능
targetGroupNo는 getTargetGroupList 액션을 통해 획득 가능
ex) targetGroupNoList.1=1234&targetGroupNoList.2=2345
responseFormatType No String - 응답 결과의 포맷 타입
Options : xml | json
Default : xml

응답

응답 데이터 타입

  • AutoScalingGroupList 타입
AutoScalingGroupList extends CommonResponse
private Integer totalRows;
private List autoScalingGroup = new ArrayList<>();
AutoScalingGroup
private String vpcNo;
private String subnetNo;
private String serverNamePrefix;
private String autoScalingGroupNo;
private String autoScalingGroupName;
private String launchConfigurationNo;
private Integer minSize;
private Integer maxSize;
private Integer desiredCapacity;
private Integer defaultCoolDown;
private Integer healthCheckGracePeriod;
private CommonCode healthCheckType;
private Date createDate;
private CommonCode autoScalingGroupStatus;
private TargetGroupNoList targetGroupNoList;
private List inAutoScalingGroupServerInstanceList;
private AccessControlGroupNoList accessControlGroupNoList;
private List suspendedProcessList;
TargetGroupNoList
private List targetGroupNoList = new ArrayList<>();
InAutoScalingGroupServerInstance
private String serverInstanceNo;
private CommonCode healthStatus;
private CommonCode lifecycleState;
AccessControlGroupNoList
private List accessControlGroupNoList = new ArrayList<>();
SuspendedProcess
private CommonCode process;
private String suspensionReason;

예시

요청 예시

ncloud vautoscaling createAutoScalingGroup --regionCode FKR --launchConfigurationNo ***163 --autoScalingGroupName test-*** --vpcNo ***04 --subnetNo ***43 --accessControlGroupNoList ***63 --serverNamePrefix test --minSize 0 --maxSize 0 --desiredCapacity 0 --defaultCoolDown 300 --healthCheckGracePeriod 300 --healthCheckTypeCode SVR

응답 예시

<createAutoScalingGroupResponse>
  <requestId></requestId>
  <returnCode>0</returnCode>
  <returnMessage>success</returnMessage>
  <totalRows>1</totalRows>
  <autoScalingGroupList>
    <autoScalingGroup>
      <vpcNo>***04</vpcNo>
      <subnetNo>***43</subnetNo>
      <serverNamePrefix>test</serverNamePrefix>
      <autoScalingGroupNo>***700</autoScalingGroupNo>
      <autoScalingGroupName>test-***</autoScalingGroupName>
      <launchConfigurationNo>***163</launchConfigurationNo>
      <minSize>0</minSize>
      <maxSize>0</maxSize>
      <desiredCapacity>0</desiredCapacity>
      <defaultCoolDown>300</defaultCoolDown>
      <healthCheckGracePeriod>300</healthCheckGracePeriod>
      <healthCheckType>
        <code>SVR</code>
        <codeName>Server</codeName>
      </healthCheckType>
      <createDate>2020-12-07T13:10:30+0900</createDate>
      <autoScalingGroupStatus>
        <code>CREAT</code>
        <codeName>Created</codeName>
      </autoScalingGroupStatus>
      <targetGroupNoList/>
      <inAutoScalingGroupServerInstanceList/>
      <accessControlGroupNoList>
        <accessControlGroupNo>***63</accessControlGroupNo>
      </accessControlGroupNoList>
      <suspendedProcessList/>
    </autoScalingGroup>
  </autoScalingGroupList>
</createAutoScalingGroupResponse>