VPC環境で利用できます。
ターゲットグループの設定を変更します。
構文
changeTargetGroupConfiguration構文は次の通りです。
./ncloud vloadbalancer changeTargetGroupConfiguration \
--targetGroupNo <target-group-no> \
[--useStickySession <true|false>] | [--useProxyProtocol <true|false>] \
[--algorithmTypeCode <RR|SIPHS|LC|MH>] \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
オプション
changeTargetGroupConfigurationの実行時に指定できるオプションについて説明します。
必須オプション
changeTargetGroupConfigurationの必須オプションです。
| オプション | タイプ | 必須の有無 | 説明 |
|---|---|---|---|
--targetGroupNo |
String | Required | ターゲットグループの番号 |
--useStickySession |
Boolean | Conditional | セッションごとのアクセス使用
|
--useProxyProtocol |
Boolean | Conditional | プロキシプロトコルを使用するか
|
--algorithmTypeCode |
String | Conditional | ロードバランシングに使用するアルゴリズムのタイプ
|
共通オプション
vloadbalancerコマンドで共通して使用するオプションについては、Load Balancer (VPC)のオプションをご参照ください。
例
ターゲットグループ設定の変更リクエストが成功すると、変更後のターゲットグループの構成情報が返されます。
コマンド
コマンドの例は次の通りです。
./ncloud vloadbalancer changeTargetGroupConfiguration \
--targetGroupNo 55667788 \
--useStickySession true \
--algorithmTypeCode RR \
--regionCode KR \
--output json
出力
出力の例は次の通りです。
{
"changeTargetGroupConfigurationResponse": {
"totalRows": 1,
"targetGroupList": [
{
"targetGroupNo": "55667788",
"targetGroupName": "lb-test-tg",
"targetType": {
"code": "VSVR",
"codeName": "Server (VPC)"
},
"vpcNo": "12345678",
"targetGroupProtocolType": {
"code": "HTTP",
"codeName": "HTTP protocol"
},
"targetGroupPort": 80,
"targetGroupDescription": "Test target group",
"useStickySession": true,
"useProxyProtocol": false,
"algorithmType": {
"code": "RR",
"codeName": "Round Robin"
},
"createDate": "2026-07-07T17:08:44+0900",
"regionCode": "KR",
"loadBalancerInstanceNo": "41112223",
"healthCheckProtocolType": {
"code": "HTTP",
"codeName": "HTTP protocol"
},
"healthCheckPort": 80,
"healthCheckUrlPath": "/",
"healthCheckHttpMethodType": {
"code": "GET",
"codeName": "HTTP GET Method"
},
"healthCheckCycle": 30,
"healthCheckUpThreshold": 2,
"healthCheckDownThreshold": 2,
"targetNoList": [
"34567890"
]
}
],
"requestId": "d4e5f6a7-b8c9-0123-defa-456789012345",
"returnCode": "0",
"returnMessage": "success"
}
}