VPC環境で利用できます。
ターゲットグループのヘルスチェック設定を変更します。
構文
changeTargetGroupHealthCheckConfiguration構文は次の通りです。
./ncloud vloadbalancer changeTargetGroupHealthCheckConfiguration \
--targetGroupNo <target-group-no> \
[--healthCheckPort <health-check-port>] \
[--healthCheckUrlPath <health-check-url-path>] \
[--healthCheckHttpMethodTypeCode <HEAD|GET>] \
[--healthCheckCycle <health-check-cycle>] \
[--healthCheckUpThreshold <health-check-up-threshold>] \
[--healthCheckDownThreshold <health-check-down-threshold>] \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
オプション
changeTargetGroupHealthCheckConfigurationの実行時に指定できるオプションについて説明します。
必須オプション
changeTargetGroupHealthCheckConfigurationの必須オプションです。
| オプション | タイプ | 必須の有無 | 説明 |
|---|---|---|---|
--targetGroupNo |
String | Required | ターゲットグループの番号 |
--healthCheckPort |
Integer | Conditional | ターゲットの状態を確認するためにヘルスチェックを実行する際に、ロードバランサが使用するポート
|
--healthCheckUrlPath |
String | Conditional | ヘルスチェックの実行時に使用する URLパス
|
--healthCheckHttpMethodTypeCode |
String | Conditional | ヘルスチェックに使用する HTTPメソッドのタイプ
|
--healthCheckCycle |
Integer | Conditional | ヘルスチェックの周期 (秒)
|
--healthCheckUpThreshold |
Integer | Conditional | ターゲットの状態を正常と判断するために必要な、連続したヘルスチェックの成功回数
|
--healthCheckDownThreshold |
Integer | Conditional | ターゲットの状態を異常と判断するために必要な、連続したヘルスチェックの失敗回数
|
共通オプション
vloadbalancerコマンドで共通して使用するオプションについては、Load Balancer (VPC)のオプションをご参照ください。
例
ターゲットグループのヘルスチェック設定変更リクエストが成功すると、変更後のターゲットグループの構成情報が返されます。
コマンド
コマンドの例は次の通りです。
./ncloud vloadbalancer changeTargetGroupHealthCheckConfiguration \
--targetGroupNo 55667788 \
--healthCheckPort 8080 \
--healthCheckUrlPath /health \
--healthCheckHttpMethodTypeCode GET \
--healthCheckCycle 60 \
--healthCheckUpThreshold 3 \
--healthCheckDownThreshold 3 \
--regionCode KR \
--output json
出力
出力の例は次の通りです。
{
"changeTargetGroupHealthCheckConfigurationResponse": {
"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": "Updated target group description",
"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": 8080,
"healthCheckUrlPath": "/health",
"healthCheckHttpMethodType": {
"code": "GET",
"codeName": "HTTP GET Method"
},
"healthCheckCycle": 60,
"healthCheckUpThreshold": 3,
"healthCheckDownThreshold": 3,
"targetNoList": [
"34567890"
]
}
],
"requestId": "e5f6a7b8-c9d0-1234-efab-567890123456",
"returnCode": "0",
"returnMessage": "success"
}
}