EnableOriginACL
1. API Description
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 IP ranges to backhaul traffic for L7 acceleration domains/L4 proxy instances. The maximum allowed number of L7 acceleration domains per submission is 200, and the maximum allowed number of L4 proxy instances is 100. Mixing L7 acceleration domains and L4 proxy instances in a single submission is supported, with a total maximum of 200 instances. To enable more than 200 resources, first enable the maximum quantity via specified resources, then enable the remaining resources via the ModifyOriginACL API. Subsequent addition of L7 acceleration domains/L4 proxy instances should be configured via the ModifyOriginACL API.
Create and bind policy Query instance Reset instance access password.
-Call this API to deem as consent to the origin protection enablement special agreement (https://intl.cloud.tencent.com/document/product/1552/120141?from_cn_redirect=1);.
-The origin IP range may change irregularly. tencent cloud EdgeOne (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 change notification for the origin IP range, please ensure you have selected EdgeOne product services in the tencent cloud message Center console and configured the correct message recipient. For the setting method, refer to message Subscription Management.
A maximum of 20 requests can be initiated per second for this API.
2. Input Parameters
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 | L7 acceleration domain name activation in origin protection mode.all : enable layer-7 acceleration domain names for the site. |
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 | Specifies the origin protection mode of the l4 proxy instance. |
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. |
3. Output Parameters
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. |
4. Example
Example1 Enable Origin Protection for the Site for the First Time and Configure It to Assign a Specific IP Range for Origin Retrieval to the Designated Layer-7 Acceleration Domain or Layer-4 Proxy Instance
This example shows you how to turn on 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 return on L4 proxy instance 'sid-19389e5dwwxfs'.
Input Example
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"
]
}
Output Example
{
"Response": {
"RequestId": "9e0a2b4f-df6d-4d2a-ac39-1706cbf8a869"
}
}
Example2 Site First-Time Origin Protection Enablement, Configured to Specify L7 Acceleration Domain Activation with Specific Origin IP Range
This example shows you how to enable origin protection for the selected site with ZoneId 'zone-276zs184g93m', and configure the layer-7 acceleration domain name 'www.qq.com' to enable specific IP range for origin retrieval.
Input Example
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"
]
}
Output Example
{
"Response": {
"RequestId": "9e0a2b4f-df6d-4d2a-ac39-1706cbf8a869"
}
}
Example3 Enabling Origin Protection for a Site for the First Time and Configuring a Specific IP Range for Origin Return on an L4 Proxy Instance
This example shows you how to enable origin protection for the selected site with ZoneId 'zone-276zs184g93m' and configure the L4 proxy instance 'sid-19389e5dwwxfs' to use a specific IP range for origin retrieval.
Input Example
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"
]
}
Output Example
{
"Response": {
"RequestId": "9e0a2b4f-df6d-4d2a-ac39-1706cbf8a869"
}
}
Example4 First-Time Origin Protection Enablement for a Site and Configuring Specific IP Range Back-To-Origin for All Layer-7 Acceleration Domain Names and L4 Proxy Instances under the Site
This example shows you how to enable origin protection for the selected site with ZoneId 'zone-276zs184g93m', and configure all layer-7 acceleration domain names and L4 proxy instances to use a specific IP range for origin retrieval.
Input Example
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"
}
Output Example
{
"Response": {
"RequestId": "9e0a2b4f-df6d-4d2a-ac39-1706wdf8a869"
}
}
Example5 Enable Origin Protection for the Site for the First Time and Configure ALL L7 Acceleration Domains under the Site to Use a Specific IP Range for Origin
This example shows you how to enable origin protection for the selected site with ZoneId 'zone-276zs184g93m' and configure all layer-7 acceleration domain names to use a specific IP range for origin pull.
Input Example
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"
}
Output Example
{
"Response": {
"RequestId": "9e0a2b4f-df6d-4d2a-ac39-1706wdf8a869"
}
}
Example6 Site First-Time Enablement of Origin Protection and Configuration of ALL L4 Proxy Instances under the Site to Enable Specific IP Range for Origin Pull
This example shows you how to enable origin protection for the selected site with ZoneId 'zone-276zs184g93m' and configure all L4 proxy instances to use a specific IP range for origin retrieval.
Input Example
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"
}
Output Example
{
"Response": {
"RequestId": "9e0a2b4f-df6d-4d2a-ac39-1706wdf8a869"
}
}
5. Developer Resources
SDK
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
- Tencent Cloud SDK 3.0 for Python
- Tencent Cloud SDK 3.0 for Java
- Tencent Cloud SDK 3.0 for PHP
- Tencent Cloud SDK 3.0 for Go
- Tencent Cloud SDK 3.0 for Node.js
- Tencent Cloud SDK 3.0 for .NET
- Tencent Cloud SDK 3.0 for C++
Command Line Interface
6. Error Code
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. |
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. |
- 1. API Description
- 2. Input Parameters
- 3. Output Parameters
- 4. Example
- Example1 Enable Origin Protection for the Site for the First Time and Configure It to Assign a Specific IP Range for Origin Retrieval to the Designated Layer-7 Acceleration Domain or Layer-4 Proxy Instance
- Example2 Site First-Time Origin Protection Enablement, Configured to Specify L7 Acceleration Domain Activation with Specific Origin IP Range
- Example3 Enabling Origin Protection for a Site for the First Time and Configuring a Specific IP Range for Origin Return on an L4 Proxy Instance
- Example4 First-Time Origin Protection Enablement for a Site and Configuring Specific IP Range Back-To-Origin for All Layer-7 Acceleration Domain Names and L4 Proxy Instances under the Site
- Example5 Enable Origin Protection for the Site for the First Time and Configure ALL L7 Acceleration Domains under the Site to Use a Specific IP Range for Origin
- Example6 Site First-Time Enablement of Origin Protection and Configuration of ALL L4 Proxy Instances under the Site to Enable Specific IP Range for Origin Pull
- 5. Developer Resources
- SDK
- Command Line Interface
- 6. Error Code