@@ -29,7 +29,7 @@ func (me *WafService) DescribeWafCustomRuleById(ctx context.Context, domain, rul
2929 request .Limit = common .Uint64Ptr (20 )
3030 request .Filters = []* waf.FiltersItemNew {
3131 {
32- Name : common .StringPtr ("RuleID " ),
32+ Name : common .StringPtr ("RuleId " ),
3333 Values : common .StringPtrs ([]string {ruleId }),
3434 ExactMatch : common .BoolPtr (true ),
3535 },
@@ -94,7 +94,7 @@ func (me *WafService) DescribeWafCustomWhiteRuleById(ctx context.Context, domain
9494 request .Limit = common .Uint64Ptr (20 )
9595 request .Filters = []* waf.FiltersItemNew {
9696 {
97- Name : common .StringPtr ("RuleID " ),
97+ Name : common .StringPtr ("RuleId " ),
9898 Values : common .StringPtrs ([]string {ruleId }),
9999 ExactMatch : common .BoolPtr (true ),
100100 },
@@ -886,7 +886,7 @@ func (me *WafService) DescribeWafAntiFakeById(ctx context.Context, id, domain st
886886 request .Limit = common .Uint64Ptr (10 )
887887 request .Filters = []* waf.FiltersItemNew {
888888 {
889- Name : common .StringPtr ("RuleID " ),
889+ Name : common .StringPtr ("RuleId " ),
890890 Values : common .StringPtrs ([]string {id }),
891891 ExactMatch : common .BoolPtr (true ),
892892 },
@@ -948,6 +948,15 @@ func (me *WafService) DescribeWafAntiInfoLeakById(ctx context.Context, ruleId, d
948948
949949 request := waf .NewDescribeAntiInfoLeakageRulesRequest ()
950950 request .Domain = & domain
951+ request .Limit = common .Uint64Ptr (10 )
952+ request .Offset = common .Uint64Ptr (0 )
953+ request .Filters = []* waf.FiltersItemNew {
954+ {
955+ Name : common .StringPtr ("RuleId" ),
956+ Values : common .StringPtrs ([]string {ruleId }),
957+ ExactMatch : common .BoolPtr (true ),
958+ },
959+ }
951960
952961 defer func () {
953962 if errRet != nil {
@@ -969,14 +978,7 @@ func (me *WafService) DescribeWafAntiInfoLeakById(ctx context.Context, ruleId, d
969978 return
970979 }
971980
972- ruleIdInt , _ := strconv .ParseUint (ruleId , 10 , 64 )
973- for _ , item := range response .Response .RuleList {
974- if * item .RuleId == ruleIdInt {
975- antiInfoLeak = item
976- break
977- }
978- }
979-
981+ antiInfoLeak = response .Response .RuleList [0 ]
980982 return
981983}
982984
@@ -1189,7 +1191,7 @@ func (me *WafService) DescribeWafCcById(ctx context.Context, domain, ruleId stri
11891191 request .Domain = & domain
11901192 request .Filters = []* waf.FiltersItemNew {
11911193 {
1192- Name : common .StringPtr ("RuleID " ),
1194+ Name : common .StringPtr ("RuleId " ),
11931195 Values : common .StringPtrs ([]string {ruleId }),
11941196 ExactMatch : common .BoolPtr (true ),
11951197 },
0 commit comments