tencent cloud

APIs

ModifyLLMStatus

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2026-11-17 19:20:27

1. API Description

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.

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: 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:
1: Master protection switch, controls the global enablement/disablement of the large model protection feature.
2: Compute consumption protection rule switch, controls the enablement/disablement of the compute consumption limiting feature.
3: Custom protection rule switch, controls the enablement/disablement of the custom content security rule feature.
4: ToolCall protection switch, controls the enablement/disablement of the tool call security detection feature.
5: Prompt attack protection switch, controls the enablement/disablement of the prompt injection/jailbreak attack detection feature.
6: Content compliance detection switch, controls the enablement/disablement of the input/output content compliance detection feature.
7: Sensitive data detection switch, controls the enablement/disablement of the sensitive information leakage detection (DLP) feature.
8: Skill security detection switch, controls the enablement/disablement of the Skill/Plugin call security detection feature.
9: Intent behavior detection switch, controls the enablement/disablement of the user intent recognition and behavior detection feature.
10: Malicious URL detection switch, controls the enablement/disablement of the malicious link detection feature in responses.

InstanceId No String

WAF instance ID, indicating the WAF instance to which the current operation belongs. It can be obtained through the DescribeInstances API.

3. Output Parameters

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.

4. Example

Example1 Disabling the Content Compliance Detection Switch

This example shows you how to disable content compliance detection for a specified domain (SwitchType=6).

Input Example

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"
}

Output Example

{
    "Response": {
        "RequestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "Res": "Success"
    }
}

Example2 Enabling the Master Protection Switch for LLM

This example shows you how to enable the master protection switch for a specified domain.

Input Example

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"
}

Output Example

{
    "Response": {
        "RequestId": "086bade4-6f71-4b37-949d-ed472feb3d1e",
        "Res": "Success"
    }
}

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
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

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック