getTargetList

Prev Next

Available in VPC

Get the list of targets applied to a target group.

Syntax

The getTargetList syntax is as follows:

./ncloud vloadbalancer getTargetList \
    --targetGroupNo <target-group-no> \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

Options

This section describes the options available when running getTargetList.

Required options

The following options are required for getTargetList.

Options Type Required Description
--targetGroupNo String Required Target group number

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 list is successful, the identification information and health check status for each target are returned.

Command

The command example is as follows:

./ncloud vloadbalancer getTargetList \
    --targetGroupNo 55667788 \
    --regionCode KR \
    --output json

Output

The output example is as follows:

{
  "getTargetListResponse": {
    "totalRows": 1,
    "targetList": [
      {
        "targetNo": "34567890",
        "targetName": "lb-test-target-01",
        "targetIp": "10.0.1.6",
        "healthCheckStatus": {
          "code": "DOWN",
          "codeName": "Health DOWN state"
        },
        "healthCheckResponse": ""
      }
    ],
    "requestId": "a7b8c9d0-e1f2-3456-abcd-789012345678",
    "returnCode": "0",
    "returnMessage": "success"
  }
}