tencent cloud

Tencent Cloud EdgeOne

ModifyOriginACL

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2026-11-25 16:58:23

1. API Description

Domain name for API request: teo.intl.tencentcloudapi.com.

This API is used to modify the origin protection configuration of a site. The following operations are supported:

  • Resource addition and deletion: enable or disable origin-pull from specific origin IP ranges for layer-7 accelerated domains/layer-4 proxy instances. This applies to resource adjustment in specified protection mode, and unspecified resources will not change;
  • Mode switching: adjust the origin protection mode of layer-7 accelerated domains/layer-4 proxy instances. After switching to all, the list of accelerated domains or layer-4 proxy instances under the site will be automatically added to the origin protection list in real time, and subsequent resource changes will also be automatically adjusted without manual intervention; after switching to specific, only the mode is changed, and resources already included in protection remain unchanged;
  • IP range version switching: for whitelisted customers, it supports switching to other available origin protection IP range versions, such as the simplified version, to reduce origin-pull IP ranges.
  • Instructions for specified protection mode:

  • The maximum number of layer-7 accelerated domains that can be submitted at a time is 200, and the maximum number of layer-4 proxy instances is 100. Mixed submission of layer-7 accelerated domains/layer-4 proxy instances is supported, with a maximum total of 200 instances;
  • When more than 200 resources need to be changed, submit them in batches through this API. For example, to add 500 layer-7 accelerated domains, first submit 200 domains through this API, and then submit the remaining 300 domains in two batches, with no more than 200 domains each time.
  • 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: ModifyOriginACL.
    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

    Site ID.

    L7EnableMode No String

    Origin protection mode for layer-7 accelerated domains. Default value: specific.

  • all: Automatic protection mode. All layer-7 accelerated domains in the site will be automatically added to the origin protection list, including newly added layer-7 accelerated domains;
  • specific: Manual protection mode. You need to manually specify the layer-7 accelerated domains to be added to origin protection (specified by the L7Hosts parameter). Resources not specified will not be added to the origin protection list. Subsequent protection resource adjustments can be made through the ModifyOriginACL API.
  • Note: When the value is all, leave L7Hosts empty; when the number of layer-7 accelerated domains under the site exceeds 200, enable protection in specific mode first, enable the remaining resources through the ModifyOriginACL API, and then switch to all through the ModifyOriginACL API.

    L4EnableMode No String

    Origin protection mode for layer-4 proxy instances. Default value: specific.

  • all: Automatic protection mode. All layer-4 proxy instances in the site will be automatically added to the origin protection list, including newly added layer-4 proxy instance resources;
  • specific: Manual protection mode. You need to manually specify the layer-4 proxy instances to be added to origin protection (specified by the L4ProxyIds parameter). Resources not specified will not be added to the origin protection list. Subsequent protection resource adjustments can be made through the ModifyOriginACL API.
  • Note: When the value is all, leave L4ProxyIds empty; when the number of layer-4 proxy instances under the site exceeds 100, enable protection in specific mode first, enable the remaining resources through the ModifyOriginACL API, and then switch to all through the ModifyOriginACL API.

    OriginACLEntities.N No Array of OriginACLEntity

    Instances for which origin-pull from specific origin IP ranges needs to be enabled or disabled.
    Note: This parameter is only applicable to resource adjustment in Manual protection mode; When the origin protection mode of the corresponding level is all, the resource list of this type is automatically maintained by the system. Do not include resources of this type in this parameter. For manual adjustment, switch the corresponding level to specific through L7EnableMode/L4EnableMode first.

    OriginACLFamily No String

    Origin protection origin-pull ACL control domain. If not filled in, it remains unchanged by default; Control domain information can be obtained through the DescribeAvailableOriginACLFamily API.
    Specific values are described as follows:

  • gaz: Standard global AZ control domain;
  • mlc: Standard Chinese mainland AZ control domain;
  • emc: Standard global (excluding Chinese mainland) AZ control domain;
  • plat-gaz: Simplified global AZ control domain;
  • plat-mlc: Simplified Chinese mainland AZ control domain;
  • plat-emc: Simplified global (excluding Chinese mainland) AZ 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 Modifying Origin-pull IP Ranges to a Specified Control Domain

    This example shows you how to specify origin-pull from IP ranges in the gaz control domain for the site with ZoneId 'zone-3ey0mmcs899o'.

    Input Example

    POST / HTTP/1.1
    Host: teo.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ModifyOriginACL
    <Common request parameters>
    
    {
        "ZoneId": "zone-3ey0mmcs899o",
        "OriginACLFamily": "plat-emc"
    }

    Output Example

    {
        "Response": {
            "RequestId": "285f505b-ed21-4efb-86e6-5f05cd6c299c"
        }
    }

    Example2 Disabling Origin-pull from Specific IP Ranges for a Layer-4 Proxy Instance

    This example shows you how to disable origin-pull from specific origin IP ranges for the layer-4 proxy instance 'sid-19389e5dwwxfs' in the site with ZoneId 'zone-276zs184g93m'.

    Input Example

    POST / HTTP/1.1
    Host: teo.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ModifyOriginACL
    <Common request parameters>
    
    {
        "ZoneId": "zone-276zs184g93m",
        "OriginACLEntities": [
            {
                "OperationMode": "disable",
                "Type": "l4",
                "Instances": [
                    "sid-19389e5dwwxfs"
                ]
            }
        ]
    }

    Output Example

    {
        "Response": {
            "RequestId": "7517b2b9-4edd-4f79-baa8-c6938e7f3399"
        }
    }

    Example3 Enabling Origin-pull from Specific IP Ranges for a Newly Added Layer-7 Acceleration Domain

    This example shows you how to enable origin-pull from specific origin IP ranges for the newly added layer-7 acceleration domain 'www.qq.com' in the site with ZoneId 'zone-276zs184g93m'.

    Input Example

    POST / HTTP/1.1
    Host: teo.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ModifyOriginACL
    <Common request parameters>
    
    {
        "ZoneId": "zone-276zs184g93m",
        "OriginACLEntities": [
            {
                "OperationMode": "enable",
                "Type": "l7",
                "Instances": [
                    "www.qq.com"
                ]
            }
        ]
    }

    Output Example

    {
        "Response": {
            "RequestId": "764fcb13-30a1-4b7c-92a2-f3fa93d5ae3e"
        }
    }

    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
    InternalError Internal error.
    InvalidParameter Parameter error.
    InvalidParameter.InvalidDomains Invalid domain name. Check whether the input parameters contain a domain name that does not exist.
    InvalidParameter.InvalidProxies Invalid Layer-4 proxy. Check whether the input parameters contain a proxy that does not exist.
    InvalidParameter.ShieldNotSupportHostOriginWhitelist The current domain name does not support enabling both EdgeOne Shield and origin protection at the same time.
    OperationDenied Operation denied.
    OperationDenied.UnsupportedPlan The plan does not support this operation.
    OperationDenied.UpdateIPWhitelistFirst Update the IP allowlist first.

    ヘルプとサポート

    この記事はお役に立ちましたか?

    フィードバック