tencent cloud

边缘安全加速平台 EO

EnableOriginACL

PDF
聚焦模式
字号
最后更新时间: 2026-04-13 14:45:29

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-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.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

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 When first enabling origin protection for a site, configure the layer-7 acceleration domain name in specific IP range mode.
  • ALL: Target all layer-7 acceleration domain names under the current site. When the number of domains exceeds 200, please go through first in specific mode to enable 200 domain names, and enable the remaining resource via the ModifyOriginACL API.
  • Specific: Enables layer-7 acceleration for the site's designated domain name.
  • Note: When no parameter is defined, the default is specific. For subsequent addition of layer-7 acceleration domain names or layer-4 proxy instances, configure them via the ModifyOriginACL API.
    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.
  • ALL: Enable all L4 proxy instances under the current site. When the instance count exceeds 100, please go through specific mode to enable 100 domain names first. Enable the remaining resources via the ModifyOriginACL API.
  • specific: Enable for the designated L4 proxy instance under the site.
  • Note: When no parameter is defined, the default is specific. Configure subsequent addition of L7 acceleration domains/L4 proxy instances via the ModifyOriginACL API.
    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:
  • gaz: Standard global availability zone control domain;
  • mlc: Standard Chinese mainland availability zone control domain;
  • emc: Standard global (exclude Chinese mainland) availability zone control domain;
  • plat-gaz: Simplify global availability zone control domain;
  • plat-mlc: Simplified Chinese mainland availability zone control domain;
  • plat-emc: Simplify the global (excluding Chinese mainland) availability zone control domain;
  • 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, configure it as a specified layer-7 acceleration domain name, and enable specific control domain origin IP range for origin retrieval

    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.

    Input Example

    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"
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "97a988a5-6ff1-437f-9c84-f327bee9771c"
        }
    }
    

    Example2 Enable origin protection for the site for the first time and configure it to assign a specific IP range for layer-7 acceleration domain or layer-4 proxy instance to return to origin

    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'.

    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": "b90202f3-7368-436d-ba36-7358e722259d"
        }
    }
    

    Example3 Site first-time origin protection enablement, configured as designated L7 acceleration domain activation with specific source IP range

    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.

    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"
        }
    }
    

    Example4 Enable origin protection for the site for the first time and configure to specify an L4 proxy instance to enable a specific IP range for origin retrieval

    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.

    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"
        }
    }
    

    Example5 Enable origin protection for the site for the first time, and configure all layer-7 acceleration domain names under the site to use a specific IP range for origin retrieval.

    Enable origin protection for the site with ZoneId 'zone-276zs184g93m' and configure all L7 acceleration domains to use specific IP ranges 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"
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "9e0a2b4f-df6d-4d2a-ac39-1706wdf8a869"
        }
    }
    

    Example6 Enable origin protection for the site for the first time, and configure all layer-7 acceleration domain names and L4 proxy instances under the site to use a specific IP range for origin retrieval.

    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.

    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"
        }
    }
    

    Example7 Enable origin protection for the site for the first time and configure ALL L4 proxy instances under the site to use a specific IP range for origin retrieval

    Enable origin protection for the site with ZoneId 'zone-276zs184g93m', and configure all L4 proxy instances 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",
        "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.

    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.
    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.

    帮助和支持

    本页内容是否解决了您的问题?

    填写满意度调查问卷,共创更好文档体验。

    文档反馈