当前内容仅提供英语版本,中文版我们将尽快补充,感谢您的理解。

ModifyL7AccSetting

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 NameRequiredTypeDescription
ActionYesStringCommon Params. The value used for this API: ModifyL7AccSetting.
VersionYesStringCommon Params. The value used for this API: 2022-09-01.
RegionNoStringCommon Params. This parameter is not required.
ZoneIdYesStringZone id.
ZoneConfigYesZoneConfigSite acceleration global configuration. the settings in this parameter will apply to all domain names under the site. you only need to modify the required settings directly, and other settings not passed in will remain unchanged.

3. Output Parameters

Parameter NameTypeDescription
RequestIdStringThe 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 Acceleration Configuration Of a Site

Modify the global acceleration configuration of 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": {
        "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"
        },
        "AccelerateMainland": {
            "Switch": "off"
        },
        "StandardDebug": {
            "AllowClientIPList": [],
            "Expires": "1969-12-31T16:00:00Z",
            "Switch": "off"
        }
    }
}

Output Example

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

Example2 Modifying the Global IPv6 Access Configuration Of a 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 the Global QUIC Configuration Of the Site

This example shows you how to enable QUIC for all domain names under a 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

This example shows you how to configure the cache to no-cache for all domain names under a 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": {
        "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 CodeDescription
FailedOperationOperation failed.
FailedOperation.CertificateNotFoundThe edge HTTPS certificate does not exist.
InternalError.ConfigLockedThe configuration is locked. Please unlock and try again.
InternalError.RouteErrorThe backend routing address is incorrect.
InternalError.SystemErrorInternal system error.
InternalError.UnknowErrorUnknown error.
InvalidParameter.ActionInProgressToo many attempts. Please try again later.
InvalidParameter.CacheKeyQueryStringRequiresFullUrlCacheOffInvalid query string.
InvalidParameter.CacheKeyQueryStringTooManyValueThe query string has too many values.
InvalidParameter.CertSystemErrorInternal error.
InvalidParameter.ClientIpCountryConflictsWithIpv6IPv6 access conflicts with client IP geographical location.
InvalidParameter.GrpcRequireHttp2To enable gRPC support, HTTP/2 support must be enabled as well.
InvalidParameter.InvalidAwsPrivateAccessInvalid third-party object storage.
InvalidParameter.InvalidCacheConfigFollowOriginInvalid node cache. The origin behavior is followed.
InvalidParameter.InvalidCacheKeyQueryStringValueInvalid query string.
InvalidParameter.InvalidCacheOnlyOnSwitchInvalid node cache.
InvalidParameter.InvalidCacheTimeInvalid node cache validity.
InvalidParameter.InvalidClientIpCountryHeaderNameInvalid client IP location configuration. HeaderName consists of 1-100 alphanumeric characters and cannot start or end with hyphens (-).
InvalidParameter.InvalidClientIpHeaderNameInvalid client IP request header.
InvalidParameter.InvalidDynamicRoutineInvalid smart acceleration.
InvalidParameter.InvalidDynamicRoutineBillingThe package does not support Smart Acceleration.
InvalidParameter.InvalidForceRedirectTypeInvalid forced HTTPS direction settings
InvalidParameter.InvalidHttpsInvalid parameter "https".
InvalidParameter.InvalidHttpsCertInfoInvalid edge HTTPS certificate configuration. The certificate content is invalid.
InvalidParameter.InvalidHttpsCipherSuiteAndTlsVersionThe cipher suite does not match the TLS version.
InvalidParameter.InvalidHttpsHstsMaxAgeInvalid HTTPS HSTS.
InvalidParameter.InvalidHttpsTlsVersionInvalid HTTPS TLS version.
InvalidParameter.InvalidIpv6SwitchInvalid IPv6 settings.
InvalidParameter.InvalidMaxAgeTimeInvalid browser cache.
InvalidParameter.InvalidOriginInvalid origin server.
InvalidParameter.InvalidOriginTypeIncorrect origin server type.
InvalidParameter.InvalidParameterInvalid parameter.
InvalidParameter.InvalidPostMaxSizeBillingThe speciThe plan does not support limiting the max upload size.
InvalidParameter.InvalidPostSizeValueInvalid POST request size.
InvalidParameter.InvalidRangeOriginPullInvalid Range GETs.
InvalidParameter.InvalidRequestHeaderNameInvalid request header.
InvalidParameter.InvalidResourceIdBillingYou have not purchased a plan yet.
InvalidParameter.InvalidStandardDebugClientIpInvalid client IP or CIDR block.
InvalidParameter.InvalidStandardDebugEmptyListThe AllowClientIPList parameter is mandatory. The IPv4 and IPv6 network segments are supported. 0.0.0.0/0 indicates that all IPv4 clients can be debugged, and ::/0 indicates that all IPv6 clients can be debugged.
InvalidParameter.InvalidStandardDebugExpireTimeLimitThe expiration time is exceeded.
InvalidParameter.InvalidWebSocketTimeoutInvalid WebSocket.
InvalidParameter.MultiplyLayerNotSupportSmartRoutingSmart routing is not supported.
InvalidParameter.OCDirectOriginRequiresSmartRoutingThe domain name is configured to forward requests to the origin directly. iSmart Acceleration must be enabled.
InvalidParameter.PostMaxSizeLimitExceededMaximum upload size exceeded.
InvalidParameter.SettingInvalidParamConfiguration parameter error.
InvalidParameter.ZoneIsGrayPublishingThe site is being upgraded. Changing is not supported. Please try again later.
InvalidParameter.ZoneNotFoundThe site does not exist.
InvalidParameterValue.FormatMismatchFormat mismatch.
InvalidParameterValue.GeneralMismatchConfiguration parameter format mismatch.
InvalidParameterValue.IncludeInvalidValueContains invalid value.
InvalidParameterValue.MissingNecessaryParamMissing required configuration parameters.
InvalidParameterValue.NotInEnumerationThe value is not within the required collection.
InvalidParameterValue.NotWithinRangeThe value is not within the specified range.
InvalidParameterValue.RegExMismatchDoes not match the specified regular expression.
InvalidParameterValue.UnrecognizableValueConfiguration item error.
OperationDeniedOperation denied.
OperationDenied.AccelerateMainlandDisableCross-MLC-border acceleration is in beta. To join the beta, submit a ticket.
OperationDenied.AccelerateMainlandIpv6ConflictCross-MLC-border acceleration and IPv6 cannot be configured at the same time.
OperationDenied.AccelerateMainlandMultiplyLayerConflictThe existing domain feature under the current site conflicts with the Chinese mainland network optimization, and cannot be configured at the same time.
OperationDenied.ConfigLockedThe configuration is locked. Please unlock and try again.
OperationDenied.DisableZoneNotCompletedThe EdgeOne service of the site is being disabled. Please try again later.
OperationDenied.ErrZoneIsAlreadyPausedThe EdgeOne service of the site is disabled. Please enable it and try again.
OperationDenied.SharedCNAMEUnsupportedAccelerateMainlandThe domain name is bound with a shared CNAME and cannot be changed to "Cross-MLC-border acceleration". Please unbind the domain name from the shared CNAME first.
OperationDenied.SharedCNAMEUnsupportedIPv6The domain name is bound with a shared CNAME and cannot be changed to "IPv6 access". Please unbind the domain name from the shared CNAME first.
ResourceInUseThe resource is occupied.
ResourceNotFoundThe resource doesn’t exist.
ResourceNotFound.PostMaxSizeQuotaNotFoundMaximum upload size is not configured.
ResourceUnavailable.CertNotFoundThe certificate does not exist or is not authorized.
UnauthorizedOperation.CamUnauthorizedCAM is not authorized.
UnauthorizedOperation.NoPermissionThe sub-account is not authorized for the operation. Please get permissions first.