CreateTransportLayerApplication - 创建四层加速应用

创建一个四层加速应用。

调试

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

授权信息

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

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用前面加 * 表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
esa:CreateTransportLayerApplicationcreate
*Site
acs:esa:{#regionId}:{#accountId}:site/{#SiteId}

请求参数

名称类型必填描述示例值
SiteIdlong

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

123456****
RecordNamestring

四层应用的域名。

aaa.example.com
Rulesarray<object>

转发规则列表。

object

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

Protocolstring

转发规则协议,取值:

  • TCP:TCP 协议。
  • UDP:UDP 协议。
TCP
EdgePortstring

边缘端口。支持:

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

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

80
SourceTypestring

源站类型,支持:

  • ip: IP。
  • domain: 域名。
  • OP: 源地址池。
  • LB: 负载均衡器。
ip
SourcePortstring

源站端口。支持:

  • 单个端口,当源站端口为单个端口时,支持任意合法的边缘端口组合。
  • 端口范围,仅当边缘端口为端口段时,源站端口才允许设置为端口范围且范围大小需要与边缘端口一致。例如边缘端口若为 90-93,则不允许将源站端口设置为 81-85,因为源站端口范围为 5,边缘端口范围为 3,两者不一致。
80
ClientIPPassThroughModestring

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

  • off: 不传递。
  • PPv1: PROXY Protocol v1 协议,支持 TCP 协议的客户端 IP 传递。
  • PPv2: PROXY Protocol v2 协议,支持 TCP 和 UDP 协议的客户端 IP 传递。
  • SPP: Simple Proxy Protocol 协议,支持 UDP 协议的客户端 IP 传递。
SPP
Sourcestring

源站具体的值,需要与源站类型相匹配。

1.1.1.1
Commentstring

规则的备注信息(可选)。

测试
IpAccessRulestring

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

  • on: 开启。
  • off:关闭。
on
Ipv6string

Ipv6 开关。

枚举值:
  • offoff
  • onon
off
CrossBorderOptimizationstring

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

  • on:开启。
  • off:关闭。
on

返回参数

名称类型描述示例值
object

请求响应详情。

RequestIdstring

请求 ID。

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

四层应用 ID。

165503967****

示例

正常返回示例

JSON格式

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

错误码

HTTP status code错误码错误信息描述
400InvalidParameterThe specified parameter is invalid.输入参数规范校验失败。
400ApplyVipErrorFailed to apply for ip resources, please contact customer service.申请IP资源失败,请联系客服。
400InternalExceptionFailed to call the service. Try again later or contact technical support.调用服务失败,请稍后重试或联系客服咨询详情。
400InvalidParameter.RecordDataInvalid record content. Adjust your configurations based on the API documentation.记录内容参数错误,请根据接口文档调整参数内容。
400InvalidParameter.RecordTypeInvalid record type. Adjust your configurations based on the API documentation.记录类型错误,请根据接口文档调整参数内容。
400Instance.NotOnlineYour plan is unavailable due to an overdue payment. Complete the payment first.您的套餐实例因欠费当前处于非上线状态,请先完成续费操作以继续使用。
400QuotaExceed.RecordCountThe maximum number of records has been reached. Delete some and try again or upgrade your plan.记录数量已达上限,请删除部分记录后重试或升级套餐。
400Record.ConflictThe specified record content conflicts with existing records. Adjust your configurations based on the related product documentation.和已有记录冲突,请根据冲突规则的产品文档调整记录内容。
400Site.ServiceBusyThis website is being configured. Try again later.该站点正在配置中,请稍后再试。
400TransportLayerRulesExceedLimitThe configured forwarding rules have exceeded the maximum limit. Delete useless forwarding rules and try again.您配置的转发规则已经超过了最大限制,请删除无用的转发规则后进行重试。
400TransportLayerApplicationConflictThe Layer -4 accelerated application conflicts with other applications. Check whether the application name and host record conflict with other applications in the site.您当前操作的四层加速应用与其他应用冲突,请检查应用名、主机记录等是否与该站点下的其他应用冲突。
400SourceCircleExistThe 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.当前要操作资源的主机记录已经是其他资源的源站,或者当前资源的源站已经被添加为主机记录,为避免回环产生,请修改主机记录或者源站后进行重试。
400InvalidParameter.InvalidRecordNameThe record name you entered does not meet the specifications. Change the record name according to the product documentation.您输入的记录名称不符合规范,请根据产品文档调整记录名称。
400EdgePortsOverlapThere is overlap between multiple edge ports, please check and try again after modification.多个边缘端口之间存在重叠,请检查后进行修改重试。
400InvalidParameter.ClientIpPassThroughModeInvalid client IP transfer protocol, please refer to the interface document and pass in valid parameters.无效的客户端IP传递协议,请参考接口文档,传入合法的参数。
400InvalidParameter.RuleSourceThe origin of the forwarding rule does not exist or is invalid. Enter the correct origin and try again.转发规则的源站不存在或者不合法,请传入正确的源站后进行重试。
400InvalidParameter.PortInvalid edge port or origin port. Enter a valid port as required in the interface document.无效的边缘端口或者源站端口,请按照接口文档中的要求,传入合法的端口。
400InvalidParameter.ProtocolInvalid port protocol. Enter a valid port protocol as required by the interface documentation.无效的端口协议,请按照接口文档的要求,传入合法的端口协议。
400InternalErrorAn internal exception occurred, please try again later.触发内部异常,请稍后再试。
400IpaResourceUnavailableThe resource is unavailable.没有足够的资源可供新域名接入。
400Record.NoResourceFailed to allocate resources for the record. Please submit a ticket for processing.为记录分配资源失败,请提工单处理。

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