Mengambil detail aturan perlindungan tertentu.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-waf:DescribeDefenseRule |
get |
*全部资源
|
|
None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID Instans Web Application Firewall (WAF). Catatan
Panggil operasi DescribeInstance untuk mengkueri ID Instans WAF. |
waf_cdnsdf3**** |
| TemplateId |
integer |
No |
ID Templat aturan perlindungan. Catatan
Parameter ini hanya diperlukan jika DefenseType diatur ke template. |
10318 |
| RuleId |
integer |
Yes |
ID aturan perlindungan. |
20026192 |
| DefenseType |
string |
No |
Tipe aturan perlindungan. Nilai valid:
Valid values:
|
template |
| RegionId |
string |
No |
Wilayah tempat Instans WAF berada. Nilai valid:
|
cn-hangzhou |
| ResourceManagerResourceGroupId |
string |
No |
ID kelompok sumber daya Alibaba Cloud. |
rg-acfm***q |
| Resource |
string |
No |
Objek yang dilindungi tempat aturan perlindungan diterapkan. Catatan
Parameter ini hanya diperlukan jika DefenseType diatur ke Sumber daya. |
rencs***-waf |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
D7861F61-5B61-46CE-A47C-6B19160D5EB0 |
| Rule |
object |
The details of the protection rule. |
|
| Status |
integer |
The status of the protection rule. Valid values:
|
1 |
| DefenseOrigin |
string |
The origin of the protection rule. This parameter indicates whether the rule was created by the user or by the system. Valid values:
|
custom |
| Config |
string |
The configuration of the protection rule, returned as a JSON string. For more information, see the Protection rule parameters section in CreateDefenseRule. |
{\"status\":1,\"policyId\":1012,\"action\":\"block\"} |
| RuleId |
integer |
The ID of the protection rule. |
2732975 |
| DefenseScene |
string |
The scenario to which the protection rule applies. If the DefenseType parameter is set to template, the valid values are:
If the DefenseType parameter is set to resource, the valid values are:
If the DefenseType parameter is set to global, the valid values are:
|
waf_group |
| GmtModified |
integer |
The time when the protection rule was modified. This value is a UNIX timestamp. Unit: milliseconds. |
1665196746000 |
| RuleName |
string |
The name of the protection rule. |
test1 |
| TemplateId |
integer |
The ID of the protection rule template. Catatan
This parameter is returned only if the DefenseType parameter is set to template. |
9114 |
| Resource |
string |
The protected object to which the protection rule applies. Catatan
This parameter is returned only if the DefenseType parameter is set to resource. |
rencs***-waf |
| DefenseType |
string |
The type of the protection rule. Valid values:
|
template |
Contoh
Respons sukses
JSONformat
{
"RequestId": "D7861F61-5B61-46CE-A47C-6B19160D5EB0",
"Rule": {
"Status": 1,
"DefenseOrigin": "custom",
"Config": "{\\\"status\\\":1,\\\"policyId\\\":1012,\\\"action\\\":\\\"block\\\"}",
"RuleId": 2732975,
"DefenseScene": "waf_group",
"GmtModified": 1665196746000,
"RuleName": "test1",
"TemplateId": 9114,
"Resource": "rencs***-waf",
"DefenseType": "template"
}
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.