全部产品
Search
文档中心

边缘安全加速:UpdateTransportLayerApplication - 更新四层加速应用

更新时间:Jun 25, 2026

修改指定站点下四层应用的转发规则等配置。

接口说明

如果 ListTransportLayerApplications 返回空的四层加速应用列表,需要使用 CreateTransportLayerApplication 创建四层加速应用,再使用此 API 修改四层加速应用的多项配置。

创建四层加速应用时,选择的站点必须是已激活的站点。创建站点后,调用 API VerifySite 进行校验,通过校验的站点将自动被激活,即响应参数 Passed=true。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

esa:UpdateTransportLayerApplication

update

*全部资源

*

请求参数

名称

类型

必填

描述

示例值

SiteId

integer

站点 ID,可通过调用 ListSites 接口获取。

123456****

ApplicationId

integer

四层应用 ID,可通过调用 ListTransportLayerApplications 接口获取。

165503967****

Rules

array<object>

转发规则列表。规则详情。每一条规则,除备注外,其他参数为必填。

object

规则详情。每一条规则,除备注外,其他参数为必填。

Protocol

string

转发规则协议,支持:

  • TCP:TCP 协议。

  • UDP:UDP 协议。

枚举值:

  • TCP :

    TCP 协议

  • UDP :

    UDP 协议

TCP

EdgePort

string

边缘端口。支持:

  • 单个端口,例如 80。

  • 端口范围,例如 81-85,代表端口 81、82、83、84、85。

  • 端口和端口范围组合,端口、端口范围之间用逗号分隔,例如 80,81-85,90,代表端口 80、81、82、83、84、85、90。

  • 单个规则的边缘端口以及多个规则之间的边缘端口不允许重叠。

80

SourceType

string

源站类型,支持:

  • ip: IP。

  • domain: 域名。

  • OP: 源地址池。

  • LB: 负载均衡器。

枚举值:

  • OP :

    源地址池

  • LB :

    负载均衡器

  • ip :

    IP

  • domain :

    域名

ip

SourcePort

string

源站端口。支持:

  • 单个端口,当源站端口为单个端口时,支持任意合法的边缘端口组合。

  • 端口范围,仅当边缘端口为端口段时,源站端口才允许设置为端口范围且范围大小需要与边缘端口一致。例如边缘端口若为 90-93,则不允许将源站端口设置为 81-85,因为源站端口范围为 5,边缘端口范围为 3,两者不一致。

80

ClientIPPassThroughMode

string

客户端 IP 传递协议,支持:

  • off: 不传递。

  • PPv1: PROXY Protocol v1 协议,支持 TCP 协议的客户端 IP 传递。

  • PPv2: PROXY Protocol v2 协议,支持 TCP 和 UDP 协议的客户端 IP 传递。

  • SPP: Simple Proxy Protocol 协议,支持 UDP 协议的客户端 IP 传递。

枚举值:

  • SPP :

    Simple Proxy Protocol 协议

  • PPv2 :

    PROXY Protocol v2 协议

  • off :

    不传递

  • PPv1 :

    PROXY Protocol v1 协议

SPP

Source

string

源站具体的值。

1.1.1.1

Comment

string

规则的备注信息。

123

IpAccessRule

string

IP 访问规则开关,开启后,WAF 中的 IP 访问规则对四层应用生效。

  • on: 开启。

  • off:关闭。

枚举值:

  • off :

    关闭

  • on :

    开启

on

Ipv6

string

Ipv6 开关。取值范围:

  • on:开启。

  • off:关闭。

枚举值:

  • off :

    关闭

  • on :

    开启

on

CrossBorderOptimization

string

是否开启中国大陆网络接入优化,默认关闭。取值范围:

  • on:开启。

  • off:关闭。

枚举值:

  • off :

    关闭

  • on :

    开启

on

StaticIp

string

是否开启固定 IP,默认关闭。取值范围:

  • on: 开启。

  • off: 关闭。

off

KeepAliveProtection

string

是否开启连接保持防护,默认关闭。取值范围:

  • on: 开启。

  • off: 关闭。

枚举值:

  • off :

    关闭

  • on :

    开启

off

返回参数

名称

类型

描述

示例值

object

成功请求的响应。

RequestId

string

请求 ID。

9e5448c7-edaf-49aa-9887-0fcd0832306c

示例

正常返回示例

JSON格式

{
  "RequestId": "9e5448c7-edaf-49aa-9887-0fcd0832306c"
}

错误码

HTTP status code

错误码

错误信息

描述

400 InvalidParameter The specified parameter is invalid. 输入参数规范校验失败。
400 ApplyVipError Failed to apply for ip resources, please contact customer service. 申请IP资源失败,请联系客服。
400 InternalException Failed to call the service. Try again later or contact technical support. 调用服务失败,请稍后重试或联系客服咨询详情。
400 InvalidParameter.RecordData Invalid record content. Adjust your configurations based on the API documentation. 记录内容参数错误,请根据接口文档调整参数内容。
400 InvalidParameter.RecordType Invalid record type. Adjust your configurations based on the API documentation. 记录类型错误,请根据接口文档调整参数内容。
400 Instance.NotOnline Your plan is unavailable due to an overdue payment. Complete the payment first. 您的套餐实例因欠费当前处于非上线状态,请先完成续费操作以继续使用。
400 QuotaExceed.RecordCount The maximum number of records has been reached. Delete some and try again or upgrade your plan. 记录数量已达上限,请删除部分记录后重试或升级套餐。
400 Record.Conflict The specified record content conflicts with existing records. Adjust your configurations based on the related product documentation. 和已有记录冲突,请根据冲突规则的产品文档调整记录内容。
400 Site.ServiceBusy This website is being configured. Try again later. 该站点正在配置中,请稍后再试。
400 TransportLayerApplicationNotExist The layer -4 accelerated application of the current operation does not exist. Modify it and try again. 当前操作的四层加速应用不存在,请修改后重试。
400 TransportLayerRulesExceedLimit The configured forwarding rules have exceeded the maximum limit. Delete useless forwarding rules and try again. 您配置的转发规则已经超过了最大限制,请删除无用的转发规则后进行重试。
400 SourceCircleExist The host record of the resource to be operated on is already the source station of another resource, or the source station of the current resource has been added as a host record. To avoid loopback, modify the host record or source station and retry. 当前要操作资源的主机记录已经是其他资源的源站,或者当前资源的源站已经被添加为主机记录,为避免回环产生,请修改主机记录或者源站后进行重试。
400 InvalidParameter.InvalidRecordName The record name you entered does not meet the specifications. Change the record name according to the product documentation. 您输入的记录名称不符合规范,请根据产品文档调整记录名称。
400 EdgePortsOverlap There is overlap between multiple edge ports, please check and try again after modification. 多个边缘端口之间存在重叠,请检查后进行修改重试。
400 InvalidParameter.ClientIpPassThroughMode Invalid client IP transfer protocol, please refer to the interface document and pass in valid parameters. 无效的客户端IP传递协议,请参考接口文档,传入合法的参数。
400 InvalidParameter.RuleSource The origin of the forwarding rule does not exist or is invalid. Enter the correct origin and try again. 转发规则的源站不存在或者不合法,请传入正确的源站后进行重试。
400 InvalidParameter.Port Invalid edge port or origin port. Enter a valid port as required in the interface document. 无效的边缘端口或者源站端口,请按照接口文档中的要求,传入合法的端口。
400 InvalidParameter.Protocol Invalid port protocol. Enter a valid port protocol as required by the interface documentation. 无效的端口协议,请按照接口文档的要求,传入合法的端口协议。
400 InternalError An internal exception occurred, please try again later. 触发内部异常,请稍后再试。
400 IpaNotActive The ipa application is not active. 当前应用正在部署中。
400 Record.NoResource Failed to allocate resources for the record. Please submit a ticket for processing. 为记录分配资源失败,请提工单处理。
400 InvalidParameter.PrivateIpAsSourceUnsupported The provided source is an invalid private IP address. Please verify and resubmit. 您输入的地址为无效的内网地址,请检查修改后重新提交。
400 InvalidParameter.SourceIpInBlacklist The provided source is an invalid private IP address. Please verify and resubmit. 您输入的地址为无效的内网地址,请检查修改后重新提交。
400 IPA.KeepAliveProtectionConflict KeepAliveProtection is conflicted with StaticIp and CrossBorderOptimization, can not open at same time. 连接保持防护功能与静态IP和中国大陆网络接入优化功能冲突,不能同时开启。
400 IPA.CanNotEnableKeepAliveProtection The site has one or more TCP/UDP proxied applications with keep-alive-protection enabled. Its acceleration region or plan can't be edited. 中国大陆及非中国大陆的DDoS防护规格不能为基础防护。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情