createAutoScalingGroup

Prev Next

Available in VPC

Create an Auto Scaling Group.

Syntax

The createAutoScalingGroup syntax is as follows:

./ncloud vautoscaling createAutoScalingGroup \
    --vpcNo <vpc-no> \
    --subnetNo <subnet-no> \
    --accessControlGroupNoList <acg-no-list> \
    --launchConfigurationNo <launch-configuration-no> \
    --minSize <min-size> \
    --maxSize <max-size> \
    [--desiredCapacity <desired-capacity>] \
    [--autoScalingGroupName <auto-scaling-group-name>] \
    [--serverNamePrefix <server-name-prefix>] \
    [--defaultCoolDown <default-cooldown>] \
    [--healthCheckTypeCode <SVR|LOADB>] \
    [--healthCheckGracePeriod <grace-period>] \
    [--targetGroupNoList <target-group-no-list>] \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

Options

This section describes the options available when running createAutoScalingGroup.

Required options

The following options are required for createAutoScalingGroup.

Options Type Required Description
--vpcNo String Required VPC number
--subnetNo String Required Subnet number
--accessControlGroupNoList List Required ACG number list
  • Applies to servers created during scale-out.
  • You can enter 1 to 3 numbers.
  • You can enter multiple items separated by spaces (e.g., --accessControlGroupNoList 1234 2345).
  • See getAccessControlGroupList.
--launchConfigurationNo String Required Launch configuration number
--minSize Integer Required Minimum number of servers in the Auto Scaling Group
  • 0-30
  • Set to a value less than equal to maxSize.
  • Enter 0 if you do not want to retain any servers.
--maxSize Integer Required Maximum number of servers in the Auto Scaling Group
  • 0-30
  • Set to a value greater than or equal to minSize.
--healthCheckGracePeriod Integer Conditional Health check grace period (second)
  • The time period during which the server is not considered abnormal even if it fails a health check, taking into account initial server startup.
  • 0-2147483647 (default: 300)
  • Required if healthCheckTypeCode is LOADB.

Optional options

These are the optional options for createAutoScalingGroup. Options that are not specified will use their default values.

Options Type Required Description
--desiredCapacity Integer Optional Expected number of servers in the Auto Scaling Group
  • Set to a value between minSize and maxSize (default: minSize).
  • Automatically adjusts the number of servers based on the input value.
--autoScalingGroupName String Optional Auto Scaling Group name
  • Enter 1-255 characters, including lowercase English letters, numbers, and special character -.
  • The string must begin with an English letter and end with an English letter or number.
  • Auto-generated on no input.
--serverNamePrefix String Optional Server name prefix
  • s (default)
  • Enter 3-7 characters, including lowercase English letters, numbers, and special character -.
  • The string must begin with an English letter and end with an English letter or number.
  • Server name rule is {Prefix}-{English letter|number}, with everything but the prefix generated automatically.
--defaultCoolDown Integer Optional Default cooldown (second)
  • 0-2147483647 (default: 300)
  • Monitoring wait time for server readiness after scaling
--healthCheckTypeCode String Optional Health check type code
  • SVR (default) | LOADB
    • SVR: Server
    • LOADB: Load balancer
  • For LOADB, healthCheckGracePeriod is required.
--targetGroupNoList List Optional Target group number list
  • Valid only when healthCheckTypeCode is LOADB.
  • Determines server status based on each group’s health check method and criteria.
  • Multiple entries can be entered, separated by spaces (e.g., --targetGroupNoList 1234 2345).
  • See getTargetGroupList.

Common options

For information on options commonly used in the vautoscaling command, see Auto Scaling (VPC) options.

Examples

If the request to create an Auto Scaling Group is successful, the Auto Scaling Group's configuration information and creation status are returned.

Command

The command example is as follows:

./ncloud vautoscaling createAutoScalingGroup \
    --vpcNo 12345678 \
    --subnetNo 23456789 \
    --accessControlGroupNoList 67890123 \
    --launchConfigurationNo 18305791 \
    --minSize 0 \
    --maxSize 0 \
    --desiredCapacity 0 \
    --autoScalingGroupName asg-01 \
    --serverNamePrefix test \
    --defaultCoolDown 300 \
    --healthCheckTypeCode SVR \
    --regionCode KR \
    --output json

Output

The output example is as follows:

{
    "createAutoScalingGroupResponse": {
        "totalRows": 1,
        "autoScalingGroupList": [
            {
                "vpcNo": "12345678",
                "subnetNo": "23456789",
                "serverNamePrefix": "test",
                "autoScalingGroupNo": "20461037",
                "autoScalingGroupName": "asg-01",
                "launchConfigurationNo": "18305791",
                "minSize": 0,
                "maxSize": 0,
                "desiredCapacity": 0,
                "defaultCoolDown": 300,
                "healthCheckGracePeriod": 300,
                "healthCheckType": {
                    "code": "SVR",
                    "codeName": "Server"
                },
                "createDate": "2026-07-07T10:22:20+0900",
                "autoScalingGroupStatus": {
                    "code": "CREAT",
                    "codeName": "Created"
                },
                "targetGroupNoList": [],
                "inAutoScalingGroupServerInstanceList": [],
                "accessControlGroupNoList": [
                    "67890123"
                ],
                "suspendedProcessList": []
            }
        ],
        "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "returnCode": "0",
        "returnMessage": "success"
    }
}