全部產品
Search
文件中心

Edge Security Acceleration:CreateTransportLayerApplication - 建立四層加速應用

更新時間:Jan 30, 2026

建立一個四層加速應用。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

當前API暫無授權資訊透出。

請求參數

名稱

類型

必填

描述

樣本值

SiteId

integer

網站 ID,可通過調用 ListSites 介面擷取。

123456****

RecordName

string

四層應用的網域名稱。

aaa.example.com

Rules

array<object>

轉寄規則列表。

object

規則詳情。每一條規則,除備忘外,其他參數為必填。

Protocol

string

轉寄規則協議,取值:

  • 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: 負載平衡器。

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

Source

string

來源站點具體的值,需要與來源站點類型相匹配。

1.1.1.1

Comment

string

規則的備忘資訊(可選)。

測試

IpAccessRule

string

IP 訪問規則開關,開啟後,WAF 中的 IP 訪問規則對四層應用生效。

  • on: 開啟。

  • off:關閉。

枚舉值:

  • off :

    off

  • on :

    on

on

Ipv6

string

Ipv6 開關。

枚舉值:

  • off :

    off

  • on :

    on

off

CrossBorderOptimization

string

是否開啟中國大陸網路接入最佳化,預設關閉。取值範圍:

  • on:開啟。

  • off:關閉。

枚舉值:

  • off :

    off

  • on :

    on

on

StaticIp

string

返回參數

名稱

類型

描述

樣本值

object

請求響應詳情。

RequestId

string

請求 ID。

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

ApplicationId

integer

四層應用 ID。

165503967****

樣本

正常返回樣本

JSON格式

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

錯誤碼

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 TransportLayerRulesExceedLimit The configured forwarding rules have exceeded the maximum limit. Delete useless forwarding rules and try again. 您配置的轉寄規則已經超過了最大限制,請刪除無用的轉寄規則後進行重試。
400 TransportLayerApplicationConflict The Layer -4 accelerated application conflicts with other applications. Check whether the application name and host record conflict with other applications in the site. 您當前操作的四層加速應用與其他應用衝突,請檢查應用程式名稱、主機記錄等是否與該網站下的其他應用衝突。
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 IpaResourceUnavailable The resource is unavailable. 沒有足夠的資源可供新網域名稱接入。
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 Site.NotActive The status of the applied site or site is not activated. 應用的網站或網站的狀態不是已啟用。

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情