All Products
Search
Document Center

Edge Security Acceleration:CreateTransportLayerApplication

Last Updated:Mar 26, 2026

Create a Layer 4 Acceleration application

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

SiteId

integer

Yes

The site ID. Call the ListSites operation to get the site ID.

123456****

RecordName

string

Yes

The domain name of the Transport Layer Application.

aaa.example.com

Rules

array<object>

Yes

An array of Forwarding Rule objects.

object

Yes

A Forwarding Rule object. All parameters are required, except for Comment.

Protocol

string

Yes

The protocol for the Forwarding Rule. Valid values:

  • TCP: The TCP protocol.

  • UDP: The UDP protocol.

TCP

EdgePort

string

Yes

The Edge Port that receives incoming traffic. Supported formats:

  • A single port, for example, 80.

  • A port range, for example, 81-85, which includes ports 81, 82, 83, 84, and 85.

  • A combination of ports and port ranges separated by commas, for example, 80,81-85,90.

The specified Edge Ports cannot overlap within or between rules.

80

SourceType

string

Yes

The type of the origin. Supported values:

  • ip: An IP address.

  • domain: A domain name.

  • OP: An Origin Pool.

  • LB: A Load Balancer.

ip

SourcePort

string

Yes

The Origin Port. Supported formats:

  • A single port. If you specify a single Origin Port, you can use any valid format for the Edge Port.

  • A port range. You can specify a port range for the Origin Port only if the Edge Port is also a port range. The number of ports in the Origin Port range must be the same as the number of ports in the Edge Port range. For example, if EdgePort is 90-93 (4 ports), you cannot set SourcePort to 81-85 (5 ports) because the range sizes do not match.

80

ClientIPPassThroughMode

string

Yes

The Client IP Passthrough Protocol. Supported values:

  • off: Disables client IP passthrough.

  • PPv1: The PROXY Protocol v1. Preserves client IP addresses for TCP connections.

  • PPv2: The PROXY Protocol v2. Preserves client IP addresses for both TCP and UDP connections.

  • SPP: The Simple Proxy Protocol. Preserves client IP addresses for UDP connections.

SPP

Source

string

Yes

The origin address. The value must match the specified SourceType.

1.1.1.1

Comment

string

No

An optional comment for the Forwarding Rule.

test

IpAccessRule

string

No

Specifies whether to apply the IP Access Rules configured in the Web Application Firewall (WAF) to this Transport Layer Application.

  • on: Enables the feature.

  • off: Disables the feature.

Valid values:

  • off :

    off

  • on :

    on

on

Ipv6

string

No

Specifies whether to enable IPv6. Valid values: on, off.

Valid values:

  • off :

    off

  • on :

    on

off

CrossBorderOptimization

string

No

Specifies whether to enable network optimization for access from the Chinese mainland. This feature is disabled by default. Valid values:

  • on: Enables the optimization.

  • off: Disables the optimization.

Valid values:

  • off :

    off

  • on :

    on

on

StaticIp

string

No

Response elements

Element

Type

Description

Example

object

The data returned for the request.

RequestId

string

The Request ID.

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

ApplicationId

integer

The Layer 4 Application ID.

165503967****

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400

InvalidParameter

The specified parameter is invalid.

The specified parameter is invalid.

400

ApplyVipError

Failed to apply for ip resources, please contact customer service.

Failed to apply for IP resources, please contact customer service.

400

InternalException

Failed to call the service. Try again later or contact technical support.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

The record name you entered does not meet the specifications. Please adjust the record name according to the product documentation.

400

EdgePortsOverlap

There is overlap between multiple edge ports, please check and try again after modification.

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.

Invalid client IP transfer protocol, please refer to the interface document and pass in valid parameters.

400

InvalidParameter.RuleSource

The origin of the forwarding rule does not exist or is invalid. Enter the correct origin and try again.

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.

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.

Invalid port protocol. Enter a valid port protocol as required by the interface documentation.

400

InternalError

An internal exception occurred, please try again later.

An inner exception was triggered. Please try again later.

400

IpaResourceUnavailable

The resource is unavailable.

The resource is unavailable.

400

Record.NoResource

Failed to allocate resources for the record. Please submit a ticket for processing.

Failed to allocate resources for the record. Please submit a work order for processing.

400

InvalidParameter.PrivateIpAsSourceUnsupported

The provided source is an invalid private IP address. Please verify and resubmit.

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.

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.

The status of the applied site or site is not activated.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.