---
title: "setTarget"
slug: "cli-vloadbalancer-targetgroup-settarget"
tags: ["Target Group"]
updated: 2026-05-21T09:02:08Z
published: 2026-05-21T09:10:09Z
canonical: "cli-gov.ncloud-docs.com/cli-vloadbalancer-targetgroup-settarget"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://cli-gov.ncloud-docs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# setTarget

VPC 환경에서 이용 가능합니다.

## 개요

타겟 그룹에 적용될 타겟을 설정합니다. 기존에 적용된 타겟 목록과 상관 없이 새로 지정한 타겟 번호 리스트만 바인딩 됩니다. 타겟 번호리스트를 지정하지 않으면 기존에 바인딩된 타겟 목록이 모두 제거됩니다.

## 요청

### 요청 파라미터

| 파라미터명 | 필수 여부 | 타입 | 제약 사항 | 설명 |
| --- | --- | --- | --- | --- |
| regionCode | No | String |  | - 리전 코드 타겟을 바인딩할 타겟 그룹의 리전(Region) 결정 가능 regionCode는 [getRegionList](/docs/cli-vserver-server-common-getregionlist) 액션을 통해 획득 가능 Default : getRegionList 조회 결과의 첫 번째 리전을 선택 |
| targetGroupNo | Yes | String |  | - 타겟 그룹 번호 targetGroupNo는 [getTargetGroupList](/docs/cli-vloadbalancer-targetgroup-gettargetgrouplist) 액션을 통해 획득 가능 |
| targetNoList.N | No | List<String> |  | - 바인딩할 타겟 번호 리스트 타겟 번호리스트를 지정하지 않으면 기존에 바인딩된 타겟 목록이 모두 제거됨 targetNo는 선택한 타겟 그룹의 targetTypeCode에 해당하는 조회 액션을 통해 획득 가능 ex) targetNoList.1=1234&targetNoList.2=2345 |
| responseFormatType | No | String |  | - 응답 결과의 포맷 타입 Options : xml \| json Default : xml |

## 응답

### 응답 데이터 타입

- TargetList 타입

| TargetList extends CommonResponse |
| --- |
| private Integer totalRows; |
| private List<target data-tomark-pass=""> targetList = new ArrayList&lt;&gt;();</target> |

| Target |
| --- |
| private String targetNo; |
| private String targetName; |
| private String targetIp; |
| private CommonCode healthCheckStatus; |
| private String healthCheckResponse; |

## 예시

### 요청 예시

```
ncloud vautoscaling setTarget --regionCode KR --targetGroupNo ***095 --targetNoList ***4299
```

### 응답 예시

요청 수행 후 해당 타겟 그룹에 바인딩된 타겟 리스트

```
<setTargetResponse>
  <requestId>a4f8aa8d-aab1-4bb8-bad6-1d9006453945</requestId>
  <returnCode>0</returnCode>
  <returnMessage>success</returnMessage>
  <totalRows>1</totalRows>
  <targetList>
    <target>
      <targetNo>***4299</targetNo>
      <targetName>test-***</targetName>
      <targetIp>***.***.1.6</targetIp>
      <healthCheckStatus>
        <code>UNUSED</code>
        <codeName>unused Target</codeName>
      </healthCheckStatus>
      <healthCheckResponse></healthCheckResponse>
    </target>
  </targetList>
</setTargetResponse>
```
