--- title: "putScalingPolicy" slug: "cli-vautoscaling-autoscalinggroup-putscalingpolicy" tags: ["Auto Scaling"] updated: 2026-10-08T09:45:14Z published: 2026-10-08T09:45:14Z canonical: "cli.ncloud-docs.com/cli-vautoscaling-autoscalinggroup-putscalingpolicy" --- > ## 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. # putScalingPolicy VPC環境で利用できます。 Auto Scaling Groupの Scalingポリシーを作成したり変更したりします。 ## 構文 `putScalingPolicy`構文は次の通りです。 ``` ./ncloud vautoscaling putScalingPolicy \ --autoScalingGroupNo \ --adjustmentTypeCode \ --scalingAdjustment \ [--policyNo ] \ [--policyName ] \ [--minAdjustmentStep ] \ [--coolDown ] \ [--regionCode ] \ [--output ] ``` ## オプション `putScalingPolicy`の実行時に指定できるオプションについて説明します。 ### 必須オプション `putScalingPolicy`の必須オプションです。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `--autoScalingGroupNo` | String | Required | Auto Scaling Group番号 - [getAutoScalingGroupList](/docs/ja/cli-vautoscaling-autoscalinggroup-getautoscalinggrouplist)を参照 | | `--adjustmentTypeCode` | String | Required | 調整タイプコード - `CHANG` \| `PRCNT` \| `EXACT` - `CHANG`: 容量変更値 (増減変更、change in capacity) - `PRCNT`: 容量変更パーセンテージ (割合変更、percent change in capacity) - `EXACT`: 設定する正確な容量 (固定値、exact capacity) - [getAdjustmentTypeList](/docs/ja/cli-vautoscaling-autoscalinggroup-getadjustmenttypelist)を参照 | | `--scalingAdjustment` | Integer | Required | 調整値 - 調整タイプに応じて指定 - `CHANG`: `-2147483648`以上 - `PRCNT`: `-100`以上 - `EXACT`: `0`以上 - 最大`2147483647`まで入力可能 - `CHANG`/`PRCNT`は負の数を入力すると減少 | | `--policyNo` | String | Conditional | ポリシー番号 - ポリシー作成時は入力しない - ポリシー変更時は`policyNo`、`policyName`のいずれかは必ず入力 - [getAutoScalingPolicyList](/docs/ja/cli-vautoscaling-autoscalinggroup-getautoscalingpolicylist)を参照 | | `--policyName` | String | Conditional | ポリシー名 - 新しい名前を入力するとポリシーを作成 - 英字の小文字、数字、記号の`-`を組み合わせて1~255文字以内で入力 - 先頭文字は英字の小文字、末尾文字は英字の小文字または数字のみ使用 - 既存の名前を入力するとポリシーを変更 - ポリシー作成時、必ず入力 - ポリシー変更時、`policyNo`、`policyName`のいずれかは必ず入力 - [getAutoScalingPolicyList](/docs/ja/cli-vautoscaling-autoscalinggroup-getautoscalingpolicylist)を参照 | ### 任意オプション `putScalingPolicy`の任意オプションです。指定しない場合、オプションにはデフォルト値が適用されます。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `--minAdjustmentStep` | Integer | Optional | 最小調整幅 - `1``2147483647` - 最小調整幅単位でサーバインスタンス数を変更 - `adjustmentTypeCode`が`PRCNT`の場合にのみ有効 | | `--coolDown` | Integer | Optional | クールダウン (秒) - `0`~`2147483647` (デフォルト: `300`) - Scaling後のサーバ準備に向けたモニタリングの待機時間 | ### 共通オプション `vautoscaling`コマンドで共通して使用するオプションについては、[Auto Scaling (VPC)のオプション](/docs/ja/cli-vautoscaling#%EC%98%B5%EC%85%98)をご参照ください。 ## 例 Scalingポリシーの作成または変更のリクエストが成功すると、Scalingポリシーの構成情報が返されます。 ### コマンド コマンドの例は次の通りです。 ``` ./ncloud vautoscaling putScalingPolicy \ --autoScalingGroupNo 20461037 \ --policyName policy-01 \ --adjustmentTypeCode CHANG \ --scalingAdjustment 1 \ --coolDown 300 \ --regionCode KR \ --output json ``` ### 出力 出力の例は次の通りです。 ``` { "putScalingPolicyResponse": { "totalRows": 1, "scalingPolicyList": [ { "autoScalingGroupNo": "20461037", "policyNo": "28470019", "policyName": "policy-01", "adjustmentType": { "code": "CHANG", "codeName": "容量変更値" }, "scalingAdjustment": 1, "coolDown": 300 } ], "requestId": "a7b8c9d0-e1f2-3456-abcd-789012345678", "returnCode": "0", "returnMessage": "success" } } ```