All Products
Search
Document Center

Edge Security Acceleration:CreateTransportLayerApplication

Last Updated:Jun 26, 2026

Creates a Layer 4 acceleration application.

Operation description

The selected site must be activated. After you create a site, call the VerifySite operation to verify the site. A site that passes verification is automatically activated, which means the Passed response parameter is set to true.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

esa:CreateTransportLayerApplication

create

*Site

acs:esa:{#regionId}:{#accountId}:site/{#SiteId}

None

None

Request parameters

Parameter

Type

Required

Description

Example

SiteId

integer

Yes

The site ID. You can call the ListSites operation to obtain the site ID. The site must be activated.

123456****

RecordName

string

Yes

The domain name of the Layer 4 application.

aaa.example.com

Rules

array<object>

Yes

The list of forwarding rules.

object

Yes

The rule details. For each rule, all parameters except the comment are required.

Protocol

string

Yes

The forwarding rule protocol. Valid values:

  • TCP: TCP protocol.

  • UDP: UDP protocol.

Valid values:

  • TCP :

    TCP protocol

  • UDP :

    UDP protocol

TCP

EdgePort

string

Yes

The edge port. The following formats are supported:

  • A single port, such as 80.

  • A port range, such as 81-85, which represents ports 81, 82, 83, 84, and 85.

  • A combination of ports and port ranges separated by commas, such as 80,81-85,90, which represents ports 80, 81, 82, 83, 84, 85, and 90.

Edge ports within a single rule and across multiple rules must not overlap.

80

SourceType

string

Yes

The origin type. Valid values:

  • ip: IP address.

  • domain: domain name.

  • OP: origin IPAM pool.

  • LB: load balancing.

Valid values:

  • OP :

    origin IPAM pool

  • LB :

    load balancing

  • ip :

    IP address

  • domain :

    domain name

ip

SourcePort

string

Yes

Origin Server Port. The following formats are supported:

  • A single port. When Origin Server Port is a single port, any valid edge port combination is supported.

  • A port range. Origin Server Port can be set to a port range only when the edge port is also a port range, and the range size must match the edge port range. For example, if the edge port is 90-93, you cannot set Origin Server Port to 81-85 because Origin Server Port range size is 5 while the edge port range size is 4, which is inconsistent.

80

ClientIPPassThroughMode

string

Yes

The client IP pass-through protocol. Valid values:

  • off: disabled.

  • PPv1: PROXY Protocol v1. Supports client IP pass-through for TCP.

  • PPv2: PROXY Protocol v2. Supports client IP pass-through for TCP and UDP.

  • SPP: Simple Proxy Protocol. Supports client IP pass-through for UDP.

Valid values:

  • SPP :

    Simple Proxy Protocol

  • PPv2 :

    PROXY Protocol v2

  • off :

    disabled

  • PPv1 :

    PROXY Protocol v1

SPP

Source

string

Yes

The specific value of the origin, which must match the origin type.

1.1.1.1

Comment

string

No

The comment for the rule (optional).

Test

IpAccessRule

string

No

The IP access rule switch. When enabled, IP access rules in WAF take effect for the Layer 4 application. Valid values:

  • on: enabled.

  • off: disabled.

Valid values:

  • off :

    Disabled.

  • on :

    Enabled.

on

Ipv6

string

No

Specifies whether to enable IPv6. This feature is disabled by default. Valid values:

  • on: enabled.

  • off: disabled.

Valid values:

  • off :

    Disabled.

  • on :

    Enabled.

off

CrossBorderOptimization

string

No

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

  • on: enabled.

  • off: disabled.

Valid values:

  • off :

    Disabled.

  • on :

    Enabled.

on

StaticIp

string

No

Specifies whether to enable static IP. This feature is disabled by default. Valid values:

  • on: enabled.

  • off: disabled.

Valid values:

  • off :

    Disabled.

  • on :

    Enabled.

off

KeepAliveProtection

string

No

Specifies whether to enable keep-alive protection. This feature is disabled by default. Valid values:

  • on: enabled.

  • off: disabled.

Valid values:

  • off :

    Disabled.

  • on :

    Enabled.

off

Response elements

Element

Type

Description

Example

object

The response details.

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.

400

IPA.KeepAliveProtectionConflict

KeepAliveProtection is conflicted with StaticIp and CrossBorderOptimization, can not open at same time.

KeepAliveProtection is conflicted with StaticIp and CrossBorderOptimization, can not open at same time

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 protection for Chinese mainland or outside the Chinese mainland can't be "Basic protection"

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.