接口请求域名: teo.intl.tencentcloudapi.com 。
本接口用于站点首次开启源站防护,启用后 EdgeOne 将会使用特定的回源 IP 网段为七层加速域名/四层代理实例回源。
本接口支持两种模式:自动纳入防护模式 和 指定加入防护模式 。
指定加入防护模式使用说明:
注意:
默认接口请求频率限制:20次/秒。
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| Action | 是 | String | 公共参数,本接口取值:EnableOriginACL。 |
| Version | 是 | String | 公共参数,本接口取值:2022-09-01。 |
| Region | 否 | String | 公共参数,此参数为可选参数。 |
| ZoneId | 是 | String | 站点 ID。 |
| L7EnableMode | 否 | String | 七层加速域名源站防护模式,默认值: specific。 |
| L7Hosts.N | 否 | Array of String | 需要开启源站防护的七层加速域名列表,仅当参数 L7EnableMode 为 specific 时生效。本字段最多支持一次开启 200 个七层加速域名;当期望开启的域名个数超过 200 时,请联合使用 ModifyOriginACL 接口进行分片配置。 |
| L4EnableMode | 否 | String | 四层代理实例源站防护模式,默认值: specific。 |
| L4ProxyIds.N | 否 | Array of String | 需要开启源站防护的四层代理实例列表,仅当参数 L4EnableMode 为 specific 时生效。本字段最多支持一次开启 100 个四层代理实例;当期望开启的四层代理实例个数超过 100 时,请联合使用 ModifyOriginACL 接口进行分片配置。 |
| OriginACLFamily | 否 | String | 源站防护回源ACL控制域,不填则默认用标准全球控制域;可用控制域信息可以通过DescribeAvailableOriginACLFamily接口查询获得。 |
| 参数名称 | 类型 | 描述 |
|---|---|---|
| RequestId | String | 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 |
ZoneId 为 'zone-276zs184g93m' 的站点开启源站防护,并配置七层加速域名‘www.qq.com’和四层代理实例‘sid-19389e5dwwxfs’启用特定回源 IP 网段回源。
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: EnableOriginACL
<公共请求参数>
{
"ZoneId": "zone-276zs184g93m",
"L7EnableMode": "specific",
"L7Hosts": [
"www.qq.com"
],
"L4EnableMode": "specific",
"L4ProxyIds": [
"sid-19389e5dwwxfs"
]
}
{
"Response": {
"RequestId": "b90202f3-7368-436d-ba36-7358e722259d"
}
}
ZoneId 为 'zone-276zs184g93m' 的站点开启源站防护,并配置七层加速域名‘www.qq.com’启用特定回源 IP 网段回源。
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: EnableOriginACL
<公共请求参数>
{
"ZoneId": "zone-276zs184g93m",
"L7EnableMode": "specific",
"L7Hosts": [
"www.qq.com"
]
}
{
"Response": {
"RequestId": "9e0a2b4f-df6d-4d2a-ac39-1706cbf8a869"
}
}
ZoneId 为 'zone-3ly7orr0u97o' 的站点开启源站防护,并配置七层加速域名‘www.qq.com’启用控制域为gaz的回源 IP 网段回源。
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: EnableOriginACL
<公共请求参数>
{
"ZoneId": "zone-3ly7orr0u97o",
"L7EnableMode": "specific",
"L7Hosts": [
"www.qq.com"
],
"OriginACLFamily": "gaz"
}
{
"Response": {
"RequestId": "97a988a5-6ff1-437f-9c84-f327bee9771c"
}
}
ZoneId 为 'zone-276zs184g93m' 的站点开启源站防护,并配置四层代理实例‘sid-19389e5dwwxfs’启用特定回源 IP 网段回源。
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: EnableOriginACL
<公共请求参数>
{
"ZoneId": "zone-276zs184g93m",
"L4EnableMode": "specific",
"L4ProxyIds": [
"sid-19389e5dwwxfs"
]
}
{
"Response": {
"RequestId": "9e0a2b4f-df6d-4d2a-ac39-1706cbf8a869"
}
}
ZoneId 为 'zone-276zs184g93m' 的站点开启源站防护,并配置所有的七层加速域名启用特定回源 IP 网段回源。
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: EnableOriginACL
<公共请求参数>
{
"ZoneId": "zone-276zs184g93m",
"L7EnableMode": "all"
}
{
"Response": {
"RequestId": "9e0a2b4f-df6d-4d2a-ac39-1706wdf8a869"
}
}
ZoneId 为 'zone-276zs184g93m' 的站点开启源站防护,并配置所有的七层加速域名和四层代理实例启用特定回源 IP 网段回源。
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: EnableOriginACL
<公共请求参数>
{
"ZoneId": "zone-276zs184g93m",
"L7EnableMode": "all",
"L4EnableMode": "all"
}
{
"Response": {
"RequestId": "9e0a2b4f-df6d-4d2a-ac39-1706wdf8a869"
}
}
ZoneId 为 'zone-276zs184g93m' 的站点开启源站防护,并配置所有的四层代理实例启用特定回源 IP 网段回源。
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: EnableOriginACL
<公共请求参数>
{
"ZoneId": "zone-276zs184g93m",
"L4EnableMode": "all"
}
{
"Response": {
"RequestId": "9e0a2b4f-df6d-4d2a-ac39-1706wdf8a869"
}
}
云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。
| 错误码 | 描述 |
|---|---|
| FailedOperation | 操作失败。 |
| InternalError | 内部错误。 |
| InvalidParameter | 参数错误。 |
| InvalidParameter.InvalidDomains | 域名非法,请检查入参中是否传入不存在的域名。 |
| InvalidParameter.InvalidProxies | 四层代理非法,请检查入参中是否传入不存在的代理。 |
| InvalidParameter.ShieldNotSupportHostOriginWhitelist | 当前域名不支持同时开启EdgeOne Shield和源站防护。 |
| OperationDenied | 操作被拒绝。 |
| OperationDenied.UnsupportedPlan | 套餐不支持。 |
| OperationDenied.VersionControlIsGraying | 存在使用中的测试版本,请将测试版本发布现网或者回滚测试版本再重试。 |
| UnauthorizedOperation.CamUnauthorized | Cam 未授权。 |
文档反馈