You need to enable JavaScript to run this app.
导航

修改监听器下后端服务器的端口和权重

最近更新时间2023.07.03 16:32:39

首次发布时间2022.02.25 18:58:32

本接口用于修改监听器下后端服务器的端口和权重。

请求方法

POST

请求参数

下表列出了接口特定的请求参数以及公共请求参数 Action 和 Version。 其他公共参数,请参见公共参数

名称

类型

是否必选

示例值

描述

Action

String

EditListenerEndpoint

公共参数。该参数表示接口名称。取值:EditListenerEndpoint

Version

String

2021-04-30

公共参数。该参数表示接口版本。取值:2021-04-30。

lb_identity

String

veew-lb2131011027612112****

负载均衡实例的 ID。您可以通过 ListLBs 接口查询负载均衡实例的 ID。

listen_port

Integer

80

监听端口。

listen_port_protocol

String

TCP

监听协议。取值范围:

  • TCP
  • UDP

endpoint_identity

String

veen1128038002028123****

后端服务器的 ID。您可以通过 ListListenerEndpoints 接口查询监听器绑定的后端服务器的信息。

endpoint_uniq

String

0c2a06ca81b7b6b32287d348ed97****

后端服务器的唯一标识。您可以通过 ListListenerEndpoints 接口查询监听器绑定的后端服务器的信息。

endpoint_port

Integer

80

后端服务器的端口。

weight

Integer

20

后端服务器的权重。如果不指定该参数,系统将保留原来的值。

返回数据


请求示例

POST https://veenedge.volcengineapi.com/?Action=EditListenerEndpoint&Version=2021-04-30
&<其他公共参数>
{
  "lb_identity": "veew-lb2131011027612112****",
  "listen_port": 80,
  "listen_port_protocol": "TCP",
  "endpoint_identity": "veen1128038002028123****",
  "endpoint_port": 80,
  "weight": 20,
  "endpoint_uniq": "0c2a06ca81b7b6b32287d348ed9****"
}

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202305311644038DEA0CF49FEB57B2****",
        "Action": "EditListenerEndpoint",
        "Version": "2021-04-30",
        "Service": "veenedge",
        "Region": "cn-north-1"
    }
}

错误码

如果响应正文中包含 Error 字段,则表示 API 请求失败。关于错误码的更多信息,参见错误码