EnableOriginACL
1. API Description
Domain name for API request: teo.intl.tencentcloudapi.com.
This API is used to enable 'Origin Protection' for Layer 4 or Layer 7 instances. The number of enabled instances has an upper limit: 200 for Layer 7 domains and 100 for Layer 4 proxy instances. The total number of instances cannot exceed 200, otherwise an error reminder will be triggered. You can first enable the maximum allowed number and use the ModifyOriginACL API to set the excess quantity.
This API is used to enable 'Origin Protection' for the site for the first time. Once enabled, EdgeOne will use specific origin IP ranges for L7 acceleration domains and L4 proxy instances. The maximum number of L7 acceleration domain that can be submitted in a single request is 200, and the maximum number of L4 proxy instance is 100. Mixed submissions of L7 acceleration domains and L4 proxy instances are supported, with a total maximum of 200 instances. If you need to enable more than 200 instances, you can first enable the maximum number by specifying the instances, and then enable the remaining instances through the API ModifyOriginACL. Any subsequent addition of L7 acceleration domains or L4 proxy instances should be configured through the API ModifyOriginACL.
Note:
- Calling this API is considered as agreeing to Origin Protection Enablement Conditions of Use.
- The origin IP ranges may change periodically. EdgeOne will notify you of changes to the origin IP ranges 14 days, 7 days, 3 days, and 1 day in advance through one or more methods such as internal messages, SMS, and email. To ensure you receive notifications about changes to the origin IP ranges, please make sure that you have selected the relevant product service notifications for the Edge Security Acceleration Platform (EO) in Tencent Cloud Message Center and have configured the correct message recipients. For configuration details, please 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 | Specifies the site ID. |
L7EnableMode | No | String | The mode of configurating origin ACLs for L7 acceleration domains. - all: configurate origin ACLs for all L7 acceleration domains under the site. - specific: configurate origin ACLs for designated L7 acceleration domains under the site. When the parameter is empty, it defaults to specific. |
L7Hosts.N | No | Array of String | The list of L7 acceleration domains that require enabling the origin ACLs. This list must be empty when the request parameter L7EnableMode is set to 'all'. A maximum of 200 domains are supported at a time. |
L4EnableMode | No | String | The mode of configurating origin ACLs for L4 proxy Instances. - all: configurate origin ACLs for all L4 proxy Instances under the site. - specific: configurate origin ACLs for designated L4 proxy Instances under the site. When the parameter is empty, it defaults to specific. |
L4ProxyIds.N | No | Array of String | The list of L4 proxy Instances that require enabling origin ACLs. This list must be empty when the request parameter L4EnableMode is set to 'all'. A maximum of 100 instances are supported at a time. |
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 use origin IP ranges for designated L7 acceleration domains and L4 proxy instances.
Enable origin protection for the site with ZoneId 'zone-276zs184g93m', and configure the L7 acceleration domain 'www.qq.com' and the L4 proxy instance 'sid-19389e5dwwxfs' to use origin ACLs.
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 Enable origin protection for the site for the first time and configure it to use origin IP ranges for designated L7 acceleration domains.
Enable origin protection for the site with ZoneId 'zone-276zs184g93m', and configure the L7 acceleration domain 'www.qq.com' to use origin ACLs.
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 Enable origin protection for the site for the first time and configure it to use origin IP ranges for designated L4 proxy instances.
Enable origin protection for the site with ZoneId 'zone-276zs184g93m', and configure the L4 proxy instance 'sid-19389e5dwwxfs' to use origin ACLs.
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 Enable origin protection for the site for the first time and configure it to use origin IP ranges for all L7 acceleration domains and L4 proxy instances.
Enable origin protection for the site with ZoneId 'zone-276zs184g93m', and configure all L7 acceleration domains and L4 proxy instances to use origin ACLs.
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 it to use origin IP ranges for all L7 acceleration domains.
Enable origin protection for the site with ZoneId 'zone-276zs184g93m', and configure all L7 acceleration domains to use origin ACLs.
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 Enable origin protection for the site for the first time and configure it to use origin IP ranges for all L4 proxy instances.
Enable origin protection for the site with ZoneId 'zone-276zs184g93m', and configure all L4 proxy instances to use origin ACLs.
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. |