tencent cloud

Feedback

ModifyZoneSetting

Last updated: 2023-03-09 17:41:35

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 Name Required Type Description
Action Yes String Common Params. The value used for this API: ModifyZoneSetting.
Version Yes String Common Params. The value used for this API: 2022-01-06.
Region No String Common Params. This parameter is not required for this API.
ZoneId Yes String ID of the site to be modified
Cache No CacheConfig Cache expiration time
CacheKey No CacheKey Node cache key
MaxAge No MaxAge Browser cache configuration
OfflineCache No OfflineCache Offline cache
Quic No Quic QUIC access
PostMaxSize No PostMaxSize Maximum size of files transferred over POST request
Compression No Compression Smart compression configuration
UpstreamHttp2 No UpstreamHttp2 HTTP2 origin-pull configuration
ForceRedirect No ForceRedirect Force HTTPS redirect configuration
Https No Https HTTPS acceleration configuration
Origin No Origin Origin server configuration
SmartRouting No SmartRouting Smart acceleration configuration
WebSocket No WebSocket WebSocket configuration
ClientIpHeader No ClientIp Origin-pull client IP header configuration
CachePrefresh No CachePrefresh Cache prefresh configuration

3. Output Parameters

Parameter Name Type Description
ZoneId String Site ID
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Modifying cache validity

Input Example

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

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

Output Example

{
    "Response": {
        "RequestId": "5e0a2b4e-df6d-4d2a-ac39-1706cbf8a707",
        "ZoneId": "zone-21xfqlh4qjee"
    }
}

Example2 Modifying IPv6 access configuration

Input Example

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

{
    "ZoneId": "zone-21xfqlh4qjee"
}

Output Example

{
    "Response": {
        "RequestId": "5e0a2b4e-df6d-4d2a-ac39-1706cbf8a707",
        "ZoneId": "zone-21xfqlh4qjee"
    }
}

Example3 Modifying QUIC access configuration

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",
        "ZoneId": "zone-21xfqlh4qjee"
    }
}

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
InvalidParameter.InvalidCacheOnlyOnSwitch Invalid node cache.
InvalidParameter.InvalidClientIpHeaderName Invalid client IP request header.
InvalidParameter.InvalidDynamicRoutineBilling The package does not support Smart Acceleration.
InvalidParameter.InvalidForceRedirectType
InvalidParameter.InvalidOrigin Invalid origin server.
InvalidParameter.InvalidPostMaxSizeBilling The speciThe plan does not support limiting the max upload size.
InvalidParameter.InvalidPostSizeValue Invalid POST request size.
InvalidParameter.InvalidRequestHeaderName Invalid request header.
InvalidParameter.InvalidResourceIdBilling You have not purchased a plan yet.
InvalidParameter.InvalidWebSocketTimeout Invalid WebSocket.
InvalidParameter.SettingInvalidParam Configuration parameter error.
InvalidParameter.ZoneNotFound The site does not exist.
OperationDenied Operation denied.
UnauthorizedOperation.CamUnauthorized CAM is not authorized.
UnauthorizedOperation.NoPermission The sub-account is not authorized for the operation. Please get permissions first.
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support