diff --git a/go.mod b/go.mod index c8f911f6b6..355c74cf45 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.1107 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.1033 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.1135 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1148 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1149 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.1128 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.0.762 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.1111 @@ -97,7 +97,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tsf v1.0.674 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.860 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.1148 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.1037 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.1149 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wedata v1.0.792 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wss v1.0.199 github.com/tencentyun/cos-go-sdk-v5 v0.7.64 diff --git a/go.sum b/go.sum index 2b409b4abe..6a3b48d3c2 100644 --- a/go.sum +++ b/go.sum @@ -947,6 +947,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1145 h1:DET github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1145/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1148 h1:+2jHvXzO0ljzTtqdnZ6ug0wMLYSaMwyr1zJa0z/DqyE= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1148/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1149 h1:a2N8e9YHftVvJmI6PIVJBLfPuy2dn+jZ92atTsmtJuc= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1149/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter v1.0.993 h1:WlPgXldQCxt7qi5Xrc6j6zTrsXWzN5BcOGs7Irq7fwQ= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter v1.0.993/go.mod h1:Z9U8zNtyuyKhjS0698wqsrG/kLx1TQ5CEixXBwVe7xY= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip v1.0.860 h1:F3esKBIT3HW9+7Gt8cVgf8X06VdGIczpgLBUECzSEzU= @@ -1077,6 +1079,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.1148 h1:qtzL3Q github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.1148/go.mod h1:NHVGgF5BAXq5emdefxsC+P1/MsL3ryr5s2jHpxDTYJM= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.1037 h1:sgHOHqVFcO266dnoh0KJ0CoxrRglRZYKW78iBh41Giw= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.1037/go.mod h1:QM5m6aZ65kaxaES0D44BNKmemn+9WBf5vr3HDDPrh8U= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.1149 h1:SOrBtPoCjS8Jsq1dHa2Ul+ZUPP/vT6j/dJN/08ZEMHM= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.1149/go.mod h1:6e3sb0k9K8kWQdB/WVXVrZxyYxrSC8hN4MWpzYRR80s= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wedata v1.0.792 h1:NLgKNOIHWa38AmW7dyfI9Jlcp2Kr9VRD94f48pPNmxM= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wedata v1.0.792/go.mod h1:Xz6vPV3gHlzPwtEcmWdWO1EUXJDgn2p7UMCXbJiVioQ= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wss v1.0.199 h1:hMBLtiJPnZ9GvA677cTB6ELBR6B68wCR2QY1sNoGQc4= diff --git a/tencentcloud/services/waf/resource_tc_waf_bot_scene_status_config.go b/tencentcloud/services/waf/resource_tc_waf_bot_scene_status_config.go new file mode 100644 index 0000000000..9aa2060b04 --- /dev/null +++ b/tencentcloud/services/waf/resource_tc_waf_bot_scene_status_config.go @@ -0,0 +1,189 @@ +package waf + +import ( + "context" + "fmt" + "log" + "strings" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + wafv20180125 "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf/v20180125" + + tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func ResourceTencentCloudWafBotSceneStatusConfig() *schema.Resource { + return &schema.Resource{ + Create: resourceTencentCloudWafBotSceneStatusConfigCreate, + Read: resourceTencentCloudWafBotSceneStatusConfigRead, + Update: resourceTencentCloudWafBotSceneStatusConfigUpdate, + Delete: resourceTencentCloudWafBotSceneStatusConfigDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "domain": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: "Domain.", + }, + + "scene_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: "Scene ID.", + }, + + "status": { + Type: schema.TypeBool, + Required: true, + Description: "Bot status. true - enable; false - disable.", + }, + + "type": { + Type: schema.TypeString, + Computed: true, + Description: "Scene type, default: Default scenario, custom: Non default scenario.", + }, + + "scene_name": { + Type: schema.TypeString, + Computed: true, + Description: "Scene name.", + }, + + "priority": { + Type: schema.TypeInt, + Computed: true, + Description: "Priority.", + }, + }, + } +} + +func resourceTencentCloudWafBotSceneStatusConfigCreate(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_waf_bot_scene_status_config.create")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + domain string + sceneId string + ) + + if v, ok := d.GetOk("domain"); ok { + domain = v.(string) + } + + if v, ok := d.GetOk("scene_id"); ok { + domain = v.(string) + } + + d.SetId(strings.Join([]string{domain, sceneId}, tccommon.FILED_SP)) + + return resourceTencentCloudWafBotSceneStatusConfigUpdate(d, meta) +} + +func resourceTencentCloudWafBotSceneStatusConfigRead(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_waf_bot_scene_status_config.read")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(tccommon.ContextNil) + ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta) + service = WafService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()} + ) + + idSplit := strings.Split(d.Id(), tccommon.FILED_SP) + if len(idSplit) != 2 { + return fmt.Errorf("id is broken,%s", d.Id()) + } + + domain := idSplit[0] + sceneId := idSplit[1] + + respData, err := service.DescribeWafBotSceneStatusConfigById(ctx, domain, sceneId) + if err != nil { + return err + } + + if respData == nil { + d.SetId("") + log.Printf("[WARN]%s resource `waf_bot_scene_status_config` [%s] not found, please check if it has been deleted.\n", logId, d.Id()) + return nil + } + + _ = d.Set("domain", domain) + _ = d.Set("scene_id", sceneId) + + if respData.SceneStatus != nil { + _ = d.Set("status", respData.SceneStatus) + } + + if respData.Type != nil { + _ = d.Set("type", respData.Type) + } + + if respData.SceneName != nil { + _ = d.Set("scene_name", respData.SceneName) + } + + if respData.Priority != nil { + _ = d.Set("priority", respData.Priority) + } + + return nil +} + +func resourceTencentCloudWafBotSceneStatusConfigUpdate(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_waf_bot_scene_status_config.update")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(tccommon.ContextNil) + ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta) + request = wafv20180125.NewModifyBotSceneStatusRequest() + ) + + idSplit := strings.Split(d.Id(), tccommon.FILED_SP) + if len(idSplit) != 2 { + return fmt.Errorf("id is broken,%s", d.Id()) + } + + domain := idSplit[0] + sceneId := idSplit[1] + + if v, ok := d.GetOkExists("status"); ok { + request.Status = helper.Bool(v.(bool)) + } + + request.Domain = &domain + request.SceneId = &sceneId + reqErr := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError { + result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseWafV20180125Client().ModifyBotSceneStatusWithContext(ctx, request) + if e != nil { + return tccommon.RetryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + + return nil + }) + + if reqErr != nil { + log.Printf("[CRITAL]%s update waf bot scene status config failed, reason:%+v", logId, reqErr) + return reqErr + } + + return resourceTencentCloudWafBotSceneStatusConfigRead(d, meta) +} + +func resourceTencentCloudWafBotSceneStatusConfigDelete(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_waf_bot_scene_status_config.delete")() + defer tccommon.InconsistentCheck(d, meta)() + + return nil +} diff --git a/tencentcloud/services/waf/resource_tc_waf_bot_scene_status_config.md b/tencentcloud/services/waf/resource_tc_waf_bot_scene_status_config.md new file mode 100644 index 0000000000..10c4536749 --- /dev/null +++ b/tencentcloud/services/waf/resource_tc_waf_bot_scene_status_config.md @@ -0,0 +1,19 @@ +Provides a resource to create a WAF bot scene status config + +Example Usage + +```hcl +resource "tencentcloud_waf_bot_scene_status_config" "example" { + domain = "example.com" + scene_id = "3024324123" + status = true +} +``` + +Import + +WAF bot scene status config can be imported using the id, e.g. + +``` +terraform import tencentcloud_waf_bot_scene_status_config.example example.com#3024324123 +``` diff --git a/tencentcloud/services/waf/resource_tc_waf_bot_scene_status_config_test.go b/tencentcloud/services/waf/resource_tc_waf_bot_scene_status_config_test.go new file mode 100644 index 0000000000..324a44c4b7 --- /dev/null +++ b/tencentcloud/services/waf/resource_tc_waf_bot_scene_status_config_test.go @@ -0,0 +1,60 @@ +package waf_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + + tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest" +) + +func TestAccTencentCloudWafBotSceneStatusConfigResource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + tcacctest.AccPreCheck(t) + }, + Providers: tcacctest.AccProviders, + Steps: []resource.TestStep{ + { + Config: testAccWafBotSceneStatusConfig, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet("tencentcloud_waf_bot_scene_status_config.example", "id"), + resource.TestCheckResourceAttrSet("tencentcloud_waf_bot_scene_status_config.example", "domain"), + resource.TestCheckResourceAttrSet("tencentcloud_waf_bot_scene_status_config.example", "iscene_idd"), + resource.TestCheckResourceAttrSet("tencentcloud_waf_bot_scene_status_config.example", "status"), + ), + }, + { + Config: testAccWafBotSceneStatusConfigUpdate, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet("tencentcloud_waf_bot_scene_status_config.example", "id"), + resource.TestCheckResourceAttrSet("tencentcloud_waf_bot_scene_status_config.example", "domain"), + resource.TestCheckResourceAttrSet("tencentcloud_waf_bot_scene_status_config.example", "iscene_idd"), + resource.TestCheckResourceAttrSet("tencentcloud_waf_bot_scene_status_config.example", "status"), + ), + }, + { + ResourceName: "tencentcloud_waf_bot_scene_status_config.example", + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +const testAccWafBotSceneStatusConfig = ` +resource "tencentcloud_waf_bot_scene_status_config" "example" { + domain = "example.com" + scene_id = "3024324123" + status = true +} +` + +const testAccWafBotSceneStatusConfigUpdate = ` +resource "tencentcloud_waf_bot_scene_status_config" "example" { + domain = "example.com" + scene_id = "3024324123" + status = false +} +` diff --git a/tencentcloud/services/waf/resource_tc_waf_bot_status_config.go b/tencentcloud/services/waf/resource_tc_waf_bot_status_config.go new file mode 100644 index 0000000000..69225dc07f --- /dev/null +++ b/tencentcloud/services/waf/resource_tc_waf_bot_status_config.go @@ -0,0 +1,220 @@ +package waf + +import ( + "context" + "log" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + wafv20180125 "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf/v20180125" + + tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func ResourceTencentCloudWafBotStatusConfig() *schema.Resource { + return &schema.Resource{ + Create: resourceTencentCloudWafBotStatusConfigCreate, + Read: resourceTencentCloudWafBotStatusConfigRead, + Update: resourceTencentCloudWafBotStatusConfigUpdate, + Delete: resourceTencentCloudWafBotStatusConfigDelete, + Schema: map[string]*schema.Schema{ + "status": { + Type: schema.TypeString, + Required: true, + Description: "Bot status. 1 - enable; 0 - disable.", + }, + + "domain": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: "Domain.", + }, + + "instance_id": { + Type: schema.TypeString, + Optional: true, + Description: "Instance ID.", + }, + + "scene_count": { + Type: schema.TypeInt, + Computed: true, + Description: "Scene total count.", + }, + + "valid_scene_count": { + Type: schema.TypeInt, + Computed: true, + Description: "Number of effective scenarios.", + }, + + "current_global_scene": { + Type: schema.TypeList, + Computed: true, + Description: "The currently enabled scenario with a global matching range and the highest priority.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "scene_id": { + Type: schema.TypeString, + Computed: true, + Description: "Scene ID.", + }, + "scene_name": { + Type: schema.TypeString, + Computed: true, + Description: "Scene name.", + }, + "priority": { + Type: schema.TypeInt, + Computed: true, + Description: "Priority.", + }, + "update_time": { + Type: schema.TypeInt, + Computed: true, + Description: "Update time.", + }, + }, + }, + }, + + "custom_rule_nums": { + Type: schema.TypeInt, + Computed: true, + Description: "Total number of custom rules, excluding BOT whitelist.", + }, + }, + } +} + +func resourceTencentCloudWafBotStatusConfigCreate(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_waf_bot_status_config.create")() + defer tccommon.InconsistentCheck(d, meta)() + + var domain string + + if v, ok := d.GetOk("domain"); ok { + domain = v.(string) + } + + d.SetId(domain) + + return resourceTencentCloudWafBotStatusConfigUpdate(d, meta) +} + +func resourceTencentCloudWafBotStatusConfigRead(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_waf_bot_status_config.read")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(tccommon.ContextNil) + ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta) + service = WafService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()} + domain = d.Id() + ) + + respData, err := service.DescribeWafBotStatusConfigById(ctx, domain) + if err != nil { + return err + } + + if respData == nil { + d.SetId("") + log.Printf("[WARN]%s resource `waf_bot_status_config` [%s] not found, please check if it has been deleted.\n", logId, d.Id()) + return nil + } + + _ = d.Set("domain", domain) + + if respData.Status != nil { + _ = d.Set("status", respData.Status) + } + + if respData.SceneCount != nil { + _ = d.Set("scene_count", respData.SceneCount) + } + + if respData.ValidSceneCount != nil { + _ = d.Set("valid_scene_count", respData.ValidSceneCount) + } + + if respData.CurrentGlobalScene != nil { + tmpList := make([]map[string]interface{}, 0, 1) + dMap := make(map[string]interface{}) + if respData.CurrentGlobalScene.SceneId != nil { + dMap["scene_id"] = respData.CurrentGlobalScene.SceneId + } + + if respData.CurrentGlobalScene.SceneName != nil { + dMap["scene_name"] = respData.CurrentGlobalScene.SceneName + } + + if respData.CurrentGlobalScene.Priority != nil { + dMap["priority"] = respData.CurrentGlobalScene.Priority + } + + if respData.CurrentGlobalScene.UpdateTime != nil { + dMap["update_time"] = respData.CurrentGlobalScene.UpdateTime + } + + tmpList = append(tmpList, dMap) + _ = d.Set("current_global_scene", tmpList) + } + + if respData.CustomRuleNums != nil { + _ = d.Set("custom_rule_nums", respData.CustomRuleNums) + } + + return nil +} + +func resourceTencentCloudWafBotStatusConfigUpdate(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_waf_bot_status_config.update")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(tccommon.ContextNil) + ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta) + request = wafv20180125.NewModifyBotStatusRequest() + domain = d.Id() + ) + + if v, ok := d.GetOk("status"); ok { + request.Status = helper.String(v.(string)) + } + + if v, ok := d.GetOk("instance_id"); ok { + request.InstanceID = helper.String(v.(string)) + } + + request.Domain = helper.String(domain) + request.Category = helper.String("bot") + request.IsVersionFour = helper.Bool(true) + request.BotVersion = helper.String("4.1.0") + reqErr := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError { + result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseWafV20180125Client().ModifyBotStatusWithContext(ctx, request) + if e != nil { + return tccommon.RetryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + + return nil + }) + + if reqErr != nil { + log.Printf("[CRITAL]%s update waf bot status config failed, reason:%+v", logId, reqErr) + return reqErr + } + + return resourceTencentCloudWafBotStatusConfigRead(d, meta) +} + +func resourceTencentCloudWafBotStatusConfigDelete(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_waf_bot_status_config.delete")() + defer tccommon.InconsistentCheck(d, meta)() + + return nil +} diff --git a/tencentcloud/services/waf/resource_tc_waf_bot_status_config.md b/tencentcloud/services/waf/resource_tc_waf_bot_status_config.md new file mode 100644 index 0000000000..220c0061ea --- /dev/null +++ b/tencentcloud/services/waf/resource_tc_waf_bot_status_config.md @@ -0,0 +1,20 @@ +Provides a resource to create a WAF bot status config + +Example Usage + +```hcl +resource "tencentcloud_waf_bot_status_config" "example" { + domain = "example.com" + status = "1" +} +``` + +Or + +```hcl +resource "tencentcloud_waf_bot_status_config" "example" { + domain = "example.com" + status = "0" + instance_id = "waf_2kxtlbky11bbcr4b" +} +``` diff --git a/tencentcloud/services/waf/resource_tc_waf_bot_status_config_test.go b/tencentcloud/services/waf/resource_tc_waf_bot_status_config_test.go new file mode 100644 index 0000000000..d5f8193690 --- /dev/null +++ b/tencentcloud/services/waf/resource_tc_waf_bot_status_config_test.go @@ -0,0 +1,56 @@ +package waf_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + + tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest" +) + +func TestAccTencentCloudWafBotStatusConfigResource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + tcacctest.AccPreCheck(t) + }, + Providers: tcacctest.AccProviders, + Steps: []resource.TestStep{ + { + Config: testAccWafBotStatusConfig, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet("tencentcloud_waf_bot_status_config.example", "id"), + resource.TestCheckResourceAttrSet("tencentcloud_waf_bot_status_config.example", "domain"), + resource.TestCheckResourceAttrSet("tencentcloud_waf_bot_status_config.example", "status"), + ), + }, + { + Config: testAccWafBotStatusConfigUpdate, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet("tencentcloud_waf_bot_status_config.example", "id"), + resource.TestCheckResourceAttrSet("tencentcloud_waf_bot_status_config.example", "domain"), + resource.TestCheckResourceAttrSet("tencentcloud_waf_bot_status_config.example", "status"), + ), + }, + { + ResourceName: "tencentcloud_waf_bot_status_config.example", + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +const testAccWafBotStatusConfig = ` +resource "tencentcloud_waf_bot_status_config" "example" { + domain = "example.com" + status = "1" +} +` + +const testAccWafBotStatusConfigUpdate = ` +resource "tencentcloud_waf_bot_status_config" "example" { + domain = "example.com" + status = "0" +} +` diff --git a/tencentcloud/services/waf/resource_tc_waf_waf_bot_scene_ucb_rule.go b/tencentcloud/services/waf/resource_tc_waf_waf_bot_scene_ucb_rule.go new file mode 100644 index 0000000000..f0f76fd5dc --- /dev/null +++ b/tencentcloud/services/waf/resource_tc_waf_waf_bot_scene_ucb_rule.go @@ -0,0 +1,1304 @@ +package waf + +import ( + "context" + "fmt" + "log" + "strings" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + waf "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf/v20180125" + tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func resourceTencentCloudWafBotSceneUCBRule() *schema.Resource { + return &schema.Resource{ + Create: resourceTencentCloudWafBotSceneUCBRuleCreate, + Read: resourceTencentCloudWafBotSceneUCBRuleRead, + Update: resourceTencentCloudWafBotSceneUCBRuleUpdate, + Delete: resourceTencentCloudWafBotSceneUCBRuleDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "domain": { + Required: true, + ForceNew: true, + Type: schema.TypeString, + Description: "Domain.", + }, + + "scene_id": { + Required: true, + ForceNew: true, + Type: schema.TypeString, + Description: "When calling at the BOT global whitelist, pass `global`; When configuring BOT scenarios, transmit the specific scenario ID.", + }, + + "rule": { + Optional: true, + Type: schema.TypeList, + MaxItems: 1, + Description: "Rule content, add encoding SceneId information. When calling at the BOT global whitelist, SceneId is set to `global` and RuleType is passed as 10, Action is `permit`; When configuring BOT scenarios, SceneId is the scenario ID.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "domain": { + Type: schema.TypeString, + Required: true, + Description: "Domain.", + }, + + "name": { + Type: schema.TypeString, + Required: true, + Description: "Rule name.", + }, + + "rule": { + Type: schema.TypeList, + Required: true, + Description: "Specific rule items of UCB.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "key": { + Type: schema.TypeString, + Optional: true, + Description: "Key.", + }, + + "op": { + Type: schema.TypeString, + Optional: true, + Description: "Operator.", + }, + + "value": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Description: "Value.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "basic_value": { + Type: schema.TypeString, + Optional: true, + Description: "String type value.", + }, + + "logic_value": { + Type: schema.TypeBool, + Optional: true, + Description: "Bool type value.", + }, + + "belong_value": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Optional: true, + Description: "String array type value.", + }, + + "valid_key": { + Type: schema.TypeString, + Optional: true, + Description: "Indicate valid fields.", + }, + + "multi_value": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Optional: true, + Description: "String array type value.", + }, + }, + }, + }, + + "op_op": { + Type: schema.TypeString, + Optional: true, + Description: "Optional Supplementary Operators.", + }, + + "op_arg": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Optional: true, + Description: "Optional supplementary parameters.", + }, + + "op_value": { + Type: schema.TypeFloat, + Optional: true, + Description: "Optional supplementary values.", + }, + + "name": { + Type: schema.TypeString, + Optional: true, + Description: "When using header parameter values.", + }, + + "areas": { + Type: schema.TypeList, + Optional: true, + Description: "Regional selection.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "country": { + Type: schema.TypeString, + Required: true, + Description: "In addition to standard countries, the country also supports two special identifiers: domestic and foreign.", + }, + + "region": { + Type: schema.TypeString, + Optional: true, + Description: "Province.", + }, + + "city": { + Type: schema.TypeString, + Optional: true, + Description: "City.", + }, + }, + }, + }, + + "lang": { + Type: schema.TypeString, + Optional: true, + Description: "Language environment.", + }, + }, + }, + }, + + "action": { + Type: schema.TypeString, + Required: true, + Description: "Disposal action.", + }, + + "on_off": { + Type: schema.TypeString, + Required: true, + Description: "Rule switch.", + }, + + "rule_type": { + Type: schema.TypeInt, + Required: true, + Description: "Rule type.", + }, + + "prior": { + Type: schema.TypeInt, + Required: true, + Description: "Rule priority.", + }, + + "timestamp": { + Type: schema.TypeInt, + Required: true, + Description: "Modifying timestamps.", + }, + + "label": { + Type: schema.TypeString, + Required: true, + Description: "Label.", + }, + + "id": { + Type: schema.TypeString, + Optional: true, + Description: "Entry ID.", + }, + + "scene_id": { + Type: schema.TypeString, + Optional: true, + Description: "Scene ID.", + }, + + "valid_time": { + Type: schema.TypeInt, + Optional: true, + Description: "Valid time.", + }, + + "appid": { + Type: schema.TypeInt, + Optional: true, + Description: "Appid.", + }, + "addition_arg": { + Type: schema.TypeString, + Optional: true, + Description: "Additional parameters.", + }, + + "desc": { + Type: schema.TypeString, + Optional: true, + Description: "Rule description.", + }, + + "rule_id": { + Type: schema.TypeString, + Optional: true, + Description: "Rule ID.", + }, + + "pre_define": { + Type: schema.TypeBool, + Optional: true, + Description: "True - System preset rules False - Custom rules.", + }, + + "job_type": { + Type: schema.TypeString, + Optional: true, + Description: "Scheduled task type.", + }, + + "job_date_time": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Description: "Scheduled task configuration.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "timed": { + Type: schema.TypeList, + Optional: true, + Description: "Time parameter for timed execution.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "start_date_time": { + Type: schema.TypeInt, + Optional: true, + Description: "Start timestamp, in seconds.", + }, + + "end_date_time": { + Type: schema.TypeInt, + Optional: true, + Description: "End timestamp, in seconds.", + }, + }, + }, + }, + + "cron": { + Type: schema.TypeList, + Optional: true, + Description: "Time parameter for cycle execution.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "days": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeInt, + }, + Optional: true, + Description: "On what day of each month is it executed.", + }, + + "w_days": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeInt, + }, + Optional: true, + Description: "What day of the week is executed each week.", + }, + + "start_time": { + Type: schema.TypeString, + Optional: true, + Description: "Start time.", + }, + "end_time": { + Type: schema.TypeString, + Optional: true, + Description: "End time.", + }, + }, + }, + }, + + "time_t_zone": { + Type: schema.TypeString, + Optional: true, + Description: "Time zone.", + }, + }, + }, + }, + + "expire_time": { + Type: schema.TypeInt, + Optional: true, + Description: "Effective deadline.", + }, + + "valid_status": { + Type: schema.TypeInt, + Optional: true, + Description: "Effective -1, Invalid -0.", + }, + + "block_page_id": { + Type: schema.TypeInt, + Optional: true, + Description: "Customize interception page ID.", + }, + + "action_list": { + Type: schema.TypeList, + Optional: true, + Description: "When Action=intercept, this field is mandatory.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "action": { + Type: schema.TypeString, + Optional: true, + Description: "Action.", + }, + + "proportion": { + Type: schema.TypeFloat, + Optional: true, + Description: "Proportion.", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func resourceTencentCloudWafBotSceneUCBRuleCreate(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_waf_bot_scene_ucb_rule.create")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(tccommon.ContextNil) + request = waf.NewModifyBotSceneUCBRuleRequest() + domain string + sceneId string + ruleId string + ) + + if v, ok := d.GetOk("domain"); ok { + request.Domain = helper.String(v.(string)) + domain = v.(string) + } + + if v, ok := d.GetOk("scene_id"); ok { + request.SceneId = helper.String(v.(string)) + sceneId = v.(string) + } + + if dMap, ok := helper.InterfacesHeadMap(d, "rule"); ok { + inOutputBotUCBRule := waf.InOutputBotUCBRule{} + if v, ok := dMap["domain"]; ok { + inOutputBotUCBRule.Domain = helper.String(v.(string)) + } + + if v, ok := dMap["name"]; ok { + inOutputBotUCBRule.Name = helper.String(v.(string)) + } + + if v, ok := dMap["rule"]; ok { + for _, item := range v.([]interface{}) { + ruleMap := item.(map[string]interface{}) + inOutputUCBRuleEntry := waf.InOutputUCBRuleEntry{} + if v, ok := ruleMap["key"]; ok { + inOutputUCBRuleEntry.Key = helper.String(v.(string)) + } + + if v, ok := ruleMap["op"]; ok { + inOutputUCBRuleEntry.Op = helper.String(v.(string)) + } + + if valueMap, ok := helper.InterfaceToMap(ruleMap, "value"); ok { + uCBEntryValue := waf.UCBEntryValue{} + if v, ok := valueMap["basic_value"]; ok { + uCBEntryValue.BasicValue = helper.String(v.(string)) + } + + if v, ok := valueMap["logic_value"]; ok { + uCBEntryValue.LogicValue = helper.Bool(v.(bool)) + } + + if v, ok := valueMap["belong_value"]; ok { + belongValueSet := v.(*schema.Set).List() + for i := range belongValueSet { + if belongValueSet[i] != nil { + belongValue := belongValueSet[i].(string) + uCBEntryValue.BelongValue = append(uCBEntryValue.BelongValue, &belongValue) + } + } + } + + if v, ok := valueMap["valid_key"]; ok { + uCBEntryValue.ValidKey = helper.String(v.(string)) + } + + if v, ok := valueMap["multi_value"]; ok { + multiValueSet := v.(*schema.Set).List() + for i := range multiValueSet { + if multiValueSet[i] != nil { + multiValue := multiValueSet[i].(string) + uCBEntryValue.MultiValue = append(uCBEntryValue.MultiValue, &multiValue) + } + } + } + + inOutputUCBRuleEntry.Value = &uCBEntryValue + } + + if v, ok := ruleMap["op_op"]; ok { + inOutputUCBRuleEntry.OpOp = helper.String(v.(string)) + } + + if v, ok := ruleMap["op_arg"]; ok { + opArgSet := v.(*schema.Set).List() + for i := range opArgSet { + if opArgSet[i] != nil { + opArg := opArgSet[i].(string) + inOutputUCBRuleEntry.OpArg = append(inOutputUCBRuleEntry.OpArg, &opArg) + } + } + } + + if v, ok := ruleMap["op_value"]; ok { + inOutputUCBRuleEntry.OpValue = helper.Float64(v.(float64)) + } + + if v, ok := ruleMap["name"]; ok { + inOutputUCBRuleEntry.Name = helper.String(v.(string)) + } + + if v, ok := ruleMap["areas"]; ok { + for _, item := range v.([]interface{}) { + areasMap := item.(map[string]interface{}) + area := waf.Area{} + if v, ok := areasMap["country"]; ok { + area.Country = helper.String(v.(string)) + } + + if v, ok := areasMap["region"]; ok { + area.Region = helper.String(v.(string)) + } + + if v, ok := areasMap["city"]; ok { + area.City = helper.String(v.(string)) + } + + inOutputUCBRuleEntry.Areas = append(inOutputUCBRuleEntry.Areas, &area) + } + } + + if v, ok := ruleMap["lang"]; ok { + inOutputUCBRuleEntry.Lang = helper.String(v.(string)) + } + + inOutputBotUCBRule.Rule = append(inOutputBotUCBRule.Rule, &inOutputUCBRuleEntry) + } + } + + if v, ok := dMap["action"]; ok { + inOutputBotUCBRule.Action = helper.String(v.(string)) + } + + if v, ok := dMap["on_off"]; ok { + inOutputBotUCBRule.OnOff = helper.String(v.(string)) + } + + if v, ok := dMap["rule_type"]; ok { + inOutputBotUCBRule.RuleType = helper.IntInt64(v.(int)) + } + + if v, ok := dMap["prior"]; ok { + inOutputBotUCBRule.Prior = helper.IntInt64(v.(int)) + } + + if v, ok := dMap["timestamp"]; ok { + inOutputBotUCBRule.Timestamp = helper.IntInt64(v.(int)) + } + + if v, ok := dMap["label"]; ok { + inOutputBotUCBRule.Label = helper.String(v.(string)) + } + + if v, ok := dMap["id"]; ok { + inOutputBotUCBRule.Id = helper.String(v.(string)) + } + + if v, ok := dMap["scene_id"]; ok { + inOutputBotUCBRule.SceneId = helper.String(v.(string)) + } + + if v, ok := dMap["valid_time"]; ok { + inOutputBotUCBRule.ValidTime = helper.IntInt64(v.(int)) + } + + if v, ok := dMap["appid"]; ok { + inOutputBotUCBRule.Appid = helper.IntUint64(v.(int)) + } + + if v, ok := dMap["addition_arg"]; ok { + inOutputBotUCBRule.AdditionArg = helper.String(v.(string)) + } + + if v, ok := dMap["desc"]; ok { + inOutputBotUCBRule.Desc = helper.String(v.(string)) + } + + if v, ok := dMap["rule_id"]; ok { + inOutputBotUCBRule.RuleId = helper.String(v.(string)) + } + + if v, ok := dMap["pre_define"]; ok { + inOutputBotUCBRule.PreDefine = helper.Bool(v.(bool)) + } + + if v, ok := dMap["job_type"]; ok { + inOutputBotUCBRule.JobType = helper.String(v.(string)) + } + + if jobDateTimeMap, ok := helper.InterfaceToMap(dMap, "job_date_time"); ok { + jobDateTime := waf.JobDateTime{} + if v, ok := jobDateTimeMap["timed"]; ok { + for _, item := range v.([]interface{}) { + timedMap := item.(map[string]interface{}) + timedJob := waf.TimedJob{} + if v, ok := timedMap["start_date_time"]; ok { + timedJob.StartDateTime = helper.IntUint64(v.(int)) + } + + if v, ok := timedMap["end_date_time"]; ok { + timedJob.EndDateTime = helper.IntUint64(v.(int)) + } + + jobDateTime.Timed = append(jobDateTime.Timed, &timedJob) + } + } + + if v, ok := jobDateTimeMap["cron"]; ok { + for _, item := range v.([]interface{}) { + cronMap := item.(map[string]interface{}) + cronJob := waf.CronJob{} + if v, ok := cronMap["days"]; ok { + daysSet := v.(*schema.Set).List() + for i := range daysSet { + days := daysSet[i].(int) + cronJob.Days = append(cronJob.Days, helper.IntUint64(days)) + } + } + + if v, ok := cronMap["w_days"]; ok { + wDaysSet := v.(*schema.Set).List() + for i := range wDaysSet { + wDays := wDaysSet[i].(int) + cronJob.WDays = append(cronJob.WDays, helper.IntUint64(wDays)) + } + } + + if v, ok := cronMap["start_time"]; ok { + cronJob.StartTime = helper.String(v.(string)) + } + + if v, ok := cronMap["end_time"]; ok { + cronJob.EndTime = helper.String(v.(string)) + } + + jobDateTime.Cron = append(jobDateTime.Cron, &cronJob) + } + } + + if v, ok := jobDateTimeMap["time_t_zone"]; ok { + jobDateTime.TimeTZone = helper.String(v.(string)) + } + + inOutputBotUCBRule.JobDateTime = &jobDateTime + } + + if v, ok := dMap["expire_time"]; ok { + inOutputBotUCBRule.ExpireTime = helper.IntUint64(v.(int)) + } + + if v, ok := dMap["valid_status"]; ok { + inOutputBotUCBRule.ValidStatus = helper.IntInt64(v.(int)) + } + + if v, ok := dMap["block_page_id"]; ok { + inOutputBotUCBRule.BlockPageId = helper.IntUint64(v.(int)) + } + + if v, ok := dMap["action_list"]; ok { + for _, item := range v.([]interface{}) { + actionListMap := item.(map[string]interface{}) + uCBActionProportion := waf.UCBActionProportion{} + if v, ok := actionListMap["action"]; ok { + uCBActionProportion.Action = helper.String(v.(string)) + } + + if v, ok := actionListMap["proportion"]; ok { + uCBActionProportion.Proportion = helper.Float64(v.(float64)) + } + + inOutputBotUCBRule.ActionList = append(inOutputBotUCBRule.ActionList, &uCBActionProportion) + } + } + + request.Rule = &inOutputBotUCBRule + } + + err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError { + result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseWafV20180125Client().ModifyBotSceneUCBRule(request) + if e != nil { + return tccommon.RetryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + + return nil + }) + + if err != nil { + log.Printf("[CRITAL]%s create waf bot scene ucb rule failed, reason:%+v", logId, err) + return err + } + + d.SetId(strings.Join([]string{domain, sceneId, ruleId}, tccommon.FILED_SP)) + + return resourceTencentCloudWafBotSceneUCBRuleRead(d, meta) +} + +func resourceTencentCloudWafBotSceneUCBRuleRead(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_waf_bot_scene_ucb_rule.read")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(tccommon.ContextNil) + ctx = context.WithValue(context.TODO(), tccommon.LogIdKey, logId) + service = WafService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()} + ) + + idSplit := strings.Split(d.Id(), tccommon.FILED_SP) + if len(idSplit) != 3 { + return fmt.Errorf("id is broken,%s", d.Id()) + } + + domain := idSplit[0] + sceneId := idSplit[1] + ruleId := idSplit[2] + + respData, err := service.DescribeWafBotSceneUCBRuleById(ctx, domain, sceneId, ruleId) + if err != nil { + return err + } + + if respData == nil { + d.SetId("") + log.Printf("[WARN]%s resource `WafBotSceneUCBRule` [%s] not found, please check if it has been deleted.\n", logId, d.Id()) + return nil + } + + if respData.Domain != nil { + _ = d.Set("domain", respData.Domain) + } + + if respData.SceneId != nil { + _ = d.Set("scene_id", respData.SceneId) + } + + // if waf_bot_scene_ucb_rule.Rule != nil { + // ruleMap := map[string]interface{}{} + + // if waf_bot_scene_ucb_rule.Rule.Domain != nil { + // ruleMap["domain"] = waf_bot_scene_ucb_rule.Rule.Domain + // } + + // if waf_bot_scene_ucb_rule.Rule.Name != nil { + // ruleMap["name"] = waf_bot_scene_ucb_rule.Rule.Name + // } + + // if waf_bot_scene_ucb_rule.Rule.Rule != nil { + // ruleList := []interface{}{} + // for _, rule := range waf_bot_scene_ucb_rule.Rule.Rule { + // ruleMap := map[string]interface{}{} + + // if rule.Key != nil { + // ruleMap["key"] = rule.Key + // } + + // if rule.Op != nil { + // ruleMap["op"] = rule.Op + // } + + // if rule.Value != nil { + // valueMap := map[string]interface{}{} + + // if rule.Value.BasicValue != nil { + // valueMap["basic_value"] = rule.Value.BasicValue + // } + + // if rule.Value.LogicValue != nil { + // valueMap["logic_value"] = rule.Value.LogicValue + // } + + // if rule.Value.BelongValue != nil { + // valueMap["belong_value"] = rule.Value.BelongValue + // } + + // if rule.Value.ValidKey != nil { + // valueMap["valid_key"] = rule.Value.ValidKey + // } + + // if rule.Value.MultiValue != nil { + // valueMap["multi_value"] = rule.Value.MultiValue + // } + + // ruleMap["value"] = []interface{}{valueMap} + // } + + // if rule.OpOp != nil { + // ruleMap["op_op"] = rule.OpOp + // } + + // if rule.OpArg != nil { + // ruleMap["op_arg"] = rule.OpArg + // } + + // if rule.OpValue != nil { + // ruleMap["op_value"] = rule.OpValue + // } + + // if rule.Name != nil { + // ruleMap["name"] = rule.Name + // } + + // if rule.Areas != nil { + // areasList := []interface{}{} + // for _, areas := range rule.Areas { + // areasMap := map[string]interface{}{} + + // if areas.Country != nil { + // areasMap["country"] = areas.Country + // } + + // if areas.Region != nil { + // areasMap["region"] = areas.Region + // } + + // if areas.City != nil { + // areasMap["city"] = areas.City + // } + + // areasList = append(areasList, areasMap) + // } + + // ruleMap["areas"] = areasList + // } + + // if rule.Lang != nil { + // ruleMap["lang"] = rule.Lang + // } + + // ruleList = append(ruleList, ruleMap) + // } + + // ruleMap["rule"] = ruleList + // } + + // if waf_bot_scene_ucb_rule.Rule.Action != nil { + // ruleMap["action"] = waf_bot_scene_ucb_rule.Rule.Action + // } + + // if waf_bot_scene_ucb_rule.Rule.OnOff != nil { + // ruleMap["on_off"] = waf_bot_scene_ucb_rule.Rule.OnOff + // } + + // if waf_bot_scene_ucb_rule.Rule.RuleType != nil { + // ruleMap["rule_type"] = waf_bot_scene_ucb_rule.Rule.RuleType + // } + + // if waf_bot_scene_ucb_rule.Rule.Prior != nil { + // ruleMap["prior"] = waf_bot_scene_ucb_rule.Rule.Prior + // } + + // if waf_bot_scene_ucb_rule.Rule.Timestamp != nil { + // ruleMap["timestamp"] = waf_bot_scene_ucb_rule.Rule.Timestamp + // } + + // if waf_bot_scene_ucb_rule.Rule.Label != nil { + // ruleMap["label"] = waf_bot_scene_ucb_rule.Rule.Label + // } + + // if waf_bot_scene_ucb_rule.Rule.Id != nil { + // ruleMap["id"] = waf_bot_scene_ucb_rule.Rule.Id + // } + + // if waf_bot_scene_ucb_rule.Rule.SceneId != nil { + // ruleMap["scene_id"] = waf_bot_scene_ucb_rule.Rule.SceneId + // } + + // if waf_bot_scene_ucb_rule.Rule.ValidTime != nil { + // ruleMap["valid_time"] = waf_bot_scene_ucb_rule.Rule.ValidTime + // } + + // if waf_bot_scene_ucb_rule.Rule.Appid != nil { + // ruleMap["appid"] = waf_bot_scene_ucb_rule.Rule.Appid + // } + + // if waf_bot_scene_ucb_rule.Rule.AdditionArg != nil { + // ruleMap["addition_arg"] = waf_bot_scene_ucb_rule.Rule.AdditionArg + // } + + // if waf_bot_scene_ucb_rule.Rule.Desc != nil { + // ruleMap["desc"] = waf_bot_scene_ucb_rule.Rule.Desc + // } + + // if waf_bot_scene_ucb_rule.Rule.RuleId != nil { + // ruleMap["rule_id"] = waf_bot_scene_ucb_rule.Rule.RuleId + // } + + // if waf_bot_scene_ucb_rule.Rule.PreDefine != nil { + // ruleMap["pre_define"] = waf_bot_scene_ucb_rule.Rule.PreDefine + // } + + // if waf_bot_scene_ucb_rule.Rule.JobType != nil { + // ruleMap["job_type"] = waf_bot_scene_ucb_rule.Rule.JobType + // } + + // if waf_bot_scene_ucb_rule.Rule.JobDateTime != nil { + // jobDateTimeMap := map[string]interface{}{} + + // if waf_bot_scene_ucb_rule.Rule.JobDateTime.Timed != nil { + // timedList := []interface{}{} + // for _, timed := range waf_bot_scene_ucb_rule.Rule.JobDateTime.Timed { + // timedMap := map[string]interface{}{} + + // if timed.StartDateTime != nil { + // timedMap["start_date_time"] = timed.StartDateTime + // } + + // if timed.EndDateTime != nil { + // timedMap["end_date_time"] = timed.EndDateTime + // } + + // timedList = append(timedList, timedMap) + // } + + // jobDateTimeMap["timed"] = timedList + // } + + // if waf_bot_scene_ucb_rule.Rule.JobDateTime.Cron != nil { + // cronList := []interface{}{} + // for _, cron := range waf_bot_scene_ucb_rule.Rule.JobDateTime.Cron { + // cronMap := map[string]interface{}{} + + // if cron.Days != nil { + // cronMap["days"] = cron.Days + // } + + // if cron.WDays != nil { + // cronMap["w_days"] = cron.WDays + // } + + // if cron.StartTime != nil { + // cronMap["start_time"] = cron.StartTime + // } + + // if cron.EndTime != nil { + // cronMap["end_time"] = cron.EndTime + // } + + // cronList = append(cronList, cronMap) + // } + + // jobDateTimeMap["cron"] = cronList + // } + + // if waf_bot_scene_ucb_rule.Rule.JobDateTime.TimeTZone != nil { + // jobDateTimeMap["time_t_zone"] = waf_bot_scene_ucb_rule.Rule.JobDateTime.TimeTZone + // } + + // ruleMap["job_date_time"] = []interface{}{jobDateTimeMap} + // } + + // if waf_bot_scene_ucb_rule.Rule.ExpireTime != nil { + // ruleMap["expire_time"] = waf_bot_scene_ucb_rule.Rule.ExpireTime + // } + + // if waf_bot_scene_ucb_rule.Rule.ValidStatus != nil { + // ruleMap["valid_status"] = waf_bot_scene_ucb_rule.Rule.ValidStatus + // } + + // if waf_bot_scene_ucb_rule.Rule.BlockPageId != nil { + // ruleMap["block_page_id"] = waf_bot_scene_ucb_rule.Rule.BlockPageId + // } + + // if waf_bot_scene_ucb_rule.Rule.ActionList != nil { + // actionListList := []interface{}{} + // for _, actionList := range waf_bot_scene_ucb_rule.Rule.ActionList { + // actionListMap := map[string]interface{}{} + + // if actionList.Action != nil { + // actionListMap["action"] = actionList.Action + // } + + // if actionList.Proportion != nil { + // actionListMap["proportion"] = actionList.Proportion + // } + + // actionListList = append(actionListList, actionListMap) + // } + + // ruleMap["action_list"] = actionListList + // } + + // _ = d.Set("rule", []interface{}{ruleMap}) + // } + + return nil +} + +func resourceTencentCloudWafBotSceneUCBRuleUpdate(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_waf_bot_scene_ucb_rule.update")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(tccommon.ContextNil) + request = waf.NewModifyBotSceneUCBRuleRequest() + ) + + idSplit := strings.Split(d.Id(), tccommon.FILED_SP) + if len(idSplit) != 3 { + return fmt.Errorf("id is broken,%s", d.Id()) + } + + domain := idSplit[0] + sceneId := idSplit[1] + ruleId := idSplit[2] + + request.Domain = &domain + request.SceneId = &sceneId + + if dMap, ok := helper.InterfacesHeadMap(d, "rule"); ok { + inOutputBotUCBRule := waf.InOutputBotUCBRule{} + if v, ok := dMap["domain"]; ok { + inOutputBotUCBRule.Domain = helper.String(v.(string)) + } + + if v, ok := dMap["name"]; ok { + inOutputBotUCBRule.Name = helper.String(v.(string)) + } + + if v, ok := dMap["rule"]; ok { + for _, item := range v.([]interface{}) { + ruleMap := item.(map[string]interface{}) + inOutputUCBRuleEntry := waf.InOutputUCBRuleEntry{} + if v, ok := ruleMap["key"]; ok { + inOutputUCBRuleEntry.Key = helper.String(v.(string)) + } + + if v, ok := ruleMap["op"]; ok { + inOutputUCBRuleEntry.Op = helper.String(v.(string)) + } + + if valueMap, ok := helper.InterfaceToMap(ruleMap, "value"); ok { + uCBEntryValue := waf.UCBEntryValue{} + if v, ok := valueMap["basic_value"]; ok { + uCBEntryValue.BasicValue = helper.String(v.(string)) + } + + if v, ok := valueMap["logic_value"]; ok { + uCBEntryValue.LogicValue = helper.Bool(v.(bool)) + } + + if v, ok := valueMap["belong_value"]; ok { + belongValueSet := v.(*schema.Set).List() + for i := range belongValueSet { + if belongValueSet[i] != nil { + belongValue := belongValueSet[i].(string) + uCBEntryValue.BelongValue = append(uCBEntryValue.BelongValue, &belongValue) + } + } + } + + if v, ok := valueMap["valid_key"]; ok { + uCBEntryValue.ValidKey = helper.String(v.(string)) + } + + if v, ok := valueMap["multi_value"]; ok { + multiValueSet := v.(*schema.Set).List() + for i := range multiValueSet { + if multiValueSet[i] != nil { + multiValue := multiValueSet[i].(string) + uCBEntryValue.MultiValue = append(uCBEntryValue.MultiValue, &multiValue) + } + } + } + + inOutputUCBRuleEntry.Value = &uCBEntryValue + } + + if v, ok := ruleMap["op_op"]; ok { + inOutputUCBRuleEntry.OpOp = helper.String(v.(string)) + } + + if v, ok := ruleMap["op_arg"]; ok { + opArgSet := v.(*schema.Set).List() + for i := range opArgSet { + if opArgSet[i] != nil { + opArg := opArgSet[i].(string) + inOutputUCBRuleEntry.OpArg = append(inOutputUCBRuleEntry.OpArg, &opArg) + } + } + } + + if v, ok := ruleMap["op_value"]; ok { + inOutputUCBRuleEntry.OpValue = helper.Float64(v.(float64)) + } + + if v, ok := ruleMap["name"]; ok { + inOutputUCBRuleEntry.Name = helper.String(v.(string)) + } + + if v, ok := ruleMap["areas"]; ok { + for _, item := range v.([]interface{}) { + areasMap := item.(map[string]interface{}) + area := waf.Area{} + if v, ok := areasMap["country"]; ok { + area.Country = helper.String(v.(string)) + } + + if v, ok := areasMap["region"]; ok { + area.Region = helper.String(v.(string)) + } + + if v, ok := areasMap["city"]; ok { + area.City = helper.String(v.(string)) + } + + inOutputUCBRuleEntry.Areas = append(inOutputUCBRuleEntry.Areas, &area) + } + } + + if v, ok := ruleMap["lang"]; ok { + inOutputUCBRuleEntry.Lang = helper.String(v.(string)) + } + + inOutputBotUCBRule.Rule = append(inOutputBotUCBRule.Rule, &inOutputUCBRuleEntry) + } + } + + if v, ok := dMap["action"]; ok { + inOutputBotUCBRule.Action = helper.String(v.(string)) + } + + if v, ok := dMap["on_off"]; ok { + inOutputBotUCBRule.OnOff = helper.String(v.(string)) + } + + if v, ok := dMap["rule_type"]; ok { + inOutputBotUCBRule.RuleType = helper.IntInt64(v.(int)) + } + + if v, ok := dMap["prior"]; ok { + inOutputBotUCBRule.Prior = helper.IntInt64(v.(int)) + } + + if v, ok := dMap["timestamp"]; ok { + inOutputBotUCBRule.Timestamp = helper.IntInt64(v.(int)) + } + + if v, ok := dMap["label"]; ok { + inOutputBotUCBRule.Label = helper.String(v.(string)) + } + + if v, ok := dMap["id"]; ok { + inOutputBotUCBRule.Id = helper.String(v.(string)) + } + + if v, ok := dMap["scene_id"]; ok { + inOutputBotUCBRule.SceneId = helper.String(v.(string)) + } + + if v, ok := dMap["valid_time"]; ok { + inOutputBotUCBRule.ValidTime = helper.IntInt64(v.(int)) + } + + if v, ok := dMap["appid"]; ok { + inOutputBotUCBRule.Appid = helper.IntUint64(v.(int)) + } + + if v, ok := dMap["addition_arg"]; ok { + inOutputBotUCBRule.AdditionArg = helper.String(v.(string)) + } + + if v, ok := dMap["desc"]; ok { + inOutputBotUCBRule.Desc = helper.String(v.(string)) + } + + inOutputBotUCBRule.RuleId = &ruleId + + if v, ok := dMap["pre_define"]; ok { + inOutputBotUCBRule.PreDefine = helper.Bool(v.(bool)) + } + + if v, ok := dMap["job_type"]; ok { + inOutputBotUCBRule.JobType = helper.String(v.(string)) + } + + if jobDateTimeMap, ok := helper.InterfaceToMap(dMap, "job_date_time"); ok { + jobDateTime := waf.JobDateTime{} + if v, ok := jobDateTimeMap["timed"]; ok { + for _, item := range v.([]interface{}) { + timedMap := item.(map[string]interface{}) + timedJob := waf.TimedJob{} + if v, ok := timedMap["start_date_time"]; ok { + timedJob.StartDateTime = helper.IntUint64(v.(int)) + } + + if v, ok := timedMap["end_date_time"]; ok { + timedJob.EndDateTime = helper.IntUint64(v.(int)) + } + + jobDateTime.Timed = append(jobDateTime.Timed, &timedJob) + } + } + + if v, ok := jobDateTimeMap["cron"]; ok { + for _, item := range v.([]interface{}) { + cronMap := item.(map[string]interface{}) + cronJob := waf.CronJob{} + if v, ok := cronMap["days"]; ok { + daysSet := v.(*schema.Set).List() + for i := range daysSet { + days := daysSet[i].(int) + cronJob.Days = append(cronJob.Days, helper.IntUint64(days)) + } + } + + if v, ok := cronMap["w_days"]; ok { + wDaysSet := v.(*schema.Set).List() + for i := range wDaysSet { + wDays := wDaysSet[i].(int) + cronJob.WDays = append(cronJob.WDays, helper.IntUint64(wDays)) + } + } + + if v, ok := cronMap["start_time"]; ok { + cronJob.StartTime = helper.String(v.(string)) + } + + if v, ok := cronMap["end_time"]; ok { + cronJob.EndTime = helper.String(v.(string)) + } + + jobDateTime.Cron = append(jobDateTime.Cron, &cronJob) + } + } + + if v, ok := jobDateTimeMap["time_t_zone"]; ok { + jobDateTime.TimeTZone = helper.String(v.(string)) + } + + inOutputBotUCBRule.JobDateTime = &jobDateTime + } + + if v, ok := dMap["expire_time"]; ok { + inOutputBotUCBRule.ExpireTime = helper.IntUint64(v.(int)) + } + + if v, ok := dMap["valid_status"]; ok { + inOutputBotUCBRule.ValidStatus = helper.IntInt64(v.(int)) + } + + if v, ok := dMap["block_page_id"]; ok { + inOutputBotUCBRule.BlockPageId = helper.IntUint64(v.(int)) + } + + if v, ok := dMap["action_list"]; ok { + for _, item := range v.([]interface{}) { + actionListMap := item.(map[string]interface{}) + uCBActionProportion := waf.UCBActionProportion{} + if v, ok := actionListMap["action"]; ok { + uCBActionProportion.Action = helper.String(v.(string)) + } + + if v, ok := actionListMap["proportion"]; ok { + uCBActionProportion.Proportion = helper.Float64(v.(float64)) + } + + inOutputBotUCBRule.ActionList = append(inOutputBotUCBRule.ActionList, &uCBActionProportion) + } + } + + request.Rule = &inOutputBotUCBRule + } + + err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError { + result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseWafV20180125Client().ModifyBotSceneUCBRule(request) + if e != nil { + return tccommon.RetryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + + return nil + }) + + if err != nil { + log.Printf("[CRITAL]%s update waf bot scene ucb rule failed, reason:%+v", logId, err) + return err + } + + return resourceTencentCloudWafBotSceneUCBRuleRead(d, meta) +} + +func resourceTencentCloudWafBotSceneUCBRuleDelete(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_waf_bot_scene_ucb_rule.delete")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(tccommon.ContextNil) + ctx = context.WithValue(context.TODO(), tccommon.LogIdKey, logId) + service = WafService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()} + ) + + idSplit := strings.Split(d.Id(), tccommon.FILED_SP) + if len(idSplit) != 3 { + return fmt.Errorf("id is broken,%s", d.Id()) + } + + domain := idSplit[0] + sceneId := idSplit[1] + ruleId := idSplit[2] + + if err := service.DeleteWafBotSceneUCBRuleById(ctx, domain, sceneId, ruleId); err != nil { + return err + } + + return nil +} diff --git a/tencentcloud/services/waf/service_tencentcloud_waf.go b/tencentcloud/services/waf/service_tencentcloud_waf.go index 3c8d84514b..56f1d6d0bd 100644 --- a/tencentcloud/services/waf/service_tencentcloud_waf.go +++ b/tencentcloud/services/waf/service_tencentcloud_waf.go @@ -5,6 +5,7 @@ import ( "log" "strconv" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common" "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" @@ -1496,3 +1497,198 @@ func (me *WafService) DescribeWafIpAccessControlV2ById(ctx context.Context, doma ret = response.Response return } + +func (me *WafService) DescribeWafBotSceneStatusConfigById(ctx context.Context, domain string, sceneId string) (ret *waf.BotSceneInfo, errRet error) { + logId := tccommon.GetLogId(ctx) + + request := waf.NewDescribeBotSceneListRequest() + response := waf.NewDescribeBotSceneListResponse() + request.Domain = helper.String(domain) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + var ( + BotSceneList []*waf.BotSceneInfo + offset int64 = 0 + limit int64 = 20 + ) + + for { + request.Offset = &offset + request.Limit = &limit + err := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError { + ratelimit.Check(request.GetAction()) + result, e := me.client.UseWafV20180125Client().DescribeBotSceneList(request) + if e != nil { + return tccommon.RetryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + + response = result + return nil + }) + + if err != nil { + errRet = err + return + } + + if response == nil || len(response.Response.BotSceneList) < 1 { + break + } + + BotSceneList = append(BotSceneList, response.Response.BotSceneList...) + if len(response.Response.BotSceneList) < int(limit) { + break + } + + offset += limit + } + + for _, item := range BotSceneList { + if *item.SceneId == sceneId { + ret = item + return + } + } + + return +} + +func (me *WafService) DescribeWafBotStatusConfigById(ctx context.Context, domain string) (ret *waf.DescribeBotSceneOverviewResponseParams, errRet error) { + logId := tccommon.GetLogId(ctx) + + request := waf.NewDescribeBotSceneOverviewRequest() + response := waf.NewDescribeBotSceneOverviewResponse() + request.Domain = helper.String(domain) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + err := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError { + ratelimit.Check(request.GetAction()) + result, e := me.client.UseWafV20180125Client().DescribeBotSceneOverview(request) + if e != nil { + return tccommon.RetryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + + response = result + return nil + }) + + if err != nil { + errRet = err + return + } + + ret = response.Response + return +} + +func (me *WafService) DescribeWafBotSceneUCBRuleById(ctx context.Context, domain, sceneId, ruleId string) (ret *waf.InOutputBotUCBRule, errRet error) { + logId := tccommon.GetLogId(ctx) + + request := waf.NewDescribeBotSceneUCBRuleRequest() + response := waf.NewDescribeBotSceneUCBRuleResponse() + request.Domain = helper.String(domain) + request.SceneId = helper.String(sceneId) + request.Sort = helper.String("desc") + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + var ( + BotSceneUCBRuleList []*waf.InOutputBotUCBRule + skip uint64 = 0 + limit uint64 = 20 + ) + + for { + request.Skip = &skip + request.Limit = &limit + err := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError { + ratelimit.Check(request.GetAction()) + result, e := me.client.UseWafV20180125Client().DescribeBotSceneUCBRule(request) + if e != nil { + return tccommon.RetryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + + response = result + return nil + }) + + if err != nil { + errRet = err + return + } + + if response == nil || response.Response == nil || response.Response.Data == nil || len(response.Response.Data.Res) < 1 { + break + } + + BotSceneUCBRuleList = append(BotSceneUCBRuleList, response.Response.Data.Res...) + if len(response.Response.Data.Res) < int(limit) { + break + } + + limit += skip + } + + for _, item := range BotSceneUCBRuleList { + if *item.SceneId == sceneId { + ret = item + return + } + } + + return +} + +func (me *WafService) DeleteWafBotSceneUCBRuleById(ctx context.Context, domain, sceneId, ruleId string) (errRet error) { + logId := tccommon.GetLogId(ctx) + + request := waf.NewDeleteBotSceneUCBRuleRequest() + request.Domain = helper.String(domain) + request.SceneId = helper.String(sceneId) + request.RuleId = helper.String(ruleId) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError { + ratelimit.Check(request.GetAction()) + result, e := me.client.UseWafV20180125Client().DeleteBotSceneUCBRule(request) + if e != nil { + return tccommon.RetryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + + return nil + }) + + if err != nil { + errRet = err + return + } + + return +} diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go index 8b2e64a0b5..310b73ac5d 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go @@ -265,7 +265,7 @@ func CompleteCommonParams(request Request, region string, requestClient string) params["Action"] = request.GetAction() params["Timestamp"] = strconv.FormatInt(time.Now().Unix(), 10) params["Nonce"] = strconv.Itoa(rand.Int()) - params["RequestClient"] = "SDK_GO_1.0.1148" + params["RequestClient"] = "SDK_GO_1.0.1149" if requestClient != "" { params["RequestClient"] += ": " + requestClient } diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf/v20180125/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf/v20180125/client.go index 08413003ad..31ec5d4577 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf/v20180125/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf/v20180125/client.go @@ -346,6 +346,7 @@ func NewAddCustomRuleResponse() (response *AddCustomRuleResponse) { // 可能返回的错误码: // INTERNALERROR = "InternalError" // INTERNALERROR_DBERR = "InternalError.DBErr" +// INVALIDPARAMETERVALUE_CELSYNTAXERR = "InvalidParameterValue.CELSyntaxErr" // LIMITEXCEEDED = "LimitExceeded" // LIMITEXCEEDED_SPECIFICATIONERR = "LimitExceeded.SpecificationErr" // UNSUPPORTEDOPERATION = "UnsupportedOperation" @@ -359,6 +360,7 @@ func (c *Client) AddCustomRule(request *AddCustomRuleRequest) (response *AddCust // 可能返回的错误码: // INTERNALERROR = "InternalError" // INTERNALERROR_DBERR = "InternalError.DBErr" +// INVALIDPARAMETERVALUE_CELSYNTAXERR = "InvalidParameterValue.CELSyntaxErr" // LIMITEXCEEDED = "LimitExceeded" // LIMITEXCEEDED_SPECIFICATIONERR = "LimitExceeded.SpecificationErr" // UNSUPPORTEDOPERATION = "UnsupportedOperation" @@ -595,6 +597,103 @@ func (c *Client) AddSpartaProtectionWithContext(ctx context.Context, request *Ad return } +func NewBatchOperateUserSignatureRulesRequest() (request *BatchOperateUserSignatureRulesRequest) { + request = &BatchOperateUserSignatureRulesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "BatchOperateUserSignatureRules") + + + return +} + +func NewBatchOperateUserSignatureRulesResponse() (response *BatchOperateUserSignatureRulesResponse) { + response = &BatchOperateUserSignatureRulesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// BatchOperateUserSignatureRules +// 批量操作tiga子规则 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_REDISOPERATIONFAILED = "FailedOperation.RedisOperationFailed" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ASYNCHRONOUSCALLFAILED = "InternalError.AsynchronousCallFailed" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CERTIFICATIONPARAMETERERR = "InvalidParameter.CertificationParameterErr" +// INVALIDPARAMETER_DOMAINEXCEEDSLIMITERR = "InvalidParameter.DomainExceedsLimitErr" +// INVALIDPARAMETER_DOMAINNOTRECORD = "InvalidParameter.DomainNotRecord" +// INVALIDPARAMETER_PORTPARAMETERERR = "InvalidParameter.PortParameterErr" +// INVALIDPARAMETER_PROTECTIONDOMAINPARAMETERERR = "InvalidParameter.ProtectionDomainParameterErr" +// INVALIDPARAMETER_TLSPARAMETERERR = "InvalidParameter.TLSParameterErr" +// INVALIDPARAMETER_UNAUTHORIZEDOPERATIONPARAMETERERR = "InvalidParameter.UnauthorizedOperationParameterErr" +// INVALIDPARAMETER_UPSTREAMPARAMETERERR = "InvalidParameter.UpstreamParameterErr" +// INVALIDPARAMETER_XFFRESETPARAMETERERR = "InvalidParameter.XFFResetParameterErr" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINUSE_EMPTYERR = "ResourceInUse.EmptyErr" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) BatchOperateUserSignatureRules(request *BatchOperateUserSignatureRulesRequest) (response *BatchOperateUserSignatureRulesResponse, err error) { + return c.BatchOperateUserSignatureRulesWithContext(context.Background(), request) +} + +// BatchOperateUserSignatureRules +// 批量操作tiga子规则 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_REDISOPERATIONFAILED = "FailedOperation.RedisOperationFailed" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ASYNCHRONOUSCALLFAILED = "InternalError.AsynchronousCallFailed" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CERTIFICATIONPARAMETERERR = "InvalidParameter.CertificationParameterErr" +// INVALIDPARAMETER_DOMAINEXCEEDSLIMITERR = "InvalidParameter.DomainExceedsLimitErr" +// INVALIDPARAMETER_DOMAINNOTRECORD = "InvalidParameter.DomainNotRecord" +// INVALIDPARAMETER_PORTPARAMETERERR = "InvalidParameter.PortParameterErr" +// INVALIDPARAMETER_PROTECTIONDOMAINPARAMETERERR = "InvalidParameter.ProtectionDomainParameterErr" +// INVALIDPARAMETER_TLSPARAMETERERR = "InvalidParameter.TLSParameterErr" +// INVALIDPARAMETER_UNAUTHORIZEDOPERATIONPARAMETERERR = "InvalidParameter.UnauthorizedOperationParameterErr" +// INVALIDPARAMETER_UPSTREAMPARAMETERERR = "InvalidParameter.UpstreamParameterErr" +// INVALIDPARAMETER_XFFRESETPARAMETERERR = "InvalidParameter.XFFResetParameterErr" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINUSE_EMPTYERR = "ResourceInUse.EmptyErr" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) BatchOperateUserSignatureRulesWithContext(ctx context.Context, request *BatchOperateUserSignatureRulesRequest) (response *BatchOperateUserSignatureRulesResponse, err error) { + if request == nil { + request = NewBatchOperateUserSignatureRulesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("BatchOperateUserSignatureRules require credential") + } + + request.SetContext(ctx) + + response = NewBatchOperateUserSignatureRulesResponse() + err = c.Send(request, response) + return +} + func NewCreateAccessExportRequest() (request *CreateAccessExportRequest) { request = &CreateAccessExportRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -682,6 +781,83 @@ func (c *Client) CreateAccessExportWithContext(ctx context.Context, request *Cre return } +func NewCreateAreaBanRuleRequest() (request *CreateAreaBanRuleRequest) { + request = &CreateAreaBanRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "CreateAreaBanRule") + + + return +} + +func NewCreateAreaBanRuleResponse() (response *CreateAreaBanRuleResponse) { + response = &CreateAreaBanRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// CreateAreaBanRule +// 添加(编辑)地域封禁中的地域信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBERR = "InternalError.DBErr" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateAreaBanRule(request *CreateAreaBanRuleRequest) (response *CreateAreaBanRuleResponse, err error) { + return c.CreateAreaBanRuleWithContext(context.Background(), request) +} + +// CreateAreaBanRule +// 添加(编辑)地域封禁中的地域信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBERR = "InternalError.DBErr" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateAreaBanRuleWithContext(ctx context.Context, request *CreateAreaBanRuleRequest) (response *CreateAreaBanRuleResponse, err error) { + if request == nil { + request = NewCreateAreaBanRuleRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateAreaBanRule require credential") + } + + request.SetContext(ctx) + + response = NewCreateAreaBanRuleResponse() + err = c.Send(request, response) + return +} + func NewCreateDealsRequest() (request *CreateDealsRequest) { request = &CreateDealsRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -905,36 +1081,35 @@ func (c *Client) CreateIpAccessControlWithContext(ctx context.Context, request * return } -func NewDeleteAccessExportRequest() (request *DeleteAccessExportRequest) { - request = &DeleteAccessExportRequest{ +func NewCreatePostCKafkaFlowRequest() (request *CreatePostCKafkaFlowRequest) { + request = &CreatePostCKafkaFlowRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("waf", APIVersion, "DeleteAccessExport") + request.Init().WithApiInfo("waf", APIVersion, "CreatePostCKafkaFlow") return } -func NewDeleteAccessExportResponse() (response *DeleteAccessExportResponse) { - response = &DeleteAccessExportResponse{ +func NewCreatePostCKafkaFlowResponse() (response *CreatePostCKafkaFlowResponse) { + response = &CreatePostCKafkaFlowResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// DeleteAccessExport -// 本接口用于删除访问日志导出 +// CreatePostCKafkaFlow +// 创建CKafka投递流任务 // // 可能返回的错误码: // AUTHFAILURE = "AuthFailure" // FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CKAFKAINTERNALERROR = "FailedOperation.CKafkaInternalError" // FAILEDOPERATION_CLSINTERNALERROR = "FailedOperation.CLSInternalError" // INTERNALERROR = "InternalError" // INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_INVALIDCERTIFICATE = "InvalidParameter.InvalidCertificate" -// INVALIDPARAMETER_QUERYCERTBYSSLIDFAILED = "InvalidParameter.QueryCertBySSLIDFailed" // INVALIDPARAMETERVALUE = "InvalidParameterValue" // LIMITEXCEEDED = "LimitExceeded" // MISSINGPARAMETER = "MissingParameter" @@ -944,25 +1119,23 @@ func NewDeleteAccessExportResponse() (response *DeleteAccessExportResponse) { // RESOURCEINSUFFICIENT = "ResourceInsufficient" // RESOURCENOTFOUND = "ResourceNotFound" // RESOURCEUNAVAILABLE = "ResourceUnavailable" -// RESOURCESSOLDOUT = "ResourcesSoldOut" // UNAUTHORIZEDOPERATION = "UnauthorizedOperation" // UNKNOWNPARAMETER = "UnknownParameter" // UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DeleteAccessExport(request *DeleteAccessExportRequest) (response *DeleteAccessExportResponse, err error) { - return c.DeleteAccessExportWithContext(context.Background(), request) +func (c *Client) CreatePostCKafkaFlow(request *CreatePostCKafkaFlowRequest) (response *CreatePostCKafkaFlowResponse, err error) { + return c.CreatePostCKafkaFlowWithContext(context.Background(), request) } -// DeleteAccessExport -// 本接口用于删除访问日志导出 +// CreatePostCKafkaFlow +// 创建CKafka投递流任务 // // 可能返回的错误码: // AUTHFAILURE = "AuthFailure" // FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CKAFKAINTERNALERROR = "FailedOperation.CKafkaInternalError" // FAILEDOPERATION_CLSINTERNALERROR = "FailedOperation.CLSInternalError" // INTERNALERROR = "InternalError" // INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_INVALIDCERTIFICATE = "InvalidParameter.InvalidCertificate" -// INVALIDPARAMETER_QUERYCERTBYSSLIDFAILED = "InvalidParameter.QueryCertBySSLIDFailed" // INVALIDPARAMETERVALUE = "InvalidParameterValue" // LIMITEXCEEDED = "LimitExceeded" // MISSINGPARAMETER = "MissingParameter" @@ -972,110 +1145,279 @@ func (c *Client) DeleteAccessExport(request *DeleteAccessExportRequest) (respons // RESOURCEINSUFFICIENT = "ResourceInsufficient" // RESOURCENOTFOUND = "ResourceNotFound" // RESOURCEUNAVAILABLE = "ResourceUnavailable" -// RESOURCESSOLDOUT = "ResourcesSoldOut" // UNAUTHORIZEDOPERATION = "UnauthorizedOperation" // UNKNOWNPARAMETER = "UnknownParameter" // UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DeleteAccessExportWithContext(ctx context.Context, request *DeleteAccessExportRequest) (response *DeleteAccessExportResponse, err error) { +func (c *Client) CreatePostCKafkaFlowWithContext(ctx context.Context, request *CreatePostCKafkaFlowRequest) (response *CreatePostCKafkaFlowResponse, err error) { if request == nil { - request = NewDeleteAccessExportRequest() + request = NewCreatePostCKafkaFlowRequest() } if c.GetCredential() == nil { - return nil, errors.New("DeleteAccessExport require credential") + return nil, errors.New("CreatePostCKafkaFlow require credential") } request.SetContext(ctx) - response = NewDeleteAccessExportResponse() + response = NewCreatePostCKafkaFlowResponse() err = c.Send(request, response) return } -func NewDeleteAntiFakeUrlRequest() (request *DeleteAntiFakeUrlRequest) { - request = &DeleteAntiFakeUrlRequest{ +func NewCreatePostCLSFlowRequest() (request *CreatePostCLSFlowRequest) { + request = &CreatePostCLSFlowRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("waf", APIVersion, "DeleteAntiFakeUrl") + request.Init().WithApiInfo("waf", APIVersion, "CreatePostCLSFlow") return } -func NewDeleteAntiFakeUrlResponse() (response *DeleteAntiFakeUrlResponse) { - response = &DeleteAntiFakeUrlResponse{ +func NewCreatePostCLSFlowResponse() (response *CreatePostCLSFlowResponse) { + response = &CreatePostCLSFlowResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// DeleteAntiFakeUrl -// 删除防篡改url +// CreatePostCLSFlow +// 创建CLS投递流任务 // // 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CKAFKAINTERNALERROR = "FailedOperation.CKafkaInternalError" +// FAILEDOPERATION_CLSINTERNALERROR = "FailedOperation.CLSInternalError" // INTERNALERROR = "InternalError" -// INTERNALERROR_DBERR = "InternalError.DBErr" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" // UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DeleteAntiFakeUrl(request *DeleteAntiFakeUrlRequest) (response *DeleteAntiFakeUrlResponse, err error) { - return c.DeleteAntiFakeUrlWithContext(context.Background(), request) +func (c *Client) CreatePostCLSFlow(request *CreatePostCLSFlowRequest) (response *CreatePostCLSFlowResponse, err error) { + return c.CreatePostCLSFlowWithContext(context.Background(), request) } -// DeleteAntiFakeUrl -// 删除防篡改url +// CreatePostCLSFlow +// 创建CLS投递流任务 // // 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CKAFKAINTERNALERROR = "FailedOperation.CKafkaInternalError" +// FAILEDOPERATION_CLSINTERNALERROR = "FailedOperation.CLSInternalError" // INTERNALERROR = "InternalError" -// INTERNALERROR_DBERR = "InternalError.DBErr" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" // UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DeleteAntiFakeUrlWithContext(ctx context.Context, request *DeleteAntiFakeUrlRequest) (response *DeleteAntiFakeUrlResponse, err error) { +func (c *Client) CreatePostCLSFlowWithContext(ctx context.Context, request *CreatePostCLSFlowRequest) (response *CreatePostCLSFlowResponse, err error) { if request == nil { - request = NewDeleteAntiFakeUrlRequest() + request = NewCreatePostCLSFlowRequest() } if c.GetCredential() == nil { - return nil, errors.New("DeleteAntiFakeUrl require credential") + return nil, errors.New("CreatePostCLSFlow require credential") } request.SetContext(ctx) - response = NewDeleteAntiFakeUrlResponse() + response = NewCreatePostCLSFlowResponse() err = c.Send(request, response) return } -func NewDeleteAntiInfoLeakRuleRequest() (request *DeleteAntiInfoLeakRuleRequest) { - request = &DeleteAntiInfoLeakRuleRequest{ +func NewDeleteAccessExportRequest() (request *DeleteAccessExportRequest) { + request = &DeleteAccessExportRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("waf", APIVersion, "DeleteAntiInfoLeakRule") + request.Init().WithApiInfo("waf", APIVersion, "DeleteAccessExport") return } -func NewDeleteAntiInfoLeakRuleResponse() (response *DeleteAntiInfoLeakRuleResponse) { - response = &DeleteAntiInfoLeakRuleResponse{ +func NewDeleteAccessExportResponse() (response *DeleteAccessExportResponse) { + response = &DeleteAccessExportResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// DeleteAntiInfoLeakRule -// 信息防泄漏删除规则 +// DeleteAccessExport +// 本接口用于删除访问日志导出 // // 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CLSINTERNALERROR = "FailedOperation.CLSInternalError" // INTERNALERROR = "InternalError" -// INTERNALERROR_DBERR = "InternalError.DBErr" -func (c *Client) DeleteAntiInfoLeakRule(request *DeleteAntiInfoLeakRuleRequest) (response *DeleteAntiInfoLeakRuleResponse, err error) { - return c.DeleteAntiInfoLeakRuleWithContext(context.Background(), request) +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INVALIDCERTIFICATE = "InvalidParameter.InvalidCertificate" +// INVALIDPARAMETER_QUERYCERTBYSSLIDFAILED = "InvalidParameter.QueryCertBySSLIDFailed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteAccessExport(request *DeleteAccessExportRequest) (response *DeleteAccessExportResponse, err error) { + return c.DeleteAccessExportWithContext(context.Background(), request) } -// DeleteAntiInfoLeakRule -// 信息防泄漏删除规则 +// DeleteAccessExport +// 本接口用于删除访问日志导出 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CLSINTERNALERROR = "FailedOperation.CLSInternalError" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INVALIDCERTIFICATE = "InvalidParameter.InvalidCertificate" +// INVALIDPARAMETER_QUERYCERTBYSSLIDFAILED = "InvalidParameter.QueryCertBySSLIDFailed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteAccessExportWithContext(ctx context.Context, request *DeleteAccessExportRequest) (response *DeleteAccessExportResponse, err error) { + if request == nil { + request = NewDeleteAccessExportRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteAccessExport require credential") + } + + request.SetContext(ctx) + + response = NewDeleteAccessExportResponse() + err = c.Send(request, response) + return +} + +func NewDeleteAntiFakeUrlRequest() (request *DeleteAntiFakeUrlRequest) { + request = &DeleteAntiFakeUrlRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "DeleteAntiFakeUrl") + + + return +} + +func NewDeleteAntiFakeUrlResponse() (response *DeleteAntiFakeUrlResponse) { + response = &DeleteAntiFakeUrlResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DeleteAntiFakeUrl +// 删除防篡改url +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBERR = "InternalError.DBErr" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteAntiFakeUrl(request *DeleteAntiFakeUrlRequest) (response *DeleteAntiFakeUrlResponse, err error) { + return c.DeleteAntiFakeUrlWithContext(context.Background(), request) +} + +// DeleteAntiFakeUrl +// 删除防篡改url +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBERR = "InternalError.DBErr" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteAntiFakeUrlWithContext(ctx context.Context, request *DeleteAntiFakeUrlRequest) (response *DeleteAntiFakeUrlResponse, err error) { + if request == nil { + request = NewDeleteAntiFakeUrlRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteAntiFakeUrl require credential") + } + + request.SetContext(ctx) + + response = NewDeleteAntiFakeUrlResponse() + err = c.Send(request, response) + return +} + +func NewDeleteAntiInfoLeakRuleRequest() (request *DeleteAntiInfoLeakRuleRequest) { + request = &DeleteAntiInfoLeakRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "DeleteAntiInfoLeakRule") + + + return +} + +func NewDeleteAntiInfoLeakRuleResponse() (response *DeleteAntiInfoLeakRuleResponse) { + response = &DeleteAntiInfoLeakRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DeleteAntiInfoLeakRule +// 信息防泄漏删除规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBERR = "InternalError.DBErr" +func (c *Client) DeleteAntiInfoLeakRule(request *DeleteAntiInfoLeakRuleRequest) (response *DeleteAntiInfoLeakRuleResponse, err error) { + return c.DeleteAntiInfoLeakRuleWithContext(context.Background(), request) +} + +// DeleteAntiInfoLeakRule +// 信息防泄漏删除规则 // // 可能返回的错误码: // INTERNALERROR = "InternalError" @@ -1238,6 +1580,55 @@ func (c *Client) DeleteAttackWhiteRuleWithContext(ctx context.Context, request * return } +func NewDeleteBotSceneUCBRuleRequest() (request *DeleteBotSceneUCBRuleRequest) { + request = &DeleteBotSceneUCBRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "DeleteBotSceneUCBRule") + + + return +} + +func NewDeleteBotSceneUCBRuleResponse() (response *DeleteBotSceneUCBRuleResponse) { + response = &DeleteBotSceneUCBRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DeleteBotSceneUCBRule +// 场景化后删除Bot的UCB自定义规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +func (c *Client) DeleteBotSceneUCBRule(request *DeleteBotSceneUCBRuleRequest) (response *DeleteBotSceneUCBRuleResponse, err error) { + return c.DeleteBotSceneUCBRuleWithContext(context.Background(), request) +} + +// DeleteBotSceneUCBRule +// 场景化后删除Bot的UCB自定义规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +func (c *Client) DeleteBotSceneUCBRuleWithContext(ctx context.Context, request *DeleteBotSceneUCBRuleRequest) (response *DeleteBotSceneUCBRuleResponse, err error) { + if request == nil { + request = NewDeleteBotSceneUCBRuleRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteBotSceneUCBRule require credential") + } + + request.SetContext(ctx) + + response = NewDeleteBotSceneUCBRuleResponse() + err = c.Send(request, response) + return +} + func NewDeleteCCRuleRequest() (request *DeleteCCRuleRequest) { request = &DeleteCCRuleRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -1609,6 +2000,8 @@ func NewDeleteIpAccessControlV2Response() (response *DeleteIpAccessControlV2Resp // INTERNALERROR = "InternalError" // INTERNALERROR_DBERR = "InternalError.DBErr" // INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" // UNSUPPORTEDOPERATION = "UnsupportedOperation" func (c *Client) DeleteIpAccessControlV2(request *DeleteIpAccessControlV2Request) (response *DeleteIpAccessControlV2Response, err error) { return c.DeleteIpAccessControlV2WithContext(context.Background(), request) @@ -1622,6 +2015,8 @@ func (c *Client) DeleteIpAccessControlV2(request *DeleteIpAccessControlV2Request // INTERNALERROR = "InternalError" // INTERNALERROR_DBERR = "InternalError.DBErr" // INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" // UNSUPPORTEDOPERATION = "UnsupportedOperation" func (c *Client) DeleteIpAccessControlV2WithContext(ctx context.Context, request *DeleteIpAccessControlV2Request) (response *DeleteIpAccessControlV2Response, err error) { if request == nil { @@ -2360,6 +2755,57 @@ func (c *Client) DescribeAreaBanAreasWithContext(ctx context.Context, request *D return } +func NewDescribeAreaBanRuleRequest() (request *DescribeAreaBanRuleRequest) { + request = &DescribeAreaBanRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "DescribeAreaBanRule") + + + return +} + +func NewDescribeAreaBanRuleResponse() (response *DescribeAreaBanRuleResponse) { + response = &DescribeAreaBanRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeAreaBanRule +// 获取地域封禁规则配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeAreaBanRule(request *DescribeAreaBanRuleRequest) (response *DescribeAreaBanRuleResponse, err error) { + return c.DescribeAreaBanRuleWithContext(context.Background(), request) +} + +// DescribeAreaBanRule +// 获取地域封禁规则配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeAreaBanRuleWithContext(ctx context.Context, request *DescribeAreaBanRuleRequest) (response *DescribeAreaBanRuleResponse, err error) { + if request == nil { + request = NewDescribeAreaBanRuleRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeAreaBanRule require credential") + } + + request.SetContext(ctx) + + response = NewDescribeAreaBanRuleResponse() + err = c.Send(request, response) + return +} + func NewDescribeAreaBanSupportAreasRequest() (request *DescribeAreaBanSupportAreasRequest) { request = &DescribeAreaBanSupportAreasRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -2718,6 +3164,8 @@ func NewDescribeBatchIpAccessControlResponse() (response *DescribeBatchIpAccessC // 可能返回的错误码: // INTERNALERROR = "InternalError" // INTERNALERROR_DBERR = "InternalError.DBErr" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" func (c *Client) DescribeBatchIpAccessControl(request *DescribeBatchIpAccessControlRequest) (response *DescribeBatchIpAccessControlResponse, err error) { return c.DescribeBatchIpAccessControlWithContext(context.Background(), request) } @@ -2728,6 +3176,8 @@ func (c *Client) DescribeBatchIpAccessControl(request *DescribeBatchIpAccessCont // 可能返回的错误码: // INTERNALERROR = "InternalError" // INTERNALERROR_DBERR = "InternalError.DBErr" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" func (c *Client) DescribeBatchIpAccessControlWithContext(ctx context.Context, request *DescribeBatchIpAccessControlRequest) (response *DescribeBatchIpAccessControlResponse, err error) { if request == nil { request = NewDescribeBatchIpAccessControlRequest() @@ -2744,142 +3194,311 @@ func (c *Client) DescribeBatchIpAccessControlWithContext(ctx context.Context, re return } -func NewDescribeCCAutoStatusRequest() (request *DescribeCCAutoStatusRequest) { - request = &DescribeCCAutoStatusRequest{ +func NewDescribeBotSceneListRequest() (request *DescribeBotSceneListRequest) { + request = &DescribeBotSceneListRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("waf", APIVersion, "DescribeCCAutoStatus") + request.Init().WithApiInfo("waf", APIVersion, "DescribeBotSceneList") return } -func NewDescribeCCAutoStatusResponse() (response *DescribeCCAutoStatusResponse) { - response = &DescribeCCAutoStatusResponse{ +func NewDescribeBotSceneListResponse() (response *DescribeBotSceneListResponse) { + response = &DescribeBotSceneListResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// DescribeCCAutoStatus -// 获取SAAS型接入的紧急CC防护状态 +// DescribeBotSceneList +// 获取BOT场景列表与概览 // // 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" // INTERNALERROR = "InternalError" // UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeCCAutoStatus(request *DescribeCCAutoStatusRequest) (response *DescribeCCAutoStatusResponse, err error) { - return c.DescribeCCAutoStatusWithContext(context.Background(), request) +// UNSUPPORTEDOPERATION_BOTSERVICENOTSUBSCRIBEERR = "UnsupportedOperation.BotServiceNotSubscribeErr" +// UNSUPPORTEDOPERATION_INVALIDREQUEST = "UnsupportedOperation.InvalidRequest" +func (c *Client) DescribeBotSceneList(request *DescribeBotSceneListRequest) (response *DescribeBotSceneListResponse, err error) { + return c.DescribeBotSceneListWithContext(context.Background(), request) } -// DescribeCCAutoStatus -// 获取SAAS型接入的紧急CC防护状态 +// DescribeBotSceneList +// 获取BOT场景列表与概览 // // 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" // INTERNALERROR = "InternalError" // UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeCCAutoStatusWithContext(ctx context.Context, request *DescribeCCAutoStatusRequest) (response *DescribeCCAutoStatusResponse, err error) { +// UNSUPPORTEDOPERATION_BOTSERVICENOTSUBSCRIBEERR = "UnsupportedOperation.BotServiceNotSubscribeErr" +// UNSUPPORTEDOPERATION_INVALIDREQUEST = "UnsupportedOperation.InvalidRequest" +func (c *Client) DescribeBotSceneListWithContext(ctx context.Context, request *DescribeBotSceneListRequest) (response *DescribeBotSceneListResponse, err error) { if request == nil { - request = NewDescribeCCAutoStatusRequest() + request = NewDescribeBotSceneListRequest() } if c.GetCredential() == nil { - return nil, errors.New("DescribeCCAutoStatus require credential") + return nil, errors.New("DescribeBotSceneList require credential") } request.SetContext(ctx) - response = NewDescribeCCAutoStatusResponse() + response = NewDescribeBotSceneListResponse() err = c.Send(request, response) return } -func NewDescribeCCRuleRequest() (request *DescribeCCRuleRequest) { - request = &DescribeCCRuleRequest{ +func NewDescribeBotSceneOverviewRequest() (request *DescribeBotSceneOverviewRequest) { + request = &DescribeBotSceneOverviewRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("waf", APIVersion, "DescribeCCRule") + request.Init().WithApiInfo("waf", APIVersion, "DescribeBotSceneOverview") return } -func NewDescribeCCRuleResponse() (response *DescribeCCRuleResponse) { - response = &DescribeCCRuleResponse{ +func NewDescribeBotSceneOverviewResponse() (response *DescribeBotSceneOverviewResponse) { + response = &DescribeBotSceneOverviewResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// DescribeCCRule -// Waf CC V2 Query接口 +// DescribeBotSceneOverview +// 获取Bot场景全局概览 // // 可能返回的错误码: // INTERNALERROR = "InternalError" -func (c *Client) DescribeCCRule(request *DescribeCCRuleRequest) (response *DescribeCCRuleResponse, err error) { - return c.DescribeCCRuleWithContext(context.Background(), request) +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDREQUEST = "UnsupportedOperation.InvalidRequest" +func (c *Client) DescribeBotSceneOverview(request *DescribeBotSceneOverviewRequest) (response *DescribeBotSceneOverviewResponse, err error) { + return c.DescribeBotSceneOverviewWithContext(context.Background(), request) } -// DescribeCCRule -// Waf CC V2 Query接口 +// DescribeBotSceneOverview +// 获取Bot场景全局概览 // // 可能返回的错误码: // INTERNALERROR = "InternalError" -func (c *Client) DescribeCCRuleWithContext(ctx context.Context, request *DescribeCCRuleRequest) (response *DescribeCCRuleResponse, err error) { +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDREQUEST = "UnsupportedOperation.InvalidRequest" +func (c *Client) DescribeBotSceneOverviewWithContext(ctx context.Context, request *DescribeBotSceneOverviewRequest) (response *DescribeBotSceneOverviewResponse, err error) { if request == nil { - request = NewDescribeCCRuleRequest() + request = NewDescribeBotSceneOverviewRequest() } if c.GetCredential() == nil { - return nil, errors.New("DescribeCCRule require credential") + return nil, errors.New("DescribeBotSceneOverview require credential") } request.SetContext(ctx) - response = NewDescribeCCRuleResponse() + response = NewDescribeBotSceneOverviewResponse() err = c.Send(request, response) return } -func NewDescribeCCRuleListRequest() (request *DescribeCCRuleListRequest) { - request = &DescribeCCRuleListRequest{ +func NewDescribeBotSceneUCBRuleRequest() (request *DescribeBotSceneUCBRuleRequest) { + request = &DescribeBotSceneUCBRuleRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("waf", APIVersion, "DescribeCCRuleList") + request.Init().WithApiInfo("waf", APIVersion, "DescribeBotSceneUCBRule") return } -func NewDescribeCCRuleListResponse() (response *DescribeCCRuleListResponse) { - response = &DescribeCCRuleListResponse{ +func NewDescribeBotSceneUCBRuleResponse() (response *DescribeBotSceneUCBRuleResponse) { + response = &DescribeBotSceneUCBRuleResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// DescribeCCRuleList -// 根据多条件查询CC规则 +// DescribeBotSceneUCBRule +// 场景化后Bot获取UCB自定义规则策略 // // 可能返回的错误码: +// FAILEDOPERATION_MONGOOPERATIONFAILED = "FailedOperation.MongoOperationFailed" // INTERNALERROR = "InternalError" +// INVALIDPARAMETER_BOTSCENENOTEXISTERR = "InvalidParameter.BotSceneNotExistErr" // UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeCCRuleList(request *DescribeCCRuleListRequest) (response *DescribeCCRuleListResponse, err error) { - return c.DescribeCCRuleListWithContext(context.Background(), request) +// UNSUPPORTEDOPERATION_BOTSERVICENOTSUBSCRIBEERR = "UnsupportedOperation.BotServiceNotSubscribeErr" +// UNSUPPORTEDOPERATION_INVALIDREQUEST = "UnsupportedOperation.InvalidRequest" +func (c *Client) DescribeBotSceneUCBRule(request *DescribeBotSceneUCBRuleRequest) (response *DescribeBotSceneUCBRuleResponse, err error) { + return c.DescribeBotSceneUCBRuleWithContext(context.Background(), request) } -// DescribeCCRuleList -// 根据多条件查询CC规则 +// DescribeBotSceneUCBRule +// 场景化后Bot获取UCB自定义规则策略 // // 可能返回的错误码: +// FAILEDOPERATION_MONGOOPERATIONFAILED = "FailedOperation.MongoOperationFailed" // INTERNALERROR = "InternalError" +// INVALIDPARAMETER_BOTSCENENOTEXISTERR = "InvalidParameter.BotSceneNotExistErr" // UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeCCRuleListWithContext(ctx context.Context, request *DescribeCCRuleListRequest) (response *DescribeCCRuleListResponse, err error) { +// UNSUPPORTEDOPERATION_BOTSERVICENOTSUBSCRIBEERR = "UnsupportedOperation.BotServiceNotSubscribeErr" +// UNSUPPORTEDOPERATION_INVALIDREQUEST = "UnsupportedOperation.InvalidRequest" +func (c *Client) DescribeBotSceneUCBRuleWithContext(ctx context.Context, request *DescribeBotSceneUCBRuleRequest) (response *DescribeBotSceneUCBRuleResponse, err error) { + if request == nil { + request = NewDescribeBotSceneUCBRuleRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeBotSceneUCBRule require credential") + } + + request.SetContext(ctx) + + response = NewDescribeBotSceneUCBRuleResponse() + err = c.Send(request, response) + return +} + +func NewDescribeCCAutoStatusRequest() (request *DescribeCCAutoStatusRequest) { + request = &DescribeCCAutoStatusRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "DescribeCCAutoStatus") + + + return +} + +func NewDescribeCCAutoStatusResponse() (response *DescribeCCAutoStatusResponse) { + response = &DescribeCCAutoStatusResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeCCAutoStatus +// 获取SAAS型接入的紧急CC防护状态 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeCCAutoStatus(request *DescribeCCAutoStatusRequest) (response *DescribeCCAutoStatusResponse, err error) { + return c.DescribeCCAutoStatusWithContext(context.Background(), request) +} + +// DescribeCCAutoStatus +// 获取SAAS型接入的紧急CC防护状态 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeCCAutoStatusWithContext(ctx context.Context, request *DescribeCCAutoStatusRequest) (response *DescribeCCAutoStatusResponse, err error) { + if request == nil { + request = NewDescribeCCAutoStatusRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeCCAutoStatus require credential") + } + + request.SetContext(ctx) + + response = NewDescribeCCAutoStatusResponse() + err = c.Send(request, response) + return +} + +func NewDescribeCCRuleRequest() (request *DescribeCCRuleRequest) { + request = &DescribeCCRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "DescribeCCRule") + + + return +} + +func NewDescribeCCRuleResponse() (response *DescribeCCRuleResponse) { + response = &DescribeCCRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeCCRule +// Waf CC V2 Query接口 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +func (c *Client) DescribeCCRule(request *DescribeCCRuleRequest) (response *DescribeCCRuleResponse, err error) { + return c.DescribeCCRuleWithContext(context.Background(), request) +} + +// DescribeCCRule +// Waf CC V2 Query接口 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +func (c *Client) DescribeCCRuleWithContext(ctx context.Context, request *DescribeCCRuleRequest) (response *DescribeCCRuleResponse, err error) { + if request == nil { + request = NewDescribeCCRuleRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeCCRule require credential") + } + + request.SetContext(ctx) + + response = NewDescribeCCRuleResponse() + err = c.Send(request, response) + return +} + +func NewDescribeCCRuleListRequest() (request *DescribeCCRuleListRequest) { + request = &DescribeCCRuleListRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "DescribeCCRuleList") + + + return +} + +func NewDescribeCCRuleListResponse() (response *DescribeCCRuleListResponse) { + response = &DescribeCCRuleListResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeCCRuleList +// 根据多条件查询CC规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeCCRuleList(request *DescribeCCRuleListRequest) (response *DescribeCCRuleListResponse, err error) { + return c.DescribeCCRuleListWithContext(context.Background(), request) +} + +// DescribeCCRuleList +// 根据多条件查询CC规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeCCRuleListWithContext(ctx context.Context, request *DescribeCCRuleListRequest) (response *DescribeCCRuleListResponse, err error) { if request == nil { request = NewDescribeCCRuleListRequest() } @@ -4208,6 +4827,8 @@ func NewDescribeIpAccessControlResponse() (response *DescribeIpAccessControlResp // 可能返回的错误码: // INTERNALERROR = "InternalError" // INTERNALERROR_DBERR = "InternalError.DBErr" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" func (c *Client) DescribeIpAccessControl(request *DescribeIpAccessControlRequest) (response *DescribeIpAccessControlResponse, err error) { return c.DescribeIpAccessControlWithContext(context.Background(), request) } @@ -4218,6 +4839,8 @@ func (c *Client) DescribeIpAccessControl(request *DescribeIpAccessControlRequest // 可能返回的错误码: // INTERNALERROR = "InternalError" // INTERNALERROR_DBERR = "InternalError.DBErr" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" func (c *Client) DescribeIpAccessControlWithContext(ctx context.Context, request *DescribeIpAccessControlRequest) (response *DescribeIpAccessControlResponse, err error) { if request == nil { request = NewDescribeIpAccessControlRequest() @@ -4667,114 +5290,314 @@ func (c *Client) DescribePortsWithContext(ctx context.Context, request *Describe return } -func NewDescribeProtectionModesRequest() (request *DescribeProtectionModesRequest) { - request = &DescribeProtectionModesRequest{ +func NewDescribePostCKafkaFlowsRequest() (request *DescribePostCKafkaFlowsRequest) { + request = &DescribePostCKafkaFlowsRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("waf", APIVersion, "DescribeProtectionModes") + request.Init().WithApiInfo("waf", APIVersion, "DescribePostCKafkaFlows") return } -func NewDescribeProtectionModesResponse() (response *DescribeProtectionModesResponse) { - response = &DescribeProtectionModesResponse{ +func NewDescribePostCKafkaFlowsResponse() (response *DescribePostCKafkaFlowsResponse) { + response = &DescribePostCKafkaFlowsResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// DescribeProtectionModes -// 查询Tiga引擎大类规则及其防护模式 +// DescribePostCKafkaFlows +// 获取CKafka投递流任务列表 // // 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CKAFKAINTERNALERROR = "FailedOperation.CKafkaInternalError" +// FAILEDOPERATION_CLSINTERNALERROR = "FailedOperation.CLSInternalError" // INTERNALERROR = "InternalError" -func (c *Client) DescribeProtectionModes(request *DescribeProtectionModesRequest) (response *DescribeProtectionModesResponse, err error) { - return c.DescribeProtectionModesWithContext(context.Background(), request) +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribePostCKafkaFlows(request *DescribePostCKafkaFlowsRequest) (response *DescribePostCKafkaFlowsResponse, err error) { + return c.DescribePostCKafkaFlowsWithContext(context.Background(), request) } -// DescribeProtectionModes -// 查询Tiga引擎大类规则及其防护模式 +// DescribePostCKafkaFlows +// 获取CKafka投递流任务列表 // // 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CKAFKAINTERNALERROR = "FailedOperation.CKafkaInternalError" +// FAILEDOPERATION_CLSINTERNALERROR = "FailedOperation.CLSInternalError" // INTERNALERROR = "InternalError" -func (c *Client) DescribeProtectionModesWithContext(ctx context.Context, request *DescribeProtectionModesRequest) (response *DescribeProtectionModesResponse, err error) { +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribePostCKafkaFlowsWithContext(ctx context.Context, request *DescribePostCKafkaFlowsRequest) (response *DescribePostCKafkaFlowsResponse, err error) { if request == nil { - request = NewDescribeProtectionModesRequest() + request = NewDescribePostCKafkaFlowsRequest() } if c.GetCredential() == nil { - return nil, errors.New("DescribeProtectionModes require credential") + return nil, errors.New("DescribePostCKafkaFlows require credential") } request.SetContext(ctx) - response = NewDescribeProtectionModesResponse() + response = NewDescribePostCKafkaFlowsResponse() err = c.Send(request, response) return } -func NewDescribeRuleLimitRequest() (request *DescribeRuleLimitRequest) { - request = &DescribeRuleLimitRequest{ +func NewDescribePostCLSFlowsRequest() (request *DescribePostCLSFlowsRequest) { + request = &DescribePostCLSFlowsRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("waf", APIVersion, "DescribeRuleLimit") + request.Init().WithApiInfo("waf", APIVersion, "DescribePostCLSFlows") return } -func NewDescribeRuleLimitResponse() (response *DescribeRuleLimitResponse) { - response = &DescribeRuleLimitResponse{ +func NewDescribePostCLSFlowsResponse() (response *DescribePostCLSFlowsResponse) { + response = &DescribePostCLSFlowsResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// DescribeRuleLimit -// 获取各个模块具体的规格限制 +// DescribePostCLSFlows +// 获取CLS投递流任务列表 // // 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CKAFKAINTERNALERROR = "FailedOperation.CKafkaInternalError" +// FAILEDOPERATION_CLSINTERNALERROR = "FailedOperation.CLSInternalError" // INTERNALERROR = "InternalError" -// INTERNALERROR_DBERR = "InternalError.DBErr" // INVALIDPARAMETER = "InvalidParameter" -func (c *Client) DescribeRuleLimit(request *DescribeRuleLimitRequest) (response *DescribeRuleLimitResponse, err error) { - return c.DescribeRuleLimitWithContext(context.Background(), request) +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribePostCLSFlows(request *DescribePostCLSFlowsRequest) (response *DescribePostCLSFlowsResponse, err error) { + return c.DescribePostCLSFlowsWithContext(context.Background(), request) } -// DescribeRuleLimit -// 获取各个模块具体的规格限制 +// DescribePostCLSFlows +// 获取CLS投递流任务列表 // // 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CKAFKAINTERNALERROR = "FailedOperation.CKafkaInternalError" +// FAILEDOPERATION_CLSINTERNALERROR = "FailedOperation.CLSInternalError" // INTERNALERROR = "InternalError" -// INTERNALERROR_DBERR = "InternalError.DBErr" // INVALIDPARAMETER = "InvalidParameter" -func (c *Client) DescribeRuleLimitWithContext(ctx context.Context, request *DescribeRuleLimitRequest) (response *DescribeRuleLimitResponse, err error) { +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribePostCLSFlowsWithContext(ctx context.Context, request *DescribePostCLSFlowsRequest) (response *DescribePostCLSFlowsResponse, err error) { if request == nil { - request = NewDescribeRuleLimitRequest() + request = NewDescribePostCLSFlowsRequest() } if c.GetCredential() == nil { - return nil, errors.New("DescribeRuleLimit require credential") + return nil, errors.New("DescribePostCLSFlows require credential") } request.SetContext(ctx) - response = NewDescribeRuleLimitResponse() + response = NewDescribePostCLSFlowsResponse() err = c.Send(request, response) return } -func NewDescribeScanIpRequest() (request *DescribeScanIpRequest) { - request = &DescribeScanIpRequest{ +func NewDescribeProtectionModesRequest() (request *DescribeProtectionModesRequest) { + request = &DescribeProtectionModesRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("waf", APIVersion, "DescribeScanIp") + request.Init().WithApiInfo("waf", APIVersion, "DescribeProtectionModes") + + + return +} + +func NewDescribeProtectionModesResponse() (response *DescribeProtectionModesResponse) { + response = &DescribeProtectionModesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeProtectionModes +// 查询Tiga引擎大类规则及其防护模式 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CKAFKAINTERNALERROR = "FailedOperation.CKafkaInternalError" +// FAILEDOPERATION_CLSINTERNALERROR = "FailedOperation.CLSInternalError" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeProtectionModes(request *DescribeProtectionModesRequest) (response *DescribeProtectionModesResponse, err error) { + return c.DescribeProtectionModesWithContext(context.Background(), request) +} + +// DescribeProtectionModes +// 查询Tiga引擎大类规则及其防护模式 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CKAFKAINTERNALERROR = "FailedOperation.CKafkaInternalError" +// FAILEDOPERATION_CLSINTERNALERROR = "FailedOperation.CLSInternalError" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeProtectionModesWithContext(ctx context.Context, request *DescribeProtectionModesRequest) (response *DescribeProtectionModesResponse, err error) { + if request == nil { + request = NewDescribeProtectionModesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeProtectionModes require credential") + } + + request.SetContext(ctx) + + response = NewDescribeProtectionModesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeRuleLimitRequest() (request *DescribeRuleLimitRequest) { + request = &DescribeRuleLimitRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "DescribeRuleLimit") + + + return +} + +func NewDescribeRuleLimitResponse() (response *DescribeRuleLimitResponse) { + response = &DescribeRuleLimitResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeRuleLimit +// 获取各个模块具体的规格限制 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBERR = "InternalError.DBErr" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeRuleLimit(request *DescribeRuleLimitRequest) (response *DescribeRuleLimitResponse, err error) { + return c.DescribeRuleLimitWithContext(context.Background(), request) +} + +// DescribeRuleLimit +// 获取各个模块具体的规格限制 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBERR = "InternalError.DBErr" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeRuleLimitWithContext(ctx context.Context, request *DescribeRuleLimitRequest) (response *DescribeRuleLimitResponse, err error) { + if request == nil { + request = NewDescribeRuleLimitRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeRuleLimit require credential") + } + + request.SetContext(ctx) + + response = NewDescribeRuleLimitResponse() + err = c.Send(request, response) + return +} + +func NewDescribeScanIpRequest() (request *DescribeScanIpRequest) { + request = &DescribeScanIpRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "DescribeScanIp") return @@ -5336,6 +6159,69 @@ func (c *Client) DescribeUserLevelWithContext(ctx context.Context, request *Desc return } +func NewDescribeUserSignatureClassRequest() (request *DescribeUserSignatureClassRequest) { + request = &DescribeUserSignatureClassRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "DescribeUserSignatureClass") + + + return +} + +func NewDescribeUserSignatureClassResponse() (response *DescribeUserSignatureClassResponse) { + response = &DescribeUserSignatureClassResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeUserSignatureClass +// 查询Tiga引擎规则类型及状态 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) DescribeUserSignatureClass(request *DescribeUserSignatureClassRequest) (response *DescribeUserSignatureClassResponse, err error) { + return c.DescribeUserSignatureClassWithContext(context.Background(), request) +} + +// DescribeUserSignatureClass +// 查询Tiga引擎规则类型及状态 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) DescribeUserSignatureClassWithContext(ctx context.Context, request *DescribeUserSignatureClassRequest) (response *DescribeUserSignatureClassResponse, err error) { + if request == nil { + request = NewDescribeUserSignatureClassRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeUserSignatureClass require credential") + } + + request.SetContext(ctx) + + response = NewDescribeUserSignatureClassResponse() + err = c.Send(request, response) + return +} + func NewDescribeUserSignatureRuleRequest() (request *DescribeUserSignatureRuleRequest) { request = &DescribeUserSignatureRuleRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -5423,6 +6309,93 @@ func (c *Client) DescribeUserSignatureRuleWithContext(ctx context.Context, reque return } +func NewDescribeUserSignatureRuleV2Request() (request *DescribeUserSignatureRuleV2Request) { + request = &DescribeUserSignatureRuleV2Request{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "DescribeUserSignatureRuleV2") + + + return +} + +func NewDescribeUserSignatureRuleV2Response() (response *DescribeUserSignatureRuleV2Response) { + response = &DescribeUserSignatureRuleV2Response{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeUserSignatureRuleV2 +// 获取用户特征规则列表 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// DRYRUNOPERATION = "DryRunOperation" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INVALIDCERTIFICATE = "InvalidParameter.InvalidCertificate" +// INVALIDPARAMETER_QUERYCERTBYSSLIDFAILED = "InvalidParameter.QueryCertBySSLIDFailed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeUserSignatureRuleV2(request *DescribeUserSignatureRuleV2Request) (response *DescribeUserSignatureRuleV2Response, err error) { + return c.DescribeUserSignatureRuleV2WithContext(context.Background(), request) +} + +// DescribeUserSignatureRuleV2 +// 获取用户特征规则列表 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// DRYRUNOPERATION = "DryRunOperation" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INVALIDCERTIFICATE = "InvalidParameter.InvalidCertificate" +// INVALIDPARAMETER_QUERYCERTBYSSLIDFAILED = "InvalidParameter.QueryCertBySSLIDFailed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeUserSignatureRuleV2WithContext(ctx context.Context, request *DescribeUserSignatureRuleV2Request) (response *DescribeUserSignatureRuleV2Response, err error) { + if request == nil { + request = NewDescribeUserSignatureRuleV2Request() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeUserSignatureRuleV2 require credential") + } + + request.SetContext(ctx) + + response = NewDescribeUserSignatureRuleV2Response() + err = c.Send(request, response) + return +} + func NewDescribeVipInfoRequest() (request *DescribeVipInfoRequest) { request = &DescribeVipInfoRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -5581,6 +6554,10 @@ func NewDescribeWafAutoDenyStatusResponse() (response *DescribeWafAutoDenyStatus } // DescribeWafAutoDenyStatus +// 废弃接口 +// +// +// // 描述WAF自动封禁模块详情 // // 可能返回的错误码: @@ -5591,6 +6568,10 @@ func (c *Client) DescribeWafAutoDenyStatus(request *DescribeWafAutoDenyStatusReq } // DescribeWafAutoDenyStatus +// 废弃接口 +// +// +// // 描述WAF自动封禁模块详情 // // 可能返回的错误码: @@ -5651,91 +6632,257 @@ func (c *Client) DescribeWafThreatenIntelligence(request *DescribeWafThreatenInt // INVALIDPARAMETER = "InvalidParameter" func (c *Client) DescribeWafThreatenIntelligenceWithContext(ctx context.Context, request *DescribeWafThreatenIntelligenceRequest) (response *DescribeWafThreatenIntelligenceResponse, err error) { if request == nil { - request = NewDescribeWafThreatenIntelligenceRequest() + request = NewDescribeWafThreatenIntelligenceRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeWafThreatenIntelligence require credential") + } + + request.SetContext(ctx) + + response = NewDescribeWafThreatenIntelligenceResponse() + err = c.Send(request, response) + return +} + +func NewDescribeWebshellStatusRequest() (request *DescribeWebshellStatusRequest) { + request = &DescribeWebshellStatusRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "DescribeWebshellStatus") + + + return +} + +func NewDescribeWebshellStatusResponse() (response *DescribeWebshellStatusResponse) { + response = &DescribeWebshellStatusResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeWebshellStatus +// 获取域名的webshell状态 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeWebshellStatus(request *DescribeWebshellStatusRequest) (response *DescribeWebshellStatusResponse, err error) { + return c.DescribeWebshellStatusWithContext(context.Background(), request) +} + +// DescribeWebshellStatus +// 获取域名的webshell状态 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeWebshellStatusWithContext(ctx context.Context, request *DescribeWebshellStatusRequest) (response *DescribeWebshellStatusResponse, err error) { + if request == nil { + request = NewDescribeWebshellStatusRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeWebshellStatus require credential") + } + + request.SetContext(ctx) + + response = NewDescribeWebshellStatusResponse() + err = c.Send(request, response) + return +} + +func NewDestroyPostCKafkaFlowRequest() (request *DestroyPostCKafkaFlowRequest) { + request = &DestroyPostCKafkaFlowRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "DestroyPostCKafkaFlow") + + + return +} + +func NewDestroyPostCKafkaFlowResponse() (response *DestroyPostCKafkaFlowResponse) { + response = &DestroyPostCKafkaFlowResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DestroyPostCKafkaFlow +// 销毁CKafka投递流任务 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CKAFKAINTERNALERROR = "FailedOperation.CKafkaInternalError" +// FAILEDOPERATION_CLSINTERNALERROR = "FailedOperation.CLSInternalError" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DestroyPostCKafkaFlow(request *DestroyPostCKafkaFlowRequest) (response *DestroyPostCKafkaFlowResponse, err error) { + return c.DestroyPostCKafkaFlowWithContext(context.Background(), request) +} + +// DestroyPostCKafkaFlow +// 销毁CKafka投递流任务 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CKAFKAINTERNALERROR = "FailedOperation.CKafkaInternalError" +// FAILEDOPERATION_CLSINTERNALERROR = "FailedOperation.CLSInternalError" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DestroyPostCKafkaFlowWithContext(ctx context.Context, request *DestroyPostCKafkaFlowRequest) (response *DestroyPostCKafkaFlowResponse, err error) { + if request == nil { + request = NewDestroyPostCKafkaFlowRequest() } if c.GetCredential() == nil { - return nil, errors.New("DescribeWafThreatenIntelligence require credential") + return nil, errors.New("DestroyPostCKafkaFlow require credential") } request.SetContext(ctx) - response = NewDescribeWafThreatenIntelligenceResponse() + response = NewDestroyPostCKafkaFlowResponse() err = c.Send(request, response) return } -func NewDescribeWebshellStatusRequest() (request *DescribeWebshellStatusRequest) { - request = &DescribeWebshellStatusRequest{ +func NewDestroyPostCLSFlowRequest() (request *DestroyPostCLSFlowRequest) { + request = &DestroyPostCLSFlowRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("waf", APIVersion, "DescribeWebshellStatus") + request.Init().WithApiInfo("waf", APIVersion, "DestroyPostCLSFlow") return } -func NewDescribeWebshellStatusResponse() (response *DescribeWebshellStatusResponse) { - response = &DescribeWebshellStatusResponse{ +func NewDestroyPostCLSFlowResponse() (response *DestroyPostCLSFlowResponse) { + response = &DestroyPostCLSFlowResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// DescribeWebshellStatus -// 获取域名的webshell状态 +// DestroyPostCLSFlow +// 销毁CLS投递流任务 // // 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" // FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CKAFKAINTERNALERROR = "FailedOperation.CKafkaInternalError" +// FAILEDOPERATION_CLSINTERNALERROR = "FailedOperation.CLSInternalError" // INTERNALERROR = "InternalError" // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETERVALUE = "InvalidParameterValue" // LIMITEXCEEDED = "LimitExceeded" // MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" // RESOURCEINUSE = "ResourceInUse" // RESOURCEINSUFFICIENT = "ResourceInsufficient" // RESOURCENOTFOUND = "ResourceNotFound" // RESOURCEUNAVAILABLE = "ResourceUnavailable" -// RESOURCESSOLDOUT = "ResourcesSoldOut" // UNAUTHORIZEDOPERATION = "UnauthorizedOperation" // UNKNOWNPARAMETER = "UnknownParameter" // UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeWebshellStatus(request *DescribeWebshellStatusRequest) (response *DescribeWebshellStatusResponse, err error) { - return c.DescribeWebshellStatusWithContext(context.Background(), request) +func (c *Client) DestroyPostCLSFlow(request *DestroyPostCLSFlowRequest) (response *DestroyPostCLSFlowResponse, err error) { + return c.DestroyPostCLSFlowWithContext(context.Background(), request) } -// DescribeWebshellStatus -// 获取域名的webshell状态 +// DestroyPostCLSFlow +// 销毁CLS投递流任务 // // 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" // FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CKAFKAINTERNALERROR = "FailedOperation.CKafkaInternalError" +// FAILEDOPERATION_CLSINTERNALERROR = "FailedOperation.CLSInternalError" // INTERNALERROR = "InternalError" // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETERVALUE = "InvalidParameterValue" // LIMITEXCEEDED = "LimitExceeded" // MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" // RESOURCEINUSE = "ResourceInUse" // RESOURCEINSUFFICIENT = "ResourceInsufficient" // RESOURCENOTFOUND = "ResourceNotFound" // RESOURCEUNAVAILABLE = "ResourceUnavailable" -// RESOURCESSOLDOUT = "ResourcesSoldOut" // UNAUTHORIZEDOPERATION = "UnauthorizedOperation" // UNKNOWNPARAMETER = "UnknownParameter" // UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeWebshellStatusWithContext(ctx context.Context, request *DescribeWebshellStatusRequest) (response *DescribeWebshellStatusResponse, err error) { +func (c *Client) DestroyPostCLSFlowWithContext(ctx context.Context, request *DestroyPostCLSFlowRequest) (response *DestroyPostCLSFlowResponse, err error) { if request == nil { - request = NewDescribeWebshellStatusRequest() + request = NewDestroyPostCLSFlowRequest() } if c.GetCredential() == nil { - return nil, errors.New("DescribeWebshellStatus require credential") + return nil, errors.New("DestroyPostCLSFlow require credential") } request.SetContext(ctx) - response = NewDescribeWebshellStatusResponse() + response = NewDestroyPostCLSFlowResponse() err = c.Send(request, response) return } @@ -6566,6 +7713,83 @@ func (c *Client) ModifyAreaBanAreasWithContext(ctx context.Context, request *Mod return } +func NewModifyAreaBanRuleRequest() (request *ModifyAreaBanRuleRequest) { + request = &ModifyAreaBanRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "ModifyAreaBanRule") + + + return +} + +func NewModifyAreaBanRuleResponse() (response *ModifyAreaBanRuleResponse) { + response = &ModifyAreaBanRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// ModifyAreaBanRule +// 添加(编辑)地域封禁中的地域信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBERR = "InternalError.DBErr" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyAreaBanRule(request *ModifyAreaBanRuleRequest) (response *ModifyAreaBanRuleResponse, err error) { + return c.ModifyAreaBanRuleWithContext(context.Background(), request) +} + +// ModifyAreaBanRule +// 添加(编辑)地域封禁中的地域信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBERR = "InternalError.DBErr" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyAreaBanRuleWithContext(ctx context.Context, request *ModifyAreaBanRuleRequest) (response *ModifyAreaBanRuleResponse, err error) { + if request == nil { + request = NewModifyAreaBanRuleRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyAreaBanRule require credential") + } + + request.SetContext(ctx) + + response = NewModifyAreaBanRuleResponse() + err = c.Send(request, response) + return +} + func NewModifyAreaBanStatusRequest() (request *ModifyAreaBanStatusRequest) { request = &ModifyAreaBanStatusRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -6704,6 +7928,112 @@ func (c *Client) ModifyAttackWhiteRuleWithContext(ctx context.Context, request * return } +func NewModifyBotSceneStatusRequest() (request *ModifyBotSceneStatusRequest) { + request = &ModifyBotSceneStatusRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "ModifyBotSceneStatus") + + + return +} + +func NewModifyBotSceneStatusResponse() (response *ModifyBotSceneStatusResponse) { + response = &ModifyBotSceneStatusResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// ModifyBotSceneStatus +// bot子场景开关 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER_BOTSCENENOTEXISTERR = "InvalidParameter.BotSceneNotExistErr" +// UNSUPPORTEDOPERATION_INVALIDREQUEST = "UnsupportedOperation.InvalidRequest" +func (c *Client) ModifyBotSceneStatus(request *ModifyBotSceneStatusRequest) (response *ModifyBotSceneStatusResponse, err error) { + return c.ModifyBotSceneStatusWithContext(context.Background(), request) +} + +// ModifyBotSceneStatus +// bot子场景开关 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER_BOTSCENENOTEXISTERR = "InvalidParameter.BotSceneNotExistErr" +// UNSUPPORTEDOPERATION_INVALIDREQUEST = "UnsupportedOperation.InvalidRequest" +func (c *Client) ModifyBotSceneStatusWithContext(ctx context.Context, request *ModifyBotSceneStatusRequest) (response *ModifyBotSceneStatusResponse, err error) { + if request == nil { + request = NewModifyBotSceneStatusRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyBotSceneStatus require credential") + } + + request.SetContext(ctx) + + response = NewModifyBotSceneStatusResponse() + err = c.Send(request, response) + return +} + +func NewModifyBotSceneUCBRuleRequest() (request *ModifyBotSceneUCBRuleRequest) { + request = &ModifyBotSceneUCBRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "ModifyBotSceneUCBRule") + + + return +} + +func NewModifyBotSceneUCBRuleResponse() (response *ModifyBotSceneUCBRuleResponse) { + response = &ModifyBotSceneUCBRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// ModifyBotSceneUCBRule +// 【接口复用】场景化后更新Bot的UCB自定义规则,两个调用位置:1.BOT全局白名单 2.BOT场景配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER_BOTNAMEREPEATERR = "InvalidParameter.BotNameRepeatErr" +func (c *Client) ModifyBotSceneUCBRule(request *ModifyBotSceneUCBRuleRequest) (response *ModifyBotSceneUCBRuleResponse, err error) { + return c.ModifyBotSceneUCBRuleWithContext(context.Background(), request) +} + +// ModifyBotSceneUCBRule +// 【接口复用】场景化后更新Bot的UCB自定义规则,两个调用位置:1.BOT全局白名单 2.BOT场景配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER_BOTNAMEREPEATERR = "InvalidParameter.BotNameRepeatErr" +func (c *Client) ModifyBotSceneUCBRuleWithContext(ctx context.Context, request *ModifyBotSceneUCBRuleRequest) (response *ModifyBotSceneUCBRuleResponse, err error) { + if request == nil { + request = NewModifyBotSceneUCBRuleRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyBotSceneUCBRule require credential") + } + + request.SetContext(ctx) + + response = NewModifyBotSceneUCBRuleResponse() + err = c.Send(request, response) + return +} + func NewModifyBotStatusRequest() (request *ModifyBotStatusRequest) { request = &ModifyBotStatusRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -6785,6 +8115,8 @@ func NewModifyCustomRuleResponse() (response *ModifyCustomRuleResponse) { // INTERNALERROR_DBERR = "InternalError.DBErr" // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CELLENGTHEXCEEDLIMIT = "InvalidParameterValue.CELLengthExceedLimit" +// INVALIDPARAMETERVALUE_CELSYNTAXERR = "InvalidParameterValue.CELSyntaxErr" // LIMITEXCEEDED = "LimitExceeded" // MISSINGPARAMETER = "MissingParameter" // RESOURCEINUSE = "ResourceInUse" @@ -6808,6 +8140,8 @@ func (c *Client) ModifyCustomRule(request *ModifyCustomRuleRequest) (response *M // INTERNALERROR_DBERR = "InternalError.DBErr" // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CELLENGTHEXCEEDLIMIT = "InvalidParameterValue.CELLengthExceedLimit" +// INVALIDPARAMETERVALUE_CELSYNTAXERR = "InvalidParameterValue.CELSyntaxErr" // LIMITEXCEEDED = "LimitExceeded" // MISSINGPARAMETER = "MissingParameter" // RESOURCEINUSE = "ResourceInUse" @@ -8181,7 +9515,7 @@ func NewModifyProtectionStatusResponse() (response *ModifyProtectionStatusRespon } // ModifyProtectionStatus -// 获取基础安全防护(WAF开关)状态 +// 开启、关闭WAF开关 // // 可能返回的错误码: // INTERNALERROR = "InternalError" @@ -8193,7 +9527,7 @@ func (c *Client) ModifyProtectionStatus(request *ModifyProtectionStatusRequest) } // ModifyProtectionStatus -// 获取基础安全防护(WAF开关)状态 +// 开启、关闭WAF开关 // // 可能返回的错误码: // INTERNALERROR = "InternalError" @@ -8447,6 +9781,69 @@ func (c *Client) ModifyUserLevelWithContext(ctx context.Context, request *Modify return } +func NewModifyUserSignatureClassRequest() (request *ModifyUserSignatureClassRequest) { + request = &ModifyUserSignatureClassRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "ModifyUserSignatureClass") + + + return +} + +func NewModifyUserSignatureClassResponse() (response *ModifyUserSignatureClassResponse) { + response = &ModifyUserSignatureClassResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// ModifyUserSignatureClass +// 切换Tiga引擎规则类型的生效开关 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) ModifyUserSignatureClass(request *ModifyUserSignatureClassRequest) (response *ModifyUserSignatureClassResponse, err error) { + return c.ModifyUserSignatureClassWithContext(context.Background(), request) +} + +// ModifyUserSignatureClass +// 切换Tiga引擎规则类型的生效开关 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) ModifyUserSignatureClassWithContext(ctx context.Context, request *ModifyUserSignatureClassRequest) (response *ModifyUserSignatureClassResponse, err error) { + if request == nil { + request = NewModifyUserSignatureClassRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyUserSignatureClass require credential") + } + + request.SetContext(ctx) + + response = NewModifyUserSignatureClassResponse() + err = c.Send(request, response) + return +} + func NewModifyUserSignatureRuleRequest() (request *ModifyUserSignatureRuleRequest) { request = &ModifyUserSignatureRuleRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -9150,6 +10547,61 @@ func (c *Client) SwitchElasticModeWithContext(ctx context.Context, request *Swit return } +func NewUpdateProtectionModesRequest() (request *UpdateProtectionModesRequest) { + request = &UpdateProtectionModesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("waf", APIVersion, "UpdateProtectionModes") + + + return +} + +func NewUpdateProtectionModesResponse() (response *UpdateProtectionModesResponse) { + response = &UpdateProtectionModesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// UpdateProtectionModes +// 更新Tiga引擎下大类规则的防护模式 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) UpdateProtectionModes(request *UpdateProtectionModesRequest) (response *UpdateProtectionModesResponse, err error) { + return c.UpdateProtectionModesWithContext(context.Background(), request) +} + +// UpdateProtectionModes +// 更新Tiga引擎下大类规则的防护模式 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) UpdateProtectionModesWithContext(ctx context.Context, request *UpdateProtectionModesRequest) (response *UpdateProtectionModesResponse, err error) { + if request == nil { + request = NewUpdateProtectionModesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("UpdateProtectionModes require credential") + } + + request.SetContext(ctx) + + response = NewUpdateProtectionModesResponse() + err = c.Send(request, response) + return +} + func NewUpsertCCAutoStatusRequest() (request *UpsertCCAutoStatusRequest) { request = &UpsertCCAutoStatusRequest{ BaseRequest: &tchttp.BaseRequest{}, diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf/v20180125/errors.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf/v20180125/errors.go index 670590051a..955cfb0520 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf/v20180125/errors.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf/v20180125/errors.go @@ -74,6 +74,12 @@ const ( // 参数错误。 INVALIDPARAMETER = "InvalidParameter" + // 命名重复 + INVALIDPARAMETER_BOTNAMEREPEATERR = "InvalidParameter.BotNameRepeatErr" + + // Bot场景不存在 + INVALIDPARAMETER_BOTSCENENOTEXISTERR = "InvalidParameter.BotSceneNotExistErr" + // 证书信息参数错误 INVALIDPARAMETER_CERTIFICATIONPARAMETERERR = "InvalidParameter.CertificationParameterErr" @@ -128,6 +134,12 @@ const ( // 参数取值错误。 INVALIDPARAMETERVALUE = "InvalidParameterValue" + // 自定义规则CEL逻辑表达式长度超过10240字符 + INVALIDPARAMETERVALUE_CELLENGTHEXCEEDLIMIT = "InvalidParameterValue.CELLengthExceedLimit" + + // 自定义规则CEL逻辑表达式语法错误 + INVALIDPARAMETERVALUE_CELSYNTAXERR = "InvalidParameterValue.CELSyntaxErr" + // InvalidRequest INVALIDPARAMETERVALUE_INVALIDREQUEST = "InvalidParameterValue.InvalidRequest" @@ -176,6 +188,9 @@ const ( // 操作不支持。 UNSUPPORTEDOPERATION = "UnsupportedOperation" + // Bot套餐未购买 + UNSUPPORTEDOPERATION_BOTSERVICENOTSUBSCRIBEERR = "UnsupportedOperation.BotServiceNotSubscribeErr" + // InvalidRequest UNSUPPORTEDOPERATION_INVALIDREQUEST = "UnsupportedOperation.InvalidRequest" ) diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf/v20180125/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf/v20180125/models.go index 2911ea957b..73004719c9 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf/v20180125/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf/v20180125/models.go @@ -530,6 +530,8 @@ type AddCustomRuleRequestParams struct { Edition *string `json:"Edition,omitnil,omitempty" name:"Edition"` // 放行时是否继续执行其它检查逻辑,继续执行地域封禁防护:geoip、继续执行CC策略防护:cc、继续执行WEB应用防护:owasp、继续执行AI引擎防护:ai、继续执行信息防泄漏防护:antileakage。如果多个勾选那么以,串接。默认是"geoip,cc,owasp,ai,antileakage" + // + // Deprecated: Bypass is deprecated. Bypass *string `json:"Bypass,omitnil,omitempty" name:"Bypass"` // 添加规则的来源,默认为空 @@ -552,6 +554,9 @@ type AddCustomRuleRequestParams struct { // 拦截页面id PageId *string `json:"PageId,omitnil,omitempty" name:"PageId"` + + // 匹配条件的逻辑关系,支持and、or,分别表示多个逻辑匹配条件是与、或的关系 + LogicalOp *string `json:"LogicalOp,omitnil,omitempty" name:"LogicalOp"` } type AddCustomRuleRequest struct { @@ -604,6 +609,9 @@ type AddCustomRuleRequest struct { // 拦截页面id PageId *string `json:"PageId,omitnil,omitempty" name:"PageId"` + + // 匹配条件的逻辑关系,支持and、or,分别表示多个逻辑匹配条件是与、或的关系 + LogicalOp *string `json:"LogicalOp,omitnil,omitempty" name:"LogicalOp"` } func (r *AddCustomRuleRequest) ToJsonString() string { @@ -634,6 +642,7 @@ func (r *AddCustomRuleRequest) FromJsonString(s string) error { delete(f, "Label") delete(f, "Status") delete(f, "PageId") + delete(f, "LogicalOp") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddCustomRuleRequest has unknown keys!", "") } @@ -676,18 +685,18 @@ type AddCustomWhiteRuleRequestParams struct { // 优先级 SortId *string `json:"SortId,omitnil,omitempty" name:"SortId"` - // 过期时间 - ExpireTime *string `json:"ExpireTime,omitnil,omitempty" name:"ExpireTime"` - // 策略详情 Strategies []*Strategy `json:"Strategies,omitnil,omitempty" name:"Strategies"` // 需要添加策略的域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` - // 放行的详情 + // 放行的模块,多个模块之间用逗号连接。支持的模块:acl(自定义规则)、owasp(规则引擎)、webshell(恶意文件检测)、geoip(地域封禁)、bwip(IP黑白名单)、cc、botrpc(BOT防护)、antileakage(信息防泄露)、api(API安全)、ai(AI引擎)、ip_auto_deny(IP封禁)、applet(小程序流量风控) Bypass *string `json:"Bypass,omitnil,omitempty" name:"Bypass"` + // 如果没有设置JobDateTime字段则用此字段,0表示永久生效,其它表示定时生效的截止时间(单位为秒) + ExpireTime *string `json:"ExpireTime,omitnil,omitempty" name:"ExpireTime"` + // 规则执行的方式,TimedJob为定时执行,CronJob为周期执行 JobType *string `json:"JobType,omitnil,omitempty" name:"JobType"` @@ -704,18 +713,18 @@ type AddCustomWhiteRuleRequest struct { // 优先级 SortId *string `json:"SortId,omitnil,omitempty" name:"SortId"` - // 过期时间 - ExpireTime *string `json:"ExpireTime,omitnil,omitempty" name:"ExpireTime"` - // 策略详情 Strategies []*Strategy `json:"Strategies,omitnil,omitempty" name:"Strategies"` // 需要添加策略的域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` - // 放行的详情 + // 放行的模块,多个模块之间用逗号连接。支持的模块:acl(自定义规则)、owasp(规则引擎)、webshell(恶意文件检测)、geoip(地域封禁)、bwip(IP黑白名单)、cc、botrpc(BOT防护)、antileakage(信息防泄露)、api(API安全)、ai(AI引擎)、ip_auto_deny(IP封禁)、applet(小程序流量风控) Bypass *string `json:"Bypass,omitnil,omitempty" name:"Bypass"` + // 如果没有设置JobDateTime字段则用此字段,0表示永久生效,其它表示定时生效的截止时间(单位为秒) + ExpireTime *string `json:"ExpireTime,omitnil,omitempty" name:"ExpireTime"` + // 规则执行的方式,TimedJob为定时执行,CronJob为周期执行 JobType *string `json:"JobType,omitnil,omitempty" name:"JobType"` @@ -737,10 +746,10 @@ func (r *AddCustomWhiteRuleRequest) FromJsonString(s string) error { } delete(f, "Name") delete(f, "SortId") - delete(f, "ExpireTime") delete(f, "Strategies") delete(f, "Domain") delete(f, "Bypass") + delete(f, "ExpireTime") delete(f, "JobType") delete(f, "JobDateTime") if len(f) > 0 { @@ -1038,6 +1047,12 @@ type AddSpartaProtectionRequestParams struct { // GmCertType为2时,需要填充此参数,表示腾讯云SSL平台托管的证书id GmSSLId *string `json:"GmSSLId,omitnil,omitempty" name:"GmSSLId"` + + // 回源策略,支持负载均衡回源和分流回源两种方式。0:默认值,负载均衡回源;1:分流回源 + UpstreamPolicy *int64 `json:"UpstreamPolicy,omitnil,omitempty" name:"UpstreamPolicy"` + + // 分流回源时生效,分流回源的规则。 + UpstreamRules []*UpstreamRule `json:"UpstreamRules,omitnil,omitempty" name:"UpstreamRules"` } type AddSpartaProtectionRequest struct { @@ -1217,6 +1232,12 @@ type AddSpartaProtectionRequest struct { // GmCertType为2时,需要填充此参数,表示腾讯云SSL平台托管的证书id GmSSLId *string `json:"GmSSLId,omitnil,omitempty" name:"GmSSLId"` + + // 回源策略,支持负载均衡回源和分流回源两种方式。0:默认值,负载均衡回源;1:分流回源 + UpstreamPolicy *int64 `json:"UpstreamPolicy,omitnil,omitempty" name:"UpstreamPolicy"` + + // 分流回源时生效,分流回源的规则。 + UpstreamRules []*UpstreamRule `json:"UpstreamRules,omitnil,omitempty" name:"UpstreamRules"` } func (r *AddSpartaProtectionRequest) ToJsonString() string { @@ -1276,6 +1297,8 @@ func (r *AddSpartaProtectionRequest) FromJsonString(s string) error { delete(f, "GmEncCert") delete(f, "GmEncPrivateKey") delete(f, "GmSSLId") + delete(f, "UpstreamPolicy") + delete(f, "UpstreamRules") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddSpartaProtectionRequest has unknown keys!", "") } @@ -1448,6 +1471,40 @@ type ApiSecKey struct { Method *string `json:"Method,omitnil,omitempty" name:"Method"` } +type Area struct { + // 国家,除了标准的国家外还支持国内、国外这两个特殊的标识 + Country *string `json:"Country,omitnil,omitempty" name:"Country"` + + // 省份 + Region *string `json:"Region,omitnil,omitempty" name:"Region"` + + // 城市 + City *string `json:"City,omitnil,omitempty" name:"City"` +} + +type AreaBanRule struct { + // 状态 0:未开启地域封禁、1:开启地域封禁 + Status *int64 `json:"Status,omitnil,omitempty" name:"Status"` + + // 数据来源 custom:自定义(默认)、batch:批量防护 + Source *string `json:"Source,omitnil,omitempty" name:"Source"` + + // 配置的地域列表 + Areas []*Area `json:"Areas,omitnil,omitempty" name:"Areas"` + + // 规则执行的方式,TimedJob为定时执行,CronJob为周期执行 + JobType *string `json:"JobType,omitnil,omitempty" name:"JobType"` + + // 定时任务配置 + JobDateTime *JobDateTime `json:"JobDateTime,omitnil,omitempty" name:"JobDateTime"` + + // 如果是周期任务类型,那么表示周期的类型,支持 Week:按周、Month:按月 + CronType *string `json:"CronType,omitnil,omitempty" name:"CronType"` + + // 地域信息的语言,支持cn、en,默认为中文cn + Lang *string `json:"Lang,omitnil,omitempty" name:"Lang"` +} + type AttackLogInfo struct { // 攻击日志的详情内容 Content *string `json:"Content,omitnil,omitempty" name:"Content"` @@ -1492,18 +1549,22 @@ type BatchIpAccessControlData struct { type BatchIpAccessControlItem struct { // mongo表自增Id + // + // Deprecated: Id is deprecated. Id *string `json:"Id,omitnil,omitempty" name:"Id"` // 黑名单42或白名单40 ActionType *int64 `json:"ActionType,omitnil,omitempty" name:"ActionType"` // 黑白名单的IP + // + // Deprecated: Ip is deprecated. Ip *string `json:"Ip,omitnil,omitempty" name:"Ip"` // 备注 Note *string `json:"Note,omitnil,omitempty" name:"Note"` - // 添加路径 + // batch为批量域名,batch-group为防护对象组 Source *string `json:"Source,omitnil,omitempty" name:"Source"` // 修改时间 @@ -1535,6 +1596,118 @@ type BatchIpAccessControlItem struct { // 生效状态 ValidStatus *int64 `json:"ValidStatus,omitnil,omitempty" name:"ValidStatus"` + + // 防护对象组ID列表,如果绑定的是防护对象组 + GroupIds []*uint64 `json:"GroupIds,omitnil,omitempty" name:"GroupIds"` +} + +// Predefined struct for user +type BatchOperateUserSignatureRulesRequestParams struct { + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 0:关闭,1:开启,2:仅观察 + Status *string `json:"Status,omitnil,omitempty" name:"Status"` + + // 如果SelectedAll为true,则表示反选的规则,否则表示手动选择的规则ID + RuleIds []*string `json:"RuleIds,omitnil,omitempty" name:"RuleIds"` + + // 仅观察原因 + Reason *int64 `json:"Reason,omitnil,omitempty" name:"Reason"` + + // 是否全选 + SelectedAll *bool `json:"SelectedAll,omitnil,omitempty" name:"SelectedAll"` + + // 过滤 + Filters []*FiltersItemNew `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +type BatchOperateUserSignatureRulesRequest struct { + *tchttp.BaseRequest + + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 0:关闭,1:开启,2:仅观察 + Status *string `json:"Status,omitnil,omitempty" name:"Status"` + + // 如果SelectedAll为true,则表示反选的规则,否则表示手动选择的规则ID + RuleIds []*string `json:"RuleIds,omitnil,omitempty" name:"RuleIds"` + + // 仅观察原因 + Reason *int64 `json:"Reason,omitnil,omitempty" name:"Reason"` + + // 是否全选 + SelectedAll *bool `json:"SelectedAll,omitnil,omitempty" name:"SelectedAll"` + + // 过滤 + Filters []*FiltersItemNew `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +func (r *BatchOperateUserSignatureRulesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *BatchOperateUserSignatureRulesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Domain") + delete(f, "Status") + delete(f, "RuleIds") + delete(f, "Reason") + delete(f, "SelectedAll") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "BatchOperateUserSignatureRulesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type BatchOperateUserSignatureRulesResponseParams struct { + // 操作结果 + CommonRsp *CommonRspData `json:"CommonRsp,omitnil,omitempty" name:"CommonRsp"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type BatchOperateUserSignatureRulesResponse struct { + *tchttp.BaseResponse + Response *BatchOperateUserSignatureRulesResponseParams `json:"Response"` +} + +func (r *BatchOperateUserSignatureRulesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *BatchOperateUserSignatureRulesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type BotActionScopeRuleEntry struct { + // 参数 + Key *string `json:"Key,omitnil,omitempty" name:"Key"` + + // 匹配符 + Op *string `json:"Op,omitnil,omitempty" name:"Op"` + + // 参数值 + Value *string `json:"Value,omitnil,omitempty" name:"Value"` + + // 对于头部字段匹配value的时候指定的头部名 + Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // 470后使用此字段存储多值 + ValueArray []*string `json:"ValueArray,omitnil,omitempty" name:"ValueArray"` } type BotPkg struct { @@ -1595,6 +1768,173 @@ type BotQPS struct { RenewFlag *uint64 `json:"RenewFlag,omitnil,omitempty" name:"RenewFlag"` } +type BotSceneActionRule struct { + // 动作策略ID + RuleId *string `json:"RuleId,omitnil,omitempty" name:"RuleId"` + + // 动作策略名称 + RuleName *string `json:"RuleName,omitnil,omitempty" name:"RuleName"` + + // 策略优先级 + Priority *int64 `json:"Priority,omitnil,omitempty" name:"Priority"` + + // 策略生效状态 + Status *bool `json:"Status,omitnil,omitempty" name:"Status"` + + // 分数范围 + Score []*BotScoreRuleEntry `json:"Score,omitnil,omitempty" name:"Score"` + + // 100-宽松、200-中等、300-严格、0-自定义 + Level *string `json:"Level,omitnil,omitempty" name:"Level"` + + // 生效范围,为空表示全部范围 + Scope []*BotActionScopeRuleEntry `json:"Scope,omitnil,omitempty" name:"Scope"` + + // default:默认创建 custom:自定义创建 + Type *string `json:"Type,omitnil,omitempty" name:"Type"` + + // 匹配范围类型:全局匹配 or 自定义匹配范围 + ScopeType *string `json:"ScopeType,omitnil,omitempty" name:"ScopeType"` + + // 匹配条件间的与或关系 + ActionMatchType *string `json:"ActionMatchType,omitnil,omitempty" name:"ActionMatchType"` +} + +type BotSceneInfo struct { + // 场景ID + SceneId *string `json:"SceneId,omitnil,omitempty" name:"SceneId"` + + // 场景类型,default:默认场景,custom:非默认场景 + Type *string `json:"Type,omitnil,omitempty" name:"Type"` + + // 场景名 + SceneName *string `json:"SceneName,omitnil,omitempty" name:"SceneName"` + + // 更新时间 + UpdateTime *int64 `json:"UpdateTime,omitnil,omitempty" name:"UpdateTime"` + + // 场景模板类型,登录: login 秒杀:seckill 爬内容:crawl 自定义: custom + BusinessType []*string `json:"BusinessType,omitnil,omitempty" name:"BusinessType"` + + // 客户端类型,浏览器/H5 : browser 小程序: miniApp App: + ClientType []*string `json:"ClientType,omitnil,omitempty" name:"ClientType"` + + // 优先级 + Priority *int64 `json:"Priority,omitnil,omitempty" name:"Priority"` + + // 匹配范围 + MatchCondition []*BotSceneMatchCondition `json:"MatchCondition,omitnil,omitempty" name:"MatchCondition"` + + // 场景开关 + SceneStatus *bool `json:"SceneStatus,omitnil,omitempty" name:"SceneStatus"` + + // 前端对抗开关 + JsInjectStatus *bool `json:"JsInjectStatus,omitnil,omitempty" name:"JsInjectStatus"` + + // AI开关 + AIStatus *bool `json:"AIStatus,omitnil,omitempty" name:"AIStatus"` + + // TI开关 + TIStatus *bool `json:"TIStatus,omitnil,omitempty" name:"TIStatus"` + + // 智能统计开关 + StatisticStatus *bool `json:"StatisticStatus,omitnil,omitempty" name:"StatisticStatus"` + + // 动作策略数量 + ActionRuleCount *int64 `json:"ActionRuleCount,omitnil,omitempty" name:"ActionRuleCount"` + + // 自定义规则数量 + UCBCount *int64 `json:"UCBCount,omitnil,omitempty" name:"UCBCount"` + + // 场景的匹配范围,global-全部匹配 custom-自定义匹配范围 + MatchType *string `json:"MatchType,omitnil,omitempty" name:"MatchType"` + + // 匹配条件间的与或关系 + ActionMatchType *string `json:"ActionMatchType,omitnil,omitempty" name:"ActionMatchType"` + + // UA模块开关 + UAStatus *bool `json:"UAStatus,omitnil,omitempty" name:"UAStatus"` + + // 简易模式场景:前端对抗对应mysql的记录id + JsInjectRuleId *int64 `json:"JsInjectRuleId,omitnil,omitempty" name:"JsInjectRuleId"` + + // 简易模式场景:前端对抗配置动作 + JsInjectAction *int64 `json:"JsInjectAction,omitnil,omitempty" name:"JsInjectAction"` + + // 简易模式场景:前端对抗重定向路径 + JsInjectRedirect *string `json:"JsInjectRedirect,omitnil,omitempty" name:"JsInjectRedirect"` + + // 简易模式场景:动作策略信息 PS:简易模式只有一个动作策略 + ActionRuleList []*BotSceneActionRule `json:"ActionRuleList,omitnil,omitempty" name:"ActionRuleList"` + + // 简易模式场景:monitor-观察 intercept-拦截 custom-自定义 + BotIdPattern *string `json:"BotIdPattern,omitnil,omitempty" name:"BotIdPattern"` + + // 简易模式场景:bot_id规则总数 + BotIdCount *int64 `json:"BotIdCount,omitnil,omitempty" name:"BotIdCount"` + + // 简易模式场景:观察动作的规则总数 + BotIdMonitorCount *int64 `json:"BotIdMonitorCount,omitnil,omitempty" name:"BotIdMonitorCount"` + + // 简易模式场景:拦截动作的规则总数 + BotIdInterceptCount *int64 `json:"BotIdInterceptCount,omitnil,omitempty" name:"BotIdInterceptCount"` + + // 创建场景时选择的规则集 + RuleSetSelection []*string `json:"RuleSetSelection,omitnil,omitempty" name:"RuleSetSelection"` + + // 改场景的bot token列表 + TokenList []*BotToken `json:"TokenList,omitnil,omitempty" name:"TokenList"` + + // 简易模式场景:重定向动作的规则总数 + BotIdRedirectCount *int64 `json:"BotIdRedirectCount,omitnil,omitempty" name:"BotIdRedirectCount"` + + // 简易模式场景:人机识别动作的规则总数 + BotIdCaptchaCount *int64 `json:"BotIdCaptchaCount,omitnil,omitempty" name:"BotIdCaptchaCount"` + + // 简易模式场景:防护等级 + BotIdProtectLevel *string `json:"BotIdProtectLevel,omitnil,omitempty" name:"BotIdProtectLevel"` + + // 简易模式场景:全局重定向路径 + BotIdGlobalRedirect *string `json:"BotIdGlobalRedirect,omitnil,omitempty" name:"BotIdGlobalRedirect"` + + // 简易模式场景:JS校验动作的规则总数 + BotIdJsChallengeCount *int64 `json:"BotIdJsChallengeCount,omitnil,omitempty" name:"BotIdJsChallengeCount"` +} + +type BotSceneMatchCondition struct { + // 匹配参数 + Key *string `json:"Key,omitnil,omitempty" name:"Key"` + + // 匹配符 + Op *string `json:"Op,omitnil,omitempty" name:"Op"` + + // 匹配值 + Value *string `json:"Value,omitnil,omitempty" name:"Value"` + + // 对于头部字段匹配value的时候指定的头部名 + Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // 470后使用此入参存在多值 + ValueArray []*string `json:"ValueArray,omitnil,omitempty" name:"ValueArray"` +} + +type BotScoreRuleEntry struct { + // 分数区间上限 + Upper *string `json:"Upper,omitnil,omitempty" name:"Upper"` + + // 分数区间下限 + Lower *string `json:"Lower,omitnil,omitempty" name:"Lower"` + + // 处置动作 + Action *string `json:"Action,omitnil,omitempty" name:"Action"` + + // 流量标签 + Label *string `json:"Label,omitnil,omitempty" name:"Label"` + + // 重定向 + Redirect *string `json:"Redirect,omitnil,omitempty" name:"Redirect"` +} + type BotStatPointItem struct { // 横坐标 TimeStamp *string `json:"TimeStamp,omitnil,omitempty" name:"TimeStamp"` @@ -1609,6 +1949,38 @@ type BotStatPointItem struct { Label *string `json:"Label,omitnil,omitempty" name:"Label"` } +type BotToken struct { + // 会话名称 + Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // 会话描述 + Description *string `json:"Description,omitnil,omitempty" name:"Description"` + + // 会话id + Id *string `json:"Id,omitnil,omitempty" name:"Id"` + + // 策略的开关状态 + Status *bool `json:"Status,omitnil,omitempty" name:"Status"` + + // 会话位置 + Location *string `json:"Location,omitnil,omitempty" name:"Location"` + + // 会话key + Key *string `json:"Key,omitnil,omitempty" name:"Key"` + + // 会话匹配方式,前缀匹配、后缀匹配等 + Operator *string `json:"Operator,omitnil,omitempty" name:"Operator"` + + // 会话更新的时间戳 + Timestamp *int64 `json:"Timestamp,omitnil,omitempty" name:"Timestamp"` + + // 场景列表,内容为空表示全部场景应用 + Scene []*string `json:"Scene,omitnil,omitempty" name:"Scene"` + + // 优先级 + Priority *int64 `json:"Priority,omitnil,omitempty" name:"Priority"` +} + type CCRuleData struct { // cc规则 Res []*CCRuleItem `json:"Res,omitnil,omitempty" name:"Res"` @@ -1902,6 +2274,14 @@ type ClbWafRegionItem struct { Code *string `json:"Code,omitnil,omitempty" name:"Code"` } +type CommonRspData struct { + // 操作结果 + Code *int64 `json:"Code,omitnil,omitempty" name:"Code"` + + // 输出信息 + Msg *string `json:"Msg,omitnil,omitempty" name:"Msg"` +} + // Predefined struct for user type CreateAccessExportRequestParams struct { // 客户要查询的日志主题ID,每个客户都有对应的一个主题 @@ -2001,39 +2381,121 @@ func (r *CreateAccessExportResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } -type CreateDealsGoods struct { - // 商品数量 - GoodsNum *int64 `json:"GoodsNum,omitnil,omitempty" name:"GoodsNum"` +// Predefined struct for user +type CreateAreaBanRuleRequestParams struct { + // 需要修改的域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` - // 商品明细 - GoodsDetail *CreateDealsGoodsDetail `json:"GoodsDetail,omitnil,omitempty" name:"GoodsDetail"` + // 需要新增的封禁地域 + Areas []*Area `json:"Areas,omitnil,omitempty" name:"Areas"` - // 订单类型ID,用来唯一标识一个业务的一种场景(总共三种场景:新购、配置变更、续费) - // 高级版: 102375(新购),102376(续费),102377(变配) - // 企业版 : 102378(新购),102379(续费),102380(变配) - // 旗舰版 : 102369(新购),102370(续费),102371(变配) - // 域名包 : 102372(新购),102373(续费),102374(变配) - // 业务扩展包 : 101040(新购),101041(续费),101042(变配) - // - // 高级版-CLB: 新购 101198 续费 101199 变配 101200 - // 企业版-CLB 101204(新购),101205(续费),101206(变配) - // 旗舰版-CLB : 101201(新购),101202(续费),101203(变配) - // 域名包-CLB: 101207(新购),101208(续费),101209(变配) - // 业务扩展包-CLB: 101210(新购),101211(续费),101212(变配) - GoodsCategoryId *int64 `json:"GoodsCategoryId,omitnil,omitempty" name:"GoodsCategoryId"` + // 规则执行的方式,TimedJob为定时执行,CronJob为周期执行 + JobType *string `json:"JobType,omitnil,omitempty" name:"JobType"` - // 购买waf实例区域ID - // 1 表示购买大陆资源; - // 9表示购买非中国大陆资源 - RegionId *int64 `json:"RegionId,omitnil,omitempty" name:"RegionId"` + // 定时任务配置 + JobDateTime *JobDateTime `json:"JobDateTime,omitnil,omitempty" name:"JobDateTime"` + + // 地域信息的语言,支持cn、en,默认为中文cn + Lang *string `json:"Lang,omitnil,omitempty" name:"Lang"` } -type CreateDealsGoodsDetail struct { - // 时间间隔 - TimeSpan *int64 `json:"TimeSpan,omitnil,omitempty" name:"TimeSpan"` +type CreateAreaBanRuleRequest struct { + *tchttp.BaseRequest + + // 需要修改的域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` - // 单位,支持购买d、m、y 即(日、月、年) - TimeUnit *string `json:"TimeUnit,omitnil,omitempty" name:"TimeUnit"` + // 需要新增的封禁地域 + Areas []*Area `json:"Areas,omitnil,omitempty" name:"Areas"` + + // 规则执行的方式,TimedJob为定时执行,CronJob为周期执行 + JobType *string `json:"JobType,omitnil,omitempty" name:"JobType"` + + // 定时任务配置 + JobDateTime *JobDateTime `json:"JobDateTime,omitnil,omitempty" name:"JobDateTime"` + + // 地域信息的语言,支持cn、en,默认为中文cn + Lang *string `json:"Lang,omitnil,omitempty" name:"Lang"` +} + +func (r *CreateAreaBanRuleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateAreaBanRuleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Domain") + delete(f, "Areas") + delete(f, "JobType") + delete(f, "JobDateTime") + delete(f, "Lang") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateAreaBanRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateAreaBanRuleResponseParams struct { + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type CreateAreaBanRuleResponse struct { + *tchttp.BaseResponse + Response *CreateAreaBanRuleResponseParams `json:"Response"` +} + +func (r *CreateAreaBanRuleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateAreaBanRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateDealsGoods struct { + // 商品数量 + GoodsNum *int64 `json:"GoodsNum,omitnil,omitempty" name:"GoodsNum"` + + // 商品明细 + GoodsDetail *CreateDealsGoodsDetail `json:"GoodsDetail,omitnil,omitempty" name:"GoodsDetail"` + + // 订单类型ID,用来唯一标识一个业务的一种场景(总共三种场景:新购、配置变更、续费) + // 高级版: 102375(新购),102376(续费),102377(变配) + // 企业版 : 102378(新购),102379(续费),102380(变配) + // 旗舰版 : 102369(新购),102370(续费),102371(变配) + // 域名包 : 102372(新购),102373(续费),102374(变配) + // 业务扩展包 : 101040(新购),101041(续费),101042(变配) + // + // 高级版-CLB: 新购 101198 续费 101199 变配 101200 + // 企业版-CLB 101204(新购),101205(续费),101206(变配) + // 旗舰版-CLB : 101201(新购),101202(续费),101203(变配) + // 域名包-CLB: 101207(新购),101208(续费),101209(变配) + // 业务扩展包-CLB: 101210(新购),101211(续费),101212(变配) + GoodsCategoryId *int64 `json:"GoodsCategoryId,omitnil,omitempty" name:"GoodsCategoryId"` + + // 购买waf实例区域ID + // 1 表示购买大陆资源; + // 9表示购买非中国大陆资源 + RegionId *int64 `json:"RegionId,omitnil,omitempty" name:"RegionId"` +} + +type CreateDealsGoodsDetail struct { + // 时间间隔 + TimeSpan *int64 `json:"TimeSpan,omitnil,omitempty" name:"TimeSpan"` + + // 单位,支持购买d、m、y 即(日、月、年) + TimeUnit *string `json:"TimeUnit,omitnil,omitempty" name:"TimeUnit"` // 子产品标签,。新购,续费必传,变配时放在oldConfig newConfig里面 // @@ -2356,6 +2818,212 @@ func (r *CreateIpAccessControlResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type CreatePostCKafkaFlowRequestParams struct { + // 投递的CKafka所在区域 + CKafkaRegion *string `json:"CKafkaRegion,omitnil,omitempty" name:"CKafkaRegion"` + + // 客户的CKafka 实例ID + CKafkaID *string `json:"CKafkaID,omitnil,omitempty" name:"CKafkaID"` + + // 支撑环境是IP:PORT,外网环境是domain:PORT + Brokers *string `json:"Brokers,omitnil,omitempty" name:"Brokers"` + + // 默认为none,支持snappy、gzip和lz4压缩,推荐snappy + Compression *string `json:"Compression,omitnil,omitempty" name:"Compression"` + + // 1-外网TGW,2-支撑环境,默认为支撑环境 + VipType *int64 `json:"VipType,omitnil,omitempty" name:"VipType"` + + // 1-访问日志,2-攻击日志,默认为访问日志 + LogType *int64 `json:"LogType,omitnil,omitempty" name:"LogType"` + + // 主题名称,默认不传或者传空字符串,默认值为waf_post_access_log + Topic *string `json:"Topic,omitnil,omitempty" name:"Topic"` + + // kafka集群的版本号 + KafkaVersion *string `json:"KafkaVersion,omitnil,omitempty" name:"KafkaVersion"` + + // 是否开启SASL校验,默认不开启,0-关闭,1-开启 + SASLEnable *int64 `json:"SASLEnable,omitnil,omitempty" name:"SASLEnable"` + + // SASL用户名 + SASLUser *string `json:"SASLUser,omitnil,omitempty" name:"SASLUser"` + + // SASL密码 + SASLPassword *string `json:"SASLPassword,omitnil,omitempty" name:"SASLPassword"` + + // 开启访问日志某些字段是否投递 + WriteConfig *FieldWriteConfig `json:"WriteConfig,omitnil,omitempty" name:"WriteConfig"` +} + +type CreatePostCKafkaFlowRequest struct { + *tchttp.BaseRequest + + // 投递的CKafka所在区域 + CKafkaRegion *string `json:"CKafkaRegion,omitnil,omitempty" name:"CKafkaRegion"` + + // 客户的CKafka 实例ID + CKafkaID *string `json:"CKafkaID,omitnil,omitempty" name:"CKafkaID"` + + // 支撑环境是IP:PORT,外网环境是domain:PORT + Brokers *string `json:"Brokers,omitnil,omitempty" name:"Brokers"` + + // 默认为none,支持snappy、gzip和lz4压缩,推荐snappy + Compression *string `json:"Compression,omitnil,omitempty" name:"Compression"` + + // 1-外网TGW,2-支撑环境,默认为支撑环境 + VipType *int64 `json:"VipType,omitnil,omitempty" name:"VipType"` + + // 1-访问日志,2-攻击日志,默认为访问日志 + LogType *int64 `json:"LogType,omitnil,omitempty" name:"LogType"` + + // 主题名称,默认不传或者传空字符串,默认值为waf_post_access_log + Topic *string `json:"Topic,omitnil,omitempty" name:"Topic"` + + // kafka集群的版本号 + KafkaVersion *string `json:"KafkaVersion,omitnil,omitempty" name:"KafkaVersion"` + + // 是否开启SASL校验,默认不开启,0-关闭,1-开启 + SASLEnable *int64 `json:"SASLEnable,omitnil,omitempty" name:"SASLEnable"` + + // SASL用户名 + SASLUser *string `json:"SASLUser,omitnil,omitempty" name:"SASLUser"` + + // SASL密码 + SASLPassword *string `json:"SASLPassword,omitnil,omitempty" name:"SASLPassword"` + + // 开启访问日志某些字段是否投递 + WriteConfig *FieldWriteConfig `json:"WriteConfig,omitnil,omitempty" name:"WriteConfig"` +} + +func (r *CreatePostCKafkaFlowRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreatePostCKafkaFlowRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CKafkaRegion") + delete(f, "CKafkaID") + delete(f, "Brokers") + delete(f, "Compression") + delete(f, "VipType") + delete(f, "LogType") + delete(f, "Topic") + delete(f, "KafkaVersion") + delete(f, "SASLEnable") + delete(f, "SASLUser") + delete(f, "SASLPassword") + delete(f, "WriteConfig") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreatePostCKafkaFlowRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreatePostCKafkaFlowResponseParams struct { + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type CreatePostCKafkaFlowResponse struct { + *tchttp.BaseResponse + Response *CreatePostCKafkaFlowResponseParams `json:"Response"` +} + +func (r *CreatePostCKafkaFlowResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreatePostCKafkaFlowResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreatePostCLSFlowRequestParams struct { + // 投递的CLS所在区域,默认为ap-shanghai + CLSRegion *string `json:"CLSRegion,omitnil,omitempty" name:"CLSRegion"` + + // 投递的CLS所在日志集合名称,默认为 waf_post_logset + LogsetName *string `json:"LogsetName,omitnil,omitempty" name:"LogsetName"` + + // 1-访问日志,2-攻击日志,默认为访问日志。 + LogType *int64 `json:"LogType,omitnil,omitempty" name:"LogType"` + + // 投递的CLS所在日志主题的名称,默认为 waf_post_logtopic + LogTopicName *string `json:"LogTopicName,omitnil,omitempty" name:"LogTopicName"` +} + +type CreatePostCLSFlowRequest struct { + *tchttp.BaseRequest + + // 投递的CLS所在区域,默认为ap-shanghai + CLSRegion *string `json:"CLSRegion,omitnil,omitempty" name:"CLSRegion"` + + // 投递的CLS所在日志集合名称,默认为 waf_post_logset + LogsetName *string `json:"LogsetName,omitnil,omitempty" name:"LogsetName"` + + // 1-访问日志,2-攻击日志,默认为访问日志。 + LogType *int64 `json:"LogType,omitnil,omitempty" name:"LogType"` + + // 投递的CLS所在日志主题的名称,默认为 waf_post_logtopic + LogTopicName *string `json:"LogTopicName,omitnil,omitempty" name:"LogTopicName"` +} + +func (r *CreatePostCLSFlowRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreatePostCLSFlowRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CLSRegion") + delete(f, "LogsetName") + delete(f, "LogType") + delete(f, "LogTopicName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreatePostCLSFlowRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreatePostCLSFlowResponseParams struct { + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type CreatePostCLSFlowResponse struct { + *tchttp.BaseResponse + Response *CreatePostCLSFlowResponseParams `json:"Response"` +} + +func (r *CreatePostCLSFlowResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreatePostCLSFlowResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type CronJob struct { // 每个月的几号执行 Days []*uint64 `json:"Days,omitnil,omitempty" name:"Days"` @@ -2679,6 +3347,78 @@ func (r *DeleteAttackWhiteRuleResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type DeleteBotSceneUCBRuleRequestParams struct { + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 自定义规则ID + RuleId *string `json:"RuleId,omitnil,omitempty" name:"RuleId"` + + // 1.BOT全局白名单处调用时,传"global";2.BOT场景配置时,传具体的场景ID + SceneId *string `json:"SceneId,omitnil,omitempty" name:"SceneId"` +} + +type DeleteBotSceneUCBRuleRequest struct { + *tchttp.BaseRequest + + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 自定义规则ID + RuleId *string `json:"RuleId,omitnil,omitempty" name:"RuleId"` + + // 1.BOT全局白名单处调用时,传"global";2.BOT场景配置时,传具体的场景ID + SceneId *string `json:"SceneId,omitnil,omitempty" name:"SceneId"` +} + +func (r *DeleteBotSceneUCBRuleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteBotSceneUCBRuleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Domain") + delete(f, "RuleId") + delete(f, "SceneId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteBotSceneUCBRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteBotSceneUCBRuleResponseParams struct { + // 正常情况下为null + // 注意:此字段可能返回 null,表示取不到有效值。 + Data *string `json:"Data,omitnil,omitempty" name:"Data"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DeleteBotSceneUCBRuleResponse struct { + *tchttp.BaseResponse + Response *DeleteBotSceneUCBRuleResponseParams `json:"Response"` +} + +func (r *DeleteBotSceneUCBRuleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteBotSceneUCBRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type DeleteCCRuleRequestParams struct { // 域名 @@ -3689,7 +4429,7 @@ type DescribeAntiFakeRulesRequestParams struct { // asc或者desc Order *string `json:"Order,omitnil,omitempty" name:"Order"` - // 目前支持根据ts排序 + // 目前支持根据create_time、modify_time、id排序 By *string `json:"By,omitnil,omitempty" name:"By"` } @@ -3711,7 +4451,7 @@ type DescribeAntiFakeRulesRequest struct { // asc或者desc Order *string `json:"Order,omitnil,omitempty" name:"Order"` - // 目前支持根据ts排序 + // 目前支持根据create_time、modify_time、id排序 By *string `json:"By,omitnil,omitempty" name:"By"` } @@ -4202,49 +4942,106 @@ type DescribeAreaBanAreasRsp struct { } // Predefined struct for user -type DescribeAreaBanSupportAreasRequestParams struct { - +type DescribeAreaBanRuleRequestParams struct { + // 需要查询的域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` } -type DescribeAreaBanSupportAreasRequest struct { +type DescribeAreaBanRuleRequest struct { *tchttp.BaseRequest + // 需要查询的域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` } -func (r *DescribeAreaBanSupportAreasRequest) ToJsonString() string { +func (r *DescribeAreaBanRuleRequest) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeAreaBanSupportAreasRequest) FromJsonString(s string) error { +func (r *DescribeAreaBanRuleRequest) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err } - + delete(f, "Domain") if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAreaBanSupportAreasRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAreaBanRuleRequest has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeAreaBanSupportAreasResponseParams struct { - // 地域封禁的地域列表,要解析成json后使用 - Data *string `json:"Data,omitnil,omitempty" name:"Data"` +type DescribeAreaBanRuleResponseParams struct { + // 规则内容 + Data *AreaBanRule `json:"Data,omitnil,omitempty" name:"Data"` // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } -type DescribeAreaBanSupportAreasResponse struct { +type DescribeAreaBanRuleResponse struct { *tchttp.BaseResponse - Response *DescribeAreaBanSupportAreasResponseParams `json:"Response"` + Response *DescribeAreaBanRuleResponseParams `json:"Response"` } -func (r *DescribeAreaBanSupportAreasResponse) ToJsonString() string { +func (r *DescribeAreaBanRuleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAreaBanRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeAreaBanSupportAreasRequestParams struct { + +} + +type DescribeAreaBanSupportAreasRequest struct { + *tchttp.BaseRequest + +} + +func (r *DescribeAreaBanSupportAreasRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAreaBanSupportAreasRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAreaBanSupportAreasRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeAreaBanSupportAreasResponseParams struct { + // 地域封禁的地域列表,要解析成json后使用 + Data *string `json:"Data,omitnil,omitempty" name:"Data"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeAreaBanSupportAreasResponse struct { + *tchttp.BaseResponse + Response *DescribeAreaBanSupportAreasResponseParams `json:"Response"` +} + +func (r *DescribeAreaBanSupportAreasResponse) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } @@ -4700,7 +5497,7 @@ func (r *DescribeAutoDenyIPResponse) FromJsonString(s string) error { // Predefined struct for user type DescribeBatchIpAccessControlRequestParams struct { - // 筛选条件,支持 ActionType,可选的值为40(白名单)42(黑名单),ValidStatus,可选的值为1(生效)0(过期) + // 筛选条件,支持 ActionType(可选的值为40:白名单,42:黑名单),ValidStatus(可选的值0:全部,1:生效,2:过期),Ip,Domains(域名列表),GroupId(防护对象组ID),GroupName(防护对象组名),RuleId(规则ID),TimerType(生效方式,1:永久生效,2:定时生效,3:按周周期生效,4:按月周期生效) Filters []*FiltersItemNew `json:"Filters,omitnil,omitempty" name:"Filters"` // 偏移 @@ -4716,7 +5513,7 @@ type DescribeBatchIpAccessControlRequestParams struct { type DescribeBatchIpAccessControlRequest struct { *tchttp.BaseRequest - // 筛选条件,支持 ActionType,可选的值为40(白名单)42(黑名单),ValidStatus,可选的值为1(生效)0(过期) + // 筛选条件,支持 ActionType(可选的值为40:白名单,42:黑名单),ValidStatus(可选的值0:全部,1:生效,2:过期),Ip,Domains(域名列表),GroupId(防护对象组ID),GroupName(防护对象组名),RuleId(规则ID),TimerType(生效方式,1:永久生效,2:定时生效,3:按周周期生效,4:按月周期生效) Filters []*FiltersItemNew `json:"Filters,omitnil,omitempty" name:"Filters"` // 偏移 @@ -4777,299 +5574,603 @@ func (r *DescribeBatchIpAccessControlResponse) FromJsonString(s string) error { } // Predefined struct for user -type DescribeCCAutoStatusRequestParams struct { +type DescribeBotSceneListRequestParams struct { // 域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 每页数量 + Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // 页码 + Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 场景模板类型,通过此下拉字段进行场景筛选。全部: all 登录: login 秒杀:seckill 爬内容:crawl 自定义: custom + BusinessType []*string `json:"BusinessType,omitnil,omitempty" name:"BusinessType"` + + // 通过场景名称模糊搜索 + SceneName *string `json:"SceneName,omitnil,omitempty" name:"SceneName"` + + // 是否只显示默认场景 + IsDefault *bool `json:"IsDefault,omitnil,omitempty" name:"IsDefault"` + + // 是否仅显示生效场景 + IsValid *bool `json:"IsValid,omitnil,omitempty" name:"IsValid"` } -type DescribeCCAutoStatusRequest struct { +type DescribeBotSceneListRequest struct { *tchttp.BaseRequest // 域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 每页数量 + Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // 页码 + Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 场景模板类型,通过此下拉字段进行场景筛选。全部: all 登录: login 秒杀:seckill 爬内容:crawl 自定义: custom + BusinessType []*string `json:"BusinessType,omitnil,omitempty" name:"BusinessType"` + + // 通过场景名称模糊搜索 + SceneName *string `json:"SceneName,omitnil,omitempty" name:"SceneName"` + + // 是否只显示默认场景 + IsDefault *bool `json:"IsDefault,omitnil,omitempty" name:"IsDefault"` + + // 是否仅显示生效场景 + IsValid *bool `json:"IsValid,omitnil,omitempty" name:"IsValid"` } -func (r *DescribeCCAutoStatusRequest) ToJsonString() string { +func (r *DescribeBotSceneListRequest) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeCCAutoStatusRequest) FromJsonString(s string) error { +func (r *DescribeBotSceneListRequest) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err } delete(f, "Domain") + delete(f, "Limit") + delete(f, "Offset") + delete(f, "BusinessType") + delete(f, "SceneName") + delete(f, "IsDefault") + delete(f, "IsValid") if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeCCAutoStatusRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBotSceneListRequest has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeCCAutoStatusResponseParams struct { - // 配置状态,0表示关闭,1表示开启 - AutoCCSwitch *int64 `json:"AutoCCSwitch,omitnil,omitempty" name:"AutoCCSwitch"` +type DescribeBotSceneListResponseParams struct { + // 符合筛选条件的场景数目 + TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // 当TotalCount为0时,返回空 + BotSceneList []*BotSceneInfo `json:"BotSceneList,omitnil,omitempty" name:"BotSceneList"` + + // true-简易模式 + SimpleFlag *bool `json:"SimpleFlag,omitnil,omitempty" name:"SimpleFlag"` // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } -type DescribeCCAutoStatusResponse struct { +type DescribeBotSceneListResponse struct { *tchttp.BaseResponse - Response *DescribeCCAutoStatusResponseParams `json:"Response"` + Response *DescribeBotSceneListResponseParams `json:"Response"` } -func (r *DescribeCCAutoStatusResponse) ToJsonString() string { +func (r *DescribeBotSceneListResponse) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeCCAutoStatusResponse) FromJsonString(s string) error { +func (r *DescribeBotSceneListResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeCCRuleListRequestParams struct { - // 需要查询的API所属的域名 +type DescribeBotSceneOverviewRequestParams struct { + // 域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` - - // 偏移 - Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` - - // 容量 - Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` - - // 目前支持根据ts_version排序 - By *string `json:"By,omitnil,omitempty" name:"By"` - - // 过滤数组,name可以是如下的值: RuleID,ParamName,Url,Action,Method,Source,Status - Filters []*FiltersItemNew `json:"Filters,omitnil,omitempty" name:"Filters"` - - // asc或者desc - Order *string `json:"Order,omitnil,omitempty" name:"Order"` } -type DescribeCCRuleListRequest struct { +type DescribeBotSceneOverviewRequest struct { *tchttp.BaseRequest - // 需要查询的API所属的域名 + // 域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` - - // 偏移 - Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` - - // 容量 - Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` - - // 目前支持根据ts_version排序 - By *string `json:"By,omitnil,omitempty" name:"By"` - - // 过滤数组,name可以是如下的值: RuleID,ParamName,Url,Action,Method,Source,Status - Filters []*FiltersItemNew `json:"Filters,omitnil,omitempty" name:"Filters"` - - // asc或者desc - Order *string `json:"Order,omitnil,omitempty" name:"Order"` } -func (r *DescribeCCRuleListRequest) ToJsonString() string { +func (r *DescribeBotSceneOverviewRequest) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeCCRuleListRequest) FromJsonString(s string) error { +func (r *DescribeBotSceneOverviewRequest) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err } delete(f, "Domain") - delete(f, "Offset") - delete(f, "Limit") - delete(f, "By") - delete(f, "Filters") - delete(f, "Order") if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeCCRuleListRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBotSceneOverviewRequest has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeCCRuleListResponseParams struct { - // 查询到的CC规则的列表 - Data *CCRuleLists `json:"Data,omitnil,omitempty" name:"Data"` +type DescribeBotSceneOverviewResponseParams struct { + // BOT总开关 + Status *bool `json:"Status,omitnil,omitempty" name:"Status"` + + // 场景总数 + SceneCount *int64 `json:"SceneCount,omitnil,omitempty" name:"SceneCount"` + + // 生效场景数 + ValidSceneCount *int64 `json:"ValidSceneCount,omitnil,omitempty" name:"ValidSceneCount"` + + // 当前开启的、匹配范围为全局、优先级最高的场景 + // 注意:此字段可能返回 null,表示取不到有效值。 + CurrentGlobalScene *GlobalSceneInfo `json:"CurrentGlobalScene,omitnil,omitempty" name:"CurrentGlobalScene"` + + // 自定义规则总数,不包括BOT白名单 + CustomRuleNums *int64 `json:"CustomRuleNums,omitnil,omitempty" name:"CustomRuleNums"` // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } -type DescribeCCRuleListResponse struct { +type DescribeBotSceneOverviewResponse struct { *tchttp.BaseResponse - Response *DescribeCCRuleListResponseParams `json:"Response"` + Response *DescribeBotSceneOverviewResponseParams `json:"Response"` } -func (r *DescribeCCRuleListResponse) ToJsonString() string { +func (r *DescribeBotSceneOverviewResponse) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeCCRuleListResponse) FromJsonString(s string) error { +func (r *DescribeBotSceneOverviewResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeCCRuleRequestParams struct { +type DescribeBotSceneUCBRuleRequestParams struct { // 域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` - // 页码 - Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + // 翻页组件的起始页 + Skip *uint64 `json:"Skip,omitnil,omitempty" name:"Skip"` - // 页的数目 + // 翻页组件的页数据条数 Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` // 排序参数 Sort *string `json:"Sort,omitnil,omitempty" name:"Sort"` - // clb-waf 或者 sparta-waf - Edition *string `json:"Edition,omitnil,omitempty" name:"Edition"` + // 1.BOT全局白名单处调用时,传"global";2.BOT场景配置处调用时,传具体的场景ID + SceneId *string `json:"SceneId,omitnil,omitempty" name:"SceneId"` - // 过滤条件 + // 需要过滤的动作 + Operate *string `json:"Operate,omitnil,omitempty" name:"Operate"` + + // 需要过滤的规则名称 Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // 兼容老数据和新旧版前端 + VersionFlag *string `json:"VersionFlag,omitnil,omitempty" name:"VersionFlag"` + + // 生效方式:0-全部 1-永久生效 2-定时生效 3-周粒度生效 4-月粒度生效 + TimerType *uint64 `json:"TimerType,omitnil,omitempty" name:"TimerType"` + + // 0-全部 1-生效中 2-已过期 + ValidStatus *uint64 `json:"ValidStatus,omitnil,omitempty" name:"ValidStatus"` } -type DescribeCCRuleRequest struct { +type DescribeBotSceneUCBRuleRequest struct { *tchttp.BaseRequest // 域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` - // 页码 - Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + // 翻页组件的起始页 + Skip *uint64 `json:"Skip,omitnil,omitempty" name:"Skip"` - // 页的数目 + // 翻页组件的页数据条数 Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` // 排序参数 Sort *string `json:"Sort,omitnil,omitempty" name:"Sort"` - // clb-waf 或者 sparta-waf - Edition *string `json:"Edition,omitnil,omitempty" name:"Edition"` + // 1.BOT全局白名单处调用时,传"global";2.BOT场景配置处调用时,传具体的场景ID + SceneId *string `json:"SceneId,omitnil,omitempty" name:"SceneId"` - // 过滤条件 + // 需要过滤的动作 + Operate *string `json:"Operate,omitnil,omitempty" name:"Operate"` + + // 需要过滤的规则名称 Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // 兼容老数据和新旧版前端 + VersionFlag *string `json:"VersionFlag,omitnil,omitempty" name:"VersionFlag"` + + // 生效方式:0-全部 1-永久生效 2-定时生效 3-周粒度生效 4-月粒度生效 + TimerType *uint64 `json:"TimerType,omitnil,omitempty" name:"TimerType"` + + // 0-全部 1-生效中 2-已过期 + ValidStatus *uint64 `json:"ValidStatus,omitnil,omitempty" name:"ValidStatus"` } -func (r *DescribeCCRuleRequest) ToJsonString() string { +func (r *DescribeBotSceneUCBRuleRequest) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeCCRuleRequest) FromJsonString(s string) error { +func (r *DescribeBotSceneUCBRuleRequest) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err } delete(f, "Domain") - delete(f, "Offset") + delete(f, "Skip") delete(f, "Limit") delete(f, "Sort") - delete(f, "Edition") + delete(f, "SceneId") + delete(f, "Operate") delete(f, "Name") + delete(f, "VersionFlag") + delete(f, "TimerType") + delete(f, "ValidStatus") if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeCCRuleRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBotSceneUCBRuleRequest has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeCCRuleResponseParams struct { - // 结果 - Data *CCRuleData `json:"Data,omitnil,omitempty" name:"Data"` +type DescribeBotSceneUCBRuleResponseParams struct { + // 返回数据包 + // 注意:此字段可能返回 null,表示取不到有效值。 + Data *DescribeBotUCBRuleRsp `json:"Data,omitnil,omitempty" name:"Data"` // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } -type DescribeCCRuleResponse struct { +type DescribeBotSceneUCBRuleResponse struct { *tchttp.BaseResponse - Response *DescribeCCRuleResponseParams `json:"Response"` + Response *DescribeBotSceneUCBRuleResponseParams `json:"Response"` } -func (r *DescribeCCRuleResponse) ToJsonString() string { +func (r *DescribeBotSceneUCBRuleResponse) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeCCRuleResponse) FromJsonString(s string) error { +func (r *DescribeBotSceneUCBRuleResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type DescribeBotUCBRuleRsp struct { + // 规则列表 + Res []*InOutputBotUCBRule `json:"Res,omitnil,omitempty" name:"Res"` + + // 规则总数 + TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` +} + // Predefined struct for user -type DescribeCertificateVerifyResultRequestParams struct { +type DescribeCCAutoStatusRequestParams struct { // 域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` - - // 证书类型。 0:不检测国际标准证书 1:证书来源为自有证书 2:证书来源为托管证书 - CertType *int64 `json:"CertType,omitnil,omitempty" name:"CertType"` - - // CertType为1时,需要填充此参数,表示自有证书的证书链 - Certificate *string `json:"Certificate,omitnil,omitempty" name:"Certificate"` - - // CertType为2时,需要填充此参数,表示腾讯云SSL平台托管的证书id - CertID *string `json:"CertID,omitnil,omitempty" name:"CertID"` - - // CertType为1时,需要填充此参数,表示自有证书的私钥 - PrivateKey *string `json:"PrivateKey,omitnil,omitempty" name:"PrivateKey"` - - // 国密证书类型。0:不检测国密证书 1:证书来源为自有国密证书 2:证书来源为托管国密证书 - GmCertType *int64 `json:"GmCertType,omitnil,omitempty" name:"GmCertType"` - - // GmCertType为1时,需要填充此参数,表示自有国密证书的证书链 - GmCert *string `json:"GmCert,omitnil,omitempty" name:"GmCert"` - - // GmCertType为1时,需要填充此参数,表示自有国密证书的私钥 - GmPrivateKey *string `json:"GmPrivateKey,omitnil,omitempty" name:"GmPrivateKey"` - - // GmCertType为1时,需要填充此参数,表示自有国密证书的加密证书 - GmEncCert *string `json:"GmEncCert,omitnil,omitempty" name:"GmEncCert"` - - // GmCertType为1时,需要填充此参数,表示自有国密证书的加密证书的私钥 - GmEncPrivateKey *string `json:"GmEncPrivateKey,omitnil,omitempty" name:"GmEncPrivateKey"` - - // GmCertType为2时,需要填充此参数,表示腾讯云SSL平台托管的证书id - GmSSLId *string `json:"GmSSLId,omitnil,omitempty" name:"GmSSLId"` } -type DescribeCertificateVerifyResultRequest struct { +type DescribeCCAutoStatusRequest struct { *tchttp.BaseRequest // 域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` +} - // 证书类型。 0:不检测国际标准证书 1:证书来源为自有证书 2:证书来源为托管证书 - CertType *int64 `json:"CertType,omitnil,omitempty" name:"CertType"` - - // CertType为1时,需要填充此参数,表示自有证书的证书链 - Certificate *string `json:"Certificate,omitnil,omitempty" name:"Certificate"` +func (r *DescribeCCAutoStatusRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} - // CertType为2时,需要填充此参数,表示腾讯云SSL平台托管的证书id - CertID *string `json:"CertID,omitnil,omitempty" name:"CertID"` +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCCAutoStatusRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Domain") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeCCAutoStatusRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} - // CertType为1时,需要填充此参数,表示自有证书的私钥 - PrivateKey *string `json:"PrivateKey,omitnil,omitempty" name:"PrivateKey"` +// Predefined struct for user +type DescribeCCAutoStatusResponseParams struct { + // 配置状态,0表示关闭,1表示开启 + AutoCCSwitch *int64 `json:"AutoCCSwitch,omitnil,omitempty" name:"AutoCCSwitch"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeCCAutoStatusResponse struct { + *tchttp.BaseResponse + Response *DescribeCCAutoStatusResponseParams `json:"Response"` +} + +func (r *DescribeCCAutoStatusResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCCAutoStatusResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeCCRuleListRequestParams struct { + // 需要查询的API所属的域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 偏移 + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 容量 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // 目前支持根据ts_version排序 + By *string `json:"By,omitnil,omitempty" name:"By"` + + // 过滤数组,name可以是如下的值: RuleID,ParamName,Url,Action,Method,Source,Status + Filters []*FiltersItemNew `json:"Filters,omitnil,omitempty" name:"Filters"` + + // asc或者desc + Order *string `json:"Order,omitnil,omitempty" name:"Order"` +} + +type DescribeCCRuleListRequest struct { + *tchttp.BaseRequest + + // 需要查询的API所属的域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 偏移 + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 容量 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // 目前支持根据ts_version排序 + By *string `json:"By,omitnil,omitempty" name:"By"` + + // 过滤数组,name可以是如下的值: RuleID,ParamName,Url,Action,Method,Source,Status + Filters []*FiltersItemNew `json:"Filters,omitnil,omitempty" name:"Filters"` + + // asc或者desc + Order *string `json:"Order,omitnil,omitempty" name:"Order"` +} + +func (r *DescribeCCRuleListRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCCRuleListRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Domain") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "By") + delete(f, "Filters") + delete(f, "Order") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeCCRuleListRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeCCRuleListResponseParams struct { + // 查询到的CC规则的列表 + Data *CCRuleLists `json:"Data,omitnil,omitempty" name:"Data"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeCCRuleListResponse struct { + *tchttp.BaseResponse + Response *DescribeCCRuleListResponseParams `json:"Response"` +} + +func (r *DescribeCCRuleListResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCCRuleListResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeCCRuleRequestParams struct { + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 页码 + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 页的数目 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // 排序参数 + Sort *string `json:"Sort,omitnil,omitempty" name:"Sort"` + + // clb-waf 或者 sparta-waf + Edition *string `json:"Edition,omitnil,omitempty" name:"Edition"` + + // 过滤条件 + Name *string `json:"Name,omitnil,omitempty" name:"Name"` +} + +type DescribeCCRuleRequest struct { + *tchttp.BaseRequest + + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 页码 + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 页的数目 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // 排序参数 + Sort *string `json:"Sort,omitnil,omitempty" name:"Sort"` + + // clb-waf 或者 sparta-waf + Edition *string `json:"Edition,omitnil,omitempty" name:"Edition"` + + // 过滤条件 + Name *string `json:"Name,omitnil,omitempty" name:"Name"` +} + +func (r *DescribeCCRuleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCCRuleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Domain") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Sort") + delete(f, "Edition") + delete(f, "Name") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeCCRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeCCRuleResponseParams struct { + // 结果 + Data *CCRuleData `json:"Data,omitnil,omitempty" name:"Data"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeCCRuleResponse struct { + *tchttp.BaseResponse + Response *DescribeCCRuleResponseParams `json:"Response"` +} + +func (r *DescribeCCRuleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCCRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeCertificateVerifyResultRequestParams struct { + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 证书类型。 0:不检测国际标准证书 1:证书来源为自有证书 2:证书来源为托管证书 + CertType *int64 `json:"CertType,omitnil,omitempty" name:"CertType"` + + // CertType为1时,需要填充此参数,表示自有证书的证书链 + Certificate *string `json:"Certificate,omitnil,omitempty" name:"Certificate"` + + // CertType为2时,需要填充此参数,表示腾讯云SSL平台托管的证书id + CertID *string `json:"CertID,omitnil,omitempty" name:"CertID"` + + // CertType为1时,需要填充此参数,表示自有证书的私钥 + PrivateKey *string `json:"PrivateKey,omitnil,omitempty" name:"PrivateKey"` + + // 国密证书类型。0:不检测国密证书 1:证书来源为自有国密证书 2:证书来源为托管国密证书 + GmCertType *int64 `json:"GmCertType,omitnil,omitempty" name:"GmCertType"` + + // GmCertType为1时,需要填充此参数,表示自有国密证书的证书链 + GmCert *string `json:"GmCert,omitnil,omitempty" name:"GmCert"` + + // GmCertType为1时,需要填充此参数,表示自有国密证书的私钥 + GmPrivateKey *string `json:"GmPrivateKey,omitnil,omitempty" name:"GmPrivateKey"` + + // GmCertType为1时,需要填充此参数,表示自有国密证书的加密证书 + GmEncCert *string `json:"GmEncCert,omitnil,omitempty" name:"GmEncCert"` + + // GmCertType为1时,需要填充此参数,表示自有国密证书的加密证书的私钥 + GmEncPrivateKey *string `json:"GmEncPrivateKey,omitnil,omitempty" name:"GmEncPrivateKey"` + + // GmCertType为2时,需要填充此参数,表示腾讯云SSL平台托管的证书id + GmSSLId *string `json:"GmSSLId,omitnil,omitempty" name:"GmSSLId"` +} + +type DescribeCertificateVerifyResultRequest struct { + *tchttp.BaseRequest + + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 证书类型。 0:不检测国际标准证书 1:证书来源为自有证书 2:证书来源为托管证书 + CertType *int64 `json:"CertType,omitnil,omitempty" name:"CertType"` + + // CertType为1时,需要填充此参数,表示自有证书的证书链 + Certificate *string `json:"Certificate,omitnil,omitempty" name:"Certificate"` + + // CertType为2时,需要填充此参数,表示腾讯云SSL平台托管的证书id + CertID *string `json:"CertID,omitnil,omitempty" name:"CertID"` + + // CertType为1时,需要填充此参数,表示自有证书的私钥 + PrivateKey *string `json:"PrivateKey,omitnil,omitempty" name:"PrivateKey"` // 国密证书类型。0:不检测国密证书 1:证书来源为自有国密证书 2:证书来源为托管国密证书 GmCertType *int64 `json:"GmCertType,omitnil,omitempty" name:"GmCertType"` @@ -5375,6 +6476,9 @@ type DescribeCustomRulesRspRuleListItem struct { // 域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 匹配条件的逻辑关系,支持and、or,分别表示多个逻辑匹配条件是与、或的关系 + LogicalOp *string `json:"LogicalOp,omitnil,omitempty" name:"LogicalOp"` } // Predefined struct for user @@ -6598,7 +7702,7 @@ type DescribeIpAccessControlRequestParams struct { // IP Ip *string `json:"Ip,omitnil,omitempty" name:"Ip"` - // 生效状态 + // 生效状态,1表示生效中,2表示过期,0表示全部 ValidStatus *int64 `json:"ValidStatus,omitnil,omitempty" name:"ValidStatus"` // 最小有效时间的时间戳 @@ -6610,7 +7714,7 @@ type DescribeIpAccessControlRequestParams struct { // 规则ID RuleId *uint64 `json:"RuleId,omitnil,omitempty" name:"RuleId"` - // 定时任务类型筛选0 1 2 3 4 + // 0表示全部,1表示永久生效,2表示定时生效,3表示周粒度生效,4表示月粒度生效 TimerType *int64 `json:"TimerType,omitnil,omitempty" name:"TimerType"` } @@ -6653,7 +7757,7 @@ type DescribeIpAccessControlRequest struct { // IP Ip *string `json:"Ip,omitnil,omitempty" name:"Ip"` - // 生效状态 + // 生效状态,1表示生效中,2表示过期,0表示全部 ValidStatus *int64 `json:"ValidStatus,omitnil,omitempty" name:"ValidStatus"` // 最小有效时间的时间戳 @@ -6665,7 +7769,7 @@ type DescribeIpAccessControlRequest struct { // 规则ID RuleId *uint64 `json:"RuleId,omitnil,omitempty" name:"RuleId"` - // 定时任务类型筛选0 1 2 3 4 + // 0表示全部,1表示永久生效,2表示定时生效,3表示周粒度生效,4表示月粒度生效 TimerType *int64 `json:"TimerType,omitnil,omitempty" name:"TimerType"` } @@ -6762,7 +7866,7 @@ type DescribeIpHitItemsRequestParams struct { // 偏移参数 Skip *uint64 `json:"Skip,omitnil,omitempty" name:"Skip"` - // 限制数目 + // 限制数目,category不等于threat_intelligence时,该值需要必传 Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` // 策略名称 @@ -6771,7 +7875,7 @@ type DescribeIpHitItemsRequestParams struct { // 排序参数 Sort *string `json:"Sort,omitnil,omitempty" name:"Sort"` - // IP + // IP,category传threat_intelligence的时候,该值必传 Ip *string `json:"Ip,omitnil,omitempty" name:"Ip"` // 有效时间最小时间戳 @@ -6808,7 +7912,7 @@ type DescribeIpHitItemsRequest struct { // 偏移参数 Skip *uint64 `json:"Skip,omitnil,omitempty" name:"Skip"` - // 限制数目 + // 限制数目,category不等于threat_intelligence时,该值需要必传 Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` // 策略名称 @@ -6817,7 +7921,7 @@ type DescribeIpHitItemsRequest struct { // 排序参数 Sort *string `json:"Sort,omitnil,omitempty" name:"Sort"` - // IP + // IP,category传threat_intelligence的时候,该值必传 Ip *string `json:"Ip,omitnil,omitempty" name:"Ip"` // 有效时间最小时间戳 @@ -7380,6 +8484,120 @@ func (r *DescribePortsResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type DescribePostCKafkaFlowsRequestParams struct { + // 1-访问日志,2-攻击日志,默认为访问日志。 + LogType *int64 `json:"LogType,omitnil,omitempty" name:"LogType"` +} + +type DescribePostCKafkaFlowsRequest struct { + *tchttp.BaseRequest + + // 1-访问日志,2-攻击日志,默认为访问日志。 + LogType *int64 `json:"LogType,omitnil,omitempty" name:"LogType"` +} + +func (r *DescribePostCKafkaFlowsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePostCKafkaFlowsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LogType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePostCKafkaFlowsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribePostCKafkaFlowsResponseParams struct { + // 客户的投递流列表 + PostCKafkaFlows []*PostCKafkaFlowInfo `json:"PostCKafkaFlows,omitnil,omitempty" name:"PostCKafkaFlows"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribePostCKafkaFlowsResponse struct { + *tchttp.BaseResponse + Response *DescribePostCKafkaFlowsResponseParams `json:"Response"` +} + +func (r *DescribePostCKafkaFlowsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePostCKafkaFlowsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribePostCLSFlowsRequestParams struct { + // 1-访问日志,2-攻击日志,默认为访问日志。 + LogType *int64 `json:"LogType,omitnil,omitempty" name:"LogType"` +} + +type DescribePostCLSFlowsRequest struct { + *tchttp.BaseRequest + + // 1-访问日志,2-攻击日志,默认为访问日志。 + LogType *int64 `json:"LogType,omitnil,omitempty" name:"LogType"` +} + +func (r *DescribePostCLSFlowsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePostCLSFlowsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LogType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePostCLSFlowsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribePostCLSFlowsResponseParams struct { + // 客户的投递流列表 + PostCLSFlows []*PostCLSFlowInfo `json:"PostCLSFlows,omitnil,omitempty" name:"PostCLSFlows"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribePostCLSFlowsResponse struct { + *tchttp.BaseResponse + Response *DescribePostCLSFlowsResponseParams `json:"Response"` +} + +func (r *DescribePostCLSFlowsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePostCLSFlowsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type DescribeProtectionModesRequestParams struct { // sparta-waf或clb @@ -8115,65 +9333,220 @@ func (r *DescribeUserDomainInfoResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } -// Predefined struct for user -type DescribeUserLevelRequestParams struct { - // 域名 - Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` +// Predefined struct for user +type DescribeUserLevelRequestParams struct { + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` +} + +type DescribeUserLevelRequest struct { + *tchttp.BaseRequest + + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` +} + +func (r *DescribeUserLevelRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeUserLevelRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Domain") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeUserLevelRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeUserLevelResponseParams struct { + // 300:正常 400:严格 + Level *uint64 `json:"Level,omitnil,omitempty" name:"Level"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeUserLevelResponse struct { + *tchttp.BaseResponse + Response *DescribeUserLevelResponseParams `json:"Response"` +} + +func (r *DescribeUserLevelResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeUserLevelResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeUserSignatureClassRequestParams struct { + // 查询域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` +} + +type DescribeUserSignatureClassRequest struct { + *tchttp.BaseRequest + + // 查询域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` +} + +func (r *DescribeUserSignatureClassRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeUserSignatureClassRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Domain") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeUserSignatureClassRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeUserSignatureClassResponseParams struct { + // 规则类型数量 + Total *int64 `json:"Total,omitnil,omitempty" name:"Total"` + + // 规则类型列表及信息 + RuleTypeList []*RuleType `json:"RuleTypeList,omitnil,omitempty" name:"RuleTypeList"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeUserSignatureClassResponse struct { + *tchttp.BaseResponse + Response *DescribeUserSignatureClassResponseParams `json:"Response"` +} + +func (r *DescribeUserSignatureClassResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeUserSignatureClassResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeUserSignatureRuleRequestParams struct { + // 需要查询的域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 分页 + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 每页容量 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // 排序字段,支持 signature_id, modify_time + By *string `json:"By,omitnil,omitempty" name:"By"` + + // 排序方式 + Order *string `json:"Order,omitnil,omitempty" name:"Order"` + + // 筛选条件,支持 MainClassName,SubClassID ,CveID, Status, ID; ID为规则id + Filters []*FiltersItemNew `json:"Filters,omitnil,omitempty" name:"Filters"` } -type DescribeUserLevelRequest struct { +type DescribeUserSignatureRuleRequest struct { *tchttp.BaseRequest - // 域名 + // 需要查询的域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 分页 + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 每页容量 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // 排序字段,支持 signature_id, modify_time + By *string `json:"By,omitnil,omitempty" name:"By"` + + // 排序方式 + Order *string `json:"Order,omitnil,omitempty" name:"Order"` + + // 筛选条件,支持 MainClassName,SubClassID ,CveID, Status, ID; ID为规则id + Filters []*FiltersItemNew `json:"Filters,omitnil,omitempty" name:"Filters"` } -func (r *DescribeUserLevelRequest) ToJsonString() string { +func (r *DescribeUserSignatureRuleRequest) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeUserLevelRequest) FromJsonString(s string) error { +func (r *DescribeUserSignatureRuleRequest) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err } delete(f, "Domain") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "By") + delete(f, "Order") + delete(f, "Filters") if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeUserLevelRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeUserSignatureRuleRequest has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeUserLevelResponseParams struct { - // 300:正常 400:严格 - Level *uint64 `json:"Level,omitnil,omitempty" name:"Level"` +type DescribeUserSignatureRuleResponseParams struct { + // 规则总数 + Total *uint64 `json:"Total,omitnil,omitempty" name:"Total"` + + // 规则列表 + Rules []*UserSignatureRule `json:"Rules,omitnil,omitempty" name:"Rules"` // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } -type DescribeUserLevelResponse struct { +type DescribeUserSignatureRuleResponse struct { *tchttp.BaseResponse - Response *DescribeUserLevelResponseParams `json:"Response"` + Response *DescribeUserSignatureRuleResponseParams `json:"Response"` } -func (r *DescribeUserLevelResponse) ToJsonString() string { +func (r *DescribeUserSignatureRuleResponse) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeUserLevelResponse) FromJsonString(s string) error { +func (r *DescribeUserSignatureRuleResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeUserSignatureRuleRequestParams struct { +type DescribeUserSignatureRuleV2RequestParams struct { // 需要查询的域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` @@ -8193,7 +9566,7 @@ type DescribeUserSignatureRuleRequestParams struct { Filters []*FiltersItemNew `json:"Filters,omitnil,omitempty" name:"Filters"` } -type DescribeUserSignatureRuleRequest struct { +type DescribeUserSignatureRuleV2Request struct { *tchttp.BaseRequest // 需要查询的域名 @@ -8215,14 +9588,14 @@ type DescribeUserSignatureRuleRequest struct { Filters []*FiltersItemNew `json:"Filters,omitnil,omitempty" name:"Filters"` } -func (r *DescribeUserSignatureRuleRequest) ToJsonString() string { +func (r *DescribeUserSignatureRuleV2Request) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeUserSignatureRuleRequest) FromJsonString(s string) error { +func (r *DescribeUserSignatureRuleV2Request) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err @@ -8234,13 +9607,13 @@ func (r *DescribeUserSignatureRuleRequest) FromJsonString(s string) error { delete(f, "Order") delete(f, "Filters") if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeUserSignatureRuleRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeUserSignatureRuleV2Request has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeUserSignatureRuleResponseParams struct { +type DescribeUserSignatureRuleV2ResponseParams struct { // 规则总数 Total *uint64 `json:"Total,omitnil,omitempty" name:"Total"` @@ -8251,19 +9624,19 @@ type DescribeUserSignatureRuleResponseParams struct { RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } -type DescribeUserSignatureRuleResponse struct { +type DescribeUserSignatureRuleV2Response struct { *tchttp.BaseResponse - Response *DescribeUserSignatureRuleResponseParams `json:"Response"` + Response *DescribeUserSignatureRuleV2ResponseParams `json:"Response"` } -func (r *DescribeUserSignatureRuleResponse) ToJsonString() string { +func (r *DescribeUserSignatureRuleV2Response) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeUserSignatureRuleResponse) FromJsonString(s string) error { +func (r *DescribeUserSignatureRuleV2Response) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } @@ -8571,6 +9944,128 @@ func (r *DescribeWebshellStatusResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type DestroyPostCKafkaFlowRequestParams struct { + // 投递流的流ID + FlowId *int64 `json:"FlowId,omitnil,omitempty" name:"FlowId"` + + // 1-访问日志,2-攻击日志,默认为访问日志。 + LogType *int64 `json:"LogType,omitnil,omitempty" name:"LogType"` +} + +type DestroyPostCKafkaFlowRequest struct { + *tchttp.BaseRequest + + // 投递流的流ID + FlowId *int64 `json:"FlowId,omitnil,omitempty" name:"FlowId"` + + // 1-访问日志,2-攻击日志,默认为访问日志。 + LogType *int64 `json:"LogType,omitnil,omitempty" name:"LogType"` +} + +func (r *DestroyPostCKafkaFlowRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DestroyPostCKafkaFlowRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "FlowId") + delete(f, "LogType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DestroyPostCKafkaFlowRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DestroyPostCKafkaFlowResponseParams struct { + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DestroyPostCKafkaFlowResponse struct { + *tchttp.BaseResponse + Response *DestroyPostCKafkaFlowResponseParams `json:"Response"` +} + +func (r *DestroyPostCKafkaFlowResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DestroyPostCKafkaFlowResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DestroyPostCLSFlowRequestParams struct { + // 投递流的流ID + FlowId *int64 `json:"FlowId,omitnil,omitempty" name:"FlowId"` + + // 1-访问日志,2-攻击日志,默认为访问日志。 + LogType *int64 `json:"LogType,omitnil,omitempty" name:"LogType"` +} + +type DestroyPostCLSFlowRequest struct { + *tchttp.BaseRequest + + // 投递流的流ID + FlowId *int64 `json:"FlowId,omitnil,omitempty" name:"FlowId"` + + // 1-访问日志,2-攻击日志,默认为访问日志。 + LogType *int64 `json:"LogType,omitnil,omitempty" name:"LogType"` +} + +func (r *DestroyPostCLSFlowRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DestroyPostCLSFlowRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "FlowId") + delete(f, "LogType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DestroyPostCLSFlowRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DestroyPostCLSFlowResponseParams struct { + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DestroyPostCLSFlowResponse struct { + *tchttp.BaseResponse + Response *DestroyPostCLSFlowResponseParams `json:"Response"` +} + +func (r *DestroyPostCLSFlowResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DestroyPostCLSFlowResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type DomainInfo struct { // 域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` @@ -8989,6 +10484,17 @@ type DomainsPartInfo struct { // 域名标签 Labels []*string `json:"Labels,omitnil,omitempty" name:"Labels"` + + // 拨测状态。 0: 禁用拨测, 1: 启用拨测 + ProbeStatus *int64 `json:"ProbeStatus,omitnil,omitempty" name:"ProbeStatus"` + + // 回源策略。 + // 0:负载均衡回源 + // 1:分流回源 + UpstreamPolicy *int64 `json:"UpstreamPolicy,omitnil,omitempty" name:"UpstreamPolicy"` + + // 分流回源策略 + UpstreamRules []*UpstreamRule `json:"UpstreamRules,omitnil,omitempty" name:"UpstreamRules"` } type DownloadAttackRecordInfo struct { @@ -9064,6 +10570,17 @@ type ExportAccessInfo struct { CreateTime *string `json:"CreateTime,omitnil,omitempty" name:"CreateTime"` } +type FieldWriteConfig struct { + // 1:开启 0:不开启 + EnableHeaders *int64 `json:"EnableHeaders,omitnil,omitempty" name:"EnableHeaders"` + + // 1:开启 0:不开启 + EnableBody *int64 `json:"EnableBody,omitnil,omitempty" name:"EnableBody"` + + // 1:开启 0:不开启 + EnableBot *int64 `json:"EnableBot,omitnil,omitempty" name:"EnableBot"` +} + type FiltersItemNew struct { // 字段名; 过滤 // 子订单号过滤通过name 为:DealName; value为子订单号 @@ -9538,6 +11055,20 @@ func (r *GetInstanceQpsLimitResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type GlobalSceneInfo struct { + // 场景ID + SceneId *string `json:"SceneId,omitnil,omitempty" name:"SceneId"` + + // 场景名称 + SceneName *string `json:"SceneName,omitnil,omitempty" name:"SceneName"` + + // 场景优先级 + Priority *int64 `json:"Priority,omitnil,omitempty" name:"Priority"` + + // 场景更新时间 + UpdateTime *int64 `json:"UpdateTime,omitnil,omitempty" name:"UpdateTime"` +} + type GoodNews struct { // 商品数量 GoodsNum *int64 `json:"GoodsNum,omitnil,omitempty" name:"GoodsNum"` @@ -9938,6 +11469,106 @@ func (r *ImportIpAccessControlResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type InOutputBotUCBRule struct { + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 规则名称 + Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // UCB的具体规则项 + Rule []*InOutputUCBRuleEntry `json:"Rule,omitnil,omitempty" name:"Rule"` + + // 处置动作 + Action *string `json:"Action,omitnil,omitempty" name:"Action"` + + // 规则开关 + OnOff *string `json:"OnOff,omitnil,omitempty" name:"OnOff"` + + // 规则类型 + RuleType *int64 `json:"RuleType,omitnil,omitempty" name:"RuleType"` + + // 规则优先级 + Prior *int64 `json:"Prior,omitnil,omitempty" name:"Prior"` + + // 修改时间戳 + Timestamp *int64 `json:"Timestamp,omitnil,omitempty" name:"Timestamp"` + + // 标签 + Label *string `json:"Label,omitnil,omitempty" name:"Label"` + + // 入参ID + Id *string `json:"Id,omitnil,omitempty" name:"Id"` + + // 场景ID + SceneId *string `json:"SceneId,omitnil,omitempty" name:"SceneId"` + + // 生效时间 + ValidTime *int64 `json:"ValidTime,omitnil,omitempty" name:"ValidTime"` + + // 传入的appid + Appid *uint64 `json:"Appid,omitnil,omitempty" name:"Appid"` + + // 额外参数 + AdditionArg *string `json:"AdditionArg,omitnil,omitempty" name:"AdditionArg"` + + // 规则描述 + Desc *string `json:"Desc,omitnil,omitempty" name:"Desc"` + + // 规则ID + RuleId *string `json:"RuleId,omitnil,omitempty" name:"RuleId"` + + // true-系统预设规则 false-自定义规则 + PreDefine *bool `json:"PreDefine,omitnil,omitempty" name:"PreDefine"` + + // 定时任务类型 + JobType *string `json:"JobType,omitnil,omitempty" name:"JobType"` + + // 定时任务配置 + JobDateTime *JobDateTime `json:"JobDateTime,omitnil,omitempty" name:"JobDateTime"` + + // 生效截止时间 + ExpireTime *uint64 `json:"ExpireTime,omitnil,omitempty" name:"ExpireTime"` + + // 生效-1,失效-0 + ValidStatus *int64 `json:"ValidStatus,omitnil,omitempty" name:"ValidStatus"` + + // 自定义拦截页面ID + BlockPageId *uint64 `json:"BlockPageId,omitnil,omitempty" name:"BlockPageId"` + + // 当Action=intercept时,此字段必填 + ActionList []*UCBActionProportion `json:"ActionList,omitnil,omitempty" name:"ActionList"` +} + +type InOutputUCBRuleEntry struct { + // 键 + Key *string `json:"Key,omitnil,omitempty" name:"Key"` + + // 操作符 + Op *string `json:"Op,omitnil,omitempty" name:"Op"` + + // 值 + Value *UCBEntryValue `json:"Value,omitnil,omitempty" name:"Value"` + + // 可选的补充操作符 + OpOp *string `json:"OpOp,omitnil,omitempty" name:"OpOp"` + + // 可选的补充参数 + OpArg []*string `json:"OpArg,omitnil,omitempty" name:"OpArg"` + + // 可选的补充值 + OpValue *float64 `json:"OpValue,omitnil,omitempty" name:"OpValue"` + + // Header参数值时使用 + Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // 区域选择 + Areas []*Area `json:"Areas,omitnil,omitempty" name:"Areas"` + + // 语言环境 + Lang *string `json:"Lang,omitnil,omitempty" name:"Lang"` +} + type InstanceInfo struct { // 实例唯一ID InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` @@ -10071,6 +11702,15 @@ type InstanceInfo struct { // 实例延期释放标识 FreeDelayFlag *uint64 `json:"FreeDelayFlag,omitnil,omitempty" name:"FreeDelayFlag"` + + // 最近3天最大qps + Last3MaxQPS *uint64 `json:"Last3MaxQPS,omitnil,omitempty" name:"Last3MaxQPS"` + + // 最近3天最大带宽 + Last3MaxBandwidth *uint64 `json:"Last3MaxBandwidth,omitnil,omitempty" name:"Last3MaxBandwidth"` + + // 重保增强包 + MajorEventsProPkg *MajorEventsProPkg `json:"MajorEventsProPkg,omitnil,omitempty" name:"MajorEventsProPkg"` } type IpAccessControlData struct { @@ -10286,19 +11926,51 @@ type LoadBalancerPackageNew struct { // CLB类型 LoadBalancerType *string `json:"LoadBalancerType,omitnil,omitempty" name:"LoadBalancerType"` - // 负载均衡器的域名 - LoadBalancerDomain *string `json:"LoadBalancerDomain,omitnil,omitempty" name:"LoadBalancerDomain"` -} + // 负载均衡器的域名 + LoadBalancerDomain *string `json:"LoadBalancerDomain,omitnil,omitempty" name:"LoadBalancerDomain"` +} + +type LogHistogramInfo struct { + // 日志条数 + Count *int64 `json:"Count,omitnil,omitempty" name:"Count"` + + // 时间戳 + TimeStamp *int64 `json:"TimeStamp,omitnil,omitempty" name:"TimeStamp"` +} + +type MajorEventsPkg struct { + // 资源id + ResourceIds *string `json:"ResourceIds,omitnil,omitempty" name:"ResourceIds"` + + // 状态 + Status *int64 `json:"Status,omitnil,omitempty" name:"Status"` + + // 地域 + Region *int64 `json:"Region,omitnil,omitempty" name:"Region"` + + // 开始时间 + BeginTime *string `json:"BeginTime,omitnil,omitempty" name:"BeginTime"` + + // 结束时间 + EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"` + + // 申请数量 + InquireNum *int64 `json:"InquireNum,omitnil,omitempty" name:"InquireNum"` + + // 使用数量 + UsedNum *int64 `json:"UsedNum,omitnil,omitempty" name:"UsedNum"` + + // 续费标志 + RenewFlag *uint64 `json:"RenewFlag,omitnil,omitempty" name:"RenewFlag"` -type LogHistogramInfo struct { - // 日志条数 - Count *int64 `json:"Count,omitnil,omitempty" name:"Count"` + // 计费项 + BillingItem *string `json:"BillingItem,omitnil,omitempty" name:"BillingItem"` - // 时间戳 - TimeStamp *int64 `json:"TimeStamp,omitnil,omitempty" name:"TimeStamp"` + // 护网包状态 + HWState *int64 `json:"HWState,omitnil,omitempty" name:"HWState"` } -type MajorEventsPkg struct { +type MajorEventsProPkg struct { // 资源id ResourceIds *string `json:"ResourceIds,omitnil,omitempty" name:"ResourceIds"` @@ -10325,9 +11997,6 @@ type MajorEventsPkg struct { // 计费项 BillingItem *string `json:"BillingItem,omitnil,omitempty" name:"BillingItem"` - - // 护网包状态 - HWState *int64 `json:"HWState,omitnil,omitempty" name:"HWState"` } type MiniExtendPkg struct { @@ -10933,6 +12602,88 @@ func (r *ModifyAreaBanAreasResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type ModifyAreaBanRuleRequestParams struct { + // 需要修改的域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 需要新增的封禁地域 + Areas []*Area `json:"Areas,omitnil,omitempty" name:"Areas"` + + // 规则执行的方式,TimedJob为定时执行,CronJob为周期执行 + JobType *string `json:"JobType,omitnil,omitempty" name:"JobType"` + + // 定时任务配置 + JobDateTime *JobDateTime `json:"JobDateTime,omitnil,omitempty" name:"JobDateTime"` + + // 地域信息的语言,支持cn、en,默认为中文cn + Lang *string `json:"Lang,omitnil,omitempty" name:"Lang"` +} + +type ModifyAreaBanRuleRequest struct { + *tchttp.BaseRequest + + // 需要修改的域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 需要新增的封禁地域 + Areas []*Area `json:"Areas,omitnil,omitempty" name:"Areas"` + + // 规则执行的方式,TimedJob为定时执行,CronJob为周期执行 + JobType *string `json:"JobType,omitnil,omitempty" name:"JobType"` + + // 定时任务配置 + JobDateTime *JobDateTime `json:"JobDateTime,omitnil,omitempty" name:"JobDateTime"` + + // 地域信息的语言,支持cn、en,默认为中文cn + Lang *string `json:"Lang,omitnil,omitempty" name:"Lang"` +} + +func (r *ModifyAreaBanRuleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAreaBanRuleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Domain") + delete(f, "Areas") + delete(f, "JobType") + delete(f, "JobDateTime") + delete(f, "Lang") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAreaBanRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyAreaBanRuleResponseParams struct { + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type ModifyAreaBanRuleResponse struct { + *tchttp.BaseResponse + Response *ModifyAreaBanRuleResponseParams `json:"Response"` +} + +func (r *ModifyAreaBanRuleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAreaBanRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type ModifyAreaBanStatusRequestParams struct { // 需要修改的域名 @@ -10952,158 +12703,304 @@ type ModifyAreaBanStatusRequest struct { Status *int64 `json:"Status,omitnil,omitempty" name:"Status"` } -func (r *ModifyAreaBanStatusRequest) ToJsonString() string { +func (r *ModifyAreaBanStatusRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAreaBanStatusRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Domain") + delete(f, "Status") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAreaBanStatusRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyAreaBanStatusResponseParams struct { + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type ModifyAreaBanStatusResponse struct { + *tchttp.BaseResponse + Response *ModifyAreaBanStatusResponseParams `json:"Response"` +} + +func (r *ModifyAreaBanStatusResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAreaBanStatusResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyAttackWhiteRuleRequestParams struct { + // 规则序号 + RuleId *uint64 `json:"RuleId,omitnil,omitempty" name:"RuleId"` + + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 规则状态 + Status *uint64 `json:"Status,omitnil,omitempty" name:"Status"` + + // 匹配规则项列表 + Rules []*UserWhiteRuleItem `json:"Rules,omitnil,omitempty" name:"Rules"` + + // 规则Id + SignatureId *string `json:"SignatureId,omitnil,omitempty" name:"SignatureId"` + + // 编辑的加白的规则ID列表 + SignatureIds []*string `json:"SignatureIds,omitnil,omitempty" name:"SignatureIds"` + + // 加白的大类规则ID + TypeIds []*string `json:"TypeIds,omitnil,omitempty" name:"TypeIds"` + + // 0表示按照特定规则ID加白, 1表示按照规则类型加白 + Mode *int64 `json:"Mode,omitnil,omitempty" name:"Mode"` + + // 规则名 + Name *string `json:"Name,omitnil,omitempty" name:"Name"` +} + +type ModifyAttackWhiteRuleRequest struct { + *tchttp.BaseRequest + + // 规则序号 + RuleId *uint64 `json:"RuleId,omitnil,omitempty" name:"RuleId"` + + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 规则状态 + Status *uint64 `json:"Status,omitnil,omitempty" name:"Status"` + + // 匹配规则项列表 + Rules []*UserWhiteRuleItem `json:"Rules,omitnil,omitempty" name:"Rules"` + + // 规则Id + SignatureId *string `json:"SignatureId,omitnil,omitempty" name:"SignatureId"` + + // 编辑的加白的规则ID列表 + SignatureIds []*string `json:"SignatureIds,omitnil,omitempty" name:"SignatureIds"` + + // 加白的大类规则ID + TypeIds []*string `json:"TypeIds,omitnil,omitempty" name:"TypeIds"` + + // 0表示按照特定规则ID加白, 1表示按照规则类型加白 + Mode *int64 `json:"Mode,omitnil,omitempty" name:"Mode"` + + // 规则名 + Name *string `json:"Name,omitnil,omitempty" name:"Name"` +} + +func (r *ModifyAttackWhiteRuleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAttackWhiteRuleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RuleId") + delete(f, "Domain") + delete(f, "Status") + delete(f, "Rules") + delete(f, "SignatureId") + delete(f, "SignatureIds") + delete(f, "TypeIds") + delete(f, "Mode") + delete(f, "Name") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAttackWhiteRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyAttackWhiteRuleResponseParams struct { + // 规则总数 + RuleId *uint64 `json:"RuleId,omitnil,omitempty" name:"RuleId"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type ModifyAttackWhiteRuleResponse struct { + *tchttp.BaseResponse + Response *ModifyAttackWhiteRuleResponseParams `json:"Response"` +} + +func (r *ModifyAttackWhiteRuleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAttackWhiteRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyBotSceneStatusRequestParams struct { + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 场景ID + SceneId *string `json:"SceneId,omitnil,omitempty" name:"SceneId"` + + // true-开启 false-关闭 + Status *bool `json:"Status,omitnil,omitempty" name:"Status"` +} + +type ModifyBotSceneStatusRequest struct { + *tchttp.BaseRequest + + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 场景ID + SceneId *string `json:"SceneId,omitnil,omitempty" name:"SceneId"` + + // true-开启 false-关闭 + Status *bool `json:"Status,omitnil,omitempty" name:"Status"` +} + +func (r *ModifyBotSceneStatusRequest) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *ModifyAreaBanStatusRequest) FromJsonString(s string) error { +func (r *ModifyBotSceneStatusRequest) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err } delete(f, "Domain") + delete(f, "SceneId") delete(f, "Status") if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAreaBanStatusRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyBotSceneStatusRequest has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type ModifyAreaBanStatusResponseParams struct { +type ModifyBotSceneStatusResponseParams struct { // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } -type ModifyAreaBanStatusResponse struct { +type ModifyBotSceneStatusResponse struct { *tchttp.BaseResponse - Response *ModifyAreaBanStatusResponseParams `json:"Response"` + Response *ModifyBotSceneStatusResponseParams `json:"Response"` } -func (r *ModifyAreaBanStatusResponse) ToJsonString() string { +func (r *ModifyBotSceneStatusResponse) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *ModifyAreaBanStatusResponse) FromJsonString(s string) error { +func (r *ModifyBotSceneStatusResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type ModifyAttackWhiteRuleRequestParams struct { - // 规则序号 - RuleId *uint64 `json:"RuleId,omitnil,omitempty" name:"RuleId"` - +type ModifyBotSceneUCBRuleRequestParams struct { // 域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` - // 规则状态 - Status *uint64 `json:"Status,omitnil,omitempty" name:"Status"` - - // 匹配规则项列表 - Rules []*UserWhiteRuleItem `json:"Rules,omitnil,omitempty" name:"Rules"` - - // 规则Id - SignatureId *string `json:"SignatureId,omitnil,omitempty" name:"SignatureId"` - - // 编辑的加白的规则ID列表 - SignatureIds []*string `json:"SignatureIds,omitnil,omitempty" name:"SignatureIds"` - - // 加白的大类规则ID - TypeIds []*string `json:"TypeIds,omitnil,omitempty" name:"TypeIds"` + // 1.BOT全局白名单处调用时,传"global";2.BOT场景配置时,传具体的场景ID + SceneId *string `json:"SceneId,omitnil,omitempty" name:"SceneId"` - // 0表示按照特定规则ID加白, 1表示按照规则类型加白 - Mode *int64 `json:"Mode,omitnil,omitempty" name:"Mode"` + // 规则内容, 增加编码SceneId信息,1.BOT全局白名单处调用时,SceneId为"global", RuleType传10, Action为"permit";2.BOT场景配置时,SceneId为场景ID + Rule *InOutputBotUCBRule `json:"Rule,omitnil,omitempty" name:"Rule"` - // 规则名 - Name *string `json:"Name,omitnil,omitempty" name:"Name"` + // 530改批量操作 + BatchRules []*InOutputBotUCBRule `json:"BatchRules,omitnil,omitempty" name:"BatchRules"` } -type ModifyAttackWhiteRuleRequest struct { +type ModifyBotSceneUCBRuleRequest struct { *tchttp.BaseRequest - // 规则序号 - RuleId *uint64 `json:"RuleId,omitnil,omitempty" name:"RuleId"` - // 域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` - // 规则状态 - Status *uint64 `json:"Status,omitnil,omitempty" name:"Status"` - - // 匹配规则项列表 - Rules []*UserWhiteRuleItem `json:"Rules,omitnil,omitempty" name:"Rules"` - - // 规则Id - SignatureId *string `json:"SignatureId,omitnil,omitempty" name:"SignatureId"` - - // 编辑的加白的规则ID列表 - SignatureIds []*string `json:"SignatureIds,omitnil,omitempty" name:"SignatureIds"` - - // 加白的大类规则ID - TypeIds []*string `json:"TypeIds,omitnil,omitempty" name:"TypeIds"` + // 1.BOT全局白名单处调用时,传"global";2.BOT场景配置时,传具体的场景ID + SceneId *string `json:"SceneId,omitnil,omitempty" name:"SceneId"` - // 0表示按照特定规则ID加白, 1表示按照规则类型加白 - Mode *int64 `json:"Mode,omitnil,omitempty" name:"Mode"` + // 规则内容, 增加编码SceneId信息,1.BOT全局白名单处调用时,SceneId为"global", RuleType传10, Action为"permit";2.BOT场景配置时,SceneId为场景ID + Rule *InOutputBotUCBRule `json:"Rule,omitnil,omitempty" name:"Rule"` - // 规则名 - Name *string `json:"Name,omitnil,omitempty" name:"Name"` + // 530改批量操作 + BatchRules []*InOutputBotUCBRule `json:"BatchRules,omitnil,omitempty" name:"BatchRules"` } -func (r *ModifyAttackWhiteRuleRequest) ToJsonString() string { +func (r *ModifyBotSceneUCBRuleRequest) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *ModifyAttackWhiteRuleRequest) FromJsonString(s string) error { +func (r *ModifyBotSceneUCBRuleRequest) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err } - delete(f, "RuleId") delete(f, "Domain") - delete(f, "Status") - delete(f, "Rules") - delete(f, "SignatureId") - delete(f, "SignatureIds") - delete(f, "TypeIds") - delete(f, "Mode") - delete(f, "Name") + delete(f, "SceneId") + delete(f, "Rule") + delete(f, "BatchRules") if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAttackWhiteRuleRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyBotSceneUCBRuleRequest has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type ModifyAttackWhiteRuleResponseParams struct { - // 规则总数 - RuleId *uint64 `json:"RuleId,omitnil,omitempty" name:"RuleId"` +type ModifyBotSceneUCBRuleResponseParams struct { + // 正常情况下为null + Data *string `json:"Data,omitnil,omitempty" name:"Data"` // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } -type ModifyAttackWhiteRuleResponse struct { +type ModifyBotSceneUCBRuleResponse struct { *tchttp.BaseResponse - Response *ModifyAttackWhiteRuleResponseParams `json:"Response"` + Response *ModifyBotSceneUCBRuleResponseParams `json:"Response"` } -func (r *ModifyAttackWhiteRuleResponse) ToJsonString() string { +func (r *ModifyBotSceneUCBRuleResponse) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *ModifyAttackWhiteRuleResponse) FromJsonString(s string) error { +func (r *ModifyBotSceneUCBRuleResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } @@ -11240,6 +13137,8 @@ type ModifyCustomRuleRequestParams struct { // 放行时是否继续执行其它检查逻辑,继续执行地域封禁防护:geoip、继续执行CC策略防护:cc、继续执行WEB应用防护:owasp、继续执行AI引擎防护:ai、继续执行信息防泄漏防护:antileakage。如果多个勾选那么以,串接。 // 默认是"geoip,cc,owasp,ai,antileakage" + // + // Deprecated: Bypass is deprecated. Bypass *string `json:"Bypass,omitnil,omitempty" name:"Bypass"` // 优先级,1~100的整数,数字越小,代表这条规则的执行优先级越高。 @@ -11264,6 +13163,9 @@ type ModifyCustomRuleRequestParams struct { // 拦截页面id PageId *string `json:"PageId,omitnil,omitempty" name:"PageId"` + + // 匹配条件的逻辑关系,支持and、or,分别表示多个逻辑匹配条件是与、或的关系 + LogicalOp *string `json:"LogicalOp,omitnil,omitempty" name:"LogicalOp"` } type ModifyCustomRuleRequest struct { @@ -11316,6 +13218,9 @@ type ModifyCustomRuleRequest struct { // 拦截页面id PageId *string `json:"PageId,omitnil,omitempty" name:"PageId"` + + // 匹配条件的逻辑关系,支持and、or,分别表示多个逻辑匹配条件是与、或的关系 + LogicalOp *string `json:"LogicalOp,omitnil,omitempty" name:"LogicalOp"` } func (r *ModifyCustomRuleRequest) ToJsonString() string { @@ -11345,6 +13250,7 @@ func (r *ModifyCustomRuleRequest) FromJsonString(s string) error { delete(f, "Source") delete(f, "Status") delete(f, "PageId") + delete(f, "LogicalOp") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyCustomRuleRequest has unknown keys!", "") } @@ -11478,7 +13384,7 @@ type ModifyCustomWhiteRuleRequestParams struct { // 优先级,1~100的整数,数字越小,代表这条规则的执行优先级越高。 SortId *uint64 `json:"SortId,omitnil,omitempty" name:"SortId"` - // 规则生效截止时间,0:永久生效,其它值为对应时间的时间戳。 + // 如果没有设置JobDateTime字段则用此字段,0表示永久生效,其它表示定时生效的截止时间(单位为秒) ExpireTime *uint64 `json:"ExpireTime,omitnil,omitempty" name:"ExpireTime"` // 匹配条件数组 @@ -11509,7 +13415,7 @@ type ModifyCustomWhiteRuleRequest struct { // 优先级,1~100的整数,数字越小,代表这条规则的执行优先级越高。 SortId *uint64 `json:"SortId,omitnil,omitempty" name:"SortId"` - // 规则生效截止时间,0:永久生效,其它值为对应时间的时间戳。 + // 如果没有设置JobDateTime字段则用此字段,0表示永久生效,其它表示定时生效的截止时间(单位为秒) ExpireTime *uint64 `json:"ExpireTime,omitnil,omitempty" name:"ExpireTime"` // 匹配条件数组 @@ -12882,7 +14788,7 @@ type ModifyProtectionStatusRequestParams struct { // 域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` - // 状态 + // 1:开启WAF开关,0:关闭WAF开关 Status *uint64 `json:"Status,omitnil,omitempty" name:"Status"` // WAF的版本,clb-waf代表负载均衡WAF、sparta-waf代表SaaS WAF,默认是sparta-waf。 @@ -12895,7 +14801,7 @@ type ModifyProtectionStatusRequest struct { // 域名 Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` - // 状态 + // 1:开启WAF开关,0:关闭WAF开关 Status *uint64 `json:"Status,omitnil,omitempty" name:"Status"` // WAF的版本,clb-waf代表负载均衡WAF、sparta-waf代表SaaS WAF,默认是sparta-waf。 @@ -13170,6 +15076,12 @@ type ModifySpartaProtectionRequestParams struct { // GmCertType为2时,需要填充此参数,表示腾讯云SSL平台托管的证书id GmSSLId *string `json:"GmSSLId,omitnil,omitempty" name:"GmSSLId"` + + // 回源策略,支持负载均衡回源和分流回源两种方式。0:默认值,负载均衡回源;1:分流回源 + UpstreamPolicy *int64 `json:"UpstreamPolicy,omitnil,omitempty" name:"UpstreamPolicy"` + + // 分流回源时生效,分流回源的规则。 + UpstreamRules []*UpstreamRule `json:"UpstreamRules,omitnil,omitempty" name:"UpstreamRules"` } type ModifySpartaProtectionRequest struct { @@ -13312,6 +15224,12 @@ type ModifySpartaProtectionRequest struct { // GmCertType为2时,需要填充此参数,表示腾讯云SSL平台托管的证书id GmSSLId *string `json:"GmSSLId,omitnil,omitempty" name:"GmSSLId"` + + // 回源策略,支持负载均衡回源和分流回源两种方式。0:默认值,负载均衡回源;1:分流回源 + UpstreamPolicy *int64 `json:"UpstreamPolicy,omitnil,omitempty" name:"UpstreamPolicy"` + + // 分流回源时生效,分流回源的规则。 + UpstreamRules []*UpstreamRule `json:"UpstreamRules,omitnil,omitempty" name:"UpstreamRules"` } func (r *ModifySpartaProtectionRequest) ToJsonString() string { @@ -13370,6 +15288,8 @@ func (r *ModifySpartaProtectionRequest) FromJsonString(s string) error { delete(f, "GmEncCert") delete(f, "GmEncPrivateKey") delete(f, "GmSSLId") + delete(f, "UpstreamPolicy") + delete(f, "UpstreamRules") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifySpartaProtectionRequest has unknown keys!", "") } @@ -13459,6 +15379,80 @@ func (r *ModifyUserLevelResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type ModifyUserSignatureClassRequestParams struct { + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 规则类型ID + TypeID *string `json:"TypeID,omitnil,omitempty" name:"TypeID"` + + // 规则类型状态,0:关闭,1:开启 + Status *int64 `json:"Status,omitnil,omitempty" name:"Status"` +} + +type ModifyUserSignatureClassRequest struct { + *tchttp.BaseRequest + + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 规则类型ID + TypeID *string `json:"TypeID,omitnil,omitempty" name:"TypeID"` + + // 规则类型状态,0:关闭,1:开启 + Status *int64 `json:"Status,omitnil,omitempty" name:"Status"` +} + +func (r *ModifyUserSignatureClassRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyUserSignatureClassRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Domain") + delete(f, "TypeID") + delete(f, "Status") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyUserSignatureClassRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyUserSignatureClassResponseParams struct { + // 规则类型ID + TypeID *string `json:"TypeID,omitnil,omitempty" name:"TypeID"` + + // 规则类型状态,0:关闭,1:开启 + Status *int64 `json:"Status,omitnil,omitempty" name:"Status"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type ModifyUserSignatureClassResponse struct { + *tchttp.BaseResponse + Response *ModifyUserSignatureClassResponseParams `json:"Response"` +} + +func (r *ModifyUserSignatureClassResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyUserSignatureClassResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type ModifyUserSignatureRuleRequestParams struct { // 域名 @@ -14017,6 +16011,79 @@ func (r *PostAttackDownloadTaskResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type PostCKafkaFlowInfo struct { + // 投递流唯一ID + FlowId *int64 `json:"FlowId,omitnil,omitempty" name:"FlowId"` + + // 1-访问日志 2-攻击日志 + LogType *int64 `json:"LogType,omitnil,omitempty" name:"LogType"` + + // 状态 0-为关闭 1-为启用 + Status *int64 `json:"Status,omitnil,omitempty" name:"Status"` + + // CKafka所在区域 + CKafkaRegion *string `json:"CKafkaRegion,omitnil,omitempty" name:"CKafkaRegion"` + + // CKafka实例ID + CKafkaID *string `json:"CKafkaID,omitnil,omitempty" name:"CKafkaID"` + + // ckafka地址信息 + Brokers *string `json:"Brokers,omitnil,omitempty" name:"Brokers"` + + // ckafka版本号 + Version *string `json:"Version,omitnil,omitempty" name:"Version"` + + // 主题名称 + Topic *string `json:"Topic,omitnil,omitempty" name:"Topic"` + + // 压缩算法,支持gzip 和 lz4 + Compression *string `json:"Compression,omitnil,omitempty" name:"Compression"` + + // 是否支持SASL,0-关闭,1-开启 + SASLEnable *int64 `json:"SASLEnable,omitnil,omitempty" name:"SASLEnable"` + + // SASL用户名 + SASLUser *string `json:"SASLUser,omitnil,omitempty" name:"SASLUser"` + + // SALS密码 + SASLPassword *string `json:"SASLPassword,omitnil,omitempty" name:"SASLPassword"` + + // 描述信息 + Content *string `json:"Content,omitnil,omitempty" name:"Content"` + + // 1-外网TGW,2-支撑环境,默认为支撑环境 + VipType *int64 `json:"VipType,omitnil,omitempty" name:"VipType"` + + // 配置状态 + WriteConfig *FieldWriteConfig `json:"WriteConfig,omitnil,omitempty" name:"WriteConfig"` +} + +type PostCLSFlowInfo struct { + // 投递流唯一ID + FlowId *int64 `json:"FlowId,omitnil,omitempty" name:"FlowId"` + + // 1-访问日志 2-攻击日志 + LogType *int64 `json:"LogType,omitnil,omitempty" name:"LogType"` + + // 状态 0-为关闭 1-为启用 + Status *int64 `json:"Status,omitnil,omitempty" name:"Status"` + + // CLS所在区域 + CLSRegion *string `json:"CLSRegion,omitnil,omitempty" name:"CLSRegion"` + + // CLS日志集合名称 + LogsetName *string `json:"LogsetName,omitnil,omitempty" name:"LogsetName"` + + // CLS日志集合ID + LogsetID *string `json:"LogsetID,omitnil,omitempty" name:"LogsetID"` + + // CLS日志主题名称 + LogTopicName *string `json:"LogTopicName,omitnil,omitempty" name:"LogTopicName"` + + // CLS日志集合ID + LogTopicID *string `json:"LogTopicID,omitnil,omitempty" name:"LogTopicID"` +} + type ProductInfo struct { // 产品名称 Name *string `json:"Name,omitnil,omitempty" name:"Name"` @@ -14192,6 +16259,26 @@ type RuleList struct { CreateTime *string `json:"CreateTime,omitnil,omitempty" name:"CreateTime"` } +type RuleType struct { + // 规则ID + TypeID *string `json:"TypeID,omitnil,omitempty" name:"TypeID"` + + // 规则名称 + Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // 规则类型描述 + Desc *string `json:"Desc,omitnil,omitempty" name:"Desc"` + + // 规则类型状态,即类型生效开关,0:关闭,1:开启 + RuleTypeStatus *int64 `json:"RuleTypeStatus,omitnil,omitempty" name:"RuleTypeStatus"` + + // 类型下生效的规则数量 + ActiveRuleCount *int64 `json:"ActiveRuleCount,omitnil,omitempty" name:"ActiveRuleCount"` + + // 类型下的规则总数量 + TotalRuleCount *int64 `json:"TotalRuleCount,omitnil,omitempty" name:"TotalRuleCount"` +} + type ScanIpInfo struct { // 所属业务 Bussiness *string `json:"Bussiness,omitnil,omitempty" name:"Bussiness"` @@ -14531,7 +16618,8 @@ type Strategy struct { // // 匹配字段不同,相应的匹配参数、逻辑符号、匹配内容有所不同 // 具体如下所示: - //
匹配字段匹配参数逻辑符号匹配内容
IP(来源IP)不支持参数ipmatch(匹配)
ipnmatch(不匹配)
多个IP以英文逗号隔开,最多20个
IPV6(来源IPv6)不支持参数ipmatch(匹配)
ipnmatch(不匹配)
支持单个IPV6地址
Referer(Referer)不支持参数empty(内容为空)
null(不存在)
eq(等于)
neq(不等于)
contains(包含)
ncontains(不包含)
len_eq(长度等于)
len_gt(长度大于)
len_lt(长度小于)
strprefix(前缀匹配)
strsuffix(后缀匹配)
rematch(正则匹配)
请输入内容,512个字符以内
URL(请求路径)不支持参数eq(等于)
neq(不等于)
contains(包含)
ncontains(不包含)
len_eq(长度等于)
len_gt(长度大于)
len_lt(长度小于)
strprefix(前缀匹配)
strsuffix(后缀匹配)
rematch(正则匹配)
请以/开头,512个字符以内
UserAgent(UserAgent)不支持参数同匹配字段Referer逻辑符号请输入内容,512个字符以内
HTTP_METHOD(HTTP请求方法)不支持参数eq(等于)
neq(不等于)
请输入方法名称,建议大写
QUERY_STRING(请求字符串)不支持参数同匹配字段请求路径逻辑符号请输入内容,512个字符以内
GET(GET参数值)支持参数录入contains(包含)
ncontains(不包含)
len_eq(长度等于)
len_gt(长度大于)
len_lt(长度小于)
strprefix(前缀匹配)
strsuffix(后缀匹配)
请输入内容,512个字符以内
GET_PARAMS_NAMES(GET参数名)不支持参数exsit(存在参数)
nexsit(不存在参数)
len_eq(长度等于)
len_gt(长度大于)
len_lt(长度小于)
strprefix(前缀匹配)
strsuffix(后缀匹配)
请输入内容,512个字符以内
POST(POST参数值)支持参数录入同匹配字段GET参数值逻辑符号请输入内容,512个字符以内
GET_POST_NAMES(POST参数名)不支持参数同匹配字段GET参数名逻辑符号请输入内容,512个字符以内
POST_BODY(完整BODY)不支持参数同匹配字段请求路径逻辑符号请输入BODY内容,512个字符以内
COOKIE(Cookie)不支持参数empty(内容为空)
null(不存在)
rematch(正则匹配)
暂不支持
GET_COOKIES_NAMES(Cookie参数名)不支持参数同匹配字段GET参数名逻辑符号请输入内容,512个字符以内
ARGS_COOKIE(Cookie参数值)支持参数录入同匹配字段GET参数值逻辑符号请输入内容,512个字符以内
GET_HEADERS_NAMES(Header参数名)不支持参数exsit(存在参数)
nexsit(不存在参数)
len_eq(长度等于)
len_gt(长度大于)
len_lt(长度小于)
strprefix(前缀匹配)
strsuffix(后缀匹配)
rematch(正则匹配)
请输入内容,建议小写,512个字符以内
ARGS_HEADER(Header参数值)支持参数录入contains(包含)
ncontains(不包含)
len_eq(长度等于)
len_gt(长度大于)
len_lt(长度小于)
strprefix(前缀匹配)
strsuffix(后缀匹配)
rematch(正则匹配)
请输入内容,512个字符以内
+ // + //
匹配字段匹配参数逻辑符号匹配内容
IP(来源IP)不支持参数ipmatch(匹配)
ipnmatch(不匹配)
多个IP以英文逗号隔开,最多20个
IPV6(来源IPv6)不支持参数ipmatch(匹配)
ipnmatch(不匹配)
支持单个IPV6地址
Referer(Referer)不支持参数empty(内容为空)
null(不存在)
eq(等于)
neq(不等于)
contains(包含)
ncontains(不包含)
len_eq(长度等于)
len_gt(长度大于)
len_lt(长度小于)
strprefix(前缀匹配)
strsuffix(后缀匹配)
rematch(正则匹配)
请输入内容,512个字符以内
URL(请求路径)不支持参数eq(等于)
neq(不等于)
contains(包含)
ncontains(不包含)
len_eq(长度等于)
len_gt(长度大于)
len_lt(长度小于)
strprefix(前缀匹配)
strsuffix(后缀匹配)
rematch(正则匹配)
请以/开头,512个字符以内
UserAgent(UserAgent)不支持参数同匹配字段Referer逻辑符号请输入内容,512个字符以内
HTTP_METHOD(HTTP请求方法)不支持参数eq(等于)
neq(不等于)
请输入方法名称,建议大写
QUERY_STRING(请求字符串)不支持参数同匹配字段请求路径逻辑符号请输入内容,512个字符以内
GET(GET参数值)支持参数录入contains(包含)
ncontains(不包含)
len_eq(长度等于)
len_gt(长度大于)
len_lt(长度小于)
strprefix(前缀匹配)
strsuffix(后缀匹配)
请输入内容,512个字符以内
GET_PARAMS_NAMES(GET参数名)不支持参数exsit(存在参数)
nexsit(不存在参数)
len_eq(长度等于)
len_gt(长度大于)
len_lt(长度小于)
strprefix(前缀匹配)
strsuffix(后缀匹配)
请输入内容,512个字符以内
POST(POST参数值)支持参数录入同匹配字段GET参数值逻辑符号请输入内容,512个字符以内
GET_POST_NAMES(POST参数名)不支持参数同匹配字段GET参数名逻辑符号请输入内容,512个字符以内
POST_BODY(完整BODY)不支持参数同匹配字段请求路径逻辑符号请输入BODY内容,512个字符以内
COOKIE(Cookie)不支持参数empty(内容为空)
null(不存在)
rematch(正则匹配)
暂不支持
GET_COOKIES_NAMES(Cookie参数名)不支持参数同匹配字段GET参数名逻辑符号请输入内容,512个字符以内
ARGS_COOKIE(Cookie参数值)支持参数录入同匹配字段GET参数值逻辑符号请输入内容,512个字符以内
GET_HEADERS_NAMES(Header参数名)不支持参数exsit(存在参数)
nexsit(不存在参数)
len_eq(长度等于)
len_gt(长度大于)
len_lt(长度小于)
strprefix(前缀匹配)
strsuffix(后缀匹配)
rematch(正则匹配)
请输入内容,建议小写,512个字符以内
ARGS_HEADER(Header参数值)支持参数录入contains(包含)
ncontains(不包含)
len_eq(长度等于)
len_gt(长度大于)
len_lt(长度小于)
strprefix(前缀匹配)
strsuffix(后缀匹配)
rematch(正则匹配)
请输入内容,512个字符以内
CONTENT_LENGTH(Content-length)支持参数录入numgt(数值大于)
numlt(数值小于)
numeq(数值等于)
请输入0-9999999999999之间的整数
IP_GEO(来源IP归属地)支持参数录入geo_in(属于)
geo_not_in(不属于)
请输入内容,10240字符以内,格式为序列化的JSON,格式为:[{"Country":"中国","Region":"广东","City":"深圳"}]
Field *string `json:"Field,omitnil,omitempty" name:"Field"` // 逻辑符号 @@ -14550,6 +16638,11 @@ type Strategy struct { // len_lt ( 长度小于) // ipmatch ( 属于) // ipnmatch ( 不属于) + // numgt ( 数值大于) + // numlt ( 数值小于) + // numeq ( 数值等于) + // geo_in ( IP地理属于) + // geo_not_in ( IP地理不属于) // 各匹配字段对应的逻辑符号不同,详见上述匹配字段表格 CompareFunc *string `json:"CompareFunc,omitnil,omitempty" name:"CompareFunc"` @@ -14781,6 +16874,110 @@ type TimedJob struct { EndDateTime *uint64 `json:"EndDateTime,omitnil,omitempty" name:"EndDateTime"` } +type UCBActionProportion struct { + // 动作 + Action *string `json:"Action,omitnil,omitempty" name:"Action"` + + // 比例 + Proportion *float64 `json:"Proportion,omitnil,omitempty" name:"Proportion"` +} + +type UCBEntryValue struct { + // string类型值 + BasicValue *string `json:"BasicValue,omitnil,omitempty" name:"BasicValue"` + + // 布尔类型值 + LogicValue *bool `json:"LogicValue,omitnil,omitempty" name:"LogicValue"` + + // string数组类型值 + BelongValue []*string `json:"BelongValue,omitnil,omitempty" name:"BelongValue"` + + // 指示有效的字段 + ValidKey *string `json:"ValidKey,omitnil,omitempty" name:"ValidKey"` + + // string数组类型值 + MultiValue []*string `json:"MultiValue,omitnil,omitempty" name:"MultiValue"` +} + +// Predefined struct for user +type UpdateProtectionModesRequestParams struct { + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 资源类型 + Edition *string `json:"Edition,omitnil,omitempty" name:"Edition"` + + // 大类规则ID + TypeIDs []*string `json:"TypeIDs,omitnil,omitempty" name:"TypeIDs"` + + // 0表示观察,1表示拦截 + Mode *int64 `json:"Mode,omitnil,omitempty" name:"Mode"` +} + +type UpdateProtectionModesRequest struct { + *tchttp.BaseRequest + + // 域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // 资源类型 + Edition *string `json:"Edition,omitnil,omitempty" name:"Edition"` + + // 大类规则ID + TypeIDs []*string `json:"TypeIDs,omitnil,omitempty" name:"TypeIDs"` + + // 0表示观察,1表示拦截 + Mode *int64 `json:"Mode,omitnil,omitempty" name:"Mode"` +} + +func (r *UpdateProtectionModesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpdateProtectionModesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Domain") + delete(f, "Edition") + delete(f, "TypeIDs") + delete(f, "Mode") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateProtectionModesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type UpdateProtectionModesResponseParams struct { + // 操作结果 + // 注意:此字段可能返回 null,表示取不到有效值。 + CommonRsp *CommonRspData `json:"CommonRsp,omitnil,omitempty" name:"CommonRsp"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type UpdateProtectionModesResponse struct { + *tchttp.BaseResponse + Response *UpdateProtectionModesResponseParams `json:"Response"` +} + +func (r *UpdateProtectionModesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpdateProtectionModesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type UpsertCCAutoStatusRequestParams struct { // 域名 @@ -14875,7 +17072,7 @@ type UpsertCCRuleRequestParams struct { // 检测Url Url *string `json:"Url,omitnil,omitempty" name:"Url"` - // 匹配方法,0表示等于,1表示前缀匹配,2表示包含 + // 匹配方法,0表示等于,1表示前缀匹配,2表示包含,3表示不等于,6表示后缀匹配,7表示不包含 MatchFunc *int64 `json:"MatchFunc,omitnil,omitempty" name:"MatchFunc"` // 动作,20表示观察,21表示人机识别,22表示拦截,23表示精准拦截,26表示精准人机识别,27表示JS校验 @@ -14887,7 +17084,7 @@ type UpsertCCRuleRequestParams struct { // 动作有效时间 ValidTime *int64 `json:"ValidTime,omitnil,omitempty" name:"ValidTime"` - // 附加参数 + // CC的匹配条件JSON序列化的字符串,示例:[{\"key\":\"Method\",\"args\":[\"=R0VU\"],\"match\":\"0\",\"encodeflag\":true}] Key可选值为 Method、Post、Referer、Cookie、User-Agent、CustomHeader match可选值为,当Key为Method的时候可选值为0(等于)、3(不等于)。 Key为Post的时候可选值为0(等于)、3(不等于),Key为Cookie的时候可选值为0(等于)、2(包含),3(不等于)、7(不包含)、 当Key为Referer的时候可选值为0(等于)、3(不等于)、1(前缀匹配)、6(后缀匹配)、2(包含)、7(不包含)、12(存在)、5(不存在)、4(内容为空), 当Key为Cookie的时候可选值为0(等于)、3(不等于)、2(包含)、7(不包含)、12(存在)、5(不存在)、4(内容为空), 当Key为User-Agent的时候可选值为0(等于)、3(不等于)、1(前缀匹配)、6(后缀匹配)、2(包含)、7(不包含)、12(存在)、5(不存在)、4(内容为空), 当Key为CustomHeader的时候可选值为0(等于)、3(不等于)、2(包含)、7(不包含)、12(存在)、5(不存在)、4(内容为空)。 args用来表示匹配内容,需要设置encodeflag为true,当Key为Post、Cookie、CustomHeader时,用等号=来分别串接Key和Value,并分别用Base64编码,类似YWJj=YWJj。当Key为Referer、User-Agent时,用等号=来串接Value,类似=YWJj。 OptionsArr *string `json:"OptionsArr,omitnil,omitempty" name:"OptionsArr"` // waf版本,sparta-waf或者clb-waf @@ -14936,7 +17133,7 @@ type UpsertCCRuleRequest struct { // 检测Url Url *string `json:"Url,omitnil,omitempty" name:"Url"` - // 匹配方法,0表示等于,1表示前缀匹配,2表示包含 + // 匹配方法,0表示等于,1表示前缀匹配,2表示包含,3表示不等于,6表示后缀匹配,7表示不包含 MatchFunc *int64 `json:"MatchFunc,omitnil,omitempty" name:"MatchFunc"` // 动作,20表示观察,21表示人机识别,22表示拦截,23表示精准拦截,26表示精准人机识别,27表示JS校验 @@ -14948,7 +17145,7 @@ type UpsertCCRuleRequest struct { // 动作有效时间 ValidTime *int64 `json:"ValidTime,omitnil,omitempty" name:"ValidTime"` - // 附加参数 + // CC的匹配条件JSON序列化的字符串,示例:[{\"key\":\"Method\",\"args\":[\"=R0VU\"],\"match\":\"0\",\"encodeflag\":true}] Key可选值为 Method、Post、Referer、Cookie、User-Agent、CustomHeader match可选值为,当Key为Method的时候可选值为0(等于)、3(不等于)。 Key为Post的时候可选值为0(等于)、3(不等于),Key为Cookie的时候可选值为0(等于)、2(包含),3(不等于)、7(不包含)、 当Key为Referer的时候可选值为0(等于)、3(不等于)、1(前缀匹配)、6(后缀匹配)、2(包含)、7(不包含)、12(存在)、5(不存在)、4(内容为空), 当Key为Cookie的时候可选值为0(等于)、3(不等于)、2(包含)、7(不包含)、12(存在)、5(不存在)、4(内容为空), 当Key为User-Agent的时候可选值为0(等于)、3(不等于)、1(前缀匹配)、6(后缀匹配)、2(包含)、7(不包含)、12(存在)、5(不存在)、4(内容为空), 当Key为CustomHeader的时候可选值为0(等于)、3(不等于)、2(包含)、7(不包含)、12(存在)、5(不存在)、4(内容为空)。 args用来表示匹配内容,需要设置encodeflag为true,当Key为Post、Cookie、CustomHeader时,用等号=来分别串接Key和Value,并分别用Base64编码,类似YWJj=YWJj。当Key为Referer、User-Agent时,用等号=来串接Value,类似=YWJj。 OptionsArr *string `json:"OptionsArr,omitnil,omitempty" name:"OptionsArr"` // waf版本,sparta-waf或者clb-waf @@ -15254,6 +17451,29 @@ func (r *UpsertSessionResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type UpstreamRule struct { + // 匹配的关键字。目前支持host、uri两种 + KeyName *string `json:"KeyName,omitnil,omitempty" name:"KeyName"` + + // 逻辑符号。 + // equal:等于 + // not equal:不等于 + // belong:属于 + // not belong:不属于 + Symbol *string `json:"Symbol,omitnil,omitempty" name:"Symbol"` + + // 匹配的内容。equal和not equal时,数组只能有一个元素 + ContentList []*string `json:"ContentList,omitnil,omitempty" name:"ContentList"` + + // 规则匹配后生效的回源地址。 + AddressList []*string `json:"AddressList,omitnil,omitempty" name:"AddressList"` + + // 回源负载均衡类型,仅多个回源地址时生效。 + // 0:轮询 + // 1:IP_HASH + BalanceType *uint64 `json:"BalanceType,omitnil,omitempty" name:"BalanceType"` +} + type UserDomainInfo struct { // 用户id Appid *uint64 `json:"Appid,omitnil,omitempty" name:"Appid"` diff --git a/vendor/modules.txt b/vendor/modules.txt index a23634e55a..42376fb31b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1166,7 +1166,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit/v20190319 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.1135 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls/v20201016 -# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1148 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1149 ## explicit; go 1.11 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors @@ -1352,7 +1352,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod/v20180717 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.1148 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312 -# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.1037 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.1149 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf/v20180125 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wedata v1.0.792