--- title: "getTargetGroupList" slug: "cli-vloadbalancer-targetgroup-gettargetgrouplist" updated: 2026-10-08T09:57:34Z published: 2026-10-08T09:57:34Z canonical: "cli.ncloud-docs.com/cli-vloadbalancer-targetgroup-gettargetgrouplist" --- > ## 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. # getTargetGroupList VPC環境で利用できます。 ターゲットグループリストを照会します。 ## 構文 `getTargetGroupList`構文は次の通りです。 ``` ./ncloud vloadbalancer getTargetGroupList \ [--vpcNo ] \ [--targetTypeCode ] \ [--targetGroupNoList ] \ [--pageNo ] \ [--pageSize ] \ [--sortList ] \ [--regionCode ] \ [--output ] ``` ## オプション `getTargetGroupList`の実行時に指定できるオプションについて説明します。 ### 必須オプション `getTargetGroupList`の必須オプションです。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `--pageSize` | Integer | Conditional | ページごとに表示する結果数 - `pageNo`入力時、必ず入力 - `pageNo`、`pageSize`を利用して結果値をページング処理 | ### 任意オプション `getTargetGroupList`の任意オプションです。指定しない場合、オプションにはデフォルト値が適用されます。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `--vpcNo` | String | Optional | VPC番号 - [getVpcList](/docs/ja/cli-vpc-vpcmanagement-getvpclist)を参照 | | `--targetTypeCode` | String | Optional | ターゲットタイプ - `VSVR`: Server (VPC) | | `--targetGroupNoList` | List | Optional | ターゲットグループの番号リスト - スペースで区切って複数入力可能 (例: `--targetGroupNoList 55667788 55667799`) | | `--pageNo` | Integer | Optional | ページング処理された結果のページ番号 - `1`~N - `pageNo`、`pageSize`を利用して結果値をページング処理 | | `--sortList` | List | Optional | ソートの条件 - 二重引用符の中に{フィールド=‘値’}のペアをコンマで区切って入力 - `sortedBy` (任意): ソート順。`targetGroupNo` (ターゲットグループの番号) \| `targetGroupName` (ターゲットグループの名前) - `sortingOrder` (任意): ソート順。`ASC` (上昇、デフォルト) \| `DESC` (下降) | ### 共通オプション `vloadbalancer`コマンドで共通して使用するオプションについては、[Load Balancer (VPC)のオプション](/docs/ja/cli-vloadbalancer#%EC%98%B5%EC%85%98)をご参照ください。 ## 例 ターゲットグループリストの照会リクエストが成功すると、各ターゲットグループの構成情報が返されます。 ### コマンド コマンドの例は次の通りです。 ``` ./ncloud vloadbalancer getTargetGroupList \ --vpcNo 12345678 \ --targetTypeCode VSVR \ --targetGroupNoList 55667788 55667799 \ --pageNo 1 \ --pageSize 10 \ --sortList "sortedBy='targetGroupNo',sortingOrder='ASC'" \ --regionCode KR \ --output json ``` ### 出力 出力の例は次の通りです。 ``` { "getTargetGroupListResponse": { "totalRows": 2, "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": [] }, { "targetGroupNo": "55667799", "targetGroupName": "lb-test-tg2", "targetType": { "code": "VSVR", "codeName": "Server (VPC)" }, "vpcNo": "12345678", "targetGroupProtocolType": { "code": "HTTP", "codeName": "HTTP protocol" }, "targetGroupPort": 80, "targetGroupDescription": "", "useStickySession": false, "useProxyProtocol": false, "algorithmType": { "code": "RR", "codeName": "Round Robin" }, "createDate": "2026-07-07T17:12:57+0900", "regionCode": "KR", "loadBalancerInstanceNo": "", "healthCheckProtocolType": { "code": "HTTP", "codeName": "HTTP protocol" }, "healthCheckPort": 80, "healthCheckUrlPath": "/", "healthCheckHttpMethodType": { "code": "GET", "codeName": "HTTP GET Method" }, "healthCheckCycle": 30, "healthCheckUpThreshold": 2, "healthCheckDownThreshold": 2, "targetNoList": [] } ], "requestId": "b2c3d4e5-f6a7-8901-bcde-f23456789012", "returnCode": "0", "returnMessage": "success" } } ```