tencent cloud

APIs

ModifyL7AccSetting

Download
Focus Mode
Font Size
Last updated: 2026-11-25 16:57:43

1. API Description

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

This API is used to modify the global configuration of site acceleration.

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: ModifyL7AccSetting.
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.
ZoneConfig Yes ZoneConfig Global configuration for site acceleration. The configuration in this parameter takes effect for all domain names under the site. You just need to directly modify the desired configuration. Other configuration not passed in will keep its original status.

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 the Global Configuration for Site Acceleration

Modify the global configuration for site acceleration.

Input Example

POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyL7AccSetting
<Common request parameters>

{
    "ZoneId": "zone-21xfqlh4qjee",
    "ZoneConfig": {
        "SmartRouting": {
            "Switch": "on"
        },
        "Cache": {
            "CustomTime": {
                "CacheTime": 2592000,
                "Switch": "off"
            },
            "FollowOrigin": {
                "DefaultCache": "on",
                "DefaultCacheStrategy": "on",
                "DefaultCacheTime": 0,
                "Switch": "on"
            },
            "NoCache": {
                "Switch": "off"
            }
        },
        "MaxAge": {
            "FollowOrigin": "on",
            "CacheTime": 600
        },
        "CacheKey": {
            "FullURLCache": "on",
            "IgnoreCase": "off",
            "QueryString": {
                "Action": "includeCustom",
                "Switch": "off",
                "Values": []
            }
        },
        "CachePrefresh": {
            "CacheTimePercent": 90,
            "Switch": "on"
        },
        "OfflineCache": {
            "Switch": "on"
        },
        "Compression": {
            "Algorithms": [
                "brotli",
                "gzip"
            ],
            "Switch": "on"
        },
        "ForceRedirectHTTPS": {
            "RedirectStatusCode": 302,
            "Switch": "off"
        },
        "HSTS": {
            "IncludeSubDomains": "off",
            "Timeout": 0,
            "Preload": "off",
            "Switch": "off"
        },
        "TLSConfig": {
            "Version": [
                "TLSv1",
                "TLSv1.1",
                "TLSv1.2",
                "TLSv1.3"
            ],
            "CipherSuite": "loose-v2023"
        },
        "OCSPStapling": {
            "Switch": "off"
        },
        "HTTP2": {
            "Switch": "off"
        },
        "QUIC": {
            "Switch": "off"
        },
        "UpstreamHTTP2": {
            "Switch": "off"
        },
        "IPv6": {
            "Switch": "off"
        },
        "WebSocket": {
            "Switch": "off",
            "Timeout": 30
        },
        "PostMaxSize": {
            "MaxSize": 524288000,
            "Switch": "on"
        },
        "ClientIPHeader": {
            "HeaderName": "",
            "Switch": "off"
        },
        "ClientIPCountry": {
            "HeaderName": "",
            "Switch": "off"
        },
        "Grpc": {
            "Switch": "off"
        },
        "NetworkErrorLogging": {
            "Switch": "on"
        },
        "AccelerateMainland": {
            "Switch": "off"
        },
        "StandardDebug": {
            "AllowClientIPList": [],
            "Expires": "1969-12-31T16:00:00Z",
            "Switch": "off"
        }
    }
}

Output Example

{
    "Response": {
        "RequestId": "5e0a2b4e-df6d-4d2a-ac39-1706cbf8a707"
    }
}

Example2 Modifying Global IPv6 Access Configuration for Site Acceleration

Enable IPv6 access for ALL domain names under the site.

Input Example

POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyL7AccSetting
<Common request parameters>

{
    "ZoneId": "zone-21xfqlh4qjee",
    "ZoneConfig": {
        "IPv6": {
            "Switch": "on"
        }
    }
}

Output Example

{
    "Response": {
        "RequestId": "5e0a2b4e-df6d-4d2a-ac39-1706cbf8a707"
    }
}

Example3 Modifying Global QUIC Configuration for Site Acceleration

Enable QUIC for ALL domain names under the site.

Input Example

POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyL7AccSetting
<Common request parameters>

{
    "ZoneId": "zone-21xfqlh4qjee",
    "ZoneConfig": {
        "QUIC": {
            "Switch": "on"
        }
    }
}

Output Example

{
    "Response": {
        "RequestId": "5e0a2b4e-df6d-4d2a-ac39-1706cbf8a707"
    }
}

Example4 Modifying Global Node Cache TTL Configuration for Site Acceleration

For all domains under the site, configure the cache as no cache.

Input Example

POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyL7AccSetting
<Common request parameters>

{
    "ZoneId": "zone-21xfqlh4qjee",
    "ZoneConfig": {
        "Cache": {
            "NoCache": {
                "Switch": "on"
            }
        }
    }
}

Output Example

{
    "Response": {
        "RequestId": "5e0a2b4e-df6d-4d2a-ac39-1706cbf8a707"
    }
}

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.
FailedOperation.CertificateNotFound The edge HTTPS certificate does not exist.
InternalError.ConfigLocked The configuration has been locked. Unlock it and retry.
InternalError.RouteError Backend service routing address error.
InternalError.SystemError Internal error. System error.
InternalError.UnknowError Unknown error.
InvalidParameter.ActionInProgress Operations are too frequent. Please try again later.
InvalidParameter.CacheKeyQueryStringRequiresFullUrlCacheOff Invalid query string.
InvalidParameter.CacheKeyQueryStringTooManyValue Query string rule exceeds the limit.
InvalidParameter.CertSystemError Internal error.
InvalidParameter.ClientIpCountryConflictsWithIpv6 IPv6 access conflicts with the Client IP Geolocation feature.
InvalidParameter.GrpcRequireHttp2 Enabling Grpc protocol support requires enabling HTTP/2 protocol support simultaneously.
InvalidParameter.InvalidAwsPrivateAccess Invalid third-party object storage.
InvalidParameter.InvalidCacheConfigFollowOrigin Invalid node cache. Follow the origin site behavior.
InvalidParameter.InvalidCacheKeyQueryStringValue Invalid query string.
InvalidParameter.InvalidCacheOnlyOnSwitch Invalid node cache.
InvalidParameter.InvalidCacheTime Invalid node cache time.
InvalidParameter.InvalidClientIpCountryHeaderName Invalid client IP location configuration. HeaderName consists of 1-100 letters or digits and cannot start or end with "-".
InvalidParameter.InvalidClientIpHeaderName Invalid client IP request header.
InvalidParameter.InvalidDynamicRoutine Invalid smart acceleration.
InvalidParameter.InvalidDynamicRoutineBilling The package does not support intelligent acceleration configuration.
InvalidParameter.InvalidForceRedirectType Invalid forced HTTPS redirect.
InvalidParameter.InvalidHttps Invalid HTTPS.
InvalidParameter.InvalidHttpsCertInfo Invalid edge HTTPS certificate configuration. The certificate content is invalid.
InvalidParameter.InvalidHttpsCipherSuiteAndTlsVersion Encryption suite and TLS version mismatch.
InvalidParameter.InvalidHttpsHstsMaxAge Invalid HTTPS HSTS.
InvalidParameter.InvalidHttpsTlsVersion Invalid HTTPS TLS version.
InvalidParameter.InvalidIpv6Switch Invalid Ipv6 switch configuration.
InvalidParameter.InvalidMaxAgeTime Invalid browser cache.
InvalidParameter.InvalidOrigin Invalid origin server.
InvalidParameter.InvalidOriginType Origin server type error.
InvalidParameter.InvalidParameter Parameter error.
InvalidParameter.InvalidPostMaxSizeBilling Maximum upload size is not supported for packages.
InvalidParameter.InvalidPostSizeValue Invalid maximum upload size.
InvalidParameter.InvalidRangeOriginPull Invalid range-based origin pull.
InvalidParameter.InvalidRequestHeaderName Invalid request header.
InvalidParameter.InvalidResourceIdBilling No package bundle.
InvalidParameter.InvalidStandardDebugClientIp Invalid client ip or ip range.
InvalidParameter.InvalidStandardDebugEmptyList AllowClientIPList parameter required. Supports IPv4 and IPv6 CIDR blocks. 0.0.0.0/0 indicates permission for all IPv4 client-side debugging, and ::/0 indicates permission for all IPv6 client-side debugging.
InvalidParameter.InvalidStandardDebugExpireTimeLimit The valid period exceeds the limit.
InvalidParameter.InvalidWebSocketTimeout Invalid WebSocket.
InvalidParameter.MultiplyLayerNotSupportSmartRouting Smart routing unsupported
InvalidParameter.OCDirectOriginRequiresSmartRouting The domain name is in a direct origin architecture, so smart acceleration must remain enabled.
InvalidParameter.PostMaxSizeLimitExceeded Maximum upload size exceeds limit
InvalidParameter.SettingInvalidParam Configuration item parameter error.
InvalidParameter.ShieldNotSupportZoneCachePrefresh The current site does not support enabling EdgeOne Shield and cache pre-refresh simultaneously.
InvalidParameter.ShieldNotSupportZoneSmartRouting The current site does not support enabling EdgeOne Shield and smart acceleration simultaneously.
InvalidParameter.ZoneIsGrayPublishing Site is upgrading. Changes are not currently supported. Try again later.
InvalidParameter.ZoneNotFound The site does not exist.
InvalidParameterValue.FormatMismatch Format mismatch.
InvalidParameterValue.GeneralMismatch Configuration parameter format mismatch.
InvalidParameterValue.IncludeInvalidValue Contains invalid value.
InvalidParameterValue.MissingNecessaryParam Missing required configuration parameters.
InvalidParameterValue.NotInEnumeration The value is not within the required collection.
InvalidParameterValue.NotWithinRange The value is not within the specified range.
InvalidParameterValue.RegExMismatch Does not match the specified regular expression.
InvalidParameterValue.UnrecognizableValue Configuration item error.
OperationDenied Operation denied.
OperationDenied.AccelerateMainlandDisable Feature in beta test. Contact sales to enable "network optimization in the Chinese mainland (international acceleration)".
OperationDenied.AccelerateMainlandIpv6Conflict Acceleration on the Chinese mainland conflicts with IPv6. They cannot be configured at the same time.
OperationDenied.AccelerateMainlandMultiplyLayerConflict A domain name feature under the current site conflicts with network optimization in the Chinese mainland and cannot be configured simultaneously.
OperationDenied.ConfigLocked The configuration has been locked. Unlock it and retry.
OperationDenied.DisableZoneNotCompleted Site disabling not complete. Try again later.
OperationDenied.ErrZoneIsAlreadyPaused Site disabled. Turn it on and try again.
OperationDenied.NotAllowCloseAccelerateMainlandWhenDomainBoundExclusiveIP A domain name under the current site is associated with an exclusive accelerated IP. To disable network optimization in the Chinese mainland, unbind the exclusive IP first and try again.
OperationDenied.SharedCNAMEUnsupportedAccelerateMainland Domains bound to a shared CNAME are not allowed to update network optimization in the Chinese mainland (international acceleration) access. If you need to update it separately, unbind the domain from the shared CNAME first.
OperationDenied.SharedCNAMEUnsupportedIPv6 Domains bound to a shared CNAME are not allowed to update IPv6 access. If you need to update it separately, unbind the domain from the shared CNAME first.
ResourceInUse The resource is occupied.
ResourceNotFound The resource does not exist.
ResourceNotFound.PostMaxSizeQuotaNotFound Maximum upload size limit unconfigured
ResourceUnavailable.CertNotFound The cert does not exist or is unauthorized.
UnauthorizedOperation.CamUnauthorized Unauthorized Cam operation.
UnauthorizedOperation.NoPermission The sub-account does not have operation permissions. Add the required permissions and try again.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback