Domain name for API request: teo.intl.tencentcloudapi.com.
This API is used to enable origin protection for a site for the first time. Enabled, EdgeOne will use specific origin-pull IP ranges for L7 acceleration domains/L4 proxy instances. The maximum quantity of L7 acceleration domains supported in a single submission is 200, and the maximum quantity of L4 proxy instances is 100. It supports composite submission of L7 acceleration domains/L4 proxy instances, with a maximum total number of instances of 200. To enable exceeding 200 resources, you can first enable the maximum allowed number via specified resources, and enable the remaining resources via the ModifyOriginACL API. Subsequent addition of L7 acceleration domains/L4 proxy instances should be configured via the ModifyOriginACL API. When enabling simultaneously, allowlisted accounts support selecting other origin-pull IP range versions, such as simplified edition, to achieve origin-pull effect with fewer IP ranges.
Note:
-Calling this API is deemed as agreement to the special agreement for origin protection enablement (https://www.tencentcloud.com/document/product/1552/120141?from_cn_redirect=1);
-The origin IP range may change irregularly. EdgeOne will trigger notifications via Message Center, SMS, or email 14 days, 7 days, 3 days, and 1 day before the change. To ensure you receive the origin IP range change notification, please ensure you have selected the edge security acceleration platform EO product services relevant message notification and configured the correct message recipients in the Tencent Cloud Message Center Console (https://console.tencentcloud.com/message). For the setting method, refer to Message Subscription Management (https://www.tencentcloud.com/document/product/567/43476?from_cn_redirect=1).
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: EnableOriginACL. |
| Version | Yes | String | Common Params. The value used for this API: 2022-09-01. |
| Region | No | String | Common Params. This parameter is not required. |
| ZoneId | Yes | String | Zone ID. |
| L7EnableMode | No | String | When first enabling origin protection for a site, configure the layer-7 acceleration domain name in specific IP range mode. |
| L7Hosts.N | No | Array of String | Enable the list of layer-7 acceleration domain names with origin protection. this parameter is valid only when L7EnableMode is set to specific. when L7EnableMode is set to all, retain this parameter as empty. only supports up to 200 layer-7 acceleration domain names in a single operation. |
| L4EnableMode | No | String | When first enabling origin protection for a site, configure the Layer 4 Proxy Instance Configuration in specific IP range mode. |
| L4ProxyIds.N | No | Array of String | The list of L4 proxy instances with origin protection enabled. this parameter is valid only when L4EnableMode is set to specific. retain this parameter empty when L4EnableMode is set to all. only supports up to 100 layer-4 proxy instances per operation. |
| OriginACLFamily | No | String | The origin protection back-to-origin ACL control domain. If left empty, the standard global control domain is used by default. Available control domain information can be obtained through the DescribeAvailableOriginACLFamily API query. Valid values are as follows: |
| Parameter Name | Type | Description |
|---|---|---|
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
Enable origin protection for the selected site with ZoneId 'zone-3ly7orr0u97o', and configure the layer-7 acceleration domain name 'www.qq.com' to enable the control domain gaz for origin retrieval from the IP address range.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: EnableOriginACL
<Common request parameters>
{
"ZoneId": "zone-3ly7orr0u97o",
"L7EnableMode": "specific",
"L7Hosts": [
"www.qq.com"
],
"OriginACLFamily": "gaz"
}
{
"Response": {
"RequestId": "97a988a5-6ff1-437f-9c84-f327bee9771c"
}
}
Enable origin protection for the selected site with ZoneId 'zone-276zs184g93m', configure L7 acceleration domain name 'www.qq.com' and enable specific IP range for origin return on L4 proxy instance 'sid-19389e5dwwxfs'.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: EnableOriginACL
<Common request parameters>
{
"ZoneId": "zone-276zs184g93m",
"L7EnableMode": "specific",
"L7Hosts": [
"www.qq.com"
],
"L4EnableMode": "specific",
"L4ProxyIds": [
"sid-19389e5dwwxfs"
]
}
{
"Response": {
"RequestId": "b90202f3-7368-436d-ba36-7358e722259d"
}
}
Enable origin protection for the selected site with ZoneId 'zone-276zs184g93m', configure L7 acceleration for domain name 'www.qq.com', and enable specific IP range for origin retrieval.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: EnableOriginACL
<Common request parameters>
{
"ZoneId": "zone-276zs184g93m",
"L7EnableMode": "specific",
"L7Hosts": [
"www.qq.com"
]
}
{
"Response": {
"RequestId": "9e0a2b4f-df6d-4d2a-ac39-1706cbf8a869"
}
}
Enable origin protection for the selected site with ZoneId 'zone-276zs184g93m' and configure the L4 proxy instance 'sid-19389e5dwwxfs' to enable specific IP range for origin retrieval.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: EnableOriginACL
<Common request parameters>
{
"ZoneId": "zone-276zs184g93m",
"L4EnableMode": "specific",
"L4ProxyIds": [
"sid-19389e5dwwxfs"
]
}
{
"Response": {
"RequestId": "9e0a2b4f-df6d-4d2a-ac39-1706cbf8a869"
}
}
Enable origin protection for the site with ZoneId 'zone-276zs184g93m' and configure all L7 acceleration domains to use specific IP ranges for origin retrieval.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: EnableOriginACL
<Common request parameters>
{
"ZoneId": "zone-276zs184g93m",
"L7EnableMode": "all"
}
{
"Response": {
"RequestId": "9e0a2b4f-df6d-4d2a-ac39-1706wdf8a869"
}
}
Enable origin protection for the selected site with ZoneId 'zone-276zs184g93m', and configure all L7 acceleration domain names and L4 proxy instances to use a specific IP range for origin retrieval.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: EnableOriginACL
<Common request parameters>
{
"ZoneId": "zone-276zs184g93m",
"L7EnableMode": "all",
"L4EnableMode": "all"
}
{
"Response": {
"RequestId": "9e0a2b4f-df6d-4d2a-ac39-1706wdf8a869"
}
}
Enable origin protection for the site with ZoneId 'zone-276zs184g93m', and configure all L4 proxy instances to enable specific IP range for origin retrieval.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: EnableOriginACL
<Common request parameters>
{
"ZoneId": "zone-276zs184g93m",
"L4EnableMode": "all"
}
{
"Response": {
"RequestId": "9e0a2b4f-df6d-4d2a-ac39-1706wdf8a869"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation | Operation failed. |
| InternalError | Internal error. |
| InvalidParameter | Parameter error. |
| InvalidParameter.InvalidDomains | The domain name is illegal. check whether a non-existent domain name is passed in the input parameters. |
| InvalidParameter.InvalidProxies | The layer 4 proxy is illegal. check whether a non-existing proxy is passed in the input parameters. |
| InvalidParameter.ShieldNotSupportHostOriginWhitelist | The domain name does not support enabling EdgeOne Shield and origin protection simultaneously. |
| OperationDenied | Operation denied. |
| OperationDenied.UnsupportedPlan | The package is not supported. |
| OperationDenied.VersionControlIsGraying | There is a test version in use. Please release the test version to the live environment, or roll back the test version and try again. |
| UnauthorizedOperation.CamUnauthorized | CAM is not authorized. |
文档反馈