Domain name for API request: teo.intl.tencentcloudapi.com.
This API is used to query the web and security protection configurations.
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: DescribeSecurityPolicy. |
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 | Zone ID. |
Entity | No | String | SecurityPolicy type, the following parameter values can be used for query: ZoneDefaultPolicy : used to specify a query for site-level policies;Template : used to specify a query for policy templates. the TemplateId parameter needs to be specified simultaneously;Host : used to specify a query for domain-level policies (note: when using Host to specify a domain name service policy, only domain name services or policy templates that have been applied domain-level policies are supported). |
TemplateId | No | String | Specify the policy Template ID. Use this parameter to specify the ID of the policy Template to query the Template configuration when the Entity parameter value is set to Template . |
Host | No | String | Specify the domain name. When the Entity parameter value is set to Host , use the domain-level policy specified by this parameter to query the domain configuration. For example, use www.example.com to configure the domain-level policy for that domain name. |
Parameter Name | Type | Description |
---|---|---|
SecurityPolicy | SecurityPolicy | Security policy configuration. Note: This field may return null, which indicates a failure to obtain a valid value. |
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. |
Query security protection settings
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeSecurityPolicy
<Common request parameters>
{
"Entity": "Host",
"Host": "www.example.com",
"ZoneId": "zone-xxqr76cy"
}
{
"Response": {
"RequestId": "cb5d2c0e-295e-412a-891a-9f8ab6057b4a",
"SecurityPolicy": {
"CustomRules": {
"Rules": [
{
"Id": "1492837231",
"Name": "ASimpleIPRule",
"Condition": "${http.request.ip} in ['1.1.1.1', '10.10.10.0/24'] or ${http.request.ip.asn} in ['132203']",
"Action": {
"Name": "Deny"
},
"Enabled": "on",
"RuleType": "PreciseMatchRule",
"Priority": 50
}
]
},
"ManagedRules": {
"Enabled": "on",
"AutoUpdate": {
"AutoUpdateToLatestVersion": "off",
"RulesetVersion": "2023-12-21T12:00:32Z"
},
"SemanticAnalysis": "on",
"DetectionOnly": "on",
"ManagedRuleGroups": [
{
"GroupId": "wafmanagedrulegroup-vulnerability-scanners",
"SensitivityLevel": "loose",
"Action": {
"Name": "Monitor"
},
"MetaData": {
Scanner Attack Vulnerability Protection
"GroupName": "Scanner Attack Vulnerability Protection"
"RuleDetails": [
{
"RuleId": "4401215444",
"RiskLevel": "extreme",
Protection rule against historic sql injection vulnerabilities in dedecms
"Tags": [],
"RuleVersion": "2023-12-21T12:00:32Z"
},
{
"RuleId": "4401214877",
"RiskLevel": "medium",
Intercept xss verification payloads of common scanners
"Tags": [],
"RuleVersion": "2023-12-21T12:00:32Z"
}
]
}
}
]
}
}
}
}
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 |
---|---|
InternalError.ProxyServer | An unknown error occurred in the backend server. |
InvalidParameter.Security | Invalid parameter. |
UnauthorizedOperation.CamUnauthorized | CAM is not authorized. |
UnauthorizedOperation.NoPermission | The sub-account is not authorized for the operation. Please get permissions first. |
UnauthorizedOperation.Unknown | An unknown error occurred in the backend server. |