Domain name for API request: waf.intl.tencentcloudapi.com.
This API is used to modify the module switch status of large model protection, supporting independent on/off operations for the master switch and each submodule. Before enabling, ensure that the instance has purchased the large model protection capability. If not purchased, the enable operation returns the AuthFailure.ErrCodeNoPurchased error.
A maximum of 20 requests can be initiated per second for this API.
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: ModifyLLMStatus. |
| Version | Yes | String | Common Params. The value used for this API: 2018-01-25. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-guangzhou, ap-seoul, ap-singapore. |
| Status | Yes | Boolean | Switch status. true: enabled; false: disabled. |
| Domain | Yes | String | Domain or service ID to operate on |
| SwitchType | Yes | Integer | Switch type, used to specify the protection module switch to operate on. Valid values: |
| InstanceId | No | String | WAF instance ID, indicating the WAF instance to which the current operation belongs. It can be obtained through the DescribeInstances API. |
| Parameter Name | Type | Description |
|---|---|---|
| Res | String | Operation result. "Success" is returned if the operation succeeds. |
| 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. |
This example shows you how to disable content compliance detection for a specified domain (SwitchType=6).
POST / HTTP/1.1
Host: waf.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyLLMStatus
<Common request parameters>
{
"Status": false,
"Domain": "example.com",
"SwitchType": 6,
"InstanceId": "waf_2kxtlbky01b3wceb"
}
{
"Response": {
"RequestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"Res": "Success"
}
}
This example shows you how to enable the master protection switch for a specified domain.
POST / HTTP/1.1
Host: waf.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyLLMStatus
<Common request parameters>
{
"Status": true,
"Domain": "example.com",
"SwitchType": 1,
"InstanceId": "waf_2kxtlbky01b3wceb"
}
{
"Response": {
"RequestId": "086bade4-6f71-4b37-949d-ed472feb3d1e",
"Res": "Success"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| AuthFailure.ErrCodeNoPurchased | The current instance has not purchased the API security package. |
| InternalError | Internal error. |
| InvalidParameter | Parameter error. |
| InvalidParameterValue | Invalid parameter value. |
| UnsupportedOperation.InvalidRequest | InvalidRequest |
フィードバック