createTargetGroup
    • PDF

    createTargetGroup

    • PDF

    Article Summary

    VPC環境で利用できます。

    概要

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

    リクエスト

    リクエストパラメータ

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

    この記事は役に立ちましたか?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.