updateAutoScalingGroup

Prev Next

Available in VPC

Edit the details of an Auto Scaling Group and the launch configuration set for it.

Syntax

The updateAutoScalingGroup syntax is as follows:

./ncloud vautoscaling updateAutoScalingGroup \
    --autoScalingGroupNo <auto-scaling-group-no> \
    [--minSize <min-size>] \
    [--maxSize <max-size>] \
    [--desiredCapacity <desired-capacity>] \
    [--launchConfigurationNo <launch-configuration-no>] \
    [--serverNamePrefix <server-name-prefix>] \
    [--defaultCoolDown <default-cooldown>] \
    [--healthCheckTypeCode <SVR|LOADB>] \
    [--healthCheckGracePeriod <grace-period>] \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

Options

This section describes the options available when running updateAutoScalingGroup.

Required options

The following options are required for updateAutoScalingGroup.

Options Type Required Description
--autoScalingGroupNo String Required Auto Scaling Group number
--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 updateAutoScalingGroup. Unspecified options retain their existing values.

Options Type Required Description
--minSize Integer Optional 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 Optional Maximum number of servers in the Auto Scaling Group
  • 0-30
  • Set to a value greater than or equal to minSize.
--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.
--launchConfigurationNo String Optional Launch configuration number
--serverNamePrefix String Optional Server name prefix
  • :Enter 3-7 characters, including lowercase English letters, numbers, and special character -.
  • The string must begin with a lowercase English letter and end with a lowercase 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.

Common options

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

Examples

If the request to edit an Auto Scaling Group is successful, the configuration information for the edited Auto Scaling Group is returned.

Command

The command example is as follows:

./ncloud vautoscaling updateAutoScalingGroup \
    --autoScalingGroupNo 20461037 \
    --minSize 0 \
    --maxSize 2 \
    --desiredCapacity 0 \
    --defaultCoolDown 600 \
    --regionCode KR \
    --output json

Output

The output example is as follows:

{
    "updateAutoScalingGroupResponse": {
        "totalRows": 1,
        "autoScalingGroupList": [
            {
                "vpcNo": "12345678",
                "subnetNo": "23456789",
                "serverNamePrefix": "test",
                "autoScalingGroupNo": "20461037",
                "autoScalingGroupName": "asg-01",
                "launchConfigurationNo": "18305791",
                "minSize": 0,
                "maxSize": 2,
                "desiredCapacity": 0,
                "defaultCoolDown": 600,
                "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": "d4e5f6a7-b8c9-0123-defa-456789012345",
        "returnCode": "0",
        "returnMessage": "success"
    }
}