EdgeOne Logo
Documentation
请选择
请选择
Overview
Menu

ModifyZoneSetting

1. API Description

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

This API is used to modify the site configuration.

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: ModifyZoneSetting.
VersionYesStringCommon Params. The value used for this API: 2022-09-01.
RegionNoStringCommon Params. This parameter is not required.
ZoneIdYesStringSite ID to modify.
CacheConfigNoCacheConfigCache expiration time configuration
The original configuration will apply if this field is not specified.
CacheKeyNoCacheKeyThe node cache key configuration.
The original configuration will apply if this field is not specified.
MaxAgeNoMaxAgeThe browser cache configuration.
The original configuration will apply if this field is not specified.
OfflineCacheNoOfflineCacheThe offline cache configuration.
The original configuration will apply if this field is not specified.
QuicNoQuicQUIC access configuration.
The original configuration will apply if it is not specified.
PostMaxSizeNoPostMaxSizePOST transport configuration.
The original configuration will apply if it is not specified.
CompressionNoCompressionThe smart compression configuration.
The original configuration will apply if this field is not specified.
UpstreamHttp2NoUpstreamHttp2HTTP2 origin-pull configuration.
The original configuration will apply if it is not specified.
ForceRedirectNoForceRedirectForce HTTPS redirect configuration.
The original configuration will apply if it is not specified.
HttpsNoHttpsHTTPS acceleration configuration.
The original configuration will apply if it is not specified.
OriginNoOriginThe origin server configuration.
The original configuration will apply if this field is not specified.
SmartRoutingNoSmartRoutingThe smart acceleration configuration.
The original configuration will apply if this field is not specified.
WebSocketNoWebSocketWebSocket configuration.
The original configuration will apply if it is not specified.
ClientIpHeaderNoClientIpHeaderOrigin-pull client IP header configuration.
The original configuration will apply if it is not specified.
CachePrefreshNoCachePrefreshThe cache prefresh configuration.
The original configuration will apply if this field is not specified.
Ipv6NoIpv6Ipv6 access configuration.
The original configuration will apply if it is not specified.
ClientIpCountryNoClientIpCountryWhether to carry the location information of the client IP during origin-pull.
The original configuration will apply if it is not specified.
GrpcNoGrpcConfiguration of gRPC support.
The original configuration will apply if it is not specified.
ImageOptimizeNoImageOptimizeImage optimization.
It is disabled if this parameter is not specified.
StandardDebugNoStandardDebugStandard debugging configuration.

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 IPv6 access configuration of a site

This example shows you how to modify the IPv6 access configuration of a site.

Input Example

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

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

Output Example

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

Example2 Modifying the QUIC access configuration of a site

This example shows you how to modify the QUIC access configuration of a site.

Input Example

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

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

Output Example

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

Example3 Modifying the cache expiration time of a site

This example shows you how to modify the cache expiration time of a site.

Input Example

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

{
    "ZoneId": "zone-21xfqlh4qjee",
    "CacheConfig": {
        "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 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 HTTPS certificate.
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.
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.