getTargetGroupList

Prev Next

Available in VPC

Get the list of target groups.

Syntax

The getTargetGroupList syntax is as follows:

./ncloud vloadbalancer getTargetGroupList \
    [--vpcNo <vpc-no>] \
    [--targetTypeCode <VSVR>] \
    [--targetGroupNoList <target-group-no-list>] \
    [--pageNo <page-no>] \
    [--pageSize <page-size>] \
    [--sortList <sort-condition>] \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

Options

This section describes the options available when running getTargetGroupList.

Required options

The following options are required for getTargetGroupList.

Options Type Required Description
--pageSize Integer Conditional Results to display per page
  • Required when specifying pageNo.
  • Uses pageNo and pageSize to paginate the results.

Optional options

These are the optional options for getTargetGroupList. Options that are not specified will use their default values.

Options Type Required Description
--vpcNo String Optional VPC number
--targetTypeCode String Optional Target type
  • VSVR: Server (VPC)
--targetGroupNoList List Optional List of target group numbers
  • You can enter multiple items separated by spaces (e.g., --targetGroupNoList 55667788 55667799).
--pageNo Integer Optional Page numbers in paged results
  • 1-N
  • Uses pageNo and pageSize to paginate the results.
--sortList List Optional Sort criteria
  • Enter {field='value'} pairs enclosed in quotation marks, separated by commas.
    • sortedBy (optional): Sort criteria. targetGroupNo (target group number) | targetGroupName (target group name)
    • sortingOrder (optional): Sort order ASC (ascending, default) | DESC (descending).

Common options

For information about the options common to all vloadbalancer subcommands, see Load Balancer (VPC) options.

Examples

If the request to retrieve the target group list is successful, the configuration information for each target group is returned.

Command

The command example is as follows:

./ncloud vloadbalancer getTargetGroupList \
    --vpcNo 12345678 \
    --targetTypeCode VSVR \
    --targetGroupNoList 55667788 55667799 \
    --pageNo 1 \
    --pageSize 10 \
    --sortList "sortedBy='targetGroupNo',sortingOrder='ASC'" \
    --regionCode KR \
    --output json

Output

The output example is as follows:

{
  "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"
  }
}