--- title: "setDesiredCapacity" slug: "compute-autoscaling-setdesiredcapacity" updated: 2026-09-17T09:57:45Z published: 2026-09-17T09:57:45Z canonical: "api.ncloud-docs.com/compute-autoscaling-setdesiredcapacity" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # setDesiredCapacity ## 概要 指定された Auto Scaling Groupの desired capacityを設定 ## リクエスト ### リクエストパラメータ | パラメータ名 | 必須の有無 | タイプ | 制限事項 | 説明 | | --- | --- | --- | --- | --- | | autoScalingGroupName | Yes | String | 最小: 1 最大: 255 | 照会対象のオートスケーリンググループ名を入力 | | desiredCapacity | Yes | Integer | 最小: 0 最大: 30 | 希望するサービス能力で、そのグループに属して運用されるサーバインスタンス数を設定 この値はオートスケーリングに既に設定されている既存の属性である minSizeより小さくてはならず、maxSizeより大きくてはならない | | responseFormatType | No | String | | - レスポンス結果の形式タイプ オプション: xml \| json デフォルト: xml | ## レスポンス ### レスポンスボディ - [AutoScalingGroupList](/docs/ja/common-apidatatype-autoscalinggrouplist) ## 例 ### リクエスト例 ``` {AUTOSCALILNG_API_URL}/setDesiredCapacity ?autoScalingGroupName=asg-1 &desiredCapacity=0 ``` ### レスポンス例 ``` 9b414c18-0b78-4e8f-a20d-4f95a16628be 0 success 1 asg-1 ***517 lc-1 ***013 0 0 0 slb-1 slb-2 600 SVR Server 2014-02-13T17:24:19+0900 2 zone2 nang zone 3 zone3 nang zone2 ``` ​ ## エラーコード 以下のエラーコードは、このアクション(Action)で発生する特徴的なエラーです。共通して発生するエラーについての詳細説明は、[NAVERクラウドプラットフォーム API](/docs/ja/common-ncpapi-index)をご参照ください。 | HTTP Response Code | リターンコード | リターンメッセージ | | --- | --- | --- | | 400 | 50120 | An invalid or out-of-range value was supplied for the input parameter. | | 400 | 50160 | You cannot delete an Auto Scaling group while there are scaling activities in progress for that group. |