changeTargetGroupConfiguration

Prev Next

VPC環境で利用できます。

ターゲットグループの設定を変更します。

リクエスト

リクエスト形式を説明します。リクエスト形式は次の通りです。

メソッド URI
GET /changeTargetGroupConfiguration

リクエストヘッダ

Load Balancer APIで共通して使用されるヘッダの詳細は、Load Balancerの共通ヘッダをご参照ください。

リクエストクエリパラメータ

パラメータの説明は次の通りです。

フィールド タイプ 必須の有無 説明
regionCode String Optional 設定変更対象のターゲットグループのリージョンコード
  • getRegionList照会結果の最初のリージョン(デフォルト)
  • getRegionListを通じて確認
targetGroupNo String Required ターゲットグループの番号
useStickySession Boolean Conditional セッション別アクセスの使用有無
  • true | false
  • ターゲットグループのプロトコルタイプがTCPUDPHTTPまたはHTTPSの場合、設定可能
useProxyProtocol Boolean Conditional プロキシプロトコルの使用有無
  • true | false
  • ターゲットグループのプロトコルタイプがPROXY_TCPの場合、設定可能
algorithmTypeCode String Conditional ロードバランシングに使用するアルゴリズムタイプ
  • RR | SIPHS | LC | MH
    • RR: Round Robin
    • SIPHS: Source IP Hash
    • LC: Least Connection
    • MH: Maglev Hash
  • ターゲットグループのプロトコルタイプに応じて設定可能な値が制限される
    • HTTPHTTPSPROXY_TCPプロトコル: RR | SIPHS | LC
    • TCPUDPプロトコル: RR | MH
responseFormatType String Optional レスポンス結果の形式
  • xml(デフォルト) | json

リクエスト例

リクエストのサンプルコードは次の通りです。

curl --location 'https://ncloud.apigw.ntruss.com/vloadbalancer/v2/changeTargetGroupConfiguration
?regionCode=KR
&targetGroupNo=*******
&useStickySession=false
&algorithmTypeCode=RR'
--header 'x-ncp-apigw-timestamp: {Timestamp}'
--header 'x-ncp-iam-access-key: {Access Key}'
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'

レスポンス

レスポンス形式を説明します。

レスポンスボディ

レスポンスボディの詳細は、TargetGroupListをご参照ください。

レスポンスステータスコード

NAVERクラウドプラットフォームでで共通して使用されるレスポンスステータスコードの詳細は、Ncloud APIのレスポンスステータスコードをご参照ください。

レスポンス例

レスポンスのサンプルコードは次の通りです。

<changeTargetGroupConfigurationResponse>
    <requestId>70f14491-1ab0-4471-8130-2508cd393823</requestId>
    <returnCode>0</returnCode>
    <returnMessage>success</returnMessage>
    <totalRows>1</totalRows>
    <targetGroupList>
        <targetGroup>
            <targetGroupNo>*******</targetGroupNo>
            <targetGroupName>test-*****</targetGroupName>
            <targetType>
                <code>VSVR</code>
                <codeName>Server (VPC)</codeName>
            </targetType>
            <vpcNo>*****</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>2024-06-03T13:30:20+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>HTTP GET Method</codeName>
            </healthCheckHttpMethodType>
            <healthCheckCycle>30</healthCheckCycle>
            <healthCheckUpThreshold>2</healthCheckUpThreshold>
            <healthCheckDownThreshold>2</healthCheckDownThreshold>
            <targetNoList/>
        </targetGroup>
    </targetGroupList>
</changeTargetGroupConfigurationResponse>