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.

createTargetGroup

Prev Next

VPC環境で利用できます。

概要

ターゲットグループを作成します。
作成されたターゲットグループは、ロードバランサまたはAuto Scaling Groupで利用できます。

リクエスト

リクエストパラメータ

パラメータ名 要否 タイプ 制約事項 説明
regionCode No String - リージョンコード
ターゲットグループが作成されるリージョン(Region)を決定できる
regionCodeは、getRegionListアクションを通じて取得可能
デフォルト:getRegionList照会結果の最初のリージョンを選択
vpcNo Yes String - VPC番号
ターゲットグループが作成されるVPCを決定する
vpcNoは、getVpcListアクションを通じて取得可能
targetGroupName No String 最小: 3, 最大: 30
アルファベット、数字、特殊文字の「-」のみ入力可能で、先頭文字はアルファベットにする
末尾文字はアルファベットまたは数字にする
- ターゲットグループの名前
デフォルト:NAVERクラウドプラットフォームが自動で付与
targetTypeCode No String - ターゲットタイプコード
ターゲットグループで追加されるターゲットタイプを決定できる
オプション: VSVR (Server (VPC))
targetGroupProtocolTypeCode Yes String - ターゲットグループプロトコルのタイプコード
ターゲットグループのプロトコルタイプを決定する
オプション: TCP | UDP | PROXY_TCP | HTTP | HTTPS
使用するプロトコルに応じて適用可能なロードバランサのタイプが決定される
Network Load Balancer : TCP / UDP
Network Proxy Load Balancer : PROXY_TCP
Application Load Balancer : HTTP / HTTPS
UDPプロトコルはSGN(シンガポール)リージョンでのみ利用できる
targetGroupPort No Integer 最小: 1, 最大: 65534 - ターゲットグループのポート
ターゲットグループで使用するポート番号を決定できる
デフォルト: 80
targetGroupDescription No String 最小: 0, 最大: 1000 Bytes 作成するターゲットグループについての説明
healthCheckProtocolTypeCode Yes String - ヘルスチェックのプロトコルタイプコード
ヘルスチェックに使用するプロトコルのタイプを決定する
オプション: TCP | HTTP | HTTPS
ターゲットグループのプロトコルタイプに応じて選択可能なヘルスチェックプロトコルタイプが制限される
TCP / PROXY_TCP : TCP
HTTP / HTTPS : HTTP / HTTPS
healthCheckPort No Integer 最小: 1, 最大: 65534 - ヘルスチェックのポート
ヘルスチェックに使用するポートを指定できる
デフォルト: 80
healthCheckUrlPath No String - ヘルスチェックのURLパス
ヘルスチェックに使用するURLパスを指定できる
ヘルスチェックのプロトコルタイプがHTTPまたはHTTPSである場合にのみ有効
/文字で始まるURLパスを入力する
デフォルト: /
healthCheckHttpMethodTypeCode Conditional String - ヘルスチェックHTTP Methodタイプコード
ヘルスチェックに使用するHTTP Methodを決定できる
ヘルスチェックプロトコルタイプがHTTPまたはHTTPSである場合には必ず入力
オプション: HEAD | GET
healthCheckCycle No Integer 最小:5、最大:300秒 - ヘルスチェックの周期
ヘルスチェックの周期を決定できる
デフォルト:30秒
healthCheckUpThreshold No Integer 最小: 2, 最大: 10 - ヘルスチェックの正常なしきい値
ヘルスチェックを正常な状態とみなすのに必要な、連続した状態確認の成功回数を決定できる
デフォルト: 2
healthCheckDownThreshold No Integer 最小: 2, 最大: 10 - ヘルスチェックの失敗しきい値
ヘルスチェックを失敗状態とみなすのに必要な、連続した状態確認の失敗回数を決定できる
デフォルト: 2
targetNoList.N No List - ターゲット番号リスト
ターゲットグループにバインドするターゲットリストを決定できる
targetNoはtargetTypeCodeに該当する照会アクションを通じて取得できる
例) targetNoList.1=1234&targetNoList.2=2345
responseFormatType No String - レスポンス結果のフォーマットタイプ
オプション: xml | json
デフォルト: xml

レスポンス

レスポンスデータのタイプ

  • TargetGroupListタイプ
TargetGroupList extends CommonResponse
private Integer totalRows;
private List targetGroupList = new ArrayList<>();
TargetGroup
private String targetGroupNo;
private String targetGroupName;
private CommonCode targetType;
private String vpcNo;
private CommonCode targetGroupProtocolType;
private Integer targetGroupPort;
private String targetGroupDescription;
private Boolean useStickySession;
private Boolean useProxyProtocol;
private CommonCode algorithmType;
private Date createDate;
private String regionCode;
private String loadBalancerInstanceNo;
private CommonCode healthCheckProtocolType;
private Integer healthCheckPort;
private String healthCheckUrlPath;
private CommonCode healthCheckHttpMethodType;
private Integer healthCheckCycle;
private Integer healthCheckUpThreshold;
private Integer healthCheckDownThreshold;
private TargetNoList targetNoList;
TargetNoList
private List targetNoList = new ArrayList<>();

リクエスト例

ncloud vloadbalancer createTargetGroup --regionCode KR --vpcNo ***04 --targetGroupName test-*** --targetTypeCode VSVR --targetGroupProtocolTypeCode VSVR --targetGroupPort 80 --healthCheckProtocolTypeCode HTTP --healthCheckPort 80 --healthCheckUrlPath / --healthCheckHttpMethodTypeCode GET --healthCheckCycle 30 --healthCheckUpThreshold 2 --healthCheckDownThreshold 2

レスポンス例

<createTargetGroupResponse>
  <requestId>b644e5ed-6ca8-48d5-9b7f-2a3549ef3c96</requestId>
  <returnCode>0</returnCode>
  <returnMessage>success</returnMessage>
  <totalRows>1</totalRows>
  <targetGroupList>
    <targetGroup>
      <targetGroupNo>***095</targetGroupNo>
      <targetGroupName>test-***</targetGroupName>
      <targetType>
        <code>VSVR</code>
        <codeName>Server (VPC)</codeName>
      </targetType>
      <vpcNo>***04</vpcNo>
      <targetGroupProtocolType>
        <code>HTTP</code>
        <codeName>HTTP protocol</codeName>
      </targetGroupProtocolType>
      <targetGroupPort>80</targetGroupPort>
      <targetGroupDescription></targetGroupDescription>
      <useStickySession>false</useStickySession>
      <useProxyProtocol>false</useProxyProtocol>
      <algorithmType>
        <code>RR</code>
        <codeName>Round Robin</codeName>
      </algorithmType>
      <createDate>2020-12-17T21:06:45+0900</createDate>
      <regionCode>KR</regionCode>
      <loadBalancerInstanceNo></loadBalancerInstanceNo>
      <healthCheckProtocolType>
        <code>HTTP</code>
        <codeName>HTTP protocol</codeName>
      </healthCheckProtocolType>
      <healthCheckPort>80</healthCheckPort>
      <healthCheckUrlPath>/</healthCheckUrlPath>
      <healthCheckHttpMethodType>
        <code>GET</code>
        <codeName>get</codeName>
      </healthCheckHttpMethodType>
      <healthCheckCycle>30</healthCheckCycle>
      <healthCheckUpThreshold>2</healthCheckUpThreshold>
      <healthCheckDownThreshold>2</healthCheckDownThreshold>
      <targetNoList/>
    </targetGroup>
  </targetGroupList>
</createTargetGroupResponse>