tencent cloud

文档反馈

ModifyZoneSetting

最后更新时间:2024-11-14 16:57:55

    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-09-01.
    Region No String Common Params. This parameter is not required.
    ZoneId Yes String Site ID to modify.
    CacheConfig No CacheConfig Cache expiration time configuration
    The original configuration will apply if this field is not specified.
    CacheKey No CacheKey The node cache key configuration.
    The original configuration will apply if this field is not specified.
    MaxAge No MaxAge The browser cache configuration.
    The original configuration will apply if this field is not specified.
    OfflineCache No OfflineCache The offline cache configuration.
    The original configuration will apply if this field is not specified.
    Quic No Quic QUIC access configuration.
    The original configuration will apply if it is not specified.
    PostMaxSize No PostMaxSize POST transport configuration.
    The original configuration will apply if it is not specified.
    Compression No Compression The smart compression configuration.
    The original configuration will apply if this field is not specified.
    UpstreamHttp2 No UpstreamHttp2 HTTP2 origin-pull configuration.
    The original configuration will apply if it is not specified.
    ForceRedirect No ForceRedirect Force HTTPS redirect configuration.
    The original configuration will apply if it is not specified.
    Https No Https HTTPS acceleration configuration.
    The original configuration will apply if it is not specified.
    Origin No Origin The origin server configuration.
    The original configuration will apply if this field is not specified.
    SmartRouting No SmartRouting The smart acceleration configuration.
    The original configuration will apply if this field is not specified.
    WebSocket No WebSocket WebSocket configuration.
    The original configuration will apply if it is not specified.
    ClientIpHeader No ClientIpHeader Origin-pull client IP header configuration.
    The original configuration will apply if it is not specified.
    CachePrefresh No CachePrefresh The cache prefresh configuration.
    The original configuration will apply if this field is not specified.
    Ipv6 No Ipv6 Ipv6 access configuration.
    The original configuration will apply if it is not specified.
    ClientIpCountry No ClientIpCountry Whether to carry the location information of the client IP during origin-pull.
    The original configuration will apply if it is not specified.
    Grpc No Grpc Configuration of gRPC support.
    The original configuration will apply if it is not specified.
    ImageOptimize No ImageOptimize Image optimization.
    It is disabled if this parameter is not specified.
    StandardDebug No StandardDebug Standard debugging configuration.
    JITVideoProcess No JITVideoProcess Just-in-time media processing configuration. The original configuration applies if this field is not specified.

    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 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 Code Description
    FailedOperation Operation failed.
    FailedOperation.CertificateNotFound The edge HTTPS certificate does not exist.
    InternalError.ConfigLocked The configuration is locked. Please unlock and try again.
    InternalError.RouteError The backend routing address is incorrect.
    InternalError.SystemError Internal system error.
    InternalError.UnknowError Unknown error.
    InvalidParameter.ActionInProgress Too many attempts. Please try again later.
    InvalidParameter.CacheKeyQueryStringRequiresFullUrlCacheOff Invalid query string.
    InvalidParameter.CacheKeyQueryStringTooManyValue The query string has too many values.
    InvalidParameter.CertSystemError Internal error.
    InvalidParameter.ClientIpCountryConflictsWithIpv6 IPv6 access conflicts with client IP geographical location.
    InvalidParameter.GrpcRequireHttp2 To enable gRPC support, HTTP/2 support must be enabled as well.
    InvalidParameter.InvalidAwsPrivateAccess Invalid third-party object storage.
    InvalidParameter.InvalidCacheConfigFollowOrigin Invalid node cache. The origin behavior is followed.
    InvalidParameter.InvalidCacheKeyQueryStringValue Invalid query string.
    InvalidParameter.InvalidCacheOnlyOnSwitch Invalid node cache.
    InvalidParameter.InvalidCacheTime Invalid node cache validity.
    InvalidParameter.InvalidClientIpCountryHeaderName Invalid client IP location configuration. HeaderName consists of 1-100 alphanumeric characters and cannot start or end with hyphens (-).
    InvalidParameter.InvalidClientIpHeaderName Invalid client IP request header.
    InvalidParameter.InvalidDynamicRoutine Invalid smart acceleration.
    InvalidParameter.InvalidDynamicRoutineBilling The package does not support Smart Acceleration.
    InvalidParameter.InvalidForceRedirectType Invalid forced HTTPS direction settings
    InvalidParameter.InvalidHttps Invalid parameter "https".
    InvalidParameter.InvalidHttpsCertInfo Invalid edge HTTPS certificate configuration. The certificate content is invalid.
    InvalidParameter.InvalidHttpsCipherSuiteAndTlsVersion The cipher suite does not match the TLS version.
    InvalidParameter.InvalidHttpsHstsMaxAge Invalid HTTPS HSTS.
    InvalidParameter.InvalidHttpsTlsVersion Invalid HTTPS TLS version.
    InvalidParameter.InvalidIpv6Switch Invalid IPv6 settings.
    InvalidParameter.InvalidMaxAgeTime Invalid browser cache.
    InvalidParameter.InvalidOrigin Invalid origin server.
    InvalidParameter.InvalidOriginType Incorrect origin server type.
    InvalidParameter.InvalidParameter Invalid parameter.
    InvalidParameter.InvalidPostMaxSizeBilling The speciThe plan does not support limiting the max upload size.
    InvalidParameter.InvalidPostSizeValue Invalid POST request size.
    InvalidParameter.InvalidRangeOriginPull Invalid Range GETs.
    InvalidParameter.InvalidRequestHeaderName Invalid request header.
    InvalidParameter.InvalidResourceIdBilling You have not purchased a plan yet.
    InvalidParameter.InvalidStandardDebugClientIp Invalid client IP or CIDR block.
    InvalidParameter.InvalidStandardDebugEmptyList The 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.InvalidStandardDebugExpireTimeLimit The expiration time is exceeded.
    InvalidParameter.InvalidWebSocketTimeout Invalid WebSocket.
    InvalidParameter.MultiplyLayerNotSupportSmartRouting Smart routing is not supported.
    InvalidParameter.OCDirectOriginRequiresSmartRouting The domain name is configured to forward requests to the origin directly. iSmart Acceleration must be enabled.
    InvalidParameter.PostMaxSizeLimitExceeded Maximum upload size exceeded.
    InvalidParameter.SettingInvalidParam Configuration parameter error.
    InvalidParameter.ZoneIsGrayPublishing The site is being upgraded. Changing is not supported. Please 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 Cross-MLC-border acceleration is in beta. To join the beta, submit a ticket.
    OperationDenied.AccelerateMainlandIpv6Conflict Cross-MLC-border acceleration and IPv6 cannot be configured at the same time.
    OperationDenied.AccelerateMainlandMultiplyLayerConflict The existing domain feature under the current site conflicts with the Chinese mainland network optimization, and cannot be configured at the same time.
    OperationDenied.ConfigLocked The configuration is locked. Please unlock and try again.
    OperationDenied.DisableZoneNotCompleted The EdgeOne service of the site is being disabled. Please try again later.
    OperationDenied.ErrZoneIsAlreadyPaused The EdgeOne service of the site is disabled. Please enable it and try again.
    OperationDenied.SharedCNAMEUnsupportedAccelerateMainland The 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.SharedCNAMEUnsupportedIPv6 The 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.
    ResourceInUse The resource is occupied.
    ResourceNotFound The resource doesn’t exist.
    ResourceNotFound.PostMaxSizeQuotaNotFound Maximum upload size is not configured.
    ResourceUnavailable.CertNotFound The certificate does not exist or is not authorized.
    UnauthorizedOperation.CamUnauthorized CAM is not authorized.
    UnauthorizedOperation.NoPermission The sub-account is not authorized for the operation. Please get permissions first.
    联系我们

    联系我们,为您的业务提供专属服务。

    技术支持

    如果你想寻求进一步的帮助,通过工单与我们进行联络。我们提供7x24的工单服务。

    7x24 电话支持