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

ModifyZoneWorkMode

1. API Description

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

This API is used to modify the working mode of configuration modules under a site. Configuration modules can enable version management mode or immediate effect mode by configuration group dimension. For details, refer to version management (https://www.tencentcloud.comom/document/product/1552/113690?from_cn_redirect=1).

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: ModifyZoneWorkMode.
VersionYesStringCommon Params. The value used for this API: 2022-09-01.
RegionNoStringCommon Params. This parameter is not required.
ZoneIdYesStringZone ID.
WorkModeInfos.NNoArray of ConfigGroupWorkModeInfoVersion management configuration group working mode. site configuration modules can enable "version management mode" or "immediate effect mode" by configuration group dimension. for details, see version management.

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 Modify the Working Mode of the Site Configuration Group

Modify the site layer-7 acceleration configuration group and edge function configuration group working mode to version management.

Input Example

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

{
    "ZoneId": "zone-27********v1",
    "WorkModeInfos": [
        {
            "ConfigGroupType": "l7_acceleration",
            "WorkMode": "version_control"
        },
        {
            "ConfigGroupType": "edge_functions",
            "WorkMode": "version_control"
        }
    ]
}

Output Example

{
    "Response": {
        "RequestId": "a06f52e7-2aab-4510-b2c2-1065bfb4414c"
    }
}

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
InvalidParameter.WorkModeIsSameThe site working mode remains unchanged.
InvalidParameter.ZoneNotFoundThe site does not exist.
InvalidParameterValue.OwnershipVerificationNotPassedVerification failed for ownership. please first complete site ownership verification.
OperationDenied.AliasDomainNotSupportThis operation is not supported for alias domain names.
OperationDenied.ConfigLockedThe configuration is locked. Please unlock and try again.
OperationDenied.DomainStatusUnstableSome domain names on the site are currently experiencing instability. The stable states for domain names are "online" and "offline".
OperationDenied.ErrZoneIsAlreadyPausedThe EdgeOne service of the site is disabled. Please enable it and try again.
OperationDenied.NotInVersionControlWhiteListThe current user is not included in the whitelist for version management.
OperationDenied.OwnershipVerificationNotPassedOwnership verification failed. Please complete the site ownership verification first.
OperationDenied.PlanTypeIsWrongThe enterprise package for site configuration does not support the version control feature.
OperationDenied.VersionControlLockedThe operation is not allowed because the version management mode is applied.
OperationDenied.VersionControlNeedNSSwitchedFor sites in NS mode, please first switch NS before toggling version management.
ResourceNotFound.ZoneNotFoundSite not found.
ResourceUnavailable.ZoneNotFoundThe site does not exist or is not belong to this account.