--- title: "setDesiredCapacity" slug: "cli-autoscaling-setdesiredcapacity" updated: 2026-09-17T10:11:06Z published: 2026-09-17T10:11:06Z canonical: "cli.ncloud-docs.com/cli-autoscaling-setdesiredcapacity" --- > ## Documentation Index > Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # setDesiredCapacity ## 概要 期待容量値(サービスで期待されるキャパシティ)更新 ## 説明 指定されたAuto Scaling Groupに対して、サービスで期待されるキャパシティの設定が可能です。 ## リクエストパラメータ | パラメータ名 | 必須 | タイプ | 制約事項 | 説明 | | --- | --- | --- | --- | --- | | autoScalingGroupName | Yes | String | Min : 1, Max : 255 | 照会するAuto Scaling Group名を入力します。 | | desiredCapacity | Yes | Integer | Min: 0, Max : 30 | サービスで期待されるキャパシティであり、該当するグループ所属で運用されるサーバインスタンスの数を設定します。 この値はAuto Scalingに、すでに設定されている既存属性のmin sizeより大きく、max sizeより小さく設定する必要があります。 | ## レスポンスデータタイプ - AutoScalingGroupListタイプ | AutoScalingGroupList extends CommonResponse | | --- | | private Integer totalRows; | | private List autoScalingGroupList = new ArrayList(); | | AutoScalingGroup extends BaseObject | | --- | | private String autoScalingGroupName; | | private String launchConfigurationName; | | private Integer desiredCapacity; | | private Integer minSize; | | private Integer maxSize; | | private Integer defaultCooldown; | | private List loadBalancerInstanceSummaryList; | | private Integer healthCheckGracePeriod; | | private CommonCode healthCheckType; | | private Date createDate; | | private List inAutoScalingGroupServerInstanceList; | | private List suspendedProcessList; | | private List zoneList; | | LoadBalancerInstanceSummary extends BaseObject | | --- | | private String loadBalancerInstanceNo; | | private String loadBalancerName; | | InAutoScalingGroupServerInstance extends BaseObject | | --- | | private CommonCode healthStatus; | | private CommonCode lifecycleState; | | private LaunchConfiguration launchConfiguration; | | private String serverInstanceNo; | | private String serverInstanceName; | | SuspendedProcess | | --- | | private CommonCode process; | | private String suspensionReason; | | Zone | | --- | | private String zoneNo; | | private String zoneName; | | private String zoneCode; | | private String zoneDescription; | | private String regionNo; | | private long totalMemorySize; | | private long totalUsedMemorySize; | | private long totalUsePossibleMemorySize; | | CommonCode | | --- | | private String codeKind; | | private String detailCategorizeCode; | | private String code; | | private String codeName; | | private Integer codeOrder; | | private String javaConstantCode; | | LaunchConfiguration | | --- | | private String launchConfigurationName; | | private String serverImageProductCode; | | private String serverProductCode; | | private String memberServerImageNo; | | private String loginKeyName; | | private Date createDate; | | private String userData; | | private List accessControlGroupList; | | AccessControlGroup extends BaseObject | | --- | | private String accessControlGroupConfigurationNo; | | private String accessControlGroupName; | | private String accessControlGroupDescription; | | private boolean isDefault; | | private Date createDate; | ## 例示 ### 呼び出し ``` ncloud autoscaling setDesiredCapacity --autoScalingGroupName soso02 --desiredCapacity 5 ``` ### レスポンス ``` { "setDesiredCapacityResponse": { "requestId": "e1e84571-50a0-451f-8acb-ff8dce840ecc", "returnCode": "0", "returnMessage": "success", "totalRows": 1, "autoScalingGroupList": [ { "autoScalingGroupName": "soso02", "launchConfigurationName": "test-autoscaling", "desiredCapacity": 5, "minSize": 0, "maxSize": 30, "defaultCooldown": 12, "loadBalancerInstanceSummaryList": [], "healthCheckGracePeriod": 42, "healthCheckType": { "code": "SVR", "codeName": "Server" }, "createDate": "2017-08-18T14:11:49+0900", "inAutoScalingGroupServerInstanceList": [ { "healthStatus": { "code": "HLTHY", "codeName": "Healthy (normal)" }, "lifecycleState": { "code": "PNDNG", "codeName": "Pending status" }, "launchConfiguration": { "launchConfigurationName": "test-autoscaling", "serverImageProductCode": "SPSW0LINUX000044", "serverProductCode": "SPSVRSTAND000003", "memberServerImageNo": "", "loginKeyName": "packer-1522153936", "createDate": "2018-04-05T14:53:16+0900", "userData": "" }, "serverInstanceNo": "401886", "serverInstanceName": "s-3a1ry5007bc39y001" }, { "healthStatus": { "code": "HLTHY", "codeName": "Healthy (normal)" }, "lifecycleState": { "code": "PNDNG", "codeName": "Pending status" }, "launchConfiguration": { "launchConfigurationName": "test-autoscaling", "serverImageProductCode": "SPSW0LINUX000044", "serverProductCode": "SPSVRSTAND000003", "memberServerImageNo": "", "loginKeyName": "packer-1522153936", "createDate": "2018-04-05T14:53:16+0900", "userData": "" }, "serverInstanceNo": "401889", "serverInstanceName": "s-3a1ry5007bc39y002" } ], "suspendedProcessList": [], "zoneList": [ { "zoneNo": "2", "zoneName": "KR-1", "zoneCode": "KR-1", "zoneDescription": "KR-1 zone", "regionNo": "1" } ] } ] } } ``` ``` e1e84571-50a0-451f-8acb-ff8dce840ecc 0 success 1 soso02 test-autoscaling 5 0 30 12 42 SVR Server 2017-08-18T14:11:49+0900 HLTHY Healthy (normal) PNDNG Pending status test-autoscaling SPSW0LINUX000044 SPSVRSTAND000003 packer-1522153936 2018-04-05T14:53:16+0900 401886 s-3a1ry5007bc39y001 HLTHY Healthy (normal) PNDNG Pending status test-autoscaling SPSW0LINUX000044 SPSVRSTAND000003 packer-1522153936 2018-04-05T14:53:16+0900 401889 s-3a1ry5007bc39y002 2 KR-1 KR-1 KR-1 zone 1 ```